File: lqg2stan.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (59 lines) | stat: -rw-r--r-- 1,786 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
lqg2stan          Scilab Group          Scilab Function            lqg2stan
NAME
   lqg2stan - LQG to standard problem
  
CALLING SEQUENCE
 [P,r]=lqg2stan(P22,bigQ,bigR)
PARAMETERS
 P22        : syslin list (nominal plant) in state-space form
            
 bigQ       : [Q,S;S',N] (symmetric) weighting matrix
            
 bigR       : [R,T;T',V] (symmetric) covariance matrix
            
 r          : 1x2 row vector = (number of measurements, number of inputs) 
            (dimension of  the 2,2 part of P)
            
 P          : syslin list (augmented plant)
            
DESCRIPTION
   lqg2stan  returns the augmented plant for linear LQG (H2) controller 
  design.
  
   P22=syslin(dom,A,B2,C2) is the nominal plant; it can be in continuous 
  time (dom='c') or discrete time (dom='d').
  
   . 
   x = Ax + w1 + B2u
   y = C2x + w2
   for continuous time plant.
  
   x[n+1]= Ax[n] + w1 + B2u
       y = C2x + w2
   for discrete time plant.
  
   The (instantaneous) cost function is [x' u'] bigQ [x;u].
  
   The covariance of [w1;w2] is E[w1;w2] [w1',w2'] = bigR 
  
   If [B1;D21] is a factor of bigQ, [C1,D12] is a factor of bigR and
  [A,B2,C2,D22] is a realization of P22, then P is a realization of
  [A,[B1,B2],[C1,-C2],[0,D12;D21,D22]. The (negative) feedback computed by
  lqg stabilizes P22, i.e. the poles of cl=P22/.K are stable.
  
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);K=lqg(P,r);  //K=LQG-controller
 spec(h_cl(P,r,K))      //Closed loop should be stable
 //Same as Cl=P22/.K; spec(Cl('A'))
 s=poly(0,'s')
 lqg2stan(1/(s+2),eye(2,2),eye(2,2))
SEE ALSO
   lqg, lqr, lqe, obscont, h_inf, augment, fstabst, feedback
  
AUTHOR
   F.D.