You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/343812958

A Robust Auto-tuning Scheme for PID Controllers

Conference Paper · October 2020


DOI: 10.1109/IECON43393.2020.9254382

CITATIONS READS
0 288

1 author:

Sanjeev Pandey
KPIT
27 PUBLICATIONS   112 CITATIONS   

SEE PROFILE

All content following this page was uploaded by Sanjeev Pandey on 19 September 2020.

The user has requested enhancement of the downloaded file.


A Robust Auto-tuning Scheme for PID Controllers
Sanjeev Kumar Pandey∗ , Kuruva Veeranna∗ , Bijender Kumar∗ and K. U. Deshmukh†
∗ E.
Powertrain, KPIT, Pune, India, † College of Engineering and Technology, Akola, India
Email: Sanjeev.Pandey@kpit.com, kveeranna1994@gmail.com, Bijender.Kumar@kpit.com, kdkudeshmukh@gmail.com

Abstract—This paper examines the implementation issue of parameters and a fast change in proportional gain may skip the
PID auto-tuning as applied for temperature control. An exhaus- sustained oscillation and plant may go to an unstable operating
tive review of various tuning methods, PID control, anti windup region. Moreover, this method drives plant to a marginal stable
and derivative filters are first reported. A practical PID auto-
tuning algorithm is developed for first order plus dead time region, which is not good from a safety point of view. These
system. First, PID parameters are calculated based on ON/OFF issues are valid for Ziegler-Nichols, Modified Ziegler-Nichols
control. Once these parameters are obtained, the control mode and Tyreus Luyben tuning methods. In a Damped oscillation
changes from ON/OFF to PID control. The developed algorithm method, proportional gain is increased until the decay ratio
only requires plant output to auto-tune PID parameters. The of 1/4th is achieved. The gain at which the decay ratio is
auto tuning is developed in MATLAB/Simulink and verified for
various first order plus dead time systems. obtained, is known as ultimate gain Kd and the time period
Index Terms—Temperature control, FOPDT system, tuning is known as oscillation time period Pd . The advantage of this
methods, auto-tuning, anti windup, derivative filter, PID control, method over previously discussed methods is that it does not
set point tracking, MATLAB/Simulink. drive plant to be in a marginal stable region.
It can be observed from Table II that all the open loop
I. I NTRODUCTION based tuning methods must know the plant parameters to tune
PID control is most common control algorithm in industries. PID parameters. The recently developed internal model control
It is used in process industries [1], power converters control (IMC) [10] is robust but it requires plant parameters and design
[2], [3], motor control [4] and electro-hydraulic system control of filter λ. The guideline to design filter is given in [8], [10].
[5]. Based on a survey, for regulatory control, 97% of process Similarly, minimum error criteria based tuning method also
industries use PID algorithm [1]. It is widely used in industries requires knowledge of plant parameters. Therefore, to develop
due to its simplicity and robustness. The proportional, integral an auto-tuning algorithm, plant parameters must be identified
and derivative are three components of PID control and it is first. As it is well known that the plant gain can be identified
not easy to find the ideal value of these parameters without by applying a step input and observing the steady state output.
knowing about the plant. In the last six decades, various open Similarly, the time constant can be identified by measuring the
and closed loop based tuning methods are proposed. All the time taken by the plant to reach the steady state output. The
tuning methods suggest how to find the optimal value of dynamics of temperature system is slow and it becomes slower
PID parameters. A review of tuning methods is presented in when it reaches close to the steady state value. Therefore,
[6]–[8]. The objective of all the tuning methods is to find auto-tuning based on the open loop method is a slow process.
out PID parameters such that the plant has less overshoot, However, open loop based tuning methods have one advantage,
settling time and robust against disturbances. A summary of it does not drive the system to a marginal stable region.
closed and open loop based tuning methods is given in Table The auto-tuning PID is a desirable feature in process control
I and Table II, respectively. There are a few more tuning applications. The first paper on auto-tuning algorithm is pro-
methods which are not included in the tables. Out of various posed in [11] in which the plant parameters are first estimated
tuning methods, the closed loop Ziegler-Nichols [9], Damped and then PID parameters are auto-tuned. In [12], Newton-
oscillation method and open loop Ziegler-Nichols and Cohen Raphson based auto-tuning is proposed to control flow rate.
Coon are very famous in industries. However, development of In [13], adaptive based auto-tuning is proposed to control first
the auto-tuning algorithm using these methods is difficult. order plus dead time (FOPDT) system. In [14], a robust auto-
To implement closed loop Ziegler-Nichols method, the PID tuning PID is proposed to control the level of a fluid tank
control is set in proportional mode by making integral and system.
derivative control equal to zero. Now, the proportional gain is In this paper, a simple PID auto-tuning algorithm is de-
gradually increased until the plant reaches to sustain oscilla- veloped for temperature control. The control is designed for
tion. The gain at which plant reaches to sustain oscillation, is following transient and steady state requirements:
known as ultimate gain Ku and the time period of sustained 1) In auto-tuning mode, the plant should not be driven
oscillation is known as ultimate time period Pu . The PID towards damped or sustained oscillation.
parameters are tuned by these two values as shown in Table 2) The undershoot should be less than 2% when control
I. The issues with this method is that there is no guideline changes from auto-tuning mode to PID mode.
on how to increase the proportional gain. A slow increase 3) The steady state error should be less than 1% of the
in proportional gain will take more time to auto-tune PID desired temperature.
TABLE I control is implemented along with a low pass filter (LPF). In
C OMPARISON OF CLOSED LOOP PID TUNING FORMULAS literature, two types of anti windup scheme is used, namely,
Tuning methods Kp Ti Td (i) conditional integration and (ii) tracking anti windup. In
Ziegler-Nichols method 0.6 Ku Pu Pu conditional integration when u is not in the range of usat then
2 8
Modified Ziegler-Nichols method 0.33 Ku Pu
2
Pu
8
the integration process is stopped. In tracking anti windup,
Ku Pu integral control is given by
Tyreus – Luyben method 3.2
2.2Pu 6.3
Pd Pd
Damped oscillation method 1.1Kd 3.6 9   Zt
Kp
ui = + Kaw (usat − u) e(τ )dτ (2)
Ti
4) The overshoot for set point change should be less than 0
10%.
where
5) The PID parameters should not be required to be re- 
tuned if set point changes. u for umin < u < umax

