0

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

axk
  • 237
  • 1
  • 9
  • 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. – Dan Boschen Mar 15 '20 at 23:23

1 Answers1

2

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.

Dan Boschen
  • 50,942
  • 2
  • 57
  • 135
  • 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? – axk Mar 17 '20 at 23:14
  • 1
    @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. – Dan Boschen Mar 17 '20 at 23:17
  • How do I measure the post-correlation SNR? I think I understand what SNR is in general but in case of DSSS, de-spread C/A signal is not the same as correlation peaks, so I suppose after finding the time offset of the C/A code I should them be de-spreading it, but the signal will still be below the noise floor. ( I suppose at this point I should be reading up on DSSS in general, do you have any literature/articles to recommend?) – axk Mar 18 '20 at 19:19
  • 1
    @axk does this help? https://dsp.stackexchange.com/questions/38670/how-can-i-find-snr-peaq-and-odg-values-by-comparing-two-audios/38679#38679 – Dan Boschen Mar 18 '20 at 19:23
  • thanks! So after I have found the time offset I then need to somehow know the amplitude of the would-be noiseless version of the BPSK signal to calculate the correlation coefficient, but the amplitude is what I'm trying to estimate by calculating the SNR... – axk Mar 18 '20 at 21:19
  • 1
    @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) – Dan Boschen Mar 18 '20 at 21:50
  • Can I calculate the correlation coefficient based on complex baseband signals or do I need real passband signals? – axk Mar 19 '20 at 18:33
  • 1
    @axk complex signals but be sure to do a complex conjugate multiplication for complex signals. – Dan Boschen Mar 20 '20 at 13:24
  • Hi @DanBoschen, I don't think the 6dB/bit rule applies to signals that are below the thermal noise floor like GPS. Instead the "Van Vleck" relationship is applied. That gives a much smaller gain. So for 1-bit quantization we have a quantization loss od 2/pi=1.96dB, for 2 bits 0.55dB, for 3 bits 0.17dB and for 4 bits 0.05dB. Any more bits per sample don't increase the gain any more. See https://proceedings.allerton.csl.illinois.edu/media/files/0046.pdf – ZiglioUK Sep 29 '23 at 14:41
  • @ZiglioUK it wouldn’t be below the GPS signal but rel to a sine wave at full scale (at clipping for a sine wave which is 3 dB peak to avg). rx GPS has a much higher peak-avg as a AWGN signal (and that varies on how much it is filtered). If you determine where the GPS signal is relative to the full scale sine wave (rms to full scale) the results are closely predicted for bits higher than 3. (And not all that far off even for 1 bit in my own studies: see this analysis for AWGN signals: https://dsp.stackexchange.com/questions/86991/optimal-input-range-for-adc-with-specified-enob/86998#86998 ) – Dan Boschen Sep 30 '23 at 00:56