control

Computer-Aided Control System Design (CACSD) Tools for GNU Octave, based on the proven SLICOT Library

Select category:

Examples

MDSSystem
Robust control of a mass-damper-spring system.
optiPID
Numerical optimization of a PID controller using an objective function.
Anderson
Frequency-weighted coprime factorization controller reduction.
Madievski
Demonstration of frequency-weighted controller reduction.
VLFamp
Calculations on a two stage preamp for a multi-turn, air-core solenoid loop antenna for the reception of signals below 30kHz.

Linear Time Invariant Models

dss
Create or convert to descriptor state-space model.
filt
Create discrete-time transfer function model from data in DSP format.
frd
Create or convert to frequency response data.
ss
Create or convert to state-space model.
tf
Create or convert to transfer function model.
zpk
Create transfer function model from zero-pole-gain data.

Model Data Access

@lti/dssdata
Access descriptor state-space model data.
@lti/filtdata
Access discrete-time transfer function data in DSP format.
@lti/frdata
Access frequency response data.
@lti/get
Access key values of LTI objects.
@lti/set
Set or modify properties of LTI objects.
@lti/ssdata
Access state-space model data.
@lti/tfdata
Access transfer function data.
@lti/zpkdata
Access zero-pole-gain data.

Model Conversions

@lti/c2d
Convert the continuous LTI model into its discrete-time equivalent.
@lti/d2c
Convert the discrete LTI model into its continuous-time equivalent.
@lti/d2d
Resample discrete-time LTI model to sampling time TSAM.
@lti/prescale
Scale state-space model.
@lti/xperm
Reorder states in state-space models.
@ss/ss2ss
Applies the similarity transformation T to a state-space model

Model Interconnections

append
Group LTI models by appending their inputs and outputs.
@lti/blkdiag
Block-diagonal concatenation of LTI models.
@lti/connect
Name-based or index-based interconnections between the inputs and outputs of LTI models.
@lti/feedback
Feedback connection of two LTI models.
@lti/lft
Linear fractional tranformation, also known as Redheffer star product.
@lti/mconnect
Arbitrary interconnections between the inputs and outputs of an LTI model.
@lti/parallel
Parallel connection of two LTI systems.
@lti/series
Series connection of two LTI models.
sumblk
Create summing junction S from string FORMULA for name-based interconnections.

Model Characteristics

ctrb
Return controllability matrix.
ctrbf
If Co=ctrb(A,B) has rank r <= n = SIZE(A,1), then there is a similarity transformation Tc such that Tc = [t1 t2] where t1 is the controllable subspace and t2 is orthogonal to t1
damp
Calculate natural frequencies, damping ratios and poles.
dsort
Sort discrete-time poles by magnitude (in decreasing order).
esort
Sort continuous-time poles by real part (in decreasing order).
@lti/dcgain
Compute the DC gain of LTI system.
gram
'gram (SYS, "c")' returns the controllability gramian of the (continuous- or discrete-time) system SYS. 'gram (SYS, "o")' returns the observability gramian of the (continuous- or discrete-time) sy...
hsvd
Hankel singular values of the stable part of an LTI model.
@lti/isct
Determine whether LTI model is a continuous-time system.
isctrb
Logical check for system controllability.
isdetectable
Logical test for system detectability.
@lti/isdt
Determine whether LTI model is a discrete-time system.
@lti/isminimumphase
Determine whether LTI system has asymptotically stable zero dynamics.
isobsv
Logical check for system observability.
@lti/issiso
Determine whether LTI model is single-input/single-output (SISO).
isstabilizable
Logical check for system stabilizability.
@lti/isstable
Determine whether LTI system is stable.
@lti/norm
Return H-2 or L-inf norm of LTI model.
obsv
Return observability matrix.
obsvf
If Ob=obsv(A,C) has rank r <= n = SIZE(A,1), then there is a similarity transformation Tc such that To = [t1;t2] where t1 is c and t2 is orthogonal to t1
@lti/pole
Compute poles of LTI system.
pzmap
Plot the poles and zeros of an LTI system in the complex plane.
@lti/size
LTI model size, i.e. number of outputs and inputs.
@lti/zero
Compute zeros and gain of LTI model.