usat = umax for u ≥ umax
The paper is divided into six parts. In Section II, the system 
umin for u ≤ umin

under study and control objectives are stated. In Section III, a
review of PID control is discussed. The proposed auto-tuning umin and umax are constants, explained in detail in Section
algorithm is introduced in Section IV. Simulation results are IV. In [15], [16], various anti windup schemes are discussed.
provided for three different FOPDT systems in Section V. The In this paper, tracking anti wind up is used.
paper is concluded in Section VI. The conventional PID control or Type A is defined as
II. M ATHEMATICAL M ODEL OF FOPDT S YSTEM   Zt
The transfer function of a heating or cooling system is a Kp
u = Kp e(t) + + Kaw (usat − u) e(τ )dτ
FOPDT. In a most common form, transfer function of FOPDT Ti
0
system can be defined as
de(t)
K + Kp Td (LP F ) (3)
Gp (s) = e−θs (1) dt
τs + 1
where Kaw is anti windup gain. If generated control u
where K is system gain, τ is time constant and θ is time saturates, then rate of convergence of u to usat is decided by
delay. For a heating system K > 0 and for a cooling system Kaw . It may be noted from (3) that when umin ≤ u ≤ umax ,
K < 0. It may be noted here that for the developed algorithm, anti wind up term Kaw (usat − u) = 0 i.e. (3) becomes
the value of these parameters is unknown. Broadly, the control a conventional
objective can be divided into two parts (i) auto-tuning of PID √ PID control. In [1], recommended value of
Kaw = 1/ Ti Td for PID control and Kaw = 1/Ti for PI
parameters and (ii) regulation and tracking of the desired set control.
point. Two types of LPF is used for derivative control (i) Type 1:
III. PID C ONTROL N1 /(N1 + Td s) and (ii) Type 2: N2 /(N2 + s). where N1 > 0
and N2 > 0 are LPF time constants. Generally, they are in
In this section, various forms and types of PID are reviewed
the range of 2 ≤ N1 ≤ 20 and 0 < N2 ≤ 1. It may be
and commonly used PID are industries is presented. There are
noted here that one of the LPF has process dependent time
three forms of PID control, namely, (i) standard or ideal form
constant Td . In this paper, Type 2 LPF is implemented. The
(ii) parallel form and (iii) classical form. The control formulas
major disadvantage of Type A controller is that when the set
are:   point changes in a step fashion, proportional and derivative
1) Standard or ideal form u = Kp 1 + T1i s + Td s e(s) control makes (3) behave violently [17] therefore, these two
  controllers are modified as
