The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Sep 11th, 2024, 6:18am
Pages: 1
Send Topic Print
How to calculate quantization noise from spectrum (Read 741 times)
Julian18
Community Member
***
Offline



Posts: 55

How to calculate quantization noise from spectrum
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
Back to top
 
 
View Profile   IP Logged
Julian18
Community Member
***
Offline



Posts: 55

Re: How to calculate quantization noise from spectrum
Reply #1 - Dec 18th, 2010, 2:24am
 
bump
Back to top
 
 
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: How to calculate quantization noise from spectrum
Reply #2 - 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
Back to top
 
 
View Profile   IP Logged
ontheverge
Junior Member
**
Offline



Posts: 31

Re: How to calculate quantization noise from spectrum
Reply #3 - 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)
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.