File: augment.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 (82 lines) | stat: -rw-r--r-- 2,575 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
augment           Scilab Group           Scilab Function            augment
NAME
   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, sensi