The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design >> Mixed-Signal Design >> How to calculate quantization noise from spectrum
https://designers-guide.org/forum/YaBB.pl?num=1292591388

Message started by Julian18 on Dec 17th, 2010, 5:09am

Title: How to calculate quantization noise from spectrum
Post by Julian18 on Dec 17th, 2010, 5:09am

Hi all
   it is just a trivial question.
   How to compute quantization noise from its spectrum(from 0 to Nyquist frequency)?
   suppose in matlab I have a variable QN, which is my quantization noise. of course I can do this:
   
Quote:
QNP1=sum(QN.^2)/N   % where N is the number of point and assuming power of 2

suppose I also want to calculate that noise power from frequency domain. so

Quote:
s=abs(fft(QN));
s=(1:end/2)/N*2;  % use only [0, Nyquist frequency] portion, and then scale the spectrum;
QNP2=sum(s.^2)

but this time I always get two-fold the number i get from time domain calculate(QNP1). I know I must have done sth. very silly, so please help me figure it out!


Thanks

Julian

Title: Re: How to calculate quantization noise from spectrum
Post by Julian18 on Dec 18th, 2010, 2:24am

bump

Title: Re: How to calculate quantization noise from spectrum
Post by boe on Mar 3rd, 2011, 4:01am

Julian18,

You need to use the power over the full spectrum, i.e.

Code:
s=abs(fft(QN)) / N; % Scale
%s=(1:end/2)/N*2;  % use only [0, Nyquist frequency] portion, and then scale the spectrum;
QNP2=sum(s.^2)

B O E

Title: Re: How to calculate quantization noise from spectrum
Post by ontheverge on Mar 8th, 2011, 4:38pm

1. make sure coherent sampling
2. q_noise_tot = sum(10^(x/10))    % add up over all non-DC, non harmonic bins.   u can convert tot q noise by 10*log(q_noise_tot)

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.