Author Topic: SDR as GPS emulator  (Read 1431 times)

0 Members and 1 Guest are viewing this topic.

Online tszabooTopic starter

  • Super Contributor
  • ***
  • Posts: 7602
  • Country: nl
  • Current job: ATEX product design
SDR as GPS emulator
« on: June 27, 2024, 12:49:29 pm »
I'm trying to evaluate a GPS receiver implementation. Basically to do some repeatable controlled measurements to be able to determine different parameters, like receiver sensitivity, current consumption and so on. I was under the impression that I would need a dedicated expensive box to create GPS signals, but apparently SDRs can do it nowadays.
This is for example an implementation of a GPS transmitter for the ADALM-PLUTO SDR, that I have:
https://github.com/Mictronics/pluto-gps-sim-win32
I'm trying to do conducted measurements, so wire the SDR into the GPS receiver, instead of an antenna.
https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/adalm-pluto.html

From what I can see, this SDR has a -80dBm to 0dBm transmit range. So the setup would only be a DC block, a fixed Attenuator of about -80dB, Some cables, and maybe a bandpass filter to filter out the out-of-band signals that might be coming from the SDR.

Is this really this simple? Am I missing something (it feels like it)? Did any of you have tried a test setup such as this?
The only potential issue that I see now is that the GPS receiver might store some data in flash that could change the results based on testing history, but I guess that can be circumvented by deleting it, using cold start or a good selection of the test setup. They also mention sometimes to replace the SDR's crystal with a TCXO.
« Last Edit: June 27, 2024, 01:03:52 pm by tszaboo »
 

Offline G0HZU

  • Super Contributor
  • ***
  • Posts: 3126
  • Country: gb
Re: SDR as GPS emulator
« Reply #1 on: June 27, 2024, 09:24:33 pm »
I think it can be done using GNU radio using a suitable SDR. Something like the Ettus USRP perhaps?

You will need a decent attenuator if you want to attenuate the signals down to really low levels. My sig gen goes down to nearly -140dBm. I'd also recommend you use decent quality coax cables to minimise leakage from the coax cables in your setup.

I've generated GPS signals in the past using an old Agilent vector sig gen. But this is an expensive solution compared to the SDR approach. It did work well though.
 

Online pdenisowski

  • Frequent Contributor
  • **
  • Posts: 809
  • Country: us
  • Product Management Engineer, Rohde & Schwarz
    • Test and Measurement Fundamentals Playlist on the R&S YouTube channel
Re: SDR as GPS emulator
« Reply #2 on: June 28, 2024, 02:58:11 am »
Speaking as someone who supported "dedicated, expensive" instruments to simulate GNSS:

If you just want to emulate signals from a single space vehicle (satellite) for things like receiver sensitivity testing, this isn't horribly hard to do.  If you need a position then you have to start simulating multiple SVs, and that can become complicated, especially if you want to do this over longer periods of time (since the SVs will "rise" and "set")

Conducted is the best way to go, otherwise a shield box is never a bad idea.  Getting the right power level at the receiver is a bit tricky sometimes - more is not necessarily better.

And yes, some receivers are a lot more picky than others with regards to "remembering" things that make simulation difficult.  Even a cold start will not clear certain parameters form some GNSS receivers.  In particular, some receivers are rather stubborn about not accepting almanac and other information with timestamps "before" the last (real) almanac it saw. 

I would definitely recommend having a golden receiver (i.e. a uBlox eval kit) to test your simulation before you try it with your receiver.  The uBlox (well, actually the u-Center software) will give you a LOT of information about what the receiver sees and is very helpful in troubleshooting.  If the uBlox won't sync with your simulation, good luck getting a "real" receiver to work.

Oh, and here is a hilarious (in my opinion) video of some of our GNSS developers spoofing a phone receiver so they could cheat at Pokemon go :)

Test and Measurement Fundamentals video series on the Rohde & Schwarz YouTube channel:  https://www.youtube.com/playlist?list=PLKxVoO5jUTlvsVtDcqrVn0ybqBVlLj2z8
 

Online tszabooTopic starter

  • Super Contributor
  • ***
  • Posts: 7602
  • Country: nl
  • Current job: ATEX product design
