0% found this document useful (0 votes)
3 views

Lecture 4

Uploaded by

sarakyuth
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Lecture 4

Uploaded by

sarakyuth
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Introduction to control theory

LECTURE 4: PID CONTROL FOR CONTINUOUS LTI SYSTEMS

Author : Sonia GHRAB


Cursus : EENG3
UE : Introduction to control theory
Version : 1.0
Date : 29/04/2024

ecam.fr
1. Introduction

What is a Controller?

• In control systems a controller is a mechanism that seeks to minimize the


difference between the actual value of a system (the process variable) and
the desired value of the system (the setpoint)

• Controllers are a fundamental part of control engineering and used in all


complex control systems

ecam.fr 29/04/2024 2
Example of control systems: Automobile steering control system

Consider an automobile with an automatic cruise control

• The driver may adjust the velocity setpoint for the controller

• The controller adjusts the gas pedal position (actuator) in response to


changes in the speedometer reading (sensor)

• A disturbance variable may be an approaching hill or wind that would


cause a deviation of the speed from the desired set point

Element Cruise Control


Actuator Gas Pedal Position, Fuel to the
Engine
Controller SetPoint Desired Speed (mph or km/sec)
Sensor Speedometer, measured velocity
Disturbance Hills, wind, other cars

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

Make corrective actions


based on the difference
between the desired
and actual value

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

Controllers are used to improve the performances of control systems

✓ Controllers improve the steady-state accuracy by decreasing the steady


state error

✓ As the steady-state accuracy improves, the stability also improves

✓ Controllers also help in reducing the unwanted offsets produced by the


system

✓ Controllers can help in reducing the noise signals produced by the


system

✓ Controllers can control the maximum overshoot of the system

✓ Controllers can help to speed up the slow response of an overdamped


system

ecam.fr 29/04/2024 5
Types of Controllers

• There are two main types of controllers: continuous controllers, and


discontinuous controllers

• In discontinuous controllers, the manipulated variable changes between


discrete values. Depending on how many different states the manipulated
variable can assume, a distinction is made between two position, three
position, and multi-position controllers
• In the continuous controller theory, there are three basic modes on which
the whole control action takes place, which are:

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

Three basic modes

Integral Proportional Derivative

Proportional Integral Proportional Derivative


(PI) (PD)

Proportional Integral Derivative


(PID)

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

Disturbance Sensor noise


𝑫(𝒔) 𝑵(𝒔)

Reference or Control signal


setpoint Output
𝒓 + 𝒖 + 𝒚
+ 𝑪(𝒔) + 𝑯(𝒔) +
-
Controller Process

Figure 2: General Feedback Diagram

ecam.fr 29/04/2024 8
2. Proportional Controller
2.1 Proportional controller Equation

• As the name suggests in a proportional controller the output (also called


the actuating signal) is directly proportional to the error signal

𝒖 𝒕 = 𝑲𝑷 𝒆(𝒕)

• Apply Laplace transform on both the sides


𝑬 𝒔 is the Laplace 𝑲𝑷 is the
transform of the error proportionality
𝑼 𝒔 is the Laplace transform signal 𝒆(𝒕) constant
of the actuating signal 𝒖(𝒕)

𝑼 𝒔
𝑼 𝒔 = 𝑲𝑷 𝑬 𝒔 → = 𝑲𝑷
𝑬 𝒔

The transfer function of the proportional controller is 𝑲𝑷

ecam.fr 29/04/2024 9
Reference
Output
or setpoint Control signal
𝒚
𝒓 𝒆 𝒖
+ 𝑲𝑷 𝑯(𝒔)
-

Proportional
Process
Control
(system)

Figure 3: The block diagram of the unity negative feedback


closed loop control system along with the proportional controller

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
𝑯 𝒔 =
𝒔 𝟏 + 𝟎. 𝟎𝟓 𝒔

Figure 4: Effect of proportional control


The proportional controller is used to change the transient response as
per the requirement
29/04/2024 11
ecam.fr
2.3. Examples

Example 1: Water Tank Level Control

𝟎 − 𝟐𝟐 𝒗𝒐𝒍𝒕𝒔
𝒚
𝒓 𝒆 𝒖 ν𝒎
+ 𝑲𝑷 𝑯(𝒔)
-

Proportional
Pump Tank
Control

