RDFT – Running discrete Fourier transform

Block SymbolLicensing group: ADVANCED
PIC

Function Description
The RDFT function block analyzes the analog input signal using the discrete Fourier transform with the fundamental frequency freq and optional higher harmonic frequencies. The computations are performed over the last m samples of the input signal u, where m= nperfreqTS, i.e. from the time-window of the length equivalent to nper periods of the fundamental frequency.

If nharm > 0 the number of monitored higher harmonic frequencies is given solely by this parameter. On the contrary, for nharm = 0 the monitored frequencies are given by the user-defined vector parameter freq2.

For each frequency the amplitude (vAmp output), phase-shift (vPhi output), real/cosine part (vRe output) and imaginary/sine part (vIm output). The output signals have the vector form, therefore the computed values for all the frequencies are contained within. Use the VTOR function block to disassemble the vector signals. The output thd indicates the total harmonic distortion, i.e. the part of fundamental and higher harmonic frequencies (only if nharm 1).

This block propagates the signal quality. More information can be found in the 1.4 section.

Input

u

Analog input of the block

Double (F64)

HLD

Hold

Bool

Parameter

freq

Fundamental frequency   1e-09  1e+09 1.0

Double (F64)

nper

Number of periods to calculate upon   1  10000 10

Long (I32)

nharm

Number of monitored harmonic frequencies   0  16 3

Long (I32)

ifrunit

Frequency units  1

Long (I32)

1 ....

Hz

2 ....

rad/s

iphunit

Phase shift units  1

Long (I32)

1 ....

degrees

2 ....

radians

nmax

Allocated size of array   10  10000000 8192

Long (I32)

freq2

Vector of user-defined monitored frequencies  [2.0 3.0 4.0]

Double (F64)

Output

amp

Amplitude of the fundamental frequency

Double (F64)

thd

Total harmonic distortion

Double (F64)

vAmp

Vector of amplitudes at given frequencies

Reference

vPhi

Vector of phase-shifts at given frequencies

Reference

vRe

Vector of real parts at given frequencies

Reference

vIm

Vector of imaginary parts at given frequencies

Reference

E

Error indicator

Bool

iE

Error code

Error

2024 © REX Controls s.r.o., www.rexygen.com