0% found this document useful (0 votes)
29 views31 pages

PID Lec13

Uploaded by

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

PID Lec13

Uploaded by

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

Introduction to PID

Control
The Design of Feedback Control Systems
What is a control system? Why do we need
it?

● Open Loop and Closed loop Systems


● Examples of Control Systems
● What is a setpoint?
● What is Process Variable
● Control Output
Different Types of Feedback Control

On-Off Control

This is the simplest form of control.


Block Diagram of a Process under Control
System
PID controller

 A proportional–integral–derivative controller (PID


controller) is a control loop feedback mechanism.
 As the name suggests, PID algorithm consists of
three basic coefficients: proportional, integral and
derivative which are varied to get optimal response.
The Characteristics of P, I, and D controllers

A proportional controller (Kp) will have the effect of reducing the


rise time and will reduce, but never eliminate, the steady-state
error.

An integral control (Ki) will have the effect of eliminating the


steady-state error, but it may make the transient response worse.

A derivative control (Kd) will have the effect of increasing the


stability of the system, reducing the overshoot, and improving the
transient response.
PID as the Control System
How does PID work?
The entire idea of this algorithm revolves around manipulating the error. The error
as is evident is the difference between the Process Variable and the Setpoint.

ERROR = SP - PV

These 3 modes are used in different combinations:

●P – Sometimes used
●PI - Most often used
●PID – Sometimes used
●PD – Very rare, useful for controlling servomotors.
Proportional Control
A proportional controller attempts to perform better than the On-off type by
applying power in proportion to the difference in temperature between the
measured and the set-point. As the gain is increased the system responds faster to
changes in set-point but becomes progressively underdamped and eventually
unstable. The final temperature lies below the set-point for this system because
some difference is required to keep the heater supplying power.
The P-Control
In Proportional Only mode, the
controller simply multiplies the
Error by the Proportional Gain
(Kp) to get the controller output.

The Proportional Gain is the


setting that we tune to get our
desired performance from a “P
only” controller.

The proportionality constant


used for P-Control is KP.
Drawbacks of P-Control
● Too high a value of Kp will lead to the oscillation of PV.
● Also, the P-controller tends to generate an offset
value.
● Proportional controllers also increase the maximum
overshoot of the system.
The PI-control

Controller Output(COI) = KI ∫e dτ

CO = COP + COI

=KPe + (∫e dτ)/τ1

=KP (e + (∫e dτ)/τN) τN = Reset

Time
The PI-control
As e(t) grows or shrinks, the amount
added to CO grows or shrinks
immediately and proportionately. The
past history and current trajectory of the
controller error have no influence on
the proportional term computation.

Integral Action Eliminates Offset.


Proportional, Derivative Control

The stability and overshoot problems that arise when a proportional


controller is used at high gain can be mitigated by adding a term proportional
to the time-derivative of the error signal. The value of the damping can be
adjusted to achieve a critically damped response.
Proportional+Integral+Derivative Control

Although PD control deals neatly with the overshoot and ringing


problems associated with proportional control it does not cure the
problem with the steady-state error. Fortunately it is possible to eliminate
this while using relatively low gain by adding an integral term to the
control function which becomes
PID Control - Best of
Everything

 The proportional corrects instances of error, the integral corrects


accumulation of error, and the derivative corrects present error
versus error the last time it was checked.

 The effect of the derivative is to counteract the overshoot caused by


P and I. When the error is large, the P and the I will push the
controller output. This controller response makes error change
quickly, which in turn causes the derivative to more aggressively
counteract the P and the I.
Proportional Control
By only employing proportional control, a steady state error
occurs.

Proportional and Integral Control


The response becomes more oscillatory and needs longer to
settle, the error disappears.

Proportional, Integral and Derivative Control


All design specifications can be reached.
The Characteristics of P, I, and D controllers

CL RESPONSE RISE TIME OVERSHOOT SETTLING TIME S-S ERROR

Kp Decrease Increase Small Change Decrease