Figure 5: Water tank level control (using Proportional controller)

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

Figure 7: Control of a servo motor

ecam.fr 29/04/2024 14
Response

Control effort, i.e. voltage


Servo response tracks desired going to servo, is smooth
servo angle well, but there is a
large overshoot.
Desired Voltage
servo Overshoot going to
position servo

Actual servo
angle

Figure 8: Position Figure 9: Motor voltage


ecam.fr 29/04/2024 15
2.4 Advantages and Disadvantages of Proportional Control

Some advantages of the proportional controller

• The proportional controller helps in reducing the steady-state error, thus


makes the system more stable
• The slow response of the overdamped system can be made faster with
the help of this controller

Some serious disadvantages of the proportional controller

• 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

3.1 Derivative controller Equation

• The derivative controller is also known as the rate controller

• The derivative controller produces an output, which is derivative of the


error signal
𝑑𝑒(𝑡)
𝑢 𝑡 = 𝐾𝐷
𝑑𝑡
• Apply Laplace transform on both the sides

𝑼 𝒔 = 𝑲𝑫 𝒔 𝑬(𝒔)

𝑼(𝒔)
= 𝑲𝑫 𝒔
𝑬(𝒔)

The transfer function of the derivative controller is therefore 𝑲𝑫 𝒔


Where 𝑲𝑫 𝒊𝒔 the derivative constant

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)

Figure 10: feedback closed loop using derivative controller

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

Disadvantages of Derivative Controller

• It never improves the steady-state error


• It produces saturation effects and also amplifies the noise signals produced
in the system

Advantages of Derivative Controller


The major advantage of a derivative controller is that it improves the transient
response of the system

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

4.1 Integral controller Equation

• The integral controller produces an output, which is integral of the error signal

𝑢 𝑡 = 𝐾𝐼 න 𝑒 𝑡 𝑑𝑡

• Apply Laplace transform on both the sides


𝐸(𝑠)
𝑈 𝑠 = 𝐾𝐼
𝑠

𝑬(𝒔)
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)

Figure 11: feedback closed loop using Integral controller

The integral controller is used to decrease the steady state error

ecam.fr 29/04/2024 21
4.2 Advantages and Disadvantages of Integral Control

Advantages of Integral Controller

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

Disadvantages of Integral Controller

It tends to make the system unstable because it responds slowly towards


the produced error

ecam.fr 29/04/2024 22
5. Proportional Derivative (PD) Control
5.1. Proportional Derivative (PD) Controller Equation

• The proportional derivative controller produces an output, which is the


combination of the outputs of proportional and derivative controllers

𝑑𝑒(𝑡)
𝑢 𝑡 = 𝐾𝑃 𝑒 𝑡 + 𝐾𝐷
𝑑𝑡

• Apply Laplace transform on both sides


𝑈 𝑠 = 𝐾𝑃 𝐸 𝑠 + 𝐾𝐷 𝑠 𝐸 𝑠 = 𝐾𝑃 + 𝐾𝐷 𝑠 𝐸(𝑠)

𝑼(𝒔)
= 𝑲𝑷 + 𝑲𝑫 𝒔
𝑬(𝒔)
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
𝒓 𝒆 𝒖 𝒚
+ 𝑲𝑷 + 𝑯(𝒔)
- +

Proportional control Process

𝒅
𝑲𝑫
𝒅𝒕

Derivative control

Figure 12: feedback closed loop using PD controller


The proportional derivative controller is used to improve the stability of
control system without affecting the steady state error
ecam.fr 29/04/2024 24
5.2. Effect of Derivative Control

𝑲𝑫 = 𝟎. 𝟏 𝑲𝑫 = 𝟎. 𝟐

• Set 𝐾𝑃 = 10
• Increase 𝐾𝐷 gradually
• What do you notice?
➢ Peak time increases, i.e.
response slows
➢ Overshoot decreases
𝟐
𝑯 𝒔 =
𝒔 𝟏 + 𝟎. 𝟎𝟓 𝒔

Figure 13: Effect of PD controller

29/04/2024 25
ecam.fr
5.3. Example: PD for Servo Motor Position Control

+ 𝐾𝑃 + 𝑯(𝒔)
- +

𝐾𝐷

Figure 14: Servo Motor Position Control using PD control

ecam.fr 29/04/2024 26
Recall response with Proportional Control

