Assuming correlation at 2X the chip rate (2046 chips per period) and 500 Hz frequency search bins.

There are probably additional variables here that I'm missing and I'm not sure how to quantify a good peak but.

I'm trying to determine how much amplification I need in my acquisition setup to get good correlation peaks when correlating over 1 C/A code period.

I'm using a ceramic patch + 33dB gain GPS antenna with a 3m RG174 coax + RTL-SDR v3 (7 bit ADC) with 49dB gain (I'm not sure both are probably actually less gain, I've no way to measure). The original data was sampled at 2.048MSps complex baseband.

I'm correlating in Octave with the signal re-sampled to 2.046MSps and using circular cross-correlation with the C/A code extended to be 2046 chips per period.

I'm only getting good correlation peaks over at least 5 periods for the strongest of signals and 10 or 20 periods for weaker ones. I also had to use 100Hz frequency bins, 500Hz was not enough to get good peaks.

I think my Octave script is fine, I've cross checked it with this script https://www.mathworks.com/matlabcentral/fileexchange/26035-joint-frequency-and-delay-correlation (feeding it my data) and the results are similar, I see a weak peak for the strongest signal in the recording.

joint frequency and delay correlation script's results over 1 C/A period

my script's results over 10 periods with 100Hz frequency bins

  • $\begingroup$ The search bin spacing sounds right to me (500 Hz) and as long as you are not saturating your receiver it sounds like plenty of gain-- what is the rms signal level at your input to the ADC and what would be the level of a sine wave at full scale? There are no labels on your lower plot so not sure what we are looking at, but as far as the upper plot the correlation peak should be easily much larger. $\endgroup$ – Dan Boschen Mar 15 at 23:23

Even if your amplified signal matched the quantization noise floor of the ADC (representing a 3 dB degradation) you would still achieve a significantly larger and clearer peak from what you are showing.

The search bin size for 1 C/A code duration of 500 Hz is a good choice for the largest step (since the correlation versus frequency offset would follow a Sinc function response with the first null at $1/T$ where here $T$ is 1 ms, so the correlation would go to zero with a 1 KHz offset from true frequency.

With a 1 C/A code duration you can expect a processing gain of 30 dB ($10Log_{10}(1023)$) and the unspread GPS signal itself can be anywhere from -23 dB to -15 dB below the noise floor typically within the 1 MHz bandwidth of the main lobe of the GPS Signal. (You can measure your post correlation SNR by to see if it is in the ballpark of these levels plus the processing gain).

As for gain, the quantization noise of the ADC can be approximated by being 6 dB/bit + 1.76 dB below the full scale level of a sine wave, and that quantization noise is the total noise power spread evenly across the Nyquist bandwidth. I typically amplify the signal so it is at least 10 dB above this noise level at the input to the ADC, resulting in a 0.4 dB noise figure from the quantization noise. The 0.4 dB quantity comes from the power sum of the two noises (amplified thermal noise as the received signal and quantization noise): $10Log_{10}(1+10^{d/10})$ where d is the delta in dB that the received signal is above the quantization noise.

So if you ADC starts clipping with a sine wave that is at 10 dBm (for example), then for a 7 bit ADC, the quantization noise will be at 6dB x 7 bits + 1.76 = 43.8 dB lower or -33.8 dBm, spread across +/-1.023 MHz in your case with a sampling rate of 2.046 MHz. So within the 1 MHz main lobe of the GPS signal, the quantization noise will be 3 dB lower (since 1 MHz is half of this ADC bandwdith), so that puts the quantization noise in band at -36.8 dBm.

The received signal assuming a front-end noise figure of 3 dB is -174 dBm/Hz (thermal noise floor) + 60 dB (1 MHz bandwidth) + 3 dB (noise figure) = -111 dBm (these are typical numbers, your mileage may vary).

So if we want to place the recieved signal to be 10 dB above the ADC quantization noise floor in order to minimize further SNR degradation while maintain as high of a dynamic range as possible (the typical trade space and why we don't want to apply too much gain--we get little in SNR improvement but lose our ability to handle stronger signals or interference) we would need to have the received signal that starts at -111 dBm amplified to be -36.8 dBm (quantization noise floor) + 10 dB = -26.8 dBm.

With all those assumptions, your recommended gain is 84 dB. This hopefully shows you how to determine it for your specific case.

| improve this answer | |
  • $\begingroup$ When you're talking about unspread GPS signal being -23dB below the noise floor, is this the noise floor prior to the amplification chain, caused by envirnmental EMI? And to get the spread level do I just subtract the processing gain from this? $\endgroup$ – axk Mar 17 at 23:14
  • 1
    $\begingroup$ @axk yes this would be the thermal noise floor. Under normal conditions in the GPS band that would be the dominant noise source in addition to self noise in the receiver (noise figure) unless there is an intentional jammer. Regulatory emission laws promote this but depends what you are operating near. $\endgroup$ – Dan Boschen Mar 17 at 23:17
  • 1
    $\begingroup$ @axk does this help? dsp.stackexchange.com/questions/38670/… $\endgroup$ – Dan Boschen Mar 18 at 19:23
  • 1
    $\begingroup$ @axk Why do you think you need to know the amplitude? Look at the formula for the correlation coefficient and how the result is scaled by the rms of the signal (so normalizes the amplitude) $\endgroup$ – Dan Boschen Mar 18 at 21:50
  • 1
    $\begingroup$ @axk complex signals but be sure to do a complex conjugate multiplication for complex signals. $\endgroup$ – Dan Boschen Mar 20 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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