exp
Full Member level 1
- Joined
- Jan 28, 2013
- Messages
- 97
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 2,570
Hi,
I am confused about the definition of SNR/SQNR.
Let's take for example the SQNR. With an amplitude of FSR/2, this results in the famous forumula 6.02*N+1.76. However, this formula requires that the signal power is defined as 0.5*A^2, which is definitely the case the definition of signal power for a sine wave.
However, when I have the FFT of a sampled signal (cosine with amplitude 1), the SNR is usually calculated as follows:
In this case, Psig is clearly "1" and not 0.5!
This also makes sense because by reading out the signal bin and multiplying by two (accounting for complex mirrors) gives the amplitude and not the power!
So where is the inconsistency here? In one case I assume a signal power of 1, in the other case 0.5 ...
This results in inconsistencies when I need for example calculate the variance of electronic noise from an FFT spectrum and remove the SQNR part (knowing it is quantized by N bit). In this case, I calculate the SNR using Psig (as per above) but SQNR using Psig=0.5. When calculating the variance of the electronic noise, shall I take Psig=1 or Psig=0.5 then?
Thanks
I am confused about the definition of SNR/SQNR.
Let's take for example the SQNR. With an amplitude of FSR/2, this results in the famous forumula 6.02*N+1.76. However, this formula requires that the signal power is defined as 0.5*A^2, which is definitely the case the definition of signal power for a sine wave.
However, when I have the FFT of a sampled signal (cosine with amplitude 1), the SNR is usually calculated as follows:
Code:
s = fft(signal)/(length(signal)/2);
signalbin = 128; % say, the pure sine signal is in bin 128
noise = s; noise(signalbin) = 0;
Psig = abs(s(signalbin)).^2;
Pnoise = sum(abs(noise).^2);
SNR = 10*log10(Psig/Pnoise)
In this case, Psig is clearly "1" and not 0.5!
This also makes sense because by reading out the signal bin and multiplying by two (accounting for complex mirrors) gives the amplitude and not the power!
So where is the inconsistency here? In one case I assume a signal power of 1, in the other case 0.5 ...
This results in inconsistencies when I need for example calculate the variance of electronic noise from an FFT spectrum and remove the SQNR part (knowing it is quantized by N bit). In this case, I calculate the SNR using Psig (as per above) but SQNR using Psig=0.5. When calculating the variance of the electronic noise, shall I take Psig=1 or Psig=0.5 then?
Thanks