In the world of RF and software defined radio, testing/verification is a whole new world compared its counterpart in the lower frequency electrical testing/verification. Especially if you're new to RF and SDR design, understanding the basic concepts of how to verify RF performance is one of the first key things to learn.
In this project I'm start with the two most basic RF verification tests on my Ettus B205mini USRP: the measurement of a sinusoid continuous wave (CW) being transmitted from the SDR to verify the output power level and center frequency offset. And I'll be measuring these parameters using a spectrum analyzer, specifically the ADP5250 from Diligent.
The output power is measured in dBm and it's one of the first tests performed on an RF system because it's the first indication to know if there is enough RF energy coming out of the SDR to be recognized and picked up. Verifying output power from your transmitter is the first thing you do to make sure the SDR is alive and configured at least well enough to produce RF energy.
After we know the SDR can successfully produce RF energy, the next step is to measure how close the output signal being transmitted is to the center frequency we configured it to be in the software of the SDR, aka our center frequent offset measurement. A center frequency offset measurement is performed on a CW signal that is not modulated in any way. This is because if there is something weird going on in the hardware or software, we want to be able to see that and not have it potentially masked by or mistaken for the modulation.
Create GNU Radio FlowgraphFirst things first, we need to create the flowgraph in Gnu Radio to run on the B205mini to have it output a CW tone at a specified frequency within its range (70MHz - 6GHz).
Launch Gnu Radio and create a new flowgraph the add a signal source and set baseband frequency, sample rate, amplitude, and waveform type. You can hard code these to whatever you prefer, or you can do what I did and make them variable within a range to be changed by the GUI of the flowgraph when running.
Add UHD USRP sink and set UHD TX output center frequency (the RF output frequency that the AD9364 is doing to up-convert the baseband signal to), sample rate, bandwidth of the anti-aliasing filter in the AD9364, gain value/type, select TX antenna, and UHD clock source. Again, you can hard code the output center frequency, sample rate, bandwidth, and gain or make them variable within a range to be changed by the GUI of the flowgraph when running.
I also chose to add a UHD USRP Source block with the same frequency, sample rate, and bandwidth settings as the UHD USRP sink, leaving the gain setting at 1 though, and selected the receive antenna of the B205mini (RX2). Then connect the UHD USRP Source to a QT GUI Sink block.
This gives me the freedom to loop the transmitter back to the receiver to for verfication when my spectrum analyzer isn't available. Then when connected to the spectrum analyzer, this will let you see the carrier leakage from the TX signal chain into the RX signal chain relative to output power level and TX center frequency settings.
Connect to B205miniConnect the B205mini to your host PC with the appropriate USB 3.0 cable and then connect its TX output port to your spectrum analyzer (channel 1 of the ADP5250's mixed signal oscilloscope in my case via the SMA cable to 30dB attenuator, then SMA to BNC adapter).
Keep in mind that whatever power level is read by the spectrum analyzer is going to be 30dBm lower than what it actually is due to the attenuator. The attenuator is import to use in all of your testing because most RF hardware has a limit of the power level of RF energy that it can take in before damage occurs.
Since you're testing a device, it's not always guaranteed/known what power level you're going to get out of the device under test (DUT) and it's better to need to turn the power output up rather than down. 30dBm attenuators are my usual choice because most RF test equipment's max power input tolerance is 30 dBm (1 W).
Setup Spectrum AnalyzerSet the center frequency of your spectrum analyzer to match that of what the B205mini is set to output in the Gnu Radio flowgraph, and set a reasonably large span so you can see any other RF energies at unexpected frequencies if they exist.
Launch WaveForms and select the connected ADP5250 from the device list. Then select the Spectrum Analyzer function from the Welcome window listed as Spectrum.
I set the center frequency of the UHD Sink block to be configurable via a slider control in the GUI at runtime, but the default value I set it to start at is 100MHz so that's what I set the center frequency of the spectrum analyzer to start with.
To view a good amount of spectrum around the center frequency to look for any unexpected spurious outputs (commonly referred to as spurs) I selected 20MHz for the span, putting the start frequency at 90MHz and stop frequency at 110MHz.
For the magnitude scale on the Y axis of the spectrum, the default unit is dBV, but we're looking at dBm, so change the units in the Magnitude settings box in the righthand column from dBV to dBm using the dropdown menu.
Since I'm connected to channel 1 on the ADP5250, I unchecked the box for trace 2 since we won't be seeing any input on it.
Finally, click the Run button (looks like a green play button) to start the spectrum analyzer measuring what is being input on channel 1 (trace 1).
Run FlowgraphB205mini has up to 90dB of gain on the TX side. I personally found that a gain setting of at least 45dB was needed to get the CW up and out of the noise floor to be visible on the spectrum analyzer.
To see the exact levels of the peak from the CW tone at 100MHz, I used a marker and placed it on the highest level of the peak.
To place a marker in the spectrum in WaveForms, select View then check the option for Markers. Then click the green plus icon in the Markers window that appears. This will add a diamond shape to the spectrum window. Drag this diamond to the desired location and the frequency/magnitude values for its location will be displayed in the Markers window.
With a gain setting of 45dB, the ADP5250 showed an output power level of 5.234dBM (-24.766dBm + 30dBm) at a center frequency of 100MHz. However, we can also see at this power level output, there is also some carrier leakage from the transmit chain into the receive chain as evidenced by what we can see from the UHD Source block.
Since the settings for the UHD sink block are all configurable in the GUI at runtime of the Gnu Radio flowgraph, it's a good way to get an intuitive understanding of what they mean and how they affect the RF output from the SDR.
Comments