The ColoredNoise
object generates pink noise
and other colored noise signals. The form of the PSD is 1/f^{α} with
the exponent, α, a real number in the interval [2,2].
To generate a colored noise signal:
Define and set up your colored noise generator. See Construction.
Call step
to generate the colored
noise signal according to the properties of dsp.ColoredNoise
.
The signal is an array with the number of rows given by the SamplesPerFrame
property.
The number of columns is given by the NumChannels
property.
Note:
Starting in R2016b, instead of using the 
cn = dsp.ColoredNoise
returns a colored
noise generator, cn
, with default settings. Calling step
with
the default property settings generates a pink noise signal.
cn = dsp.ColoredNoise('
returns a colored noise generator, PropertyName
',PropertyValue
,
...)cn
,
with each specified property set to the specified value.
cn = dsp.ColoredNoise(POW,SAMP,CHAN,
returns
a colored noise generator, 'PropertyName'
,PropertyValue
)cn
, with InverseFrequencyPower
equal
to POW
, SamplesPerFrame
equal
to SAMP
, and NumChannels
equal
to CHAN
. Other specified properties are set to
the specified values.

Noise color Specify the color of the noise as one of


Inverse PSD exponent Specify the inverse PSD exponent, α,
as a real number in the interval
This property is applicable only when In a loglog plot of power as a function of frequency, processes
generated by 

Number of output channels Specify the number of output channels as a positive integer. This property determines the number of columns of the signal. The default value of this property is 1. 

Samples per frame Specify the number of samples per frame as a positive integer. This property determines the number of rows of the signal. The default value of this property is 1024. 

Source of random number stream Specify the source of the random number stream as 

Initial seed Specify the initial seed of the mt19937ar random number generator
as a nonnegative integer. This property only applies when 

Output data type Specify the output data type as 
reset  Reset random number generator seed 
step  Generate colored noise 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 
dsp.ColoredNoise
generates colored noise using
a white noise input in an autoregressive model (AR) of order 63.
$$\sum _{k=0}^{63}{a}_{k}}y(nk)=w(n)$$
where a_{0}=1 and w(n) is a zeromean white noise process.
The AR coefficients for k≥1 are generated according to the following recursive formula with α the inverse PSD exponent
$${a}_{k}=(k1{\scriptscriptstyle \frac{\alpha}{2}})\frac{{a}_{k1}}{k}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}k=1,2,\dots $$
The AR method used in dsp.ColoredNoise
is detailed
on pp. 820–822 in [2].
[1] Beran, J., Feng, Y., Ghosh, S., and Kulik, R. LongMemory 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. 802827.