Ki Decrease Increase Increase Eliminate

Kd Small Change Decrease Decrease Small Change


Tips for Designing a PID Controller

1. Obtain an open-loop response and determine what needs to be improved


2. Add a proportional control to improve the rise time
3. Add a derivative control to improve the overshoot
4. Add an integral control to eliminate the steady-state error
5. Adjust each of Kp, Ki, and Kd until you obtain a desired overall
response.

Lastly, please keep in mind 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.
Tuning a PID Controller
Tuning a control loop is the adjustment of its control parameters (gain/proportional
band, integral gain/reset, derivative gain/rate) to optimum values for a target
response.

●Bump Test and Modelling (Manual Control)


●Tuning
●Simulation
Tuning a PID Controller

Too High KP will lead to oscillation in values and will tend to


generate an offset

KI will counteract the offset. Higher Value of KI implies that the


Setpoint will reach the PV too fast

If this action is very fast, the process variable is prone to be


unsteady.

KD keeps this under control.


Open-Loop Control - Example

num=1;
den=[1 10 20];
step(num,den)

1
G( s )
2
s  10s  20
Response to Unit step
of a P controller
Proportional Control - Example

The proportional controller (Kp) reduces the rise time, increases


the overshoot, and reduces the steady-state error.

MATLAB Example
Step Response
From: U(1)
1.4

1.2

Kp=300; 1
Step Response
From: U(1)
1

num=[Kp];
Amplitude

0.8
To: Y(1)

0.9

0.6
0.8

den=[1 10 20+Kp]; 0.4 0.7

0.6

t=0:0.01:2;
Amplitude
0.2

To: Y(1)
0.5

0
K=300 0.4 K=100
step(num,den,t) 0 0.2 0.4 0.6 0.8 1

Time (sec.)
1.2 1.4 1.6 1.8

0.3
2

0.2

Kp
T( s ) 0.1

2 0

s  10 s  ( 20  Kp )
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

Time (sec.)
Response to Unit step
of an I controller
Response to Unit step
of a D controller
Proportional - Integral - Example

The integral controller (Ki) decreases the rise time, increases both
the overshoot and the settling time, and eliminates the steady-state
error Kp  s  Ki
T( s )
3 2
MATLAB Example s  10 s  ( 20  Kp )  s  Ki
Step Response
From: U(1)
1.4

Kp=30;
1.2
Step Response
From: U(1)
1 1.4

Ki=70;
Amplitude

1.2
0.8
To: Y(1)

1
0.6

num=[Kp Ki];
Ki=70
Amplitude
0.8

To: Y(1)
0.4

den=[1 10 20+Kp Ki]; 0.2


0.6

0.4
0

t=0:0.01:2; 0 0.2 0.4 0.6 0.8 1

Time (sec.)
1.2 1.4 1.6 1.8
0.2
2

Ki=100
0

step(num,den,t) 0 0.2 0.4 0.6 0.8 1

Time (sec.)
1.2 1.4 1.6 1.8 2
Proportional - Derivative - Example

The derivative controller (Kd) reduces both the overshoot and the
settling time.
Kd  s  Kp
T( s )
MATLAB Example 2
s  ( 10  Kd )  s  ( 20  Kp )
Step Response
From: U(1)
1.4

1.2

Kp=300; 1 Step Response


From: U(1)
1

Kd=10;
Amplitude

0.8
To: Y(1)

0.9

0.6 0.8

num=[Kd Kp]; 0.7

Kd=10
0.4
0.6

Amplitude
den=[1 10+Kd 20+Kp];
To: Y(1)
0.2 0.5

0.4
0

t=0:0.01:2;
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
0.3
Time (sec.)
0.2
Kd=20
step(num,den,t) 0.1

0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

Time (sec.)
Example - Practice

Consider the following configuration:


Example - Practice

Design a system for the following specifications:

· Zero steady state error


· Settling time within 5 seconds
· Rise time within 2 seconds
· Only some overshoot permitted

You might also like