compute the output and state covariance of a linear system driven by white Gaussian noise inputs
Covariance(sys, Rw, opts)
System; system object
Matrix; white Gaussian noise inputs intensities.
(optional) equation(s) of the form option = value; specify options for the Covariance command
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.
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:
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 𝔼⁡w⁡t=0 and its covariance matrix is 𝔼⁡w⁡t·wT⁡t+τ=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:
A·Px+Px·AT+B·Rw·BT=0 (continuous Lyapunov equation)
Px=A·Px·AT+B·Rw·BT (discrete Lyapunov equation)
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.
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.
sys1 ≔ TransferFunction⁡10⁢2⁢z+110⁢z2+2⁢z+5,discrete,sampletime=0.1:
Transfer Functiondiscrete; sampletime = .11 output(s); 1 input(s)inputvariable=u1⁡zoutputvariable=y1⁡ztf1,1=20⁢z+1010⁢z2+2⁢z+5
For a system with a single input, the dimension of the Matrix Rw is 1x1.
Rw ≔ Matrix⁡5
By default, the output covariance Matrix Py is returned if no output option is specified.
Py ≔ Covariance⁡sys1,Rw
Return the state covariance Matrix Px (expected empty for TF)
Px ≔ Covariance⁡sys1,Rw,output=statecovar
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.
sys2 ≔ StateSpace⁡−5,3|3,−4,2,3,1,−2|12,1,0,0:
State Spacecontinuous2 output(s); 1 input(s); 2 state(s)inputvariable=u1⁡toutputvariable=y1⁡t,y2⁡tstatevariable=x1⁡t,x2⁡ta=−533−4b=23c=112−21d=00
For a system with a single input, the Rw Matrix has 1x1 dimensions.
Rws ≔ Matrix⁡2
Return the output covariance Matrix Py.
Py ≔ Covariance⁡sys2,Rws,output=outcovar
Return a list of the output and state covariance Matrices [Py, Px]
outlist ≔ Covariance⁡sys2,Rws,output=outcovar,statecovar
The DynamicSystems[Covariance] command was introduced in Maple 18.
For more information on Maple 18 changes, see Updates in Maple 18.
Download Help Document
What kind of issue would you like to report? (Optional)