2023 - Lecture - 16-17 - Introduction To PI Control
2023 - Lecture - 16-17 - Introduction To PI Control
1
Where we’re going today
• Introduction to control systems
• Proportional control
• Integral control
• Digital PI control
2
Introduction to Control Systems
• Control system = interconnection of components forming a configuration
that provides a desired system response
• Process: a series of task together transforming inputs to outputs
• Actuator (mover): take control signal and convert the source of energy into
(mechanic) move
• Controller: produce the control signal in a format suitable as input to actuator
Desired Control
response signal Input Output
Controller Actuator Process
Feedback
Plant
Source of Energy 3
Example: Liquid Level System
• Design input valve control to
maintain a constant height
• Process: water tank
• ‘Input’ = input flow + output flow
• System output = water height
• Actuator = input valve
• Controller takes info from float and
sends signal to input valve
4
From http://www.cs.wayne.edu/~hzhang/courses/8260b/Lectures/4-0%20-%20ControlTheory-Tutorial-for-CS-IBM.pdf
Open-Loop Control System
• Use a controller or actuator to directly control the process
Source of Energy
• Conceptually simple and easy
• Example: toaster, old microwave oven, washing machine
• Design an open-loop control system requires accurate knowledge on
the plant (actuator + process)
• Unreliable when there are unexpected variations in the system
5
Closed-Loop Control System
• Open-loop control system does not monitor the system output but
simply assumes it works as expected
• Proportional control
• Integral control
• Digital PI control
7
Proportional Control
• Proportional (P) control monitors
error signal e(t) = desired response x(t) – system output m(t)
8
Offset Error (1)
• Proportional controller drives actuator in proportional to e(t)
• Controller output is
𝑐 𝑡 = 𝑘𝑝 𝑒 𝑡 = 𝑘𝑝 (𝑥 𝑡 − 𝑚(𝑡))
• At equilibrium, we have
𝑚(𝑡) = 𝑘𝑝 𝑒 𝑡 = 𝑘𝑝 (𝑥 𝑡 − 𝑚(𝑡))
𝑘𝑝
𝑚(𝑡) = 𝑥 𝑡 ≠ 𝑥(𝑡)
𝑘𝑝 + 1
9
Offset Error (2)
• Proportional control has offset error
• Increasing gain 𝑘𝑝 (blue)
• Faster response
• Decrease offset error
• Increase overshoot
10
Where we’re going today
• Introduction to control systems
• Proportional control
• Integral control
• Digital PI control
11
Integral Control (1)
• Problem of proportional control
• Controller output solely depends on instantaneous error signal
• Offset error always exists
𝑘𝑝
𝑚(𝑡) = 𝑥 𝑡 ≠ 𝑥(𝑡)
𝑘𝑝 + 1
• Increasing gain 𝑘𝑝 reduces offset error at the cost of increased overshoot and possible instability
14
Digital Realization of Integral Control
• How to implement error integration in C code?
• Sampling with is needed to approximate numerically the integral using summation
Error signal : 𝑒 𝑡 𝑒 𝑛𝑇𝑠 , 𝑇𝑠 : sampling interval
𝑡
𝑐 𝑡 = 𝑘𝑖 −∞ 𝑒 𝜏 𝑑𝜏
15
Where we’re going today
• Introduction to control systems
• Proportional control
• Integral control
• Digital PI control
16
Digital PI Control
Block diagram of
PI controller
• PI controller output:
𝑡
𝑐 𝑡 = 𝑘𝑝 𝑒 𝑡 + 𝑘𝑖 න 𝑒 𝜏 𝑑𝜏
−∞
• Digital PI controller output:
𝑐 𝑛𝑇𝑠 = 𝑘𝑝 𝑒 𝑛𝑇𝑠 + 𝑘𝑖 𝐸 𝑛 − 1 𝑇𝑠 + 𝑇𝑠 ∙ 𝑒 𝑛𝑇𝑠
𝐸(𝑛𝑇𝑠 ) = 𝐸 𝑛 − 1 𝑇𝑠 + 𝑇𝑠 ∙ 𝑒 𝑛𝑇𝑠
17
Output Saturation & Integral Windup
• Controller output has no limits on its
magnitude
• Actuator may not be able to “follow”
controller output
• Fundamental limitation, due to e.g., power
and physical constraints
• Further demands from controller output
have no effect
• With integral control, the accumulated error and control output can be
very large, causing significant overshoot
• Integral windup
18
More on https://www.oreilly.com/library/view/feedback-control-for/9781449362638/ch10.html
Digital Realization
// Proportional control
// Integral control
// Derivative control
// PID control signal c(t)
// Update previous error sample
19
PI Control Tuning (1)
• Rise time: time taken for m(t) to go from
10% to 90% of its steady value
• Overshoot:
(max value – steady value)/steady value *100%
20
From http://www.mee.tcd.ie/~corrigad/3c1/control_ho2_2012_students.pdf
PI Control Tuning (2)
Effects of Increasing Gains
21
Digital Realization
// Error signal integration
// Previous error sample
22