Newsletter

DSP DesignLine  >  Design Center

Tip: FFTs in LabVIEW FPGA

Here's how to use the Fast Fourier Transform (FFT) block for National Instruments' LabVIEW FPGA.

Page 1 of 2

DSP DesignLine

Overview
Since the release of NI LabVIEW 8.5 software, the new fixed-point numeric data type has opened up an entirely new world of possibilities for signal processing in LabVIEW FPGA. The most recent example is the widely requested IP for performing fast Fourier transforms (FFTs), which is now available on IPNet. This new group of subVIs also introduces an architecture for streaming data between different processing functions using Boolean control lines and FIFOs. In this issue of IP Corner, learn how to use the new FFT IP and take LabVIEW FPGA processing performance into the frequency domain.

FFT algorithms are optimized to turn a 2n block size of time waveform data into the corresponding frequency data with 2n frequency bins. The frequency resolution depends on the sample rate and the number of samples in the block. For example, 1024 (or 210) samples of a signal sampled at 100 kS/s has a frequency resolution of 97.65625 Hz per bin.

100 kHz/1024 = 97.65625 Hz

This means that each frequency bin represents the total amount of energy at that particular frequency, and frequencies between those values get spread across multiple bins. The first point corresponds to 0 Hz (DC component), the second point corresponds to 97.65625 Hz, the third point corresponds to 195.3125 Hz and so on.  As we get to the middle values, the 511th point corresponds to 49804.6875 Hz, the 512th point corresponds to 49902.34375 Hz and at the 513th point, we get frequency information at 50 kHz. We know from the Nyquist sampling theorem that sampling at 100 kS/s will only measure frequencies up to 50kHz, so what happens to the 514th point?  Well, all points after the Nyquist frequency begin to represent negative frequency values.  The 514th point corresponds to -49902.34375 Hz, the 515th point corresponds to -49804.6875 Hz and so on.  The final 1024th point, therefore, represents frequency information at -97.65625 Hz.  

The FFT algorithm works for both real or complex input signals, but the resulting frequency data is always complex.  Most real-world signals have no imaginary components, and these purely real signals produce an FFT that is symmetric about the DC component at 0 Hz. This means that values at negative frequencies are exactly the same as their positive counterparts, and those points are considered redundant.  If you took the FFT of a real input signal of 1024 samples, all useful information is really only in the first 513 frequency bins, and the remaining 511 bins are often ignored.

For more information on the fundamentals for FFTs, please see the Using Fast Fourier Transforms tutorial.



Figure 1. New FFT IP for LabVIEW FPGA

The inherent hardware parallelism you get with field-programmable gate arrays (FPGAs) is ideal for parallel signal processing; however, it also introduces the additional complexity of synchronizing data between operations running at different rates. Various algorithms take a different number of clock cycles to complete, and if a piece of processing IP is expecting data to be available before it's actually ready, all data can become corrupted without warning. For this reason, the new FFT subVIs include new Boolean control lines that will become the standard way to pass data between different functions and loops on the block diagram. The new Boolean control lines, shown in Figure 1 (bottommost green input and output lines), are called input valid, output valid, and ready for input.


(Click to enlarge)

Figure 2. Example LabVIEW FPGA Block Diagram Using new FFT IP

The top loop in Figure 2 is a basic data acquisition (DAQ) loop that samples Analog Input Channel 1 at a specified rate and passes values directly to a first-in-first-out (FIFO) memory buffer named the DAQ FIFO. LabVIEW FPGA local FIFOs are the best way to pass data between different parts of the block diagram and smooth out transitions between asynchronous loops.

Page 2: next page  

Page 1 | 2



Rate this article
WORSE | BETTER
1 2 3 4 5




National Instruments
 Featured Jobs
Videon Central seeking VP of Engineering in State College, PA

Protingent Staffing seeking Electrical Engineer in Mountain View, CA

True Circuits seeking Analog-Mixed-Signal IC Layout Engr in Los Altos, CA

ON Semiconductor seeking Sr Analog Design Engineer in Colorado Springs, CO

SanDisk seeking Sr Process Integration Engr in Milpitas, CA

More jobs on EETimesCareers
 Sponsor
 CAREER CENTER
Ready to take that job and shove it?
SEARCH JOBS:

 SPONSOR

 RECENT JOB POSTINGS
For more great jobs, career related news, features and services, please visit EETimes' Career Center.