Software Defined Radio

Showing results for 
Search instead for 
Did you mean: 

RF Record and Playback with NI USRP

by Active Participant ErikL on ‎04-16-2012 04:53 PM

Choose your file path, IP address, Carrier Frequency, IQ Rate, Gain, and Antenna (on the left) and you're ready to Record.

Be sure to observe the Actual Coerced values so that you know exactly what parameters were used for the actual recording.

See the Record and Playback demo video and tutorial: http://zone.ni.com/devzone/cda/tut/p/id/13881

Download the NI USRP 1.1 driver: http://joule.ni.com/nidu/cds/view/p/id/2949/lang/en

rp.png

Comments
Member YYYs
Member

Could you please attach the niUSRP Fetch Rx Data (I16).vi and niUSRP Write Tx Data (I16).vi ?

Thanks

Member psisterhen
Member

Those VIs are available with the NI-USRP 1.1 release, which we'll be posting online in the next few days.

Member YYYs
Member

Hi,

I have used the NI USRP Record and Playback - I16.vi to record the GPS signal from a PXIe-8106 (include PXIe-5442 100 MS/s AWG OSP, PXI-5610 RF-Upconverter, Averna Dynamic Range Extender). The GPS Signal is generated by Averna NAVASIM (NAVigation Advanced SIMulator).

When I connect the RF Out Port from the Dynamic Range Extender to a Signal Analyser the following signal can be seen:

URT.jpg

Averaged

URTA.jpg

When I connect the RF Out Port from the PXI-5610 RF-Upconverter to a Signal Analyser the following signal can be seen:

URTOHNE.jpg

With the two 30dB attenuators from the the USRP package in line the signal is like this:

UWOEWA.jpg

I have recorded GPS signals from these three configurations, but when I playback all the recorded signal with the USRP the signal looks like this on the signal analyser:

USRPA.jpg

Does anybody have a idea?

Member YYYs
Member

In the demo video a ublox was used to record the gps signal while driving. How is it possible to record with u-center in a binary data format which is useable inside LabView for playing back the gps signal? Ublox uses the *.ubx data format, is there a converter?

Member Cheetor
Member

Hello,

Since we have an USRP in our office, we tried to reproduce the GPS record and playback with a Ublox evalution Kit. However, the RF input of this one has a 3,3V dc to supply a GPS antenna. Did you just use attenuators and a exterior reference for the clock or did you add a DC-Block between the USRP and the Ublocx? Is the USRP protected against this kind of thing ?

Active Participant ErikL
Active Participant

The output power of the USRP is very strong (and does not have protection). We used three (3), 30dB attenuators and transmitted with a power level of 0 in the software.

GPS Simulation.png

Erik

Active Participant ErikL
Active Participant

the USRP was used for both record and playback.  The uBlox was simply used for verifying that playback was accurate enough to allow a GPS (the uBlox) to lock.

Member Cheetor
Member

Hi,

I tried to reproduce the record and playback with the VIs you gave in the top of this page. Unfortunately, I am unable to lock a GPS signal. I recorded the signal from my office (GPS antenna outside) for 60 seconds at least.

Here is the configuration for the record:

- GPS antenna,

- BIAS Tee from mini circuit: ZFBT-4R2G-FT+

- Amplifier from mini-circuit: ZX60-33LN-S+ (+16 dB)

- An external clock reference

Here is the configuration for the generation:

- Ublox (various tests with 90 to 60 dB of attenuation)

- An external clock reference

Whatever the attenuation, no satellite can be acquired nor tracked.

The configuration for the computer is the following :

Tablet PC with Intel(R) Core(TM)2 Duo CPU U7700 @1,33GHz, 1,75 Go RAM and ethernet card : Broadcom NetXtreme 57xx Gigabit.

What did we do wrong ? Did we forget something? We tried all the tests with the original Vis. Something is wrong with them? Any idea?

Member YYYs
Member

Hi Cheetor,

