Forum Discussion
Altera_Forum
Honored Contributor
15 years agoHi 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