You are on page 1of 62

Process Control Systems

PID Controller
Objectives

 At the end of this lecture, students should be able to:


– Conventional Controller, Unconventional Controller
– Understand and describe the strengths and weaknesses of
the three PID modes
– Establish general properties of PID feedback from the
closed-loop model
– Tuning methods
Properties We Seek in a Controller
 Good performance – using feedback performance measures
 Insensitivity to errors – good performance when parameters have
“reasonable” errors
 Wide applicability – adjustable parameters for many different
processes
 Timely calculations – avoid iterative calculations that does not
converge
 Able to be switched to/from manual
– bumplessly
 Extensible – can be enhanced
easily
Closed-Loop Model

 Before we learn more about controller design, let’s develop a


general dynamic model for a closed-loop system, i.e the
process and the controller working as an integrated system.
General Closed-Loop Model
Closed-Loop System
 Let’s check our understanding :
– Where are the blocks for transmission and signal conversion?
– What is the difference between CV(s) and CVm(s)?
– What is the difference between Gp(s) and Gd(s)?
– How do we measure the variable whose line is indicated by the
red circle?
– Which variables are determined by a person, which by
computer?
Closed-Loop System

Set point response Disturbance response


CV ( s ) G p ( s )Gv ( s )Gc ( s ) CV ( s) Gd (s)
 
SP ( s ) 1  G p ( s )Gv ( s )Gc ( s )Gs ( s ) D( s) 1  G p (s)Gv ( s)Gc ( s)Gs (s)

Which elements in the control system affect the system stability?


PID Controller – The History So
Far...

 Developed in the 1940’s, remains the workhorse of practice.


 Not “optimal”, based on good properties of each mode.
 Pre-programmed in all digital control equipment.
 Commonly used for SISO systems; ONE controlled variable
adjusted by ONE manipulated variable
– Many PID loops can be found in a plant
2 Main Groups of controllers

 Conventional Controller
– Know a mathematical model of the process in order to design a controller.
– P, PI, PD, PID, Otto-Smith, Optimal, adaptive, robust, nonlinear

 Unconventional
– new approaches to the controller design in which knowledge of a
mathematical model of a process generally is not required.
– fuzzy controller and neuro or neuro-fuzzy controllers.
2 Main Groups of controllers

 Many industrial processes are nonlinear and thus complicate to


describe mathematically.
 However, it is known that a good many nonlinear processes
can satisfactory controlled using PID controllers providing that
controller parameters are tuned well.
 Instead of using a small number of complex controllers, a larger
number of simple PID controllers is used to control simpler
processes in an industrial assembly in order to automates the
certain more complex process.
 PID can be used to solve even a very complex control
problems, especially when combined with different functional
blocks, filters (compensators or correction blocks), selectors
2 PID Controller
Motivation and Limitations

 Motivation
– Simple to get working
– Can be tuned to meet time-domain specifications
– Readily available in PLC/DCS systems
– Digital and analogue implementation easy

 Limitation
– For single-input single-output systems only
– Difficult to tune to meet precise specifications
PID Controller

 Three “modes”: Three ways of using the time-varying behavior


of the measured variable
What is Tuning the Loop?

PID stands for Proportional, Integral, Derivative. 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 the measurement (or process
variable) at the set-point. The set-point is where you would like the
measurement to be. Error is defined as the difference between set-point and
measurement.

Control Loop GBO


What is Tuning the Loop?

(error) = (set-point) - (measurement) The variable being adjusted is called


the manipulated variable which usually is equal to the output of the
controller. The output of PID controllers will change in response to a change
in measurement or set-point. Manufacturers of PID controllers use different
names to identify the three modes. These equations show the relationships:

P Proportional Band = 100/gain


I Integral = 1/reset (units of time)
D Derivative = rate = pre-act (units of time)

Depending on the manufacturer, integral or reset action is set in either


time/repeat or repeat/time. One is just the reciprocal of the other. Note that
manufacturers are not consistent and often use reset in units of time/repeat
or integral in units of repeats/time.
Control Loop
Derivative and rate are theGBO
same.
What is Tuning the Loop?

Choosing the proper values for P, I, and D is called "PID Tuning".


The PID control scheme is named after its three correcting terms, whose
sum constitutes the manipulated variable (MV). The proportional, integral,
and derivative terms are summed to calculate the output of the PID
controller.
Defining as the controller output, the final form of the PID algorithm is:

Control Loop GBO


Proportional Band

The proportional term produces an output value that is proportional to the current
error value. The proportional response can be adjusted by multiplying the error
by a constant Kp, called the proportional gain constant.

The proportional term is given by:

A high proportional gain results in a large change in the output for a given
change in the error. If the proportional gain is too high, the system can become
unstable. In contrast, a small gain results in a small output response to a large
input error, and a less responsive or less sensitive controller.
If the proportional gain is too low, the control action may be too small when
responding to system disturbances.

Control Loop GBO


Proportional Band

