<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>gfrancis</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE>April 1993</DATE>
  <SHORT_DESCRIPTION name="gfrancis"> Francis equations for tracking</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>[L,M,T]=gfrancis(Plant,Model)  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>Plant</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: <VERB>syslin</VERB> list</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>Model</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: <VERB>syslin</VERB> list</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>L,M,T</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: real matrices</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P>
    Given the the linear plant:</P>
    <VERBATIM>
<![CDATA[
    x'= F*x + G*u 
    y = H*x + J*u
   ]]>
    </VERBATIM>
    <P>
    and the linear model</P>
    <VERBATIM>
<![CDATA[
    xm'= A*xm + B*um
    ym = C*xm + D*um
   ]]>
    </VERBATIM>
    <P>
    the goal is for the plant to track the model i.e. <VERB>e = y - ym ---&gt; 0</VERB>
    while keeping stable the state x(t) of the plant. 
    <VERB>u</VERB> is given by feedforward and feedback</P>
    <VERBATIM>
<![CDATA[
 u = L*xm + M*um + K*(x-T*xm) = [K , L-K*T] *(x,xm) + M*um
   ]]>
    </VERBATIM>
    <P>
    The matrices T,L,M satisfy generalized Francis equations</P>
    <VERBATIM>
<![CDATA[
    F*T + G*L = T*A
    H*T + J*L = C
          G*M = T*B
          J*M = D
   ]]>
    </VERBATIM>
    <P>
    The matrix <VERB>K</VERB> must be chosen as stabilizing the pair <VERB>(F,G)</VERB>
    See example of use in directory <VERB>demos/tracking</VERB>.</P>
  </DESCRIPTION>
  <EXAMPLE>
<![CDATA[
Plant=ssrand(1,3,5);
[F,G,H,J]=abcd(Plant);
nw=4;nuu=2;A=rand(nw,nw);
st=maxi(real(spec(A)));A=A-st*eye(A);
B=rand(nw,nuu);C=2*rand(1,nw);D=0*rand(C*B);
Model=syslin('c',A,B,C,D);
[L,M,T]=gfrancis(Plant,Model);
norm(F*T+G*L-T*A,1)
norm(H*T+J*L-C,1)
norm(G*M-T*B,1)
norm(J*M-D,1)
 ]]>
  </EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>lqg</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>ppol</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
</MAN>
