Professional Documents
Culture Documents
Lecture 4 - PID Control
Lecture 4 - PID Control
u = − k P ( y − yd ) ∆U done
-d(t) completion rate =
∆t
EE392m - Winter 2003 Control Engineering 4-2
P control
• Closed-loop dynamics
kP 1
y& + k P y = k P yd + d y= yd + d
s + kP s + kP
1
• Steady-state (s = 0) y SS = yd + d SS
kP
• Transient y (t ) = y (0)e −t / T + yd + d SS ⋅ (1 − e −t / T )
1 1
0.8
kP 0.6
y(t)
T = 1 / kP 0.4
0.2
0 0 2 4
• Frequency-domain (bandwidth)
0
yd (t ) = yˆ d (iω )eiωt yˆ d (iω ) + dˆ (iω ) / k P -5
yˆ (iω ) = |y(iω)|
(ω / kP )2 + 1
iωt
d (t ) = d (iω )e
ˆ -10
-15
-20
0.01 0.1 1 10
EE392m - Winter 2003 Control Engineering 4-3
I control
y = g ⋅u + d, Example:
• Servosystem command
• Introduce integrator into control
u& = v, u(t)
v = − k I ( y − yd )
• Closed-loop dynamics
y(t)
gk I s • More:
y= yd + d
s + gk I s + gk I – stepper motor
– flow through a valve
– motor torque ...
EE392m - Winter 2003 Control Engineering 4-4
Sampled time I control
• Step to step update: sampled time
y (t ) = g ⋅ u (t ) + d (t ) integrator
u (t ) = u (t − 1) + v (t − 1)
v ( t ) = k I [ y ( t ) − yd ]
• Closed-loop dynamics
y = g ⋅u + d gk I z −1
y= yd + d
z − 1 + gk I z − 1 + gk I
u=
kI
[ y − yd ]
z −1
• Deadbeat control: gk I = 1 y = z −1 yd + (1 − z −1 )d
τy& = − y + u + d
• P control + integrator for
cancelling steady state error
Peltier Heatpump Temperature
Controller
τy& = − y + u + d
u = −k I v − kP e • Other applications
• ATE
• EDFA optical amplifiers
• Fiber optic laser modules
• Fiber optic network equipment
EE392m - Winter 2003 Control Engineering 4-7
PI control
• P Control + Integrator for Cascade loop interpretation:
cancelling steady state error
e = y − yd ; Inner loop
v& = e ∫ ki kP
u(t)
u = − k I v − k P e = k P ( e − ki v )
{ e(t) y
kI
yd - Plant
kP
• Velocity form of the controller
u& = −k I e − k P e& k I = ki ⋅ k P
u(t + 1) = u(t ) − k I e(t ) − k P [e(t ) − e(t − 1)]
MAGNITUDE (dB)
0
-10
-40
10 -2 10 0 102
EE392m - Winter 2003 Control Engineering 4-9
Frequency (rad/sec)
PLL Example
• Phase-locked loop is arguably a reference signal
most prolific feedback system
Hi-freq e Loop Filter
LPF (controller)
e = 2 K m LPF r × v
= 2 K m LPF A sin(ωt + θ d ) × cos(ωot + θ o ) Voltage
Controlled
e ≈ AK m sin(ωt − ωot + θ d − θ o ) Oscillator u
θ& = ∆ω = K u
o o o signal phase-locked
to reference PLL
e = K dθ s
θ= d
u = k P e + k I ∫ e ⋅ dt s + Ko K d k P s + k I
2
Example:
• Paper
machine
control
u = − k D (1 − z )e + k P e + k I
−1 1
• Sampled-time PID −1
e
1− z
future present past
• Velocity form ∆u = − k D ∆2 e − k P ∆e − k I e
– bumpless transfer between
manual and automatic ∆ = 1 − z −1
u (t + 1) = u (t ) − k I e(t ) − k P (e(t ) − e(t − 1) )
− k D (e(t ) − 2e(t − 1) + e(t − 2) )
EE392m - Winter 2003 Control Engineering 4-17
Tuning PID Control
• Model-based tuning
• Look at the closed-loop poles Optimizer
• Numerical optimization kD , kP , kI Performance
sim