You are on page 1of 77

P, PI, PD & PID

CONTROLLERS
APPROACHES TO SYSTEM DESIGN

1. Very often Process is altered to improve


performance characterized by a certain T.F.
2. Examples - To improve transient behaviour of
servomechanism position controller, a better
motor can be chosen for the system.
3. In airplane control system, we might be able to
alter aerodynamic design of the airplane to
improve flight transient characteristics
4. Very often process not alterable. Hence
compensatory networks
5. Design can be accomplished by root locus
methods in the s-plane so that the roots are in the
desired position.
6. To optimize performance, design involved with
frequency response or the root locus
7. PID Controller popular
:review

3
Control Configurations

4
Feedback Control

Heat exchanger

TT Sensor
Final (Temperature
control Transmitter)
element Controller

steam
The advantage of feedback control is that it is
a very simple technique that compensates for
all disturbances. Any disturbance affects the
controlled variable and once this variable
deviates from set point , the controller changes
its input in such a way as to return the
temperature to the set point.
The feedback loop does not know, nor does it
care, which disturbance enters the process. It
tries only to maintain the controlled variable at
set point and in so doing compensates for all
disturbances.
The disadvantage of feedback control is that it
can compensate for a disturbance only after the
controlled variable has deviated from set point.
That is, the disturbance must propagate
through the entire process before the feedback
control scheme can initiate action to
compensate it.
Feed forward Control

Sensor
(Temperature
Controller TT Transmitter)

Heat exchanger

Final
control
element
steam
The objective of feed forward control is to measure the
disturbances and compensate for them before the
controlled variable deviates from set point. If applied
correctly, the controlled variable deviation would be
minimum.
Suppose that in heat exchanger example the major
disturbance is the inlet temperature. To implement feed
forward control the disturbance first must be measured
and then a decision is be made how to manipulate the
steam to compensate for this change.
The complements of process control to
engineering implies that for a good control
design is important and is a result of a
hierarchy of control objectives which depend
on the operating objectives for the plant.
We would like processes to run at the designed
steady state, however processes would not.
In designing control systems or strategies
the dynamic behavior of the process is very
important, therefore we should have
knowledge about process dynamics and
modeling.
Example 1

Consider the tank heating system


