DSPRelated.com
Forums

Noisex-92 noises db: how to use it

Started by DWT February 2, 2009
Hi there,

I've downloaded Noisex-92 (Matlab M) files from:
http://spib.rice.edu/spib/select_noise.html

How can I add this noise with the desired SNR (0-20dB) to the signal in
Matlab?

Thanks


I am not sure what you are having a problem with.

For the MATLAB formatted data (a compressed '.mat' file):
Download the zipped noise file ex: 'white.mat.gz'. Note that the
sample rate (19.98 KHz) may not be what you want; that is a separate
issue you may have to deal with.  Unzip the 'gz' file to get
'white.mat'.  In your MATLAB '.m' file use the command 'load
white.mat'.  Check the new variables (type 'whos' in MATLAB at
prompt). You will have created an array 'white' of noise that you can
use in your MATLAB script.

Scale the part of the data you want to use and add it to your signal
to get the desired SNR.  Is how to scale the noise the problem?

Dirk

DWT wrote:
> Hi there, > > I've downloaded Noisex-92 (Matlab M) files from: > http://spib.rice.edu/spib/select_noise.html > > How can I add this noise with the desired SNR (0-20dB) to the signal in > Matlab? > > Thanks
Hi Dirk,

Thanks for the prompt reply.

I've loaded the factory1.mat into Matlab.

Yeah, the problem is how to scale this noise. E.g. I've the original
signal x <70000x1>, the factory <4699904x1>.

I know how to add the noise to signal x(1:70000)+factory1(1:70000), but I
have no idea how to get the desired input SNR of 20,15,10...db

Thanks,
Serge

>Scale the part of the data you want to use and add it to your signal >to get the desired SNR. Is how to scale the noise the problem? > >Dirk >
DTW,

You need to decide what is a meaningful definition of SNR for your
application.

Obviously one definition is, for y(n)=x(n)+factory(n):

SNR(y)=10*log10( sum( x(n)^2) / sum ( factory(n)^2) ) but, depending
on x(n) and factory(n), this may not give you a meaningful result.

If x(n) has long periods of silence and infrequent periods of a larger
signal of interest, and the factory noise is essentailly constant
power, the SNR(y) number you get with the equation above is not
representative of the SNR when the larger signal of interest is
present.  It would be too dependent on how much of x(n) (duration) has
signal of interest. Not a real useful definition for the described x
(n).

Similar problems arise if the signal of interest can be low level on
some intervals and a high level on other intervals, while the factory
noise level is essentially constant.  The SNR over the two intervals
will not be the same, while I think you want one SNR to describe the
whole signal y(n).

You can see the problem. So again, you need to decide what is a
meaningful definition of SNR for your application.

Dirk


DWT wrote:
> Hi Dirk, > > Thanks for the prompt reply. > > I've loaded the factory1.mat into Matlab. > > Yeah, the problem is how to scale this noise. E.g. I've the original > signal x <70000x1>, the factory <4699904x1>. > > I know how to add the noise to signal x(1:70000)+factory1(1:70000), but I > have no idea how to get the desired input SNR of 20,15,10...db > > Thanks, > Serge > > >Scale the part of the data you want to use and add it to your signal > >to get the desired SNR. Is how to scale the noise the problem? > > > >Dirk > >
>DTW, > >You need to decide what is a meaningful definition of SNR for your >application. > >Obviously one definition is, for y(n)=x(n)+factory(n): > >SNR(y)=10*log10( sum( x(n)^2) / sum ( factory(n)^2) ) but, depending >on x(n) and factory(n), this may not give you a meaningful result. > >Similar problems arise if the signal of interest can be low level on >some intervals and a high level on other intervals, while the factory >noise level is essentially constant. The SNR over the two intervals >will not be the same, while I think you want one SNR to describe the >whole signal y(n). >Dirk
Dirk, Thanks a lot for the explanation. It helps a lot! Serge