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

📄 lqe.m

📁 数字通信第四版原书的例程
💻 M
字号:
function [l,p,e] = lqe(a,g,c,q,r,t)
%LQE	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 = LQE(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,E] = LQE(A,G,C,Q,R) returns the gain matrix L, the Riccati
%	equation solution P which is the estimate error covariance, and 
%	the closed loop eigenvalues of the estimator: E = EIG(A-L*C).
%
%	[L,P,E] = LQE(A,G,C,Q,R,N) solves the estimator problem when the
%	process and sensor noise is correlated: E{wv'} = N.
%
%	See also: LQEW, LQE2, and ESTIM.

%	J.N. Little 4-21-85
%	Revised Clay M. Thompson  7-16-90
%	Copyright (c) 1986-93 by the MathWorks, Inc.

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

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

⌨️ 快捷键说明

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