Code covered by the BSD License  

Highlights from
Reduced-order discrete-time LQG design for systems with white parameters

Reduced-order discrete-time LQG design for systems with white parameters

by

 

22 May 2008 (Updated )

Optimal compensation of time-varying discrete-time linear systems with white stochastic parameters

[nxs,nus,nys]=varchk(nx,nu,ny,pms,gms,cms,pva,gva,cva,pgms,pcms,pgva,pcva);
% VARCHK: Check dimensions mean square and variance matrices
%
%         function [nxs,nus,nys]=varchk(nx,nu,ny,pms,gms,cms,pva,gva,cva,pgms,pcms,pgva,pcva);
%         
%         pgms,pgva,pcms,pcva: optional
%
%         output: nxs=nx*nx, nus=nu*nu, nys=ny*ny
%
%         W.L. De Koning, L.G. Van Willigenburg 28-11-95.
%
  function [nxs,nus,nys]=varchk(nx,nu,ny,pms,gms,cms,pva,gva,cva,pgms,pcms,pgva,pcva);

  if nargin~=9 & nargin~=13; error(' 9 or 13 input arguments required'); end;

  nxs=nx*nx; nus=nu*nu; nys=ny*ny;

  [nx1,nx2]=size(pms);
  if nx1~=nxs | nx2~=nxs; error('  pms incompatible with pm'); end;
  [nx1,nx2]=size(pva);
  if nx1~=nxs | nx2~=nxs; error('  pva incompatible with pm'); end;
  [nx1,nu1]=size(gms);
  if nx1~=nxs | nu1~=nus; error('  gms incompatible with pm,gm'); end;
  [nx1,nu1]=size(gva);
  if nx1~=nxs | nu1~=nus; error('  gva incompatible with pm,gm'); end;
  [ny1,nx1]=size(cms);
  if ny1~=nys | nx1~=nxs; error('  cms incompatible with pm,cm'); end;
  [ny1,nx1]=size(cva);
  if ny1~=nys | nx1~=nxs; error('  cva incompatible with pm,cm'); end;
  if nargin>9
    nxu=nx*nu; nxy=nx*ny;
    [nx1,nu1]=size(pgms);
    if nx1~=nxs | nu1~=nxu; error('  pgms incompatible with pm,gm'); end;
    [nx1,nu1]=size(pgva);
    if nx1~=nxs | nu1~=nxu; error('  pgva incompatible with pm,gm'); end;
    [ny1,nx1]=size(pcms);
    if nx1~=nxs | ny1~=nxy; error('  pcms incompatible with pm,cm'); end;
    [ny1,nx1]=size(pcva);
    if nx1~=nxs | ny1~=nxy; error('  pcva incompatible with pm,cm'); end;
  end;

Contact us