No shortcuts. Work for it.

Tag: FPGA-based GPS receiver

FPGA-based software GNSS receiver: Tracking issues (Progress Update 1)

Mini-update (01.10.2018): DATASET2** has 8 sample bits packed in bytes which the MATLAB receiver doesn’t like to deal with – even if you specify the data type as ubit1. Best way forward would be to write a script to separate out the bits and create a new data file. (I wrote a C-based converter to take hex values converts it to bits and stores it as individual samples in an int8 format. That seems to work with the receiver.)

My last post talked about how tracking occured periodically. After extensive debugging I found out that the input GPS signal data stream lost about 3 sample bits everytime I would switch between FIFOs (I have two FIFOs acting like ping-pong buffers). In retrospect it is probably not the way to design input buffer streams. Also the test bench I wrote for testing FIFOs would have never caught the problem/bug (now I know).

My new tracking plots look like this (Figure 1):


Figure 1: Tracking results

As you know ideally all the power should appear in the I arm only. This is not the case according to the results.


Figure 1: DLL and FLL discriminator errors

I implemented a Costas loop according to the design and parameters in Scott Gleason’s software receiver. The hardware accumulators pass the values to the microprocessor/ARM every 5ms for tracking loop corrections. So the update to the tracking loops occurs every 5ms or so. Changing filter constants didn’t help my case at all either.

As a different approach to this, I used a DMA to collect about 256 ms of 1-bit GPS data and processed it with various software receivers.

With Kai Borre’s receiver, it acquires the satellites but can’t track them. (I wonder if it is the data format… I do specifiy the data type to be ‘ubit1’ though.)

I tested with my own software receiver and observed the same results, can acquire but can’t track.

Figure 4 below are the ideal results… and Figure 5 is what happens when I process 1-bit GPS data with the same receiver.


Figure 4: Tracking result using Kai Borre’s software receiver (2-bit GPS signal) (DATASET1*)


Figure 5: Tracking result using Kai Borre’s software receiver (1-bit GPS signal) (DATASET2**)

I’m starting to think it is something to do with the dataset itself!

I found a 1-bit GPS dataset online here¬†(DATASET2**). The two software receivers behave similarly. Acquire but don’t track. I think there’s something I’m definitely missing… related to the format perhaps?

DATASET1* GPSdata-DiscreteComponents-fs38_192-if9_55.bin

DATASET2** see link.

DATASET3 (click to download from Google Drive)

[DATASET3 is a short 256ms long 1-bit GPS L1 dataset where each sample is of the type int8, sampling frequency: 16.368 MHz, IF: 4.092 MHz, satellites present: 1, 5, 11, 12, 17, 30]

DATASET4 (click to download from Google Drive)

[DATASET4 is a 500 ms long 1-bit GPS L1 dataset where each sample is of the type int8, sampling frequency: 16.368 MHz, IF: 4.092 MHz, satellites present: 1, 11, 14, 17, 19, 20, 22, 30]

Note: A big thank you to Michele Bavaro for taking interest and providing some suggestions that indeed helped me move ahead (onto the next problem!).



FPGA-based software GNSS receiver: Tracking issues

This post discusses the results of hardware acquisition and some of the current issues I’ve come during tracking of the acquired GNSS signals.

My focus has been implementation of a real-time software GNSS receiver using an FPGA.

My equipment setup is such that I have a GNSS simulator generating GPS signals which are fed into the RF front end. The digital GPS signals are now input to the FPGA development board and this is where all the processing is done in real-time.

I spent quite some designing the flow of data signals from the simulator to the FPGA platform. Extensive work was done by me to setup the interfaces and the protocols.

I’ve managed to complete the implementation of the acquisition module and have been successfully able to acquire satellites in real-time!

I do have a persistent tracking issue however…

Issue: Tracking occurs only at regular intervals for a short duration

Below are some figures showing tracking results.

  • Figure 1: Represents the correlation strength of the IP accumulator (Inphase-Prompt). Expectations are to have a high correlation strength throughout the tracking duration. High correlation however occurs only at certain intervals.

Figure 1

  • Figure 2: This plot compares all the accumulators (Combination of I & Q with Early, Prompt & Late). You immediately notice how all the peaks for all the accumulators occurs at the same time stamps.

Figure 2

  • Figure 3: Becomes more obvious with this plot that ALL the accumulators have high values at similar time intervals

Figure 3

  • Figure 4: This was an interesting plot! I basically zoomed in on the peaks to see what was going on. I noticed how the power would move from Late, Prompt to Early. Every single time. This was a noticeable trend at all the peaks.

Figure 4

The final figure (4) told me that the PRN in the input GPS signal and the one generated on the board do not align during tracking EXCEPT at those peaks.

I went back to check my PRN generators and they work as expected. So if it is not the local PRN signals then what could it be…

That shifted my attention towards the input GPS signal itself. The sampling frequency I used was 20 MHz but perhaps it is not exactly that number? I say this because according to the set sampling frequency, there are 20,000 samples per millisecond. But clearly the PRN in the input signal is shifting (from Late to Early). So does this mean the sampling frequency (aka number of samples per milliseconds) is shifting too? I’m doubting everything at the moment but if you’ve picked up any leads from the figures please let me know as I struggle on to fix it…

Email: surabhisgp [at] gmail [dot] com

© 2019

Theme by Anders NorenUp ↑