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
4. 5.
6. 7.
alter aerodynamic design of the airplane to improve flight transient characteristics Very often process not alterable. Hence compensatory networks Design can be accomplished by root locus methods in the s-plane so that the roots are in the desired position. To optimize performance, design involved with frequency response or the root locus PID Controller popular
:review
3
Control Configurations
4
Feedback Control
Heat exchanger
TT
Final control element
Controller
steam
Sensor (Temperature Transmitter)
•
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
Controller
TT
Sensor (Temperature 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 shown in the figure.
Fi, Ti
h F, T Fst
steam
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 rate of Fst (lb/min). Let F and T be the flow rate and temperature of the stream leaving the tank. The tank is considered to be well stirred, which implies that the temperature of the effluent is equal to the temperature of the liquid in the tank.
The control objectives of this heater are: 1.
To keep the effluent temperature T at the desired value T s.
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.
A thermocouple measures the temperature of the fluid in the tank. Then this temperature is compared
Fi, Ti
Thermocouple
with the a desired value yielding deviation ε = Ts – T
Set-point
F, T Controller
The value of deviation is sent to a control mechanism which decides what must be done in order for the temperature to turn back to the desired value.
Fi, Ti
Thermocouple
Set-point
F, T Controller
Notice that feed forward control does not wait until the effects of the disturbances has been felt by the system, but acts appropriately before the external disturbance affects the system anticipating what its effect will be.
Fi, Ti To keep the volume at its set point or the liquid level hs we measure the level of the liquid in the tank and we open or close the effluent flow rate.
Level Measuring Device
hs Controller
F, T
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: on F, V T (which denote the effect of process theand surroundings)
Controll er Type
20
21
Controll er Type
22
The cur r ent situati on
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 autotuning of PID controllers based on the loop characteristics. They are often called: auto-tuners.
Th e PI D Al gor ithm
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.
PI D contr oller s
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 thenspecif y the par ameter s (or settings) f or each mode used .
Generally, three basic algorithms are used: P, PI or PI D .
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 pr ocess variable) to a desired variable (or set-point )
Controller Output
The variable being controlled is the output of th e cont r oll er (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 ) K i K s ( p d s In the time domain: t
u ( t ) K e ( t ) K ( t ) dt K p i e d 0
proportional gain
integral gain
derivative gain
PID Controller
In the time domain:
t
u ( t ) K e ( t ) K ( t ) dt K p i e d 0
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:
t de ( t) u ( t) K e ( t ) K e ( t ) dt K p i d 0 dt
1te de ( t) K e ( t) ( t) dt T p d 0 T d i integral time constant
,
derivative time constant
K p where T T i d K i proportional gain
integral gain
derivative gain
Op-Amp Integrator
Op-Amp Integrator Cont… Since the inverting input is at virtual ground
i1 i 2
v in R C
dv o dt
Applying KCL at the inverting input i1+i2 = 0
C
vo
dv o dt
v in R
0
1 v in dt v o (initial) RC
Op-Amp Differentiator Circuit
Op-Amp Differentiator Cont… Since the inverting input is at virtual ground i1
C
dv in dt
vo
i2
R
Applying KCL at the inverting input
i1+i2 = 0
C
dv in dt
vo
vo
0
R
RC
dv in 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-
Vout
R
V+
+
d ( RC ) dt Vou t
Applying Kirchhoff’s Rules and Op-Amp Calculation Rules yields:
d ( t ) in V ( RC ) out d
Integrating Op-Amp C Vin
Vin
R
V-
-
1
Vout
R
V+
+
d
RC
Vou t
Applying Kirchhoff’s Rules and Op-Amp Calculation Rules yields: t 1 V V out in 0 RC
PID Controller
–
System Block Diagram
P
VSET
VERRO R
VOUT
I
Output Process
D 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
VERR OR
–
PID Controller Circuit Diagram
Adjust
Change
Kp
RP1,RP2
Ki
RI, CI
Kd
RD, CD
VERROR PID
41
42
43
44
45
46
47
48
49
50
51
52
Controller Effects
A proportional controller (P) r educes er r or r esponses 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 er r or to a constant i npu t i s eli mi nated , although typically at the cost of deterioration in the dynamic response. A derivative control typically mak es the system better damped and mor e stabl e.
Closed-loop Response
P
Rise time
Maximum overshoot
Settling time
Steadystate error
Decrease
Increase
Small
Decrease Eliminate
I
Decrease
Increase
change Increase
D
Small change
Decrease
Decrease
Small 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
Taking the Laplace Transform, we obtain: 2 ( ) ( ) ( ) ( ms X s bsX s kX s The Transfer function is then given by:
( ) X s
1
2
( ) ms F s bs
Example problem (cont
’
d)
m kg , b N . s / m , k N / m , f 1 10 20
Let
By plugging these values in the transfer function: X s ( )
1 10 2 s
2 F s s
()
The goal of this problem is to show you how each of K p K i and contribute to obtain: ,
fast rise time, minimum overshoot, no steady-state error.
Ex (cont
’
d): No controller
The (open) loop transfer function is given by: ( ) X s
1
2 F s s
()
10 2 s
The steady-state value for the output is:
X ( s ) x lim x ( t ) lim sX ( s ) lim sF ( s ) ss t s s 0 0 F ( s )
Ex (cont
’
d): 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 er ror of 95%, qui te large!
The settl i ng ti me is about 1.5 sec.
’
Ex (cont d): Proportional Controller
The closed loop transfer function is given by:
K p K p s 10 s20 2 K F s s s ( ) 10 ( 20 p p 1 2 s 10 s 20 ( s )
2
Ex (cont
’
d): Proportional control
Let Kp
30
The above the prop ortiplot onalshows contr that oll er r educed both th e r ise ti me and th e steady-state er r or , increased the overshoot, and decreased the settling time by small amount.
Ex (cont
’
d): PD Controller
The closed loop transfer function is given by: K K s p d
K K s ( s ) s10 s20 K K s s( F ( s ) 10 K ) s( 2 1 s10 s20
2 p d 2 p d d 2
Ex (cont
’
d): PD control
Let K p
300 ,K d 1
This plot shows pr opor ti onal derthat ivatithe ve contr oll er r educed both th e over shoot an d th e settl ing tim e, and had small effect on the rise time and the steady-state error.
Ex (cont
’
d): PI Controller
The closed loop transfer function is given by: K K s p i/
2 K s K ( s ) s p i 10 s 20 3 2 K K s s F ( s ) 10 s ( 20 K ) s p i/ p 1 2 s 10 s 20
Ex (cont
’
d): PI Controller
Let
,K 7 K p 30 i
We have reduced the proportional gain the also rbecause educes th e rintegral ise ti mecontroller and increases the over shoot as the proportional controller does (double effect).
The above response shows that the integral contr oll er eli min ated the steady-state er r or .
Ex (cont
’
d): PID Controller
The closed loop transfer function is given by:
K K s K / s p d i
2
2 K s K s K d p i s 10 s 20 3 2 K s K / ss F ( s ) K ( 10 K ) s ( 20 K ) s p d i d p 1 2 s 10 s 20
( s )
Ex (cont
’
d): PID Controller
Let
K ,K p 350 i 3
d 5500 K
Now, we have obtained the system with no overshoot, fast rise time, and no steady-state error.
Ex (cont P
PI
’
d): Summary PD
PID
PID Controller Functions
Output feedback
from Pr oporti onal acti on compar e outpu t wi th set-poi nt
Eliminate steady-state offset (=error)
from I ntegral ac ti on
apply constant contr ol even when er r or is zer o
Anticipation
From Der ivati ve acti on
r eact to r apid r ate of chan ge befor e er r or s gr ows too big
Effect of Pr opor ti onal, I ntegr al & Der ivati ve Gains on the Dynami c Response
Proportional Controller
Pure gain (or attenuation ) since: the controller input is error the controller output is a proportional gain
E s K U s u t ( ) ( ) ( ) ( p p
Change in gain in P controller
Increase in gain:
Upgrade both
steadystate and transient responses
Reduce steady-state
error
Reduce stabi li ty!
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 U ( s ) u ( t ) K e ( t i s 0
Change in gain for PI controller
Increase in gain:
Do not upgrade
steadystate responses
Increase slightly
settling time I ncr ease oscillations
and over shoot!
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
(
E ( s ) K s U ( s ) u ( t ) K d d
Effect of change for gain PD controller
Increase in gain:
Upgrade transient
response Decrease the peak time and rise time
I ncr ease over shoot
and settl ing ti me!
Changes in gains for PID Controller