Model Simplification

@lti/minreal
Minimal realization or zero-pole cancellation of LTI models.
@lti/sminreal
Perform state-space model reduction based on structure.

Time Domain Analysis

covar
Return the steady-state covariance.
gensig
Generate periodic signal.
impulse
Impulse response of LTI system.
imp_invar
Converts analog filter with coefficients B and A and/or SYS_IN to digital, conserving impulse response.
initial
Initial condition response of state-space model.
lsim
Simulate LTI model response to arbitrary inputs.
ramp
Ramp response of LTI system.
step
Step response of LTI system.

Frequency Domain Analysis

bode
Bode diagram of frequency response.
bodemag
Bode magnitude diagram of frequency response.
@lti/freqresp
Evaluate frequency response at given frequencies.
margin
Gain and phase margin of a system.
nichols
Nichols chart of frequency response.
nyquist
Nyquist diagram of frequency response.
sensitivity
Return sensitivity margin MS.
sgrid
Control the display of s-plane grid with : - zeta lines corresponding to damping ratios and - omega circles corresponding to undamped natural frequencies
sigma
Singular values of frequency response.

Pole Placement

acker
Calculates the state feedback matrix of a completely controllable SISO system using Ackermann's formula
place
Pole assignment for a given matrix pair (A,B) such that 'p = eig (A-B*F)'.
rlocus
Display root locus plot of the specified SISO system.
rlocusx
Interactive root locus plot of the specified SISO system SYS.

Optimal Control

augstate
Append state vector x of system SYS to output vector y.
dlqe
Kalman filter for discrete-time systems.
dlqr
Linear-quadratic regulator for discrete-time systems.
estim
Return state estimator for a given estimator gain.
kalman
Design Kalman estimator for LTI systems.
lqe
Kalman filter for continuous-time systems.
lqr
Linear-quadratic regulator.

Robust Control

augw
Extend plant for stacked S/KS/T problem.
fitfrd
Fit frequency response data with a state-space system.
h2syn
H-2 control synthesis for LTI plant.
hinfsyn
H-infinity control synthesis for LTI plant.
mixsyn
Solve stacked S/KS/T H-infinity problem.
mktito
Partition LTI plant P for robust controller synthesis.
ncfsyn
Loop shaping H-infinity synthesis.

Matrix Equation Solvers

care
Solve continuous-time algebraic Riccati equation (ARE).
dare
Solve discrete-time algebraic Riccati equation (ARE).
dlyap
Solve discrete-time Lyapunov or Sylvester equations.
dlyapchol
Compute Cholesky factor of discrete-time Lyapunov equations.
lyap
Solve continuous-time Lyapunov or Sylvester equations.
lyapchol
Compute Cholesky factor of continuous-time Lyapunov equations.

Model Reduction

bstmodred
Model order reduction by Balanced Stochastic Truncation (BST) method.
btamodred
Model order reduction by frequency weighted Balanced Truncation Approximation (BTA) method.
hnamodred
Model order reduction by frequency weighted optimal Hankel-norm (HNA) method.
spamodred
Model order reduction by frequency weighted Singular Perturbation Approximation (SPA).

Controller Reduction

btaconred
Controller reduction by frequency-weighted Balanced Truncation Approximation (BTA).
cfconred
Reduction of state-feedback-observer based controller by coprime factorization (CF).
fwcfconred
Reduction of state-feedback-observer based controller by frequency-weighted coprime factorization (FW CF).
spaconred
Controller reduction by frequency-weighted Singular Perturbation Approximation (SPA).

Experimental Data Handling