I think 60 secods are not enough. My recordings were at least 15 min. You should also use a better notebook. In my case I have used a Core2Duo 1,8 GHz, 4GB RAM and I had several problems with playback (underflow erroers). These problems emerged from simultaneous activities like web browsing.

Active Participant ErikL
Active Participant

You may also need to add a property node to the RX and TX config in order to select the external clock as the frequency reference.

Member Cheetor
Member

Hi,

Thanks for your help.

I tried with the property node. Unfortunately, it is still not working. Any idea?

What did you use for the record and playback configuration ? I tried the record with IQ rates of 2M, 2,5M and with a gain between 0 and 25 dB.

Did you configure something special in the u-blox software ?

Active Participant ErikL
Active Participant

I've used 3MS/s and 5MS/s. I used the 3rd tab to see the incoming signal and it was a nice wide curve in the center of the screen with a width of about 2 MHz.  I also used the unlocked with the antenna to test the antenna. Then I used the bias tee with a 30db attenuator to test that section of connections again with the GPS. Then I attached to RX1 (verify antenna port is correct) and recorded at15-25 dB internal amplification. Externally I used the bias T and an additional 30db amplifier both from mini circuits. I did use a GPS filter before going to the but I did not appear to be critical. I also used a simple USB power meter and tx'ed a single tone to get the 0 and 30dB output power of my USRP. At GPS frequencies it was about -15dBm  to 15dBm respectively on a USRP-2920.  Also it isinteresting that if you set the record frequency wide enough you'll start to see other non-GPS GNSS signals.

Member Cheetor
Member

Hi Erik,

Thanks for your help and your quick answers.

I've done the first step (see the incoming signal), with a bias T and an amplifier ( +16 dB for GPS carrier frequency). The record was set with the following values :

  • carrier frequency : 1,57542 G
  • IQ rate : 5 MS/s
  • Gain : 25 dB
  • Active antenna RX2 (antenna connected to this port with BiasT and amplifier)
  • Write buffer set to 10 000 (IQ samples)

This is what we get with the Visualization tab :

spectre_5MS_25g.PNG

I have test the amplifier, it works fine. Any idea ? Complementary test ?

Active Participant ErikL
Active Participant

I don't see the GPS signal I expect. It should look like the oscilloscope screen shot in in YYY's comment above, second from the bottom (a hill rather than a spike). Maybe more amplification is needed, or a clearer view of the sky with your antenna would help.

Regards,

Erik

Member Dhimas
Member

Can we change the recording quantization level to 8 bit per sample intead of 16 bit?

Thanks.

Member Cheetor
Member

Hi,

I came back to you with an other question. From time to time, when we play back the signal, the duration time appears to be different than the time of record. How is this possible ?

Thanks a lot for your answer.

Member B_R
Member

I can't find where to download the playback .vi file ... where is it?

Member HustLiliAn
Member

Whether I can use this function or vi to relay the information between source and destination? Thanks

Active Participant ErikL
Active Participant

8 to 16 bit can be changed with 4 steps for most efficient use. 1. use a property node to change the transport to 8 bit mode.  2. change the niUSRP Read and write to 8 bit. 3 change the queues used to store data to 8 bit mode by changing the datatypes to I8. And lastly use a property node to choose which 8 bits are most significant so you send those back. Check the help file for niUSRP for more info on 8 bit mode.

Active Participant ErikL
Active Participant

When I have used record and playback and the times have been different durations it was because the record and playback IQ rates were different.

Active Participant ErikL
Active Participant

The VI contains a tab control with several tabs. One tab is record. The next is playback. They look very similar.

Active Participant ErikL
Active Participant

The USRP can be used to make a relay. Your technique may differ a bit with an all wireless relay because you may not want to write data to disk.

Member harryyuan
Member

when I set the IQ rate to 5M, and playback, here is a error:

Underflow: the Tx buffer was emptied before new data was provided.  Consider reducing the IQ rate, increasing the Write rate, or increasing the number of samples per Write.

Active Participant ErikL
Active Participant

