Code covered by the BSD License  

Highlights from
Continuous and discrete time optimal reduced order LQG output feedback

Continuous and discrete time optimal reduced order LQG output feedback


Gerard Van Willigenburg


17 Jan 2011 (Updated )

Optimal reduced-oder LQG output feedback controllers

% DELFOTIN: Deterministic Parameter Continuous Full-Order Time Invariant
%           iNfinite horizon delta LQG compensation.
%           Optimal compensation of (P,G,C,V,W) based on (Q,R) nc=nx.
%           (P,G,C) deterministic.
%           [fo,ko,lo,sigp,sigs,spr,pt,st,sigc]=delfotin(p,g,c,v,w,q,r,delta);
% or
%           [fo,ko,lo,sigp,sigs,spr,pt,st,sigc]=delfotin(func);
% Input:
%          func  : string containing the function name of the function that
%                  specifies all estimator problem parameters (see e.g. cofu).
% Output:
%          fo, ko, lo : Optimal compensator
%          sigp, sigs,
%                sigc : Minimum costs (if sigs=sigp)
%          spr        : Spectral radius close loop system.
%          pt, st     : Solutions estimator and control Riccati equations.
%          L.G. Van Willigenburg, W.L. De Koning, 28-11-95.

  function [fo,ko,lo,sigp,sigs,spr,pt,st,sigc]=delfotin(p,g,c,v,w,q,r,delta);

% Get problem data from func=p if p is a string
  if isstr(p);
    func=p; [p,g,c,v,w,q,r,delta]=feval(func);
% Check dimensions
  if nx1~=nx | nx2~=nx; error('q incompatible with p'); end;
  if nu1~=nu | nu2~=nu; error('r incompatible with g'); end;
% Compute full-order optimal feedback
  [lo,st] = dellqr(p,g,q,r,delta,mc);
% Compute full-order optimal estimator
  [ko,pt] = dellqr(p',c',v,w,delta,me);
% Determine full-order optimal compensator and costs
  ko=ko'; fo=p-g*lo-ko*c;

  if delta~=0; sigp=delta*sigp; sigs=delta*sigs; end

  pa=[p -g*lo ; ko*c fo]; spr=maxreig(pa,delta);
  if spr>0; sigc=Inf; spr=maxreig(p,delta); fo=[]; ko=[]; lo=[];
  elseif nargout==9
    qa=[q -mc*lo ; -lo'*mc' lo'*r*lo ];
    va=[v  me*ko';  ko *me' ko *w*ko'];
    pp=dellyap(pa,va,delta) ; sigc=trace(qa*pp);
%    ss=dellyap(pa',qa,delta); sigc=trace(va*ss);
    if delta~=0; sigc=delta*sigc; end;

Contact us