You are on page 1of 9

ISA

TRANSACTIONS1

ISA Transactions 37 (1998) 227±235

A fuzzy logic based PI autotuner


R. Bandyopadhyay *, D. Patranabis
Department of Instrumentation Engineering, Jadavpur University, Salt Lake Campus, Calcutta 700091, India

Abstract
An autotuner based on PI algorithm starting with deadbeat approach and prediction made with fuzzy inference
mechanism has been presented. While fuzzy inferencing in PI mode has been of some consequence in recent years,
addition of the deadbeat format is expected to improve the performance minimizing IAE through reduction of the
number of command variation. Because of the requirement of controller gain and reset time beyond the acceptance
limits with a deadbeat format, constraints following a knowledge base and compatible with the system using fuzzy
inference engine have been imposed. The simulated as well as practical results with table top process models have
shown substantial improvement in the performance of the system as compared with the Ziegler±Nichol's approach.
# 1998 Elsevier Science Ltd. All rights reserved.
Keywords: Auto-tuning; PI Controller; Fuzzy logic

1. Introduction Besides, the process non-linearity and unpredictive


variability make such an approach quite di€erent
Autotuning controllers started appearing on the from the real practical situation. An algorithm
industrial scene speci®cally in process control areas named EXACT [3] is now being commercially
mainly because of their capability of on-line tun- used. It is based on pattern recognition and expert
ing of the controller parameters. The process system techniques.
parameters, in general, are dynamic in nature and Subsequent to the development of conventional
the control of such a process requires the con- autotuning and adaptive controllers, another class
troller parameters to be tuned continuously or at of controllers appeared in the scenario and made
least at regular intervals. Several autotuning algo- their presence strongly felt. These controllers use
rithms are now available to serve the above pur- fuzzy inference mechanism [4] and have been
pose. Some of these algorithms were based on shown to outperform conventional controllers for
minimum variance optimal control policy [1]. A certain speci®c applications where the process is
subsequent approach was to minimize a perfor- a€ected by noise, load disturbance and other
mance index involving input, output and states [2]. ambient conditions that cause parameter variation
Such algorithms are, however, based on the and sudden structural change. These controllers
mathematical models of the processes which, rely mainly on the knowledge of process experts
often, are made with insucient process data. and are basically non-linear in nature, i.e. the
controller parameters are di€erent for di€erent
* Corresponding author. e-mail: ieeju@giascl0l.vsnl.net.in process conditions [5,6].

0968-0896/98/$19.00 # 1998 Elsevier Science Ltd. All rights reserved.


PII: S0019 -0 578(98)00020 -2
228 R. Bandyopadhyay, D. Patranabis/ISA Transactions 37 (1998) 227±235

