Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Colored Noise

Generate colored noise signal

Library

Sources

dspsrcs4

Description

The Colored Noise block generates a colored noise signal with a power spectral density of 1/|f|α over its entire frequency range. The inverse power spectral density component, α, can be any value in the interval [-2 2]. The type of colored noise the block generates depends on the Noise color option you choose in the block dialog box. When you set Noise color to custom, you can specify the power density of the noise through the Power of inverse frequency parameter.

The size and data type properties of the generated signal are determined by the parameters set in the block dialog box.

Algorithms

This block brings the capabilities of the dsp.ColoredNoise System object™ to the Simulink® environment.

For information on the various colored noise processes, see the Definitions section of dsp.ColoredNoise. For information on the algorithm used by this block, see the Algorithms section of dsp.ColoredNoise.

Parameters

Noise color

Color of the noise the block generates. You can set this parameter to:

  • pink (default) — Generates pink noise. This option is equivalent to setting Power of inverse frequency to 1.

  • white — Generates white noise (flat power spectral density). This option is equivalent to setting Power of inverse frequency to 0.

  • brown — Generates brown noise. This option is equivalent to setting Power of inverse frequency to 2.

  • blue — Generates blue noise. This option is equivalent to setting Power of inverse frequency to -1.

  • purple — Generates violet (purple) noise. This option is equivalent to setting Power of inverse frequency to -2.

  • custom — Specify the power density of the noise through Power of inverse frequency.

Power of inverse frequency

Inverse power spectral density component, α, specified as a real scalar in the interval [-2 2]. The inverse exponent defines the power spectral density of the random process by 1/|f|α. The default value of this property is 1. When Power of inverse frequency is greater than 0, the block generates lowpass noise, with a singularity (pole) at f = 0. These processes exhibit long memory. When Power of inverse frequency is less than 0, the block generates highpass noise with negatively correlated increments. These processes are referred to as antipersistent. In a log-log plot of power as a function of frequency, processes generated by the Colored Noise block exhibit an approximate linear relationship, with the slope equal to –α.

This parameter applies when you set Noise color to custom.

Number of output channels

Number of output channels, specified as a positive integer scalar. This parameter defines the number of columns in the generated signal. The default is 1. This parameter is nontunable.

Output data type

Data type of the output. You can set this parameter to:

  • double (default)

  • single

This parameter is nontunable.

Number of samples per output channel

Number of samples in each frame of the output signal, specified as a positive integer scalar. This parameter defines the number of rows in the generated signal. The default is 1024. This parameter is nontunable.

Output sample time (s)

Sample time of the output signal, specified as a positive scalar in seconds. The default is 1. This parameter is nontunable.

Initial seed

Initial seed of the random number generator algorithm, specified as a real positive integer scalar. The default is 67. This parameter is nontunable.

Simulate using

Type of simulation to run. You can set this parameter to:

  • Interpreted execution (default)

    Simulate model using the MATLAB®  interpreter. This option shortens startup time.

  • Code generation

    Simulate model using generated C code. The first time you run a simulation, Simulink generates C code for the block. The C code is reused for subsequent simulations, as long as the model does not change. This option requires additional startup time.

Supported Data Types

PortSupported Data Types

Input

  • Double-precision floating point

  • Single-precision floating point

Output

  • Double-precision floating point

  • Single-precision floating point

References

[1] Beran, J., Feng, Y., Ghosh, S., and Kulik, R. Long-Memory Processes: Probabilistic Properties and Statistical Methods. Springer, 2013.

[2] Kasdin, N.J. "Discrete Simulation of Colored Noise and Stochastic Processes and 1/fα Power Law Noise Generation". Proceedings of the IEEE®. Vol. 83, No. 5, 1995, pp. 802–827.

See Also

dsp.ColoredNoiseDSP System Toolbox
randnDSP System Toolbox

Introduced in R2015a

Was this topic helpful?