FFT Frequency
- Updated2025-12-08
- 1 minute(s) read
C/C++ Equivalent: NISCOPE_VAL_FFT_FREQUENCY
The FFT amplitude spectrum is calculated using a split-radix real FFT, and the frequency corresponding to the maximum amplitude is returned. If the input waveform size is not a power of two, the waveform is zero padded to the next higher power of two. The frequency resolution is sampling rate / number of points.
The DC bin of the FFT is ignored when searching for the maximum amplitude, so the FFT frequency should ignore any DC offsets. However, the zero padding used in the FFT measurement can introduce other low frequency components if the waveform has a large DC offset. To avoid problems, make sure the Horizontal Actual Record Length property or the NISCOPE_ATTR_HORZ_RECORD_LENGTH attribute is a power of 2, so no zero padding occurs. This property/attribute can be fetched using the niScope Actual Record Length VI or the niScope_ActualRecordLength function. Alternatively, configuring the digitizer for AC coupling solves the problem.
Units
hertz