File: ss2ss.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 (95 lines) | stat: -rw-r--r-- 3,143 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
83
84
85
86
87
88
89
90
91
92
93
94
95
ss2ss            Scilab Group            Scilab Function              ss2ss
NAME
   ss2ss - state-space to state-space conversion, feedback, injection
  
CALLING SEQUENCE
 [Sl1,right,left]=ss2ss(Sl,T, [F, [G , [flag]]])
PARAMETERS
 Sl              : linear system (syslin list) in state-space form
                 
 T               : square (non-singular) matrix
                 
 Sl1, right, left
                  : linear systems (syslin lists) in state-space form
                 
 F               : real matrix (state feedback gain)
                 
 G               : real matrix (output injection gain)
                 
DESCRIPTION
   Returns the linear system Sl1=[A1,B1,C1,D1] where A1=inv(T)*A*T,
  B1=inv(T)*B, C1=C*T, D1=D.
  
   Optional parameters F and G are state feedback and output injection
  respectively. 
  
   For example, Sl1=ss2ss(Sl,T,F) returns Sl1 with:
  
               | inv(T)*(A+B*F)*T  ,    inv(T)*B |
         Sl1 = |                                 |
               |     (C+D*F)*T     ,      D      |
   and right is a non singular linear system such that Sl1=Sl*right.
  
   Sl1*inv(right) is a factorization of Sl.
  
   Sl1=ss2ss(Sl,T,0*F,G) returns Sl1 with:
  
               | inv(T)*(A+G*C)*T  , inv(T)*(B+G*D) |
         Sl1 = |                                    |
               |      C*T          ,      D         |
   and left is a non singular linear system such that Sl1=left*Sl (right=Id
  if F=0).  When both F and G are given, Sl1=left*Sl*right.
  
 -    When flag is used and flag=1 an output injection  as follows is used
      
      
       | inv(T)*(A + GC)*T  , inv(T)*(B+GD,-G) |
       |      C*T           ,       (D   , 0)  |
     and then a feedback is performed, F must be of size (m+p,n) 
      
     ( x is in R^n , y in R^p, u in R^m ). 
      
     right and left have the following property:
      
       Sl1 =  left*sysdiag(sys,eye(p,p))*right 
 -    When flag is used and flag=2 a feedback (F must be of  size (m,n))
      is performed and then the above output injection is applied. right
      and left have  the following property:
      
       Sl1 = left*sysdiag(sys*right,eye(p,p)))
     
      
EXAMPLE
 Sl=ssrand(2,2,5); trzeros(Sl)       // zeros are invariant:
 Sl1=ss2ss(Sl,rand(5,5),rand(2,5),rand(5,2)); 
 trzeros(Sl1), trzeros(rand(2,2)*Sl1*rand(2,2))
 // output injection [ A + GC, (B+GD,-G)]
 //                  [   C   , (D   , 0)]
 p=1,m=2,n=2; sys=ssrand(p,m,n);
 
 // feedback (m,n)  first and then output injection.
 
 F1=rand(m,n);
 G=rand(n,p);
 [sys1,right,left]=ss2ss(sys,rand(n,n),F1,G,2);
 
 // Sl1 equiv left*sysdiag(sys*right,eye(p,p)))
 
 res=clean(ss2tf(sys1) - ss2tf(left*sysdiag(sys*right,eye(p,p))))
 
 // output injection then feedback (m+p,n) 
 F2=rand(p,n); F=[F1;F2];
 [sys2,right,left]=ss2ss(sys,rand(n,n),F,G,1);
 
 // Sl1 equiv left*sysdiag(sys,eye(p,p))*right 
 
 res=clean(ss2tf(sys2)-ss2tf(left*sysdiag(sys,eye(p,p))*right))
 
 // when F2= 0; sys1 and sys2 are the same 
 F2=0*rand(p,n);F=[F1;F2];
 [sys2,right,left]=ss2ss(sys,rand(n,n),F,G,1);
 
 res=clean(ss2tf(sys2)-ss2tf(sys1))
SEE ALSO
   projsl, feedback