Garbage Data received for USRP X310 using Loopback Test (Wireless Testbench)

I am trying to do a LoopBack Test for USRP X310 using MATLAB 2022b's Wireless Testbench support package for NI USRP. I have successfully setup the USRP and gone through that process. I have also run the example of Loopback test given in MATLAB in the following link
I have modified and selected X310 and got the waveform as shown below. It shows there is some noise in the received signal compared to the one shown in example
Furthermore, when I tried to use some random bits for QPSK modulation and then send confirm the transmission using Loopback I am getting some ridiculously large data points. Attached is my code..!!!
The constellation point for QPSK should NOT be greater than 0.707 for both in-phase and Quadrature samples, however I am getting the following values (sample snippet)
I have been trying this in the older versions but due to the Wireless Testbench shifted to 2022b. Any helps in why I am getting this is much appreciated
Thank you..!!

Answers (1)

Hi Uzair,
I've tried your script on our own X310 setup and was unable to reproduce the noisy spectrum you've shown. The signal looks to be particularly low in power (-20 dBm at the peak) - are you using loopback cables or antennas with the radio? You may also need to adjust the values for the CaptureRadioGain and TransmitRadioGain properties on the basebandTransceiver object to tune this to your particular environment and ensure you are receiving a strong signal.
With regards to the size of the data you are receiving, the capture method of the basebandTransceiver returns data as complex int16, compared to the compelx double type being transmitted.
Finally, if you're not already familiar with the QPSK Transmitter & Reciever example, you may find this useful. In particular, you may need to incorporate recovery and synchronization on your received data to ensure your constellation plot and bit error calculations are working as expected.
Regards,
Martin

10 Comments

1-) I am using a loopback cable with 30dB/50ohms attenuator
Actually, I have implemented the QPSK example with carrier synchronization system objects and symbol synchronization before. The problem is that I am receiving the same signal (spectrum shown above) even when I remove the loop back cable.
2-) I have also adjusted and changed the gain of the radio TX/RX and still got not the exact same signal.
3-) I see that there is a 2nd tone that is comparable to the original tone in the spectrum (2.4GHZ + offset one). This although show less gain but they are comparable which means noise.
4-) Also one would expect the simple loopback configuration to be the most reliable of all the communication. Do you think we need Synchronization here too?
My apologies, I misunderstood the first part of your question - I understand now that the spectrum plot you have provided is from our example, and not the script you attached.
The example was published with different hardware in a different environment, so your own plots likely won't match up. There may be a lot of RF activity at 2.4GHz - you could try adjusting the center frequency to something lower/higher. For example, I just tried using our setup with a center frequency of 1.7GHz and saw a much cleaner received signal compared to 2.4GHz.
First of all, I appreciate your response Martin
Secondly Yes, I have tried that on 1GHz and got something cleaner, but having the same signal without any cable, does it make sense?
It probably suggests to me that the cable is as hostile as the wireless channel. Also I am getting a BER of almost 0.5. Can you please suggest where I might be wrong..?
Also can you please run the code in the file attached for my problem and let me know if you are getting the same results as me or the BER is in acceptable levels
I ran the attached code and I do observe similar behaviour with our own setup - the calculated BER is typically around 0.5.
I think this is to be expected without any actual synchronization on your signal, and would anticipate an improved BER if you include that.
Will you be surprised if I tell you that I am getting similar results with and without synchronization?
I have tried that using system objects such as comm.Symbolsynchronier and comm.Carriersynchronizer and got BER around 0.5. Are you suggesting some method for Frame Synchronization to sync Rx and Tx ?
That's correct, I would expect you would need frame synchronization to ensure that you are comparing 'like for like' when calculating the error rate.
Gotch. Do you have any system object for that or I have to implement some algorithm from scratch?
If you open and inspect the code for the QPSK Transmitter & Receiver Example I mentioned previously, you'll see there's a FrameSynchronizer system object which is used within the receiver. In particular, if you look at the stepImpl method of the receiver you'll see the various stages of compensation/recovery/synchronization used on the signal before decoding and calculating the BER. Hopefully that helps!
There is Frame synchronization, but it does not work well when used with end-to-end applications for USRP. I confirm that it works just fine for simulation purposes, I have tried and gone through it in the debugging mode. For hardware supported applications, the BER seems to have gone as high as 50%. Moreover, I have tried "transmit" function for the end-to-end application and it did not work either (The script stuch without any meaningful message being displayed for the user). Is MATLAB just not good enough for such applications ?? Because it seems under tested this "Wireless Testbench" specially.

Sign in to comment.

Categories

Find more on Communications Toolbox in Help Center and File Exchange

Asked:

on 15 Dec 2022

Edited:

on 25 Dec 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!