0% found this document useful (0 votes)
21 views25 pages

Lecure 5

Adaptive Control
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views25 pages

Lecure 5

Adaptive Control
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Adaptive Control

Lecture 5

Traditional PID Controller

Dr. Abusabah I. A. Ahmed


[email protected]
Lecture Outline
❑Introduction
❑The three-term controller
❑The characteristics of P, I, and D controllers
❑General Tips for Designing a PID controller
❑PID Tuning
❑Practice Problem

2
Abusabah I. A. Ahmed
Introduction
❑The characteristics of the each of Proportional (P), the
Integral (I), and the Derivative (D) controls, and how to
use them to obtain a desired response will be covered in
this lecture. For this, we will consider the following
unity feedback system:

✓ Plant: A system to be controlled


✓ Controller: Provides the excitation for the plant; Designed to control the overall
system behavior

3
Abusabah I. A. Ahmed
Introduction
❑ Each mode of control has specific advantages and
limitations.
✓ On-Off (Bang Bang) Control
✓ Proportional (P)
✓ Proportional plus Integral (PI)
✓ Proportional plus Derivative (PD)
✓ Proportional plus Integral plus Derivative (PID)

On-Off Control

This is the simplest


form of control.

4
Abusabah I. A. Ahmed
The Three-term Controller
❑The transfer function of the PID controller looks like the
following:

•KP = Proportional gain


• KI = Integral gain
• KD = Derivative gain
❑ The variable (e) represents the tracking error, the difference
between the desired input value (R) and the actual output (Y).
❑ This error signal (e) will be sent to the PID controller, and the
controller computes both the derivative and the integral of this
error signal

5
Abusabah I. A. Ahmed
The Three-term Controller
❑The signal (u) just past the controller is now equal to the
proportional gain (KP) times the magnitude of the error
plus the integral gain (KI) times the integral of the error
plus the derivative gain (KD) times the derivative of the
error.

❑This signal (u) will be sent to the plant, and the new
output (Y) will be obtained. This new output (Y) will be
sent back to the sensor again to find the new error signal
(e). The controller takes this new error signal and
computes its derivative and its integral again. This
process goes on and on.
6
Abusabah I. A. Ahmed
The Characteristics of P, I, and D Controllers

CL SETTLING
RISE TIME OVERSHOOT S-S ERROR
RESPONSE TIME
Kp Decrease Increase Small Change Decrease
KI Decrease Increase Increase Eliminate
KD Small Change Decrease Decrease Small Change

❑Note that these correlations may not be exactly accurate,


because Kp, KI, and KD are dependent of each other. In
fact, changing one of these variables can change the
effect of the other two. For this reason, the table should
only be used as a reference when you are determining
the values for Kp, KI, and KD.

7
Abusabah I. A. Ahmed
The Characteristics of P, I, and D Controllers
Example Problem
Suppose we have a simple mass, spring, and damper problem.

The modeling equation of this system is

Equation (1) in S- Domain will look like:

8
Abusabah I. A. Ahmed
The Characteristics of P, I, and D Controllers
Example Problem
The transfer function between the displacement X(s) and the input
F(s) then becomes

Let
• M = 1kg
• b = 10 N.s/m
• k = 20 N/m
• F(s) = 1
Plug these values into the above transfer function

9
Abusabah I. A. Ahmed
The Characteristics of P, I, and D Controllers
Example Problem
❑ The goal of this problem is to show you how each of Kp, KI and
KD contributes to obtain
• Fast rise time
• Minimum overshoot
• No steady-state error

Open-loop step response


Let's first view the open-loop step response. Create a new
m-file and add in the following code:
num=1;
den=[1 10 20];
step(num,den)
Running this m-file in the Matlab command window
should give you the plot shown below.
10
Abusabah I. A. Ahmed
The Characteristics of P, I, and D Controllers
Example Problem
❑ The DC gain of the plant transfer
function is 1/20, so 0.05 is the
final value of the output to an
unit step input. This corresponds
to the steady-state error of 0.95,
quite large indeed.

❑Furthermore, the rise time is about one second, and the


settling time is about 1.5 seconds. Let's design a controller
that will reduce the rise time, reduce the settling time, and
eliminates the steady-state error.

11
Abusabah I. A. Ahmed
The Characteristics of P, I, and D Controllers
Example Problem
Proportional control
❑From the table shown above, we see that the proportional
controller (Kp) reduces the rise time, increases the
overshoot, and reduces the steady-state error. The closed-
loop transfer function of the above system with a
proportional controller is:

Let the proportional gain (Kp) equals 300 and change the
m-file to the following:

12
Abusabah I. A. Ahmed
The Characteristics of P, I, and D Controllers
Example Problem
Proportional control
Kp=300;
Running this m-file in the Matlab num=[Kp];
command window should gives you den=[1 10 20+Kp];
the following plot. t=0:0.01:2;
step(num,den,t)

The right plot shows that the


proportional controller
reduced both the rise time
and the steady-state error,
increased the overshoot, and
decreased the settling time
by small amount.

13
Abusabah I. A. Ahmed
The Characteristics of P, I, and D Controllers
Example Problem
Proportional-Derivative Control
❑ Now, let's take a look at a PD control. From the table shown
above, we see that the derivative controller (Kd) reduces both the
overshoot and the settling time. The closed-loop transfer function
of the given system with a PD controller is:

