Practical Design of PID-type Controllers With Constraints
Practical Design of PID-type Controllers With Constraints
Practical Design of PID-type Controllers With Constraints
Mr. Steely Falar is a senior student in the Controls and Instrumentation Engineering Technology Program
at the University of Houston-Downtown. He holds an AAS degree in Controls and Instrumentation from
Houston Community College. His interests include process control, programmable logic controllers, and
design of effective human-machine interfaces.
American
c Society for Engineering Education, 2016
Practical Design of PID-type Controllers with Constraints
Abstract
The proportional-integral-derivative (PID) controller has extensively been used in the process
industries and is taught in most undergraduate engineering and engineering technology
programs. Various PID design/tuning methods have been proposed over the years such as the
famous Ziegler-Nichols method, the Internal Model Control (IMC) method, and the many
variations of it. Given a process model, these methods estimate values for the PID tuning
parameters: proportional gain, integral time, and derivative time. Many of the tuning methods
include a tunable parameter, for instance the filter time constant in the case of the IMC method
that the user must “tune”. Furthermore, none of these techniques considers process constraints in
the PID design. However, from a practical viewpoint, process and final control element
constraints must be accounted for.
Recently, a methodology based on has been developed to design PID controllers subject to
controlled variable as well as manipulated variable (size and rate) constraints while a
performance criterion is optimized. This paper extends this methodology to determine the
“tunable” parameters of other PID design methods while process and equipment constraints are
satisfied. Estimation of the IMC filter time constant is considered. Simulation and experimental
results demonstrate the practicality of the new PID design method.
1. Introduction
Over the years, a great deal of research has been devoted to the design of proportional-integral-
derivative (PID) controllers which are widely used in the process industries. [1]-[3]. The famous
Ziegler-Nichols tuning method [1] was developed more than 70 years ago and is still widely
used. However, over the years, new methods have been proposed which result in better control
performance and improved robustness. One of the most widely used methods is the Internal
Model Control (IMC) method for designing PID controllers [4] and its many variations of it.
Most of these techniques are analytic in nature and given a linear process model, they estimate
the tuning parameters of the PID controller as long as the user provides an estimate of the filter
time constant. Although simple guidelines are provided on how to select this filter time constant,
it is in essence a “tunable” parameter, however.
In addition, a number of methods have been proposed to tune a PID controller such that a
performance criterion is optimized, e.g. [5]-[7]. Almost exclusively, such methods are concerned
with optimizing a performance criterion and the efficiency of the optimization methodology.
However, from a practical point of view, it is also desirable to optimize the tuning of PID
controllers subject to operating constraints.
Recently, a methodology has been developed to design PID controllers subject to controlled
variable as well as manipulated variable (size and rate) constraints while a performance criterion
is optimized. This method has been applied to linear and nonlinear processes, various types of
PID algorithms and single or cascade feedback control structures [8]-[10]. Its usefulness has
been demonstrated using simulation studies as well as experimental runs.
This paper extends this methodology to determine the “tunable” parameters of other PID design
methods while process and equipment constraints are satisfied. Estimation of the IMC filter time
constant is considered. Simulation and experimental results demonstrate the practicality of the
new PID design method.
The remaining of the paper is organized as follows: Section 2 describes the methodology and its
implementation in Microsoft Excel. Section 3 presents simulation results on the performance of
the proposed method for a number of processes. Section 4 presents experimental results while
Section 5 discusses the impact on undergraduate education. Finally, Section 6 summarizes the
main results.
At the heart of the proposed methodology lies the process model. Most industrial processes, at
least in the petrochemicals and refining sectors, can be described by a first or second order plus
time delay model. On the other hand, a number of model reduction techniques, such as the “half
rule”, could be used to reduce the process model to a first order plus dead time model (FOPDT)
[11]. So, without loss of generality, it is assumed that the process is represented by a FOPDT model
of the form given by Equation (1):
K p e s
G p ( s) (1)
p s 1
where
Kp is the process gain
p is the time constant
is the dead time (or time delay)
For computer-based control, the controllers are discretized and programmed in the velocity form.
For example, in the case of the ideal PID controller, when P and D act on the control error, the
following equation is used.
s
m(k ) m(k 1) K c [(e(k ) e(k 1) e(k ) d (e(k ) 2e(k 1) e(k 2)] (3)
i s
When P and D act on the process variable, the following equation is used:
m(k ) m(k 1) K c [( y(k 1) y(k ) s e(k ) d (2 y (k 1) y (k ) y (k 2)] (4)
i s
In equations (3) and (4), s is the controller’s execution period.
2.3 The IMC Design Method for PID Controllers
The original method was first presented in [4]. A good summary of the tuning equations for various
types of process models is included in [11]. For a model as shown in equation (1), the tuning
equations are:
It can be seen from equations (5) and (7) that tuning parameters will be calculated as long as the
user provides a value for the filter time constant, c. Depending on the assigned value, the controller
tuning will be affected. This work will estimate a value for the filter time constant while a
performance criterion is optimized subject to process constraints. The approach is based on the
concept of co-simulation.
A process model is controlled using a PID controller. Assuming an initial value for the filter time
constant, tuning parameters are estimated using the IMC method and the closed loop system
performance is evaluated over a desired time horizon for expected set point and/or load changes.
For instance, the Integral Absolute Error (IAE) could be used to measure system performance.
Then, using an optimization algorithm and process constraints, the filter time constant is updated
and the process is repeated until the performance criterion reaches a minimum value. Thus, by
following this co-simulation based approach, tuning parameters are obtained which help ensure
that process constraints will be satisfied prior to implementing them on the real process.
Figure 2. PID Controller Design Using Co-simulation
This co-simulation approach has been used for the tuning of single loop PID controllers subject to
constraints [8], [9]. The same approach was also used to simultaneously tune PID controllers in a
cascade control structure [10].
In this study, the IMC filter time constant will be estimated. Its estimation is done by optimizing
either the integral absolute error (IAE) or the integral square error (ISE) over a desired time
horizon, tf. Other performance measures could also be considered. The performance criteria and
the various constraints are mentioned next.
The performance criteria used in the present work, integral absolute error (IAE) and integral square
error (ISE), are given by Equations (10) and (11), respectively.
tf
Positional and rate of change constraints for the manipulated variables are considered. They are
shown in Equations (13) and (14).
To limit the search space for appropriate tuning parameters and speed up convergence of the
optimization algorithm, tuning parameter constraints are considered as shown in Equations (16)
through (17).
K C , LL K C K C ,UL (15)
I , LL I I ,UL (16)
D, LL D D,UL (17)
To account for robustness against modeling errors, maximum sensitivity function constraints [18]
are considered as shown in Equation (18).
M S M S ,UL (18)
The subscripts LL and UL stand for lower limit and upper limit constraints.
As in [8], the process models are assumed to be first order plus time delay (FOPTD). The Euler
integration method is used to solve the resulting ordinary differential equations. For computer
implementation, the discrete version of a velocity type PID controller is used. The computer
platform is Microsoft Excel and the Solver function with the GRG (gradient) optimization
algorithm is used. The upper/lower limits for controlled and manipulated variables are process
specific. The upper/lower limits for tuning parameters are set as multiple/fraction of the tuning
parameters obtained using the IMC method for a value of the filter time constant which is equal to
the process time constant.
3. Simulation Results
In this section, a number of simulation examples illustrate the proposed method. Its performance
is tested for setpoint changes. Tuning parameters, subject to performance criteria, are estimated
for PI and PID controllers. Control performance is compared to that obtained using the default
IMC method where the filter time constant is set equal to the process time constant. In all cases,
the controller execution period is set to 0.5 units of time and equals the integration step of the
Euler method.
This process is lag dominant. Its model is given by the following equation:
1 e 1s
G p 2 ( s)
20s 1
The relative time delay, is:
1
0.0476
p 1 20
Controller tuning using the proposed optimization method is done subject to the constraints
summarized in Table 1.
Table1. Tuning Constraints for Example 1
min max
Max/Min MV Change (%) -3 3
Max/Min MV Rate of Change (%/min) -3 3
CV Setpoint Change 1.5 1.5
Max/Min CV Change 10% under shoot 10% over shoot
Proportional Gain, KC 0 5KC_IMC
Integral Time, i 0.001 2 max(p, 8 )
Derivative Time, d 0 i /5
The tuning parameters and corresponding IAE values are shown in Table 2 for the traditional IMC
method and the IMC method with an optimal filter time constant. For the IMC tuning method, the
filter time constant has been set equal to the process time constant.
From a performance viewpoint, the classical IMC method yields the slowest response. The
proposed method brings a balance between speed of response and excessive manipulated variable
movement. In the case of the new method, a more aggressive tuning was limited because the
maximum manipulated variable constraint became active.
From a performance viewpoint, and for a balanced process, it is demostrated that new method with
an optimal filter time constant yields a faster response than the classical IMC method while process
constraints are respected.
From a performance viewpoint, and for a time delay dominant process, the classical IMC method
yields a faster response than the proposed method. However, the proposed method results in less
IAE while it respects the imposed process constraints. The classical method violates the imposed
max limit for the manipulated variable.
4. Experimental Results
The proposed tuning method was applied to the twin water tank experimental system reported by
[9] and [10]. Figure 6 shows the water twin tank system. In this twin tank process, water is pumped
into the first tank (Tank 1) using a variable speed pump. From tank 1, water flows into the second
tank (Tank 2) because of hydraulic pressure difference. From tank 2, water flows back into the
reservoir. The control objective is to maintain the level of tank 2 at a desired setpoint using a PI
controller. The manipulated variable is the speed of the pump or more precisely the DC voltage to
the pump.
Level 2 (h2) Level 1 (h1)
Tank 2 Tank 1
F3 F2 F1
P-7 P-7 P-5
V-1 V-2
WATERWater
RESERVOIR
Reservoir VP
E-1
Using experimental step test data, the following transfer function model was developed:
h2 ( s) 21.25 e 10s
G p ( s)
VP ( s ) 66 s 1
Where h2 is the tank 2 level in cm and Vp is the pump voltage in VDC.
The previous model was used to tune a PI controller using the classical IMC method and the
proposed method. Furthermore, simulation runs were performed to determine the expected closed
loop perfornace using these two tuning methods. The tuning results are given in Table 5. The
closed loop system performance for the two tuning methods is shown in Figure 7.
Based on the data in Table 4 and the reponses shown in Figure 7, it is apparent that the new method
estimates a filter time constant which optimizes the IAE while a maximum rate of change for the
manipulated variable is observed (0.17 VDC/s).
The calculated tuning parameters were applied to the actual experimental system. The response of
the water tank process when the PI controller is tuned using the classical IMC and the proposed
IMC tuning methods is shown in Figure 8.
Figure 8. Setpoint response for the Twin Tank process (Experimental response)
The experimental data show that the new tuning method yields a faster response (blue line) than
the classical IMC method (red line) and a smaller IAE.
6. Conclusions
The paper was concerned with the design of PID controllers. A new method was proposed to
estimate an optimal value for the filter time constant of the classical IMC tuning method for PID
controllers. The new method is based on the concept of co-simulation and accounts for process
constraints. Simulation and experimental results demonstrate the advantages of the proposed
method.
References
[1] Ziegler, J.G & Nichols, N.B. (1942). Optimum settings for automatic controllers. Trans. ASME 64, 759–768.
[2] Cohen, G.H. & Coon, G.A. (1953). Theoretical consideration of retarded control. Trans. ASME, 75, 827–834.
[3] Tyreus, B.D. & Luyben, W.L. (1992). Tuning PI controllers for integrator/dead time processes. Industrial &
Engineering Chemistry Research, 31, 2625-2628.
[4] Rivera, D.E., Morari, M & Skogestad, S. (1986). Internal model control 4.PID controller design. Industrial &
Engineering Chemistry Process Design and Development, 25, 252–265.
[5] Tavakoli, S. & Tavakoli, M. (2003). Optimal Tuning of PID Controllers for First Order Plus Time Delay
Models Using Dimensional Analysis. The Fourth International Conference on Control and Automation
(ICCA’03), Montreal, Canada.
[6] Madhuranthakam, C. R.,Elkamel, A. &Budman, H. (2008). Optimal tuning of PID controllers for FOPTD,
SOPTD and SOPTD with lead processes. Chemical Engineering and Processing, 47, 251–264.
[7] Panagopoulos, H., Astrom, K.J. & Hagglund, T. (2002). Design of PID controllers based on constrained
optimization. IEE Proceedings - Control Theory and Applications, 149 (1), 32–40.
[8] Tzouanas, C. & Tzouanas, V. (2013). Optimal Tuning of PID Controllers subject to Process Constraints.
International Journal of Modern Engineering, 14(1), 70-80.
[9] Tzouanas, C. & Tzouanas, V. (2014). Optimal Tuning of PI Controllers subject to Process Constraints –
Experimental Evaluation. International Journal of Modern Engineering, 14(2), 15-21.
[10] Tzouanas, C. & Tzouanas, V. (2013). Optimal Tuning of PID Controllers subject to Process Constraints.
International Journal of Modern Engineering, 14(1), 70-80.
[11] Seborg, D.E., Edgar, T.F. & Mellichamp, D.A., Process Dynamics and Control, 2 nd Ed., Wiley, ISBN 978-0-
471-00077-8.
[12] Astrom, K.J., Panagopoulos, H. & Hagglund, T. (1998). Design of PI controllers based on non-convex
optimization. Automatica 34(5), 585–601.