Page 3
The reader should consult National Instruments if errors are suspected. In no event shall National Instruments be liable for any damages arising out of or related to this document or the information contained in it.
Page 4
Conventions The following conventions are used in this manual: <> Angle brackets that contain numbers separated by an ellipsis represent a range of values associated with a bit or signal name—for example, DBIO<3..0>. Square brackets enclose optional items—for example, [ response »...
Page 5
jointly refer to LabVIEW VIs and C-language function calls. For example, , when shown in this font, refers both to the Read Measurement LabVIEW NI-DSA Read Measurements VI and to the C function NIDSA_read_measurement...
Thank you for buying a National Instruments Dynamic Signal Analyzer (DSA), which includes NI-DSA, National Instruments’ driver for its DSA devices. With NI-DSA, you can program your NI 4551 or NI 4552 to analyze time- and frequency-domain data onboard in real time. This manual shows you how to use your application development environment (ADE) with NI-DSA to program your DSA instrument.
Help for LabVIEW VIs is available in the LabVIEW context help. • To learn about the electrical and mechanical aspects and features of your National Instruments DSA hardware, refer to the NI 4551/4552 User Manual. • For the latest versions of drivers, manuals, and example programs, visit for free downloads.
• Harmonic analysis—THD, THD+Noise, and SINAD • Time-domain data acquisition Swept-Sine Analyzer Mode (NI 4551 Only) Use swept-sine analyzer mode to make frequency response measurements when you need more accuracy, control, and dynamic range than FFT-based frequency response measurements provide.
In the optional octave analyzer mode, the data are passed through a parallel bank of filters, averaged if needed, then transferred to the host memory. Source Mode (NI 4551 Only) With your NI 4551 and NI-DSA in source mode, you can generate signals of the following types: •...
Chapter 2 Programming with NI-DSA • Revision Query • Error Query • Error Message Notes for C Programmers The constants used in the example programs are defined in the NI-DSA header file, . The C code snippets in this manual use these nidsa.h constants for clarity.
—sets the parameters for analog triggering. Configure Trigger Refer to the NI 4551/4552 User Manual, Chapter 3, Hardware Overview for more information about configuring your analog input channels. Unless otherwise noted, you can use the functions in this section, and most NI-DSA...
FFT Mode Programming, the Using Capture Mode to Acquire Time-Domain Data section. • If you are using an NI 4551 to generate a signal, refer to Chapter 4, Swept-Sine Mode Programming, the Source Mode (NI 4551 Only) section. • For swept-sine measurements, refer to Chapter 4,...
Page 20
Chapter 3 FFT Mode Programming Initialize Configure Mode Set Input Voltage Range Configure Set Input Coupling Hardware Front End Configure Trigger Route Base FFT Configure Base Engine Set Classical Base Band Configure Parameters Configure Base FFT Settings Configure Base FFT Averaging Check New Measurement Get Measurement Length Read Measurement...
Chapter 3 FFT Mode Programming Step 2—Configure the FFT Analyzer The first step in configuring your FFT measurement is to route the digitized input signal to one or more analyzers using Route Base Route Zoom To configure a baseband FFT, use the following: •...
Chapter 3 FFT Mode Programming Acceptable extended spans are: • Up to 800 lines in 0–95 KHz span for baseband • Up to 1,600 line in 0–95 KHz span for zoom analyzer Note NI-DSA automatically sets the hardware sampling rate to optimize antialiasing and real-time performance, based on the span you select.
Chapter 3 FFT Mode Programming LabVIEW Example Figure 3-5. Read FFT Measurements C Example When reading FFT measurements, ideally, you need to use a timer in order to read measurements periodically. //This Function is called periodically (timer tick) int CVICALLBACK TimerCB (int panel, int control, int event,void *callbackData, int eventData1, int eventData2){ ViStatus NewMeasurement;...
The input level exceeded the maximum voltage allowed. • Wait on trigger—indicates that the DSA instrument is waiting for a trigger condition to be met. Refer to the NI 4551/4552 User Manual, Chapter 3, Hardware Overview for more information about triggering. •...
Chapter 3 FFT Mode Programming • Error message • Reset Using Capture Mode to Acquire Time-Domain Data When you are using the FFT mode of NI-DSA, you can obtain time-domain waveforms from . This function returns time-domain Read Measurement blocks whose size scales with the number of FFT lines you are calculating. For instance, a 400-line classical, or 475-line extended FFT, corresponds to 1,024 time domain data points.
Chapter 6, Advanced Concepts. Note Only the NI 4551 can be programmed in swept-sine mode since this mode requires the instrument to generate stimuli. You can find a swept-sine programming example, 455x Swept Sine , on your NI-DSA CD. Figure shows the recommended program Mode.vi...
Page 36
Chapter 4 Swept-Sine Mode Programming Initialize Configure Mode (Swept Sine) Configure Swept Sine Configure Swept Sine Configure Swept Sine Average Parameters Configure Swept Sine Source Start Sweeping Control Swept Sine (Restart) Check New Measurement Get Measurement Length Get Swept Frequencies Read Measurement Get Measurement Length Get Frequency...
Page 40
Chapter 4 Swept-Sine Mode Programming Values for frqLineSelector are: – Valid lines—returns alias-free lines only – All lines—returns all FFT lines – Classical lines—returns alias-free classical lines • —reads the measurement from the specified Read Measurement analyzer channel The valid measurement Type settings for Get Measurement Length are limited to the measurements that you specified Read Measurement...
Chapter 4 Swept-Sine Mode Programming —returns the status of the swept-sine Get Swept Sine Status measurement with the following indicators: • Sweep state—returns the state the current sweep in swept-sine analyzer mode – 0: Sweeping—sweep is in progress – 1: Paused—sweep has been paused –...
Chapter 4 Swept-Sine Mode Programming Source Mode (NI 4551 Only) Source mode is useful for generating signals for frequency response measurements, and so on. NIDSA_Initialize NIDSA_Set_Output_Voltage_Range 100mV, 1V or 10V NIDSA_Set_Hardware_Update_Range 51200 Max NIDSA_Configure_Source Sine, Chirp, Noise or Arb This Function Will Depend...
Page 46
Chapter 4 Swept-Sine Mode Programming – voltageRange—voltage range for the selected output channel • 0: ± 10.0V • 1: ± 1.00V • 2: ± 100mV • 3: OFF (not supported) • —sets the hardware update rate. Set Hardware Update Rate Default Value: 51200.0 S/s;...
51.2 kHz and 102.4 kHz; and one-fourth of the scan rate if it is between 102.4 kHz and 204.8 kHz. Both of the outputs on the NI 4551 work as a single output if the device is used in DSA Instrument Mode through NI-DSA. Output channel 0 generates the specified output, and channel 1 generates the same signal with a 180 degree shift.
Chapter 4 Swept-Sine Mode Programming C Examples //Set Output voltage range to 10 V NIDSA_set_output_voltage_range (DSASession, "0", OUTVRANGE_10V); //Set update rate to 51.2 kS/s NIDSA_set_hw_sampling_rate (DSASession, 51200); //Turn source ON and select a sine wave output signal NIDSA_configure_source (DSASession, SRC_ON, SINE_SRC); //Configure sine source //Note : This function allows a dual tone generation //To generate a single tone, set Amplitude2 and Freq2 parameters to 0...
Chapter 5 Octave Analysis (Add-On) Mode Programming • —sets the averaging mode, time Configure Octave averaging constant, and confidence level – Average Type • 0: None • 1: Linear—band power outputs are equally weighted and averaged over the specified integration time •...
Page 54
Chapter 5 Octave Analysis (Add-On) Mode Programming – Level measurements 1 – Level measurements 2 – Level measurements 3 When a new measurement is ready, it needs to be read: • Read octave measurements Returns: – Band power measurements (needed to build the octave graph) –...
Any of the four input channels of the NI 4552, or the two input channels of the NI 4551 can be routed to any analyzer channel, or to multiple analyzer channels. For example, you can have one input channel routed to different analyzer channels with different settings in order to view one part of the frequency spectrum at a higher resolution than the other parts.
Page 61
Chapter 6 Advanced Concepts The power spectrum, normalized to 1 Hz bandwidth, gives the power spectral density (PSD): X k ( ) ⁄ The use of the FFT for frequency analysis implies two important relationships: • The highest frequency that can be analyzed is related to the sampling rate.
Page 63
Chapter 6 Advanced Concepts The complex frequency response function H(f) is calculated from measured spectra using the following formula. Here, channel x represents a stimulus signal sent to the unit under test, while channel y represents the response coming from the test unit. The diagram below illustrates the frequency response H(f) of a system at one particular frequency f.
/2. For this reason, the alias-free bandwidth of the instrument will be somewhat less than f The oversampling delta-sigma converters used on the NI 4551 and NI 4552 contain integral antialiasing filters that provide an alias-free bandwidth of 46.4% of the sampling frequency. At the maximum sampling rate of 204.8 kS/s, the NI 45XX alias-free bandwidth is 95 kS/s...
Chapter 6 Advanced Concepts Classical and Extended FFT Size Although the superior antialiasing performance of the NI 45XX allows a larger alias-free bandwidth and thus more spectral lines, sometimes a user wants to make measurements at bandwidths that have traditionally been used in spectral analysis.
Page 67
Chapter 6 Advanced Concepts The original frequency span center is then shifted to DC or heterodyned, this means that the upper half of the span stays positive and the lower half (below the span center) becomes a set of negative frequencies. The result is that a span from 0 to 80kHz becomes a span of –40 to 40 kHz.
Chapter 6 Advanced Concepts When the selected zoom span is larger than the classical baseband span selected (including the maximum classical baseband span of 80 kHz), the driver will make the zoom analyzer behave as a baseband analyzer and eliminate the modulation and decimation stages. By using the zoom analyzers as baseband analyzers, the two-dual-channel-analyzers architecture lets you perform an FFT analysis in the same frequency span on four channels at the same time.
Chapter 6 Advanced Concepts • Flattop • Kaiser • Low sidelobe • Force • Exponential • Forced-exponential For more information about using windowing functions, refer to NI Application Note 041, The Fundamentals of FFT-Based Signal Analysis and Measurement. FFT Averaging Averaging successive measurements tends to improve measurement accuracy.
Page 73
Chapter 6 Advanced Concepts Auto-ranging extends the dynamic range and auto-level increases the signal to noise ratio. If the system’s transfer function has large variations within the measurement span, a swept-sine analysis can often give you greater dynamic range than an FFT analysis. Because the FFT measures all the frequency components at the same time, the source must contain energy at all of the measured frequencies.
Chapter 6 Advanced Concepts The number of points results in the minimum frequency resolution of a swept-sine measurement. number of points can be set from 1 to 2,048. The points can be in a linear or logarithmic progression. In some cases, it is desirable to sweep over a wide frequency range while still detecting narrow transition in the frequency response function.
Chapter 6 Advanced Concepts Swept-Sine Measurements Spectrum The spectrum, the measurement of a single channel over a sweep, can be returned for channel 0, channel 1, or both. The spectrum is complex (meaning it contains real and imaginary components), with an amplitude of the measured signal, and phase relative to source.
Chapter 6 Advanced Concepts With parameter dB units set to dB on, the SINAD is Read Measurement calculated as shown here: × SINAD -------------- - – Swept Harmonics Up to five individual harmonic distortion measurements can be returned. Each one is calculated as shown in the following formula: ×...
Chapter 6 Advanced Concepts Octave and Level Analyzers Software Architecture Figure 6-7 shows the overall architecture for making octave and level measurements. Level Analysis1 Averaging Input Time Level Analysis N Averaging Domain Signal, x [n] Weighting Averaging Octave Analysis Figure 6-7. Octave and Level Measurement Functional Diagram You can perform octave and level measurements on one, two, or four channels simultaneously.
Chapter 6 Advanced Concepts The time-domain samples at the output of each BPF are squared, then averaged according to the averaging mode selected, and the averaged output of each BPF is returned as the measurement. Third-octave analysis provides a maximum of 30 results (10 octaves × 3 BPFs/octave). 1/1-octave analysis provides a maximum of 10 results (10 octaves ×...
Chapter 6 Advanced Concepts The functions can also be classified according to the types of measurements they are used for. In general, a function used for both octave and level measurements has the abbreviation “OLM” in the function name. A function used only for octave measurements has the word “octave”...
Chapter 6 Advanced Concepts When acquiring level values, you should first call Get Level Length get the number of level measurements currently available. Next, make a call to produce an array containing the level Read Level Measurements values. You can also call to generate a string array Get Level Labels containing the corresponding until labels for the level measurements.
Chapter 6 Advanced Concepts For level measurements, the linear average is denoted as Leq (equivalent sound power over the specified time duration). Exponential Averaging Exponential averaging is a continuous averaging process that weighs both current as well as past data. The amount of weight given to past data as compared to current data depends on the exponential time constant.
Chapter 6 Advanced Concepts For example, if you specify a confidence level of 1 dB, and the correct mean is 10 dB, there is a 68% confidence that the measured value is between 9–11 dB, and a 96% confidence that the measured value is between 8–12 dB.
Page 94
Chapter 6 Advanced Concepts two values: 25.6 kHz or 51.2 kHz. The NI 4551 has two input channels, and the NI 4552 has four input channels. The higher the number of channels used, the more difficult it is for the processor to keep up in real-time.
NI 4551 Table 6-5 shows different configurations for which real-time processing on the NI 4551 is possible, and illustrates trade-offs that you can make. The table is not exhaustive, but a guide; other configurations are possible. For this table, the following assumptions are made: the sampling rate is the default rate, 51.2 kHz, and both input channels are processed.
Page 96
Fast 4,490 Hz (ANSI) 4,621 Hz (IEC) As Table 6-5 shows, the NI 4551 can perform a 1/1-octave analysis in real time while applying the most computationally-intensive averaging and weighting (impulse and A, respectively). In addition, it can simultaneously perform up to eight level measurements with impulse-eq averaging.
Page 97
NI 4551. If you configure one or two channels for octave analysis, configurations that allow real-time operation of the NI 4551 generally will for the NI 4552 as well. However, if you configure three or four channels for octave analysis, the additional processing demands reduce the frequency range over which the processor can operate in real-time.
Chapter 6 Advanced Concepts The bandwidth for each band can be calculated by the formula bandwidth = exact center frequency × (2 1/2n –1/2n – 2 ), where n = 1 for full-octave, 3 for 1/3-octave, and 12 for 1/12-octave, and the exact center frequency for each band is returned in the exact center frequencies returned from Get Octave Frequencies...
Page 102
Appendix A Common Questions content of the signal, providing a total of 401 amplitude values. An x-line FFT always returns an array of length x+1, and the first element of this array is the amplitude of the DC signal component. What is real-time operation for a 455X DSA device? When referring to a NI 455X DSA device, real-time operation simply means that all time-domain data points are used in the frequency-domain...
Page 104
Appendix A Common Questions Does the zoom FFT reduce acquisition time? For any given frequency resolution, you must acquire data for the same time interval whether you are using baseband or zoom analysis. If you use either a zoom FFT or a baseband FFT, the time block of data required to perform a single FFT is 1/Df, where Df is the frequency resolution.
Page 106
Appendix A Common Questions , you will see that the HW Sampling Rate Get HW Update Rate ratio between these two parameters is a power of 2. What is the maximum sine output frequency I can obtain using NI-DSA? The maximum output frequency you can generate with NI-DSA is 23 kHz. This limit is governed by the maximum output sampling rate of 51.2 kS/s.
Page 108
Appendix A Common Questions Harmonic Mapping parameter is an array of five integers defining the harmonics of interest. For example, if the elements of this array are [2,3,5,9,20], the swept-sine harmonic measurements returned are: • Swept-sine harmonic 1—2 harmonic • Swept-sine harmonic 2—3 harmonic •...
Page 110
Get Hardware Sampling Rate How long does the signal take to propagate through the input section of the NI 4551/4552? The signal delay—the time it takes for a signal entering an analog input channel to become available as digital data at the output of the delta-sigma ADC—is 42 sample periods, regardless of the sample rate, for example—...
Technical Support Resources Web Support National Instruments Web support is your first stop for help in solving installation, configuration, and application problems and questions. Online problem-solving and diagnostic resources include frequently asked questions, knowledge bases, product-specific troubleshooting wizards, manuals, drivers, software updates, and more. Web support is available through the Technical Support section of ni.com...
Page 118
Appendix B Technical Support Resources Worldwide Support National Instruments has offices located around the world to help address your support needs. You can access our branch office Web sites from the Worldwide Offices section of . Branch office Web sites provide ni.com...
Page 120
Glossary analog input channel signal analog-to-digital analog-to-digital converter—an electronic device, often an integrated circuit, that converts an analog voltage to a digital number ADC resolution the size of the discrete steps in the ADC’s input-to-output transfer function; therefore, the smallest voltage difference an ADC can discriminate with a single measurement AIGND analog input ground signal...
Page 122
Glossary Celsius CalDAC calibration DAC channel pin or wire lead to which you apply or from which you read the analog or digital signal. Analog signals can be single-ended or differential. For digital signals, you group channels to form ports. Ports usually consist of either four or eight digital channels.
Page 124
Glossary DC coupled allowing the transmission of both AC and DC signals direct digital synthesis default setting a default parameter value recorded in the driver. In many cases, the default input of a control is a certain value (often 0) that means use the current default setting.
Page 126
Glossary false triggering triggering that occurs at an unintended time FIFO first-in first-out memory buffer—the first data stored is the first data sent to the acceptor. FIFOs are often used on DAQ devices to temporarily store incoming or outgoing data until that data can be retrieved or output. For example, an analog input FIFO stores the results of A/D conversions until the data can be retrieved into system memory, a process that requires the servicing of interrupts and often the programming of the DMA controller.
Page 128
Glossary integral nonlinearity—a measure in LSB of the worst-case deviation from the ideal A/D or D/A transfer characteristic of the analog I/O circuitry input bias current the current that flows into the inputs of a circuit input impedance the measured resistance and reactance between the input terminals of a circuit input offset current the difference in the input bias currents of the two inputs of an...
Page 130
NI-DAQ National Instruments driver software for DAQ hardware NIST National Institute of Standards and Technology noise an undesirable electrical signal—Noise comes from external sources such...
Page 132
Glossary Peripheral Component Interconnect—a high-performance expansion bus architecture originally developed by Intel to replace ISA and EISA. It is achieving widespread acceptance as a standard for PCs and work-stations; it offers a theoretical maximum transfer rate of 132 Mbytes/s. peak to peak a measure of signal amplitude;...
Page 134
Glossary sensor a device that responds to a physical stimulus (heat, light, sound, pressure, motion, flow, and so on), and produces a corresponding electrical signal settling time the amount of time required for a voltage to reach its final value within specified limits signal conditioning the manipulation of signals to prepare them for digitizing...
Page 136
Glossary waveform multiple voltage readings taken at a specific sampling rate word the standard number of bits that a processor or memory manipulates at one time. Microprocessors typically use 8-, 16-, or 32-bit words. working voltage the highest voltage that should be applied to a product in normal use, normally well under the breakdown voltage for safety margin.
Need help?
Do you have a question about the 4551 and is the answer not in the manual?
Questions and answers