Software Defined Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

GPS Simulation with NI USRP and LabVIEW

NI USRP supports L1 GPS Simulation using the LabVIEW GPS toolkit.  LabVIEW with a NI USRP-2920, a stable 10 MHz reference clock, and 60 dB of fixed attenuation can simulate up to 24 hours with up to 12 satellites.

GPS Simulation.png

The connections to the GPS are simliar to those used in a record and playback discussed in this tutorial:

http://zone.ni.com/devzone/cda/tut/p/id/13881

Hardware Requirements:

NI USRP-2932

90dB of fixed Attenuation (with USRP Gain set to 0)

(When using an NI USRP-292x device, an external reference clock is required (an OCXO is recommended)

Software Requirements

LabVIEW 2011

NI-USRP 1.0 driver

NI GPS Toolkit 2.0

Modulation Toolkit

Considerations:

Providing Signals at the Correct Power Level to the DUT:

The RF front end of a commercial GPS unit typically expect signals between -130 and -160 dBm.  This may vary by GPS DUT. Signals scaled to full range (+/- 1) in software at the L1 GPS Frequency 1.57542GHz are transmitted by the NI-USRP at approximately -14dBm (this level is not calibrated, so taking the measurement is suggested).  The output signal generated with the GPS toolkit is not a +/- 1V full scale signal (you may want to measure this as well). In order to avoid clipping, the USRP gain was set to 0dB and externally, 90dB of attenuation was added to the SMA cable between the USRP and GPS using 3 fixed 30dB attenuators.

External Reference Clock:

GPS is very sensitive to frequency offset and clock jitter, so an improved frequency source is recommended beyond the standard TCXO.  An OCXO is highly recommended, which provides a very precise frequency reference.  The NI USRP-293x provides an internal OCXO that can be GPS disciplined or a user can connect their own external via the RefIn port on the front of the NI USRP-292x.  A property node in the niUSRP driver allows you to specify the clock source in both cases.

IQ Generation Rate

The generation rate in the GPS Toolkit is 1.5MS/s.  This rate needes to be interpolated in software to an IQ rate supported by the USRP.  Therefore we upsample the signal from 1.5MS/s to 2 MS/s using a Modulation Toolkit VI before being sent to the USRP for transmission.

Note: It's likely that your GPS Almanac files will be located in a different folder than mine.  Be sure to double check both file paths and make sure your GPS Toolkit is activated in the license manager if you're getting error messages.


Comments
himan009
Member
Member
on

Hello sir,

Can you please let me know what amount of voltage I can supply to my USRP 2922 board from a function generator to provide a 10MHz reference clock in.

dalsaffar81
Member
Member
on

Hi Erikl

I have NI-USRP2920 and NI-USRP 2050R and I want to use one of them to transmit and the other to received but I want to use GPS to make an external clock just for few minutes. Could I do this with these devices. Thank you

Chinquapin
Member
Member
on

Hey Erik,

I need to run a test that exceeds the 24 hours that this VI produces. I realize that the maximum number of frames supported is 2880, but maybe there is a seamless way to loop the VI to start producing the same GPS data after the 24 hours has elapsed?

Thanks

himan009
Member
Member
on

Hello all.

     I want to work with three NI-2922 with LabVIEW and MATLAB. I am going to impliment the algorithm in MATLAB, as a backend program, and wan to work with USRP and LabVIW as a fontend entity. The subject is spctrum allocation strategy. So I want one USRP to be Secondary User whome the spectrum will be allocated.The second USRP to be equivalently a base station, which will form an intermediate entity between first USRP and third USRP. Third USRP is like a central controlling entity which will be running MATHSCRIPT.

     Can anybody please give me suggestions so as how to impliment this structure?

Please, I am in need of help. Any material, tutorial, VIs would be appriciated.

Thanking you in anticipation.

Martin_Sveningsson
Member
Member
on

Hi Erik!

Thanks for the nice examples both with the GPS Simulation and RF Record and Playback. I’m currently evaluating the best USRP choice for testing a specific DUT which has a build in GPS receiver. Our approach would simply be to have a recorded GPS file (like your way to work) and make a playback of that file using a USRP unit and check if our DUT can read out that playback signal. I’m currently considering using a 292x model but have questions if the 2900 models would work for this application as well? Or would you even consider to go with the 293x models? High position accuracy is not required we would just like to validate that the GPS in the DUT “works”.

I just started to look into the GPS simulation toolkit and how to generate a “simulated“ GPS signal instead of having a recorded one, however do you know if there exist a few examples of pre-generated files to be used for playback purposes?

Tassos83
Member
Member
on

Hello,

 

I am running the above .vi to be executed for 24 hours, by changing the Number of GPS Frames and total number of optimal satellites. It hungs at around 10 hours showing the following error status code:

--------------------------------------------------------------------------------------------------------------------------------

error -20413 gpsv1_validate optimal satellites.vi
 Possible reason(s):
 The number of selected satellites is 0.  
Some of the reasons are Invalid receiver location or satellites not present in ephemeris file.

--------------------------------------------------------------------------------------------------------------------------------

 

Any help would be appreciated!

 

Thank you

aliila
Member
Member
on

hi dear 

Please help me 

 I want to launch this software with usrp "B205 mini" please guide me. Can you change?

email me: alalkh98@gmail.com

 please help me

Yuan0995
Member
Member
on

Hi. I'm Yuan.

 

I would like to ask help on how to change the Current GPS Time of Week.

I was able to change and save the Initial GPS Time of Week and Current GPS Time of Week.

However, if I run the VI, the Current GPS Time of Week always goes back to the default value

which is 345600.0000

 

I'm very much new to LabVIEW, so this might sound stupid,

but your help will be very much appreciated.

 

I am using LabVIEW 2019-32bit.

 

82517_GPSSimulation.png

opelo
Member
Member
on

Hello, my final year project is to build a GPS receiver using the NI 2920 and what I know is that the 2920 is not GPS disciplined. For that, I will need an external reference clock, from the data sheet I saw that 2920 used TXCO however OCXO comes highly recommended, is it possible to connect an OCXO to the RefIn port in front of the  USRP 2920? should I use an active antenna like VERT 900 or buy GPS antenna? Second question is how much attenuation shouLd I use between the active antenna and the USRP 2920?

anhduy92
Member
Member
on

Dear @ErikL

I am trying to simulate a L1 GPS signal using the open source code https://github.com/osqzss/gps-sdr-sim with NI-USRP 2932. 

And referring your comment (https://forums.ni.com/t5/Software-Defined-Radio/GPS-Simulation-with-NI-USRP-and-LabVIEW/tac-p/353542...), I have some questions:
1. Could you give me the suitable value of LO frequency? I set the carrier frequency at 1575.42MHz and the LO frequency = 1575.42MHz + 20MHz. I am not sure this value is OK or not. Do you have any rules to calculate the LO frequency for this case?

2. About the Reference Frequency Source and the Timebase Clock Source, I select GPS as input. I do not have any antenna connecting to the SMA RF connector on the back of the USRP. Is it ok?

3. About the RENIX file, I download the newest one from here https://cddis.nasa.gov/archive/gnss/data/daily/2023/ . Do I need to set the Start scenario time matched to the time in the RENIX file? Are there any notices about the RENIX file?

---

I am very new with GPS signal so I hope I could obtain some valuable advice from you.

 

Thank you in advance

Contributors