Servo response tracks desired


Control effort, i.e. voltage
servo angle well, but there is a
going to servo, is smooth
large overshoot.

Overshoot
Desired
servo
position

Actual servo Voltage


angle going to
servo

Figure 15: Position (obtained with P controller) Figure 16: Motor voltage (P controller)
ecam.fr 29/04/2024 27
Now with PD Control

Adding derivative control lowers Control effort, i.e. voltage going to


or removes the overshoot, but it servo, is smooth. But it is
slows down the response (i.e. saturating the actuator at 5 𝑣𝑜𝑙𝑡𝑠
increases peak/rise time)

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)

Servo response tracks desired Control effort, i.e. voltage going


servo angle well, but there is a to servo, is noisy
noise.
Noise
Desired
servo
position
Voltage
going to
servo

Actual
servo
angle

Figure 19

ecam.fr 29/04/2024 30
PD Control with Filtering (will be Demonstrated on LAB2)

Adding filtering lowers noise, Control effort, i.e. voltage going


but it adds overshoot. to servo, is smoother.

Overshoot

Figure 20

ecam.fr 29/04/2024 31
5.4 Advantages and Disadvantages of PD Control

Advantages of PD Controller

• Removes overshoot (if no filter is applied, see Figure 19)


• Filtering derivative can mitigate noise issues

Disadvantages of PD Controller

• Can make output and control input noisy


➢ Example: due to sensor noise used in feedback
• Filtering slows down response and may result in overshoot

ecam.fr 29/04/2024 32
6. Proportional Integral (PI) Controller

6.1. Proportional Integral (PI) Controller Equation

• The proportional Integral controller produces an output, which is the


combination of the outputs of proportional and integral controllers

𝑢 𝑡 = 𝐾𝑃 𝑒 𝑡 + 𝐾𝐼 න 𝑒 𝑡 𝑑𝑡

• Apply Laplace transform on both sides


𝐾𝐼 𝐾𝐼
𝑈 𝑠 = 𝐾𝑃 𝐸 𝑠 + 𝐸 𝑠 = 𝐾𝑃 + 𝐸(𝑠)
𝑠 𝑠
𝑼(𝒔) 𝑲𝑰
= 𝑲𝑷 +
𝑬(𝒔) 𝒔
Therefore, the transfer function of the proportional integral controller is
𝑲
𝑲𝑷 + 𝒔𝑰

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

The proportional integral controller is used to decrease the steady state


error without affecting the stability of the control system
ecam.fr 29/04/2024 34
6.2. Effect of Integral Control

• Set 𝐾𝑃 = 0.5 𝑲𝑰 = 𝟐𝟎

• Increase 𝐾𝐼 gradually
What do you notice? 𝑲𝑰 = 𝟏𝟎

✓Steady-state error improves, i.e. 𝑲𝑰 = 𝟎


decreases
𝟐
✓Overshoot increases, i.e. response 𝑯 𝒔 =
𝟏 + 𝟎. 𝟎𝟓 𝒔
slows a bit

Figure 22

29/04/2024 35
ecam.fr
6.3. Example: Tank Level Process Control

𝐾𝑃

22V
+
+ 𝐾𝐼 + 𝑯(𝒔)
-
0V

Pump Tank

Figure 23: Tank level process control using PI controller

ecam.fr 29/04/2024 36
Recall the Proportional Control Response

Tank response does not track Control effort, i.e. voltage


desired water level well going to pump, is smooth

Desired
water Steady-state
Voltage going to
level error
pump

Actual tank level

Figure 24
ecam.fr 29/04/2024 37
Recall: PI Control Response

Tank response tracks desired Control effort, i.e. voltage going


water level well, but large to pump, is smooth but saturates
overshoot actuator
Overshoot No
steady-
state Voltage
error going to
pump

Figure 25 Figure 26
ecam.fr 29/04/2024 38
6.4. Advantages and disadvantages of PI control

Advantages of PI Controller

• Removes steady-state error


• Can reject disturbances

Disadvantages of PI Controller

• Can lead to large overshoot in response when control signal becomes


saturated, i.e. “integral windup”.
• Improperly designed integral gains can lead to instabilities

Generally, it is said, PD controller improves transient performance and the


PI controller improves the steady-state performance of a control system

ecam.fr 29/04/2024 39
7. Proportional Integral Derivative (PID) Controller