Three things to try:

1. Use the NI USRP 1.2 driver

2. Make sure your PC is running in "High Performance" mode in Windows power options

3. Use the vendor's Ethernet chipset driver rather than the generic windows default.

My laptop tips out between 8 and 10 MS/s. my desktop PC will do full 25 MS/s.

The processing in the loop and the speed of the hard drive make a big difference. Hard drives advertise peak write speeds but not sustainable. And the more fragmented the drive or the center of the spinning platter reads/writes slower.

Member Nadisanka
Member

Is it possible to record RF signals transmitted from radio station and playback later on? I actually modified visualization loop by including simple sound.vi. but I hear only noise when I playback? Any suggestions about this approach or isn't it possible to do that?

Thank you!

Member LauraVdV
Member

Hi,

Since I use an USRP as part of my course, I have a few questions about its quantization level.


1. I don't fully understand the fourth step you mentionned concerning the recording in 8 bit mode instead of 16 (use a property node to choose which 8 bits are most significant ). Where should the property node be located ? Actually, how could the significant bits be chosen in the VI ? By chance, would you have a VI using 8 bits mode to provide as an example?

2. Would it be possible to lower the quantization level to 4 bits or even 2 bits (in order to maximize the instantaneous bandwidth)?

3. Could the procedure be transposed to the USRP Rio ?

Thanks a lot for your answer,

Best regards,

Laura.

Member OK1SFU
Member

Hello Erik,

thank you very much for this nice experiment! I would like to reproduce your GPS record/replay setup for students of signals and systems theory course. For this, I would like to kindly ask you about your RF link budget. Can you please describe the particular parts that were used in the RX and TX paths? I mean their gain, NF, and bandwidth or catalog numbers, so I can check that by myself.

It seems to me the RX gain briefly suggested above may not be enough the make the noise-like input signal appearing as 1 Vpp swing over the ADC. On the other hand, you may have encountered practical difficulties with some strong interfering signals that required lowering the input gain to prevent some kind of nonlinear distortion. Anyway, I would really appreciate a short comment on this.

Also, please, can you tell me what the RF frontend module of NI USRP 2920 is? Is that something from Ettus portfolio? In particular, we have N210 with UBX 40 which seems to be roughly comparable with the USRP 2920 bundle. Or am I wrong?

Kind regards,

Tom

Active Participant ErikL
Active Participant

N210 and WBX-40 will act as the NI USRP-2920 with the right firmware upgrade.  The firmware installs with the driver and you can follow the instructions in the getting started guide.

Member OK1SFU
Member

Hi Erik,

thank you very much for your comment.

