Main Content

Fourier

(To be removed) Perform Fourier analysis of signal

The Specialized Power Systems library will be removed in R2026a. Use the Simscape™ Electrical™ blocks and functions instead. For more information on updating your models, see Upgrade Specialized Power System Models to use Simscape Electrical Blocks.

  • Fourier block

Libraries:
Simscape / Electrical / Specialized Power Systems / Sensors and Measurements

Description

The Fourier block performs a Fourier analysis of the input signal over a running window of one cycle of the fundamental frequency of the signal. The Fourier block can be programmed to calculate the magnitude and phase of the DC component, the fundamental, or any harmonic component of the input signal.

Recall that a signal f(t) can be expressed by a Fourier series of the form

f(t)=a02+n=1ancos(nωt)+bnsin(nωt)

where n represents the rank of the harmonics. (n = 1 corresponds to the fundamental component.) The magnitude and phase of the selected harmonic component are calculated by these equations:

|Hn|=an2+bn2

Hn=atan(anbn)

where

an=2TtTtf(t)cos(nωt)dt

bn=2TtTtf(t)sin(nωt)dt

T=1f1

f1:Fundamental frequency

As this block uses a running average window, one cycle of simulation must complete before the outputs give the correct magnitude and angle. For the first cycle of simulation, the outputs are held to the values specified by the initial input parameter.

Characteristics

Sample TimeSpecified in the Sample Time parameter. Continuous if Sample Time = 0.
Scalar ExpansionYes, of the parameters.
DimensionalizedYes.

Ports

Input

expand all

Signal to analyze. Typical input signals are voltages or currents measured by Current Measurement or Voltage Measurement blocks.

Output

expand all

Magnitude of the specified harmonic component, in the same units as the input signal.

Phase, in degrees, of the specified harmonic component.

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Fundamental frequency, in hertz, of the input signal.

Harmonic component for the Fourier analysis. Enter 0 to analyze the DC component. Enter 1 to analyze the fundamental frequency, or enter a number corresponding to the desired harmonic.

Initial magnitude and phase in degrees of the output signal.

Sample time of the block, in seconds. Set to 0 to implement a continuous block.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2013a