How to add gaussian noise to the 1D signal
Show older comments
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
Accepted Answer
More Answers (3)
Wayne King
on 21 Apr 2012
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
on 21 Apr 2012
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');
Junaid
on 21 Apr 2012
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.
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!