2) Parallel form u = Kp + Ksi + Kd s e(s)
  Zt
   Kp
3) Classical form u = Kp 1 + T1i s 1 + Td s e(s) u = Kp e(t) + + Kaw (usat − u) e(τ )dτ
Ti
0
where Kp is proportional gain, Ti is integral time, Td is dy(t)
derivative time, Ki (= Kp /Ti ) is integral gain, Kd (= Kp Td ) − Kp Td (LP F ) (4)
dt
is derivative gain, u is generated PID control and error
e(s) is difference between set point and output of the plant. and
Advantages and disadvantages of above forms are discussed
 Zt
extensively in literature therefore, they are not discussed here.

Kp
In this paper, standard form of PID is used. It may be noted u = −Kp y(t) + + Kaw (usat − u) e(τ )dτ
Ti
from above PID forms that anti windup and derivative filter 0
are not used in the control. In industrial application, integral dy(t)
− Kp Td (LP F ) (5)
control is implemented with anti windup scheme and derivative dt
TABLE II
C OMPARISON OF OPEN LOOP PID TUNING FORMULAS

Tuning methods Kp Ti Td
1.2τ
Open loop Ziegler-Nichols method Kθ
2θ 0.5θ
1.2τ
C−H−R method Kθ
2θ  0.42θ
 32+ 6θ
τ
θ
τ 4 θ 4θ
Cohen and Coon method + 4τ
Kθ 3 13+ 8θ
τ
11+ 2θ
τ
2τ +θ
IMC 2K(λ+θ)
τ + θ2 λθ
2τ +θ

undershoot in second cycle ymin2 and time period of


