RDFT – Running discrete Fourier transform
Block SymbolLicensing group: ADVANCED
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
, i.e.
from the time-window of the length equivalent to nper periods of the fundamental
frequency.
If the number of monitored higher harmonic frequencies is given solely by this parameter. On the contrary, for 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.
Inputs
u | Analog input of the block | Double (F64) |
HLD | Hold | Bool |
Outputs
amp | Amplitude of the fundamental frequency | Double (F64) |
thd | Total harmonic distortion (only for ) | 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 flag | Bool |
iE | Error code | Error |
|
|
|
Parameters
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 2 1 | Long (I32) |
|
|
|
iphunit | Phase shift units 0 2 1 | Long (I32) |
|
|
|
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) |
[Previous] [Back to top] [Up] [Next]
2023 © REX Controls s.r.o., www.rexygen.com