[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
See section System Analysis-Time Domain.
Unless otherwise noted, all parameters (input,output) are system data structures.
Octave Controls toolbox demo: Block Diagram Manipulations demo.
Form an arbitrary complex (open or closed loop) system in
state-space form from several systems. buildssic
can
easily (despite its cryptic syntax) integrate transfer functions
from a complex block diagram into a single system with one call.
This function is especially useful for building open loop
interconnections for
designs or for closing loops with these controllers.
Although this function is general purpose, the use of sysgroup
sysmult
, sysconnect
and the like is recommended for
standard operations since they can handle mixed discrete and continuous
systems and also the names of inputs, outputs, and states.
The parameters consist of 4 lists that describe the connections outputs and inputs and up to 8 systems s1-s8. Format of the lists:
connection list, describes the input signal of each system. The maximum number of rows of Clst is equal to the sum of all inputs of s1-s8.
Example:
[1 2 -1; 2 1 0]
means that: new input 1 is old input 1
+ output 2 - output 1, and new input 2 is old input 2
+ output 1. The order of rows is arbitrary.
if not empty the old inputs in vector ulst will be appended to the outputs. You need this if you want to "pull out" the input of a system. Elements are input numbers of s1-s8.
output list, specifiy the outputs of the resulting systems. Elements are output numbers of s1-s8. The numbers are allowed to be negative and may appear in any order. An empty matrix means all outputs.
input list, specifiy the inputs of the resulting systems. Elements are input numbers of s1-s8. The numbers are allowed to be negative and may appear in any order. An empty matrix means all inputs.
Example: Very simple closed loop system.
w e +-----+ u +-----+ --->o--*-->| K |--*-->| G |--*---> y ^ | +-----+ | +-----+ | - | | | | | | +----------------> u | | | | +-------------------------|---> e | | +----------------------------+ |
The closed loop system GW can be optained by
GW = buildssic([1 2; 2 -1], 2, [1 2 3], 2, G, K); |
1st row: connect input 1 (G) with output 2 (K).
2nd row: connect input 2 (K) with negative output 1 (G).
Append input of 2 (K) to the number of outputs.
Outputs are output of 1 (G), 2 (K) and appended output 3 (from ulst).
The only input is 2 (K).
Here is a real example:
+----+ -------------------->| W1 |---> v1 z | +----+ ----|-------------+ | | | +---+ v +----+ *--->| G |--->O--*-->| W2 |---> v2 | +---+ | +----+ | | | v u y |
The closed loop system GW can be obtained by (all SISO systems):
GW = buildssic([1, 4; 2, 4; 3, 1], 3, [2, 3, 5], [3, 4], G, W1, W2, One); |
where "One" is a unity gain (auxillary) function with order 0.
(e.g. One = ugain(1);
)
Creates a linearized state-space model of a Boeing 707-321 aircraft at v=80 m/s
System inputs: (1) thrust and (2) elevator angle.
System outputs: (1) airspeed and (2) pitch angle.
Reference: R. Brockhaus: Flugregelung (Flight Control), Springer, 1994.
Creates a continuous 2nd order system with parameters:
Inputs
natural frequency [Hz]. (not in rad/s)
damping coefficient
dc-gain This is steady state value only for damp > 0. gain is assumed to be 1.0 if ommitted.
Output
system data structure has representation with
/ \ | / -2w*damp -w \ / w \ | G = | | |, | |, [ 0 gain ], 0 | | \ w 0 / \ 0 / | \ / |
See also jet707
(MIMO example, Boeing 707-321
aircraft model)
returns sys = gsys + hsys.
________ ----| gsys |--- u | ---------- +| ----- (_)----> y | ________ +| ----| hsys |--- -------- |
appends new inputs and/or outputs to a system
Inputs
system data structure
matrix to be appended to sys "B" matrix (empty if none)
matrix to be appended to sys "C" matrix (empty if none)
revised sys d matrix (can be passed as [] if the revised d is all zeros)
list of names for new outputs
list of names for new inputs
binary vector; yd(ii)=0 indicates a continuous output; yd(ii)=1 indicates a discrete output.
Outputs
sys.b := [syst.b , b] sys.c := [syst.c ] [ c ] sys.d := [syst.d | D12 ] [ D21 | D22 ] |
where D12, D21, and D22 are the appropriate dimensioned blocks of the input parameter d.
zeros(1,rows(c))
ones(1,rows(c))
Close the loop from specified outputs to respective specified inputs
Inputs
System data structure.
Names or indices of signals to connect (see sysidx
).
The output specified by out_idx(ii) is connected to the input
specified by in_idx(ii).
logical flag (default = 0)
0
Leave inputs and outputs in their original order.
1
Permute inputs and outputs to the order shown in the diagram below.
Tolerance for singularities in algebraic loops, default: 200eps
.
Outputs
Resulting closed loop system.
Method
sysconnect
internally permutes selected inputs, outputs as shown
below, closes the loop, and then permutes inputs and outputs back to their
original order
-------------------- u_1 ----->| |----> y_1 | sys | old u_2 | | u_2* ---->(+)--->| |----->y_2 (in_idx) ^ -------------------- | (out_idx) | | ------------------------------- |
The input that has the summing junction added to it has an * added to the end of the input name.
Extract the purely continuous subsystem of an input system.
Input
system data structure.
Outputs
is the purely continuous input/output connections of sys
connections from discrete states to continuous states, discrete states to continuous outputs, respectively.
returns csys empty if no continuous/continous path exists
Input
System data structure.
Outputs
Purely discrete portion of sys (returned empty if there is no purely discrete path from inputs to outputs).
Connections from continuous states to discrete states and discrete. outputs, respectively.
Duplicate specified input/output connections of a system
Inputs
system data structure
indices or names of desired signals (see sigidx
).
duplicates are made of y(out_idx(ii))
and u(in_idx(ii))
.
Output
Resulting closed loop system:
duplicated i/o names are appended with a "+"
suffix.
Method
sysdup
creates copies of selected inputs and outputs as
shown below. u1, y1 is the set of original inputs/outputs, and
u2, y2 is the set of duplicated inputs/outputs in the order
specified in in_idx, out_idx, respectively
____________________ u1 ----->| |----> y1 | asys | u2 ------>| |----->y2 (in_idx) -------------------- (out_idx) |
Combines two systems into a single system.
Inputs
System data structures.
Output
sys = block diag(asys,bsys)
__________________ | ________ | u1 ----->|--> | asys |--->|----> y1 | -------- | | ________ | u2 ----->|--> | bsys |--->|----> y2 | -------- | ------------------ Ksys |
The function also rearranges the internal state-space realization of sys so that the continuous states come first and the discrete states come last. If there are duplicate names, the second name has a unique suffix appended on to the end of the name.
Compute sys = Asys*Bsys (series connection):
u ---------- ---------- --->| Bsys |---->| Asys |---> ---------- ---------- |
A warning occurs if there is direct feed-through from an input or a continuous state of Bsys, through a discrete output of Bsys, to a continuous state or output in Asys (system data structure does not recognize discrete inputs).
Extract specified inputs/outputs from a system
Inputs
system data structure
Indices or signal names of the outputs and inputs to be kept in the returned system; remaining connections are "pruned" off. May select as [] (empty matrix) to specify all outputs/inputs.
retsys = sysprune (Asys, [1:3,4], "u_1"); retsys = sysprune (Asys, {"tx", "ty", "tz"}, 4); |
Output
Resulting system.
____________________ u1 ------->| |----> y1 (in_idx) | Asys | (out_idx) u2 ------->| |----| y2 (deleted)-------------------- (deleted) |
Inputs
Vector length.
A subset of [1:vlen]
.
Output
A permutation vector to order elements of [1:vlen]
in
list
to the end of a vector.
Used internally by sysconnect
to permute vector elements to their
desired locations.
scale inputs/outputs of a system.
Inputs
Structured system.
Constant matrices of appropriate dimension.
Lists of strings with the names of respectively outputs and inputs.
Output
resulting open loop system:
----------- ------- ----------- u --->| inscale |--->| sys |--->| outscale |---> y ----------- ------- ----------- |
If the input names and output names (each a list of strings) are not given and the scaling matrices are not square, then default names will be given to the inputs and/or outputs.
A warning message is printed if outscale attempts to add continuous system outputs to discrete system outputs; otherwise yd is set appropriately in the returned value of sys.
Return sys = Gsys - Hsys.
Method
Gsys and Hsys are connected in parallel. The input vector is connected to both systems; the outputs are subtracted. Returned system names are those of Gsys.
+--------+ +--->| Gsys |---+ | +--------+ | | +| u --+ (_)--> y | -| | +--------+ | +--->| Hsys |---+ +--------+ |
Creates a system with unity gain, no states.
This trivial system is sometimes needed to create arbitrary
complex systems from simple systems with buildssic
.
Watch out if you are forming sampled systems since ugain
does not contain a sampling period.
State space description of a first order weighting function.
Weighting function are needed by the
design procedure.
These function are part of the augmented plant P
(see hinfdemo
for an application example).
Inputs
Gain at low frequencies.
Gain at high frequencies.
Corner frequency (in Hz, not in rad/sec)
Output
Weighting function, given in form of a system data structure.
Forms the parallel connection of two systems.
-------------------- | -------- | u ----->|----> | asys |--->|----> y1 | | -------- | | | -------- | |--->|----> | bsys |--->|----> y2 | -------- | -------------------- ksys |
Returns a minimal (or reduced order) system
Inputs
System data structure
When equal to 0 (default value), returns minimal system, in which state names are lost; when equal to 1, returns system with physical states removed that are either uncontrollable or unobservable (cannot reduce further without discarding physical meaning of states).
Outputs
Returned system.
Number of controllable states in the returned system.
Number of observable states in the returned system.
is_controllable(retsys)
.
is_observable(retsys)
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated on July, 20 2006 using texi2html 1.76.