I have an IF data, 2 seconds signal sample from only one GPS satellite, I know the PRN number of the satellite.

IF Freq = 4.092e6 Hz
Sampling Freq = 16.368e6 Hz
IF data length = 2 seconds
Total sample = 32.736e6

During the first second period, there is no noise, and SoftGNSS SDR can acquire and begin tracking the signal.

However, after 1 second, noise is bonded on the signal. The tracking function loses the signal mostly. The output has distortion a lot.

Here are the figures;

  1. IF signal enter image description here
  2. Tracking result enter image description here

The tracking ends at 1.3 seconds because I only process 1.3 seconds.

I tried to adjust DLL and PLL parameters (Damp. ratio, noise bandwidth), but no handle it. Maybe my parameters were wrong. Could you redirect me about it?

  • $\begingroup$ You’ll need to investigate the details of what is happening in the receiver to introduce the noise like that; I don’t ThinkRF there really is any way to tell what is going on from the info you provided. Can you throw away the beginning part and see if the higher signal latter part tracks differently? (Just to confirm it is external noise added and not just a step change in receiver gain) $\endgroup$ Apr 24, 2021 at 16:22
  • $\begingroup$ It's an IF data file for SDR implementation. It's an evaluation data file for learners. This is the task to keep tracking the signal under noise conditions. When I throw away the beginning part, the SDR can not acquire the signal, so the tracking function is not started. $\endgroup$
    – Faruk UNAL
    Apr 24, 2021 at 18:49
  • $\begingroup$ ok I see- answered in more detail below $\endgroup$ Apr 24, 2021 at 22:47

2 Answers 2


Now that the OP has clarified in the comments that this is an IF file for beginners I understand the issue. The point is to not be able to demodulate or recognize the individual chips of the GPS PRN sequence, in fact in typical application the received signal on the surface of the earth can typically be -20 dB SNR (pre-correlation) meaning it is 100x lower than the power of the noise! There is no way in such a signal to recognize any such sequence. However by multiplying with the received signal once translated completely to baseband with an aligned PRN code (the GPS C/A code for a particular satellite of interest) and then summing the result over a complete 1023 chip symbol is a great demonstration of processing gain and spread-spectrum demodulation (whose intent is to "pull signals out of the noise").

I detail this in the slides copied below, starting with the sequence as transmitted from a GPS satellite, representing the phase of the 1575.42 MHz carrier going back and forth between 0 and 180 degrees according to the sign of the C/A code being transmitted. The GPS C/A code, unique to each satellite, repeats every 1023 chips as a pseudo-random sequence as a PRN symbol at a 1.023 MHz rate. After every 20 symbols the PRN can be completely inversed (multiply by -1) according to the sign of the data bit being transmitted from the satellite, meaning the satellite will send 20 symbols to send a data bit "1" or the same 20 symbols all inverted to send a data bit "0" and thus transmits a 50 bps data rate:

GPS Transmitted signal

Below is live data that I captured (using a Lecroy O-scope as the A/D converter hence shown in the graphic), translated to baseband (all carrier frequency and phase offsets removed) and aligned using acquisition techniques to be exactly in phase with the transmitted code which is also shown in red. The received captured data in blue for all intents and purposes appears to us a additive white Gaussian noise, yet the code sequence is part of that waveform and using correlation we can extract the symbols being transmitted from the satellite (you may think that you can recognize in parts the original PRN, but trust me, you cannot possibly!):

Captured Signal

A histogram of the actual captured waveform further confirms the appearance of Gaussian noise (and an FFT would confirm it is "white" over the sampling bandwidth used).


Here are the samples of the received signal on a complex IQ plot after being translated back to baseband and all carrier frequency and phase offsets removed. The red dots shown are all at the chip centers, which when transmitted at the satellite existing only at +1/-1 on the real axis. This plot shows the significance of the added noise to each of those samples, totally swamping out the actual chips that were transmitted.

IQ samples

But after doing a sliding correlation with the same reference C/A code, we are able to clearly make out the boundaries of each of the 1023 chip symbols, and their overall phase associated with the 50 bps data transmitted by the satellite. Each sudden peak below occurs when the received waveform (after having been translated to baseband with all carrier frequency and phase removed) aligns in time with the reference C/A code, which is slid past the received waveform and after every offset a new correlation is computed (cross correlation function of the received sequence with the C/A code). We can see how there are at least 20 symbols in a row before the entire sequence is inverted (to change the data in the satellite between 1 and 0).

PRN correlation

Hopefully this makes it all clearer that the intent of demodulation with GPS is nor to be able to extract what would appear to be a noise-free or even low noise C/A code itself, but operate at the symbol level after correlating with a received waveform where the C/A code is unrecognizably buried in the noise. The extracted C/A code symbols after correlation become the cleaner signal (at a much lower rate) with which to them perform typical receiver processing on. So the intent of tracking (and acquisition!) is to operate on post-correlation symbols in the latter low noise condition; the actual signals as received in practical application will never have the benefit of the high SNR as presented in the first half of the OP's waveform. Any solution that depends on such high SNR will therefore be flawed in its approach.

For further details of GPS and GPS acquisition in negative SNR condition, where some of these same figures are repeated, please see:

Auto-correlation of C/A code with 30dB noise

Phase transitions in GPS C/A signal

GPS Coarse Acquisition PRN Codes

GPS signal acquisition

GPS Receiver in Frequency Domain

Understanding time delay estimation for GPS?

Isn't Gardner's algorithm and Early-Late gate the same thing?

  • $\begingroup$ Thanks for this perfect explanation. I have tested a few methods after reading here on SoftGNSS but need improvement still, maybe I will customize it. My state is so similar with GPS signal acquisition. My IF sample is 4.092e6 and my sampling freq is 16.368e6. I would try your MATLAB functions for the noisy part to see the result, could you redirect me? My data in IF but your "fdcorr.m" requires baseband, do you suggest exp(2w) method for me also? $\endgroup$
    – Faruk UNAL
    Apr 25, 2021 at 12:12
  • $\begingroup$ Move you IF signal to baseband by multiplying by $e^{-j 2 \pi f_{if} t}$. $\endgroup$ Apr 25, 2021 at 12:20
  • $\begingroup$ I think you will learn a lot more if you don’t use my fdcorr function first as that condenses a lot of processing so that what is happening will no longer be clear- do the process of correlation step by step and use the rotation of correlation samples to detect frequency offset to drive the signal to zero frequency baseband (carrier recovery). Use and early and late correlator to drive time offset to zero (timing recovery) $\endgroup$ Apr 25, 2021 at 12:22

I learned the answer!

Because this noise is white noise, we need an average filter in the time domain as a pre-filtering method.

For my scenario, the receiver calculates I_P and Q_P values in an interval of 1 ms and sends the values to the discriminator. Because of the white noise, NCO is updated by the noisy values coming from the discriminator in each 1 ms interval.

As a solution, a pre-filter can be used to average the discriminator outputs over multiple integration times, e.g., 20 ms. So the input parameters of the NCO will be sent in longer intervals but more accurate(averaged). The receiver yields better results.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.