How to add gaussian noise to the 1D signal

87 次查看(过去 30 天)
Hi everyone,
I want to add 10% Gaussian Noise to the 1D signal. I'm a bit confused with Gaussian Noise, AWGN, and WGN. But all what I want to do is to generate Gaussian Noise not others. For your help I'm very appreciate.
Thanks in advance, Lina

采纳的回答

MathWorks Support Team
Using functionality available in the Communications Toolbox™ software, a single call to the awgn function enables you to generate and add white Gaussian noise to your single- or multi-channel signal.
out = awgn(in,snr,signalpower)
accepts an input signal power value in dBW. To have the function measure the power of in before adding noise, specify signalpower as 'measured'.
The input argument snr expresses the ratio between the signal and noise powers, using units of dB by default. Regarding the 10% Gaussian noise power, we are interpreting this as signal power 1 and noise power 0.1, which results in a setting of 10 dB for the snr input to the awgn function. The AWGN Channel topic provides an overview of the AWGN channel and quantities used to describe the relative signal to noise power in MATLAB.
To clarify the distinction between Gaussian noise and white Gaussian noise, the Wikipedia Gaussian noise page states:
The probability density function of a Gaussian random variable is given by:
where z represents the grey level, μ the mean grey value and σ its standard deviation.[3]
A special case is White Gaussian noise, in which the values at any pair of times are identically distributed and statistically independent (and hence uncorrelated). In communication channel testing and modelling, Gaussian noise is used as additive white noise to generate additive white Gaussian noise.

更多回答(3 个)

Wayne King
Wayne King 2012-4-21
White just means that there is no correlation among the noise samples. This results in a flat power spectral density, hence the analogy with "white" light.
When you say that the amplitude of the white Gaussian noise is 0.1 with a signal amplitude of 1, I'm guessing you mean an SNR of 10.
Y = awgn(x,10,'measured','linear');
Otherwise, it really does not make sense to talk about the "amplitude" of WGN. You can basically say that most of the values are +/- 3 standard deviations, so if you set the standard deviation to 0.1/3, you would basically get a WGN sequence that varies from [-0.1, 0.1];
noise = 0.1/3*randn(size(t));
plot(noise);
So you could do:
x = cos(2*pi*100*t)+0.1/3*randn(size(t));

Wayne King
Wayne King 2012-4-21
t = 0:0.001:1;
x = cos(2*pi*100*t)+randn(size(t));
You have to specify what you mean by 10%. It would be better if you can translate this to the variance or the signal to noise ratio. I'm not sure what you mean by 10%.
The above is N(0,1) white Gaussian noise. To increase or decrease the variance multiply by the standard deviation. For example:
x = cos(2*pi*100*t)+sqrt(2)*randn(size(t));
Adds N(0,2) noise.
You can use awgn() easily if you know the SNR you want.
Add white Gaussian noise at a +2 dB SNR.
x = cos(2*pi*100*t);
y = awgn(x,2,'measured');
  1 个评论
lina
lina 2012-4-21
Hi Wayne,
thanks for your reply, 10% here means if the amplitude signal is 1 so the amplitude of gaussian noise is 0.1.
And from your explanation looks that it's the way how to generate the White gaussian noise. Could you help how to generate the Gaussian Noise? since in my understanding White gaussian noise and Gaussian Noise is different. For the WGN and AWGN these easily generate by WGN and AWGN function, but I don't know how to generate Gaussian Noise. Please correct me if I'm wrong.
Thanks
Lina

请先登录,再进行评论。


Junaid
Junaid 2012-4-21
Other then obove given solution, this might work..
Let say your 1D signal is H, then
GH = H.*fspecial('gaussian', size(H),0.1)
in place of 0.1 you can tune any value you like.

类别

Help CenterFile Exchange 中查找有关 Measurements and Feature Extraction 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by