Lecture 4
Lecture 4
ecam.fr
1. Introduction
What is a Controller?
ecam.fr 29/04/2024 2
Example of control systems: Automobile steering control system
• The driver may adjust the velocity setpoint for the controller
ecam.fr 29/04/2024 3
• The driver uses the difference between the actual and desired
direction of travel to generate a controlled adjustment of the
steering wheel
Desired Actual
course course
of travel of travel
+ Steering
Driver Automobile
mechanism
Measurement
Visual and
tactile
Figure 1: Automobile steering control system
ecam.fr 29/04/2024 4
The important uses of the controllers
ecam.fr 29/04/2024 5
Types of Controllers
1. Proportional controllers
2. Integral controllers
3. Derivative controllers
We use the combination of these modes to control our system such that the
process variable is equal to the setpoint (or as close as we can get it)
ecam.fr 29/04/2024 6
Controllers
Remark
• All controllers have a specific use case to which they are best suited
• We cannot just insert any type of controller at any system and expect a
good result, there are certain conditions that must be fulfilled
ecam.fr 29/04/2024 7
General Feedback Diagram
ecam.fr 29/04/2024 8
2. Proportional Controller
2.1 Proportional controller Equation
𝒖 𝒕 = 𝑲𝑷 𝒆(𝒕)
𝑼 𝒔
𝑼 𝒔 = 𝑲𝑷 𝑬 𝒔 → = 𝑲𝑷
𝑬 𝒔
ecam.fr 29/04/2024 9
Reference
Output
or setpoint Control signal
𝒚
𝒓 𝒆 𝒖
+ 𝑲𝑷 𝑯(𝒔)
-
Proportional
Process
Control
(system)
ecam.fr 29/04/2024 10
2.2. Effect of Proportional Control
• Increase/decrease 𝑲𝑷
• What do you notice?
𝑲𝑷 = 𝟏𝟓
𝑲𝑷 = 𝟏𝟎
✓ Peak time decreases, i.e. faster
response
𝟐 ✓ Overshoot increases
𝑯 𝒔 =
𝒔 𝟏 + 𝟎. 𝟎𝟓 𝒔
𝟎 − 𝟐𝟐 𝒗𝒐𝒍𝒕𝒔
𝒚
𝒓 𝒆 𝒖 ν𝒎
+ 𝑲𝑷 𝑯(𝒔)
-
Proportional
Pump Tank
Control
ecam.fr 29/04/2024 12
Response
Tank response does not track Control effort, i.e. voltage going
desired water level well to pump, is smooth
Desired
water level Steady- Voltage going to pump
state error
Actual
tank
level
Figure 5: The water level (output) Figure 6: the pump voltage (control effort)
ecam.fr 29/04/2024 13
Example 2: Proportional Control of Servo motor
5V
+ 𝑲𝑷
-
-5V
Motor
ecam.fr 29/04/2024 14
Response
Actual servo
angle
• Due to the presence of this controller, we get some offsets in the system
• Proportional controllers also increase the maximum overshoot of the
system
ecam.fr 29/04/2024 16
3. Derivative Controller
𝑼 𝒔 = 𝑲𝑫 𝒔 𝑬(𝒔)
𝑼(𝒔)
= 𝑲𝑫 𝒔
𝑬(𝒔)
ecam.fr 29/04/2024 17
The block diagram of the unity negative feedback closed loop control
system along with the derivative controller is shown in the Figure 10
Reference
Output
or setpoint Control signal
𝒚
𝒓 𝒆 𝒖
+ 𝑲𝑫 𝒔 𝑯(𝒔)
-
Derivative
Process
Control
(system)
The derivative controller is used to transform the unstable control system into a
stable one
ecam.fr 29/04/2024 18
3.2 Advantages and Disadvantages of Derivative Control
Remark
We never use derivative controllers alone. It should be used in
combinations with other modes of controllers because of its few
disadvantages
ecam.fr 29/04/2024 19
4. Integral Controller
• The integral controller produces an output, which is integral of the error signal
𝑢 𝑡 = 𝐾𝐼 න 𝑒 𝑡 𝑑𝑡
𝑬(𝒔)
Therefore, the transfer function of the integral controller is where 𝑲𝑰 is
𝒔
the integral constant
ecam.fr 29/04/2024 20
The block diagram of the unity negative feedback closed loop control
system along with the integral controller is shown in the following
Figure 11
Reference
Output
or setpoint Control signal
𝒚
𝒓 𝒆 𝒖
+ 𝑲𝑰 𝑯(𝒔)
- 𝒔
Integral
Process
Control
(system)
ecam.fr 29/04/2024 21
4.2 Advantages and Disadvantages of Integral Control
Integral Controllers can return the controlled variable back to the exact set
point following a disturbance that’s why these are known as reset
controllers
ecam.fr 29/04/2024 22
5. Proportional Derivative (PD) Control
5.1. Proportional Derivative (PD) Controller Equation
𝑑𝑒(𝑡)
𝑢 𝑡 = 𝐾𝑃 𝑒 𝑡 + 𝐾𝐷
𝑑𝑡
𝑼(𝒔)
= 𝑲𝑷 + 𝑲𝑫 𝒔
𝑬(𝒔)
Therefore, the transfer function of the proportional derivative controller is
𝑲𝑷 + 𝑲𝑫 𝒔
ecam.fr 29/04/2024 23
The block diagram of the unity negative feedback closed loop control
system along with the proportional derivative controller is shown in the
following Figure 12
Control effort
Reference from PD
or setpoint Output
𝒓 𝒆 𝒖 𝒚
+ 𝑲𝑷 + 𝑯(𝒔)
- +
𝒅
𝑲𝑫
𝒅𝒕
Derivative control
𝑲𝑫 = 𝟎. 𝟏 𝑲𝑫 = 𝟎. 𝟐
• Set 𝐾𝑃 = 10
• Increase 𝐾𝐷 gradually
• What do you notice?
➢ Peak time increases, i.e.
response slows
➢ Overshoot decreases
𝟐
𝑯 𝒔 =
𝒔 𝟏 + 𝟎. 𝟎𝟓 𝒔
29/04/2024 25
ecam.fr
5.3. Example: PD for Servo Motor Position Control
+ 𝐾𝑃 + 𝑯(𝒔)
- +
𝐾𝐷
ecam.fr 29/04/2024 26
Recall response with Proportional Control
Overshoot
Desired
servo
position
Figure 15: Position (obtained with P controller) Figure 16: Motor voltage (P controller)
ecam.fr 29/04/2024 27
Now with PD Control
No overshoot
Figure 17: Position obtained with PD controller Figure 18: Motor voltage PD controller
ecam.fr 29/04/2024 28
Effect of Sensor Noise
Noise
5V
+
+ 𝐾𝑃 + +
- +
-5V
Motor DC
Motor
𝐾𝐷
Figure 18: Servo Motor Position Control (using PD control) in presence of Noise
ecam.fr 29/04/2024 29
PD Control with NO Filtering (will be Demonstrated on LAB2)
Actual
servo
angle
Figure 19
ecam.fr 29/04/2024 30
PD Control with Filtering (will be Demonstrated on LAB2)
Overshoot
Figure 20
ecam.fr 29/04/2024 31
5.4 Advantages and Disadvantages of PD Control
Advantages of PD Controller
Disadvantages of PD Controller
ecam.fr 29/04/2024 32
6. Proportional Integral (PI) Controller
𝑢 𝑡 = 𝐾𝑃 𝑒 𝑡 + 𝐾𝐼 න 𝑒 𝑡 𝑑𝑡
ecam.fr 29/04/2024 33
The block diagram of the unity negative feedback closed loop control
system along with the proportional integral controller is shown in the
following Figure 21
𝑲𝑷
Proportional
Reference control Control
or setpoint effort Output
Integral system
control
Figure 21: Block diagram of closed loop control system using PI controller
• Set 𝐾𝑃 = 0.5 𝑲𝑰 = 𝟐𝟎
• Increase 𝐾𝐼 gradually
What do you notice? 𝑲𝑰 = 𝟏𝟎
Figure 22
29/04/2024 35
ecam.fr
6.3. Example: Tank Level Process Control
𝐾𝑃
22V
+
+ 𝐾𝐼 + 𝑯(𝒔)
-
0V
Pump Tank
ecam.fr 29/04/2024 36
Recall the Proportional Control Response
Desired
water Steady-state
Voltage going to
level error
pump
Figure 24
ecam.fr 29/04/2024 37
Recall: PI Control Response
Figure 25 Figure 26
ecam.fr 29/04/2024 38
6.4. Advantages and disadvantages of PI control
Advantages of PI Controller
Disadvantages of PI Controller
ecam.fr 29/04/2024 39
7. Proportional Integral Derivative (PID) Controller
Why PID?
• Solves 90% of the control problems
• Easy to design and implement
29/04/2024 40
ecam.fr
7.1. Proportional Integral Derivative (PID) Controller Equation
𝑑𝑒(𝑡)
𝑢 𝑡 = 𝐾𝑃 𝑒 𝑡 + 𝐾𝐷 + 𝐾𝐼 න 𝑒 𝑡 𝑑𝑡
𝑑𝑡
ecam.fr 29/04/2024 41
PID Terms
𝑑𝑒(𝑡)
𝑢 𝑡 = 𝐾𝑃 𝑒 𝑡 + 𝐾𝐷 + 𝐾𝐼 න 𝑒 𝑡 𝑑𝑡
𝑑𝑡
• The block diagram of the unity negative feedback closed loop control system
along with the proportional integral derivative controller is shown in Figure 29
29/04/2024 42
ecam.fr
Proportional control
𝑲𝑷
Control
Reference Integral control signal
or setpoint Output
System
Derivative control
𝒅
𝑲𝑫
𝒅𝒕
𝐾𝑃
5V 0.1V
+
+ 𝐾𝐼 +
- +
-5V -0.1V
𝐾𝐷
Figure 31
ecam.fr 29/04/2024 45
Response with PD Control
Voltage
going to
Steady-state servo
error
Figure 32
ecam.fr 29/04/2024 46
Response with PID Control
Figure 33
The proportional integral derivative controller is used to improve the
stability of the control system and to decrease steady state error
ecam.fr 29/04/2024 47
General Guidelines for Designing a PID Controller (Will be
demonstrated on Lab session)
When you are designing a PID controller for a given system, there are some
general guidelines that need to be considered in order to obtain the desired
response:
Remark
The above steps of tuning of parameters are general guidelines. There are
no fixed steps for designing controllers
ecam.fr 29/04/2024 48
8. Summarizing PID controllers
ecam.fr 29/04/2024 49
Table 1: Effects of the corrective actions (𝑲𝑷 , 𝑲𝑰 𝒂𝒏𝒅 𝑲𝑫 )
ecam.fr 29/04/2024 50