The proportional term produces an output value that is proportional to the current
error value. The proportional response can be adjusted by multiplying the error
by a constant Kp, called the proportional gain constant.

The proportional term is given by:

A high proportional gain results in a large change in the output for a given
change in the error. If the proportional gain is too high, the system can become
unstable. In contrast, a small gain results in a small output response to a large
input error, and a less responsive or less sensitive controller.
If the proportional gain is too low, the control action may be too small when
responding to system disturbances.

Control Loop GBO


Integral Term

The contribution from the integral term is proportional to both the magnitude
of the error and the duration of the error. The integral in a PID controller is
the sum of the instantaneous error over time and gives the accumulated
offset that should have been corrected previously. The accumulated error is
then multiplied by the integral gain and added to the controller output.

The integral term is given by:

The integral term accelerates the movement of the process towards set point
and eliminates the residual steady-state error that occurs with a pure
proportional controller. However, since the integral term responds to
accumulated errors from the past, it can cause the present value to
overshoot the set point value
Control Loop GBO
Integral Term

The contribution from the integral term is proportional to both the magnitude
of the error and the duration of the error. The integral in a PID controller is
the sum of the instantaneous error over time and gives the accumulated
offset that should have been corrected previously. The accumulated error is
then multiplied by the integral gain and added to the controller output.

The integral term is given by:

The integral term accelerates the movement of the process towards set point
and eliminates the residual steady-state error that occurs with a pure
proportional controller. However, since the integral term responds to
accumulated errors from the past, it can cause the present value to
overshoot the set point value
Control Loop GBO
Derivative Term

The derivative of the process error is calculated by determining the slope of


the error over time and multiplying this rate of change by the derivative gain .
The magnitude of the contribution of the derivative term to the overall control
action is termed the derivative gain, .

The derivative term is given by:

Derivative action predicts system behavior


and thus improves settling time and
stability of the system.

Control Loop GBO


Tuning the Loop

Adjusting the Controller’s PID parameters for a


specific control loop is one part of the job, but:

– The process has to be properly designed and the


sensors and FCEs have to be configured in the right
way before dealing with the PID settings
– If these prerequisites are not correct, the PID setting
will not perform satisfactorily - and may not be
possible at all
Control Loop GBO
Proportional Mode

 Correction proportional to error

Time Domain: MV (t )  K c E (t )  I p

MV ( s )
Transfer function: Gc ( s )   Kc
E (s)

where KC = controller gain


IP = constant term or bias
Proportional Mode
MV (t )  K c E (t )  I p

Relationship between MV and Relationship between MV


Kc as error increases. and Kc for constant error.
Proportional Mode
 In a physical example, the control parameters can be adjusted
by :
– Increasing the height of the fulcrum to increase set point
– Altering the fulcrum position along the bar to change the
controller’s proportional gain
Proportional Mode
 A major disadvantage of the proportional mode is the controlled
variable will have a non-zero offset.
 Offset can be described by the steady-state deviation of CV from
SP.
 Final value after disturbance:
D Kd D K d
CV (t ) t   lim s  0
s0
s 1 Kc K p 1 Kc K p
The closed-loop system does not achieve zero offset, it does not
return to set point.

It seems that by increasing Kc, the offset can be reduced.


Do you think this is a good idea ?
Proportional Mode
Integral Mode

 The “persistent” mode



