Package: comm
Add white Gaussian noise to input signal with GPU
The GPU AWGNChannel
object adds white Gaussian
noise to an input signal using a graphics processing unit (GPU).
Note: To use this object, you must install a Parallel Computing Toolbox™ license and have access to an appropriate GPU. For more about GPUs, see GPU Computing (Parallel Computing Toolbox) in the Parallel Computing Toolbox documentation. 
To add white Gaussian noise to an input signal:
Define and set up your additive white Gaussian noise channel object. See Construction.
Call step
to add white Gaussian
noise to the input signal according to the properties of comm.gpu.AWGNChannel
.
The behavior of step
is specific to each object
in the toolbox.
A GPUbased System object™ accepts typical MATLAB^{®} arrays or objects that you create using the gpuArray class as an input. GPUbased System objects support input signals with double or singleprecision data types. The output signal inherits its datatype from the input signal.
If the input signal is a MATLAB array, then the output signal is also a MATLAB array. In this case, the System object handles data transfer between the CPU and GPU.
If the input signal is a gpuArray, then the output signal is also a gpuArray. In this case, the data remains on the GPU. Therefore, when the object is given a gpuArray, calculations take place entirely on the GPU and no data transfer occurs. Passing gpuArray arguments provides increased performance by reducing simulation time. For more information, see Establish Arrays on a GPU (Parallel Computing Toolbox) in the Parallel Computing Toolbox documentation.
Note:
Starting in R2016b, instead of using the 
H = comm.gpu.AWGNChannel
creates a GPUbased
additive white Gaussian noise (AWGN) channel System object, H
.
This object adds white Gaussian noise to a real or complex input signal.
H = comm.gpu.AWGNChannel(
creates
a GPUbased AWGN channel object, Name
,Value
)H
, with the
specified property name set to the specified value. You can specify
additional namevalue pair arguments in any order as (Name1,Value1,...,NameN,ValueN).
A GPUbased System object accepts typical MATLAB arrays or objects that you create using the gpuArray class as an input. GPUbased System objects support input signals with double or singleprecision data types. The output signal inherits its datatype from the input signal.
If the input signal is a MATLAB array, then the output signal is also a MATLAB array. In this case, the System object handles data transfer between the CPU and GPU.
If the input signal is a gpuArray, then the output signal is also a gpuArray. In this case, the data remains on the GPU. Therefore, when the object is given a gpuArray, calculations take place entirely on the GPU and no data transfer occurs. Passing gpuArray arguments provides increased performance by reducing simulation time. For more information, see Establish Arrays on a GPU (Parallel Computing Toolbox) in the Parallel Computing Toolbox documentation.

Method to specify noise level Select the method to specify the noise level as one of 

Energy per bit to noise power spectral density ratio (Eb/No) Specify the Eb/No ratio in decibels. Set this property to a
numeric, real scalar or row vector with a length equal to the number
of channels. This property applies when you set the 

Energy per symbol to noise power spectral density ratio (Es/No) Specify the Es/No ratio in decibels. Set this property to a
numeric, real scalar or row vector with a length equal to the number
of channels. This property applies when you set the 

Signal to noise ratio (SNR) Specify the SNR value in decibels. Set this property to a numeric,
real scalar or row vector with a length equal to the number of channels.
This property applies when you set the 

Number of bits in one symbol Specify the number of bits in each input symbol. You can set
this property to a numeric, positive, integer scalar or row vector
with a length equal to the number of channels. This property applies
when you set the 

Input signal power in Watts Specify the mean square power of the input signal in Watts.
Set this property to a numeric, positive, real scalar or row vector
with a length equal to the number of channels. This property applies
when you set the 

Number of samples per symbol Specify the number of samples per symbol. Set this property
to a numeric, positive, integer scalar or row vector with a length
equal to the number of channels. This property applies when you set
the 

Source of noise variance Specify the source of the noise variance as one of 

Noise variance Specify the variance of the white Gaussian noise. You can set
this property to a numeric, positive, real scalar or row vector with
a length equal to the number of channels. This property applies when
you set the 

Source of random number stream Specify the source of random number stream. The only valid setting
for this property is 

Initial seed of The GPU version of the AWGN Channel System object does not use this property. 
step  Add white Gaussian noise to input signal 
Common to All System Objects  

clone  Create System object with same property values 
getNumInputs  Expected number of inputs to a System object 
getNumOutputs  Expected number of outputs of a System object 
isLocked  Check locked states of a System object (logical) 
release  Allow System object property value changes 
This object uses the same algorithm as the comm.AWGNChannel
System object.
See the Algorithms section of the comm.AWGNChannel
help page
for more details. The object properties correspond to the related
block parameters, except that:
This object uses parallel.gpu.RandStream
to
provide an interface for controlling the properties of one or more
random number streams that the GPU uses. Usage is the same as RandStream
with
the following restrictions:
Only the combRecursive
(MRG32K3A)
generator is supported.
Only the Inversion
normal transform
is supported.
Setting the substream
property
is not allowed.
Enter help parallel.gpu.RandStream
at
the MATLAB command line for more information.