In this real-time example, we use the USRP B210 as the sub-6 GHz SDR. The Pi-Radio FR3 2-ch SDR front-end is interfaced with this USRP, extending its operation into the FR3 bands. This example is based on the OFDM reference example from GNU Radio.
Download the Repo: https://github.com/pi-radio/tutorials-demos
The relevant file is "ofdm_tx_rx.grc". We have created and tested this demo with GNU Radio version 3.10. While we recommend running this demo using two SDRs (one for the TX, one for the RX), you can run everything on the same SDR as well. This demo is a simplex (i.e., uni-directional) system. A continuous stream of data is sent from the TX to the RX, without a reverse path for acknowledgements or the like.
Step 1: Run the demo in FR1 Cabled Loopback: Connect a 20dB SMA attenuator to each of the TX and RX ports (RF A) on the USRP. Connect the TX and RX using an SMA cable (the total attenuation between the TX and RX is therefore 40dB). Do not connect the Pi-Radio system in the loop at all. Run the file in GNU Radio Companion (GRC). In the GUI, configure the USRP TX and RX gains to 55. You should observe something like this, below.
Make the following observations:
Top-Right: Observe the spectrum of the received signal. The total bandwidth is 5 MHz, of which 4 MHz is occupied. Note that we have limited the bandwidth to 5 MHz because of the ability of the host computer to crunch the data in real-time.
Bottom-Right: These are the time-domain IQs of the received signal. Observe that clipping is not taking place. If clipping were taking place, the amplitude would hit +/- 1.
Bottom-Left: This is the equalized constellation of the OFDM signal. Note that we are using QPSK. Observe the excellent EVM.
Top-Left: This is a scrolling "waterfall graph" of the received signal, with time on the Y-axis, and frequency on the X-axis.
Bottom: Observe the sliders that show that we have configured both the TX and RX gain on the USRP B210 to 55.
This is the baseline FR1 system that you first need to get working. Spend some time looking at the GRC flowgraph. Note that in this example, the USRP is operating with a 1 GHz center frequency. Play around with different gain values and observe the behavior of the system. Once you're satisfied, revert to the original gain settings (TX and RX gain set to 55), and proceed to Step 2.
Step 2: Add the Pi-Radio FR3 front-end to the signal chain:
Connect the TX signal from the USRP to the "FR1 IF IN 1" port of the Pi-Radio system. Keep the 20 dB attenuator in this signal chain. It is also a very good idea to place a low-pass filter (cutoff of approximately 1.4 GHz) in this signal path.
The Pi-Radio system will output the FR3 signal from the "FR3 RF OUT 1" port on the back side. If you have a spectrum analyzer that operates at the FR3 bands, you can "see" this signal. Take precautions not to damage your spectrum analyzer. The TX-side of the Pi-Radio system up-converts the FR1 signal to FR3. Please read the FAQ below for tips to prevent hardware damage.
Connect the "FR3 RF OUT 1" port to the "FR3 RF IN 1" port, using 40 dB of attenuation in this signal path. To do this, attach a 20dB attenuator to the "FR3 RF OUT 1" port, and another 20dB attenuator to the "FR3 RF IN 1" port, which adds up to the required 40dB. Connect them using an SMA cable. Ensure that the attenuators and cables are rated for FR3 operation.
Take the output signal from the "FR1 IF OUT 1" port of the Pi-Radio system and feed it back into the RX port of the USRP. Make sure that you have 20dB attenuation in this path. It is also a very good idea to place a low-pass filter (cutoff of approximately 1.4 GHz) in this signal path.
The figure below shows what your setup should look like. Note that in this diagram, we have assumed that the TX side consists of a USRP and a Pi-Radio FR3 front-end box. The RX side uses independent hardware.
Double-check these connections before running the flowgraph. Please read the FAQs at the end of this document to learn about the precautions you need to take to avoid damaging the USRP and/or the Pi-Radio system. Now, we need to correctly configure the Pi-Radio hardware to extend our FR1 demo into the FR3 bands.
The Pi-Radio 2-ch FR3 kit can be easily configured from your web browser. In this tutorial, we assume that the TX and RX sides use separate Pi-Radio boxes (you can adapt the experiment to use a single box for both the TX and RX, if needed). Assume that the Pi-Radio system used on the TX and RX sides have IP addresses of 192.168.137.51 and 192.168.137.52 respectively. Make sure your host computer has a different IP address, on the same subnet. In your web browser, enter "<pi-radio_ip_address>:5006" and press Enter. The following GUI should appear within 20 seconds.
Example of the web-browser-based GUI to configure the Pi-Radio SDR kit.
Configure the Pi-Radio system(s) as needed. Open up two tabs on your web browser: one for the TX side and one for the RX side. Enter the IP address and port number (5006) as described in the previous paragraph (for example, 192.168.137.51:5006).
On both radios, set the FR1 center frequency to 0.7 GHz. Note that the USRP center frequency is 1 GHz, as configured in GNU Radio. We offset the FR1 LO by about 300 MHz for this example, for reasons explained here.
On both radios, set the FR3 center frequency to 10 GHz.
On the TX radio, set the TX1 gain to 35, noting that we are using TX channel #1 on the Pi-Radio box.
On the TX Radio, optionally suppress the LO leakage as explained here.
On the RX radio, set the RX1 gain to 35, noting that we are using RX channel #1 on the Pi-Radio box.
Connect up the system as shown in the block diagram above. In GNU Radio, run the same flow-graph, and change the TX and RX gains to 50 and 40 respectively. You should observe the following:
You now have a system working at FR3! It's as simple as that.
Play around with the gains on both the USRP as well as the Pi-Radio front-ends. Observe that as you decrease gains, the EVMs will degrade. If you were to increase gains too much, then clipping will take place, thereby degrading EVMs. It is therefore very important to carefully set the TX and RX gains on both the USRP as well as the Pi-Radio front-ends for good performance.
This example as shown you the following:
Get a simple example working at FR1 on your USRP radio(s)
Connect the Pi-Radio FR3 front-end system(s) to your USRP(s)
Configure the Pi-Radio and USRP gains for optimal performance
Voila! You now have an experiment working at FR3!
You can extend this tutorial in the following ways:
Play around with the TX and RX gains (on both the USRP and the Pi-Radio FR3 front-end), and observe the constellation. Identify the "sweet spot" for the system to work optimally
Extend the GNU Radio example to also display the EVMs next to the constellation. This way, you will have a quantitative measurement of the system performance
Instead of cabled loopback at FR3 (with 40dB attenuation in the loopback signal path), go over the air using the provided Vivaldi antennas. Please make sure that you have the adequate licences and permissions to transmit over the air, in your jurisdiction.
Try the same experiment, but with a different USRP model number. Perhaps try to use the Pluto SDR instead of the USRP. In each case, observe how the optimal gain settings you use will need to change.
Observe the following signals using a spectrum analyzer:
The TX signal from the USRP at FR1
The TX signal from the Pi-Radio box at FR3. Observe the effect of offset-LO on the center frequency of the transmitted signal at FR3.
The attenuated FR3 loopback signal that is fed into the RX port of the Pi-Radio box
The output RX-side signal that is sent from the Pi-Radio system into the USRP
In each of the following cases, observe the signal power and the noise floor.
Try to bump up the bandwidth of the signal that is transmitted from the USRP. Specifically, look at the "samp_rate" variable in the design. What happens if you increase the sampling rate from 5 MSps to 40 MSps? Try to eke out the highest bandwidth performance from your USRP + host system configuration.
Please make sure you read the FAQs below for best practices for running experiments. Please take all necessary ESD precautions to avoid damaging any hardware. Happy experimentation!
Frequently Asked Questions (FAQs)
What if I have a USRP other than the B210? You can easily modify this example for other models of the USRP. Pay attention to the gain settings and sample rate. It shouldn't take you more than a few minutes to get it working for different USRP models.
Should I run this demo on two separate SDRs or just one SDR in cabled loopback mode? Either way is fine. However, real-world SDRs like the USRP and the Pi-Radio front-end have some self-leakage between their TX channel(s) and their RX channel(s). Therefore if you run the experiment using just one SDR in cabled loopback mode, the receiver will receive the sum of two signals: 1) the self-leakage and 2) the actual received signal. This can affect the performance. If you have two SDRs, we highly recommend using one SDR for the TX and the other for the RX.
Can I run this experiment over the air? Yes, if you have an experimental license to transmit over the relevant frequency. Please note that a lot of the FR3 bands are controlled, so be careful not to break the law in your jurisdiction. Pay attention to the frequency and the EIRP of your transmitted signal.
What precautions do I need to take to avoid hardware damage?
Consider the TX side. When the input FR1 signal is active on the "FR1 IF IN" port, the Pi-Radio system will produce an output signal on the corresponding "FR3 RF OUT" port. This output signal *must* be fed into a terminated load (for example, A. a 50 ohm attenuator; B. a spectrum analyzer; or C. the "FR3 RF IN" port using a 40 dB attenuation). Failure to do this will damage the FR3 power amplifier on the Pi-Radio TX chain.
Consider the RX side: The maximum input power that you can feed into the "FR3 RF IN" port is -20dBm. Exceeding this limit will damage the LNA on the Pi-Radio system. This is why we recommend that in cabled loopback mode, you use 40dB of attenuation between the "FR3 RF OUT" and "FR3 RF IN" ports. Alternatively, if you are going over-the-air (OTA), please take into account the path loss between the TX and RX antennas, as well as the antenna gains. Make sure that the loss is at least 40dB, otherwise damage will occur.
ESD Protection: When handling the USRP and/or the Pi-Radio system, you must follow ESD protection guidelines. Ground your wrist, and always use nitrile gloves when touching the hardware (including the SMA cables).