02-17-2012 12:29 PM
I know a USRP can be a transmitter and a receiver, but can a single unit transmit and receive at the same time? The application in question involves sending an RF signal to an RFID tag and then reading the tag's response using just one USRP. I've heard that the link between the channels can cause significant bleed over because there isn't isolation between the channels, but couldn't find an example showing simultaneous Tx and Rx. Is there an example or documentation that I'm missing?
Academic FSE - Mid-Southeast
Solved! Go to Solution.
02-17-2012 12:42 PM
The USRP can transmit and receive at the same time. You are correct that there will be bleed over due to lack of isolation, however the documentation for the USRP is still being formed and does not include information about this. Here are 2 VIs that you can use to do simultaneous TX/RX. Simply set the IP address in both VIs to be the IP address of your USRP and run them. You may have to tweak the IQ rate and the frequencies for your application, but this very basic example should be a good starting point.
Let me know if you have any further questions, I'd be happy to help.
02-21-2012 03:42 PM
Thanks for the examples. I noticed though that they are LV2011 files. Any chance we could get them as older versions for those that aren't up to date?
Also...I see that you have essentiall written two separate programs...one for Tx and one for Rx. Are these any different than the continuous Tx and Rx example programs that get shipped with the driver?
I tried to do something like this a few weeks ago...but instead had a Tx and Rx loop executing in a single LV program. The TX loop simply output a sine wave...and the RX loop captured it and plotted the magnitude spectrum. Basically...I copied the individual Tx and Rx example programs and pasted them into a single VI. However...I noticed some 'glitching' in the spectrum, but was never able to track down the cause. My thought was that it was due to some subtleties of running concurrent loops in the same program. It would be interesting to see what actions might be needed to implement it this way.
02-27-2012 03:57 PM - edited 02-27-2012 03:58 PM
Sorry about the delay in reply, I was out of office last week. I have attached the VIs for LabVIEW 2009 below (NI-USRP only works with LV 2009 or later).
The only difference I saw between these VIs and the examples shipped with the driver is that examples also are set up for triggering.
You are correct that you can run the TX and the RX portion of the code in the same VI. This is typically what I do, I just didn't have code saved that I had tested to post. When you say that you are getting glitches, what type of glitches do you see? Do you see them after a specific number of samples? If you have screen shots of what you are seeing and your code, I'd be happy to take a look and see if it's something I can replicate or if there's any easy fix. Typically a glitch can be seen due to the buffers and the way the data is loaded into them or the way that the configurations are done if you are using a loop.
03-01-2012 07:52 AM
The 'glitches' I was seeing was in the spectrum. I set up the USRP to transmit a sine wave (for example, I=1 and Q=0 for all time)...and the viewed the spectrum. Every so often, the impulse representing the demodulated sine wave would dip...or I'd see lots of side-lobes....or the main lobe would widen...or the noise floor would rise....or some combination of these.
My guess...just as you mentioned....was that I didn't quite understand some subtleties in how data was moved in and out of the Tx and Rx buffers....however....since I was only transmitting a single tone (i.e. - my I's and Q's weren't changing over time)...it didn't seem like this would be the cause. In other words...if I was doing something like overwriting the Tx buffer before it had a chance to empty, it wouldn't have mattered because the IQ data was always the same.
Perhaps it was something on the receive end.
03-01-2012 01:03 PM
I assume that when you say spectrum, you mean that you are looking at the power spectrum. I tried this out on my USRP to see if I get the same behavior. When I ran the VI (attached, very basic. I just combined the RX and TX examples) with the Baseband Power Spectrum X and Y axis autoscaled, I saw what looked like the noise floor changing. However if I changed by X and Y axis, I saw very stable behavior where my spectrum looked like this (units on the graph are off):
Also if you are seeing the main lob widen, this could be an indication of phase noise. Make sure that your cables are all connected securely and not damaged. If this is not the behavior that you are seeing let me know. And once again, feel free to post screen shots or code, I can easily try it out on my system to see if I get the same behavior.
03-01-2012 01:13 PM
- Yes. The power spectrum. Sorry for my vague description.
- No. This was not an issue of axis autoscaling. With autoscaling off...there were still significant changes in the power spectrum. To verify this... x output into my PXI spectrum analyzer (NI 5660) and observed the same behavior.
- The behavior only occured when I was running both my Tx and Rx loops in the same VI simultaneously...so I felt that it was more likely my code rather than the hardware. If I operate JUST the Tx example program or JUST the Rx example program...there was no issue.
I ended up taking another route and just using an external source and an Rx path of my USRP and had sinced moved on. However...I'll try to go back in the next few days and dig up the code I had been working on and pass it along.
Thanks for the conversation!