More recently, He et al. [7] have utilized the Ziegler±Nichols [12] tuning formulae. As soon as
fuzzy logic theory to tune conventional PID con- there is a disturbance, the proposed control algo-
trollers. In this approach, the control mechanism rithm is initiated, the controller parameters are
is the conventional PID unlike fuzzy logic con- tuned at each sampling instant. They are, how-
trollers, but the controller parameters are tuned to ever, restored to their initial settings whenever the
achieve better response employing the knowledge error becomes negligibly small. In fact, the con-
of process experts. The rationale behind such an troller parameters, namely the proportional con-
approach is that since the controller output is not stant (Kc ) and reset time (TR ), due to such a
derived directly from the inference engine, the tuning process, move around their initial settings
method is less sensitive to the limitation of the only. The proposed tuner algorithm has been tes-
process expert. Subsequently, Xu et al. [8] have ted on ®rst-order plus dead time and second-order
developed a tuning rule for fuzzy PI controllers plus dead-time process models and in each case
based on phase/gain margin. Their approach is the result is shown to be better on count of IAE
similar to the work of He et al in the sense that criterion. The comparison is done with the con-
both of them have used the conventional PI or ventional PI controller tuned by Ziegler±Nichols
PID form to generate the controller output. method. Finally, the comparison on a laboratory
A novel algorithm for automatic tuning of a PI type temperature rig PT-326 has been executed to
controller is presented in this paper. It combines prove the ecacy of the proposed tuner.
the underlying philosophy of dead-beat control
with fuzzy control for developing this autotuning
algorithm. The algorithm follows the techniques 2. The method
of He et al. [7] as also Xu et al. [8] for tuning a
conventional PI controller with fuzzy inference The block diagram of the process and the con-
mechanism. In addition, however, the proposed troller is shown in Fig. 1. The PI Controller is
algorithm tries to make the deviation from the set- represented in its discrete form as
point zero within one sampling period according
to the format of dead-beat control. Although it is Kc T X
nÿ1
mn ˆ Kc en ‡ ei …1†
virtually impossible to reach the desired zero error 2TR iˆ0
state in one sampling period, taking advantage of
this technique, the algorithm tunes the controller
parameters fast enough to achieve this goal. The The controller parameters, Kc and TR are tuned
combination mentioned above is expected to work during the transient state depending upon the
towards the two speci®c aspects (i) maintaining values of e and e._ The objective of the proposed
the set-point and (ii) reduce the number of `com- method is to reach the ideal situation of zero error
mand variations' [9]. at the next sampling instant.
When the process is in the initial steady-state The PI algorithm in the velocity form is given as
condition, the controller parameters are set at
their initial values which are obtained from Zieg- T
mn‡1 ÿ mn ˆ Kcn en‡1 ÿ KCnÿ1 en ‡ K c en …2†
ler±Nichols [10], Cohen±Coon [11] or re®ned 2TRn n

Fig. 1. System block diagram.


R. Bandyopadhyay, D. Patranabis/ISA Transactions 37 (1998) 227±235 229

where, the system to the desired state via an optimal tra-


jectory. In order to achieve this, is selected
mn‡1 ; mn ˆ controller output at (n ‡ 1)th and
depending upon the process state (i.e. the values of
nth instant,
e and e)_ using an inference engine and rulebase
en‡1 ; en ˆ error at (n ‡ 1)th and nth instant,
where the rules are derived from knowledge of the
Kcn ; Kcnÿ1 ˆ proportional gain at (n ‡ 1)th and
process experts. The predicted value of controller
nth instant,
output during the transition of the process from
TRn= reset time at (n ‡ 1)th instant,
one state to another is desired to be smooth. For
and T= sampling time.
this, the fuzzy inferencing technique has been
For the error to reach zero at the next instant, adopted because of the smoothness it provides due
the dead-beat control format is enforced in Eq. (2) to its inherent interpolative nature. The inference
so that making en‡1 ˆ 0, the new ratio of Kc and mechanism for is shown in Fig. 2.
TR is obtained as Here a normalization factor is chosen in such a
way that e and e_ cover the entire normalized
Kcn 2 domain [ÿ1,+1]. The fuzzi®er block fuzzi®es the
ˆ …mn‡1 ÿ mn ‡ Kcnÿ1 en † …3†
TRn Ten two input variables e and e_ into two fuzzy vari-
ables A and B respectively. The term set for both
The RHS of Eq. (3) is to be evaluated for obtain- the variables are taken as {NB, NM, NS, ZE, PS,
ing the new ratio of Kcn =TRn . All the quantities PM, PB} and their membership functions are
excepting mn‡1 , are known. For evaluation of shown in Fig. 3.
mn‡1 , a rule-based prediction mechanism is pro- The inference mechanism for follows the
posed which would be supported by knowledge- Takagi±Sugeno model [13], i.e. rules with fuzzy
base of the experts. The prediction, obtained using antecedent and crisp consequent. The rules shown
a fuzzy rule-base de®ned on e and e,_ has been seen in Fig. 4 are of the form:
to be well adapted to the proposed dead-beat PI Ri : ife is Ai and e_ is Bi ; then is ci …5†
algorithm. The prediction mechanism is explained
in the following section. The consequent is a crisp variable c and is chosen
in such a way that denormalization is not
2.1. The fuzzy prediction mechanism for mn+1 required. For evaluating the value of , the fol-
lowing steps are adopted.
The prediction model chosen here for the con-
troller output employs linear extrapolation and is Step 1: For given input values of the process
given by the following equation. variables e and e, _ their degrees of
_ are cal-
membership i …e† and i …e†,
mn‡1 ˆ mn ‡ …mn ÿ mnÿ1 † …4† culated from the membership func-
tions depicted in Fig. 3.
The value of is to be chosen in such a way that Step 2: The minimum of these degrees of
the predicted controller output, mn‡1 , always leads membership is taken and denoted as

Fig. 2. Fuzzy interferencing mechanism for the value of .


230 R. Bandyopadhyay, D. Patranabis/ISA Transactions 37 (1998) 227±235

ui . Thus for each rule, a tuple (ui , 2.2. New values of Kc and TR
ci ) is formed.
Step 3: The value of is the combined output After obtaining the value of mn‡1 , the RHS of
of all the rules and is the weighted Eq. (3) is evaluated. Since there is only one equation
normalized sum of all the pairs. (Eq. (3)) for the two variables Kcn and TRn , they
P are evaluated using the method outlined below:
ui ci
i 1. Since Eq. (3) speci®es the desired ratio of Kcn
ˆ P …6†
ui and TRn , both of them are changed by the
i
same factor from their initial settings Kcss
and TRss . This is explained with an example.
Using the above value of , mn‡1 is predicted. Suppose for a particular process, the steady-

_
Fig. 3. Membership functions of e and e.

Fig. 4. Rules for the value of .


R. Bandyopadhyay, D. Patranabis/ISA Transactions 37 (1998) 227±235 231

state controller parameters Kcss and TRss are The value of ' is set by the algorithm in such
1.5 and 0.5 s respectively with the ratio (Kcss / a way that
TRss ) being 3. If the desired ratio according
p to
Eq. (3) is 4, then Kcss is multiplied by (4/3) TRss
p 
and TRss is divided by (4/3) so that their Kcss
respective e€ect is same. This is given in
expressions (7) and (8) below. is always less than or equal to …1 ‡ r†2 where
s r is usually taken as 0.5 since the new value
TR of Kc and TR is always to be kept within
Kc ˆ  ss Kcss …7† ‹50% of their steady-state values and the
Kcss
maximum value of ' is used for further cal-
and culations. The method is summarized in the
s
TR following algorithm.
TR ˆ TRss =  ss …8†
Kcss
Initialization
Step 1:  max …1 ‡ r†2 …Kcss =TRss †.
where  is the desired ratio of Kc and TR as Step 2:  1:0.
obtained from Eq. (3). Iteration
2. The above two expressions (7) and (8) if Step 1: Obtain mn‡1 using fuzzy inference
implemented without any modi®cation or mechanism explained in Section 2. 1.
constraint result in large oscillations even Step 2: Obtain  from Eq. (3).
with a monotonic process. This is because in Step 3: If  > max then max ; ' =max .
order to make the error zero at the next Step 4: new ='.
sampling instant, the controller output is to Step 5: Obtain Kc and TR from new using
be extremely large and hence the value of Kc expressions (7) and (8) and generate controller
would be very high and TR very low tending output.
to make the system unstable. In order to Step 6: Go to step 1.
avoid this problem, (a) a constraint on the
values of Kc and TR is imposed and (b)  is
divided by a factor ', with the provision that 3. Simulation results
it be automatically set by the algorithm. The
allowable range of Kc and TR is kept at (a) First order plus dead time (FOPDT) model:
‹50% of their steady-state values which is
quite a reasonable assumption and which eÿ:s
provides smooth and bounded variation of :s ‡ 1
the PI parameters. If the allowable range is
kept large, oscillations creep in, and too Simulation runs have been carried out with the
small a range does not show signi®cant above model and the response with the proposed
improvement on the performance of the controller is compared with that obtained using
controller. If only this constraint on the the Ziegler±Nichols tuning method. The results for
allowable range of Kc and TR is imposed, the  ˆ 0:2 s. and  ˆ 1 s. are shown in Fig. 5 where
algorithm does not give satisfactory results the sampling time is assumed to be 0.05 s. The
since the controller parameters are always at disturbance to the process is assumed to be a unit
their extreme values. What is sought from step at the set-point applied at t ˆ 0 and a step of
this controller is a smooth variation of the magnitude 0.5 to the load applied at t ˆ 5 s.
controller parameters and this is obtained by Comparison of the responses indicated by the
dividing  by a factor '. Initially when the curves in Fig. 5 shows that both with set-point
algorithm starts, the value of ' is kept at 1. change and load change, the proposed autotuner
232 R. Bandyopadhyay, D. Patranabis/ISA Transactions 37 (1998) 227±235

Fig. 5. Simulation results for the FOPDT model: (i) - - - - -Ziegler±Nichols tuning, (ii)б proposed autotuner.

performs better than the Ziegler±Nichols tuner in mulae. The results are shown in Fig. 6, where the
so far as the IAE values are concerned. It is, dead-time has been taken as 0.3 s, the sampling
however, clear that with set-point change, there is time as 0.05 s, and the disturbance is a unit step at
a reduction in rise-time as well as peak deviation the set-point. There is considerable reduction in
tending to reasonably better performance. With the peak deviation as also other peaks of the
load change, however, peak deviation decreases, response curve obtained using the proposed auto-
but no substantial change in rise-time is observed tuner as compared with the response curve
and the improvement, therefore, is less. It may be obtained through Ziegler±Nichols tuner and,
stressed that reductions in rise-time and peak although there is no substantial improvement in
deviation/overshoot are the primary requisites for the rise-time, the IAE is reduced considerably with
improved performance. Obviously, actual reduc- the proposed autotuner. The process itself being
tion in IAE would also depend on the values of , oscillatory, the alignment time is more in both the
 and T as well. cases, but, along the time scale, the response curve
(b) Second order plus dead time (SOPDT) of the proposed tuner seems to demonstrate a
model: progressive improvement in the error ®gure. Here,
also, the actual IAE would depend on the choice
eÿ:s of process and sampling parameters.
s:…s ‡ 1†

A second order oscillatory process model with 4. Experimental results


considerable dead-time has been taken for simu-
lation study. In this case, also, the proposed algo- The proposed algorithm was tested in a labora-
rithm performs better than the conventional PI tory type thermal process (Feedback PT326) for
controller tuned with the Ziegler±Nichols for- controlling its temperature. Fig. 7 shows the
R. Bandyopadhyay, D. Patranabis/ISA Transactions 37 (1998) 227±235 233

Fig. 6. Simulation results for the SOPDT model: (i) - - - - -Ziegler±Nichols tuning, (ii) б proposed autotuner.

Fig. 7. Experimental results with PT326 temperature controller kit: (i) - - - - Ziegler±Nichols tuning, (ii) б proposed autotuner.
234 R. Bandyopadhyay, D. Patranabis/ISA Transactions 37 (1998) 227±235

response of the process once with ®xed controller around the ®nal line of control, the algorithm has
parameters tuned by Ziegler±Nichols formulae been designed with appropriate provision for this.
and also when Kc and TR are tuned with the pro- Simulation results for SOPDT model (Fig. 6)
posed algorithm. From the ultimate gain and per- indicate that both the Ziegler±Nichols tuning and
iod, the values of Kcss and TRss were found to be the proposed autotuning require some time before
1.1 and 0.5 s. respectively. The sampling time was aligning with the set-point line, yet it is clear that
taken as 0.1 s. From the results it is seen that the the proposed tuner response curve has con-
proposed algorithm improves the rise-time and siderably less peak transverse excursion magnitude
reduces the overshoot. Since both rise-time and compared to the Ziegler±Nichols tuner and hence
overshoot or peak deviation are reduced, there is the IAE tends to be smaller.
improvement in the IAE. The actual value of IAE The experimental plots of Fig. 7 show that the
would, however, depend on the process as well as ultimate alignment of the response curve of the
on the sampling rate. Studies with di€erent set- proposed autotuner is in variance with the set-
point change and sampling rate have been made, point line. This is true for the Ziegler±Nichols
in all the cases, the results show improvement. tuner as well, This is mainly due to the environ-
Fig. 7 shows a speci®c result with a set-point mental turbulence of the medium of the prototype
change from 30 to 38 C for the process chosen process adopted for testing the algorithms. This
and T ˆ 0:1 s. where the improvement in IAE is variance, however, is small in magnitude and ran-
9.5%. dom in nature. Its mean value can, therefore, be
considered to be either zero or negligibly small.
However, the overall comparison between the two
5. Conclusion curves clearly shows that the proposed autotuner
has improved performance characteristics, as dis-
A novel technique of automatic tuning of a PI cussed in Section 4.
controller using fuzzy inference mechanism and
dead-beat approach is presented. The technique
does not require the knowledge of the process Acknowledgements
parameters during the tuning stage. However, the
controller parameters need to be set at their initial The authors wish to express their indebtedness
values which are functions of the process para- to Mr. R.K. Mudi of Instrumentation Engineering
meters and are obtained via process modeling. The Department, Jadavpur University for his active
dead-beat approach allows control of the process support during the progress of this work.
in a shorter time and hence with less number of
command variations. Besides, the prediction of the
controller output is made dependent on a single References
parameter, , which is determined using fuzzy
inferencing technique as a crisp consequent with [1] K.J. Astrom, B. Wittenmark, On self-tuning regulators.
the process states e and e_ as antecedent sources for Automatica 9, (1973) 185±199.
the rulebase which is dependent as usual on the [2] D.W. Clarke, P.J. Gawthrop, Self-tuning controller. Proc.
IEE 122, (1975) 929±934.
database generated from the expert knowledge.
[3] E.H. Higham, A self-tuning controller based on expert
Since a PI controller has been considered, the systems and arti®cial intelligence. Control 85 Conference,
prediction of the controller output is a function of Publication No. 252 1, (1985) 110±115.
TR and Kc which at the instant next to the initi- [4] L.A. Zadeh, Fuzzy sets. Information and Control 8,
alization would tend to assume abnormally low (1965) 338±353.
[5] E.H. Mamdani, Application of fuzzy algorithm for con-
and/or high values because of the dead-beat
trol of simple dynamic plant. Proc. IEE 121 (12), (1974)
approach. Provision of their containment has been 1585±1588.
made by taking help of an empirical approach. [6] M. Sugeno, Industrial Applications of Fuzzy Control,
Since a smooth variation of the response is desired North Holland, Amsterdam, 1985.
R. Bandyopadhyay, D. Patranabis/ISA Transactions 37 (1998) 227±235 235

[7] Shi-Zhong He, Shaohua Tan, Feng-Lan Xu, Pei-Zhuang [11] G.H. Cohen, G.A. Coon, Theoretical considerations of
Wang, Fuzzy self-tuning of PID controllers. Fuzzy Sets retarded control, Taylor Instrument Companies' Bulletin±
and Systems 56, (1993) 37±46. TDS-10A102.
[8] Jian-Xin Xu, Chen Lui, Chang Chich Hang, Tuning of [12] C.C. Hang, and K.J. Astrom, Re®nements of the Ziegler±
fuzzy PI controllers based on gain/phase margin speci®ca- Nichols tuning formula for PID auto-tuner, Proceedings
tions and ITAE index. ISA Transactions 35, (1996) 79±91. of ISA 88 Intern. Conf and Exhibition, Houston, TX,
[9] D. Dirankov, H. Hellendron, M. Reinfrank, An Intro- 1988, pp. 1021±1030.
duction to Fuzzy Control, Springer-Verlag, New York, 1993. [13] T. Takagi, M. Sugeno, Fuzzy identi®cation of systems and
[10] J.G. Ziegler, N.B. Nichols, Optimum setting for automatic its applications to modeling and control. IEEE Trans. on
controllers. Trans ASME 64, (1942) 759±765. Systems, Man and Cybernetics 15 (1), (1985) 116±132.

You might also like