dca

PURPOSE ^

DCA - Compute dynamic control allocation filter.

SYNOPSIS ^

function Gvu = dca(B,S,W1,W2,T)

DESCRIPTION ^

 DCA - Compute dynamic control allocation filter.

  Gvu = dca(B,S,W1,W2,[T])
 
 Computes the explicit filter solution u(t) = Gvu(q)v(t) to the
 unconstrained dynamic control allocation problem

   min  ||W1(u(t)-Sv(t))||^2 + ||W2(u(t)-u(t-T))||^2
   u(t)

   subj. to  Bu(t)=v(t)

  Inputs:
  -------
 B     control effectiveness matrix (k x m)
 S     desired steady state control distribution (m x k)
 W1    control position weighting matrix (m x m)
 W2    control rate weighting matrix (m x m)
 T     sampling time [-1]

  Output:
  ------
 Gvu   optimal filter: u(t) = Gvu(q)*v(t)
 
  Example:

   Gvu = dca([1 1 1],[1 0 0]',diag([0 1 1]),diag([3 2 0]),.1)
   figure(1),step(Gvu)
   figure(2),bodemag(Gvu)  

 See also: DYN_SIM.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function Gvu = dca(B,S,W1,W2,T)
0002   
0003 % DCA - Compute dynamic control allocation filter.
0004 %
0005 %  Gvu = dca(B,S,W1,W2,[T])
0006 %
0007 % Computes the explicit filter solution u(t) = Gvu(q)v(t) to the
0008 % unconstrained dynamic control allocation problem
0009 %
0010 %   min  ||W1(u(t)-Sv(t))||^2 + ||W2(u(t)-u(t-T))||^2
0011 %   u(t)
0012 %
0013 %   subj. to  Bu(t)=v(t)
0014 %
0015 %  Inputs:
0016 %  -------
0017 % B     control effectiveness matrix (k x m)
0018 % S     desired steady state control distribution (m x k)
0019 % W1    control position weighting matrix (m x m)
0020 % W2    control rate weighting matrix (m x m)
0021 % T     sampling time [-1]
0022 %
0023 %  Output:
0024 %  ------
0025 % Gvu   optimal filter: u(t) = Gvu(q)*v(t)
0026 %
0027 %  Example:
0028 %
0029 %   Gvu = dca([1 1 1],[1 0 0]',diag([0 1 1]),diag([3 2 0]),.1)
0030 %   figure(1),step(Gvu)
0031 %   figure(2),bodemag(Gvu)
0032 %
0033 % See also: DYN_SIM.
0034   
0035   if nargin<5,
0036     T = -1;
0037   end
0038 
0039   % Number of control inputs.
0040   m = size(B,2);
0041   % Net weighting matrix.
0042   W = sqrtm(W1^2+W2^2);
0043   Wi = inv(W);
0044   % u(t) = ESv(t)+Fu(t-T)+Gv(t)
0045   G = Wi*pinv(B*Wi);
0046   E = (eye(m)-G*B)*Wi^2*W1^2;
0047   F = (eye(m)-G*B)*Wi^2*W2^2;
0048   % Control allocation transfer function.
0049   Gvu = ss(F,F*(E*S+G),eye(m),E*S+G,T);
0050   Gvu = tf(Gvu);

Generated on Wed 25-Aug-2004 14:38:35 by m2html © 2003