Colored Noise

Generate colored noise signal

  • Library:
  • DSP System Toolbox / Sources

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.

Ports

Output

expand all

Colored noise output signal. The size and data type of the signal depend on the values of the Number of output channels, Number of samples per output channel, and Output data type parameters.

Data Types: single | double

Parameters

expand all

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

  • pink — 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. Also known as red or Brownian noise. This option is equivalent to setting Power of inverse frequency to 2.

  • blue — Generates blue noise. Also known as azure 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 using the Power of inverse frequency parameter.

Inverse power spectral density component, α, specified as a real-valued 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 –α.

Dependencies

To enable this parameter, set Noise color to custom.

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

Data type of the output specified as double or single.

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.

Sample time of the output signal, specified as a positive scalar in seconds.

Initial seed of the random number generator algorithm, specified as a real-valued positive integer scalar.

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

  • Interpreted execution

    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.

Block Characteristics

Data Types

double | single

Multidimensional Signals

No

Variable-Size Signals

No

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.

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.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

See Also

Functions

System Objects

Introduced in R2015a