awgn
Add white Gaussian noise to signal
Syntax
Description
adds white Gaussian noise to the vector signal Y
= awgn(X
,snr
)X
. This syntax
assumes that the power of X
is 0 dBW. For more information about additive
white Gaussian noise, see What is AWGN?
accepts an input signal power value in dBW. To measure the power of Y
= awgn(X
,snr
,signalpower
)X
before adding
noise, specify signalpower
as
'measured'
. The 'measured'
option does not generate the
requested average SNR for repeated awgn
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, see Tips.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 as Y
= 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 as
Es/N0, and
Eb/N0, see
AWGN 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 as Es/N0, and Eb/N0, see AWGN 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
except when the input is adlarray
object.Use the
reset (RandStream)
function on therandobject
before passing it as an input toawgn
except when the input is adlarray
object.Provide
randobject
in a known state as an input toawgn
except when the input is adlarray
object. For more information, seeRandStream
.
To reproduce CPU random number streams on a GPU, the random number generator used on both must align. For more information, see Random Number Streams on a GPU (Parallel Computing Toolbox).