USER GUIDE NI Spectral Measurements Toolkit This document explains how to use the NI Spectral Measurements Toolkit (SMT) in LabVIEW and LabWindows™/CVI™ for frequency-domain measurements. Contents Conventions ............................................................................................ 2 Using the Spectral Measurements Toolkit .............................................. 3 Integrating the Spectral Measurements Toolkit...............................
Averaged Cross Spectrum ................................................................28 Averaged Frequency Response ........................................................29 Spectral Domain Measurements ..............................................................29 Unit Conversion................................................................................29 Peak Search and Amplitude/Frequency Estimation .........................31 Power in Band .....................................................
Using the Spectral Measurements Toolkit The Spectral Measurements Toolkit contains LabVIEW VIs and LabWindows/CVI functions that perform the following operations: • Zoom frequency analysis—Zoom fast Fourier transform (FFT) functions and VIs allow you to zoom in on a narrow frequency range in a spectrum. • Spectrum averaging—The Spectral Measurements Toolkit supports averaging types such as root-mean-square (RMS) averaging, vector averaging, and peak-hold averaging.
Integrating the Spectral Measurements Toolkit You can use the Spectral Measurements Toolkit for the following applications: • • • Frequency-domain measurements such as: – Adjacent channel power ratio (ACPR) – Channel spectrum – Power-in-band measurements – Average and peak power – Power spectral density – Spectrum limit and mask testing Modulation-domain measurements such as: – Frequency deviation – AM modulation index Component-level measurements such as characterization of oscillators,
SMT Programming Flow Diagram Programming flow diagrams are flowcharts that depict the most effective order for programming Spectral Measurements Toolkit VIs. Use the programming flow diagram in the SMT Programming Flow VI as a visual guide for the order in which you should call VIs. This VI is located in the \examples\Spectral Measurements Toolset\ Simulation folder.
2. 3. Enter the output power spectrum into an SMT measurement VI and/or use the SMT Spectrum Unit Conversion VI as follows: a. Enter the output power spectrum into an SMT measurement VI: the SMT Power in Band, the SMT Adjacent Channel Power, or the SMT Occupied Bandwidth VI. These VIs accept a power spectrum with units V2rms and return the requested measurements. Perform the measurements on only an unscaled power spectrum. You can specify the units in which to view these measurements. b.
For an averaged power spectrum with zoom, use the SMT Zoom Power Spectrum VI. For an averaged FFT spectrum, which has a complex output for magnitude and phase calculations, use the SMT Zoom FFT VI first and then the SMT Averaged FFT Spectrum VI. If you have two channels of input time-domain data and want cross power spectrum or frequency-response measurements, use the SMT Zoom FFT Spectrum VI first and then the SMT Averaged Cross Spectrum VI or the SMT Averaged Frequency Response VI.
The averaging parameters cluster specifies the following settings: • Averaging type, such as vector averaging, RMS averaging, or peak hold • Weighting type, such as linear or exponential • Averaging size The linear weighting mode parameter specifies a type of linear weighting. The SMT Zoom Power Spectrum VI, located on the SMT Advanced palette, returns the spectrum in units of V2rms. The unit conversion settings parameter specifies the units in which to display the spectrum.
The channel specification parameter specifies the center frequency, bandwidth, and spacing for the ACP measurement. The bandwidth parameter specifies the width of each channel. The spacing parameter specifies the separation between the center frequencies of each channel. The Units [rms] parameter specifies the units for the ACP measurement. The Power Spectrum parameter is a waveform graph that shows the power spectrum with the three channels, or bands, and the power in each channel.
Cross Power Spectrum Measurement The Cross Power Spectrum Measurement example is located at samples\ smt\simulated\smtcrspwr\smtcrspwr.prj. This example demonstrates how to configure the zoom FFT, then calculates the averaged power spectrum of a stimulus and response signal from a device under test and the averaged cross spectrum between these two signals.
Figure 2. Zoom FFT Technique FFT algorithms usually perform baseband analysis by displaying the spectrum from zero to the Nyquist frequency. However, a standard FFT might not be effective if you need to obtain a higher frequency resolution over a limited portion of the spectrum or if you need to zoom in on details of a spectral region. The zoom FFT uses algorithms to avoid the amount of calculation required using a long standard FFT to obtain high-frequency resolution over an entire spectrum.
Continuous Zoom FFT Continuous zoom FFT is a technique for quickly analyzing data as it arrives. A decimation process reduces the sample rate in real time. After the process acquires all the data and decimates it in time T, a relatively small FFT remains. The term continuous refers to beginning the process while data arrives. With a standard FFT, you must wait until all the data arrives before beginning calculations. The continuous zoom FFT first shifts the spectral region of interest into the baseband.
The continuous zoom FFT technique is sometimes called the real-time zoom FFT because it continuously performs the frequency shifting, decimation, and filtering processes on the arriving data. The FFT operation itself cannot proceed until you acquire all the data. The FFT operation then occurs in parallel with the next data acquisition. You can use the SMT Cont Zoom FFT VI to perform the continuous zoom FFT technique.
Block Zoom FFT Use a block zoom FFT in situations when you cannot access data until the data acquisition is complete. The block zoom FFT is a nondestructive zoom FFT because it stores data before processing, so the data is available in its original form if you need it for other operations. The block zoom FFT is an algorithm that calculates a portion of a large FFT. The block zoom FFT also improves the frequency resolution, df, by increasing the number of points that the FFT processes.
The block zoom FFT is a general-purpose technique that works best as a post-processing method. The block zoom FFT also is useful for real-time applications where the data rate is too high for a continuous zoom FFT to sustain in real time. To process the entire data set, provide enough memory to store the data until the FFT can process it. If processing every data point is not critical, use the block zoom FFT with the latest data available.
Time Span 1.0 0.8 Amplitude 0.6 Window 0.4 0.2 Signal 0.0 –0.2 –0.4 –0.6 10 0 30 20 40 Time (µs) 50 60 70 75 FFT FFT F T Figure 5. Spectrogram Process Example The SMT Config Zoom STFT VI specifies the spectrogram in terms of its center frequency, frequency span, and time span. The frequency span controls the FFT zoom. If the center frequency is 10 MHz and the span is 2 MHz, the SMT Config Zoom STFT VI calculates the spectrogram from 9 MHz to 11 MHz.
effective band specification. If you leave the default advanced parameters, the configuration VI calculates the correct parameters for a spectrogram with evenly distributed time and frequency resolution on a square display area. If the display area is not square, enter an aspect ratio for the display area in the aspect ratio parameter. Figure 6 shows an example of a completed spectrogram with a center frequency of 16 MHz and a span of 16 MHz.
Configuring Zoom FFT VIs When using Spectral Measurements Toolkit VIs, you must enter several values to completely specify a zoom FFT. The Spectral Measurements Toolkit provides two configuration VIs that select values for each setting and that require you to enter a minimal number of values. The SMT Config Zoom FFT VI configures the block zoom FFT. The SMT Config Cont Zoom FFT VI configures the continuous zoom FFT. These configuration VIs ensure that the input values are compatible and yield valid results.
The left side of Figure 7 shows examples of the four combinations of center frequency and span that you can encounter in the case of a real input signal. The right side of Figure 7 shows the actual coerced values of center frequency and span that the VI sets in each example. Antialiasing Filter Response a. User Input Coerced Result Effective Band Effective Band Span Span fh fc fl fs/2 Effective Band b.
that is outside the effective band, the span changes to the default value, which is the center of the effective band. Figure 7c demonstrates that if you request a span that is wider than the effective band, the span decreases until it falls entirely within the effective band without moving the center frequency.
Figure 8 shows the shape of the equivalent filter corresponding to a 7-Term Blackman-Harris window. The cursors are placed at the 3 dB points of the filter response, and the resolution bandwidth is the distance between the cursors. spectral lines controls how many frequency bins are present in the zoom spectrum result that the VI displays. If you request more spectral lines than resolution bandwidth requires, the parameter zero-pads the FFT to interpolate the spectrum to the desired number of lines.
The acquisition size comes from the following basic relationship: df = fs /N = 1/T where N is equal acquisition size and RBW is the frequency resolution df multiplied by the window spectral leakage correction factor of 3 dB bandwidth. If the spectral lines value requires a larger acquisition size than the resolution bandwidth value requires, the VI uses zero-padding to determine the number of FFT lines you need.
Figure 9 shows the spectrum of a multitone signal calculated using two RBW values. The multitone signal consists of two tones, at frequencies 1.0 MHz and 1.1 MHz, separated by 100 kHz. Table 1 shows the trade-offs of using two different RBWs. Table 1. Larger versus Smaller RBW Larger RBW (103.5 kHz) Smaller RBW (9.
Spectral Domain Averaging Averaging is an important part of spectrum-domain measurements because of the effects of noise on a signal and its spectrum. The Spectral Measurements Toolkit includes averaging VIs that average several records of data to reduce the noise effects. You can use the three different averaging types: vector, RMS, and peak-hold. Vector averaging lowers the noise floor while retaining the signal spectrum.
The averaging VIs require that you enter an FFT spectrum as a complex array. You can perform spectrum unit conversion before or after averaging. Averaging Conventions For Spectral Measurements Toolkit VIs, averaging refers to the average of several different data sets from the same process. The following list contains averaging operations that apply independently to each frequency bin of the Fourier transform.
Averaging Options Figure 10 illustrates the options available for spectrum averaging. Averaging Type No Averaging Peak-Hold Weighting Type Linear Weighting Mode RMS Exponential Linear One Shot Auto Restart Vector Moving Average Continuous Average Size Figure 10.
emphasis on the most recent data. The averages sofar parameter stops incrementing at N while the averaging continues. Linear weighting includes the following modes: • One-shot linear averaging—Average one time for the specified duration of N measurements. When the duration is over, the averaging stops. • Auto–restart linear averaging—Automatically repeat the one-shot linear averaging after every N measurements. • Moving average—Average the most recent N measurements.
Averaged Power Spectrum The following equations describe the averaging methods you can apply to a complex FFT spectrum to yield an averaged power spectrum. The No averaging method converts the complex FFT spectrum to a real power spectrum. Table 3.
Averaged Frequency Response If you have a stimulus to a system with spectrum X and the system response Y, the frequency response H of the system is shown by the following equation: Y H = --X You can use the equations shown in the following table to obtain the vector and RMS averaged frequency response. Table 4. Averaged Frequency Response Settings and Equations Setting Equation RMS averaging H = / Vector averaging H = / Frequency response has no peak-hold average.
Spectrum scaling options are combinations of the following options: • RMS or peak—An FFT returns an amplitude spectrum scaled such that a frequency bin represents the RMS value of a sine wave at that frequency. A bin can also represent the peak value if you scale the spectrum by 2 . • Amplitude or power—The power spectrum is the squared magnitude of the amplitude spectrum. For example, if an amplitude spectrum has units of Vrms, its power spectrum units are in V2rms.
Peak Search and Amplitude/Frequency Estimation The SMT Spectrum Peak Search VI uses interpolation to precisely locate frequency peaks in the amplitude or power spectrum and to estimate the amplitude of each peak. You can enter a real spectrum in any units or scaling. You can also specify whether to locate a single maximum peak or multiple peaks that exceed a specified threshold amplitude.
Power in Band The SMT Power in Band VI, located on the SMT Measurements palette measures the total power within some frequency range or band. X is the input power spectrum in V2rms. Perform this measurement before performing unit conversion. Enter a center frequency and bandwidth in Hz, from which you can derive the low and high bounds, fl and fh respectively, of the frequency band.
Figure 12 illustrates a typical ACP measurement and the three parameters that specify the channels. Figure 12. ACP Measurement Occupied Bandwidth (OBW) The SMT Occupied Bandwidth VI, located on the SMT Measurements palette, returns the bandwidth of the frequency band that contains a specified percentage of the total power of the signal. For a specified percentage B, the upper and lower limits of the frequency band are the frequencies above and below which (100 – B)/2% of the total power is found.
Figure 13 shows an example of an OBW measurement. The logarithmic amplitude scale gives the appearance of a significant amount of power outside the channel, but only 1% of the signal power is actually located there. Figure 13. Occupied Bandwidth Measurement Where to Go for Support The National Instruments Web site is your complete resource for technical support. At ni.
South Africa 27 0 11 805 8197, Spain 34 91 640 0085, Sweden 46 (0) 8 587 895 00, Switzerland 41 56 2005151, Taiwan 886 02 2377 2222, Thailand 662 278 6777, Turkey 90 212 279 3031, United Kingdom 44 (0) 1635 523545 National Instruments, NI, ni.com, and LabVIEW are trademarks of National Instruments Corporation. Refer to the Terms of Use section on ni.com/legal for more information about National Instruments trademarks.