How Do I Configure the X-Axis to Display the Output of the Spectral Measurements Express VI in Hertz? Primary Software: LabVIEW Modules>>DSP ModulePrimary Software Version: 1.0 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: I am using the LabVIEW DSP Module to acquire a signal and convert it to the frequency domain using the Spectral Measurements Express VI or the EMB Real FFT VI. How do I configure the x-axis of my graph to display the units in hertz? Solution: You can use a scaling factor to convert the x-axis so that it appears in hertz (Hz). The scaling factor depends on the sampling rate and framesize you select. When you configure the Analog Input Elemental I/O Node on your DSP target to acquire data from the codec, you must specify a sampling rate and a framesize. For example, you can specify the default sampling rate of 8,000 Hz and a framesize of 128 samples. Using the EMB Real FFT VI or the Spectral Measurements Express VI to transform the input signal from the time domain to the frequency domain. By default, the waveform graph distributes points on the x-axis based on the framesize you select. In this example, the waveform graph evenly distributes points from 0–127 along the x-axis, as shown in the following figure. ![]() The waveform graph plots the data at 128 points, or frequency bins, along the x-axis. To scale these bins to a hertz value specific to the period of the signal, you must apply the following formula to each point on the x-axis: bin number * sampling rate/framesizeIn this example, the sampling rate divided by framesize is 8,000/128 or 62.5, so you must scale the x-axis by 62.5. After scaling the x-axis by 62.5, it looks like the following figure. ![]() Scaling the X-axis on a Waveform Graph Complete the following steps to scale the x-axis.
![]() Related Links: Developer Zone: Nyquist Sampling Theorem Attachments:
Report Date: 05/25/2005 Last Updated: 09/06/2007 Document ID: 3LOG5KHD |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||



