Generate colored noise signal
DSP System Toolbox / Sources
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]. 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
Port_1— Colored noise signal
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.
Noise color— Color of the generated noise
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
white — Generates white
noise (flat power spectral density). This option is equivalent
to setting Power of inverse frequency to
brown — Generates brown
noise. Also known as red or Brownian noise. This option is
equivalent to setting Power of inverse
blue — Generates blue noise.
Also known as azure noise. This option is equivalent to setting
Power of inverse frequency to
purple — Generates violet
(purple) noise. This option is equivalent to setting
Power of inverse frequency to
custom — Specify the power
density of the noise using the Power of inverse
Power of inverse frequency— Inverse power spectral density component
1(default) | scalar in the range
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
= 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 –α.
To enable this parameter, set Noise color to
Number of output channels— Number of output channels
1(default) | positive integer
Number of output channels, specified as a positive integer scalar. This parameter defines the number of columns in the generated signal.
Output data type— Output data type
Data type of the output specified as
Number of samples per output channel— Samples per frame of output
1024(default) | positive integer
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.
Output sample time (s)— Sample time of the output
1(default) | positive scalar
Sample time of the output signal, specified as a positive scalar in seconds.
Initial seed— Initial seed of random number generator
67(default) | positive integer
Initial seed of the random number generator algorithm, specified as a real-valued positive integer scalar.
Simulate using— Type of simulation to run
Interpreted execution(default) |
Type of simulation to run. You can set this parameter to:
Simulate model using the MATLAB® interpreter. This option shortens startup time.
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.
This block brings the capabilities of the
object™ to the Simulink environment.
For information on the various colored noise processes, see the Definitions section of
For information on the algorithm used by this block, see the Algorithms section of
 Beran, J., Feng, Y., Ghosh, S., and Kulik, R. Long-Memory Processes: Probabilistic Properties and Statistical Methods. Springer, 2013.
 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.