Gaussian Noise Generator

(Has been removed) Generate Gaussian distributed noise with given mean and variance values

Gaussian Noise Generator has been removed. Use the MATLAB Function (Simulink) block and randn function instead.

Library

Noise Generators sublibrary of Comm Sources

  • Gaussian Noise Generator block

Description

The Gaussian Noise Generator block generates discrete-time white Gaussian noise. You must specify the Initial seed vector in the simulation.

The Mean Value and the Variance can be either scalars or vectors. If either of these is a scalar, then the block applies the same value to each element of a sample-based output or each column of a frame-based output. Individual elements or columns, respectively, are uncorrelated with each other.

When the Variance is a vector, its length must be the same as that of the Initial seed vector. In this case, the covariance matrix is a diagonal matrix whose diagonal elements come from the Variance vector. Since the off-diagonal elements are zero, the output Gaussian random variables are uncorrelated.

When the Variance is a square matrix, it represents the covariance matrix. Its off-diagonal elements are the correlations between pairs of output Gaussian random variables. In this case, the Variance matrix must be positive definite, and it must be N-by-N, where N is the length of the Initial seed.

The probability density function of n-dimensional Gaussian noise is

f(x)=((2π)ndetK)1/2exp((xμ)TK1(xμ)/2)

where x is a length-n vector, K is the n-by-n covariance matrix, µ is the mean value vector, and the superscript T indicates matrix transpose.

Initial Seed

The Initial seed parameter initializes the random number generator that the Gaussian Noise Generator block uses to add noise to the input signal. When multiple blocks in a model have the Initial seed parameter, you can choose different initial seeds for each block to ensure different random streams are used in each block. Set Initial seed to an integer value for repeatable results or use the randi function to randomize your results.

Attributes of Output Signal

The output signal can be a frame-based matrix, a sample-based row or column vector, or a sample-based one-dimensional array. These attributes are controlled by the Frame-based outputs, Samples per frame, and Interpret vector parameters as 1-D parameters. For additional information, see Sources and Sinks.

If the Initial seed parameter is a vector, then its length becomes the number of columns in a frame-based output or the number of elements in a sample-based vector output. In this case, the shape (row or column) of the Initial seed parameter becomes the shape of a sample-based two-dimensional output signal. If the Initial seed parameter is a scalar but either the Mean value or Variance parameter is a vector, then the vector length determines the output attributes mentioned above.

Parameters

Mean value

The mean value of the random variable output.

Variance

The covariance among the output random variables.

Initial seed

The initial seed value for the random number generator.

Sample time

The period of each sample-based vector or each row of a frame-based matrix.

Frame-based outputs

Determines whether the output is frame-based or sample-based. This box is active only if Interpret vector parameters as 1-D is unchecked.

Samples per frame

The number of samples in each column of a frame-based output signal. This field is active only if Frame-based outputs is checked.

Interpret vector parameters as 1-D

If this box is checked, then the output is a one-dimensional signal. Otherwise, the output is a two-dimensional signal. This box is active only if Frame-based outputs is unchecked.

Output data type

The output can be set to double or single data types.

See Also

Blocks

Functions

Introduced before R2006a