second cycle Tosc2 . The PID parameters are calculated
using these parameters, as given below
4
(a) Kp = 0.35 πydif f
(b) Ti = 0.5Tosc
(c) Td = 0.125Tosc
Fig. 1. Block diagram of the proposed auto-tuning algorithm where ydif f = ymax − ymin , ymax =
[ymax1 ymax2 ]0 , ymin = [ymin1 ymin2 ]0 and
Tosc = [Tosc1 Tosc2 ]0 . These parameters are shown
where y(t) is plant output. Equation (4) is known as PI−D in Fig. 3a. It may be observed from Fig. 2d that
control or Type B and (5) is known as I−PD control or Type Ymax1 , Ymin1 and Tosc1 are given to PID control
C. In this paper, Type B PID is used. block after first cycle, but PID block is not triggered.
The switch en1 = 1 when Tosc1 > 0 and en2 = 1
IV. D EVELOPMENT OF PID AUTO -T UNING A LGORITHM when Tosc2 > 0. The ON/OFF control is disabled when
The issues associated with the existing tuning methods en2 = 1.
motivated the author to develop a simple auto-tuning PID 3) The Auto switch block in Fig. 2d allows PID control
control method. The relay based tuning method is first pro- output to plant when en2 = 1.
posed in [11] and subsequently in [18]–[21]. The relay based The Control saturation block in Fig. 1 limits the generated PID
tuning method is easy to implement compared to well known control u in the range of 0 to 1. In a switching based control,
Ziegler-Nichols and step response based tuning methods. The control input 1 corresponds to 100 % on and 0 corresponds
developed auto tuning method is shown in Fig. 1 and its im- to completely off for a switching cycle. Therefore, umax and
plementation in Simulink is shown in Fig. 2d. The developed umin is taken as 1 and 0 respectively. It may be noted here
algorithm has two parts: (1) ON/OFF control and (2) PID that the plant gain, time constant and time delay values are
control. In ON/OFF control mode, plant is made intentionally not required for PID auto-tuning. The developed algorithm
to oscillate around the set point for two cycles such that the requires ymax , ymin and Tosc which is obtained by measuring
parameters required for PID can be calculated. Once the PID output temperature of the plant.
parameters are calculated based on the plant response, the The integral control with anti wind up scheme and derivative
PID mode is active and plant is completely controlled by PID control with LPF are shown in Fig. 2a and √ Fig. 2b respectively.
control. The working procedure of the developed auto-tuning The anti windup gain Kaw is taken as 1/ Td . In Fig. 2b, when
algorithm is as follows: N2 is replaced by N2 /Td then it becomes Type 1 LPF. A LPF
1) Initially, the plant is controlled by ON/OFF control as with similar kind of arrangement is given in [22].
shown in Fig. 1. For two oscillation cycles, the control The developed auto tuner is a useful feature for a user who
generates output as given below: does not have knowledge about control system or does not
have the desire to tune manually. In industry, ABB ECA 600
(a) e ≤ 0, ON/OFF control = 0
and Honeywell UDC 3200 are two available PID auto tuner
(b) e > 0, ON/OFF control = 1
[23]. The author believes that they might be using a similar
where error e = set point − plant output. It can be seen type of algorithm.
from Fig. 3 that when set point ≤ plant output , ON/OFF
control is equal to 0 and when set point > plant output, V. C ASE -S TUDIES AND D ISCUSSIONS
ON/OFF control is equal to 1. This process is repeated In this section, the developed auto-tuning algorithm is
for two cycles. In this paper, Tosc1 > 0 and Tosc2 > 0 assessed for a wide variety of systems. The gain of the system
corresponds to cycle one and cycle two respectively. ranges from 0.5715 to 220, the time delay 5 to 50 seconds and
2) The number of outputs of ON/OFF control are shown time constant 80 to 150 seconds [24], [25]. It may be noted that
in Fig. 2d. The parameters are overshoot in first cycle these parameters are unknown to the developed algorithm and
ymax1 , undershoot in first cycle ymin1 , time period only the output temperature is known. The transfer function
of first cycle Tosc1 , overshoot in second cycle ymax2 , of FOPDT systems is given below
(a) Model of integral control with tracking anti-windup (inside PID
control block of Fig. 2d)

(a) Plant output (black) and set point (red).

1
(b) Derivative control with LPF (inside PID control block of Fig. 2d)
0.8

ON/OFF control
0.6

0.4

0.2

0
0 50 100
time (sec)
(c) Inside ON/OFF control of Fig. 2d
(b) Output of ON/OFF control
Fig. 3. Plant response during auto-tuning.

auto-tuning is not possible. It can be seen from Figs. 3−6 that


during auto-tuning, plant is forced to oscillate around a set
point by ON/OFF controller.
In Fig. 4, the PID control is auto-tuned at set point 40 ◦ C.
The first two cycles in Fig. 4a shows system response during
(d) Implementation of Fig. 1 in Simulink
auto-tuning phase. The developed algorithm studies overshoot,
Fig. 2. Model of developed PID auto-tuning algorithm.
undershoot and oscillation time period, which is required to
calculate PID parameters. Once these parameters are known
Kp , Ti and Td are calculated as given in Section IV. The
84 ON/OFF control and PID control is shown in Figs. 4b and 4c,
Gp1 (s) = e−6s (6) respectively. The important points may be noted here are:
80s + 1
0.5715 −50s 1) ON/OFF control is active till first two cycles.
Gp2 (s) = e (7)
90s + 1 2) PID control is auto-tuned after first cycle, but not
220 enabled. It can be observed that when PID control is
Gp3 (s) = e−5s (8)
150s + 1 auto-tuned, its value reaches to -1.
As it is well known that the gain of a system is nothing but its 3) PID parameters are updated at the end of the second
maximum value. The heating, ventilation, and air conditioning cycle and the control changes from ON/OFF to PID
(HVAC) system given by (6) can go upto 84 ◦ C for any control.
practical control input. Moreover, when the system reaches 4) When u is in the range of 0 to 1, u and usat are exactly
close to its maximum value, the response becomes very slow. equal and anti wind up part of integral control is not
Therefore, PID is auto-tuned for less than the system gain. active.
Practically, if an operator gives set point more than the system 5) The rate of convergence of u to usat is decided by Kaw .
gain, then output can never reach the desired set point and The performance may be further improved by selecting
(a) Plant output (black) and set point (red)
(a) Plant output (black) and set point (red)

