SIGNAL TO NOISE RATIO

Started by Arma Ann February 2, 2009
Hi All,

I have a set of noise data , x= [1 2 3 4 5 6 ].

I want to add additive white Gaussian noise to it using

g= x+ 0.5* rand(1,6)

How do i calculate the signal to noise ratio of this signal if the variance of the rand is 0.5.

I know the relationship between SNR and variance, mathematicallly and can implement that in MATLAB. Is there any function that can calculate that easily ?

The second scenario is that i have a signal

d= [ 5 6 7 8 9], no other information than the signal contains noise. How do i get the SNR of this signal.

Thanks,
Be careful. rand() is not a Gaussian, but uniformly distributed. You should
use randn().

SNR(g) = sum(x.*x) / var(g-x);

SNR(d) it is impossible to know it if you dont know anything about the
signal.

2009/1/30 Arma Ann

> Hi All,
>
> I have a set of noise data , x= [1 2 3 4 5 6 ].
>
> I want to add additive white Gaussian noise to it using
>
> g= x+ 0.5* rand(1,6)
>
> How do i calculate the signal to noise ratio of this signal if the variance
> of the rand is 0.5.
>
> I know the relationship between SNR and variance, mathematicallly and can
> implement that in MATLAB. Is there any function that can calculate that
> easily ?
>
> The second scenario is that i have a signal
>
> d= [ 5 6 7 8 9], no other information than the signal contains noise. How
> do i get the SNR of this signal.
>
> Thanks,
>
>
>
Hi,

You could try a diffrent approach. Why don't you add the gaussian noise with awgn() function. In this case you will specify the exact SNR you need.

On the other hand, SNR is very difficult to be calculated out of a noisy signal alone. But if you know the noisy signal, and in your case the initial signal you can obtain the noise. Then you calculate the power of the noisy signal, the power of the noise, divide them and then calculate the logaritm.

Paul

Hi All,
>
>I have a set of noise data , x= [1 2 3 4 5 6 ].
>
>I want to add additive white Gaussian noise to it using
>
>g= x+ 0.5* rand(1,6)
>
>How do i calculate the signal to noise ratio of this signal if the variance of the rand is 0.5.
>
>I know the relationship between SNR and variance, mathematicallly and can implement that in MATLAB. Is there any function that can calculate that easily ?
>
>The second scenario is that i have a signal
>
>d= [ 5 6 7 8 9], no other information than the signal contains noise. How do i get the SNR of this signal.
>
>Thanks,
you could use wavelets to analyse ur components and see which coefficients are more likely to belong to noise and which ones are more likely to be from a signal. Any signal must have a source and if you know approximately what your source is..you might be able to separate them.

Gluck
Shailen

To: m...From: a...@yahoo.comDate: Thu, 29 Jan 2009 16:55:56 -0800Subject: [matlab] SIGNAL TO NOISE RATIO

Hi All,I have a set of noise data , x= [1 2 3 4 5 6 ].I want to add additive white Gaussian noise to it using g= x+ 0.5* rand(1,6)How do i calculate the signal to noise ratio of this signal if the variance of the rand is 0.5. I know the relationship between SNR and variance, mathematicallly and can implement that in MATLAB. Is there any function that can calculate that easily ?The second scenario is that i have a signal d= [ 5 6 7 8 9], no other information than the signal contains noise. How do i get the SNR of this signal.Thanks,
you could use wavelets to analyse ur components and see which coefficients are more likely to belong to noise and which ones are more likely to be from a signal. Any signal must have a source and if you know approximately what your source is..you might be able to separate them.

Gluck
Shailen

To: m...From: a...@yahoo.comDate: Thu, 29 Jan 2009 16:55:56 -0800Subject: [matlab] SIGNAL TO NOISE RATIO

Hi All,I have a set of noise data , x= [1 2 3 4 5 6 ].I want to add additive white Gaussian noise to it using g= x+ 0.5* rand(1,6)How do i calculate the signal to noise ratio of this signal if the variance of the rand is 0.5. I know the relationship between SNR and variance, mathematicallly and can implement that in MATLAB. Is there any function that can calculate that easily ?The second scenario is that i have a signal d= [ 5 6 7 8 9], no other information than the signal contains noise. How do i get the SNR of this signal.Thanks,
Hi,

You could try a diffrent approach. Why don't you add the gaussian noise with awgn() function. In this case you will specify the exact SNR you need.

On the other hand, SNR is very difficult to be calculated out of a noisy signal alone. But if you know the noisy signal, and in your case the initial signal you can obtain the noise. Then you calculate the power of the noisy signal, the power of the noise, divide them and then calculate the logaritm.

Paul

Hi All,
>
>I have a set of noise data , x= [1 2 3 4 5 6 ].
>
>I want to add additive white Gaussian noise to it using
>
>g= x+ 0.5* rand(1,6)
>
>How do i calculate the signal to noise ratio of this signal if the variance of the rand is 0.5.
>
>I know the relationship between SNR and variance, mathematicallly and can implement that in MATLAB. Is there any function that can calculate that easily ?
>
>The second scenario is that i have a signal
>
>d= [ 5 6 7 8 9], no other information than the signal contains noise. How do i get the SNR of this signal.
>
>Thanks,
Be careful. rand() is not a Gaussian, but uniformly distributed. You should
use randn().

SNR(g) = sum(x.*x) / var(g-x);

SNR(d) it is impossible to know it if you dont know anything about the
signal.

2009/1/30 Arma Ann

> Hi All,
>
> I have a set of noise data , x= [1 2 3 4 5 6 ].
>
> I want to add additive white Gaussian noise to it using
>
> g= x+ 0.5* rand(1,6)
>
> How do i calculate the signal to noise ratio of this signal if the variance
> of the rand is 0.5.
>
> I know the relationship between SNR and variance, mathematicallly and can
> implement that in MATLAB. Is there any function that can calculate that
> easily ?
>
> The second scenario is that i have a signal
>
> d= [ 5 6 7 8 9], no other information than the signal contains noise. How
> do i get the SNR of this signal.
>
> Thanks,
>
>
>
Hi All,

I have a set of noise data , x= [1 2 3 4 5 6 ].

I want to add additive white Gaussian noise to it using

g= x+ 0.5* rand(1,6)

How do i calculate the signal to noise ratio of this signal if the variance of the rand is 0.5.

I know the relationship between SNR and variance, mathematicallly and can implement that in MATLAB. Is there any function that can calculate that easily ?

The second scenario is that i have a signal

d= [ 5 6 7 8 9], no other information than the signal contains noise. How do i get the SNR of this signal.

Thanks,