FFT VI
- Updated2025-01-28
- 4 minute(s) read
FFT VI
Computes the fast Fourier transform (FFT) of the input sequence X. Wire data to the X input to determine the polymorphic instance to use or manually select the instance.

1D FFT
For 1D signals, the FFT VI computes the discrete Fourier transform (DFT) of the input sequence with a fast Fourier transform algorithm. The 1D DFT is defined as:

where x is the input sequence, N is the number of elements of x, and Y is the transform result.
The frequency resolution, or the frequency spacing between the components of Y, is:

where fs is the sampling frequency.
The following table illustrates the pattern of the elements of FFT {X} for various FFT size and shift values, where Y is FFT {X} and n is the FFT size:
n is even (k = n/2) | n is odd (k = (n-1)/2) | |||
---|---|---|---|---|
Shift | Array Element | Corresponding Frequency | Array Element | Corresponding Frequency |
FALSE (default) |
Y0 | DC component | Y0 | DC component |
FALSE (default) |
Y1 | Δf | Y1 | Δf |
FALSE (default) |
Y2 | 2Δf | Y2 | 2Δf |
FALSE (default) |
Y3 | 3Δf | Y3 | 3Δf |
⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
FALSE (default) |
Yk–2 | (k–2)Δf | Yk–2 | (k–2)Δf |
FALSE (default) |
Yk–1 | (k–1)Δf | Yk–1 | (k–1)Δf |
FALSE (default) |
Yk | Nyquist Frequency | Yk | kΔf |
FALSE (default) |
Yk+1 | –(k–1)Δf | Yk+1 | –kΔf |
FALSE (default) |
Yk+2 | –(k–2)Δf | Yk+2 | –(k–1)Δf |
⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
FALSE (default) |
Yn–3 | –3Δf | Yn–3 | –3Δf |
FALSE (default) |
Yn–2 | –2Δf | Yn–2 | –2Δf |
FALSE (default) |
Yn–1 | –Δf | Yn–1 | –Δf |
n is even (k = n/2) | n is odd (k = (n-1)/2) | |||
Shift | Array Element | Corresponding Frequency | Array Element | Corresponding Frequency |
TRUE | Y0 | –(Nyquist Frequency) | Y0 | –kΔf |
TRUE | Y1 | –(k–1)Δf | Y1 | –(k–1)Δf |
TRUE | Y2 | –(k–2)Δf | Y2 | –(k–2)Δf |
TRUE | Y3 | –(k–3)Δf | Y3 | –(k–3)Δf |
⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
TRUE | Yk–2 | –2Δf | Yk–2 | –2Δf |
TRUE | Yk–1 | –Δf | Yk–1 | –Δf |
TRUE | Yk | DC component | Yk | DC component |
TRUE | Yk+1 | Δf | Yk+1 | Δf |
TRUE | Yk+2 | 2Δf | Yk+2 | 2Δf |
⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
TRUE | Yn–3 | (k–3)Δf | Yn–3 | (k–2)Δf |
TRUE | Yn–2 | (k–2)Δf | Yn–2 | (k–1)Δf |
TRUE | Yn–1 | (k–1)Δf | Yn–1 | kΔf |
2D FFT
For 2D signals, the FFT VI computes the discrete Fourier transform (DFT) of the input matrix. This VI performs a 1D FFT on the rows of the input matrix and then performs a 1D FFT on the columns of the output of the preceding step. The DFT of an M-by-N matrix is defined as:

where x is the input matrix and Y is the transform result.
The illustration below shows the effect of shift? on the 2D FFT result:
2D input signals | FFT without shift | FFT with shift |
---|---|---|
![]() |
![]() |
![]() |
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\Signal Processing\Transforms\FFT and Power Spectrum Units.vi