In most applications, you perform FFT and spectral analysis only on real-valued, discrete-time sequences. This section describes the following three common formats for displaying the FFT results of real-valued input sequences: standard, double-sided, and single-sided.
The time-domain signal shown in Figure 3 demonstrates the three methods by which FFT results can be displayed graphically. The time-domain signal has a signal of interest buried in the noise that is easily identified in the frequency domain. Based on frequency information, digital filtering can remove the noise from the signal.
Figure 3. Time Domain Sequence for Display Examples
Standard output is the format for even and odd-sized discrete-time sequences, described in Tables 1 and 2 of this document. This format is convenient because it does not require any further data manipulation.
To graphically display the results of the FFT, wire the output arrays to the waveform graph, as shown in Figure 4. The FFT output is complex and requires two graphs to display all the information.
Figure 4. Block Diagram to Display the Standard Output
Figures 5 and 6 are plots of the real and imaginary portions, respectively, of the FFT VI results. The symmetrical properties summarized in equations 5 through 7 are clearly visible in the plots.
Figure 5. Real Portion of the Fourier Transform
Figure 6. Imaginary Portion of the Fourier Transform
The FFT integral, shown in equation 1, has a frequency range of . Presenting FFT results in this frequency range is a double-sided format, as shown in Figure 7.
Figure 7. Double-Sided Format
You can obtain double-sided output format from the standard output by recalling the identity X-i = Xn-i. To present the data in a double-sided format, you must split the arrays at their center point into two portions, corresponding to the positive and negative frequencies, and reverse the array order by appending the positive frequencies to the negative frequencies. You can do this in LabVIEW with the Split 1D Array and Build Array functions, as shown in Figure 8.
Figure 8. Block Diagram to Display Double-Sided Output Format
The lower portion of the block diagram finds the index at which the arrays need to be split. This technique works for both an even and odd number of samples.
The results of processing the data using the block diagram shown in Figure 8 are shown in figures 9 and 10, corresponding to the real and imaginary parts, respectively. Both graphs display the frequency information from - (n ÷ 2) to (n ÷ 2) and the symmetry properties about zero are clear.
Figure 9. Real Portion of the Double-Sided Format
Figure 10. Imaginary Portion of the Double-Sided Format
Almost half the information is redundant in standard and double-sided output formats. This is clear from equations 5, 6, and 7. The data is conjugate symmetric about the (n÷2)^th harmonic, also known as the Nyquist harmonic. Therefore, you can discard all the information above the Nyquist harmonic because you can reconstruct it from the frequencies below the Nyquist harmonic. Displaying only the positive frequencies gives you single-sided output.
The block diagram shown in Figure 11 uses the Array Subset function to select all the elements corresponding to the positive frequencies, including the DC component. Like the double-sided case, the lower portion of the block diagram selects the total number of elements in the subset and works for both an even and odd number of samples.
Figure 11. Block Diagram for Single-Sided Output
The results of processing the data using the block diagram in Figure 11 are shown in Figures 12 and 13, corresponding to the real and imaginary parts, respectively. Both graphs display the frequency information from 0 to (n ÷ 2), which is approximately half the points presented in standard and double-sided outputs.
Figure 12. Real Portion of the Single-Sided Format
Figure 13. Imaginary Portion of the Single-Sided Format
Note: You must pay careful attention if you make measurements with single-sided data because the total energy at a particular frequency is equally divided between the positive and negative frequency, DC and Nyquist components excluded.