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 :
- G
: linear system (syslin list), the nominal plant
- flag1
: one of the following (upper case) character string:
'S' , 'R' , 'T' 'SR' , 'ST' , 'RT' 'SRT'
- flag2
: one of the following character string:
'o' (stands for 'output', this is the default value) or 'i' (stands for 'input').
- P
: linear system (syslin list), the ``augmented'' plant
- r
: 1x2 row vector, dimension of P22 = G
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 :
- sl
: linear system (syslin list) assumed continuous-time and anti-stable.
- Q
: best stable approximation of Sl (syslin list).
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 :
- P
: syslin list (linear system in state-space representation)
- r
: 1x2 row vector, dimension of the 2,2 part of P
- gamma
: real number
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 :
- G
: linear system (syslin list) [A,B,C,D]
- Inn
: inner factor (syslin list)
- Gbar
: outer factor (syslin list)
- X
: row-compressor of G (syslin list)
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 :
- G
: syslin list (continuous-time linear system )
- polf, polc
: respectively the poles of XT and YT and the poles of n and M (default values =-1).
- tol
: real threshold for detecting stable poles (default value 100*%eps)
- N,M,XT,YT
: linear systems represented by syslin lists
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 :
- G
: syslin list (continuous-time linear system)
- polf, polc
: respectively the poles of XT and YT and the poles of N and M (default values =-1).
- tol
: real threshold for detecting stable poles (default value 100*%eps).
- N,M,XT,YT,NT,MT,X,Y
: linear systems represented by syslin lists
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 :
- A,B,C,D,E
: real matrices of appropriate dimensions
- Des
: list
- Sl
: syslin list
- tol
: real parameter (threshold) (default value 100*%eps).
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 :
- sl
: the state space system (syslin list) (discrete-time)
- tol
: tolerance in bisection step, default value 0.01
- normax
: upper bound for the norm , default value is 1000
- hinfnorm
: the discrete infinity norm of Sl
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 :
- G
: linear system (syslin list)
- Ga
: linear system (syslin list) antistable and strictly proper
- Gs
: linear system (syslin list) stable and strictly proper
- Gi
: real matrix (or polynomial matrix for improper systems)
- tol
: optional parameter for detecting stables poles. Default value: 100*%eps
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 :
- P
: syslin list (linear system)
- r
: 1x2 row vector, dimension of P22
- P11,P12,P21,P22
: syslin lists.
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 :
- g,gm
: syslin lists (linear systems in state-space representation)
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 :
- P
: syslin list (linear system)
- r
: 1x2 row vector, dimension of P22
- J
: syslin list (linear system in state-space representation)
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 :
- G
: syslin list (plant realization )
- r
: 1x2 row vector (dimension of G22)
- prec
: desired relative accuracy on the norm
- option
: string 't'
- gopt
: real scalar, optimal H-infinity gain
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 :
- Sl
: linear system (syslin list)
- X
: symmetric matrix
- F
: real matrix
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 :
- Sl
: linear system (syslin list)
- Z
: symmetric matrix
- H
: real matrix
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 :
- G
: either a polynomial or a linear system (syslin list) or a rational matrix
- Gt
: same as G
- flag
: character string: either 'c' or 'd' (optional parameter).
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 :
- Sl
: linear system (syslin list)
- n
: real scalar
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 :
- P, P22
: linear system (syslin list), augmented plant or nominal plant respectively
- r
: 1x2 row vector, dimensions of 2,2 part of P (r=[rows,cols]=size(P22))
- K
: linear system (syslin list), controller
- Acl
: real square matrix
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 :
- P
: syslin list : continuous-time linear system (``augmented'' plant given in state-space form
or in transfer form)
- r
: size of the P22 plant i.e. 2-vector [#outputs,#inputs]
- romin,romax
: a priori bounds on ro with ro=1/gama^2; (romin=0 usually)
- nmax
: integer, maximum number of iterations in the gama-iteration.
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 :
- D
: real matrix
- r
: 1x2 vector
- Kopt
: matrix
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 :
- sl
: the state space system (syslin list)
- rerr
: max. relative error, default value 1e-8
- hinfnorm
: the infinity norm of Sl
- frequency
: frequency at which maximum is achieved
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 :
- sl
: syslin list representing the linear system (state-space).
- tol
: tolerance parameter for detecting imaginary axis modes
(default value is 1000*%eps).
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 :
- sl
: linear system given in state space or transfer function (syslin list)
- N,M
: two linear systems (syslin list)
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 :
- P12
: syslin list
- Vx
: symmetric nonnegative matrix (should be small enough)
- K,X
: two real matrices
- err
: a real number (l1 norm of LHS of Riccati equation)
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 :
- P
: linear system (syslin list), the ``augmented'' plant, implicitly
partitioned into four blocks (two input ports and two output ports).
- K
: linear system (syslin list), the controller (possibly
an ordinary gain).
- r
: 1x2 row vector, dimension of P22
- P#
: linear system (syslin list), implicitly
partitioned into four blocks (two input ports and two output ports).
- r#
: 1x2 row vector, dimension of P#22
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 :
- g
: is a syslin linear system.
- eps
: is error tolerance on n.
- tol
: threshold for imaginary axis poles.
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 :
- G
: is a syslin list
- PREC
: desired relative accuracy on the norm
- RELTOL
: relative threshold to decide when an eigenvalue can be
considered on the imaginary axis.
- options
: available options are 'trace' or 'cond'
- x
is the computed norm.
- freq
: vector
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 :
- sl
: linear system in state-space form (syslin list)
- mu,ro
: real positive numbers chosen ``small enough''
- kf,kc
: controller and observer Kalman gains.
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 :
- Sl
: linear system (syslin list)
- P
: linear system (syslin list), ``augmented'' plant
- r
: 1x2 vector, dimension of P22
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 :
- R
: linear system (syslin list)
- x
: linear system (syslin list)
- tol
: optional threshold
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 :
- D,K
: matrices
- r
: 1X2 vector (dimension of the 2,2 part of D)
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 :
- H,E
: real square matrices
- X1,X2
: real square matrices
- zero
: real number
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 :
- A,B,C
: real matrices nxn, B and C symetric.
- dom
: 'c' or 'd' for the time domain (continuous or discrete)
- typ
: string : 'eigen' for block diagonalization or schur' for
Schur method.
- X1,X2,X
: square real matrices (X2 invertible), X symmetric
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 :
- G
: linear system (syslin list) [A,B,C,D]
- Inn
: inner factor (syslin list)
- Gbar
: outer factor (syslin list)
- X
: row-compressor of G (syslin list)
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 :
- G
: standard plant (syslin list)
- K
: compensator (syslin list)
- flag
: character string 'o' (default value) or 'i'
- Se
: output sensitivity function (I+G*K)^-1
- Re
: K*Se
- Te
: G*K*Se (output complementary sensitivity function)
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 :
- G
: linear system (syslin list) with possibly polynomial D matrix
- flag
: character string "withD"
- S
: list
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