필터 지우기
필터 지우기

How can i compute standar noise deviation from SNR?

조회 수: 34 (최근 30일)
Mike
Mike 2012년 10월 21일
Hi,
i am wondering if there is any fixed function computing the standard noise deviation when the SNR is known.
Is there any available?
For instance, if we have:
SNR= 10 log ( ( S^2) / noise_StdDev ^ 2 ), how could i find the noise_StdDev var?
(The obvious way is to solve the above equation and find the solution for noise_StdDev var)
Thank you in advance.

답변 (3개)

Image Analyst
Image Analyst 2012년 10월 21일
Your formula doesn't look right - and it's not only because of the extra right parenthesis. Variance is already a second order term and you're squaring it. Anyway, assuming you use the correct formula, what's wrong with finding noise variance or standard deviation that way?
  댓글 수: 3
Image Analyst
Image Analyst 2012년 10월 21일
Uh yeah, but it's still wrong. It should be noise_StdDev, not noise_var, or else have just noise_var, not noise_var^2. No function I know of since to do that, since it's just simple math, assuming you know your signal exactly.
Mike
Mike 2012년 10월 21일
You are right again. I intended to write standard deviation and i wrote variance. Thank you again.

댓글을 달려면 로그인하십시오.


Wayne King
Wayne King 2012년 10월 21일
편집: Wayne King 2012년 10월 21일
Hi Mike, in general this will be very hard since you don't know the signal power. However, depending on what model you can assume for your data, you may be able to do it.
A simple example would be a single sine wave in noise.
Fs = 1000;
t = 0:0.001:1-0.001;
rng default; % just for reproducible results
x = cos(2*pi*100*t)+0.5*randn(size(t));
In the above the noise variance is 0.25. You can get close to that with
psdest = psd(spectrum.periodogram,x,'NFFT',length(x),'Fs',1000);
% compute average power but you have to avoid the signal at 100 Hz
noisevar = avgpower(psdest,[0 98])+avgpower(psdest,[102 500]);
In this example (with rng default), the noise variance is estimated at 0.2489, a good approximation.
Another example: Assume you have an AR(2) process.
A2 = [1 -0.75 0.5];
rng default;
y = filter(1,A2,0.75*randn(1000,1)); % variance is 0.75^2
Now use arburg() to estimate the AR coefficients and noise variance.
[A,E] = arburg(y,2);
The answer here is 0.5583, very close to 0.75^2.
So, I think you can do pretty well with the very important caveat that you have to have a good model for your signal.
  댓글 수: 2
Wayne King
Wayne King 2012년 10월 21일
Image Analyst is correct that you should not be squaring variance. You probably want to edit that to be noise_std.
Mike
Mike 2012년 10월 21일
Thank you for your quotes.

댓글을 달려면 로그인하십시오.


Mike
Mike 2012년 10월 22일
According to my calculations, if we solve this equation: SNR = 10 log ( ( S^2) / noise_StdDev ^ 2 ) by noise_StdDev the result is:
noise_StdDev = S / (10 ^ (SNR/20)). Am i wrong?
Also, the above SNR equation can be written as below:
SNR= 20 log ( ( S) / noise_StdDev )
But on this wiki link: http://en.wikipedia.org/wiki/Signal-to-noise_ratio there is another SNR equation:
SNR(db)= 20logB10 (A_signal/A_noise), where B10: base 10 of the log.
I am a little confused as on my SNR equation on the denominator i use the noise's standar deviation, but on the wiki SNR equation it is used as denominator the Amplitude of the noise. Can anyone explain me more??
---
Then, on the wiki link i posted above, i see another SNR equation:
SNR = μ / σ , where σ: is the standard deviation of the noise, μ: is the signal mean
Which of all the above equations should i use??
Thank you in advance.
  댓글 수: 1
Image Analyst
Image Analyst 2012년 10월 22일
I guess it depends on how you want to use it. I usually use the mean/std.dev formula. What are you planning to do with the number once you have it, regardless of how you arrive at it? Does it really matter which method you use? If not, just pick one and go with it.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by