Mercurial > octave-nkf
comparison scripts/control/system/buildssic.m @ 5016:bdbee5282954
[project @ 2004-09-22 02:50:35 by jwe]
author | jwe |
---|---|
date | Wed, 22 Sep 2004 02:50:36 +0000 |
parents | b8105302cfe8 |
children | 4c8a2e4e0717 |
comparison
equal
deleted
inserted
replaced
5015:6d481b6e349e | 5016:bdbee5282954 |
---|---|
18 | 18 |
19 ## -*- texinfo -*- | 19 ## -*- texinfo -*- |
20 ## @deftypefn {Function File} {} buildssic (@var{clst}, @var{ulst}, @var{olst}, @var{ilst}, @var{s1}, @var{s2}, @var{s3}, @var{s4}, @var{s5}, @var{s6}, @var{s7}, @var{s8}) | 20 ## @deftypefn {Function File} {} buildssic (@var{clst}, @var{ulst}, @var{olst}, @var{ilst}, @var{s1}, @var{s2}, @var{s3}, @var{s4}, @var{s5}, @var{s6}, @var{s7}, @var{s8}) |
21 ## | 21 ## |
22 ## Form an arbitrary complex (open or closed loop) system in | 22 ## Form an arbitrary complex (open or closed loop) system in |
23 ## state-space form from several systems. "@code{buildssic}" can | 23 ## state-space form from several systems. @command{buildssic} can |
24 ## easily (despite it's cryptic syntax) integrate transfer functions | 24 ## easily (despite its cryptic syntax) integrate transfer functions |
25 ## from a complex block diagram into a single system with one call. | 25 ## from a complex block diagram into a single system with one call. |
26 ## This function is especially useful for building open loop | 26 ## This function is especially useful for building open loop |
27 ## interconnections for H_infinity and H2 designs or for closing | 27 ## interconnections for |
28 ## loops with these controllers. | 28 ## @iftex |
29 ## | 29 ## @tex |
30 ## Although this function is general purpose, the use of "@code{sysgroup}" | 30 ## $ { \cal H }_\infty $ and $ { \cal H }_2 $ |
31 ## "@code{sysmult}", "@code{sysconnect}" and the like is recommended for | 31 ## @end tex |
32 ## @end iftex | |
33 ## @ifinfo | |
34 ## H-infinity and H-2 | |
35 ## @end ifinfo | |
36 ## designs or for closing loops with these controllers. | |
37 ## | |
38 ## Although this function is general purpose, the use of @command{sysgroup} | |
39 ## @command{sysmult}, @command{sysconnect} and the like is recommended for | |
32 ## standard operations since they can handle mixed discrete and continuous | 40 ## standard operations since they can handle mixed discrete and continuous |
33 ## systems and also the names of inputs, outputs, and states. | 41 ## systems and also the names of inputs, outputs, and states. |
34 ## | 42 ## |
35 ## The parameters consist of 4 lists that describe the connections | 43 ## The parameters consist of 4 lists that describe the connections |
36 ## outputs and inputs and up to 8 systems s1-s8. | 44 ## outputs and inputs and up to 8 systems @var{s1}--@var{s8}. |
37 ## Format of the lists: | 45 ## Format of the lists: |
38 ## @table @var | 46 ## @table @var |
39 ## @item clst | 47 ## @item clst |
40 ## connection list, describes the input signal of | 48 ## connection list, describes the input signal of |
41 ## each system. The maximum number of rows of Clst is | 49 ## each system. The maximum number of rows of Clst is |
42 ## equal to the sum of all inputs of s1-s8. | 50 ## equal to the sum of all inputs of s1-s8. |
43 ## | 51 ## |
44 ## Example: | 52 ## Example: |
45 ## @code{[1 2 -1; 2 1 0]} ==> new input 1 is old inpout 1 | 53 ## @code{[1 2 -1; 2 1 0]} means that: new input 1 is old input 1 |
46 ## + output 2 - output 1, new input 2 is old input 2 | 54 ## + output 2 - output 1, and new input 2 is old input 2 |
47 ## + output 1. The order of rows is arbitrary. | 55 ## + output 1. The order of rows is arbitrary. |
48 ## | 56 ## |
49 ## @item ulst | 57 ## @item ulst |
50 ## if not empty the old inputs in vector Ulst will | 58 ## if not empty the old inputs in vector @var{ulst} will |
51 ## be appended to the outputs. You need this if you | 59 ## be appended to the outputs. You need this if you |
52 ## want to "pull out" the input of a system. Elements | 60 ## want to ``pull out'' the input of a system. Elements |
53 ## are input numbers of s1-s8. | 61 ## are input numbers of @var{s1}--@var{s8}. |
54 ## | 62 ## |
55 ## @item olst | 63 ## @item olst |
56 ## output list, specifiy the outputs of the resulting | 64 ## output list, specifiy the outputs of the resulting |
57 ## systems. Elements are output numbers of s1-s8. | 65 ## systems. Elements are output numbers of @var{s1}--@var{s8}. |
58 ## The numbers are alowed to be negative and may | 66 ## The numbers are allowed to be negative and may |
59 ## appear in any order. An empty matrix means | 67 ## appear in any order. An empty matrix means |
60 ## all outputs. | 68 ## all outputs. |
61 ## | 69 ## |
62 ## @item ilst | 70 ## @item ilst |
63 ## input list, specifiy the inputs of the resulting | 71 ## input list, specifiy the inputs of the resulting |
64 ## systems. Elements are input numbers of s1-s8. | 72 ## systems. Elements are input numbers of @var{s1}--@var{s8}. |
65 ## The numbers are alowed to be negative and may | 73 ## The numbers are allowed to be negative and may |
66 ## appear in any order. An empty matrix means | 74 ## appear in any order. An empty matrix means |
67 ## all inputs. | 75 ## all inputs. |
68 ## @end table | 76 ## @end table |
69 ## | 77 ## |
70 ## Example: Very simple closed loop system. | 78 ## Example: Very simple closed loop system. |
80 ## | | | 88 ## | | |
81 ## +----------------------------+ | 89 ## +----------------------------+ |
82 ## @end group | 90 ## @end group |
83 ## @end example | 91 ## @end example |
84 ## | 92 ## |
85 ## The closed loop system GW can be optained by | 93 ## The closed loop system @var{GW} can be optained by |
86 ## @example | 94 ## @example |
87 ## GW = buildssic([1 2; 2 -1], 2, [1 2 3], 2, G, K); | 95 ## GW = buildssic([1 2; 2 -1], 2, [1 2 3], 2, G, K); |
88 ## @end example | 96 ## @end example |
89 ## @table @var | 97 ## @table @var |
90 ## @item clst | 98 ## @item clst |
91 ## (1. row) connect input 1 (G) with output 2 (K). | 99 ## 1st row: connect input 1 (@var{G}) with output 2 (@var{K}). |
92 ## (2. row) connect input 2 (K) with neg. output 1 (G). | 100 ## |
101 ## 2nd row: connect input 2 (@var{K}) with negative output 1 (@var{G}). | |
93 ## @item ulst | 102 ## @item ulst |
94 ## append input of (2) K to the number of outputs. | 103 ## Append input of 2 (@var{K}) to the number of outputs. |
95 ## @item olst | 104 ## @item olst |
96 ## Outputs are output of 1 (G), 2 (K) and appended output 3 (from Ulst). | 105 ## Outputs are output of 1 (@var{G}), 2 (@var{K}) and |
106 ## appended output 3 (from @var{ulst}). | |
97 ## @item ilst | 107 ## @item ilst |
98 ## the only input is 2 (K). | 108 ## The only input is 2 (@var{K}). |
99 ## @end table | 109 ## @end table |
100 ## | 110 ## |
101 ## Here is a real example: | 111 ## Here is a real example: |
102 ## @example | 112 ## @example |
103 ## @group | 113 ## @group |
104 ## +----+ | 114 ## +----+ |
105 ## -------------------->| W1 |---> v1 | 115 ## -------------------->| W1 |---> v1 |
106 ## z | +----+ | 116 ## z | +----+ |
107 ## ----|-------------+ || GW || => min. | 117 ## ----|-------------+ |
108 ## | | vz infty | 118 ## | | |
109 ## | +---+ v +----+ | 119 ## | +---+ v +----+ |
110 ## *--->| G |--->O--*-->| W2 |---> v2 | 120 ## *--->| G |--->O--*-->| W2 |---> v2 |
111 ## | +---+ | +----+ | 121 ## | +---+ | +----+ |
112 ## | | | 122 ## | | |
113 ## | v | 123 ## | v |
114 ## u y | 124 ## u y |
115 ## @end group | 125 ## @end group |
116 ## @end example | 126 ## @end example |
117 ## | 127 ## @iftex |
118 ## The closed loop system GW from [z; u]' to [v1; v2; y]' can be | 128 ## @tex |
119 ## obtained by (all SISO systems): | 129 ## $$ { \rm min } \Vert GW_{vz} \Vert _\infty $$ |
130 ## @end tex | |
131 ## @end iftex | |
132 ## @ifinfo | |
133 ## @example | |
134 ## min || GW || | |
135 ## vz infty | |
136 ## @end example | |
137 ## @end ifinfo | |
138 ## | |
139 ## The closed loop system @var{GW} | |
140 ## @iftex | |
141 ## @tex | |
142 ## from $ [z, u]^T $ to $ [v_1, v_2, y]^T $ | |
143 ## @end tex | |
144 ## @end iftex | |
145 ## @ifinfo | |
146 ## from [z, u]' to [v1, v2, y]' | |
147 ## @end ifinfo | |
148 ## can be obtained by (all @acronym{SISO} systems): | |
120 ## @example | 149 ## @example |
121 ## GW = buildssic([1, 4; 2, 4; 3, 1], 3, [2, 3, 5], | 150 ## GW = buildssic([1, 4; 2, 4; 3, 1], 3, [2, 3, 5], |
122 ## [3, 4], G, W1, W2, One); | 151 ## [3, 4], G, W1, W2, One); |
123 ## @end example | 152 ## @end example |
124 ## where "One" is a unity gain (auxillary) function with order 0. | 153 ## where ``One'' is a unity gain (auxillary) function with order 0. |
125 ## (e.g. @code{One = ugain(1);}) | 154 ## (e.g. @code{One = ugain(1);}) |
126 ## @end deftypefn | 155 ## @end deftypefn |
127 | 156 |
128 ## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> | 157 ## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> |
129 ## Created: April 1998 | 158 ## Created: April 1998 |