Previous: cacsd, Up: Control Theory

— Function File: **axis2dlim** (`axdata`)

Determine axis limits for 2-D data (column vectors); leaves a 10% margin around the plots. Inserts margins of +/- 0.1 if data is one-dimensional (or a single point).

Input

axdatanby 2 matrix of data [x,y].

Output

axvec- Vector of axis limits appropriate for call to
axisfunction.

— Function File: **prompt** (`str`)

Prompt user to continue

Input

str- Input string. Its default value is:
\n ---- Press a key to continue ---

— Function File: [`rldata`, `k`] = **rlocus** (`sys`[`, increment, min_k, max_k`])

Displays root locus plot of the specified SISO system.

----- --- -------- --->| + |---|k|---->| SISO |-----------> ----- --- -------- | - ^ | |_____________________________|

Inputs

sys- system data structure
min_k- Minimum value of
kmax_k- Maximum value of
kincrement- The increment used in computing gain values

OutputsPlots the root locus to the screen.

rldata- Data points plotted: in column 1 real values, in column 2 the imaginary values.
k- Gains for real axis break points.

— Function File: [`yy`, `idx`] = **sortcom** (`xx`[`, opt`])

Sort a complex vector.

Inputs

xx- Complex vector
opt- sorting option:
if

`"re"`

- Real part (default);
`"mag"`

- By magnitude;
`"im"`

- By imaginary part.
optis not chosen as`"im"`

, then complex conjugate pairs are grouped together, a - jb followed by a + jb.

Outputs

yy- Sorted values
idx- Permutation vector:
`yy = xx(idx)`

— Function File: [`num`, `den`] = **ss2tf** (`a, b, c, d`)

Conversion from tranfer function to state-space. The state space system:

. x = Ax + Bu y = Cx + Duis converted to a transfer function:

num(s) G(s)=------- den(s)used internally in system data structure format manipulations.

— Function File: [`pol`, `zer`, `k`] = **ss2zp** (`a, b, c, d`)

Converts a state space representation to a set of poles and zeros;

kis a gain associated with the zeros.Used internally in system data structure format manipulations.

— Function File: **starp** (`P, K, ny, nu`)

Redheffer star product or upper/lower LFT, respectively.

+-------+ --------->| |---------> | P | +--->| |---+ ny | +-------+ | +-------------------+ | | +----------------+ | | | | +-------+ | +--->| |------+ nu | K | --------->| |---------> +-------+If

nyandnu“consume” all inputs and outputs ofKthen the result is a lower fractional transformation. Ifnyandnu“consume” all inputs and outputs ofPthen the result is an upper fractional transformation.

nyand/ornumay be negative (i.e. negative feedback).

— Function File: [`a`, `b`, `c`, `d`] = **tf2ss** (`num, den`)

Conversion from tranfer function to state-space. The state space system:

. x = Ax + Bu y = Cx + Duis obtained from a transfer function:

num(s) G(s)=------- den(s)The vector

denmust contain only one row, whereas the vectornummay contain as many rows as there are outputsyof the system. The state space system matrices obtained from this function will be in controllable canonical form as described in Modern Control Theory, (Brogan, 1991).

— Function File: [`zer`, `pol`, `k`] = **tf2zp** (`num, den`)

Converts transfer functions to poles-and-zero representations.

Returns the zeros and poles of the SISO system defined by

num/den.kis a gain associated with the system zeros.

— Function File: [`a`, `b`, `c`, `d`] = **zp2ss** (`zer, pol, k`)

Conversion from zero / pole to state space.

Inputs

zerpol- Vectors of (possibly) complex poles and zeros of a transfer function. Complex values must come in conjugate pairs (i.e., x+jy in
zermeans that x-jy is also inzer). The number of zeros must not exceed the number of poles.k- Real scalar (leading coefficient).

Outputs

abcd- The state space system, in the form:
. x = Ax + Bu y = Cx + Du