How to add gaussian noise to the 1D signal
86 views (last 30 days)
Show older comments
lina
on 21 Apr 2012
Answered: MathWorks Support Team
on 27 Jul 2021
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
0 Comments
Accepted Answer
MathWorks Support Team
on 27 Jul 2021
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:
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.
…
0 Comments
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));
0 Comments
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.
0 Comments
See Also
Categories
Find more on Measurements and Feature Extraction 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!