Professional Documents
Culture Documents
Kim Mathiassen
15.02.2011
Control theory
Mass spring damper system
Modeling
Open loop vs. closed loop
Second order system
Stability
PID control
P - Proportional
I - Integral
D - Derivative
Optimal control
LQR
15.02.2011 2
Mass spring damper system
mẍ = −kx − f ẋ + u
15.02.2011 4
Modeling domains
Frequency domain (Transfer functions)
1
x(s)=h(s)u(s) h(s)= f
m
k
s2+ m s+ m
15.02.2011 5
Block diagrams
u 1 ẋ2 x2 = ẋ1 x1
m
- -
15.02.2011 6
SISO and MIMO
Single-Input Single-Output (SISO)
The system has one input u and one output x
Multiple-Input Multiple-Output (MIMO) Process
The system has multiple input u and multiple
output x
Single-Input Multiple-Output (SIMO)
Process
Can be regarded as several SISO systems
Multiple-Input Single-Output (MISO)
Can be regarded as several SISO systems
15.02.2011 7
Open loop vs. closed loop
Open-loop
r u x
Controller Process
Closed-loop
r e u x
Controller Process
-
y
Mesurements
15.02.2011 8
Second order systems
1 1
m m
H(s) = f k
=
s2 + ms + m
(s − λ1 )(s − λ2 )
Solution
The generic solution gives three cases depending on pole
placemend. The three cases are called under-damped, over-damped
and critially damped
r !
f km
λ{1,2} = − 1± 1−4 2 (1)
2m f
15.02.2011 9
Second order systems
Damping ratio
−(λ1 +λ2 )
ζ= √
2 λ1 λ2
15.02.2011 11
Marginally stable
The system is marginally stable if |y | < ∞ for all t ≥ 0
Unstable
If the system is not stable, it is unstable
15.02.2011 12
PID control
We want to make the system stable and controllable with a
controller. The PID controller is a simple controller that may
acheive this goal. The PID controller is often analyzed in the
frequency domain.
PID controller
Z
u = Kp e + Ki e(τ )d τ + Kd ė
15.02.2011 13
Proportional
I A pure proportional controller will have a steady-state error
I Adding a integration term will remove the bias
I High gain (Kp ) will produce a fast system
I High gain may cause oscillations and may make the system
unstable
I High gain reduces the steady-state error
15.02.2011 14
Proportional
15.02.2011 15
15.02.2011 16
Integral
15.02.2011 17
15.02.2011 18
Derivative
15.02.2011 19
From http://www.pidstop.com/demo
PID games
http://www.pidstop.com/demo
15.02.2011
(K1 = -110 K2 = 0.728)
20
Optimal control
I Optimal controll is another control approach than PID
I The idea is to specify a cost function and then find the
optimal input
I The Dynamics of the system is used to design the controller
I For non-linear system it is not always possible to find the
optimal solution
I A special case is for linear systems with a quadradic cost
function
I The optimal controller must have all states as input
I Most often used with an observer to estimate the states that
are not measured
15.02.2011 21
Optimal control
r ê Controller u x
Process
-
ŷ y
Observer Mesurements
15.02.2011 22
Linear-quadratic regulator (LQR)
I The feedback is given as u = G 1 x + G 2 r
I r is the reference function
I The matrix G 1 and G 2 is found based on the system dynamics
and the cost function using Pontryagin’s Maximum principle
I When following a trajectory the function r (t) must be known
for all future timesteps in order to find the optimal solution
Cost function
Z ∞
J= 1
2 e T Qe + u T Pudt
t
15.02.2011 23
References
J. B. Balchen, T. Andresen, and B. A. Foss.
Reguleringsteknikk.
Institutt for teknisk kybernetikk, 2004.
PID controller.
http://en.wikipedia.org/wiki/pid_controller, February 2011.
Damping.
http://en.wikipedia.org/wiki/damping, February 2011.
O.A. Solheim and Norges tekniske høgskole Institutt for teknisk
kybernetikk.
Optimalregulering.
Tapir, 1976.
15.02.2011 24