CS1 Notes
CS1 Notes
CS1 Notes
d
from differential equation to dt z and output-function w(t)
1.1 Normalisation
u(t) : input
d
x(t) = f0 (x(t), u(t)) y(t) = g0 (x(t), u(t)) x(t) : state
dt y(t) : output
d d
To get from dt z and output-function w(t) to dt x and y(t), just replace zi (t), v(t) and wi (t) with the following:
v(t) w(t)
non-normalised model
v(t) = u(t) · v0
zi (t) = xi (t) · z0,i
× normalised × w(t)
wi (t) = yi (t) · w0,1 ÷ model ×
v0 w0
z0 , w0 , v0 : normalization constants, can be chosen freely! (in general chosen to put x, y and u in the same magnitude range)
1.2 Linearisation
d
equilibrium point {xe , ue }: where all dt xi (t) = f0 (xe , ue ) = 0 (B Ax = 0, if already linearised)
∂f u=ue ∂f0,1 u=ue
∂fu=ue
0,1
... 0,1
∂x1x=xe ∂xn x=xe ∂u
x=xe
∂f0 u=ue . .. .. ∂f0 u=ue .
A= =
.. . .
∈ Rn×n
b= =
.
.
∈ Rn×1
∂x x=xe
∂f0,n u=ue
∂f0,n u=ue
∂u x=xe
∂f0,n u=ue
∂x1 x=xe ... ∂xn x=xe ∂u x=xe
∂g0 u=ue h i ∂g0 u=ue h u=u i
∂g0 u=ue ∂g0 u=ue 0
1×n
= ∂g 1×1
e
c= = ∂x 1 x=xe
... ∂xn x=xe ∈ R d= ∂u x=xe ∈ R
∂x x=xe ∂u x=xe
plug the matrices A, b, c, d into the linear state space form to get the linearised model ẋ = A · x + bu y = c · x + du
u(t) y(t)
non-linearised model
xi (t) = xi,e + δxi (t) |δxi (t)| 1
u(t) = ue + δu(t) |δu(t)| 1
+ linearised + y(t)
y(t) = ye + δy(t) |δy(t)| 1 - model +
ue ye
1
2 Analysis of Linear Systems
2.1 First-Order Systems
strictly-proper (d = 0) first-order system (x = scalar):
d 1 k τ : time constant
x(t) = − · x(t) + · u(t)
dt τ τ k : gain
y(t) = x(t)
tangent of y(t) passes through {τ, 0}(⇔ {1, 0}) for all x0
tangent of y(t) passes through {τ, k}(⇔ {1, 1}) for all x0
t
x 0 = 2.5k
Ramp Response
yp (t) = e−t/τ · x0 + k · (t + (e−t/τ − 1) · τ )
x0= 0
yp (t) approaches the delayed ramp signal p(t − τ ) for all x0
y (t)
8
Harmonic Response
k
yc (t) = e−t/τ · x0 + (cos(ω + t) + ω · τ · sin(ω · t) − e−t/τ ) ·
1 + ω2 · τ 2
steady-state signal y∞ of a linear system has the same frequency as the excitation signal c(t), only m(ω) and ϕ(ω) differ
2
2.2 Lyapunov Stability
to determine the Lyapunov stability, only the A matrix of the state-space form needs to be regarded
calculate all eigenvalues λi of A and determine the stability class with the following table
⇒ for non-critical cases (all σi < 0 or at least one σi > 0), we can determine the stability class by analysing its linearisation
(asymptotically stable or unstable, not stable), but it is only a local concept for non-linear systems
oscillation of the system response is only possible when the system has complex conjugated eigenvalues
d
The matrices Amin , bmin , cmin and dmin are from the Controller canonical form. Get dt x(t) and y(t) as follows:
d
x(t) = Amin · x(t) + bmin · u(t) ; y(t) = cmin · x(t) + d · u(t)
dt
3
2.3 Reachability, Observability and Stabilisability
Reachability if ∃ u(xr ) that controls the system’s state vector starting at x(0) = 0 in finite time τ to this point x(τ ) = xr
Controllability if ∃ u(xc ) that forces the system’s state vector starting at x(0) = xc in finite time τ to the origin x(τ ) = 0
Observability if it is possible to reconstruct the initial conditions x(0) by analysing the output signal y(t) with u(t) = 0
Potentially Stabilizable an (unstable) system is potentially stabilizable if un-controllable state variables are asymp. stable
Detectability a system is detectable if all of its unobservable modes are asymptotically stable (if fully observable →
detectable)
Stabilisability an (unstable) system is stabilizable, if the system is potentially stabilizable and detectable
if its rank r < n, then only an r-dimensional (linear) sub-space is reachable (controllable)
if any vector component of b is equal to zero, then the corresponding state variable is not reachable/con-
trollable. For minimal realisation, get rid of the corresponding column in the Matrix A and the vector c
if any vector component of c is equal to zero, then the corresponding state variable is not observ-
able. For minimal realisation, get rid of the corresponding row in the Matrix A and the vector b
4
2.5 I/O Description
1y (n) (t) + an−1 · y (n−1) (t) + . . . + a1 · y (1) (t) + a0 · y(t) = bm · u(m) (t) + . . . + b1 · u(1) (t) + b0 · u(t)
external or input-output formulation of a system (in practice m 6 n, total number of coefficients: m + n + 1, no information
about physically meaningful coordinates)
5
3 Transfer Functions
3.1 Derivation Of Transfer Functions
3.1.1 Transfer Functions From State-Space Form
bm · sm + . . . + b1 · s + b0 b(s)
Σ(s) = +d=
sn + an−1 · sn−1 + . . . + a1 · s + a0 a(s)
coefficients ai and bi can be read directly from the I/O description (Kap. 2.5 S. 5)
to transform it into state-space form, we can use the controller-canonical form as well (same coefficients)
all poles of Σ have to be eigenvalues of A, but not all eigenvalues of A have to be poles → cancellation (b(s) and a(s) have
common roots) → non-minimal realization of Σ
3.2.1 Transfer Functions in Series 3.2.2 Transfer Functions Parallel 3.2.3 Transfer Functions Feedback
+
_
+
_
Σ = Σ2 · Σ1
Σ = Σ1 +
− Σ2 Σ = Σ1 · (1 −
+ Σ2 · Σ1 )−1
6
3.3 Overview of System Representations and Transformations
TD FD
d
SP x(t) = A · x(t) + b · u(t) Y (s) = (c · (s · I − A)−1 · b + d) · U (s)
dt
y(t) = c · x(t) + d · u(t)
bm · sm + . . . + b0
I/O 1y (n) (t) + a0 · y(t) = bm · u(m) (t) + . . . + b0 · u(t) Y (s) = · U (s)
sn + . . . + a1 · s + a0
ODE (ordinary
Z t
differential Solution in TD
c · eA·t · x(0) + c · eA·(t−ρ) · b · u(ρ)dρ + d · u(t)
equation) in TD 0
(time domain)
(time domain)
I
1
c · (s · I − A)−1 · b + d · Y (s) · es·t ds
or directly from I/O 2 · πj
or with partial fractions
TF (transfer
Solution in FD
function) in FD Σ(s) · U (s)
(frequency domain)
(frequency domain)
1. The Laplace transform of the time-domain response is given by Y (s) = Σ(s) · U (s)
(U (s) is the input signal. impulse: U (s) = 1, step: U (s) = k/s, ramp: U (s) = 1/s2 )
complexe zero simple zero multiple zero complexe zero simple zero multiple zero
3. use the Laplace table below to transform the fractions from the frequency domain to the time domain
4. multiply the whole thing by h(t) for impuls and step. and by r(t) for a ramp.
7
3.5.1 Laplace Table
a s
sinh(at) cosh(at)
s2 − a2 s2 − a2
2as s2 + a2
t sinh(at) t cosh(at)
(s2 − a2 )2 (s2 − a2 )2
n! 1 1 n! 1 1
tn sinh(at), n∈N − tn cosh(at), n∈N +
2 (s − a)n+1 (s + a) n+1 2 (s − a)n+1 (s + a)n+1
b s−a
eat sin(bt) eat cos(bt)
(s − a)2 + b2 (s − a)2 + b2
b s−a
eat sinh(bt) eat cosh(bt)
(s − a)2 − b2 (s − a)2 − b2
2a2 s2 + 2a2
sin2 (at) cos2 (at)
s(s2 + 4a2 ) s(s2 + 4a2 )
2a2 s2 − 2a2
sinh2 (at) cosh2 (at)
s(s2 − 4a2 ) s(s2 − 4a2 )
s sin(b) + a cos(b) s cos(b) − a sin(b)
sin(a + bt) cos(a + bt)
s2 + a2 s2 + a2
s sinh(b) + a cosh(b) s cosh(b) + a sinh(b)
sinh(a + bt) cosh(a + bt)
s2 − a2 s2 − a2
2abs s(s2 + a2 + b2 )
sin(at) sin(bt) cos(at) cos(bt)
(s2 + (a + b)2 )(s2 + (a − b)2 ) (s2 + (a + b)2 )(s2 + (a − b)2 )
a(s2 + a2 − b2 )
sin(at) cos(bt)
(s2 + (a + b)2 )(s2 + (a − b)2 )
ξ(s) ξ(s)
1 given Σ(s) = = poles πi with multiplicity Φi
γ(s) (s − π1 )Φ1 · (s − π2 )Φ2 · . . . · (s − πp )Φp
2 multiply with Laplace transform of the input signal i.e. impulse: 1, step: 1/s
1 d(Φi −k)
Φi
3 calculate ρi,k = lim · (Σ(s) · (s − π i ) if Φi = 1 ρi = lim (Σ(s) · (s − πi )
s→πi (Φi − k)! ds(Φi −k) s→πi
residual ρi,k for pole πi with k = 1 . . . Φi
p X
X Φi p
X
ρi,k
4 TD-solution: σ(t) = · tk−1 · eπi ·t · h(t) if Φi = 1 σ(t) = ρi · eπi ·t · h(t)
i=1 k=1
(k − 1)! i=1
8
3.6 BIBO (Bounded Input Bounded Output) Stability
poles of Σ(s) → roots of the denominator
Lyapunov BIBO
stability of the autonomuos system ẋ(t) = Ax(t) of the I/O behaviour Y (s) = Σ(s) · U (s)
eig(A) → det(λ · I − A) = 0 poles of Σ(s) after all zero/pole cancellations
minimal realization Lyapunov asymptotically stable BIBO stable
Lyapunov stable
not BIBO stable
Lyapunov unstable
non-minimal realization Lyapunov asymptotically stable BIBO stable
Lyapunov stable BIBO stable (if all obsv./ctrb. modes are
Lyapunov unstable asymptotically stable, else: not BIBO stable)
(test with TF, cha. 3.1.1 p. 6)
2. order system:
(
ω02 ω0 = 2 · π/T0 naturalf requency p
Σ(s) = 2 poles: π1,2 = (−δ ± δ 2 − 1) · ω0
s + 2 · δ · ω0 · s + ω02 δ natural damping ratio
9
System Responses and Pole Location (impulse, step)
U (s) is the input signal. impulse: U (s) = 1, step: U (s) = k/s, ramp: U (s) = 1/s2
10
4 Frequency Responses
system excited by u(t) = cos(ω · t) → asymptotically approaches a steady-state behaviour
|Re| |Re|
Magnitude of a model: mΣ (ω ∗ ) = |Σ(jω ∗ )| Re
expl.: b (Re+jIm)a = b |Re+jIm|a = b
√
Re+jIma
Phase of a model: ϕΣ (ω ∗ ) = ∠Σ(jω ∗ ) expl.: ∠ bRe
(jIm)(Re+jIm)a = ∠(bRe)−∠(jIm)−a·∠(Re+jIm) = 0+ π2 +a·arctan Re
Im
11
4.2 Nyquist Diagram
4.2.1 Characteristics of Nyquist Diagrams
k
Σ(s) = → first-order system
τs + 1
Identification Properties φ8
1 Σ(s) → Σ(jω)
2 seperate Σ(jω) in its real- and imaginary parts (use conjugate-complex of the
ω0
denominator) → Σ(jω) = x(ω) + jy(ω)
φ = 90°
3 insert ω = 0
8 8
φ = 180°
calculate |x(0)| and |y(0)| → initial position of the Nyquist diagram ω8
ω0
4 insert ω = ∞
calculate |x(∞)| and |y(∞)| → final position of the Nyquist diagram
5 determine angle at Σ(j∞) via adding up the special influences ω0
12
4.3 Bode Diagram
Properties
√ √
m(ω)dB = 20 log10 |m(ω)| m(ω) 0.001 0.01 0.1 0.5 1/ 2 1 2 2 10 100
m(ω)dB m(ω)dB
m(ω) = 10 20
m(ω)dB -60 -40 -20 ≈ −6 ≈ −3 0 ≈3 ≈6 20 40
ω logarithmic scale only asymptotic, straight lines appear in Bode plots (grad = n · 20dB/dec)
• −→ + Σ(s) = Σ1 (s) · Σ2 (s) → m(ω) = m1 (ω) + m2 (ω)
ϕ in deg horizontal lines will always be at ϕ = n · 90◦
1 split Σ(s) into smaller terms (preferrably standard elements, first-order systems, . . . ) Σ(s) −→ Σ1 (s) · Σ2 (s) · . . .
P
2 ∀Σi (s) determine the static gains ki = Σi (0) → kdB = kdB,i (be careful, if there are any integrators)
draw a horizontal line at m(ω)dB = kΣ (grad 6= 0 if there are integrators)
3 make sure all Σi (s) are in the form (as + 1) → (s + b) −→ b((1/b)s + 1)
4 ∀Σi (s) determine the significant frequencies (poles, zeros, time delays, crossover, . . . )
mark all of these frequencies with a vertical line (be careful, if two or more conincide)
5 determine effect of all significant frequencies on the Bode diagram (magnitude/phase change)
magnitude plot: draw the gradient after each significant frequency (n · 20dB/dec), until they intersect
phase plot: draw the new phase relative to the old after each significant frequency (±n · 90◦ )
6 connect all lines, while adding curvature at points of discontinuity
13
Element Acronym: I Element Acronym: D Element Acronym: LP-1
d d
Internal Description: = T1 · u(t)
dt x(t)
Internal Description: y(t) = T · dt u(t) Internal Description: d
= − τ1 · x(t) + 1
· u(t)
dt x(t) τ
y(t) = x(t) y(t) = k · x(t)
Bode Diagram Analog/Digital Realization Bode Diagram Analog/Digital Realization Bode Diagram Analog/Digital Realization
Bode Diagram Analog/Digital Realization Bode Diagram Analog/Digital Realization Bode Diagram Analog/Digital Realization
Internal Description: d
− T1
· x(t) + 1
· u(t) Internal Description: y(t) = u(t − T )
d 1 dt x(t)
= T
Internal Description: dt x1 (t) = Ti · u(t) y(t) = 2 · x(t) − u(t)
d
y(t) = kp · u(t) + x1 (t) + Td · dt u(t)
0 ω=∞ ω=0 0 0
−1 1 T t T
kp Re t t
−δ(t) 1 Re
√ Re y(t)
ω = 1/ Ti Td y(t) −1 ω = l 2π/T
l = 0, 1, . . .
y(t)
1
t kp /Ti
ω kp Td δ(t) 1
↓ kp ω = 1/T 0 0
0 0 T t
T t
t −1
Bode Diagram Analog/Digital Realization Bode Diagram Analog/Digital Realization Bode Diagram Analog/Digital Realization
dB m(ω) dB m(ω)
dB m(ω)
Analog: use Padé elements
−20 dB/decade 20 dB/decade (allpass elements)
ω = 1/T as approximation
0
kp ω 0
1/Ti 1/Td ω
0 KTZ=integer(T/T s);
ω ...
... analog input(e k);
deg ϕ(ω) analog input(e k); ... u k=e alt(KTZ);
u k=e k*kp*(1+T s/(2*T i)+2*T d/T s)+ ...
deg ϕ(ω) analog output(u k);
deg ϕ(ω) analog input(e k);
+90 e k 1*kp*(T s/T i-4*T d/T s)+... u k=(e k-u k 1)*(T s-2*T)/(T s+2*T)+e k 1;
1/T for i=1:KTZ-1
e k 2*kp*(-1+T s/(2*T i)+2*T d/T s)+...
0 e alt(i+1)=e alt(i);
ω analog output(u k);
u k 2; −90 u k 1=u k;
ω end;
0 analog output(u k); e alt(1)=e k;
ω −180 e k 1=e k; −57.3 ...
u k 1=u k; ...
−90 e k 1=e k;
...
14
4.5 Asymptotic System Properties
bm sm + . . . + b1 s + b0
Σ(s) = (a0 6= 0)
sk (sn−k + an−1−k sn−1−k + . . . + a1 s + a0 )
Σ(jω) · (1 + ∆ · W2 (jω))
(
Nominal Model Σ(s)
Model
Uncertainty Model ∆ · W2 (s)
uncertainty generator ∆ |∆| =≤ 1, ∠∆ ∈ [−π, π]
uncertainty bound W2 (s)
radius |L(jω) · W2 (jω)|
1 measure the magnitude mi,k and the phase ϕi,k K times at each
frequency ωi
2 identify the nominal model Σ(jω) = m · ejϕ (i.e. average m and ϕ)
mi,k ·ejϕi,k
3 plot m i ·e
jϕi
− 1 (< |W2 (s)|, condition for measured system)
4 identify W2 (s) as an upper bound for the relative error
(in general this is the only step we need to do)
15
5 Analysis of Feedback Systems
Y (s) = S(s) D(s) + P (s)W (s) + T (s) R(s) − N (s)
we can’t change S(s) or T (s) without changing the other → changing L(s) is more predictable
in order to be asymptotically stable, all poles of T (s) need to have negative real part!
16
5.3 Nyquist Theorem
Let n+ be the number of poles with positive real part and n0 the number of poles with zero real part of the open loop
tranfer function L(s), and let nc be the number of encirclements of the point -1 by L(jω) counted positively in the
counter-clockwise direction when ω is changed from −∞ to ∞.
n0
Then the closed loop system T(s) is asymptotically stable if nc = + n+ .
2
n c = 0.5 n c = -2 nc = 0
17
5.4 Robustness of the Closed-Loop System
B -1 is the point we must avoid at all costs (crossing this point means: stable → unstable)
the closer the system is to -1, the less robust it is
uncertainty may lead to crossing this point, try to avoid that as well
-μ min [dB] 1
|S max|
1 γ [dB]
ωc ωμ ω γ
φ [°]
1
Bγ and µmin in [dB] directly from the Bode diagram or converted (Kap. 4.3 S. 13) and plugged into the formulas below
1
gain margin γ γ= |L(jω)| at ∠L(jω) = −180◦ inverse of the magnitude at −180◦
phase margin ϕ ϕ = 180◦ − |∠L(jωc )| the angular distance from -1 at magnitude 1
1
minimum return difference µmin µmin = min |1 + L(jω)| = |Smax | the minium distance from -1
ω
18
5.5 Crossover Frequency
crossover frequency ωc frequency where the loop gain L(s) crossed the 0dB line → |L(jωc )| = 1
bandwidth ωb frequency where the complementary sensitivity T (s) falls below −3dB → |T (jωb )| = √1
2
determines the speed of the time-domain behaviour
The bandwidth always lies close to the crossover frequency. Therefore the crossover frequency (open loop) is a
measure for the speed of the closed-loop system.
a(s) Example: (ω = 3)
L(s) = 1
b(s) L(s) =
s · (s + 3)2
∠L(s) = ∠a(s) − ∠b(s)
= L(jω)
= ∠a(jω) − ∠b(jω)
1
=
∠(jω) = 90◦ and ∠(jω + a) = arctan ω jω · (jω + 3)2
a
= ∠(1) − ∠(jω) − 2 · ∠(jω + 3)
= 0◦ − 90◦ − 2 · 45◦
= −180◦
19
6 Specifications for Feedback Systems
6.1 Control Error
1 1
e∞ = = lim e(t) = lim s · S(s) = = S(0) =
t→∞+ s→0+ s 1 + L(0)
1
C(s) = kp C(s) =
Ti · s
̭
y(t) є
1.0
0.9
0
0 t90 t
rule of thumb: δ ∈ [0.45, 1] for simple loop gains based on second-order systems
20
6.3 Frequency-Domain Specifications
Around the crossover frequency, |S(jω)| and |T (jω)| are
likely to have a magnitude larger than 1 =⇒ peaking limitations on S(s) and T (s)
→ disturbance and noise amplification
21
7 Controller Synthesis
7.1 PID Controller
1 1
C(s) = kp · 1 + + s · Td ·
s · Ti (s · τ + 1)2
kp + kp · Ti · s + kp · Ti · Td · s2
=
(Ti · s) · (s · τ + 1)2
Z 1
1 d U (s) = kp · 1 + + Td · s ·E(s)
u(t) = kp · 1 · e(t) + · e(t)dt + Td · e(t) Ti · s
Ti dt | {z }
C(s)
22
7.1.2 Ziegler and Nichols Design Rules
find the critical gain kp∗ and the critical frequency ω ∗ (system oscillates):
from Bode-plot: ω ∗ = ωγ is, where the phase crosses −180◦ → kp∗ = γ (not dB!) (γ, ωγ look cha. 5.4 p. 18)
2π 2π
T∗ = ∗
=
ω ωγ
kp Ti Td
k P 0.5 · kp∗ ∞·T ∗
0 · T∗
P (s) ≈ · e−T ·s (approximation)
τ ·s+1
PI 0.45 · kp∗ 0.85 · T ∗ 0 · T∗
1
C(s) = kp · 1 + + Td · s PD 0.55 · kp∗ ∞ · T∗ 0.15 · T ∗
Ti · s
PID 0.6 · kp∗ 0.5 · T ∗ 0.125 · T ∗
can only be applied if kp∗ < ∞ → L(s) has to cross the negative real axis
ratio T /(T + τ ) has to be well below 0.3
Expl.: Expl.
wanted: Ti and Td given: P (s) wanted kp given: P (s) & ω ∗
1. ∠(kp∗ · P (s = jω ∗ )) = −π (kp∗ will disapear) 1. |kp∗ · P (s ∗
= jω )| = 1
∗
kp Re ∗ Re ∗ |Re| ∗ √ |Re|
expl.: ∠ (jIm)(Re+jIm) a expl.: kp (Re+jIm)a = kp |Re+jIm|a = kp
Re+jIma
= ∠(kp∗ Re) − ∠(jIm) − a · ∠(Re + jIm)
2. solve for kp∗ ⇒ kp from tab. above.
= 0 + π2 + a · arctan Re
Im
2. solve for ω ∗
2π
3. T ∗ = ω∗ ⇒ Ti and Td from tab. above.
T ·s+1
C(s) = α, T ∈ R+
α·T ·s+1
lead elements α<1 act as derivative elements increase phase margin close to the critical point
lag elements α>1 act as integrators decrease the amplitude → improve the roll-off at higher fre-
quencies
Lead Lag
parameters {T, α} are linked to the desired center frequency ω̂ and the desired maximum phase shift ϕ̂
q 2 1
α= tan2 (ϕ̂) + 1 − tan(ϕ̂) T = √
ω̂ · α
Loop-Shaping Procedure
1. design of a PI(D) controller
2. open-loop gain L(j · ω) often does not satisfy all requirements → add appropriate lead or lag elements (price to pay:
lead elements increase the loop gain at higher frequencies, lag elements introduce an additional phase lag at frequencies
close to ω̂)
23
7.2.2 Second-Order Lead/Lag Elements
s2 + 2 · κ · · (1 − ) · ω0 · s + (1 − )2 · ω02
C(s) = k ·
s2 + 2 · κ · · (1 + ) · ω0 · s + (1 + )2 · ω02
(1 + )2
k =
(1 − )2
cot(ϕ̂/2)
κ = √
1 − 2
ω̂
ω0 = √
1 − 2
1 dp (s) 1
C(s) = · · Ti = ωc−1 , ωc < ω2 , τ < Ti
T ·s np (s) (τ · s + 1)r−1
| i{z } | {z } | {z }
desired L(s) P −1 (s) roll-off
roll-off: only needed when there are more zeros than poles in the resulting C(s)
24
8 MATLAB Commands
General:
plot() 2-D line Plot plot(Y)
subplot() Divides the current figure into an m-by-n grid and creates an axes for subplot(m,n,p)
a subplot in the position specified by p. The Position p is countet like
a matrix where p=1 ⇒ a11 , p=2 ⇒ a12 . . .
semilogx() Create semilogarithmic plot with logarithmic x-axis semilogx(Y)
help provides help to a matlab command. help functionname
hold plot multiple graphes in one plot hold on
legend show plot legend legend( ’sys1’, ’sys2’)
System Definition:
ss() Specifies state-space models or converts LTI model to state space. sys ss = ss(A,b,c,d)
sys ss = ss(sys tf)
sys ss = ss(sys zpk)
tf() Creates or converts to transfer function model. sys tf = tf(num,denum)
sys tf = tf(sys ss)
sys tf = tf(sys zpk)
s = tf(’s’)
zpk() Creates or converts to zero-pole-gain model. sys zpk = tf(z,p,k)
sys zpk = zpk(sys ss)
sys zpk = zpk(sys tf)
s = zpk(’s’)
series() Connection of two transfer tunctions / models sys = series(sys1,sys2)
feedback() Applies a feedback interconnection on two LTI models. sys = feedback(sys1,sys2)
Controllability and Observability:
obsv() Computes the observability matrix. ob = obsv(A,c)
ob = obsv(sys)
ctrb() Computes the controllability matrix. co = ctrb(A,b)
co = ctrb(sys)
rank() Computes the rank of the matrix. k = rank(A)
System Properties:
eig() Returns eigenvalues (D) and eigenvectors (V) of a square matrix A. [V,D] = eig(A)
pole() Computes the poles p of a system model. p = pole(sys)
zero() Computes zeros z of LTI system. z = zero(sys)
zpkdata() Returns the zeros z, poles p, and gain(s) k of the zero-pole-gain model [z,p,k] = zpkdata(sys)
sys
pzmap() plots the poles and zeros into the complex plane pzmap(sys)
System Response:
step() Plots the step response of LTI systems. step(sys)
impulse() Plots the impulse response of LTI systems. impulse(sys)
bode() Plots Bode diagram of frequency response. bode(sys)
returns magnitude and phase of a system at w [mag, phase] = bode(sys,w)
nyquist() Produces Nyquist plot of LTI models. nyquist(sys)
margin() Computes gain and phase margins (Gm, Pm) and associated crossover [Gm,Pm,Wc,Wp] = margin(sys)
frequencies (Wc, Wp).
Generates bode-plot with margins margin(sys)
25
9 Definitions
Systems signals as in- and outputs, defines a causality between its inputs (causes) and ōutputs (effects)
Signals generated or absorbed by systems, described as functions of time
manipulated variable (Stellgrsse) the variable that can be adjusted to in order to achieve a certain systemoutput
command variable (Fhrungsgrsse) the output thad has to be achieved
control variable (Regelgrsse) the actual output of a system
SISO Systems single input single output systems
MIMO Systems multiple input multiple output systems
Linear System linear if following condition is fulfilled: Σ(α · u1 + β · u2 ) = α · Σ(u1 ) + β · Σ(u2 )
Nonlinear Systems nonlinear if the equation above is not fulfilled
Dynamic Systems value of the ouput signal y depends on all previous values u(τ ) ⇒ memory
Static Systems systems without memory
Models mathematically tractable representations M of real systems Σ, depends on the objectives, tradeoff between accu-
racy and complexity, no exact prediction possible −→ estimation U of uncertainty, only the pair M,U is a complete
system description, expressed by ordinary differential equations (ODE) or transfer functions (obtained by Laplace
transformation of ODEs)
Controllers and Plants controllers C are devices that automatically influencea given plant P, both are systems
Feedforward Control Systems interact in an open-loop fashion, no signal is fed back
Feedback Control Systems plant output y is fed back, required for:
– stabilization of unstable systems
– reduction of the detrimental effects of model uncertainty
– attentuation of unmeasurable external disturbances
possible dangers:
– alteration of the dynamic properties (may lead to complete failure)
– adding the measurement noise to the input
advantages:
– ability to cope with unknown external disturbances
– tolerate large uncertainties
– allow the use of less precise but cheaper actuators
⇒ use as much feedforward action as possible and as little feedback
action as necessary
System Analysis before synthesizing, several fundamental questions:
– type of dynamic behaviour?
– uncertainty in the model description? its influence?
– what external disturbances d and noise signals n are to be expected?
Reference Tracking requires that y(t) ≈ r(t) for all times t, can essentially be chosen arbitrarily by using appropriately
designed feedforward controllers F
Disturbance Rejection disturbance acting anywhere can be represented by an equivalent disturbance acting at the plant
output, uncertainty is unavoidable → the larger the uncertainty, the smaller the feedback action must be to avoid
stability problems → feedback action is limited → ability to reject unmeasurable disturbances is limited
Stabilization unstable systems require a certain minimum amount of feedback control action to be stabilizied (if it conflicts
with other limitations, the stabilization problem might be unsolvable
Disturbance external influence → cause cause deviation of y(t) from r(t)
typically slow → mainly present low frequencies
Noise electrical ”interference” → cause deviation of the measured y(t) from its actual value
typically fast → mainly present high frequencies
Noise Attenuation output measurement y(t) is usually corrupted by a noise signal n → only y(t) + n(t) is available for
feedback, noise might be amplified
Auto-Correlation the likeliness of two signal values at different times to be similar
26