Download Help (Windows Only) 
Owning Palette: Transforms VIs
Requires: Full Development System
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.
Use the pulldown menu to select an instance of this VI.
X is a real vector.  
shift? specifies whether the DC component is at the center of FFT {X}. The default is FALSE.  
FFT size is the length of the FFT you want to perform. If FFT size is greater than the number of elements in X, this VI adds zeros to the end of X to match the size of FFT size. If FFT size is less than the number of elements in X, this VI uses only the first n elements in X to perform the FFT, where n is FFT size. If FFT size is less than or equal to 0, this VI uses the length of X as the FFT size.  
FFT {X} is the FFT of X.  
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster. 
X is the complex valued input sequence.  
shift? specifies whether the DC component is at the center of FFT {X}. The default is FALSE.  
FFT size is the length of the FFT you want to perform. If FFT size is greater than the number of elements in X, this VI adds zeros to the end of X to match the size of FFT size. If FFT size is less than the number of elements in X, this VI uses only the first n elements in X to perform the FFT, where n is FFT size. If FFT size is less than or equal to 0, this VI uses the length of X as the FFT size.  
FFT {X} is the FFT of X.  
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster. 
X is the real input sequence.  
shift? specifies whether the DC component is at the center of FFT {X}. The default is FALSE.  
m specifies the number of rows of the 2D FFT. This VI truncates or zeropads X to an mbyn array before performing the FFT.  
n specifies the number of columns of the 2D FFT. This VI truncates or zeropads X to an mbyn array before performing the FFT.  
FFT {X} is the 2D FFT of X. If the input signal is in volts (V), FFT {X} has units of volts. If the input signal is not in volts, FFT {X} has units of the input signal unit. This VI returns the phase in radians.  
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster. 
X is the complex valued input sequence.  
shift? specifies whether the DC component is at the center of FFT {X}. The default is FALSE.  
m specifies the number of rows of the 2D FFT. This VI truncates or zeropads X to an mbyn array before performing the FFT.  
n specifies the number of columns of the 2D FFT. This VI truncates or zeropads X to an mbyn array before performing the FFT.  
FFT {X} is the 2D FFT of X. If the input signal is in volts (V), FFT {X} has units of volts. If the input signal is not in volts, FFT {X} has units of the input signal unit. This VI returns the phase in radians.  
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster. 
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:
for n = 0, 1, 2, …, N–1
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 f_{s} 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 = (n1)/2)  

shift = FALSE (default) 
Array Element 
Corresponding Frequency 
Array Element 
Corresponding Frequency 
Y_{0}  DC component  Y_{0}  DC component  
Y_{1}  f  Y_{1}  f  
Y_{2}  2f  Y_{2}  2f  
Y_{3}  3f  Y_{3}  3f  
. . . 
. . . 
. . . 
. . . 

Y_{k–2}  (k–2)f  Y_{k–2}  (k–2)f  
Y_{k–1}  (k–1)f  Y_{k–1}  (k–1)f  
Y_{k}  Nyquist Frequency  Y_{k}  kf  
Y_{k+1}  –(k–1)f  Y_{k+1}  –kf  
Y_{k+2}  –(k–2)f  Y_{k+2}  –(k–1)f  
. . . 
. . . 
. . . 
. . . 

Y_{n–3}  –3f  Y_{n–3}  –3f  
Y_{n–2}  –2f  Y_{n–2}  –2f  
Y_{n–1}  –f  Y_{n–1}  –f  
shift = TRUE  Array Element 
Corresponding Frequency 
Array Element 
Corresponding Frequency 
Y_{0}  –(Nyquist Frequency)  Y_{0}  –kf  
Y_{1}  –(k–1)f  Y_{1}  –(k–1)f  
Y_{2}  –(k–2)f  Y_{2}  –(k–2)f  
Y_{3}  –(k–3)f  Y_{3}  –(k–3)f  
. . . 
. . . 
. . . 
. . . 

Y_{k–2}  –2f  Y_{k–2}  –2f  
Y_{k–1}  –f  Y_{k–1}  –f  
Y_{k}  DC component  Y_{k}  DC component  
Y_{k+1}  f  Y_{k+1}  f  
Y_{k+2}  2f  Y_{k+2}  2f  
. . . 
. . . 
. . . 
. . . 

Y_{n–3}  (k–3)f  Y_{n–3}  (k–2)f  
Y_{n–2}  (k–2)f  Y_{n–2}  (k–1)f  
Y_{n–1}  (k–1)f  Y_{n–1}  kf 
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 MbyN matrix is defined as:
for u = 0, 1, …, M–1, v=0, 1, …, N–1
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 

Output Units for FFTBased Vis
Refer to the FFT and Power Spectrum Units VI in the labview\examples\Signal Processing\Transforms directory for an example of using the FFT VI.
Helpful
Not Helpful