Code covered by the BSD License  

Highlights from
Reduced-order inf. horizon time-inv. discr.-time LQG control for systems with white parameters

Reduced-order inf. horizon time-inv. discr.-time LQG control for systems with white parameters

by

 

08 Jun 2008 (Updated )

Optimal reduced-order compensation of discrete-time linear systems with white parameters

[pt,ph,st,sh]=sproeq1(pt,ph,st,sh,pm,gm,cm,pms,gms,cms,...
% SPROEQ1: one iteration of the Stochastic Parameter
%         Reduced-Order LQG EQuations.
%         Control and estimation equations of compensator
%         for (P,G,C,W,V) based on (Q,R) and nc<=nx.
%         (P,G,C) stochastic and independent.
%
%         [pt,ph,st,sh]=sproeq(pt,ph,st,sh,pm,gm,cm,pms,gms,cms,pgms,pcms,...
%                              pva,gva,cva,pgva,pcva,v,w,q,r,nc,a,b,m,rtol);
%
%         See also sprotin1, gmhfac
%
%         W.L. De Koning, L.G. Van Willigenburg 28-11-95.
%
  function [pt,ph,st,sh]=sproeq1(pt,ph,st,sh,pm,gm,cm,pms,gms,cms,...
                                 pva,gva,cva,v,w,q,r,nc,a,b,m,rtol);

%
% full order equations
%
  ln=r; kn=w; stn=st; ptn=pt;
  ln(:)=gms'*st(:)+r(:)+gva'*sh(:); l=pinv(ln)*gm'*st*pm;
  kn(:)=cms *pt(:)+w(:)+cva *ph(:); k=pm*pt*cm'*pinv(kn);

  lnl=l'*ln*l ; khk=k'*sh*k ;
  stn(:)=pms'*st(:)-lnl(:)+q(:)+pva'*sh(:)+cva'*khk(:);
  psi2=(pm-k*cm)'*sh*(pm-k*cm) +lnl;

  knk=k *kn*k'; lhl=l *ph*l';
  ptn(:)=pms *pt(:)-knk(:)+v(:)+pva *ph(:)+gva *lhl(:);
  psi1=(pm-gm*l) *ph*(pm-gm*l)'+knk;
%
% reduced order adaptation
%
  [nx,nx]=size(pm);
  [ta]=gmhfac(ph,sh,nc,a,m,rtol); tao=eye(nx)-ta;
  ptn=ptn+tao *psi1*tao'; stn=stn+tao'*psi2*tao;
  phn=psi1*ta';phn=0.5*(phn+phn');
  shn=psi2*ta ;shn=0.5*(shn+shn');
  
  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;

Contact us