This document analyzes NI RF hardware and software to help you achieve the best performance. It also contains example code specific to each section to help you integrate record and playback systems.
The ideal RF record and playback system can be modeled by:
p(t) = r(t) = s(t)
Where
s(t) is the signal you are trying to record
r(t) is the recorded signal
p(t) is the playback signal
Because you are not working with perfect systems, you can express the previous equation as:
p(t) = r(t) + ns(t) = s(t) + n(t) + i(t)
Where
ns(t) is the system noise (acquisition and generation device)
n(t) is the environment noise
i(t) is the environment interference
This document highlights some specific software/hardware implementations to help you maximize the correlation between p(t) and s(t). Even if some of the parameters are applicable to many RF systems, you will need to reference the following two systems:
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.
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.
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 Vpp 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 Vpp. 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:
Figure 3. Path Followed by the Signal at Record Time
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:
Figure 4. Simplified Block Diagram of the NI PXI-5600 Downconverter
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:
Figure 5. Example Spectrum of the FM Radio Band
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.
In the Record and Playback Reference Application, you have a VI (Set RFSA Record Settings.vi) that contains an indicator showing the saturation of the ADC.
The recorded waveform is the baseband representation of the passband signal, also known as the complex envelope or I/Q data. You can save the data in any format, but, to stream the data to disk at high rates, you must minimize the amount of processing applied to the data during recording. For this reason, the examples store the data as an array of signed 16-bit integers. This is the format in which the data is stored in the digitizer memory; the only processing is simply copying the data from the digitizer to PC memory.
The I/Q data array is interleaved like this:
I0, Q0, I1, Q1, I2, Q2….. In, Qn
Where n is the number of acquired samples.
The challenge in a record and playback system is reproducing the recorded signal at the same level at which it was recorded. This might be useful when you want to test the unit under test (UUT) in the lab under the same conditions that would be present in the field.
You need the following properties to play back an RF signal using the NI-RFSG driver:
You need information about the recording settings to obtain these values. If you do not have information about the settings, you have neither a reference of sampling speed nor power and, therefore, you cannot reproduce the recording accurately.
Two important values used in the RFSA driver can help us determine the correct output conditions: carrier frequency and waveform information.
To obtain the carrier frequency, use the NI-RFSA Property Node to get the correct value, as shown in Figure 8:
Figure 8. Obtaining the Exact niRFSA Center Frequency Value
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:
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)
10^-0.5 is the result of translating 0 dBm to Vpk.
National Instruments offers example code to help make the record and playback architecture easier to navigate.
Figure 10. Portion of the Example Code Where Peak Power Is Calculated – Part of RF Header File.vi
The attached code creates a header XML file when a file is recorded. This XML file contains all of the parameters required by the NI-RFSG driver. The attached example also makes use of this header to regenerate the signal as close to the original conditions as possible.
The National Instruments NI-RFSG driver has two modes for configuring output power:
Average power: Indicates the desired signal power averaged in time. The driver maximizes the dynamic range by scaling the I/Q waveform so that its peak magnitude is equal to one.
Peak power: Indicates the maximum power level of the RF signal averaged over one period of the RF carrier frequency (the peak envelope power). This setting requires that the magnitude of the I/Q waveform must always be less than or equal to one. When using peak power, the power level of the RF signal matches the specified power level at moments when the magnitude of the I/Q waveform equals one.
The default mode for NI-RFSG is average power, but in record and playback applications, you need to set this property to peak power due to the fact that the file is too large to rescale the data.
If you have some knowledge of the maximum power value in the waveform, you can set the RFSG digital gain to maximize the dynamic range of the arbitrary waveform generator (AWG) by rescaling the data in the AWG OSP so that its peak magnitude is close to one.
To get an approximate value of the required gain, you can use the Recording Configuration Test Panel (included with the examples below). Before recording, this program estimates the maximum acquired power and provides the gain that you need when the data is generated. In the Record and Playback Reference Application, this information is stored in the XML header file.
The PXI-5661 has attenuation adjustable in 10 dB steps. When recording, this may coerce the reference amplitude to a value that is too high. One way to compensate for this is to change the digitizer vertical range. With the Recording Configuration Test Panel (included with the examples below), the user can set this parameter before recording.
Even after changing the digitizer vertical range, the recorded I16 data might not use the full dynamic range, as seen in Figure 11.
Figure 11. Binary Raw Data Usage of Recorded Data
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 signal’s 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.
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:
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.
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.
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).
Included Components
Record and Playback Test Panel (This is not intended to be used as a reference application.)