Previous Next Contents

5  Robust control toolbox

5.1   augment augmented plant




CALLING SEQUENCE :

[P,r]=augment(G)
[P,r]=augment(G,flag1)
[P,r]=augment(G,flag1,flag2)



PARAMETERS :




DESCRIPTION :

If flag1='SRT' (default value), returns the "full" augmented plant
    [ I | -G]   -->'S'
    [ 0 |  I]   -->'R'
P = [ 0 |  G]   -->'T'
    [-------]
    [ I | -G]
'S' , 'R' , 'T' refer to the first three (block) rows of P respectively.

If one of these letters is absent in flag1
, the corresponding row in P is missing.

If G
is given in state-space form, the returned P is minimal. P is calculated by: [I,0,0;0,I,0;-I,0,I;I,0,0]*[I,-G;0,I;I,0].

The augmented plant associated with input sensitivity functions, namely
    [ I | -I]   -->'S'  (input sensitivity)
    [ G | -G]   -->'R'  (G*input sensitivity)
P = [ 0 |  I]   -->'T'  (K*G*input sensitivity)
    [-------]
    [ G | -G]
is obtained by the command [P,r]=augment(G,flag,'i'). For state-space G, this P is calculated by: [I,-I;0,0;0,I;0,0]+[0;I;0;I]*G*[I,-I] and is thus generically minimal.

Note that weighting functions can be introduced by left-multiplying P
by a diagonal system of appropriate dimension, e.g., P = sysdiag(W1,W2,W3,eye(G))*P.

Sensitivity functions can be calculated by lft
. One has:

For output sensitivity functions [P,r]=augment(P,'SRT'): lft(P,r,K)=[inv(eye()+G*K);K*inv(eye()+G*K);G*K*inv(eye()+G*K)];

For input sensitivity functions [P,r]=augment(P,'SRT','i'): lft(P,r,K)=[inv(eye()+K*G);G*inv(eye()+K*G);K*G*inv(eye()+G*K)];


EXAMPLE :

G=ssrand(2,3,2); //Plant
K=ssrand(3,2,2); //Compensator
[P,r]=augment(G,'T');
T=lft(P,r,K);   //Complementary sensitivity function
Ktf=ss2tf(K);Gtf=ss2tf(G);
Ttf=ss2tf(T);T11=Ttf(1,1);
Oloop=Gtf*Ktf;
Tn=Oloop*inv(eye(Oloop)+Oloop);
clean(T11-Tn(1,1));
//
[Pi,r]=augment(G,'T','i');
T1=lft(Pi,r,K);T1tf=ss2tf(T1); //Input Complementary sensitivity function
Oloop=Ktf*Gtf;
T1n=Oloop*inv(eye(Oloop)+Oloop);
clean(T1tf(1,1)-T1n(1,1))



See Also : lft X, sensi X



5.2   bstap hankel approximant




CALLING SEQUENCE :

[Q]=bstap(Sl)



PARAMETERS :




DESCRIPTION :

Computes the best approximant Q of the linear system Sl
      ||Sl-Q||    =  ||T||
              inf
where ||T|| is the H-infinity norm of the Hankel operator associated with Sl.


See Also : syslin X



5.3   ccontrg central H-infinity controller




CALLING SEQUENCE :

[K]=ccontrg(P,r,gamma);



PARAMETERS :




DESCRIPTION :

returns a realization K of the central controller for the general standard problem in state-space form.

Note that gamma must be
> gopt (ouput of gamitg)

P contains the parameters of plant realization (A,B,C,D)
(syslin list) with
B = ( B1 , B2 ) ,        C= ( C1 ) ,    D = ( D11  D12)
                            ( C2 )          ( D21  D22)
r(1) and r(2) are the dimensions of D22 (rows x columns)


See Also : gamitg X, h_inf X


Author : P. Gahinet (INRIA)



5.4   colinout inner-outer factorization




CALLING SEQUENCE :

[Inn,X,Gbar]=colinout(G)



PARAMETERS :




DESCRIPTION :

Inner-outer factorization (and column compression) of (lxp) G =[A,B,C,D] with l<=p.

G
is assumed to be fat (l<=p) without zero on the imaginary axis and with a D matrix which is full row rank.

G
must also be stable for having Gbar stable.

Dual of rowinout
.


See Also : syslin X, rowinout X



5.5   copfac right coprime factorization




CALLING SEQUENCE :