Fi, Ti shown in the figure.
A liquid enters the tank with a
flow rate Fi (ft3/min) and a
temperature of Ti (0F) where it is
heated with steam having a flow
h
rate of Fst (lb/min). Let F and T
be the flow rate and temperature
F, T of the stream leaving the tank.
The tank is considered to be well
Fst stirred, which implies that the
temperature of the effluent is
equal to the temperature of the
steam liquid in the tank.
The control objectives of this heater are:
1. To keep the effluent temperature T at the desired value
Ts.
2. To keep the volume of the liquid in the tank at a desired
value Vs.
The operation of the heater is disturbed by external factors
such as changes in the feed flow rate Fi and temperature
Ti. ( If nothing changed, then after attaining T=Ts and
V=Vs we could leave the system alone without any
supervision and control.
Fi, Ti A thermocouple measures
the temperature of the fluid in
the tank. Then this
temperature is compared
Thermocouple with the desired value
yielding a deviation
= Ts T
Set-point
F, T The value of deviation is sent
to a control mechanism
Controller
which decides what must be
done in order for the
temperature to turn back to
the desired value.
Fi, Ti Notice that feed
forward control does
not wait until the
Thermocouple
effects of the
disturbances has been
felt by the system, but
Set-point
acts appropriately
F, T before the external
disturbance affects the
Controller
system anticipating
what its effect will be.
Fi, Ti
Level Measuring
To keep the
Device
volume at its set
point or the liquid
level hs we hs
measure the level
of the liquid in the Controller
tank and we open
or close the F, T
effluent flow rate.
Controller

hs

Fi, Ti
Level Measuring
Device

F, T
Fi, Ti

FT

Controller

F, T
For this example;
input variables are: Fi, Ti and Fst (which denote
the effect of surroundings on the process)
output variables are: F, V and T (which denote
the effect of process on the surroundings)
Controll er Type

20
21
Controll er Type

22
The current situation

Despite the abundance of sophisticated tools, including advanced


controller design techniques, PID controllers are still the most
widely used controller structure in modern industry, controlling
more that 95% of closed-loop industrial processes.

Different PID controllers differ in the way how their parameters be


tuned, manually, or automatically.

Most of the DCS systems have built-in routines to perform auto-


tuning of PID controllers based on the loop characteristics. They
are often called: auto-tuners.
The PID Algorithm
The PID algorithm is the most popular feedback controller
algorithm used. It is a robust easily understood algorithm
that can provide excellent control performance despite the
varied dynamic characteristics of processes.

As the name suggests, the PID algorithm consists of three


basic modes:
the Proportional mode,
the Integral mode
& the Derivative mode.
PID controllers
P, PI or PID Controller
When utilizing the PID algorithm, it is necessary to decide
which modes are to be used (P, I or D) and then specify the
parameters (or settings) for each mode used.

Generally, three basic algorithms are used: P, PI or PID.

Controllers are designed to eliminate the need for


continuous operator attention.

Cruise control in a car and a house thermostat


are common examples of how controllers are used to
automatically adjust some variable to hold a measurement
(or process variable) to a desired variable (or set-point)
Controller Output

The variable being controlled is the output of the controller


(and the input of the plant):

provides excitation to the plant system to be controlled


The output of the controller will change in response to a change
in measurement or set-point (that said a change in the tracking
error)
PID Controller

In the s-domain, the PID controller may be represented as:

K
U (
s )
Kp
i
K
s
dE
(s
)
s
In the time domain:
de
(
t
) t
u
(
t
)Ke
p(
t
)K
i
0
e
(
t)
dtK
d
dt
proportional gain integral gain derivative gain
PID Controller

In the time domain:


de
(
t
) t
u
(
t
)Ke
p(
t
)K
i
0
e
(
t)
dtK
d
dt
The signal u(t) will be sent to the plant, and a new output y(t)
will be obtained. This new output y(t) will be sent back to the
sensor again to find the new error signal e(t). The controllers
takes this new error signal and computes its derivative and
its integral gain. This process goes on and on.
Definitions
In the time domain:
tde
(t)
u
(t)Ke
p t)
( Ki e(
t)dtKd
0 dt
1t de
(t)
Kp



e(t
)
Ti

0
e(t
)
dtTd
dt



integral time constant derivative time constant
K K
,
p d
where
T
i Td
K
i K
p derivative gain

proportional gain integral gain


Op-Amp Integrator
Op-Amp Integrator Cont
Since the inverting input is at virtual ground

v in
i1
R
dv
i2 C o
dt
Applying KCL at the inverting input

i1+i2 = 0

dv o v in
C 0
dt R
1
vo
RC v in dt v o (initial )
Op-Amp Differentiator Circuit
Op-Amp Differentiator Cont
Since the inverting input is at virtual ground

dv in
i1 C
dt
vo
i2
R
Applying KCL at the inverting input
i1+i2 = 0

dv in v o
C 0
dt R
dv in
v o RC
dt
Differentiators are avoided in practice as they amplify noise
PID structures

Standard PID controllers have the following structures:

Proportional only:

Proportional plus Integral:

Proportional plus derivative:

Proportional, integral and derivative:


Derivative Op-Amp
R
Vin
Vin C
V- -
(
RC)
d
dt
Vout
R V+ +
Vou
t

Applying Kirchhoffs Rules and Op-Amp Calculation Rules yields:

dV (
t)
V
(
outRC
) in
dt
Integrating Op-Amp
C

Vin
Vin R V-
- 1
dt
Vout RC
R V+ +
Vou
t

Applying Kirchhoffs Rules and Op-Amp Calculation Rules yields:

1

t
V V
out
ind
RC0
PID Controller System Block Diagram

VSET VERRO VOUT


I Output Process
R

VSENSOR
Sensor

Goal is to have VSET = VOUT


Remember that VERROR = VSET VSENSOR
Output Process uses VERROR from the PID controller to adjust Vout such that
it is ~VSET
Applications
PID Controller System Circuit Diagram

Signal conditioning allows you to


introduce a time delay which could
account for things like inertia

System to control

Calculates VERROR = -(VSET +


VSENSOR) -
VSENSO
R
Applications
PID Controller PID Controller Circuit Diagram

Adjust Change
Kp RP1, RP2
Ki RI, CI
Kd RD, CD

VERR VERROR
OR PID
41
42
43
44
45
46
47
48
49
50
51
52
Controller Effects

A proportional controller (P) reduces error responses to


disturbances, but still allows a steady-state error.

When the controller includes a term proportional to the


integral of the error (I), then the steady state error to a
constant input is eliminated, although typically at the cost
of deterioration in the dynamic response.

A derivative control typically makes the system better


damped and more stable.
Closed-loop Response
Rise time Maximum Settling Steady-
overshoot time state error
P Decrease Increase Small Decrease
change
I Decrease Increase Increase Eliminate

D Small Decrease Decrease Small


change change

Note that these correlations may not be exactly accurate,


because P, I and D gains are dependent of each other.
Example problem of PID
Suppose we have a simple mass, spring, damper problem.

The dynamic model is such as:



m
xb
xkx
f
Taking the Laplace Transform, we obtain:
2
ms
X
(s
)
bsX
(
s
)kX
(
s
)F(
s)
The Transfer function is then given by:
X
(s
) 1
2
F
(s
) ms bsk
Example problem (contd)
Let
m
1
kg
,
b10
N.
s/
m,
k20
N
/
m,f
1N

By plugging these values in the transfer function:


X
(s
) 1
2
F
() s
s s
10 20
The goal of this problem is to show you how each of
K,p K i and K d contribute to obtain:

fast rise time,


minimum overshoot,
no steady-state error.
Ex (contd): No controller

The (open) loop transfer function is given by:


X
(s
) 1
2
F
() s
s s
10 20

The steady-state value for the output is:


X(
s
)1
x
ss lim x(t
) lim sX (s) lim sF )
(
s
t s 0
s 0 F(
s
)20
Ex (contd): Open-loop step
response
1/20=0.05 is the final value
of the output to an unit step
input.

This corresponds to a
steady-state error of 95%,
quite large!

The settling time is about


1.5 sec.
Ex (contd): Proportional
Controller

The closed loop transfer function is given by:


Kp
X
(s
) s2
10
s20 K

p

F
(
s) K s2

10
s(20
K)

1 p p
s2
10
s20
Ex (contd): Proportional
control
Let Kp 300

The above 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.
Ex (contd): PD Controller

The closed loop transfer function is given by:


KpKs
d
X
(
s) s
2
10
s20
K Ks

p d

F
(
s) K K 2
s s(
10K)
s(
20
K)

1 p d d p
2
s10
s20
Ex (contd): PD control

p
Let K 300
,K
d 10

This plot shows that the


proportional derivative
controller reduced both
the overshoot and the
settling time, and had
small effect on the rise
time and the steady-state
error.
Ex (contd): PI Controller

The closed loop transfer function is given by:


KpKi/s
X
(
s) s
2
10s20 KsK

p i

F
(
s) K Ki/
s s
3 2
10
s(
20
K )
sK

1 p p i
2
s10s20
Ex (contd): PI Controller
Let Kp30
,Ki70

We have reduced the proportional


gain 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.
Ex (contd): PID Controller

The closed loop transfer function is given by:

K
pKs
dKi/s
d
2
X
(
s) s
2

10
s20 K
s K sK

p i

) K
F
(
s KsK /
3
ss(d
10
K)
s2
(
20
K )
sK

1p d i p i
s2

10
s20
Ex (contd): PID Controller

p i
Let K 350
,K 300
,
d
K 5500

Now, we have obtained


the system with no
overshoot, fast rise time,
and no steady-state
error.
Ex (contd): Summary

P PD

PI PID
PID Controller Functions
Output feedback
from Proportional action
compare output with set-point

Eliminate steady-state offset (=error)


from Integral action
apply constant control even when error is zero

Anticipation
From Derivative action
react to rapid rate of change before errors grows too big
Effect of Proportional,
Integral & Derivative Gains on
the
Dynamic Response
Proportional Controller
Pure gain (or attenuation) since:
the controller input is error
the controller output is a proportional gain

E
(
s)
KpU
(
s
) u
(
t
) K
e
p(
t)
Change in gain in P controller
Increase in gain:

Upgrade both
steady-
state and transient
responses
Reduce steady-state
error

Reduce stability!
P Controller with high gain
Integral Controller
Integral of error with a constant gain
increase the system type by 1

eliminate steady-state error for a unit step input

amplify overshoot and oscillations

t
K
E
(
s)i
s
U(
s
) u
(
t
)K
i
0
e
(
t)
dt
Change in gain for PI controller
Increase in gain:

Do not upgrade
steady-
state responses
Increase slightly
settling time

Increase
oscillations
and overshoot!
Derivative Controller
Differentiation of error with a constant gain
detect rapid change in output

reduce overshoot and oscillation

do not affect the steady-state response

de
(
t
)
E
(
s)
Kd
sU(
s
) u
(
t
)Kd
dt
Effect of change for gain PD
controller
Increase in gain:

Upgrade transient
response
Decrease the peak
time
and rise time
Increase overshoot
and settling time!
Changes in gains for PID
Controller

You might also like