Position Control Speed Control


PID-based positions control PID-based speed control used in
a wide array of industries
Used in a number of robotics applications
like Automated assembly lines
• Transportation
• Electronics

Figure 27: PID often used for


controlling joint of robot arms Figure 28:PID used in transportation

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

• The proportional integral derivative controller produces an output, which is


the combination of the outputs of proportional, integral and derivative
controllers

𝑑𝑒(𝑡)
𝑢 𝑡 = 𝐾𝑃 𝑒 𝑡 + 𝐾𝐷 + 𝐾𝐼 න 𝑒 𝑡 𝑑𝑡
𝑑𝑡

• Apply Laplace transform on both sides


𝑲𝑰
𝑼 𝒔 = 𝑲𝑷 + 𝑲𝑫 𝒔 + 𝑬(𝒔)
𝒔

Therefore, the transfer function of the proportional integral derivative


𝑲
controller is 𝑲𝑷 + 𝑲𝑫 𝒔 + 𝒔𝑰

ecam.fr 29/04/2024 41
PID Terms

To make corrective measures, the PID terms

• 𝐾𝑃 based on present error


• 𝐾𝐼 depends on past error
• 𝐾𝐷 prediction of future error

present future past

𝑑𝑒(𝑡)
𝑢 𝑡 = 𝐾𝑃 𝑒 𝑡 + 𝐾𝐷 + 𝐾𝐼 න 𝑒 𝑡 𝑑𝑡
𝑑𝑡

• 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

𝒅
𝑲𝑫
𝒅𝒕

Figure 29: Closed-loop system using PID control


ecam.fr 29/04/2024 43
7.2. Example: PID for Servo Motor Position Control

𝐾𝑃

5V 0.1V

+
+ 𝐾𝐼 +
- +
-5V -0.1V

Motor Friction Servo


Limits Process

𝐾𝐷

Figure 30: PID for Servo Motor Position Control


ecam.fr 29/04/2024 44
Response with Proportional Control

• Servo response tracks


desired servo angle well, but • Control effort, i.e. voltage
there is a large overshoot going to servo, is smooth
and steady-state error (due
to friction)
Overshoot
Desired
servo
position
Steady-state
error
Voltage
applied to
Actual servo
servo
angle

Figure 31
ecam.fr 29/04/2024 45
Response with PD Control

• Control effort, i.e. voltage going to


• Servo response tracks
servo, is smooth, But it is
desired servo angle well,
saturating the actuator at 5 𝑉𝑜𝑙𝑡𝑠
overshoot is reduced, but
there is a steady-state error
Overshoot
reduced

Voltage
going to
Steady-state servo
error

Figure 32
ecam.fr 29/04/2024 46
Response with PID Control

• Servo response tracks desired • Control effort, i.e. voltage


servo angle well, overshoot is going to servo, is smooth. But it
reduced, and steady-state error is saturating the actuator at
has been removed 5 𝑣𝑜𝑙𝑡𝑠
Overshoot
reduced
Voltage
going to
servo
Steady-state
error
removed

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:

• Obtain the transient response of closed-loop transfer function and determine


what needs to be improved
• Insert the proportional controller, design the value of 𝐾𝑃 through Routh-
Hurwitz or suitable software
• Add an integral part to reduce steady-state error
• Add the derivative part to increase damping (damping should be between
0.6-0.9). The derivative part will reduce overshoots and transient time
• Sisotool, available in MATLAB can also be used for proper tuning and to
obtain a desired overall 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

Proportional Integral Derivative

• Increases speed of the • Improves steady‐state • Adds damping to the


response performance system
• Stability of system • Slows down the system • Improves stability of the
reduced • Reduced stability system
• Increases system order
• Disturbance rejection

ecam.fr 29/04/2024 49
Table 1: Effects of the corrective actions (𝑲𝑷 , 𝑲𝑰 𝒂𝒏𝒅 𝑲𝑫 )

Parameter Rise time Overshoot Setting time Steady- Stability


state error

𝑲𝑷 Decrease Increase Small change Decrease Degrade

𝑲𝑰 Decrease Increase Increase Eliminate Degrade

Minor No effect in Improve


𝑲𝑫 change Decrease Decrease theory if 𝐾𝐷 is
small

ecam.fr 29/04/2024 50

You might also like