1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
4
<LANGUAGE>eng</LANGUAGE>
6
<TYPE>Scilab Function</TYPE>
7
<DATE>April 1993</DATE>
8
<SHORT_DESCRIPTION name="obscont"> observer based controller</SHORT_DESCRIPTION>
10
<CALLING_SEQUENCE_ITEM>[K]=obscont(P,Kc,Kf) </CALLING_SEQUENCE_ITEM>
11
<CALLING_SEQUENCE_ITEM>[J,r]=obscont(P,Kc,Kf) </CALLING_SEQUENCE_ITEM>
16
<PARAM_NAME>P</PARAM_NAME>
18
<SP>: <VERB>syslin</VERB> list (nominal plant) in state-space form, continuous or discrete time</SP>
22
<PARAM_NAME>Kc</PARAM_NAME>
24
<SP>: real matrix, (full state) controller gain</SP>
28
<PARAM_NAME>Kf</PARAM_NAME>
30
<SP>: real matrix, filter gain</SP>
34
<PARAM_NAME>K</PARAM_NAME>
36
<SP>: <VERB>syslin</VERB> list (controller)</SP>
40
<PARAM_NAME>J</PARAM_NAME>
42
<SP>: <VERB>syslin</VERB> list (extended controller)</SP>
46
<PARAM_NAME>r</PARAM_NAME>
48
<SP>: 1x2 row vector</SP>
54
<P><VERB>obscont</VERB> returns the observer-based controller associated with a
55
nominal plant <VERB>P</VERB> with matrices <VERB>[A,B,C,D]</VERB> (<VERB>syslin</VERB> list).</P>
57
The full-state control gain is <VERB>Kc</VERB> and the filter gain is <VERB>Kf</VERB>.
58
These gains can be computed, for example, by pole placement.</P>
59
<P><VERB>A+B*Kc</VERB> and <VERB>A+Kf*C</VERB> are (usually) assumed stable.</P>
60
<P><VERB>K</VERB> is a state-space representation of the
61
compensator <VERB> K: y->u</VERB> in:</P>
63
<VERB> xdot = A x + B u, y=C x + D u, zdot= (A + Kf C)z -Kf y +B u, u=Kc z</VERB>
65
<P><VERB>K</VERB> is a linear system (<VERB>syslin</VERB> list) with matrices given by:
66
<VERB>K=[A+B*Kc+Kf*C+Kf*D*Kc,Kf,-Kc]</VERB>.</P>
68
The closed loop feedback system <VERB> Cl: v ->y</VERB> with
69
(negative) feedback <VERB>K</VERB> (i.e. <VERB>y = P u, u = v - K y</VERB>, or <VERB>xdot
70
= A x + B u, y = C x + D u, zdot = (A + Kf C) z - Kf y + B u, u = v -F z</VERB>)
71
is given by <VERB>Cl = P/.(-K)</VERB></P>
73
The poles of <VERB>Cl</VERB> (<VERB> spec(cl('A')) </VERB>) are located at the eigenvalues of <VERB>A+B*Kc</VERB>
74
and <VERB>A+Kf*C</VERB>.</P>
76
Invoked with two output arguments <VERB>obscont</VERB> returns a
77
(square) linear system <VERB>K</VERB> which parametrizes all the stabilizing
78
feedbacks via a LFT.</P>
80
Let <VERB>Q</VERB> an arbitrary stable linear system of dimension <VERB>r(2)</VERB>x<VERB>r(1)</VERB>
81
i.e. number of inputs x number of outputs in <VERB>P</VERB>.
82
Then any stabilizing controller <VERB>K</VERB> for <VERB>P</VERB> can be expressed as
83
<VERB>K=lft(J,r,Q)</VERB>. The controller which corresponds to <VERB>Q=0</VERB> is
84
<VERB>K=J(1:nu,1:ny)</VERB> (this <VERB>K</VERB> is returned by <VERB>K=obscont(P,Kc,Kf)</VERB>).
85
<VERB>r</VERB> is <VERB>size(P)</VERB> i.e the vector [number of outputs, number of inputs];</P>
89
ny=2;nu=3;nx=4;P=ssrand(ny,nu,nx);[A,B,C,D]=abcd(P);
90
Kc=-ppol(A,B,[-1,-1,-1,-1]); //Controller gain
91
Kf=-ppol(A',C',[-2,-2,-2,-2]);Kf=Kf'; //Observer gain
92
cl=P/.(-obscont(P,Kc,Kf));spec(cl('A')) //closed loop system
93
[J,r]=obscont(P,Kc,Kf);
94
Q=ssrand(nu,ny,3);Q('A')=Q('A')-(maxi(real(spec(Q('A'))))+0.5)*eye(Q('A'))
95
//Q is a stable parameter
97
spec(h_cl(P,K)) // closed-loop A matrix (should be stable);
123
<LINK>feedback</LINK>
126
<LINK>observer</LINK>
129
<AUTHOR>F.D. ; ; </AUTHOR>