A Fuzzy Controller With Evolving Structure: Plamen Angelov
A Fuzzy Controller With Evolving Structure: Plamen Angelov
www.elsevier.com/locate/ins
Abstract
An approach to on-line design of fuzzy controllers of Takagi–Sugeno type with
gradually evolving structure is treated in the paper. Fuzzy rules, representing the
structure of the controller are generated based on data collected during the process of
control using newly introduced technique for on-line identification of Takagi–Sugeno
systems. The output of the plant under control (including its dynamic) and the
respective control signal has been memorised and stored in on-line mode. These data has
been used to train in a non-iterative, recursive way the fuzzy controller. The indirect
adaptive control approach has been used in combination with the novel on-line iden-
tification technique. This approach exploits the quasi-linear nature of Takagi-Sugeno
models and builds-up the control rule-base structure and adapts it in on-line mode with
recursive, non-iterative learning. The method is illustrated with an example from air-
conditioning systems, though it has wider potential applications.
2003 Elsevier Inc. All rights reserved.
1. Introduction
Fuzzy logic controllers of the so-called Takagi–Sugeno (TS) type are gaining
impetus recently in applications to complex systems, because of their compu-
tational efficiency, transparency and flexibility [13,14]. The main reason for this
*
Address: Department of Communication Systems, Lancaster University, Bailrigg, Lancaster,
A1 4YR, UK. Tel.: +44-1524-594188; fax: +44-1524-592713.
E-mail addresses: p.p.angelov@lboro.ac.uk, p.angelov@lancaster.ac.uk (P. Angelov).
0020-0255/$ - see front matter 2003 Elsevier Inc. All rights reserved.
doi:10.1016/j.ins.2003.03.006
22 P. Angelov / Information Sciences 161 (2004) 21–35
is their dual, quasi-linear nature. Generally, they are non-linear and therefore
suitable for complex systems, but they could also be treated as linear in respect
to the consequent parameters, which makes possible the application of efficient
recursive techniques. TS models serve as a bridge between the classical control
theory [8] and the soft computing [12] generalizing the well-established con-
cepts of gain scheduling and local linear modeling and control [4].
The problem of fuzzy rule-based systems design is already treated in the
literature for the off-line case when a batch set of data is used [7,9–13,17,18]. In
reality, however, even if a validation test has been made beforehand, there is no
guarantee that a controller designed in this way will perform satisfactory if the
object of control or its environment change [2]. The reasons could be aging,
wearing, change in the mode of operation or development of a fault, seasonal
changes in the environment, etc. [3]. An effective mechanism for tackling such
problems known from the classical control theory is the adaptation [8]. It is
well developed for the linear models and controllers, but not for a general
(normally non-linear, complex and uncertain) case [2]. It usually supposes a
fixed model structure and applies to parameters only [8].
Exploiting the specific dual, quasi-linear, semi-fuzzy, semi-crisp nature of the
TS rule-based fuzzy systems we have developed and tested a new approach for
on-line adaptation of their structure and parameters [2–6]. It is based on a
combination of unsupervised on-line clustering and a version of recursive
weighted least squared estimation of the parameters of the consequent part [4,5].
In the present paper, this approach is applied to on-line design of fuzzy
controllers combined with the indirect learning technique, proposed in [15] and
developed in [1]. Instead of a neural network trained off-line as in [1,15] we use
evolving rule-based models [6] to design the controller structure on-line by
adding more informative rules than those, that previously formed the model. In
a driven evolution of the controller structure the existing rules are replaced
with new ones based on the informative potential of the data samples, mea-
sured by their spatial proximity to the potential rules centers. In this way, when
new informative data become available, in addition to the parameters update
the rule-base also gradually evolves inheriting and updating the existing one.
The evolving nature of these controllers in combination with the high degree
of their transparency, compact form, and computational efficiency makes them
a promising candidate for on-line control. An illustrative example of indoor
temperature control is presented.
Fk
C yk+1
uk
r Controller Plant
yk
Delay
yk+1
where Ri denotes the ith fuzzy rule; i 2 f1; Rg; R is the number of fuzzy rules;
Yi ; Ri , and Ui denote fuzzy sets of the antecedent part of the controller; uki
denotes output (control signal) of the ith local controller at time instance
k ¼ 2; 3; . . .; ail are its parameters, l 2 f0; 3g.
For Gaussian-like antecedent fuzzy sets the level of contribution of the
corresponding linear model to the overall output is determined as:
lij ¼ eakxij xi k ; i ¼ 1; 2; . . . ; R; j ¼ f1; 2; 3g ð2Þ
where a is a positive constant, which defines the zone of influence of the ith
T
model; x ¼ ½yk ; r; Fk is the inputs vector; xi is the focal point of the ith rule
antecedent.
The firing level of the rules are defined as Cartesian product or conjunction
of respective fuzzy sets for this rule:
\
3
si ¼ li1 ðyk Þ li2 ðrÞ li3 ðFk Þ ¼ lij ðxj Þ i ¼ 1; 2; . . . ; R ð3Þ
j¼1
X
R X
R
si
uk ¼ ki uki ¼ ki xTe pi ; ki ¼ PR ð4Þ
i¼1 i¼1 j¼1 sj
where ki is the normalized firing level of the ith rule; uki represents the output of
the ith linear model; pi ¼ ½ai0 ai1 ai2 ai3 T ; i ¼ 1; 2; . . . ; R, is the vector of para-
meters of the ith linear model; xe ¼ ½1xT T is the expanded data vector.
P. Angelov / Information Sciences 161 (2004) 21–35 25
The data are collected continuously, in on-line mode during the process of
control. Some of the new data reinforce and confirm the information contained
in the previous data. Other data, however, bring new information, which could
indicate a change in operating conditions, development of a fault or simply a
more significant change in the dynamic of the process [2–6]. They may posses
enough new information to form a new rule or to modify an existing one. The
value of the information they bring is closely related to the information the
data collected so far already possesses. The judgement of the informative po-
tential and importance of the data is made based on their spatial proximity,
which corresponds to operating conditions, possibly seasonal variations or
different faults.
On-line training of the controller includes on-line clustering under assumption
of a gradual change of the rule-base and modified recursive least squares [4–6].
The on-line clustering procedure starts with the first data point established as
the focal point of the first cluster. Its co-ordinates are used to form the ante-
cedent part of the fuzzy rule (1) using for example Gaussian membership
functions (2). Any other type of membership functions could also be used in-
stead. Its potential is assumed equal to 1.
Starting from the next data point onwards the potential of the new data
points is calculated recursively. As a measure of the potential, we use a Cauchy
type function of first order [4–6]:
1
Pk ðzk Þ ¼ 1
Pk1 P4 j 2
; k ¼ 2; 3; . . . ð5Þ
1þ ðk1Þ i¼1 j¼1 ðdlk Þ
Parameters #k and mk in are calculated from the current data point zk , while
bjk and rk are recursively updated as follows:
X
4
rk ¼ rk1 þ ðzjk1 Þ2 ; bjk ¼ bjk1 þ zjk1 :
j¼1
where Pk ðzl Þ is the potential of the data point zl at time k which is a prototype
of the lth rule.
Potentials of the new data points are compared to the updated potential of
the centres of the existing clusters.
If the potential of the new data point is higher than the potential of the
existing centres then the new data point it is accepted as a new centre and a new
rule is formed with a focal point based on the projection of this centre on the
axis x ðR :¼ R þ 1; xR ¼ xk Þ. The rationale is that in this case the new data point
is more descriptive, has more summarisation power than all the other data
points. It should be noted that the condition to have higher potential is a very
strong one. The reason is that with the growing number of data, their con-
centration is usually decreasing except in the cases some new important region
of data space reflecting a new operating regime or new condition appears. In
such cases a new rule is formed, while outlying data are automatically rejected
because their potential is significantly lower due to their distance from the
other data.
If in addition to the previous condition (the potential of the new data point is
higher that the potential of all the previously existing centres) the new data
point is close to an old centre:
then the new data point ðzk Þ replaces this centre ðzj :¼ zk Þ. This mechanism for
rule-base adaptation called modification ensures a replacement of a rule with
another one built around the projection of the new data point on the axis x.
P. Angelov / Information Sciences 161 (2004) 21–35 27
cRþ1k ¼ XI ð11Þ
The co-variance matrices of the rest R rules are then inherited ðc:ik ¼ ciðk1Þ ;
i ¼ ½1; RÞ.
28 P. Angelov / Information Sciences 161 (2004) 21–35
The recursive procedure for on-line training the fuzzy controller includes the
following stages:
The execution of the algorithm continues for the next time-step from stage 2.
Stage 1. The controller rule-base could contain one single rule only, based,
for example, on the first data sample. Then
k :¼ 1; R :¼ 1; x1 :¼ xk ; P1 ðz1 Þ :¼ 1; h1 ¼ p1 ¼ 0; C1 ¼ XI
ð12Þ
where z1 is the first cluster centre; x1 par is focal point of the first rule being a
projection of z1 on the axis x.
In principle, the rule-base could be initialised by existing expert knowledge
or off-line trained controller. In this case:
At stage 5 the potential of the new data sample is compared to the updated
potential of existing centres and a decision whether to modify or up-grade the
controller rule-base is taken.
(a) If (the potential of the new data point is higher than the potential of the
existing centres: Pk ðzk Þ > Pk ðzi Þ; i ¼ ½1; RÞ
AND (the new data point is close to an old centre (8))
THEN the new data point ðzk Þ replaces it.
In this case, the new data point is used as a prototype of a focal point. Let us
suppose that it has index j
R
zj ¼ arg minkzk zi k : xj :¼ xk ; Pk ðzj Þ :¼ Pk ðzk Þ ð14Þ
i¼1
p ^j
^k :¼ p k ; Ck :¼ Ckj ð15Þ
It should be noted that when a rule is replaced by another rule the weights
ðkÞ are changing according to (4) and the summation in the denominator in (4)
should change. R 1 addends in this summation are the same and only one
change. Moreover, since the new centre is close to the replaced one by defini-
tion (8), this change is marginal. The disturbance caused by this change could
be ignored, because the Kalman filter is able to cope with using the existing
estimations of the parameters and co-variance matrices. This is illustrated by
the experimental results (next section).
(b) ELSE IF (the potential of the new data point is higher than the potential of
the existing centres: Pk ðzk Þ > Pk ðzi Þ; i ¼ ½1; RÞ
THEN it is added to the rule-base as a new rule’s centre.
In this case, the new data point becomes a prototype of a focal point of a
new rule
R :¼ R þ 1; xR ¼ xk ; Pk ðzR Þ ¼ Pk ðzk Þ ð16Þ
Air Flow
•T out supplied
Air Flow •T amb to the
Direction occupied
Zone
T ref
Cooling
water
intake
Actuator
Controller
Valve
rate of air ðma ¼ 1:0 kg/s), moisture content ðg ¼ 0:008 kg/kg), and the tem-
perature of the water ðTw ¼ 10, C) are supposed to be constant. The sample
32 P. Angelov / Information Sciences 161 (2004) 21–35
interval is 1 min. Results of simulation with the evolving fuzzy controller are
depicted in Fig. 3.
In this simulation study we consider the reference signal ðT ref Þ to be fixed at
19 C for the first 100 min, at 17 C for the next 100 min, and at 20 C for the
rest 100 min (dashed line in Fig. 3). A set of data (100 data points) has been
used to generate off-line the initial structure of the controller.
It consists of three fuzzy rules:
out
R1 : IFðTk1 is HÞ AND ðT ref is HÞ AND ðTk1
amb
is LÞ
THEN ðuk1 ¼ a10 þ a11 yk1 þ a12 r þ a13 Fk1 Þ
out
R2 : IF ðTk1 is MÞ AND ðT ref is MÞ AND ðTk1
amb
is HÞ
ð17Þ
THEN ðuk2 ¼ a20 þ a21 yk1 þ a22 r þ a23 Fk1 Þ
out
R3 : IF ðTk1 is HÞ AND ðT ref is HÞ AND ðTk1 amb
is VLÞ
THEN ðuk3 ¼ a30 þ a31 yk1 þ a32 r þ a33 Fk1 Þ
where the linguistic labels (H for High, L for Low, VL for Very Low, M for
Medium) are assigned to membership functions representing the respective
fuzzy rule.
In the on-line phase, the incremental learning and evolving control are
sequentially performed at each time instant (in respect to each new data point)
as described in the previous section. The new triplet of data ðTkout ; Tkamb ; uk Þ has
been recorded in real time and the value of Tkout has been memorised. In this
out
way, at the next time instance we have Datak ¼ ðTk1 ; Tkout ; Tk1
amb
; uk1 Þ. This
quadruple forms a data point for training the eTS controller. Then a recursive
procedure for up-date of the controller structure and parameters [4,5] takes
place. Generally, based on the informative potential (spatial proximity measure
to the focal point of a rule) of a new data point Datak a decision to upgrade or
modify the controller rule-base is taken [4–6]. This process is repeated for every
time instant (from 1 to 300 in this example) and calculations take several
seconds making possible real-time application. For most of the new data
points, no changes are required because the informative potential of the new
data sets is not high enough to replace, modify or add a new rule and to correct
the parameters. Two of the new data points, however, have high enough po-
tential and they have triggered the modification and upgrade of the rule-base.
At time instant k ¼ 3 (3 min after the on-line control starts) the data point is
informative enough to generate a new fuzzy rule, which has been added to the
controller rule-base:
out
R4 : IF ðTk1 is LÞ AND ðT ref is LÞ AND ðTk1
amb
is MÞ
ð18Þ
THEN ðuk4 ¼ a40 þ a41 yk1 þ a42 r þ a43 Fk1 Þ
There was also one data point, which has informative potential high enough
to modify the rule-base though not high enough to be added as a new rule.
P. Angelov / Information Sciences 161 (2004) 21–35 33
Fig. 4. Membership functions and linguistic labels of the fuzzy variables T amb and T out .
Additionally, this data point was close to the centre of the rule R3 . Based on
this, the fuzzy rule R3 has been replaced by the more informative rule R5 :
out
R5 : IF ðTk1 is MÞ AND ðT ref is RHÞ AND ðTk1 amb
is MÞ
ð19Þ
THEN ðuk5 ¼ a50 þ a51 yk1 þ a52 r þ a53 Fk1 Þ
Fuzzy sets with respective linguistic labels are depicted in the Fig. 4 for the
variables T amb and T out .
5. Conclusions
Acknowledgements
References
[1] H.C. Andersen, F.C. Teng, A.C. Tsoi, Single net indirect learning architecture, IEEE
Transactions on Neural Networks 5 (1994) 1003–1005.
[2] P.P. Angelov, Evolving Rule-based Models: A Tool for Design of Flexible Adaptive Systems,
Springer, Physica-Verlag, Heidelberg, Germany, 2002.
[3] P.P. Angelov, R.A. Buswell, Identification of evolving fuzzy rule-based models, IEEE
Transactions on Fuzzy Systems 10 (2002) 667–677.
[4] P.P. Angelov, D.P. Filev, An approach to on-line identification of Takagi–Sugeno fuzzy
models, IEEE Transactions on System, Man and Cybernetics, Part B, vol. 33, December, 2003,
to appear.
[5] P.P. Angelov, D.P. Filev, Flexible models with evolving structure, in: Proceedings of the IEEE
Symposium on Intelligent Systems IS’02, Varna Bulgaria, 10–12 September, vol. 2, 2002,
pp. 28–33.
[6] P.P. Angelov, R.A. Buswell, Evolving rule-based models––a tool for intelligent adaptation, in:
Proceedings of the Joint 9th IFSA World Congress and 20th NAFIPS Annual Conference,
Vancouver, BC, Canada, 25–28 July, 2001, pp. 1062–1067.
[7] P.P. Angelov, V.I. Hanby, R.A. Buswell, J.A. Wright, Automatic generation of fuzzy rule-
based models from data by genetic algorithms, in: R. John, R. Birkenhead (Eds.),
Developments in Soft Computing, Physica-Verlag, Heidelberg, 2000, pp. 31–40.
[8] K.J. Astroem, B. Wittenmark, Computer Controlled Systems: Theory and Design, Prentice-
Hall, Englewood Cliffs, NJ, USA, 1984.
[9] B. Carse, T.C. Fogarty, A. Munro, Evolving fuzzy rule-based controllers using GA, Fuzzy Sets
and Systems 80 (1996) 273–294.
[10] C.K. Chiang, H.-Y. Chung, J.J. Lin, A self-learning fuzzy logic controller using genetic
algorithms with reinforcements, IEEE Transactions on Fuzzy Systems 5 (1996) 460–
467.
[11] M.G. Cooper, J.J. Vidal, Genetic design of fuzzy controllers, in: S.K. Pal, P.P. Wang (Eds.),
Genetic Algorithms and Pattern Recognition, CRC Press, USA, 1996, pp. 283–298 (Chapter
13).
[12] D. Driankov, H. Hellendoorn, M. Reinfrank, An Introduction to Fuzzy Control, Springer-
Verlag, Berlin, Germany, 1993.
[13] W.S. Lin, C.-H. Tsai, Self-organizing Fuzzy control of multi-variable systems using learning
vector quantization network, Fuzzy Sets and Systems 124 (2001) 197–212.
[14] F.-J. Lin, C.-H. Lin, P.-H. Shen, Self-constructing fuzzy neural network speed controller for
permanent-magnet synchronous motor drive, IEEE Transactions on Fuzzy Systems 9 (2001)
751–759.
[15] D. Psaltis, A. Sideris, A.A. Yamamura, A multilayered neural network controller, IEEE
Transactions on Control Systems Management 8 (1988) 17–21.
[16] L.-X. Wang, Fuzzy Systems are Universal Approximators, in: Proceedings of the IEEE
Conference on Fuzzy Systems FUZZ_IEEE, San Diego, CA, USA, 1992, pp. 1163–
1170.
P. Angelov / Information Sciences 161 (2004) 21–35 35