iddata
Create identification dataset of output and input signals.
@iddata/cat
Concatenate iddata sets along dimension DIM.
@iddata/detrend
Detrend outputs and inputs of dataset DAT by removing the best fit of a polynomial of order ORD.
@iddata/diff
Return K-th difference of outputs and inputs of dataset DAT.
@iddata/fft
Transform iddata objects from time to frequency domain using a Fast Fourier Transform (FFT) algorithm.
@iddata/filter
Filter output and input signals of dataset DAT.
@iddata/get
Access key values of iddata objects.
@iddata/ifft
Transform iddata objects from frequency to time domain.
@iddata/merge
Concatenate experiments of iddata datasets.
@iddata/nkshift
Shift input channels of dataset DAT according to integer NK.
@iddata/plot
Plot signals of iddata identification datasets on the screen.
@iddata/resample
Change the sample rate of the output and input signals in dataset DAT by a factor of 'p/q'.
@iddata/set
Set or modify keys of iddata objects.
@iddata/size
Return dimensions of iddata set DAT.

System Identification

arx
Estimate ARX model using QR factorization.
moen4
Estimate state-space model using combined subspace method: MOESP algorithm for finding the matrices A and C, and N4SID algorithm for finding the matrices B and D.
moesp
Estimate state-space model using MOESP algorithm.
n4sid
Estimate state-space model using N4SID algorithm.

Overloaded LTI Operators

@lti/ctranspose
Conjugate transpose or pertransposition of LTI objects.
@lti/end
End indexing for LTI objects.
@lti/horzcat
Horizontal concatenation of LTI objects.
@lti/inv
Inversion of LTI objects.
@lti/minus
Binary subtraction of LTI objects.
@lti/mldivide
Matrix left division of LTI objects.
@lti/mpower
Matrix power of LTI objects.
@lti/mrdivide
Matrix right division of LTI objects.
@lti/mtimes
Matrix multiplication of LTI objects.
@lti/plus
Binary addition of LTI objects.
@lti/repmat
Form a block transfer matrix of SYS with M copies vertically and N copies horizontally.
@lti/subsasgn
Subscripted assignment for LTI objects.
@lti/subsref
Subscripted reference for LTI objects.
@lti/times
Hadamard/Schur product of transfer function matrices.
@lti/transpose
Transpose of LTI objects.
@lti/uminus
Unary minus of LTI object.
@lti/uplus
Unary plus of LTI object.
@lti/vertcat
Vertical concatenation of LTI objects.

Overloaded IDDATA Operators

@iddata/end
End indexing for IDDATA objects.
@iddata/horzcat
Horizontal concatenation of iddata datasets.
@iddata/subsasgn
Subscripted assignment for iddata objects.
@iddata/subsref
Subscripted reference for iddata objects.
@iddata/vertcat
Vertical concatenation of iddata datasets.

Miscellaneous

@ss/display
Display routine for SS objects.
db2mag
Convert Decibels (dB) to Magnitude.
mag2db
Convert Magnitude to Decibels (dB).
options
Create options struct OPT from a number of key and value pairs.
pid
Return the transfer function C of the PID controller in parallel form with first-order roll-off.
pidstd
Return the transfer function C of the PID controller in standard form with first-order roll-off.
repsys
Form a block transfer matrix of SYS with M copies vertically and N copies horizontally.
strseq
Return a cell vector of indexed strings by appending the indices IDX to the string STR.
test_control
Execute all available tests at once.
thiran
Approximation of continuous-time delay using a discrete-time allpass Thiran filter.
BMWengine
Model of the BMW 4-cylinder engine at ETH Zurich's control laboratory.
Boeing707
Creates a linearized state-space model of a Boeing 707-321 aircraft at V=80 m/s (M = 0.26, GA0 = -3 deg, ALPHA0 = 4 deg, KAPPA = 50 deg).
WestlandLynx
Model of the Westland Lynx Helicopter about hover.

Package: control