[N,M,XT,YT]=copfac(G [,polf,polc,tol]) 



PARAMETERS :




DESCRIPTION :

[N,M,XT,YT]=copfac(G,[polf,polc,[tol]]) returns a right coprime factorization of G.

G = N*M^-1
where N and M are stable, proper and right coprime. (i.e. [N M] left-invertible with stability)

XT
and YT satisfy:

[XT -YT].[M N]' = eye
(Bezout identity)

G
is assumed stabilizable and detectable.


See Also : syslin X, lcf X



5.6   dcf double coprime factorization




CALLING SEQUENCE :

[N,M,X,Y,NT,MT,XT,YT]=dcf(G,[polf,polc,[tol]]) 



PARAMETERS :




DESCRIPTION :

returns eight stable systems (N,M,X,Y,NT,MT,XT,YT) for the doubly coprime factorization
                 !XT  -YT! ! M  Y !
                 !       !*!      ! = eye
                 !-NT  MT! ! N  X !
G must be stabilizable and detectable.


See Also : copfac X



5.7   des2ss descriptor to state-space




CALLING SEQUENCE :

[Sl]=des2ss(A,B,C,D,E [,tol])
[Sl]=des2ss(Des)



PARAMETERS :




DESCRIPTION :

Descriptor to state-space transform.

Sl=des2ss(A,B,C,D,E)
returns a linear system Sl equivalent to the descriptor system (E,A,B,C,D).

For index one (E,A)
pencil, explicit formula is used and for higher index pencils rowshuff is used.

Sl=des2ss(Des)
with Des=list('des',A,B,C,D,E) returns a linear system Sl in state-space form with possibly a polynomial D matrix.

A generalized Leverrier algorithm is used.


EXAMPLE :

s=poly(0,'s');G=[1/(s-1),s;1,2/s^3];
S1=tf2des(G);S2=tf2des(G,"withD");
W1=des2ss(S1);W2=des2ss(S2);
clean(ss2tf(W1))
clean(ss2tf(W2))



See Also : des2tf X, glever X, rowshuff X



5.8   dhnorm discrete H-infinity norm




CALLING SEQUENCE :

hinfnorm=dhnorm(sl,[tol],[normax])



PARAMETERS :




DESCRIPTION :

produces the discrete-time infinity norm of a state-space system (the maximum over all frequencies on the unit circle of the maximum singular value).


See Also : h_norm X, linfn X



5.9   dtsi stable anti-stable decomposition




CALLING SEQUENCE :

[Ga,Gs,Gi]=dtsi(G,[tol]) 



PARAMETERS :




DESCRIPTION  :

returns the stable-antistable decomposition of G:

G = Ga + Gs + Gi
, (Gi = G(oo))

G can be given in state-space form or in transfer form.


See Also : syslin X, pbig X, psmall X, pfss X



5.10   fourplan augmented plant to four plants




CALLING SEQUENCE :

[P11,P12,P21,P22]=fourplan(P,r)



PARAMETERS :




DESCRIPTION :

Utility function.

P
being partitioned as follows:
 
P=[ P11 P12;
    P21 P22]  
with size(P22)=r this function returns the four linear systems P11,P12,P21,P22.


See Also : lqg X, lqg2stan X, lqr X, lqe X, lft X



5.11   fspecg stable factorization




CALLING SEQUENCE :

[gm]=fspecg(g).



PARAMETERS :




DESCRIPTION  :

returns gm with gm and gm^-1 stable such that:
gtild(g)*g = gtild(gm)*gm
g and gm are continuous-time linear systems in state-space form.

Imaginary-axis poles are forbidden.



5.12   fstabst Youla's parametrization




CALLING SEQUENCE :

[J]=fstabst(P,r)



PARAMETERS :




DESCRIPTION :

Parameterization of all stabilizing feedbacks.

P
is partitioned as follows:
 
P=[ P11 P12;
    P21 P22]  
(in state-space or transfer form: automatic conversion in state-space is done for the computations)

r
= size of P22 subsystem, (2,2) block of P
  
          J =[ J11 J12;
               J21 J22]
K is a stabilizing controller for P (i.e. P22) iff K=lft(J,r,Q) with Q stable.

The central part of J
, J11 is the lqg regulator for P

This J is such that defining T as the 2-port lft of P and J : [T,rt]=lft(P,r,J,r) one has that T12 is inner and T21 is co-inner.


EXAMPLE :

