awgn
Add white Gaussian noise to signal
Syntax
Description
adds white Gaussian noise to the vector signaly
= awgn(x
,snr
)x
. This syntax assumes that the power ofx
is 0 dBW. For more information about additive white Gaussian noise, seeWhat is AWGN?
accepts an input signal power value in dBW. To measure the power ofy
= awgn(x
,snr
,signalpower
)x
before adding noise, specifysignalpower
as'measured'
. The'measured'
option does not generate the requested average SNR for repeatedawgn
function calls in a loop if the input signal power varies over time due to fading and the coherence time of the channel is larger than the input duration.
additionally accepts a random number stream object to generate normal random noise samples. For information about producing repeatable noise samples, seeTips.y
= awgn(x
,snr
,signalpower
,randobject
)
specifies a seed value for initializing the normal random number generator that is used to add white Gaussian noise to the input signal.y
= awgn(x
,snr
,signalpower
,seed
)
specifies the signal and noise power type asy
= awgn(___,powertype
)'dB'
or'linear'
in addition to the input arguments in any of the previous syntaxes. For information on the relationships between SNR and other measures of the relative power of the noise, such asEs/N0, andEb/N0, seeAWGN Channel Noise Level.
Examples
Input Arguments
Output Arguments
More About
Tips
For information on the relationships between SNR and other measures of the relative power of the noise, such asEs/N0, andEb/N0, seeAWGN Channel Noise Level.
To generate repeatable white Gaussian noise samples, do one of the following:
Use
rng
(seed
) before calling theawgn
function to generate repeatable random noise.Provide a static
seed
value as an input toawgn
.Use the
reset (RandStream)
function on therandobject
before passing it as an input toawgn
.Provide
randobject
in a known state as an input toawgn
. For more information, seeRandStream
.