1
1
0.8
ON/OFF control

0.8

ON/OFF control
0.6
0.6
0.4
0.4
0.2
0.2
0
0 100 200 300 400
0
time (sec) 0 500 1000 1500
(b) Output of ON/OFF control time (sec)
(b) Output of ON/OFF control
Fig. 5. Response under developed auto-tuning PID control for system (7).
2
PID is auto-tuned at 0.3 ◦ C and then the set point changed to 0.5 ◦ C.

1 TABLE III
control

S UMMARY OF D EVELOPED AUTO - TUNED PID PARAMETERS

Transfer function Kp Ti Td Auto-tuned at


0
set point (◦ C)
84
e−6s 0.084 11.55 2.8875 40
−1 80s + 1

0 100 200 300 400 0.5715 −50s


time (sec) e 1.854 82.05 20.51 0.3
90s + 1
(c) PID control u (cyan) and usat (blue)
Fig. 4. Response under developed auto-tuning PID control for HVAC system 220
e−5s 0.073 9.95 2.487 100
(6). PID is auto-tuned at 40 ◦ C and then the set point changed to 60 ◦ C. 150s + 1

some different value of Kaw . new set point without any steady state error. A summary of
6) The set point is changed to 60 ◦ C at 220 sec and auto- auto-tuned PID parameters for all the three systems is given
tuned PID control can drive the system to the new set in Table III.
point. It can be concluded that PID auto-tuned at a set
point, need not to be re tune when the set point changes. VI. C ONCLUSION
In Fig. 5 and Fig. 6, the performance of the developed In this paper, an auto-tuning algorithm is developed for PID
algorithm for (7) and (8) are shown respectively. In both the control parameters. The proposed algorithm is very simple
cases, the system is first auto-tuned for a set point and then to implement and applicable to heating and cooling process.
the set point is changed to a new value. It can be observed The PID control is implemented with tracking anti windup
that the developed algorithm is able to drive the system to the and derivative filter such that when control changes from auto
[4] V. Kumar, P. Gaur, and A. Mittal, “ANN based self tuned PID like
adaptive controller design for high performance PMSM position con-
trol,” Expert Systems with Applications, vol. 41, no. 17, pp. 7995–8002,
2014.
[5] K. Sinthipsomboon, I. Hunsacharoonroj, J. Khedari, W. Pongaen, and
P. Pratumsuwan, “A hybrid of fuzzy and fuzzy self-tuning pid controller
for servo electro-hydraulic system,” in 2011 6th IEEE Conference on
Industrial Electronics and Applications, pp. 220–225, IEEE, 2011.
[6] S. Skogestad, “Probably the best simple PID tuning rules in the world,”
in AIChE Annual Meeting, Reno, Nevada, vol. 77, 2001.
[7] M. W. Foley, R. H. Julien, and B. R. Copeland, “A comparison of
PID controller tuning methods,” The Canadian Journal of Chemical
Engineering, vol. 83, no. 4, pp. 712–722, 2005.
[8] W. Tan, J. Liu, T. Chen, and H. J. Marquez, “Comparison of some
well-known PID tuning formulas,” Computers & chemical engineering,
vol. 30, no. 9, pp. 1416–1423, 2006.
[9] J. G. Ziegler and N. B. Nichols, “Optimum settings for automatic
(a) Plant output (black) and set point (red) controllers,” trans. ASME, vol. 64, no. 11, 1942.
[10] C. E. Garcia, D. M. Prett, and M. Morari, “Model predictive control:
theory and practice-a survey,” Automatica, vol. 25, no. 3, pp. 335–348,
1 1989.
[11] K. J. Åström and T. Hägglund, “Automatic tuning of simple regula-
tors with specifications on phase and amplitude margins,” Automatica,
0.8
ON/OFF control

vol. 20, no. 5, pp. 645–651, 1984.