The thing is I have UBX-40 (i.e. this https://www.ettus.com/product/details/UBX40 ) not WBX. Should it still work?

Kind regards,

Tom

Member Insiderbe
Member

Working for me, N210 with  WBX (50-2200MHz) and VERT400 antenna

Member Chloevivian
Member

I am using USRP 2953R+PXI 8880+MXIx4 to do the record and playback system.

       WLAN signal/Signal Bandwidth 80Mhz = IQ rate 100M, data size per second=100M*2*2B=400 MB/s (Is the calculation right?)

For the playback part, I tried for a long time, but I always got underflow error.

I make sure that the data in the queue is enough to supply USRP write, but still got error.

So, I tried to run the USRP example code “niUSRP EX Tx Continuous Async”.

Even the data already generated before the while loop, the underflow error still occurred.

I have no idea why the error always occurred.

What is the maximum BW rate can this example achieve? Is there any HW limitation? If I use 8260 SSD version, could I solve this issue?

I know USRP RIO can achieve 200MHz BW with PXI extender, Why “niUSRP EX Tx Continuous Async” example code cannot work?

Member M_Shaban
Member

Hello

i want to know what is difference between Data input to " configuration block of USRP "

and output wires called "coerced "

i note that it return same values

is they used or its just indicator

but if it indicator i input numbers why they shown http://prntscr.com/bhr7wg

Member Insiderbe
Member

Chloevivian: I think transmitting always goes with a lower IQ rate, my USRP N210 has a theoretical bandwidth of 20M, but the max Rx IQ rate is 5M and Tx IQ RATE= 1M (sometimes even 100k)

The overflow errros are most of the time due to the computer limitations, if you're USRP has no FPGA on board (so if you run the code on your pc) then your PC and the connection are the bottleneck... try with lower settings or another computer?

M_Shaban: the "coerced" is indeed an indicator. It shows the actual transmitted/received frequency.
example: if you try to send a signal on frequency 5Ghz, but your daughterboard only supports up to 2Ghz, the transmitted signal will be 2Ghz, this will also be shown on the coerced indicator because it's the maximum value the hardware supports.

Member Monkeydoo
Member

Hello,

When playing back a recorded signal, do the parameters have to be the same for IQ rate and Write Buffer?  When I am playing back, I get a lot of packet loss errors and underflow errors.  Does anyone have any insight as to why?

I am recording a GPS signal from the Spirent with the following set parameters:

carrier frequency: 1.57542g

IQ rate: 10Ms/s

gain: 0

Write Buffer: 200000

Thank you!

Active Participant ErikL
Active Participant

10 MS/s is likely too high for your computer. 5MS/s is sufficient for GPS.

Also be sure you have a more stable clock source for better lock.

From: Monkeydoo <web.community@ni.com>

Reply-To: "ni-169410736-9iy-2x-130w@community-mail.ni.com" <ni-169410736-9iy-2x-130w@community-mail.ni.com>

Date: Tuesday, August 16, 2016 at 5:01 PM

To: Erik Luther <erik.luther@ni.com>

Subject: Re: - RF Record and Playback with NI USRP

NI Community<https://decibel.ni.com/content/index.jspa>

RF Record and Playback with NI USRP

new comment by Monkeydoo<https://decibel.ni.com/content/people/Monkeydoo> View all comments on this document<https://decibel.ni.com/content/docs/DOC-22174#comment-50576

Member Monkeydoo
Member

Thanks for your reply.  I will try 5Ms/s.  I am using a 10MHz ref signal.  However, in the test lab that this is going to, they do not have a 10MHz reference.  Can an internal reference be used on the USRP?

Active Participant ErikL
Active Participant

Usrp's tcxo isn't quite stable enough for a good lock. You can even use a function gen instrument with a 10 mhz sine wave.

Regards,

Erik

Sent from mobile device.

Member Monkeydoo
Member

Just to clarify, I should record and playback using 5Ms/s? Or can I record

at 10Ms/s and playback at 5Ms/s?

Active Participant ErikL
Active Participant

Its like a tape recorder / record player. You can play back faster but it affects the frequency.

Unless you resample the signal you'll create time and frequency changes. You can test this with fm radio record and playback. They will sound like Alvin and the chipmunks.

For gps using 2 rates without digital resample won't work because it is digital modulation.

Regards,

Erik

Sent from mobile device.

Member Monkeydoo
Member

Thank you. Well, I tried 5Ms/s and 50,000 , 100,000 and 200,000 IQ samples

and it still crashes while on the playback. I'm only recording 3 minutes.

Any ideas?

Member RadioJunky76
Member

Hello Erik,

Does this vi support USB USRP devices such as the B200?  I was issued a B200 but have access to several other USRP models.

Member Monkeydoo
Member

I tried on 3 different PCs, the last two being i7 core processors with

different gigabit Ethernet cards and they all keep crashing with packet

loss or tx underflow errors. I tried lowering the IQ rate to 5MS/s from

10MS/s and decreased the write buffer in the playback to 40,000. Any ideas?

Thanks.

Member Bandisekhar
Member

Hi

  Is it possible to Play from the file and record to the file at the same time using Loop back mode (TX1 with SMA to RX1 with SMA cable).

I tried this, able to record with no error and not able to playback once recording is finished. Not getting any audio but waveform data getting same.

Could you please help us on this?

Thank you.