ny=2;nu=3;nx=4;
P22=ssrand(ny,nu,nx);
bigQ=rand(nx+nu,nx+nu);bigQ=bigQ*bigQ';
bigR=rand(nx+ny,nx+ny);bigR=bigR*bigR';
[P,r]=lqg2stan(P22,bigQ,bigR);
J=fstabst(P,r);
Q=ssrand(nu,ny,1);Q('A')=-1;  //Stable Q
K=lft(J,r,Q);
A=h_cl(P,r,K); spec(A)



See Also : obscont X, lft X, lqg X, lqg2stan X



5.13   gamitg H-infinity gamma iterations




CALLING SEQUENCE :

[gopt]=gamitg(G,r,prec [,options]);



PARAMETERS :




DESCRIPTION :

gopt=gamitg(G,r,prec [,options]) returns the H-infinity optimal gain gopt.

G
contains the state-space matrices [A,B,C,D] of the plant with the usual partitions:
   B = ( B1 , B2 ) ,    C = ( C1 ) ,    D = ( D11  D12)
                            ( C2 )          ( D21  D22)
These partitions are implicitly given in r: r(1) and r(2) are the dimensions of D22 (rows x columns)

With option='t'
, gamitg traces each bisection step, i.e., displays the lower and upper bounds and the current test point.


See Also : ccontrg X, h_inf X


Author : P. Gahinet



5.14   gcare control Riccati equation




CALLING SEQUENCE :

[X,F]=gcare(Sl)



PARAMETERS :




DESCRIPTION :

Generalized Control Algebraic Riccati Equation (GCARE). X = solution , F = gain.