[12] A. B. Rad, W. L. Lo, and K. Tsang, “Self-tuning PID controller
0.6 using Newton-Raphson search method,” IEEE Transactions on Industrial
Electronics, vol. 44, no. 5, pp. 717–725, 1997.
0.4 [13] H.-P. Huang, M.-L. Roan, and J.-C. Jeng, “On-line adaptive tuning for
PID controllers,” IEE Proceedings-Control Theory and Applications,
vol. 149, no. 1, pp. 60–67, 2002.
0.2 [14] K. K. Tan, S. Huang, and R. Ferdous, “Robust self-tuning PID controller
for nonlinear systems,” Journal of process control, vol. 12, no. 7,
0 pp. 753–761, 2002.
[15] Y. Peng, D. Vrancic, and R. Hanus, “Anti-windup, bumpless, and
0 100 200 300 400 500 conditioned transfer techniques for PID controllers,” IEEE Control
time (sec) systems magazine, vol. 16, no. 4, pp. 48–57, 1996.
(b) Output of ON/OFF control [16] A. Ghoshal and V. John, “Anti-windup schemes for proportional integral
and proportional resonant controller,” 2010.
Fig. 6. Response under developed auto-tuning PID control for system (8). [17] G. Szafranski and R. Czyba, “Different approaches of PID control UAV
PID is auto-tuned at 100 ◦ C and then the set point changed to 150 ◦ C. type quadrotor,” 2011.
[18] A. Leva, “PID autotuning algorithm based on relay feedback,” in IEE
Proceedings D-Control Theory and Applications, vol. 140, pp. 328–338,
IET, 1993.
tuning mode to PID mode, the output should have minimum [19] C. Hang, K. Astrom, and Q. Wang, “Relay feedback auto-tuning of
bump. It is observed that during mode change, undershoot is process controllers-a tutorial review,” Journal of process control, vol. 12,
less than 2 % and steady state error is less than 1% of the no. 1, pp. 143–162, 2002.
[20] D. I. Wilson, “Relay-based PID tuning,” Automation and Control,
set point. It is also observed that once the plant is auto tuned vol. 2005, pp. 10–11, 2005.
for a set point, the same PID parameters can drive the plant [21] J. Berner and K. Soltesz, “Short and robust experiments in relay
even when the set point changes to a new value. The major autotuners,” in 2017 22nd IEEE International Conference on Emerging
Technologies and Factory Automation (ETFA), pp. 1–8, IEEE, 2017.
advantage of the developed algorithm is that it only requires [22] K. Ogata and Y. Yang, Modern control engineering, vol. 17. Pearson
the output temperature. Upper Saddle River, NJ, 2010.
[23] J. Berner, K. Soltesz, T. Hägglund, and K. J. Åström, “An experimental
ACKNOWLEDGEMENTS comparison of PID autotuners,” Control Engineering Practice, vol. 73,
pp. 124–133, 2018.
The authors would like to thank Prakhar Shrivastava and [24] A. Adegbenro, M. Short, and S. Williams, “Development of a Digital
PID-like Adaptive Controller and its Application in HVAC systems,” in
Manu Batura, Agiliad Technologies Pvt. Ltd., Pune, India for International Conference on Innovative Applied Energy 2019, 2019.
their contributions in development of the presented work. [25] Y. Zhou, B. Qi, S. Huang, and Z. Jia, “Fuzzy PID Controller for FOPDT
System Based on a Hardware-in-the-Loop Simulation,” in 2018 37th
R EFERENCES Chinese Control Conference (CCC), pp. 3382–3387, IEEE, 2018.

[1] K. J. Åström and T. Hägglund, PID controllers: theory, design, and


tuning, vol. 2. Instrument society of America Research Triangle Park,
NC, 1995.
[2] S. K. Pandey, S. L. Patil, and V. S. Rajguru, “Isolated flyback converter
designing modeling and suitable control strategies,” in Int. Conf. on
Advances in Power Electronics and Instrumentation Engineering, PEIE,
Citeseer, 2014.
[3] T. Kobaku, S. C. Patwardhan, and V. Agarwal, “Experimental evaluation
of internal model control scheme on a DC–DC boost converter exhibiting
nonminimum phase behavior,” IEEE Transactions on Power Electronics,
vol. 32, no. 11, pp. 8880–8891, 2017.

View publication stats

You might also like