Let Kp equals to 300 as before and let Kd equals 10. Enter the
following commands into an m-file and run it in the Matlab
command window. Kp=300;
Kd=10;
num=[Kd Kp];
den=[1 10+Kd 20+Kp];
t=0:0.01:2;
14
Abusabah I. A. Ahmed step(num,den,t)
The Characteristics of P, I, and D Controllers
Example Problem
Proportional-Derivative Control

This plot shows that the derivative controller reduced both


the overshoot and the settling time, and had small effect on
the rise time and the steady-state error.
15
Abusabah I. A. Ahmed
The Characteristics of P, I, and D Controllers
Example Problem
Proportional-Integral Control
Before going into a PID control, let's take a look at a PI control.
From the table, we see that an integral controller (Ki) decreases the
rise time, increases both the overshoot and the settling time, and
eliminates the steady-state error. For the given system, the closed-
loop transfer function with a PI control is:

Let's reduce the Kp to 30, and Kp=30;


let Ki equals to 70. Create an Ki=70;
new m-file and enter the num=[Kp Ki];
following commands. den=[1 10 20+Kp Ki];
t=0:0.01:2;
Abusabah I. A. Ahmed step(num,den,t) 16
The Characteristics of P, I, and D Controllers
Example Problem
Proportional-Derivative Control
Run this m-file in the Matlab command window, and you should
get the following plot.
We have reduced the
proportional gain (Kp) because
the integral controller also
reduces the rise time and
increases the overshoot as the
proportional controller does
(double effect). The above
response shows that the integral
controller eliminated the steady-
state error.

17
Abusabah I. A. Ahmed
The Characteristics of P, I, and D Controllers
Example Problem
Proportional-Integral-Derivative control
❑ Now, let's take a look at a PID controller. The closed-loop
transfer function of the given system with a PID controller is:

After several trial and error runs, the


gains Kp=350, Ki=300, and Kd=50 Kp=350;
Ki=300;
provided the desired response. To
Kd=50;
confirm, enter the following num=[Kd Kp Ki];
commands to an m-file and run it in den=[1 10+Kd 20+Kp Ki];
the command window. You should t=0:0.01:2;
get the following step response. step(num,den,t

18
Abusabah I. A. Ahmed
The Characteristics of P, I, and D Controllers
Example Problem
Proportional-Integral-Derivative control

Now, we have obtained the


system with no overshoot, fast
rise time, and no steady-state
error.

19
Abusabah I. A. Ahmed
General Tips for Designing a PID Controller
❑ When you are designing a PID controller for a given
system, follow the steps shown below to obtain a desired
response.
✓Obtain an open-loop response and determine what
needs to be improved
✓Add a proportional control to improve the rise time
✓Add a derivative control to improve the overshoot
✓Add an integral control to eliminate the steady-state
error
✓Adjust each of Kp, Ki, and Kd until you obtain a
desired overall response. You can always refer to the
table shown in this "PID Tutorial" page to find out
which controller controls what characteristics.

20
Abusabah I. A. Ahmed
General Tips for Designing a PID Controller

Remember that, you do not need to implement all


three controllers (proportional, derivative, and
integral) into a single system, if not necessary.
For example, if a PI controller gives a good
enough response (like the above example), then
you don't need to implement derivative controller
to the system. Keep the controller as simple as
possible.

21
Abusabah I. A. Ahmed
PID Tuning
❑ The transfer function of PID controller is given as
𝐶𝑝𝑖𝑑(𝑠) 1
= 𝐾𝑝 + 𝐾𝑖 +𝐾𝑑 𝑠
𝐸(𝑠) 𝑠
❑ It can be simplified as
𝐶𝑝𝑖𝑑 𝑠 1
= 𝐾𝑝 (1 + +𝑇 𝑠)
𝐸 𝑠 𝑇𝑖 𝑠 𝑑
𝐾𝑝 𝐾𝑑
Where 𝑇𝑖 = 𝑇𝑑 =
𝐾𝑖 𝐾𝑝

22
Abusabah I. A. Ahmed
PID Tuning
❑ The process of selecting the controller parameters
(𝐾𝑝 , 𝑇𝑖 and 𝑇𝑑 ) to meet given performance specifications is
known as controller tuning.
❑ Ziegler and Nichols suggested rules for tuning PID
controllers experimentally.
❑ Which are useful when mathematical models of plants are
not known.
❑ These rules can, of course, be applied to the design of
systems with known mathematical models.
❑In fact, the Ziegler–Nichols tuning rules give an educated
guess for the parameter values and provide a starting point
for fine tuning, rather than giving the final settings for
𝐾𝑝 , 𝑇𝑖 and 𝑇𝑑 in a single shot.

23
Abusabah I. A. Ahmed
Practice Problem
For the following system if 𝑘𝑖 = 0, find 𝑘0 so that 𝜁
= 0.4 then for that value of 𝑘0 find 𝑘𝑖 (minimum)
1
so 𝑒𝑠𝑠 ≤ 0.1 when the input is 2 𝑡 2 .

24
Abusabah I. A. Ahmed
Thank You

25
Abusabah I. A. Ahmed

You might also like