The GCARE for Sl=[A,B,C,D]
is:
(A-B*Si*D'*C)'*X+X*(A-B*Si*D'*C)-X*B*Si*B'*X+C'*Ri*C=0
where S=(eye()+D'*D), Si=inv(S), R=(eye()+D*D'), Ri=inv(R) and F=-Si*(D'*C+B'*X) is such that A+B*F is stable.


See Also : gfare X



5.15   gfare filter Riccati equation




CALLING SEQUENCE :

[Z,H]=gfare(Sl)



PARAMETERS :




DESCRIPTION :

Generalized Filter Algebraic Riccati Equation (GFARE). Z = solution, H = gain.

The GFARE for Sl=[A,B,C,D]
is:
(A-B*D'*Ri*C)*Z+Z*(A-B*D'*Ri*C)'-Z*C'*Ri*C*Z+B*Si*B'=0
where S=(eye()+D'*D), Si=inv(S), R=(eye()+D*D'), Ri=inv(R) and H=-(B*D'+Z*C')*Ri is such that A+H*C is stable.


See Also : gcare X



5.16   gtild tilde operation




CALLING SEQUENCE :

Gt=gtild(G)
Gt=gtild(G,flag)



PARAMETERS :




DESCRIPTION :

If G is a polynomial matrix (or a polynomial), Gt=gtild(G,'c') returns the polynomial matrix Gt(s)=G(-s)'.

If G
is a polynomial matrix (or a polynomial), Gt=gtild(G,'d') returns the polynomial matrix Gt=G(1/z)*z^n where n is the maximum degree of G.

For continuous-time systems represented in state-space by a syslin
list, Gt = gtild(G,'c') returns a state-space representation of G(-s)' i.e the ABCD matrices of Gt are A',-C', B', D'. If G is improper ( D= D(s)) the D matrix of Gt is D(-s)'.

For discrete-time systems represented in state-space by a syslin
list, Gt = gtild(G,'d') returns a state-space representation of G(-1/z)' i.e the (possibly improper) state-space representation of -z*C*inv(z*A-B)*C + D(1/z) .

For rational matrices, Gt = gtild(G,'c')
returns the rational matrix Gt(s)=G(-s) and Gt = gtild(G,'d') returns the rational matrix Gt(z)= G(1/z)'.

The parameter flag
is necessary when gtild is called with a polynomial argument.


EXAMPLE :

//Continuous time
s=poly(0,'s');G=[s,s^3;2+s^3,s^2-5]
Gt=gtild(G,'c')
Gt-horner(G,-s)'   //continuous-time interpretation
Gt=gtild(G,'d');
Gt-horner(G,1/s)'*s^3  //discrete-time interpretation
G=ssrand(2,2,3);Gt=gtild(G);   //State-space (G is cont. time by default)
clean((horner(ss2tf(G),-s))'-ss2tf(Gt))   //Check
// Discrete-time 
z=poly(0,'z');
Gss=ssrand(2,2,3);Gss('dt')='d'; //discrete-time
Gss(5)=[1,2;0,1];   //With a constant D matrix
G=ss2tf(Gss);Gt1=horner(G,1/z)';
Gt=gtild(Gss);
Gt2=clean(ss2tf(Gt)); clean(Gt1-Gt2)  //Check
//Improper systems
z=poly(0,'z');
Gss=ssrand(2,2,3);Gss(7)='d'; //discrete-time
Gss(5)=[z,z^2;1+z,3];    //D(z) is polynomial 
G=ss2tf(Gss);Gt1=horner(G,1/z)';  //Calculation in transfer form
Gt=gtild(Gss);    //..in state-space 
Gt2=clean(ss2tf(Gt));clean(Gt1-Gt2)  //Check



See Also : syslin X, horner X, factors X



5.17   h2norm H2 norm




CALLING SEQUENCE :

[n]=h2norm(Sl [,tol])



PARAMETERS :




DESCRIPTION :

produces the H2 norm of a linear continuous time system Sl.

(For Sl
in state-space form h2norm uses the observability gramian and for Sl in transfer form h2norm uses a residue method)



5.18   h_cl closed loop matrix




CALLING SEQUENCE :

[Acl]=h_cl(P,r,K)
[Acl]=h_cl(P22,K)



PARAMETERS :




DESCRIPTION :

Given the standard plant P (with r=size(P22)) and the controller K, this function returns the closed loop matrix Acl.

The poles of Acl
must be stable for the internal stability of the closed loop system.

Acl
is the A-matrix of the linear system [I -P22;-K I]^-1 i.e. the A-matrix of lft(P,r,K)


See Also : lft X


Author : F. D.



5.19   h_inf H-infinity (central) controller




CALLING SEQUENCE :

[Sk,ro]=h_inf(P,r,romin,romax,nmax)
[Sk,rk,ro]=h_inf(P,r,romin,romax,nmax)



PARAMETERS :




DESCRIPTION :

h_inf computes H-infinity optimal controller for the continuous-time plant P.

The partition of P
into four sub-plants is given through the 2-vector r which is the size of the 22 part of P.

P
is given in state-space e.g. P=syslin('c',A,B,C,D) with A,B,C,D = constant matrices or P=syslin('c',H) with H a transfer matrix.

[Sk,ro]=H_inf(P,r,romin,romax,nmax) returns ro in [romin,romax] and the central controller Sk in the same representation as P.

(All calculations are made in state-space, i.e conversion to state-space is done by the function, if necessary).

Invoked with three LHS parameters,
[Sk,rk,ro]=H_inf(P,r,romin,romax,nmax) returns ro and the Parameterization of all stabilizing controllers:

a stabilizing controller K
is obtained by K=lft(Sk,r,PHI) where PHI is a linear system with dimensions r' and satisfy:

H_norm(PHI)
< gamma. rk (=r) is the size of the Sk22 block and ro = 1/gama^2 after nmax iterations.

Algorithm is adapted from Safonov-Limebeer. Note that P
is assumed to be a continuous-time plant.


See Also : gamitg X, ccontrg X, leqr X


Author : F.D. (1990)



5.20   h_inf_st static H_infinity problem




CALLING SEQUENCE :

[Kopt,gamaopt]=h_inf_stat(D,r)



PARAMETERS :




DESCRIPTION :

computes a matrix Kopt such that largest singular value of:

lft(D,r,K)=D11+D12* K*inv(I-D22*K)* D21
is minimal (Static H-infinity four blocks problem).

D is partionned as D=[D11 D12; D21 D22]
where size(D22)=r=[r1 r2]


Author : F.D.



5.21   h_norm H-infinity norm




CALLING SEQUENCE :

[hinfnorm [,frequency]]=h_norm(sl [,rerr])



PARAMETERS :




DESCRIPTION :

produces the infinity norm of a state-space system (the maximum over all frequencies of the maximum singular value).


See Also : linfn X, linf X, svplot X



5.22   hankelsv Hankel singular values




CALLING SEQUENCE :

[nk2,W]=hankelsv(sl [,tol])
[nk2]=hankelsv(sl [,tol])



PARAMETERS :




DESCRIPTION :

returns nk2, the squared Hankel singular values of sl and W = P*Q = controllability gramian times observability gramian.

nk2
is the vector of eigenvalues of W.


EXAMPLE :

A=diag([-1,-2,-3]);
sl=syslin('c',A,rand(3,2),rand(2,3));[nk2,W]=hankelsv(sl)
[Q,M]=pbig(W,nk2(2)-%eps,'c');
slr=projsl(sl,Q,M);hankelsv(slr)



See Also : balreal X, equil X, equil1 X



5.23   lcf normalized coprime factorization




CALLING SEQUENCE :

[N,M]=lcf(sl)



PARAMETERS :




DESCRIPTION :

Computes normalized coprime factorization of the linear dynamic system sl.

sl = M^-1 N



Author : F. D.



5.24   leqr H-infinity LQ gain (full state)




CALLING SEQUENCE :

[K,X,err]=leqr(P12,Vx)



PARAMETERS :




DESCRIPTION :

leqr computes the linear suboptimal H-infinity LQ full-state gain for the plant P12=[A,B2,C1,D12] in continuous or discrete time.

P12
is a syslin list (e.g. P12=syslin('c',A,B2,C1,D12)).
      [C1' ]               [Q  S]
      [    ]  * [C1 D12] = [    ]
      [D12']               [S' R]
Vx is related to the variance matrix of the noise w perturbing x; (usually Vx=gama^-2*B1*B1').

The gain K
is such that A + B2*K is stable.

X
is the stabilizing solution of the Riccati equation.

For a continuous plant:
(A-B2*inv(R)*S')'*X+X*(A-B2*inv(R)*S')-X*(B2*inv(R)*B2'-Vx)*X+Q-S*inv(R)*S'=0
K=-inv(R)*(B2'*X+S)
For a discrete time plant:
X-(Abar'*inv((inv(X)+B2*inv(R)*B2'-Vx))*Abar+Qbar=0
K=-inv(R)*(B2'*inv(inv(X)+B2*inv(R)*B2'-Vx)*Abar+S')
with Abar=A-B2*inv(R)*S' and Qbar=Q-S*inv(R)*S'

The 3-blocks matrix pencils associated with these Riccati equations are:
               discrete                        continuous
   |I  -Vx  0|   | A    0    B2|       |I   0   0|   | A    Vx    B2|
  z|0   A'  0| - |-Q    I    -S|      s|0   I   0| - |-Q   -A'   -S |
   |0   B2' 0|   | S'   0     R|       |0   0   0|   | S'   -B2'   R|



See Also : lqr X


Author : F.D.



5.25   lft linear fractional transformation




CALLING SEQUENCE :

[P1]=LFT(P,K)
[P1]=LFT(P,r,K)
[P1,r1]=LFT(P,r,P#,r#)



PARAMETERS :




DESCRIPTION :

Linear fractional transform between two standard plants P and P# in state space form or in transfer form (syslin lists).

r= size(P22) r#=size(P22#)


LFT(P,r, K) is the linear fractional transform between P and a controller K (K may be a gain or a controller in state space form or in transfer form);

LFT(P,K)
is LFT(P,r,K) with r=size of K transpose;

P1= P11+P12*K* (I-P22*K)^-1 *P21


[P1,r1]=LFT(P,r,P#,r#) returns the generalized (2 ports) lft of P and P#.

P1
is the pair two-port interconnected plant and the partition of P1 into 4 blocks in given by r1 which is the dimension of the 22 block of P1.

P
and R can be PSSDs i.e. may admit a polynomial D matrix.


EXAMPLE :

s=poly(0,'s');
P=[1/s, 1/(s+1); 1/(s+2),2/s]; K= 1/(s-1);
lft(P,K)
lft(P,[1,1],K)
P(1,1)+P(1,2)*K*inv(1-P(2,2)*K)*P(2,1)   //Numerically dangerous!
ss2tf(lft(tf2ss(P),tf2ss(K)))
lft(P,-1)
f=[0,0;0,1];w=P/.f; w(1,1)
//Improper plant (PID control)
W=[1,1;1,1/(s^2+0.1*s)];K=1+1/s+s
lft(W,[1,1],K); ss2tf(lft(tf2ss(W),[1,1],tf2ss(K)))



See Also : sensi X, augment X, feedback X, sysdiag X



5.26   linf infinity norm




CALLING SEQUENCE :

linf(g [,eps],[tol]) 



PARAMETERS :




DESCRIPTION :

returns the L_infinity norm of g.
    n=sup [sigmax(g(jw)] 
       w
(sigmax largest singular value).


See Also : h_norm X, linfn X



5.27   linfn infinity norm




CALLING SEQUENCE :

[x,freq]=linfn(G,PREC,RELTOL,options);



PARAMETERS :




DESCRIPTION :

Computes the Linf (or Hinf) norm of G This norm is well-defined as soon as the realization G=(A,B,C,D) has no imaginary eigenvalue which is both controllable and observable.

freq
is a list of the frequencies for which ||G|| is attained,i.e., such that ||G (j om)|| = ||G||.

If -1 is in the list, the norm is attained at infinity.

If -2 is in the list, G
is all-pass in some direction so that ||G (j omega)|| = ||G|| for all frequencies omega.

The algorithm follows the paper by G. Robel (AC-34 pp. 882-884, 1989). The case D=0
is not treated separately due to superior accuracy of the general method when (A,B,C) is nearly non minimal.

The 'trace'
option traces each bisection step, i.e., displays the lower and upper bounds and the current test point.

The 'cond'
option estimates a confidence index on the computed value and issues a warning if computations are ill-conditioned

In the general case (A
neither stable nor anti-stable), no upper bound is prespecified.

If by contrast A
is stable or anti stable, lower and upper bounds are computed using the associated Lyapunov solutions.


See Also : h_norm X


Author : P. Gahinet



5.28   lqg_ltr LQG with loop transform recovery




CALLING SEQUENCE :

[kf,kc]=lqg_ltr(sl,mu,ro)



PARAMETERS :




DESCRIPTION :

returns the Kalman gains for:
           x = a*x + b*u + l*w1   
  (sl)
           y = c*x + mu*I*w2

           z = h*x
Cost function: /+oo | J = E(| [z(t)'*z(t) + ro^2*u(t)'*u(t)]dt) lqg | / 0

The lqg/ltr approach looks for L,mu,H,ro such that: J(lqg) = J(freq) where /+oo * * * J = | tr[S W W S ] + tr[T T]dw freq | /0

and
 
 S = (I + G*K)^(-1)  
 T = G*K*(I+G*K)^(-1)



See Also : syslin X



5.29   macglov Mac Farlane Glover problem




CALLING SEQUENCE :

[P,r]=macglov(Sl)



PARAMETERS :




DESCRIPTION :

[P,r]=macglov(Sl) returns the standard plant P for the Glover-McFarlane problem.

For this problem ro_optimal = 1-hankel_norm([N,M]
) with [N,M]=lcf(sl) (Normalized coprime factorization) i.e.

gama_optimal = 1/sqrt(ro_optimal)



Author : F. D.



5.30   nehari Nehari approximant




CALLING SEQUENCE :

[x]=nehari(R [,tol])



PARAMETERS :




DESCRIPTION :

[x]=nehari(R [,tol]) returns the Nehari approximant of R.

R
= linear system in state-space representation (syslin list).

R
is strictly proper and - R~ is stable (i.e. R is anti stable).
    || R - X ||oo = min || R - Y ||oo
                  Y in Hoo

5.31   parrot Parrot's problem




CALLING SEQUENCE :

K=parrot(D,r)



PARAMETERS :




DESCRIPTION :

Given a matrix D partionned as [D11 D12; D21 D22] where size(D22)=r=[r1,r2] compute a matrix K such that largest singular value of [D11 D12; D21 D22+K] is minimal (Parrot's problem)


See Also : h_inf_st X



5.32   ric_desc Riccati equation




CALLING SEQUENCE :

X=ric_desc(H [,E))
[X1,X2,zero]=ric_desc(H [,E])



PARAMETERS :




DESCRIPTION :

Riccati solver with hamiltonian matrices as inputs.

In the continuous time case calling sequence is (one input):
ric_descr(H)

Riccati equation is:
  (Ec)   A'*X + X*A + X*R*X -Q = 0.
Defining the hamiltonian matrix H by:
 H = [A  R;
      Q -A']
with the calling sequence [X1,X2,zero]=ric_descr(H), the solution X is given by X=X1/X2.

zero
= L1 norm of rhs of (Ec)

The solution X
is also given by X=riccati(A,Q,R,'c'))

In the discrete-time case calling sequence is (two inputs): ric_descr(H,E)

The Riccati equation is:
   (Ed)  A'*X*A-(A'*X*B*(R+B'*X*B)^-1)*(B'*X*A)+C-X = 0.
Defining G=B/R*B' and the hamiltonian pencil (E,H) by:
      E=[eye(n,n),G;               H=[A, 0*ones(n,n);
         0*ones(n,n),A']             -C, eye(n,n)];
with the calling sequence [X1,X2,err]=ric_descr(H,E), the solution X is given by X=X1/X2.

zero
= L1 norm of rhs of (Ed)

The solution X
is also given by X=riccati(A,G,C,'d') with G=B/R*B'


See Also : riccati X



5.33   riccati Riccati equation




CALLING SEQUENCE :

X=riccati(A,B,C,dom,[typ])
[X1,X2]=riccati(A,B,C,dom,[typ])



PARAMETERS :




DESCRIPTION :

X=riccati(A,B,C,dom,[typ]) solves the Riccati equation:
A'*X+X*A-X*B*X+C=0 
in continuous time case, or:
 A'*X*A-(A'*X*B1/(B2+B1'*X*B1))*(B1'*X*A)+C-X
with B=B1/B2*B1' in the discrete time case. If called with two output arguments, riccati returns X1,X2 such that X=X1/X2.


See Also : ric_desc X



5.34   rowinout inner-outer factorization




CALLING SEQUENCE :

[Inn,X,Gbar]=rowinout(G)



PARAMETERS :




DESCRIPTION :

Inner-outer factorization (and row compression) of (lxp) G =[A,B,C,D] with l>=p.

G
is assumed to be tall (l>=p) without zero on the imaginary axis and with a D matrix which is full column rank.

G
must also be stable for having Gbar stable.

G
admits the following inner-outer factorization:
         G = [ Inn ] | Gbar |
                     |  0   |
where Inn is square and inner (all pass and stable) and Gbar square and outer i.e: Gbar is square bi-proper and bi-stable (Gbar inverse is also proper and stable);

Note that:
         [ Gbar ]
   X*G = [  -   ]
         [  0   ]
is a row compression of G where X = Inn inverse is all-pass i.e:
 T
X (-s) X(s) = Identity
(for the continous time case).


See Also : syslin X, colinout X



5.35   sensi sensitivity functions




CALLING SEQUENCE :

[Se,Re,Te]=sensi(G,K)
[Si,Ri,Ti]=sensi(G,K,flag)



PARAMETERS :




DESCRIPTION :

sensi computes sensitivity functions. If G and K are given in state-space form, the systems returned are generically minimal. Calculation is made by lft, e.g., Se can be given by the commands P = augment(G,'S'), Se=lft(P,K). If flag = 'i', [Si,Ri,Ti]=sensi(G,K,'i') returns the input sensitivity functions.

[Se;Re;Te]= [inv(eye()+G*K);K*inv(eye()+G*K);G*K*inv(eye()+G*K)];
[Si;Ri;Ti]= [inv(eye()+K*G);G*inv(eye()+K*G);K*G*inv(eye()+K*G)];



EXAMPLE :

G=ssrand(1,1,3);K=ssrand(1,1,3);
[Se,Re,Te]=sensi(G,K);
Se1=inv(eye()+G*K);  //Other way to compute
ss2tf(Se)    //Se seen in transfer form
ss2tf(Se1)
ss2tf(Te)
ss2tf(G*K*Se1)
[Si,Ri,Ti]=sensi(G,K,'i');
w1=[ss2tf(Si);ss2tf(Ri);ss2tf(Ti)]
w2=[ss2tf(inv(eye()+K*G));ss2tf(G*inv(eye()+K*G));ss2tf(K*G*inv(eye()+K*G))];
clean(w1-w2)



See Also : augment X, lft X, h_cl X



5.36   tf2des transfer function to descriptor




CALLING SEQUENCE :

S=tf2des(G)
S=tf2des(G,flag)



PARAMETERS :




DESCRIPTION :

Transfer function to descriptor form: S=list('d',A,B,C,D,E)
  E*xdot = A*x+B*u
  y = C*x + D*u
Note that D=0 if the optional parameter flag="withD" is not given. Otherwise a maximal rank D matrix is returned in the fifth entry of the list S


EXAMPLE :

s=poly(0,'s');
G=[1/(s-1),s;1,2/s^3];
S1=tf2des(G);des2tf(S1)
S2=tf2des(G,"withD");des2tf(S2)



See Also : pol2des X, tf2ss X, ss2des X, des2tf X


Previous Next Contents