Documente Academic
Documente Profesional
Documente Cultură
NI Supported: Yes
Publish Date: Aug 16, 2011
Figure 1. 2.7 GHz System Hardware: The NI PXI-5661 is composed of the NI PXI-5600 downconverter and the NI PXI-5142 digitizer. The NI PXIe-5672 is composed of the NI PXI-5610
upconverter and the NI PXIe-5442 arbitrary waveform generator. The modules are controlled by an NI PXI-8106 embedded controller in an NI PXI-1065 18-slot hybrid PXI Express chassis.
1/7
www.ni.com
Figure 2. 6.6 GHz System Hardware: The NI PXI-5663 is composed of the NI PXI-5601 downconverter, the NI PXI-5652 local oscillator module, and the NI PXI-5622 IF digitizer. The NI PXI-5673 is
composed of the NI PXI-5611 downconverter, the NI PXI-5652 local oscillator module, and the NI PXI-5450 I/Q arbitrary waveform generator. The modules are controlled by an NI PXI-8130
embedded controller in an NI PXI-1075 18-slot PXI Express chassis.
Recording
Because the dynamic range of the PXI-5661 signal analyzer is constrained by the 14-bit PXI-5142 IF digitizer, it is important to condition the input signal for optimum performance as it enters the
digitizer. The input range of the digitizer is set to 2 V pp when used with the PXI-5600 as a PXI-5661 and the NI-RFSA driver. Likewise, in the 6 GHz system, the dynamic range of the PXI-5663 is
determined by the 16-bit PXI-5622 IF digitizer. Its input range can vary from 0.7 to 1.4 V pp. In normal operation, the driver is designed for best distortion performance; therefore, the approximated
headroom (for crest factor) given by the driver is 10 dB.
When recording the signal, minimize the headroom as much as possible so that you use the full dynamic range of the digitizer. This is not a trivial task for modulated and burst signals because their
power varies in time. Any prior knowledge of the input signal is helpful so you can then adjust the headroom to optimize the dynamic range of the digitizer. Ideally, the headroom should be equal to
the crest factor of the signal. However, the target signal may be in the presence of other unwanted signals that can affect the recording. These signals are called n(t) for noise and i(t) for
interference.
First, consider the bandwidth of the target signal s(t) and the target hardware you are using. If the hardware bandwidth is exactly the bandwidth of s(t), then the SINAD is higher than the SINAD of
hardware with much larger bandwidth. This is further explained below.
Looking at the input path of the PXI-5661 RFSA:
The power of the input signal s(t) + n(t) + i(t) is limited by the fixed 20 MHz internal input bandwidth of the PXI-5600 regardless of the user-requested bandwidth. You can see this in the PXI-5600
RF input path on Figure 4:
Once the IF signal is digitized, the onboard signal processor (OSP) on the PXI-5142 filters the section requested by the driver, and the desired signal is isolated in the recorded signal.
For example, assume s(t) is an FM radio station signal at 91.5 MHz. By specification, this signal is 200 kHz wide. Also assume that there are other radio stations across the 20 MHz bandwidth at
varying power levels as shown in Figure 5:
2/7
www.ni.com
The input power at the RF input on the PXI-5600 is the power of the entire 20 MHz band, not just the power of s(t). This affects the dynamic range of the recording because you have to account for
these larger signals.
Figure 6. Using the Dynamic Range on the Digitizer without any Front-End Filtering
To improve performance in this situation, you can use an external bandpass filter to isolate the signal of interest, as shown in Figure 7:
Figure 7. Using the Dynamic Range on the Digitizer with Front-End Filtering: The full dynamic range of the signal is digitized.
Because it is challenging to predict these unwanted signals in the spectrum, calculate the input power with precision, and set the exact reference level, you should use a test application to visualize
these parameters and then set the correct recording parameters. You can do this by setting the reference level of the NI vector signal analyzer much higher than the power of the acquired signal
and then decrease the reference level until the analog-to-digital converter (ADC) of the digitizer overflows. Then increase the reference level by 2 to 3 dB to allow some headroom for small signal
variations when recording. If your signal has a much higher peak-to-average ratio, increase the reference level even higher.
(Set RFSA Record Settings.vi) that contains an indicator showing the saturation of the ADC.
3/7
www.ni.com
To get the waveform information, read the wfm info output parameter from the niRFSA_Fetch_IQ.vi. Note that you must be using the 1D I16 instance of the polymorphic VI to have access to the
wfm info cluster, as shown in Figure 9:
Figure 9. When fetching raw binary data, the cluster named wfm info helps you translate those numbers back into useful units.
Using the wfm info cluster, you can find the following parameters:
I/Q rate = 1/dt
Waveform Info
Gain is used in analysis to convert from I16 data to volts. You also use this value to calculate the peak output power in RFSG using the following formula:
Peak power = 20*log((32767*gain)/(10^-0.5))
(1)
Figure 10. Portion of the Example Code Where Peak Power Is Calculated Part of RF Header File.vi
4/7
www.ni.com
Hence, your generation does not use the full dynamic range of the digital-to-analog converter (DAC) when regenerating the data. To bring the I16 data closer to the full range without
postprocessing the data, you can use the RFSG digital gain.
Figure 12. With the OSP gain, you can use the full-generation dynamic range.
For the PXI-5671 and PXI-5672, you need to obtain the FGEN session and use the controller-in-charge (CIC) gain. This gain is commonly used to compensate for attenuation in the finite impulse
response (FIR) filter. For this reason, you need to query the gain before writing the desired gain. The examples below also show this process.
The use of digital gain is actually a better practice than using the formula in Equation 1. This is because the higher the power you generate, the higher the signals noise density is. Ideally, you want
to have the parameter Output Peak Power be the same as the Input Reference Level. This ensures that you use full dynamic range in both acquisition and generation.
The attached code is also able to calculate the correct digital gain and record it into the same header file, but the code is not using the digital gain by default on the generation.
Storing RF Metadata
As mentioned above, you must use several properties of a recorded signal to accurately reconstruct the signal for playback. In the supplied code, these properties are stored in an XML header file.
The following is a list of the properties stored in the header file as well as their use:
Waveform Info: This cluster is automatically generated by the niRFSA driver when fetching raw data. It contains the scaling information that the driver typically uses to return I/Q samples. Its
contents are:
Absolute Timestamp: This timestamp contains the absolute time of the first sample in the waveform in seconds. You can use it to compare start times between acquisitions.
Relative Timestamp: This timestamp contains the difference in time between the first sample returned and the reference trigger location.
dt: Time between samples. The inverse of this value is the I/Q sampling rate.
Actual Samples Read: The actual number of I/Q samples in the returned data.
Offset and Gain: Raw binary data from the RFSA is scaled to I/Q data using a linear scale of the form y = mx + b, where b is the Offset property and m is the Gain property. The RFSA driver
accommodates for any attenuation by the downconverter or change in vertical range, so you can simply multiply each data point by the Gain value and add it to the Offset value to convert the
data to volts.
Reference Level: The RFSA acquisition reference level is stored in the file. However, you can more accurately determine the absolute power level of the signal by using the Gain property in the
Waveform info cluster, so that is used for playback power level.
Digital Gain for RFSG: As mentioned above, you can use the RFSG digital gain to compensate for a recorded signal that does not use the full dynamic range of the RFSA. The value is computed
in the record program and stored here in the file.
I/Q Rate: Although you can calculate the I/Q rate from the dt property of the Waveform info, it is stored here for convenience.
Full Scale Reference Level: This property is calculated from the Gain property of the Waveform info cluster. It represents the absolute power level of a point in the signal whose magnitude is at
the full range of the digitizer. For accurate signal reproduction, use this property as the generation power level.
SMT Zoom Settings: The fast Fourier transform (FFT) settings for previewing the recorded signal in the included configuration utility are stored in this property. The Center Frequency property is
used to configure the center frequency of the RFSG.
In the included code, the header file is accessed using a functional global VI (RF Header File.vi) to set and get properties. Figure 12 shows an example of setting several properties with that VI.
5/7
www.ni.com
Figure 13. Part of the Example Code Where You Record to File Recording Settings Part of the Configure & Record data.vi
The following is a list of RF Header File.vi functions.
Init: Sets all properties stored inside the VI to an initial value. Currently all initial values are 0.
Set Carrier Frequency: Sets the Center Frequency property of SMT Zoom Settings to the input value. Use this function only if the entire SMT Zoom Settings property is not being set.
Set Waveform Information: Accepts the Waveform Info cluster from niRFSA Fetch I16 and stores it inside the VI. This function also sets the Full Scale Reference Level property based on the
waveform gain, and it sets the I/Q Rate property based on the inverse of the dt property.
Set Reference Level: Sets the Reference Level property. There is no corresponding get function for the Reference Level property in this VI because the Full Scale Reference Level property is
actually used to set the generation power level.
Set Digital Gain: Sets the Digital Gain property in the VI.
Set SMT Parameters: Use this function to store the SMT Zoom Settings cluster used to configure the NI Spectral Measurements Toolkit.
Save File: Takes the property values stored in the VI and writes them to the specified XML file path.
Read File: Reads property values from an XML file and stores them in the VI for retrieval.
Get I/Q Rate: Retrieves the I/Q Rate property.
Get Full Scale Reference Level: Retrieves the Full Scale Reference Level property. Use this property to set the power level for generation.
Get Digital Gain: Retrieves the Digital Gain property.
Get Carrier Frequency: Retrieves the Center Frequency from the SMT Zoom Settings property.
Get Gain: Retrieves the Gain property from the Waveform Info cluster. This is not necessary for generation, but you can use it to scale raw data to real units for analysis.
Get SMT Settings: Retrieves the entire SMT Zoom Settings cluster.
Conclusion
You have seen how to use the recording parameters to ensure that the playback signal, p(t), represents the recorded signal, r(t), as closely as possible.
This system, as any other, introduces some extra noise to the recording, which is a cumulative of quantization noise (input and output) and cable loss (input and output).
Resources
RF Home Page
RF Record and Playback Reference Application
RF Record and Playback Reference Application
Included Components
Configure record settings to maximize dynamic range: Set RFSA Record Settings.vi
Save record parameters on a XML header file: RF Header File.vi
Simple NI PXI-5661 record: niRFSA Simple Record.vi
Simple NI PXIe-5672 playback: PXIe Simple Playback.vi
Load, save, and manage the header file: RF Header File.vi
Test Panel
Record and Playback Test Panel (This is not intended to be used as a reference application.)
Record and Playback Documents
Use the Win32 File IO Files
Introduction to Streaming
RF Record and Playback Application
RF Record and Playback Systems (20 MHz Real-Time Bandwidth)
NI Alliance Partner Solutions and Applications
Averna RF Signal Record and Playback System
6/7
www.ni.com
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may
not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS
TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (
http://ni.com/legal/termsofuse/unitedstates/us/).
7/7
www.ni.com