Re: SDR as GPS emulator
« Reply #3 on: June 28, 2024, 08:22:45 am »
I think it can be done using GNU radio using a suitable SDR. Something like the Ettus USRP perhaps?

You will need a decent attenuator if you want to attenuate the signals down to really low levels. My sig gen goes down to nearly -140dBm. I'd also recommend you use decent quality coax cables to minimise leakage from the coax cables in your setup.

I've generated GPS signals in the past using an old Agilent vector sig gen. But this is an expensive solution compared to the SDR approach. It did work well though.
I've got a bunch of minicircuits SMA attenuator, that should give me a total about 80-100dB attenuation. Also a BPF from them for the GPS signals. With the Pluto, it should be in down to -180dBm signal which I don't expect receivers to work anymore.

Speaking as someone who supported "dedicated, expensive" instruments to simulate GNSS:

If you just want to emulate signals from a single space vehicle (satellite) for things like receiver sensitivity testing, this isn't horribly hard to do.  If you need a position then you have to start simulating multiple SVs, and that can become complicated, especially if you want to do this over longer periods of time (since the SVs will "rise" and "set")

Conducted is the best way to go, otherwise a shield box is never a bad idea.  Getting the right power level at the receiver is a bit tricky sometimes - more is not necessarily better.

And yes, some receivers are a lot more picky than others with regards to "remembering" things that make simulation difficult.  Even a cold start will not clear certain parameters form some GNSS receivers.  In particular, some receivers are rather stubborn about not accepting almanac and other information with timestamps "before" the last (real) almanac it saw. 

I would definitely recommend having a golden receiver (i.e. a uBlox eval kit) to test your simulation before you try it with your receiver.  The uBlox (well, actually the u-Center software) will give you a LOT of information about what the receiver sees and is very helpful in troubleshooting.  If the uBlox won't sync with your simulation, good luck getting a "real" receiver to work.

Oh, and here is a hilarious (in my opinion) video of some of our GNSS developers spoofing a phone receiver so they could cheat at Pokemon go :)


I had the same thoughts, the plan is to use a ublox M8 (and M10 if I can find it anywhere in the office) to verify the setup is working, then do measurements of the DUT.
I would love to do these test with something like an SMW200 that has dedicated GPS software, but I know that there is no budget for that now.
 
The following users thanked this post: pdenisowski

Online pdenisowski

  • Frequent Contributor
  • **
  • Posts: 809
  • Country: us
  • Product Management Engineer, Rohde & Schwarz
    • Test and Measurement Fundamentals Playlist on the R&S YouTube channel
Re: SDR as GPS emulator
« Reply #4 on: June 28, 2024, 02:27:04 pm »
I would love to do these test with something like an SMW200 that has dedicated GPS software, but I know that there is no budget for that now.

We also support full GNSS simulation on the SMBV series, and simple receiver (1 space vehicle) testing via an ARB file on all of our other VSGs.

Here is my "non-goofy" demonstration of live hardware in the loop -- I fly a plane around in Xplane, and a plug-in feeds the location, speed, and attitude information to an SMBV, which generates a live GNSS constellation simulation the exact same position - i.e. an attached GPS receiver will "see" the satellites the same way as it would if it were attached to the moving plane.

Test and Measurement Fundamentals video series on the Rohde & Schwarz YouTube channel:  https://www.youtube.com/playlist?list=PLKxVoO5jUTlvsVtDcqrVn0ybqBVlLj2z8
 

Offline G0HZU

  • Super Contributor
  • ***
  • Posts: 3126
  • Country: gb
Re: SDR as GPS emulator
« Reply #5 on: June 29, 2024, 12:39:57 pm »
If leakage becomes a confusing/frustrating issue, one option you could try with the SDR is to upconvert the SDR output to the GPS frequency. This may seem a waste of time at first, but this would have much lower leakage (across your workroom) at the GPS frequency.

Otherwise, there could easily be significant leakage from the SDR chassis and this might be able to interfere with any GPS based devices for several metres or more.

If you upconvert from the SDR running at VHF, then it doesn't matter how leaky the SDR chassis is. Just run it at (say) -70dBm into a screened mixer and upconvert to GPS with the mixer and a sig gen and then attenuate down to a very low level with a well screened attenuator. Ideally, you would have to run the SDR and the sig gen from the same (accurate) 10MHz reference.
 

