Engee documentation

Fourier

Performs Fourier analysis of the signal.

fourier

Description

Block Fourier performs Fourier analysis of the input signal in a window of one cycle of the main frequency of the signal. The block Fourier can be configured to calculate the modulus and phase of the DC component, fundamental or any harmonic component of the input signal.

The signal can be recorded as a Fourier series:

where represents the harmonic rank ( corresponds to the principal component). The modulus and phase of the selected harmonic component are calculated using these equations:

where

where is the fundamental frequency.

Since this block uses a moving average window, one simulation cycle must be completed before the output values match the correct modulus and phase values. For the first simulation cycle, the output values correspond to the parameter where the initial values are set.

Characteristics

Sampling period

Set in the Sample Time parameters. Continuous if Sample Time is set to 0.

Scalar expansion

Yes, from parameters.

Definition of dimensionality

Yes.

Ports

Input

# IN_1 — signal for analysis
scalar, `vector'

Details

Signal to be analysed.

Data types

Float64.

Complex numbers support

No

Output

# ∠u — phase of the specified harmonic component
scalar

Details

The phase of the specified harmonic component in degrees.

Data types

Float64.

Complex numbers support

No

# |u| — modulus of the specified harmonic component
scalar

Details

The modulus of a specified harmonic component in the same units as the input signal.

Data types

Float64.

Complex numbers support

No

Parameters

Main

# Fundamental frequency, Hz — fundamental frequency

Details

The fundamental frequency of the input signal in Hz.

Default value

50

Program usage name

f

Evaluatable

Yes

# Harmonic n (0=DC, 1=fundamental) — harmonic component for Fourier analysis

Details

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

Default value

1

Program usage name

n

Evaluatable

Yes

# Initial input [Magnitude, Phase (deg)] — initial values of modulus and phase of the output signal

Details

Initial values of the modulus and phase of the output signal.

The phase is set in degrees.

Default value

[0, 0]

Program usage name

initial_input

Evaluatable

Yes

# Sample time — sampling period

Details

The sampling period of the block in seconds. Set to 0 to realise a continuous block.

Default value

0

Program usage name

sample_time

Evaluatable

Yes

Additional options

C code generation: Yes