⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lqe2.m

📁 数字通信第四版原书的例程
💻 M
字号:
function [l,p] = lqe2(a,g,c,q,r,t)
%LQE2	Linear quadratic estimator design. For the continuous-time system:
%		.
%		x = Ax + Bu + Gw            {State equation}
%		z = Cx + Du + v             {Measurements}
%	with process noise and measurement noise covariances:
%		E{w} = E{v} = 0,  E{ww'} = Q,  E{vv'} = R, E{wv'} = 0
%
%	L = LQE2(A,G,C,Q,R) returns the gain matrix L such that the 
%	stationary Kalman filter:   .
%                                   x = Ax + Bu + L(z - Cx - Du)
%	produces an LQG optimal estimate of x. The estimator can be formed
%	with ESTIM.
%
%	[L,P] = LQE2(A,G,C,Q,R) returns the gain matrix L and the Riccati
%	equation solution P which is the estimate error covariance.
%
%	[L,P] = LQE2(A,G,C,Q,R,N) solves the estimator problem when the
%	process and sensor noise is correlated: E{wv'} = N.
%
%	LQE2 uses the SCHUR algorithm and is more numerically reliable 
%	than LQE, which uses eigenvector decomposition.
%
%	See also: LQEW, LQE, and ESTIM.

%	Clay M. Thompson  7-23-90
%	Copyright (c) 1986-93 by the MathWorks, Inc.

error(nargchk(5,6,nargin));

% Calculate estimator gains using LQR2 and duality:
if nargin==5
  [k,s] = lqr2(a',c',g*q*g',r);
else
  [k,s] = lqr2(a',c',g*q*g',r,g*t);
end  
l=k';
p=s';

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -