PID control - Simple tuning methods
PID control
Introduction
Lab processes Control System
Dynamical System
Step response model Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols) Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
PID control
Introduction
Lab processes
Control System
Dynamical System
Step response model Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols) Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Tank process
• Tank with level control
• Two connected tanks
• Pump for in-flow of water
• Level measurements
PID control
Introduction
Lab processes
Control System Dynamical System
Step response model Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols) Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Open-loop system
u Actuator Control object Sensor y
System
• u control signal (pump voltage)
• Actuator (tubes to pump, power amplifier , in-flow)
• Control object (level in Tank with in- and out-flow)
• Sensors (pressure sensors, tubes, elektronics)
Closed-loop system
r + e Controller u System y
−
Give reference (set-point of water level in tank)r to controller in
PID control
Introduction
Lab processes Control System
Dynamical System
Step response model
Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols) Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Time constant and stationary gain
System u y u(t) t Step t y(t) Step response 1 Kp T Example–Stove plate • u(t)power to stove plate• y(t)temperature on plate
• Time constantT
Time constant and stationary gain
System u y u(t) t Step t y(t) Step response ∆u Kp∆u T• Step response size proportional to step size
Dead-time (time delay)
System u y u(t) t Step t y(t) Step response 1 Kp L TExample– roll transport time
Step response model
System u y u(t) t Step t y(t) Step response A 1 Kp L TStep response model from unit step:
• T Time constant
• KpStationary gain
• LDead-time
Step response model
System u y u(t) t Step t y(t) Step response A∆u ∆u Kp∆u L TStep response model from experiment:
• T Time constant
• KpStationary gain
• LDead-time
PID control
Introduction
Lab processes Control System
Dynamical System
Step response model
Self-oscillation model PID control
PID structure
Step response method (Ziegler-Nichols) Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Self-oscillation model
r + Ku e System u y − T u Experiment• P-control (closed-loop system!)
• Crank up gain to self-oscillation
• Reference-step starts oscillation
Self-oscillation model
• Ultimate gainKu
PID control
Introduction
Lab processes Control System
Dynamical System
Step response model Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols) Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
PID structure
r + e Controller u System y
−
• r reference, set-point (SP)
• y output, measured signal to be regulated
• e=r−y control error PID-controller: e u P I D +
P-controller
K e u e(t) t e0 t u(t) Ke0P-controller with offset
K e + u u0 e(t) t e0 t u(t) Ke0 u0OffsetControl signal Proportional to error plus ’offset’
Example: speed control of car
I-part (integrator)
1 Ti R e e I-del e(t) t t I-del e0 e0 Ti I-part• ∝surface undere(t)so far
• becomes as big as constant errore0in timeTi
D-part (derivator)
Tddedt e D-del e(t) t t D-del D-part • ∝slope one(t)PID-controller structure
Control signal = P + I + D u(t) =K[e(t) + 1 Ti Z t e(s)ds+Tdde(t) dt ]PID control
Introduction
Lab processes Control System
Dynamical System
Step response model Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols)
Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Ziegler-Nichols step response method
• MeasureAandLfrom step response
• Tp expected time constant for closed-loop system
Controller K Ti Td Tp
P 1/A 4L
PI 0.9/A 3L 5.7L
PID control
Introduction
Lab processes Control System
Dynamical System
Step response model Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols)
Self-oscillation method (Ziegler-Nichols) Experiment
Level control in a tank
Ziegler-Nichols self-oscillation method
• Measure ultimate gainKuand periodTu from experiment
• Tp expected time constant for closed-loop system
Controller K Ti Td Tp
P 0.5Ku Tu
PI 0.4Ku 0.8Tu 1.4Tu
PID control
Introduction
Lab processes Control System
Dynamical System
Step response model Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols) Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Step response
Step response model for the left tank
0 100 200 300 2 3 4 5 6 7 8 9 10 20 30 40 50 60 4.5 4.6 4.7 4.8 4.9 5 5.1 5.2 5.3 5.4
Estimated from figure:
• A∆u=0.1,∆u=0.5
⇒A=1/5
P-control of the left tank
0 20 40 60 80 100 120 140 160 180 2.5 3 r, y 0 20 40 60 80 100 120 140 160 180 0 2 4 u Valve opens/closes Ziegler-Nichols P-control • K =1/A=5• Stationary error after valve
PI-control of the left tank
0 50 100 150 200 2.5 3 r, y 0 50 100 150 200 0 2 4 u Valve opens/closes Ziegler-Nichols PI-control • K =0.9/A=4.5 • Ti=3L=9• No stationary error after valve
PID-control of the left tank
0 50 100 150 200 2.4 2.6 2.8 3 3.2 r, y 0 50 100 150 200 5 uValve opens/closes Ziegler-Nichols PID-control • K =1.2/A=6
• Ti=2L=6 • Td =L/2=1.5
• No stationary error after valve
disturbance
• Fast and damped
Self-oscillation experiment
Self-oscillation model for the left tank
0 20 40 60 80 100 0
1 2 3
r (bˆ¶rvˆ⁄rde) och y (ˆ⁄rvˆ⁄rde)
0 20 40 60 80 100 120 0
5 10
u (styrsignal)
Ultimate gain and period
• Ku=15 (from tuning) • Tu =10 (from figure) Z-N PID-tuning: K =0.6Ku=8 Ti =0.5Tu =5 Td =0.125Tu =1.25
Ziegler-Nichols PID from self-oscillation model
0 50 100 150 200 250 0 5 t, y 0 50 100 150 200 250 0 5 10 uPID control
Introduction
Lab processes Control System
Dynamical System
Step response model Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols) Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Step response
Step response model for the right tank
0 100 200 300 400 2 3 4 5 6 7 8 30 40 50 60 70 3.9 4 4.1 4.2 4.3 4.4 4.5 4.6 4.7
Roughly estimated (bad precision!):
• A∆u≈0.2,∆u=0.5
⇒A=2/5
• L≈10
From larger figure:
PI-control of the right tank
0 100 200 300 2 3 r, y 0 100 200 300 0 1 2 3 u Valve opens/closes Ziegler-Nichols PI-control • K =0.9/A=2.25 • Ti=3L=30 Disturbance eliminated in 60s (CompareTp=5.7L=57s)PID-control of the right tank (step response tuning)
0 100 200 300 3 4 5 6 r, y 0 100 200 300 0 5 10 u Valve opens/closes Ziegler-Nichols PID-control • K =1.2/A=3 • Ti=2L=20 • Td =L/2=5 Disturbance eliminated i 40s (CompareTp=3.4L=34s)Self-oscillation experiment
Self-oscillation model for the right tank
0 20 40 60 80 100 4.7 4.8 4.9 y 0 20 40 60 80 100 0 1 2 3 u
Ultimate gain and period
• Ku=10 (from tuning) • Tu =25 (from figure) Z-N PID-tuning: K =0.6Ku =6 Ti =0.5Tu≈13 Td =0.125Tu≈3