Add white Gaussian noise to input signal
Communications Toolbox / Channels
The AWGN Channel block adds white Gaussian noise to the input signal. It inherits the sample time from the input signal.
In — Input data signalInput data signal, specified as an NS-by-1 vector or an NS-by-NC matrix.
NS represents the number of samples in
the input signal. NC represents the number
of channels, as determined by the number of columns in the input signal matrix. Both
NS and
NC can be equal to 1.
The block adds frames of length-NS Gaussian noise to each of the NC channels, using a distinct random distribution per channel.
Data Types: double | single
Complex Number Support: Yes
Var — Variance of additive white Gaussian noiseVariance of additive white Gaussian noise, specified as a positive scalar or a 1-by-NC vector. NC represents the number of channels, as determined by the number of columns in the input signal matrix. For more information, see Specifying the Variance Directly or Indirectly.
To enable this port, set Mode to
Variance from port.
Data Types: double
Out — Output data signalOutput data signal for the AWGN channel, returned as a vector or matrix. The
datatype and dimensions of Out match those of the input signal,
In.
Initial seed — Noise generator initial seed67 (default) | positive scalar | vectorNoise generator initial seed, specified as a positive scalar or a 1-by-NC vector.
This block uses the Random Source block to generate noise. Random numbers are generated using the Ziggurat method (V5 RANDN algorithm). The block reuses the same initial seeds every time you rerun the simulation, so that this block outputs the same signal each time you run a simulation.
When the input signal is complex, the block creates random data as:
randData=randn(2*NS,NC)noise=randData(1:2:end) + 1i(randData(2:2:end))
You can specify different seed values for each DLL build.
Tunable: Yes
Mode — Variance modeSignal to noise ratio (Eb/No) (default) | Signal to noise ratio (Es/No) | Signal to noise ratio (SNR) | Variance from mask | Variance from portVariance mode, specified as Signal to noise ratio
(Eb/No), Signal to noise ratio (Es/No),
Signal to noise ratio (SNR), Variance from
mask, or Variance from port. For more
information, see Relationship Among Eb/No, Es/No, and SNR Modes and Specifying the Variance Directly or Indirectly.
Eb/No (dB) — Ratio of information bit energy per symbol to noise power spectral density10 (default) | scalar | vectorRatio of information bit energy per symbol to noise power spectral density in decibels, specified as a scalar or vector. The information bit energy is the magnitude without channel coding.
Tunable: Yes
To enable this parameter, set Mode to
Eb/No.
Es/No (dB) — Ratio of information symbol energy per symbol to noise power spectral density10 (default) | scalar | vectorRatio of information symbol energy per symbol to noise power spectral density in decibels, specified as a scalar or vector. The information bit energy is the magnitude without channel coding.
Tunable: Yes
To enable this parameter, set Mode to
Es/No.
SNR (dB) — Ratio of signal power to noise power10 (default) | scalar | vectorRatio of signal power to noise power in decibels, specified as a scalar or vector.
Tunable: Yes
To enable this parameter, set Mode to
SNR.
Number of bits per symbol — Number of bits in each input symbolNumber of bits in each input symbol, specified as a scalar or vector.
To enable this parameter, set Mode to
Eb/No.
Input signal power, referenced to 1 ohm (watts) — Mean square power of input1 (default) | scalar | vectorMean square power of the input in watts, specified as a scalar or vector.
When Mode is
Eb/No or Es/No, the
parameter is the mean square power of the input symbols.
When Mode is SNR, this
parameter is the mean square power of the input samples.
Tunable: Yes
To enable this parameter, set Mode to
Eb/No, Es/No, or
SNR.
Symbol period (s) — Duration of an information channel1 (default) | positive scalar | vectorDuration of an information channel symbol in seconds, specified as a positive scalar or vector. The duration of the information channel is measured without channel coding.
To enable this parameter, set Mode to
Eb/No or Es/No.
Variance — Variance of white Gaussian noise1 (default) | scalar | vectorVariance of the white Gaussian noise, specified as a scalar or vector. For more information, see Specifying the Variance Directly or Indirectly.
Tunable: Yes
To enable this parameter, set Mode to
Variance from mask.
Data Types |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
You can tune parameters in normal mode, accelerator mode, or rapid accelerator mode.
Unless otherwise indicated, parameters are nontunable.
For nontunable parameters, when you use the Simulink® Coder™ rapid simulation (RSIM) target to build an RSIM executable, you cannot change their values without recompiling the model.
If a parameter is tunable, you can change its value at any time. This is useful for Monte Carlo simulations in which you run the simulation multiple times (such as on multiple computers) with different amounts of noise.
For uncoded complex input signals, the AWGN Channel block relates Eb/N0, Es/N0, and SNR according to these equations:
Es/N0 = (Tsym/Tsamp) · SNR
Es/N0 = Eb/N0 + 10log10(k) in dB
Es represents the signal energy in joules.
Eb represents the bit energy in joules.
N0 represents the noise power spectral density in watts/Hz.
Tsym represents the Symbol period (s) parameter of the block in Es/No mode.
k represents the number of information bits per input symbol, Number of bits per symbol.
Tsamp represents the inherited sample time of the block, in seconds.
For real signal inputs, the AWGN Channel block relates Es/N0 and SNR according to this equation:
Es/N0 = 0.5 (Tsym/Tsamp) · SNR
Note
All values of power assume a nominal impedance of 1 ohm.
The equation for the real case differs from the corresponding equation for the complex case by a factor of 2. Specifically, the object uses a noise power spectral density of N0/2 watts/Hz for real input signals, versus N0 watts/Hz for complex signals.
For more information, see AWGN Channel Noise Level.
To directly specify the variance of the noise generated by AWGN Channel, specify the Mode as:
Variance from mask, where you specify the variance in
the dialog box. The value must be positive.
Variance from port, where you provide the variance as
an input to the block. The variance input must be positive, and its sampling rate must
equal that of the input signal.
For Variance from mask and Variance
from port mode:
If the variance is a scalar, then all signal channels are uncorrelated but share the same variance.
If the variance is a vector whose length is the number of channels in the input signal, then each element represents the variance of the corresponding signal channel.
Note
If you apply complex input signals to the AWGN Channel block, then it adds complex zero-mean Gaussian noise with the calculated or specified variance. The variance for each quadrature component of the complex noise is half of the calculated or specified value.
To specify the variance indirectly, that is, to have the block calculate the variance, specify the Mode as:
Signal to noise ratio (Eb/No), where the block
calculates the variance from these quantities that you specify in the dialog box:
Eb/No (dB), the ratio of bit energy to noise power spectral density
Input signal power, referenced to 1 ohm (watts), the actual power of the symbols at the input of the block
Signal to noise ratio (Es/No), where the block
calculates the variance from these quantities that you specify in the dialog box:
Es/No (dB), the ratio of signal energy to noise power spectral density
Input signal power, referenced to 1 ohm (watts), the actual power of the symbols at the input of the block
Signal to noise ratio (SNR), where the block calculates
the variance from these quantities that you specify in the dialog box:
SNR (dB), the ratio of signal power to noise power
Input signal power, referenced to 1 ohm (watts), the actual power of the samples at the input of the block
Changing the symbol period in the AWGN Channel block affects the variance of the noise added per sample, which also causes a change in the final error rate.
Tip
Select the symbol period equal to the symbol period of the model. The value depends on what constitutes a symbol and what the oversampling applied to it is. For example, a symbol could have 3 bits and be oversampled by 4. For more information, see AWGN Channel Noise Level.
[1] Proakis, John G. Digital Communications. 4th Ed. McGraw-Hill, 2001.