Online tszabooTopic starter

  • Super Contributor
  • ***
  • Posts: 7602
  • Country: nl
  • Current job: ATEX product design
Re: SDR as GPS emulator
« Reply #6 on: July 12, 2024, 11:25:48 am »
Ok, so I made this work - Once.
Connected 80dB attenuator, DC block, bandpass filter.
It took a bit of software shuffling, apparently it uses an old file format of GPS data, so I could make it work with some data from 2022. It was also not obvious at all, which data you need to download.
But I made the software work. Connected a spectrum analyzer, everything looked OK, got about 50C/No(dbHz) signal measured in ublox u-center, which is a strong GPS signal. Connected the GPS. Suddenly I was in Greece in 2022.

So I stopped the software, changed the attenuation value, and rerun.
No fix. OK, let's decrease the attenuation.
No Fix. Let's go to 0dBm.
No Fix. The 50C/No decreased to ~20 C/No
Then I noticed. When the software was starting, it outputs a very strong signal, not modulated, in band, that's almost 30-40 dB stronger than the GPS signals. So my working theory now is that the SDR blows up the LNA when starting, even with 80dB attenuation in front of it. >:(

« Last Edit: July 15, 2024, 09:12:21 am by tszaboo »
 
The following users thanked this post: pardo-bsso

Online tszabooTopic starter

  • Super Contributor
  • ***
  • Posts: 7602
  • Country: nl
  • Current job: ATEX product design
Re: SDR as GPS emulator
« Reply #7 on: July 12, 2024, 03:09:52 pm »
All right, I've come back to it, and seems to work now. Without any obvious change in the system.
Maybe the TCXO mod to the SDR that people talk about is necessary for reliable measurements.
Test Setup:
Pluto-SDR
Mini circuits BLK-89-S DC block
Mini circuits VAT-30A 30dB attenuator
Mini circuits VBF 1575 bandpass filter (I'm not sure if the DC block is necessary with this)
M-M Coax ~20cm
6dB resistive splitter I designed -> Spectrum analyzer
Mini circuits VAT-30A 30dB attenuator
Mini circuits VAT-20A 20dB attenuator
M-M Coax ~20cm
Mini circuits BLK-89-S DC block
uBlox EVK-M10 GNSS Evaluation kit.

Why two DC block? Because the GPS might output DC for active antenna, and the Pluto SDR, I don't know what it does on it's output. Total attenuation is -86dB, plus whatever the insertion loss of the DC block and coax cables are. 
By testing I've concluded that at -42dBm output setting on the SDR I still get GPS fix, and the C/No values are barely 32dBHz, which is the minimum according to ublox to get a fix. At -45dBm I don't get a fix for a long time.
-86-42 = -128dBm, datasheet value: -148dBm. How come it's so different? Well the datasheet value is "With a good External LNA", without any description, how much of the gain of that LNA is.  >:(
 

Offline Gribo

  • Frequent Contributor
  • **
  • Posts: 635
  • Country: ca
Re: SDR as GPS emulator
« Reply #8 on: July 12, 2024, 07:47:19 pm »
-128dBm is a good result for GPS receiver without LNA. Yes, GPS antenna LNAs are usually in the 15-20dB gain range. Do you get fixes reliably with higher output levels?
I am available for freelance work.
 

Online tszabooTopic starter

  • Super Contributor
  • ***
  • Posts: 7602
  • Country: nl
  • Current job: ATEX product design
Re: SDR as GPS emulator
« Reply #9 on: July 12, 2024, 10:51:34 pm »
-128dBm is a good result for GPS receiver without LNA. Yes, GPS antenna LNAs are usually in the 15-20dB gain range. Do you get fixes reliably with higher output levels?
I know, but a "good quality" in the datasheet, without clarification? I was assuming 20 dB. Though I've seen Taoglass antennas with almost 30dB gain.
I tried anywhere between -98 and -128dBm and I was getting fixes. With more dB, the more simulated satellite visible. Only GPS, no Glonas or any other satellite was simulated.
The fix was also fairly accurate, maybe 10m from the nominal values I gave the software which I didn't expect. So I gave 24N 38E as coordinates, and it gave me 23.9998, 37.9998 back on the receiver.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf