How can i compute standar noise deviation from SNR?

42 views (last 30 days)
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.

Answers (3)

Image Analyst
Image Analyst on 21 Oct 2012
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 Comments
Image Analyst
Image Analyst on 21 Oct 2012
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 on 21 Oct 2012
You are right again. I intended to write standard deviation and i wrote variance. Thank you again.

Sign in to comment.


Wayne King
Wayne King on 21 Oct 2012
Edited: Wayne King on 21 Oct 2012
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 Comments
Wayne King
Wayne King on 21 Oct 2012
Image Analyst is correct that you should not be squaring variance. You probably want to edit that to be noise_std.

Sign in to comment.


Mike
Mike on 22 Oct 2012
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 Comment
Image Analyst
Image Analyst on 22 Oct 2012
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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!