| [pt,ph,st,sh,psi1,psi2]=dproeq(pt,ph,st,sh,p,g,c,v,w,q,r,mc,me,nc,a,b,m,rtol);
|
% DPROEQ : one iteration of the SDOPE (Strengthened Discrete-time Optimal
% Projection Equations) for Deterministic Parameter Reduced-Order LQG Design.
%
% Control and estimation equations of compensator
% for (P,G,C,V,W) based on (Q,R) and nc=<nx.
% (P,G,C) deterministic.
%
% [pt,ph,st,sh,psi1,psi2]=dproeq(pt,ph,st,sh,p,g,c,v,w,q,r,nc,a,b,m,rtol);
%
% See also dprotin, gmhfac
%
% W.L. De Koning, L.G. Van Willigenburg, 28-11-95.
%
function [pt,ph,st,sh,psi1,psi2]=dproeq(pt,ph,st,sh,p,g,c,v,w,q,r,mc,me,nc,a,b,m,rtol);
if nargin~=18; rtol=1e-9; end;
%
% full order equations
%
wp=w+c*pt*c' ; rs=r+g'*st*g;
iwp=pinv(wp) ; irs=pinv(rs);
kh=me+p*pt*c' ; lh=g'*st*p+mc';
s1p=kh*iwp*kh' ; s2s=lh'*irs*lh;
p1p=p-kh*iwp*c ; p2s=p-g*irs*lh;
psi1=p2s *ph*p2s'+s1p; psi2=p1p'*sh*p1p +s2s;
%
% reduced order adaptation
%
[nx,nx]=size(p);
[ta]=gmhfac(ph,sh,nc,a,m,rtol); tao=eye(nx)-ta;
phn=psi1*ta'; phn=0.5*(phn+phn');
shn=psi2*ta ; shn=0.5*(shn+shn');
ptn=p *pt*p'-s1p+v+tao *psi1*tao';
stn=p'*st*p -s2s+q+tao'*psi2*tao ;
if a==0; b=0; end;
pt=(1-b)*ptn+b*pt; pt=0.5*(pt+pt');
st=(1-b)*stn+b*st; st=0.5*(st+st');
ph=(1-b)*phn+b*ph;
sh=(1-b)*shn+b*sh;
% keyboard
|
|