SDR as GPS emulator - Page 1
Forum section: electronics / rf-microwave

author: tszaboo
author_rank: Super Contributor
timestamp: June 27, 2024, 12:49:29 pm
content: 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-win32I'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.htmlFrom 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.

author: G0HZU
author_rank: Super Contributor
timestamp: June 27, 2024, 09:24:33 pm
content: 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.

author: pdenisowski
author_rank: Super Contributor
timestamp: June 28, 2024, 02:58:11 am
content: 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

author: tszaboo
author_rank: Super Contributor
timestamp: June 28, 2024, 08:22:45 am
content: Quote from: G0HZU on June 27, 2024, 09:24:33 pmI'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.Quote from: pdenisowski on June 28, 2024, 02:58:11 amI 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.

author: pdenisowski
author_rank: Super Contributor
timestamp: June 28, 2024, 02:27:04 pm
content: Quote from: tszaboo on June 28, 2024, 08:22:45 amWe 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.

author: G0HZU
author_rank: Super Contributor
timestamp: June 29, 2024, 12:39:57 pm
content: 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.

author: tszaboo
author_rank: Super Contributor
timestamp: July 12, 2024, 11:25:48 am
content: 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/NoThen 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.

author: tszaboo
author_rank: Super Contributor
timestamp: July 12, 2024, 03:09:52 pm
content: 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-SDRMini circuits BLK-89-S DC blockMini circuits VAT-30A 30dB attenuatorMini circuits VBF 1575 bandpass filter (I'm not sure if the DC block is necessary with this)M-M Coax ~20cm6dB resistive splitter I designed -> Spectrum analyzerMini circuits VAT-30A 30dB attenuatorMini circuits VAT-20A 20dB attenuatorM-M Coax ~20cmMini circuits BLK-89-S DC blockuBlox 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.

author: Gribo
author_rank: Frequent Contributor
timestamp: July 12, 2024, 07:47:19 pm
content: -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?

author: tszaboo
author_rank: Super Contributor
timestamp: July 12, 2024, 10:51:34 pm
content: Quote from: Gribo on July 12, 2024, 07:47:19 pmI 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.