Covariance - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


DynamicSystems

  

Covariance

  

compute the output and state covariance of a linear system driven by white Gaussian noise inputs

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

Covariance(sys, Rw)

Covariance(sys, Rw, opts)

Parameters

sys

-

System; system object

Rw

-

Matrix; white Gaussian noise inputs intensities.

opts

-

(optional) equation(s) of the form option = value; specify options for the Covariance command

Options

• 

output = outcovar or statecovar or list of these names.

Specifies the returned values. By default, only the output covariance Matrix is returned. The state covariance Matrix is returned when sys is given in the state-space form. Otherwise, an empty Matrix is returned.

• 

checkstability = truefalse

True means check whether the system is stable; if it is not stable, an error occurs. False means skip the check. The default is true.

Description

• 

The Covariance command computes the steady-state output and state covariance of a linear system sys driven by white Gaussian noise inputs. In state-space form, this system is represented as:

  

x.=Ax+Bw

  

y=Cx+Dw

  

where: A ∈ ℝn×n, B ∈ ℝn×m, C ∈ ℝp×n, and D ∈ ℝp×m, and n, m, and p are the number of states, inputs and outputs of the linear system respectively.

  

The input disturbances w are zero-mean white Gaussian noise inputs with spectral densities or intensities Rw ∈ ℝm×m. In other words, the expected value of w is 𝔼wt=0 and its covariance matrix is 𝔼wt·wTt+τ=Rw·δτ where δ is the Dirac delta function. In the scalar case, Rw=σw2 or variance of the random process.

• 

The steady-state covariance matrix of the state x is Px ∈ ℝn×n. The state covariance matrix computed value is returned when sys is in the state-space form.

• 

The steady-state covariance matrix of the output y is Py ∈ ℝp×p. The output covariance Matrix is returned for any sys type.

• 

The covariance matrices are computed by solving the following equations:

Continuous-time system

  

A·Px+Px·AT+B·Rw·BT=0  (continuous Lyapunov equation)

  

Py=C·Px·CT+D·Rw·DT

Discrete-time system

  

Px=A·Px·AT+B·Rw·BT  (discrete Lyapunov equation)

  

Py=C·Px·CT+D·Rw·DT

• 

The Lyapunov equation approach to finding the steady-state covariance matrices is based on the assumption that the system is stable. For unstable systems, Px and Py are infinite.

Examples

withDynamicSystems:

Example 1 : Find the covariance matrices of a system with discrete-time transfer function shown below, whose input is a Gaussian white process with spectral density Rw = 5.

sys1TransferFunction102z+110z2+2z+5,discrete,sampletime=0.1:

PrintSystemsys1

Transfer Functiondiscrete; sampletime = .11 output(s); 1 input(s)inputvariable=u1zoutputvariable=y1ztf1,1=20z+1010z2+2z+5

(1)

For a system with a single input, the dimension of the Matrix Rw is 1x1.

RwMatrix5

Rw5

(2)

By default, the output covariance Matrix Py is returned if no output option is specified.

PyCovariancesys1,Rw

Py30.3167420814479

(3)

Return the state covariance Matrix Px (expected empty for TF)

PxCovariancesys1,Rw,output=statecovar

Px

(4)

Example 2 : Find the steady-state output covariance matrix of a continuous state-space system driven by a Gaussian white process with intensity Rw = 2.

sys2StateSpace5,3|3,4,2,3,1,2|12,1,0,0:

PrintSystemsys2

State Spacecontinuous2 output(s); 1 input(s); 2 state(s)inputvariable=u1toutputvariable=y1t,y2tstatevariable=x1t,x2ta=−533−4b=23c=112−21d=00

(5)

For a system with a single input, the Rw Matrix has 1x1 dimensions.

RwsMatrix2

Rws2

(6)

Return the output covariance Matrix Py.

PyCovariancesys2,Rws,output=outcovar

Py9.00000000000000−4.00000000000000−4.000000000000001.81818181818182

(7)

Return a list of the output and state covariance Matrices [Py, Px]

outlistCovariancesys2,Rws,output=outcovar,statecovar

outlist9.00000000000000−4.00000000000000−4.000000000000001.81818181818182,3.363636363636374.272727272727284.272727272727285.45454545454546

(8)

Compatibility

• 

The DynamicSystems[Covariance] command was introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

See Also

DynamicSystems

DynamicSystems[Grammians]

DynamicSystems[NormH2]

LinearAlgebra[LyapunovSolve]

LinearAlgebra[SylvesterSolve]