matlab covar,Output and state covariance of system driven by white noise

covar

Output and state covariance of system driven by white noise

Syntax

P = covar(sys,W)

[P,Q] = covar(sys,W)

Description

covar calculates the stationary covariance of the output

y of an LTI model sys driven by Gaussian white

noise inputs w. This function handles both continuous- and

discrete-time cases.

P = covar(sys,W)returns the steady-state output response

covariance

P=E(yyT)

given the noise intensity

E(w(t)w(τ)T)=Wδ(t−τ)(continuous time)E(w[k]w[l]T)=Wδkl(discrete time)

[P,Q] = covar(sys,W) also returns the steady-state state

covariance

Q=E(xxT)

when sys is a state-space model (otherwise Q is

set to []).

When applied to an N-dimensional LTI array sys,

covar returns multidimensional arrays P,

Q such that

P(:,:,i1,...iN) and Q(:,:,i1,...iN) are the

covariance matrices for the model sys(:,:,i1,...iN).

Examples

Compute the output response covariance of the discrete SISO system

H(z)=2z+1z2+0.2z+0.5,Ts=0.1

due to Gaussian white noise of intensity W = 5. Type

sys = tf([2 1],[1 0.2 0.5],0.1);

p = covar(sys,5)

These commands produce the following result.

p =

30.3167

You can compare this output of covar to simulation results.

randn('seed',0)

w = sqrt(5)*randn(1,1000); % 1000 samples

% Simulate response to w with LSIM:

y = lsim(sys,w);

% Compute covariance of y values

psim = sum(y .* y)/length(w);

This yields

psim =

32.6269

The two covariance values p and psim do not

agree perfectly due to the finite simulation horizon.

Algorithms

Transfer functions and zero-pole-gain models are first converted to state space with

ss.

For continuous-time state-space models

x˙=Ax+Bwy=Cx+Dw,

the steady-state state covariance Q is obtained by solving the

Lyapunov equation

AQ+QAT+BWBT=0.

In discrete time, the state covariance Q solves the discrete Lyapunov equation

AQAT−Q+BWBT=0.

In both continuous and discrete time, the output response covariance is given by

P = CQCT +

DWDT. For unstable systems,

P and Q are infinite. For continuous-time

systems with nonzero feedthrough, covar returns

Inf for the output covariance P.

References

[1] Bryson, A.E. and Y.C. Ho, Applied Optimal

Control, Hemisphere Publishing, 1975, pp. 458-459.

See Also

Introduced before R2006a

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值