3294
|
1 @c Copyright (C) 1996, 1997 John W. Eaton |
|
2 @c This is part of the Octave manual. |
|
3 @c For copying conditions, see the file gpl.texi. |
|
4 |
4167
|
5 @node Control Theory |
3294
|
6 @chapter Control Theory |
|
7 |
5016
|
8 The Octave Control Systems Toolbox (@acronym{OCST}) was initially developed |
3294
|
9 by Dr.@: A. Scottedward Hodel |
|
10 @email{a.s.hodel@@eng.auburn.edu} with the assistance |
|
11 of his students |
|
12 @itemize @bullet |
|
13 @item R. Bruce Tenison @email{btenison@@dibbs.net}, |
|
14 @item David C. Clem, |
|
15 @item John E. Ingram @email{John.Ingram@@sea.siemans.com}, and |
|
16 @item Kristi McGowan. |
|
17 @end itemize |
5016
|
18 This development was supported in part by @acronym{NASA}'s Marshall Space Flight |
|
19 Center as part of an in-house @acronym{CACSD} environment. Additional important |
3294
|
20 contributions were made by Dr. Kai Mueller @email{mueller@@ifr.ing.tu-bs.de} |
|
21 and Jose Daniel Munoz Frias (@code{place.m}). |
|
22 |
3347
|
23 An on-line menu-driven tutorial is available via @code{DEMOcontrol}; |
5016
|
24 beginning @acronym{OCST} users should start with this program. |
3294
|
25 |
3347
|
26 @DOCSTRING(DEMOcontrol) |
|
27 |
3294
|
28 @menu |
3347
|
29 * sysstruct:: |
|
30 * sysinterface:: |
|
31 * sysdisp:: |
|
32 * blockdiag:: |
|
33 * numerical:: |
|
34 * sysprop:: |
|
35 * systime:: |
|
36 * sysfreq:: |
|
37 * cacsd:: |
|
38 * misc:: |
3294
|
39 @end menu |
|
40 |
4167
|
41 @node sysstruct |
3347
|
42 @section System Data Structure |
3294
|
43 |
|
44 @menu |
3347
|
45 * sysstructvars:: |
|
46 * sysstructtf:: |
|
47 * sysstructzp:: |
|
48 * sysstructss:: |
3294
|
49 @end menu |
3347
|
50 |
5016
|
51 The @acronym{OCST} stores all dynamic systems in |
3294
|
52 a single data structure format that can represent continuous systems, |
|
53 discrete-systems, and mixed (hybrid) systems in state-space form, and |
|
54 can also represent purely continuous/discrete systems in either |
|
55 transfer function or pole-zero form. In order to |
|
56 provide more flexibility in treatment of discrete/hybrid systems, the |
5016
|
57 @acronym{OCST} also keeps a record of which system outputs are sampled. |
3294
|
58 |
|
59 Octave structures are accessed with a syntax much like that used |
|
60 by the C programming language. For consistency in |
5016
|
61 use of the data structure used in the @acronym{OCST}, it is recommended that |
3402
|
62 the system structure access m-files be used (@pxref{sysinterface}). |
3294
|
63 Some elements of the data structure are absent depending on the internal |
|
64 system representation(s) used. More than one system representation |
5016
|
65 can be used for @acronym{SISO} systems; the @acronym{OCST} m-files ensure that all representations |
3294
|
66 used are consistent with one another. |
|
67 |
3346
|
68 @DOCSTRING(sysrepdemo) |
3294
|
69 |
4167
|
70 @node sysstructvars |
5016
|
71 @subsection Variables common to all @acronym{OCST} system formats |
3294
|
72 |
|
73 The data structure elements (and variable types) common to all system |
|
74 representations are listed below; examples of the initialization |
|
75 and use of the system data structures are given in subsequent sections and |
|
76 in the online demo @code{DEMOcontrol}. |
|
77 @table @var |
3402
|
78 @item n |
|
79 @itemx nz |
3294
|
80 The respective number of continuous and discrete states |
|
81 in the system (scalar) |
|
82 |
3402
|
83 @item inname |
|
84 @itemx outname |
3294
|
85 list of name(s) of the system input, output signal(s). (list of strings) |
|
86 |
|
87 @item sys |
3347
|
88 System status vector. (vector) |
3294
|
89 |
3347
|
90 This vector indicates both what representation was used to initialize |
|
91 the system data structure (called the primary system type) and which |
|
92 other representations are currently up-to-date with the primary system |
3402
|
93 type (@pxref{structaccess}). |
3294
|
94 |
3402
|
95 The value of the first element of the vector indicates the primary |
|
96 system type. |
3294
|
97 |
3402
|
98 @table @asis |
|
99 @item 0 |
|
100 for tf form (initialized with @code{tf2sys} or @code{fir2sys}) |
3294
|
101 |
3402
|
102 @item 1 |
|
103 for zp form (initialized with @code{zp2sys}) |
3294
|
104 |
3402
|
105 @item 2 |
|
106 for ss form (initialized with @code{ss2sys}) |
3294
|
107 @end table |
|
108 |
3402
|
109 The next three elements are boolean flags that indicate whether tf, zp, |
|
110 or ss, respectively, are ``up to date" (whether it is safe to use the |
|
111 variables associated with these representations). These flags are |
|
112 changed when calls are made to the @code{sysupdate} command. |
|
113 |
3294
|
114 @item tsam |
|
115 Discrete time sampling period (nonnegative scalar). |
|
116 @var{tsam} is set to 0 for continuous time systems. |
|
117 |
|
118 @item yd |
|
119 Discrete-time output list (vector) |
|
120 |
|
121 indicates which outputs are discrete time (i.e., |
|
122 produced by D/A converters) and which are continuous time. |
|
123 yd(ii) = 0 if output ii is continuous, = 1 if discrete. |
|
124 @end table |
|
125 |
|
126 The remaining variables of the system data structure are only present |
|
127 if the corresponding entry of the @code{sys} vector is true (=1). |
|
128 |
4167
|
129 @node sysstructtf |
3294
|
130 @subsection @code{tf} format variables |
|
131 |
|
132 @table @var |
|
133 @item num |
|
134 numerator coefficients (vector) |
|
135 |
|
136 @item den |
|
137 denominator coefficients (vector) |
|
138 |
|
139 @end table |
|
140 |
4167
|
141 @node sysstructzp |
3294
|
142 @subsection @code{zp} format variables |
3347
|
143 |
3294
|
144 @table @var |
|
145 @item zer |
|
146 system zeros (vector) |
|
147 |
|
148 @item pol |
|
149 system poles (vector) |
|
150 |
|
151 @item k |
|
152 leading coefficient (scalar) |
|
153 |
|
154 @end table |
|
155 |
4167
|
156 @node sysstructss |
3294
|
157 @subsection @code{ss} format variables |
3347
|
158 |
3294
|
159 @table @var |
3402
|
160 @item a |
|
161 @itemx b |
|
162 @itemx c |
|
163 @itemx d |
3294
|
164 The usual state-space matrices. If a system has both |
|
165 continuous and discrete states, they are sorted so that |
|
166 continuous states come first, then discrete states |
|
167 |
|
168 @strong{Note} some functions (e.g., @code{bode}, @code{hinfsyn}) |
|
169 will not accept systems with both discrete and continuous states/outputs |
|
170 |
|
171 @item stname |
|
172 names of system states (list of strings) |
|
173 |
|
174 @end table |
|
175 |
4167
|
176 @node sysinterface |
3294
|
177 @section System Construction and Interface Functions |
|
178 |
5016
|
179 Construction and manipulations of the @acronym{OCST} system data structure |
3402
|
180 (@pxref{sysstruct}) requires attention to many details in order |
3294
|
181 to ensure that data structure contents remain consistent. Users |
|
182 are strongly encouraged to use the system interface functions |
|
183 in this section. Functions for the formatted display in of system |
|
184 data structures are given in @ref{sysdisp}. |
|
185 |
|
186 @menu |
3347
|
187 * fir2sys:: |
|
188 * ss2sys:: |
|
189 * tf2sys:: |
|
190 * zp2sys:: |
|
191 * structaccess:: |
3294
|
192 @end menu |
|
193 |
4167
|
194 @node fir2sys |
3294
|
195 @subsection Finite impulse response system interface functions |
|
196 |
3346
|
197 @DOCSTRING(fir2sys) |
3294
|
198 |
3346
|
199 @DOCSTRING(sys2fir) |
3294
|
200 |
4167
|
201 @node ss2sys |
3294
|
202 @subsection State space system interface functions |
|
203 |
6551
|
204 @DOCSTRING(ss) |
|
205 |
3346
|
206 @DOCSTRING(ss2sys) |
3294
|
207 |
3346
|
208 @DOCSTRING(sys2ss) |
3294
|
209 |
4167
|
210 @node tf2sys |
3294
|
211 @subsection Transfer function system interface functions |
3347
|
212 |
6551
|
213 @DOCSTRING(tf) |
|
214 |
3346
|
215 @DOCSTRING(tf2sys) |
3294
|
216 |
3346
|
217 @DOCSTRING(sys2tf) |
3294
|
218 |
4167
|
219 @node zp2sys |
3294
|
220 @subsection Zero-pole system interface functions |
3347
|
221 |
6551
|
222 @DOCSTRING(zp) |
|
223 |
3346
|
224 @DOCSTRING(zp2sys) |
3294
|
225 |
3346
|
226 @DOCSTRING(sys2zp) |
3294
|
227 |
4167
|
228 @node structaccess |
3294
|
229 @subsection Data structure access functions |
|
230 |
3346
|
231 @DOCSTRING(syschnames) |
3294
|
232 |
3346
|
233 @DOCSTRING(syschtsam) |
3294
|
234 |
3346
|
235 @DOCSTRING(sysdimensions) |
3294
|
236 |
3346
|
237 @DOCSTRING(sysgetsignals) |
3294
|
238 |
3346
|
239 @DOCSTRING(sysgettype) |
3294
|
240 |
3346
|
241 @DOCSTRING(syssetsignals) |
3294
|
242 |
3346
|
243 @DOCSTRING(sysupdate) |
3294
|
244 |
3428
|
245 @DOCSTRING(minfo) |
|
246 |
|
247 @DOCSTRING(sysgettsam) |
|
248 |
4167
|
249 @node sysdisp |
3294
|
250 @section System display functions |
|
251 |
3346
|
252 @DOCSTRING(sysout) |
3294
|
253 |
3346
|
254 @DOCSTRING(tfout) |
3294
|
255 |
3346
|
256 @DOCSTRING(zpout) |
3294
|
257 |
4167
|
258 @node blockdiag |
3294
|
259 @section Block Diagram Manipulations |
|
260 |
3402
|
261 @xref{systime}. |
3294
|
262 |
|
263 Unless otherwise noted, all parameters (input,output) are |
|
264 system data structures. |
|
265 |
3346
|
266 @DOCSTRING(bddemo) |
3294
|
267 |
3346
|
268 @DOCSTRING(buildssic) |
3294
|
269 |
3346
|
270 @DOCSTRING(jet707) |
3294
|
271 |
3346
|
272 @DOCSTRING(ord2) |
3294
|
273 |
3346
|
274 @DOCSTRING(sysadd) |
3294
|
275 |
3346
|
276 @DOCSTRING(sysappend) |
3294
|
277 |
3346
|
278 @DOCSTRING(sysconnect) |
3294
|
279 |
3346
|
280 @DOCSTRING(syscont) |
3294
|
281 |
3346
|
282 @DOCSTRING(sysdisc) |
3294
|
283 |
3346
|
284 @DOCSTRING(sysdup) |
3294
|
285 |
3346
|
286 @DOCSTRING(sysgroup) |
3294
|
287 |
3346
|
288 @DOCSTRING(sysmult) |
3294
|
289 |
3346
|
290 @DOCSTRING(sysprune) |
3294
|
291 |
3346
|
292 @DOCSTRING(sysreorder) |
3294
|
293 |
3346
|
294 @DOCSTRING(sysscale) |
3294
|
295 |
3346
|
296 @DOCSTRING(syssub) |
3294
|
297 |
3346
|
298 @DOCSTRING(ugain) |
3294
|
299 |
3346
|
300 @DOCSTRING(wgt1o) |
3294
|
301 |
3428
|
302 @DOCSTRING(parallel) |
|
303 |
|
304 @DOCSTRING(sysmin) |
|
305 |
4167
|
306 @node numerical |
3294
|
307 @section Numerical Functions |
3347
|
308 |
3346
|
309 @DOCSTRING(are) |
3294
|
310 |
3346
|
311 @DOCSTRING(dare) |
3294
|
312 |
3428
|
313 @DOCSTRING(dre) |
|
314 |
3346
|
315 @DOCSTRING(dgram) |
3294
|
316 |
3346
|
317 @DOCSTRING(dlyap) |
3294
|
318 |
3346
|
319 @DOCSTRING(gram) |
3294
|
320 |
3346
|
321 @DOCSTRING(lyap) |
3294
|
322 |
3346
|
323 @DOCSTRING(qzval) |
3294
|
324 |
3346
|
325 @DOCSTRING(zgfmul) |
3347
|
326 |
3346
|
327 @DOCSTRING(zgfslv) |
3347
|
328 |
3346
|
329 @DOCSTRING(zginit) |
3347
|
330 |
3346
|
331 @DOCSTRING(zgreduce) |
3347
|
332 |
3346
|
333 @DOCSTRING(zgrownorm) |
3347
|
334 |
3346
|
335 @DOCSTRING(zgscal) |
3347
|
336 |
3346
|
337 @DOCSTRING(zgsgiv) |
3347
|
338 |
3346
|
339 @DOCSTRING(zgshsr) |
3294
|
340 |
5016
|
341 @strong{References} |
3294
|
342 @table @strong |
|
343 @item ZGEP |
5016
|
344 Hodel, @cite{Computation of Zeros with Balancing}, 1992, Linear Algebra |
3294
|
345 and its Applications |
|
346 @item @strong{Generalized CG} |
5016
|
347 Golub and Van Loan, @cite{Matrix Computations, 2nd ed} 1989. |
3294
|
348 @end table |
|
349 |
4167
|
350 @node sysprop |
3294
|
351 @section System Analysis-Properties |
|
352 |
3346
|
353 @DOCSTRING(analdemo) |
3294
|
354 |
3346
|
355 @DOCSTRING(abcddim) |
3294
|
356 |
3346
|
357 @DOCSTRING(ctrb) |
3294
|
358 |
3346
|
359 @DOCSTRING(h2norm) |
3294
|
360 |
3346
|
361 @DOCSTRING(hinfnorm) |
3294
|
362 |
3346
|
363 @DOCSTRING(obsv) |
3294
|
364 |
3346
|
365 @DOCSTRING(pzmap) |
3294
|
366 |
3346
|
367 @DOCSTRING(is_abcd) |
3294
|
368 |
3346
|
369 @DOCSTRING(is_controllable) |
3294
|
370 |
3346
|
371 @DOCSTRING(is_detectable) |
3294
|
372 |
3346
|
373 @DOCSTRING(is_dgkf) |
3294
|
374 |
3346
|
375 @DOCSTRING(is_digital) |
3294
|
376 |
3346
|
377 @DOCSTRING(is_observable) |
3294
|
378 |
3346
|
379 @DOCSTRING(is_sample) |
3294
|
380 |
3346
|
381 @DOCSTRING(is_siso) |
3294
|
382 |
3346
|
383 @DOCSTRING(is_stabilizable) |
3294
|
384 |
3346
|
385 @DOCSTRING(is_signal_list) |
3294
|
386 |
3346
|
387 @DOCSTRING(is_stable) |
3294
|
388 |
4167
|
389 @node systime |
3294
|
390 @section System Analysis-Time Domain |
|
391 |
3346
|
392 @DOCSTRING(c2d) |
3294
|
393 |
3346
|
394 @DOCSTRING(d2c) |
3294
|
395 |
3346
|
396 @DOCSTRING(dmr2d) |
3294
|
397 |
3346
|
398 @DOCSTRING(damp) |
3294
|
399 |
3346
|
400 @DOCSTRING(dcgain) |
3294
|
401 |
3346
|
402 @DOCSTRING(impulse) |
3294
|
403 |
3346
|
404 @DOCSTRING(step) |
3294
|
405 |
4167
|
406 @node sysfreq |
3294
|
407 @section System Analysis-Frequency Domain |
|
408 |
|
409 @strong{Demonstration/tutorial script} |
3346
|
410 @DOCSTRING(frdemo) |
3294
|
411 |
3346
|
412 @DOCSTRING(bode) |
3294
|
413 |
3346
|
414 @DOCSTRING(bode_bounds) |
3294
|
415 |
3346
|
416 @DOCSTRING(freqchkw) |
3294
|
417 |
3346
|
418 @DOCSTRING(ltifr) |
3294
|
419 |
3346
|
420 @DOCSTRING(nyquist) |
3294
|
421 |
6551
|
422 @DOCSTRING(nichols) |
|
423 |
3346
|
424 @DOCSTRING(tzero) |
3294
|
425 |
3346
|
426 @DOCSTRING(tzero2) |
3294
|
427 |
4167
|
428 @node cacsd |
3294
|
429 @section Controller Design |
|
430 |
3346
|
431 @DOCSTRING(dgkfdemo) |
3294
|
432 |
3346
|
433 @DOCSTRING(hinfdemo) |
3294
|
434 |
3346
|
435 @DOCSTRING(dlqe) |
3294
|
436 |
3346
|
437 @DOCSTRING(dlqr) |
3294
|
438 |
3705
|
439 @DOCSTRING(dkalman) |
|
440 |
3346
|
441 @DOCSTRING(h2syn) |
3294
|
442 |
3346
|
443 @DOCSTRING(hinf_ctr) |
3294
|
444 |
3346
|
445 @DOCSTRING(hinfsyn) |
3294
|
446 |
3346
|
447 @DOCSTRING(hinfsyn_chk) |
3294
|
448 |
3428
|
449 @DOCSTRING(hinfsyn_ric) |
|
450 |
3346
|
451 @DOCSTRING(lqe) |
3294
|
452 |
3346
|
453 @DOCSTRING(lqg) |
3294
|
454 |
3346
|
455 @DOCSTRING(lqr) |
3294
|
456 |
3346
|
457 @DOCSTRING(lsim) |
3294
|
458 |
3346
|
459 @DOCSTRING(place) |
3294
|
460 |
4167
|
461 @node misc |
3294
|
462 @section Miscellaneous Functions (Not yet properly filed/documented) |
|
463 |
3346
|
464 @DOCSTRING(axis2dlim) |
3294
|
465 |
3346
|
466 @DOCSTRING(moddemo) |
3294
|
467 |
3346
|
468 @DOCSTRING(prompt) |
3294
|
469 |
3346
|
470 @DOCSTRING(rldemo) |
3294
|
471 |
3346
|
472 @DOCSTRING(rlocus) |
3294
|
473 |
3346
|
474 @DOCSTRING(sortcom) |
3294
|
475 |
3346
|
476 @DOCSTRING(ss2tf) |
3294
|
477 |
3346
|
478 @DOCSTRING(ss2zp) |
3294
|
479 |
3346
|
480 @DOCSTRING(starp) |
3294
|
481 |
3346
|
482 @DOCSTRING(tf2ss) |
3294
|
483 |
3346
|
484 @DOCSTRING(tf2zp) |
3294
|
485 |
3346
|
486 @DOCSTRING(zp2ss) |
3294
|
487 |
3346
|
488 @DOCSTRING(zp2tf) |
3294
|
489 |