Zoom FFT

This sample shows examples of the possible uses of the function block FB_CMA_ZoomFFT. Using this function block, the section of a spectrum also calculated with the function block FB_CMA_RealFFT is calculated.

The source code for this sample can be downloaded here: ZoomFFT_Sample.zip

Block diagram

Zoom FFT 1:

Program parameters

The table below shows a list of the important parameters for configuring the function blocks.

FFT-length

2048 / 2048

Buffer size

2048 / 2048

Decimation factor

16 / -

Length of the calculated spectrum

65 / 1025

Explanations

The scope project contained in the sample code visualizes a spectrum calculated by means of the function block FB_CMA_RealFFT in the range of 0 to 1 kHz as well as a section in the range 48.83 Hz and 361.33 Hz, which was calculated with the function block FB_CMA_ZoomFFT. Here, the resolution in the frequency range is identical (4.8828125 Hz), where for the entire spectrum an FFT of length 2048 and in the section via the zoom FFT an FFT of length 128 is calculated on the decimated time signal.

Zoom FFT 2:

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4022.25

PC or CX (x86, x64)

Tc3_CM, Tc3_CM_Base