Discrete or continuous time Fourier analysis
Simscape / Electrical / Control / General Control
The Fourier Analysis block performs a Fourier analysis on the input signal in either discrete or continuous time.
A periodic function x(t) can be decomposed to an infinite sum of sine and cosine functions as
a0 is the DC component.
an and bn are constant Fourier coefficients.
n is the harmonic number.
The coefficients an and bn are defined as
where f is the fundamental frequency.
The magnitude and angle corresponding to the harmonic number are defined as:
If you use this block for continuous-time operations and set the
Sample time (-1 for inherited) parameter to
0, you should also specify the value of the
Buffer size parameter to ensure it covers the moving
u— Fourier analysis input
Input signal to be analyzed. The input can be a single signal or multiple multiplexed signals. Input signals can be AC currents or voltages in an electrical system.
Magnitude— Signal magnitude
Signal magnitude corresponding to the harmonic number.
Angle— Signal angle
Signal angle corresponding to the harmonic number.
Fundamental frequency (Hz)— Signal fundamental frequency
60(default) | positive scalar | vector with positive values
Fundamental frequency of the signal, in Hz. If you specify the fundamental frequency using a vector, it must match the input vector dimensions.
Harmonic numbers— Signal harmonic numbers
[1 2](default) | vector with elements ≥
Specify signal harmonic numbers. Vector elements must be greater than or equal to 0.
Initial magnitude— Initial signal magnitude
1(default) | vector with elements ≥
Specify the initial magnitude of the signal. Vector elements must be greater than or equal to 0.
Initial phase (rad)— Initial signal phase
0(default) | vector
Initial phase angle of the signal, in rad.
Buffer size— Buffer size
8192(default) | scalar
Size of the buffer.
To enable this parameter, set Sample time (-1 for
Sample time (-1 for inherited)— Block sample time
-1(default) | 0 | positive scalar
Time between consecutive block executions. During execution, the block produces outputs and, if appropriate, updates its internal state. For more information, see What Is Sample Time? and Specify Sample Time.
For inherited discrete-time operation, specify
discrete-time operation, specify a positive integer. For continuous-time operation,
If this block is in a masked subsystem, or other variant subsystem that allows you to switch between continuous operation and discrete operation, promote the sample time parameter. Promoting the sample time parameter ensures correct switching between the continuous and discrete implementations of the block. For more information, see Promote Parameter to Mask.