FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6356 Discussions

SNR of a Quantized Signal using FFT

Altera_Forum
Honored Contributor II
1,312 Views

Hi all, 

I have a problem in the calculation of SNR. 

Sine wave is quantized and then I have calculated its SNR using FFT. The coherence condition with windowing as well is implemented to avoid leakage in the adjacent frequency bins. 

I am unable to calculate the SNR accurately with different resolution of quantizer (ADC). 

If I use a standard formula for quantization noise power (Q^2 / 12), the SNR corresponds with the theoretical formula of SNR (SNR = 6.02*NoOfBits + 1.76) but when I try to use my own calculated noise power, the SNR does not corresponds with the theoretical formula with different resolution. 

I think, I am not calculating the noise power in the correct way. I have considered the noise spectrum starting from 2nd bin to input bandwidth. 

By the way I am using the formula of SNR = 10*log10(RMS_of_Signal/Mean_of_RSS_of_Noise) 

Please help. 

/Iffe
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
551 Views

6.02*NoOfBits + 1.76 is the theoretical limit. many factors in the design and operating environment can reduce the SNR from this limit.. including improper heat dissipation, the signal source, reference voltage, poor layout, etc... check the spec sheets of the A/D and make sure you're doing your measurement/calculation properly: 

 

see http://www.cse.psu.edu/~chip/course/analog/lecture/sfdr1.pdf
0 Kudos
Altera_Forum
Honored Contributor II
551 Views

Hi Aekoski, 

Many thanks for your kind reply. 

Actually its a simulation and not practical verification at the moment. I tell you some more details. 

I am using "hann" window and it is giving me signal power in the three bins of FFT. I have scaled the FFT magnitude by dividing with N/2 (the value of the FFT is determined in this way) in order to compensate with the window effect. Also, it seems that power of signal is calculated in the right way and that is why when I use ideal quantization noise (Q^2/12), it gives me correct results of SNR. I have neglected the main lobe bins while calculating noise power. 

FFT size is 8192, window size is 8192 and quantizer resolution is 16 bits. Input frequency is 257 Hz and sampling frequency is 8192 Hz. About SNR formula you are absolutely right. Its my mistake in writing but what I did was actually with power and not with rms value. (Sorry) 

My simulation code is attached here with. Kindly have a look and do let me know if you can get some time. 

 

You can easily see that if I change the resolution the "SNR_byQuantizationFormula" gives the exact value while other gives not. 

I am anxiously waiting for your reply. 

 

/Iffe
0 Kudos
Altera_Forum
Honored Contributor II
551 Views

Hi Kaz, 

 

I could not follow your point. Can you explain a little bit more. I mean how to consider it. Is the noise power going to be calculated will be effected by this? 

 

/Iffe
0 Kudos
Altera_Forum
Honored Contributor II
551 Views

It might be more practical to rephrase above post from fft perspective: 

 

SNR = 6.02 * Bits + 1.76 + 10 Log ( M / 2 ) 

M = fft points 

 

In your case SNR will be: 

6.02*16 + 1.76 + 10log(8192/2) = 134.2dB 

 

This level is what you will see. 

 

However normalised SNR = above value minus effect of fft resolution. Thus normalised SNR becomes as you mentioned about theoretical floor. 

 

normalised SNR = SNR - 10log(M/2) 

 

Other factors to be considered: 

upsampling will also increase SNR due to spreading. FFT window is another factor that may mask the fft noise floor.
0 Kudos
Reply