Kc
Time Domain: MV (t ) 
TI  E (t ' )dt ' I
0
I

MV ( s ) K c 1
Transfer Function: Gc ( s )  
E ( s) TI s
where TI = controller integral time, II = constant term or bias
Integral Mode

Kc
MV (t ) 
TI  E (t ' )dt ' I
0
I
Integral Mode

 Final value after disturbance:


D Kd
CV (t ) t  lim s 0
s0
s Kc K p
1
sTI
 The integral mode ensures that the controller achieves zero offset.

The size of TI determines how soon zero offset is


achieved. How is it able to do this ?
Derivative Mode

 The “predictive” mode

dE (t )
Time Domain: MV (t )  K cTD  ID
dt
Transfer Function: MV ( s )
Gc ( s )   K cTD s
E (s)
where TD = controller derivative time
ID = constant term or initialization
Derivative Mode
dE (t )
MV (t )  K cTD  ID
dt
 Final value after disturbance:
D Kd
CV (t ) t  lim s  DK
s 1  K cTD s
d
s0

 The derivative-only mode yields a non-zero offset.

With the Derivative mode, what is the initial response of


the MV when a step change at the set point is
introduced?
Derivative Mode

 Taking the derivative of the error when the set point is first adjusted
in a step change will introduce a near-infinity value for the MV.
 To avoid this, we can use the controlled variable (CV) instead to
calculate the output of the derivative mode.

dE (t )
Original equation MV (t )  K cTD  ID
dt
Recommended dCV (t )
equation MV (t )   K cTD  ID
dt
PID Controller

 Let’s combine the modes to formulate the PID controller.

E (t )  SP(t )  CV (t )

 1

dCV (t ) 
MV (t )  K c  E (t ) 
 TI 0
E (t ' )dt 'TD
dt 
I
PID Controller

 Let’s look at the performance of the PID controller to a three-tank


mixer (with no reaction).
PID Controller
Performance
PID Controller
Performance
PID Controller
 We can apply many PID controllers when we have many variables
to be controlled.
PID Controller

 How do we evaluate dynamic response of a closed-loop system?


 In a few cases, we can do this analytically (see Marlin, Example
8.5).
 In most cases, we must solve the equations numerically. At each
time step, we integrate
– the differential equations for the process
– the differential equation for the controller
– any associated algebraic equations
 More often than not, we will use a suitable software (for example,
MATLAB) to simulate the dynamic responses.
Practical PID controller

 Ideal PID controller is actually not adopted in


practical cases because of a few problems that can
be solved with suitable modifications of the basic
control law
Practical PID controller
Problems with Derivative Action

 The high frequency gain of the pure derivative action is


responsible for the amplification of the measurement
noise in the manipulated variable.
1 s
GPID  K p e  K i  K d
s s / N 1
Practical PID controller
Set-point Weighting

 The high frequency gain of the pure derivative action is


responsible for the amplification of the measurement
noise in the manipulated variable.
 Roughly speaking, a fast load disturbance rejection is
achieved with a high-gain controller, which gives an
oscillatory set-point step response on the other side. This
problem can be approached by designing a two-degree-of-
freedom control architecture, namely, a combined
feedforward/feedback control law.
Practical PID controller
Set-point Weighting

 In the context of PID control this can be achieved by


weighting the set-point signal for the proportional action,
that is, to define the proportional action as follows:
u p  K p   r  y  ;    0  1

Two-degree-of-freedom PID
control scheme
Practical PID controller
Set-point Weighting

 It appears that the load disturbance rejection task is


decoupled from the set-point following one and obviously it
does not depend on the weight β. Thus, the PID
parameters can be selected to achieve a high load
disturbance rejection performance and then the set-point
following performance can be recovered by suitably
selecting the value of the parameter β.
Practical PID controller
Set-point Weighting

Equivalent two-degree-of-freedom PID control scheme


Practical PID controller
Set-point Weighting

 Here it is more apparent that the function of the set-point


weight is to smooth the (step) set-point signal in order to
damp the response to a set-point change.
 Note also that if β = 0 the proportional kick is avoided.
 Many industrial controllers implement this solution
Practical PID controller
General ISA–PID Control Law

   0,1 ,    0,1
Practical PID controller
General ISA–PID Control Law
Practical PID controller
Integral Windup

 Actuators, such as valves, motors, electric powers and so


on, always have a lower limit and an upper limit.
 When the actuators are at their limit values (which is
called saturation), the dynamics of the process output
become much more sluggish than the case of no actuator
limitations for a big step setpoint change or big
disturbance.
 So, the integral part of the PID controller increases rapidly.
This phenomenon is called the integral windup.
Practical PID controller
Integral Windup
Practical PID controller
Anti-Windup

 Conditional Integration
If u(k)>umax no update for integral part an u(k) = umax
If u(k)<umin No update for integral part u(k) = umin
Practical PID controller
Anti-Windup

 Back calculation

Tt  Td Ti ( PID) Tt  Ti ( PI )
Practical PID controller
Anti-Windup

 Back calculation
Practical PID controller
Anti-Windup

 Combined

y1 y0

y1
y0

Tt  0.03Ti
Practical PID controller
Anti-Windup

 Variable Structure PID


Practical PID controller
Anti-Windup

 Automatic Reset Implementation – PI Controller


Practical PID controller
Anti-Windup

 Automatic Reset Implementation – PI Controller


Practical PID controller
Anti-Windup

 Automatic Reset Implementation – PI Controller


Practical PID controller
Anti-Windup

 Automatic Reset Implementation – PI Controller


PID Tuning
Ziegler-Nichols Open-Loop Tuning
Correlations
 In this method, the PID tuning constants are calculated
using model parameters.
Controller Kc TI Td
P-only (1/Kp) / (τ /θ) _ _
PI (0.9/Kp)(τ/θ) 3.3 θ _
PID (1.2/Kp)(τ/θ) 2.0 θ 0.5 θ

 However, notice that this method predicts a very large


controller gain for system with small dead times and an
infinite gain for systems with no dead time.
 May lead to excessive variation in manipulated variable
and a controller with a small stability margin.
Cohen-Coon Tuning Correlations
Controller Kc TI Td

1    
P-only 1    
K p   3 
 
1     30  3 
 
PI 
Kp  
0 . 9 
12  .   

9  20

  4
1   3  16   32  6 
   
PID K p   12  .  11  2
 
13  8

Ciancone Correlations
- Example

 Let’s apply the tuning charts to the three-tank mixing


process, which is not first-order with dead time.

You might also like