I am using the following formula to calculate SNR of a real world complex baseband signal sampled at 1x Nyquist.

SNR      = Rxy(tm)^2 / [ Px*Py - Rxy(tm)^2 ]
SNR (dB) = 10*log10(SNR)


Rxy(tm) = peak of the cross correlation at time delay, tm 
Px = power in reference signal 
Py = power in received signal

I verified proper implementation of the formula using simulated real-valued and complex-valued signals with and without noise.

On real data the SNR estimates using the above formula are too low (by 10.0+ dB). I manually verified the actual SNR a few different ways. I used spectral analysis to visually measure the signal power to the noise floor. I also measured the signal power to noise power (when signal is off), and both of those techniques give me an answer closer to what I expect.

I am flummoxed as to why this equation is not working on real-world signals. Do I need to take the DC bias (mean of data) into account and add that back to the SNR estimate? If I do that then I get values closer to what I expect.

Reference: Formula came from Principles of Communications (Tranter, Ziemer) textbook

  • $\begingroup$ what does "peak of the cross-correlation at time delay, tm" mean? Sounds self-contradictory: either it's the peak, or it's at a fixed delay? $\endgroup$ – Marcus Müller Jul 23 '20 at 14:57
  • $\begingroup$ It is a single value at the time instant where the cross correlation is maximized. It is a peak. $\endgroup$ – BigBrownBear00 Jul 23 '20 at 15:00
  • $\begingroup$ OK; let's work with that then :) you your SNR, the product between the reference power and the received power makes no sense – that should simply be received power. $\endgroup$ – Marcus Müller Jul 23 '20 at 15:04
  • $\begingroup$ As I said, I didn't make up the formula. You can google the book and preview it on Amazon or Google Scholar to see details of derivation. $\endgroup$ – BigBrownBear00 Jul 23 '20 at 15:06
  • $\begingroup$ @MarcusMüller here is a link to the book. You can preview it and go to page 362: amazon.com/Principles-Communications-Rodger-Ziemer/dp/… $\endgroup$ – BigBrownBear00 Jul 23 '20 at 15:25

The peak of the cross correlation should be the transmit signal power times the channel's attenuation.

Realizing that, it's really just

\begin{align} \text{SNR} &= \frac{P_\text{signal}}{P_\text{noise}}\\ &= \frac{P_\text{signal}}{P_\text{received} - P_\text{signal}}\\ &= \frac{P_\text{tx}\cdot a_\text{channel}}{P_\text{received} - P_\text{tx}\cdot a_\text{channel}}\\ &= \frac{P_{crosscorr,max}}{P_\text{received}-P_{crosscorr,max}}, \end{align}

which is

=Rxy(tm)^2 / (Py-Rxy(tm)^2)

in your notation.

So, either that book is wrong or you're missing something there.

  • $\begingroup$ That results in a negative snr (linear) value b/c Rxy^2 is > Py $\endgroup$ – BigBrownBear00 Jul 23 '20 at 15:23
  • $\begingroup$ The peak of the cross correlation is not just the product of the transmit signal power and channel attenuation. You also have gain from the receiver. $\endgroup$ – BigBrownBear00 Jul 23 '20 at 15:30
  • $\begingroup$ that's part of my $a_\text{channel}$ (the channel goes end-to-end). You might be forgetting to normalize your received signal energy by the length if you get a crosscorrelation higher than the received signal. $\endgroup$ – Marcus Müller Jul 23 '20 at 16:58
  • $\begingroup$ I am dividing the received power (Py) by the number of samples in the power calculation. $\endgroup$ – BigBrownBear00 Jul 23 '20 at 17:14
  • $\begingroup$ I believe this formula will calculate the AC power, so for a 0 mean signal, this is valid. But for a real world signal the total power consists of DC + AC, so you need to add the mean of the received signal back in. Do you buy that? dsp.stackexchange.com/questions/38757/… $\endgroup$ – BigBrownBear00 Aug 13 '20 at 12:04

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.