Professional Documents
Culture Documents
viii
Foreword
The author, who was one of the first to actually implement Intelligent Control in industry, accomplishes this goal by developing step by
step some of the most important Intelligent Computational Algorithms.
His industrial experience, coupled with a strong academic background,
has been channeled into creating a book that is suitable for graduate academic education and a manual for the practicing industrial engineer.
Such a book fills a major gap in the global literature on Computational
Intelligence and could serve as a text for the developing areas of biological, societal and ecological systems. I am very proud to introduce such
an important work.
George N. Saridis
Professor Emeritus
Rensselaer Polytechnic Institute
Troy, New York, 1999
Preface
Conventional control techniques based on industrial three-term controllers are almost universally used in industry and manufacturing today, despite their limitations. Modern control techniques have not proved possible to apply because of the difficulties in establishing faithful microscopic models of the processes under control. It is not surprising, therefore, that manual control constitutes the norm in industry. In the early
1970s Intelligent Control techniques, which emulate the processing of
human knowledge about controlling a process by machine, appeared and
a new era of control was born. Intelligent Control has come a long way
since then, breaking down the barriers of industrial conservatism with
impressive results.
Intelligent Control, which includes Fuzzy, Neural, Neuro-fuzzy
and Evolutionary Control, is the result of applying Computational Intelligence to the control of complex systems. This class of unconventional
control systems differs radically from conventional (or hard control) systems that are based on classical and modern control theory. The techniques of Intelligent Control are being applied increasingly to industrial
control problems and are leading to solutions where conventional control
methods have proved unsuccessful. The outcome of their application to
industry and manufacturing has been a significant improvement in productivity, reduced energy consumption and improved product quality,
factors that are of paramount importance in todays global market.
The first Chapter presents an introduction to Computational Inix
telligence, the branch of Soft Computing which includes Expert Systems,
Preface
Preface
xi
on the differences which led to the need for Intelligent Control in industry and manufacturing. Chapter 2 discusses Expert Systems with reference to their engineering applications and presents some common applications in industry and manufacturing. Chapter 3 discusses Intelligent
Control Systems, their goals and objectives while Chapter 4 discusses its
principal components.
The elements of Fuzzy Logic on which Fuzzy Controllers are
based are presented in Chapter 5 while Chapter 6 discusses the mechanisms of Fuzzy Reasoning, i.e., the inference engine that is the kernel of
every fuzzy controller. Chapter 7 defines the fuzzy algorithm, methods
of fuzzification and de-fuzzification and outlines the principal fuzzy controller design considerations. The requirements for real-time fuzzy controllers, both supervisory as well as embedded, are discussed in Chapter
8, which also includes examples of industrial applications. Chapter 9
presents fuzzy three-term industrial controllers that are replacing many
conventional three-term controllers in the industrial environment. Chapter 10 outlines the Takagi-Sugeno Model-Based Fuzzy Controller design
technique and fuzzy gain-scheduling that fuse conventional and fuzzy
control.
Neural Control, the second important technique of Intelligent
Control, is presented in Chapter 11. The elemental artificial neuron and
multi-layer artificial neural networks that form the kernel of neural controllers are introduced in this Chapter. The delta and back-propagation
algorithms, two of the most common algorithms for training neural network, are described in Chapter 12. Chapter 13 discusses how neural controllers can be trained from linguistic control rules identical to those used
in fuzzy control. Finally, the result of fusing fuzzy and neural techniques
of Computational Intelligence in the design of hybrid neuro-fuzzy controllers is discussed in Chapter 14.
Evolutionary Computation, the latest entrant in the field of Computational Intelligence, and Genetic Algorithms, the best known example
of stochastic numerical optimization techniques, are presented in Chapter
15. Chapter 16 introduces Simulated Annealing, a stochastic technique
that has found considerable application in engineering optimization. Finally, Chapter 17 demonstrates how these two techniques can be used to
advantage in the design of conventional and intelligent controllers.
An extensive Bibliography on Computational Intelligence and its
applications is presented in Chapter 18.
xii
Preface
Acknowledgments
This book would not have been written had it not been for two people:
an anonymous kidney donor and. Mark Hardy M.D., Auchinloss Professor of Surgery in the Department of Surgery at the College of Physicians
& Surgeons of Columbia University in New York, who performed the
transplant. Together, they gave him that most precious gift: Life. He is
forever indebted to them.
The author gratefully also acknowledges the contributions of his
colleagues and former students at the University of Patras in Greece, N.
Antonopoulos to Chapter 2, K. Kouramas to Chapters 2 and 10, P.
Skantzakis to Chapter 11, G. Tsitouras and G. Nikolopoulos to Chapter
13 and V. Goggos to Chapters 15, 16 and 17.
Robert E. King
reking@ieee.org
October 2004
Series Introduction
Many textbooks have been written on control engineering, describing new
techniques for controlling systems, or new and better ways of mathematically formulating existing methods to solve the ever-increasing complex
problems faced by practicing engineers. However, few of these books fully
address the applications aspects of control engineering. It is the intention of
this new series to redress this situation.
The series will stress applications issues, and not just the mathematics
of control engineering. It will provide texts that not only contain an expos
of both new and well-established techniques, but also present detailed examples of the application of these methods to the solution of real-world
problems. The authors will be drawn from both the academic world and the
relevant applications sectors.
There are already many exciting examples of the application of control techniques in the established fields of electrical, mechanical (including
aerospace), and chemical engineering. We have only to look around in todays highly automated society to see the use of advanced robotics techniques in the manufacturing industries; the use of automated control and
navigation systems in air and surface transport systems; the increasing use
of intelligent control systems in the many artifacts available to the domestic
consumer market; and the reliable supply of water, gas, and electrical power
to the domestic consumer and to industry. However, there are currently
many challenging problems that could benefit from wider exposure to the
applicability of control methodologies, and the systematic systems-oriented
basis inherent in the application of control techniques.
v
vi
Series Introduction
This new series will present books that draw on expertise from both
the academic world and the applications domains, and will be useful not
only as academically recommended course texts but also as handbooks for
practitioners in many applications domains.
Neil Munro
Contents
Cover Page
Series Introduction by Neil Munro
vii
Preface
ix
1. Introduction
1.1 Conventional Control
1.2 Intelligent Control
1.3 Computational Intelligence in Control
1
2
6
8
13
15
17
18
20
20
21
22
23
24
24
26
26
27
28
3. Intelligent Control
3.1 Conditions for the Use of Intelligent Control
3.2 Objectives of Intelligent Control
31
33
34
39
40
45
48
49
50
51
51
53
54
59
60
63
64
64
69
6. Fuzzy Reasoning
6.1 The Fuzzy Algorithm
6.2 Fuzzy Reasoning
6.2.1 Generalized Modus Ponens (GMP)
6.2.2 Generalized Modus Tollens (GMT)
6.2.3 Boolean implication
6.2.4 Lukasiewicz implication
6.2.5 Zadeh implication
6.2.6 Mamdani implication
6.2.7 Larsen implication
6.2.8 GMP implication
6.3 The Compositional Rules of Inference
71
74
76
77
77
78
78
79
79
80
80
81
89
90
91
96
99
100
100
100
101
102
105
106
107
108
109
112
113
117
119
120
123
124
98
98
135
136
137
139
141
142
144
144
146
153
156
158
160
161
162
164
165
166
169
170
173
175
176
181
182
183
193
194
195
203
205
207
208
211
212
212
213
214
215
217
225
226
228
235
236
237
18. Bibliography
A. Computational Intelligence
B. Intelligent Systems
C. Fuzzy Logic and Fuzzy Control
D. Fuzzy Logic and Neural Networks
E. Artificial Neural Networks
F. Neural and Neuro-Fuzzy Control
G. Computer and Advanced Control
H. Evolutionary Algorithms
I. MATLAB and its Toolboxes
247
247
247
248
251
252
253
254
254
257
Appendix A
Case Study: Design of a Fuzzy Controller Using MATLAB
A.1 The Controlled Process
A.2 Basic Linguistic Control Rules
A.3 A Simple Linguistic Controller
A.4 The MATLAB fuzzy Design Tool
A.5 System Stabilization Rules
A.6 On the Universe of Discourse of the
Fuzzy Sets
A.7 On the Choice of Fuzzy Sets
221
221
222
259
259
261
261
264
266
267
268
279
Appendix C
Simulated Annealing Algorithm
285
Appendix D
Network Training Algorithm
289
Index
291
Back Cover
Chapter 1
Introduction
Modern control theory, which has contributed so significantly to the exploration and conquest of space, has not had similar success in solving
the control problems of industry and manufacturing. Despite the progress
in the field since the 1950s, the chasm between theory and practice has
been widening and many of the needs of industry remain unsolved. Industry has had little choice, therefore, but to rely heavily on conventional
(sometimes termed hard) control techniques that are based on industrial
three-term controllers. Unfortunately, these simple and ubiquitous devices cannot always cope with the demands and complexity of modern
manufacturing systems.
The chasm between theory and practice has led to a search for
new and unconventional techniques that are not subject to the constraints
and limitations of modern control theory to solve the control problems
faced by industry and manufacturing,. The breakthrough came in the
mid-1960s with the introduction of Fuzzy Logic by Zadeh. The application of Zadehs theory to control was to come almost ten years later and
it was to take even more years before it received the respect and acceptance that it rightly deserved. At about the same time, Widrow demonstrated the use of ADALINEs (Adaptive Linear Networks), which are a
primitive form of Artificial Neural Networks (ANNs), in control. This
was a radical departure from conventional control since a generic controller was trained to perform a specific task instead of being designed.
Chapter 1
Introduction
Chapter 1
Raw Materials
Kiln
Fuel
Air
Clinker
RTUs
LAN
Operator Consoles
Introduction
Chapter 1
Introduction
The principal medium of intelligent control is Computational Intelligence, the branch of Soft Computing which includes Expert Systems,
Fuzzy Logic, Artificial Neural Networks and their derivatives. Evolutionary Computation (Genetic Algorithms and Simulated Annealing) is a
very recent addition to this rapidly evolving field.
Chapter 1
Introduction
Intelligent controllers infer the control strategy that must be applied to a plant in order to satisfy specific design requirements. This action can be the result of operations on a set of pre-specified linguistic
control rules, as in the case of Fuzzy Controllers, or of training an artificial neural network with numerically coded rules as in the case of Neural
Controllers. In either case, the primary objective is to generate control
actions which closely match those of an expert human operator. In this
manner, the controller can assist the human operator to maintain the
plant under his supervision at its nominal operating state while simultaneously compensating for his inconsistency and unreliability brought
about by fatigue, boredom and difficult working conditions.
Intelligent controllers can be trained to operate effectively in
conditions of vagueness and uncertainty of both the plant state and plant
environment and can respond to unforeseen situations autonomously,
i.e., without intervention from the plant operator. They differ, however,
from their human counterpart in their ability to learn new control rules or
to adapt to new situations for which they have not been trained. Selforganizing controllers that have the ability to learn new rules on-line
have been variously proposed in the literature and tried out in the laboratory, but none has been commissioned so far in a manufacturing plant.
The main reason is that this class of controllers assumes extended testing
and experimentation on the controlled plant under normal operating conditions, a situation that few plant managers are likely to entertain.
10
Chapter 1
Introduction
11
Chapter 2
Chapter 2
14
Expert
Systems
Evolutionary
Computing
Computational
Intelligence
Neural
Systems
Fuzzy
Systems
Neuro-fuzzy
Systems
predicate logic,
semantic networks,
procedural representation,
production systems, and
frames.
15
Chapter 2
16
Domain Experts
Knowledge
Acquisition
System
Knowledge Base
Inference Engine
Explanation
Sub-system
M anM achine
Interface
17
Chapter 2
18
19
20
Chapter 2
21
Chapter 2
22
Product
specifications
Knowledge
Design
Product
properties
Programming
Interpretation
Desired
properties
Control
Production
Process
Diagnosis
Interpretation
Supervision
Prediction
Observed
properties
Future
behavior
23
Chapter 2
24
One of the major difficulties in the design of plant controllers, particularly in the case of large-scale multivariable plants, using conventional control techniques, is the unavailability of explicit models of the
plants. For this reason industrial automation leans towards the use of
three term (PID) controllers and various empirical and semi-empirical
design techniques have been proposed to determine the parameters of
these controllers. Examples of these design techniques are the wellknown methods of Ziegler and Nichols and modern variants due to
Persson and Astrom. In contrast, expert controller techniques, which can
exploit the knowledge of expert controller tuners, can often offer superior results. A number of vendors currently offer such software products.
The use of Expert Systems in the design of industrial controllers
has two aspects. The first involves the rules on the most appropriate
25
design technique to use in order to achieve the desired result. These rules
are dependent on the specific plant to be controlled and criteria by which
the control quality, i.e., the performance of the closed plant, is judged.
The second aspect involves rules that specify the best control strategy to
follow in any situation, given as advice to the operator.
26
Chapter 2
27
28
Chapter 2
It is therefore necessary to accurately predict what the power absorbed over each period will be and to monitor the energy demand by
shedding loads in time to avoid exceeding the contractual energy limit.
The decision on which loads to shed and when to do so without disrupting production, is a very difficult and tiring task for a human who would
have to make this decision every 15 minutes throughout the day and
night. The operator has to know which equipment can be shut down and
which must, at all costs, be left running in order to avoid major disruption of the production line or manufacturing plant and how long before
each piece of equipment can be restarted without causing excess wear to
it. In a large plant this is normally performed by shedding auxiliary
equipment that is not considered absolutely essential to the manufacturing plant (e.g., circulation pumps, conveyor belts) and in the worst case
by a total stoppage of production in periods of high energy cost. Many
electric energy intensive plants today are forced to shut down production
during peak hours in order to conserve energy.
Real-time expert energy management systems have been developed and have been very successful in containing energy costs, replacing
the human operator in this arduous task. Indeed, avoiding just one or two
overload penalties often pays for the cost of the Expert System! The
rules by which equipment can be operated, the order in which they may
be shed, when and how many times per day they can be restarted are
elicited from human operators and are embedded in the Expert System
rule base. The real-time expert energy management system is then executed every few seconds following prediction of the energy absorbed at
the end of the timing period. Naturally, the magnitude of the load that
must be shed is critically dependent on the time-to-go before the end of
the period: the shorter the time left, the larger must be the load that must
be shed and the greater the malfunction that is incurred. Accurate prediction and effective and fast decisions from the Expert System are essential
to proper operation.
29
30
Chapter 2
is of paramount importance in order to maintain high equipment availability and meet production schedules. In large bottling or canning
plants, for instance, the sensors are linked to the Factory Data Acquisition (FDA) system and measurements are continuously compared with
the desired values.
Should some unit along the line malfunction, then clearly both
the proceeding and succeeding units will suffer the consequences. Due to
the interactive nature of most production systems and work cells, it is
obvious that when any sub-system malfunctions, the sub-systems upstream and down-stream will be affected sooner or later. Up-stream units
must thus be stopped in time to avoid strangulation as a consequence of
the accumulation of partially finished products which may exceed the
capacity of the silos or queues if the malfunction persists for some time,
while down-stream, units must be stopped because of starvation.
Expert systems for the diagnosis of equipment malfunctions
contain the rules by which a malfunction can be transmitted to adjacent
units embedded in their knowledge base. The Expert System continuously monitors the materials flows and should the mass balance for each
unit be essentially constant, then no alarm is issued. However, when
some malfunction occurs, the Expert System is executed with the object
of determining the source of the fault. Timing is clearly of the essence.
Chapter 3
Intelligent Control
Intelligent control takes a radically different approach to the control of
industrial processes and plants from conventional control. The knowledge and experience of human operators constitutes the basis for this
new approach to Control Engineering for which Computational Intelligence provides the theoretical foundation. In this chapter we summarize
the potential and some limitations of intelligent control and we attempt
to address the questions on how, where, when and under what conditions
can intelligent control be applied in practice.
Intelligent control seeks solutions to the problem of controlling
plants from the viewpoint of the human-operator. In other words, the
technique seeks to establish some kind of cognitive model of the human
operator and not the plant under his control. This is the point at which intelligent control departs from conventional control and it is undoubtedly
true that the technique could not have been possible but for the rapid
progress in computer technology. Computational Intelligence provides
the tools with which to make intelligent control a reality. The reproduction of human intelligence and the mechanisms for inferring decisions on
the appropriate control actions, strategy or policy that must be followed
are embedded in these tools.
Figure 3.1 shows how Computational Intelligence can be classified according to the form of the knowledge (i.e., structured or unstructured) and the manner in which this knowledge is processed (i.e., symbolic or numerical). For control applications, knowledge can be struc31
Chapter 3
32
PROCESSING
Structured
Symbolic
Numerical
Expert
Systems
Fuzzy
Systems
KNOWLEDGE
Unstructured
Neural
Systems
Intelligent Control
33
Chapter 3
34
Inference
Engine
Knowledge Base
Intelligent Control
35
easy. Cost is one factor but prior experience with a similar plant is considered the most important factor in making a decision on which system
to purchase. The socially optimum solution is given by the support that
plant management, production management and plant operators are prepared to give to a particular system to make it successful.
In considering intelligent control seriously for solving production
control problems, which conventional control is unable to solve, answers
must be sought to the following questions: will the proposed system
36
Chapter 3
greatly reduced by including the plant operators in the system development process and providing adequate training to alleviate his fears.
The older generation of plant operators spent years controlling
plants from central control areas with classical instrumentation, adjusting
the setpoints of conventional three term controllers and tediously logging
plant activity manually. Today, the new generation of plant operators
have been brought up in the era of computers, consoles with graphical
user interfaces and all the benefits of Computer Integrated Manufacturing systems. Even the older plant operators have adapted, even though
sometimes reluctantly, to the new environment. New plant operators no
longer view the introduction of advanced technology as a threat but on
the contrary, show great interest and an enviable ability to assimilate and
use it effectively to improve their working conditions. This is especially
true where management has had the foresight to provide the necessary
training in advance. The days of pulling down control switches and turning control knobs are gone, replaced by the touch of a light pen or a finger on a screen or the click of a keyboard or a mouse. Report generation
is a matter of seconds instead of hours, days or even weeks. Information
is power and this can undoubtedly be enhanced through the use of intelligent techniques.
From the viewpoint of management, the success of an intelligent
control system is judged solely on how rapidly the system will repay its
investment. This is measured from the observed (and not assumed) increase in productivity, the energy reduction and the improvement in the
mean-time-between-failures of the plant. Improvements of the order of
5-10% are not uncommon in the process industry. History has shown
that since their introduction, manufacturers that have taken advantage of
the new control techniques have benefited significantly on all counts.
The specialization required to develop intelligent systems is
Knowledge Engineering. It would be very wrong to conclude, however,
that no knowledge of conventional control and system theory is necessary to design such systems. On the contrary, a very thorough knowledge
of the abilities and limitations of classical and modern control techniques
must constitute the background of the knowledge engineer. The most
successful intelligent control systems that have been commissioned have
been designed by control engineers with a very thorough background in
conventional control techniques.
Knowledge Engineering requires the cooperation of knowledge
engineers, domain experts and plant operators in the design phase, com-
Intelligent Control
37
Chapter 4
Techniques of
Intelligent Control
Conventional control systems design relies on the existence of an adequate macroscopic model of the physical plant to be controlled. The first
stage in the analysis of such a system is therefore the development of an
explicit mathematical model of the controlled plant that adequately reproduces the characteristics of the plant with fidelity. The model can be
determined either from first physical laws or using some technique of
identification from operating data mined from the plant. There exist a variety of design techniques that can then be used to design an appropriate
hard controller. Today, this task is made simpler through the use of computer aided control systems design software with which the performance
of the closed system can be rapidly evaluated and optimized. The ultimate objective is clearly the development of a hard controller that satisfies specific performance specifications.
On completion of the design, the hard controller is then implemented in hardware or software that will execute in real-time on a process computer. The design of a conventional controller, particularly in the
case of multivariable plants, is a tedious and painstaking process that requires repeated cycles of analysis, synthesis and testing. The design
hopefully converges to an acceptable solution and ultimately to commissioning.
39
40
Chapter 4
41
42
Chapter 4
43
Plant
Plant
Controller
Controller
(a)
(b)
Chapter 4
44
Disturbance
Output
Control
Action
Plant P
Specifications S
Controller C
Input
Computational
Intelligence
Computer
Science
45
Systems
Theory
Operations
Research
Chapter 4
46
Organization
Coordination
Execution
Intelligence
Precision
47
the Organization layer in which high level management decisions, e.g., production scheduling, are made,
the Coordination layer for the tasks that have been decided on at
the Organization layer. As in the case of the uppermost layer of
the hierarchy, this layer normally possesses intelligence, and
the Execution layer, which has little or no intelligence, is the
layer in which the commands of the higher layers are executed.
This layer involves low-level controllers embedded in the plant
Remote Terminal Units (RTU). Recently, some vendors have
added some degree of intelligence into this layer.
Organizer
Coordinator
Coordinator
LAN
Executor
Executor
Executor
48
Chapter 4
49
50
Chapter 4
51
52
Chapter 4
Chapter 5
Chapter 5
54
industry, in traffic and train control systems and most notably in household appliances.
The fundamental elements of Fuzzy Logic necessary to understand the techniques of Fuzzy Control are presented in this chapter. For
further in depth study of the theory of Fuzzy Sets, the reader is referred
to the numerous books and papers on the subject given in the Bibliography in chapter 18.
55
Support set
Support set
Universe of Discourse
Universe of Discourse
A= {A(x)/x} or
{ (x)/x} for xX
A
for the continuous and discrete cases respectively. Here A(x) is termed
the membership function of x on the set and is a mapping of the universe of discourse on the closed interval [0,1]. The membership function is simply a measure of the degree to which x belongs to the set ,
i.e.,
A (x) : X[0,1]
It is noted that the symbols and imply a fuzzy set and bear no relation
to the integration and summation.
Chapter 5
56
The support set of a fuzzy set is a subset of the universe of discourse for which A(x)>0. Thus a fuzzy set is a mapping of the support
set on the closed interval [0,1]. As an example, consider the temperature
of water at some point in a plant. Consider for example the fuzzy variable Low. This can be described in terms of a set of positive integers in
the range [0,100] and defined as ={Low}. This set expresses the degree
to which the temperature is considered Low over the range of all possible
temperatures. Here, the membership function A(x) has discrete values
specified in degrees Centigrade by the set:
A(0)= (5)= (10)= (15)= (20)=1.0,
(25)=0.9, (30)=0.8, (35)=0.6, (40)=0.3, (45)=0.1,
(50)= (55)= ..... (100)=0
More compactly, this set can be expressed as:
(x)= {1/0 + 1/5 + 1/10 + 1/15 + 1/20 + 0.9/25 + 0.8/30 +
0.6/35 + 0.3/40 + 0.1/45 + 0/50 + 0/55 +....0/100}
The symbol + represents the union operator in set theory and must not
be confused with arithmetic addition. A graphical representation of the
corresponding fuzzy membership function A(x) is shown in Figure 5.3.
(x)
10
20
30
40
......
A={Low}
57
TEMPERATURE
Very_Low
Linguistic Variable
Low
High
0.6
Linguistic Values
Membership values
0.8
20
40
60
80
100
Figure 5.4 The linguistic variable TEMPERATURE and some of its values
Chapter 5
58
The dependence of a linguistic variable on another can be described by means of a fuzzy conditional statement of the form:
R : IF S1 THEN S2
or symbolically as:
S1 S2
where S1 and S2 are fuzzy conditional statements which have the general
form:
S : is
and . A linguistic meaning can be given to the fuzzy subset to
specify the value of , for example:
IF the LOAD is Small THEN TORQUE is Very_High
OR
IF the ERROR is Negative_Large THEN OUTPUT is
Negative_Large.
Two or more fuzzy conditional statements can be combined (or
included in another) so as to form a composite conditional statement
such as:
R : IF S1 THEN (IF S2 THEN S3).
It should be obvious that the composite statement can be decomposed
into the two simpler conditional statements:
R1 : IF S1 THEN R 2 AND
R 2 : IF S2 THEN S3
The composite statement (or rule):
IF the ERROR is Negative_Large THEN
(IF CHANGE_IN_ERROR is Positive_Large THEN OUTPUT is
Positive_Large)
can be written more simply as a pair of rules:
59
Chapter 5
60
a b = min (a,b) = a if a b
= b if a>b
a b = max (a,b) = a if ab
= b if a<b
Well known applications of these operators are to be found in programmable controllers (PLCs) for logical switching operations. These are the
AND () and OR () functions whose operations are shown symbolically below. A black tile indicates a 1 and a blank tile a 0.
0
0
1
OR (max )
AND (min )
The operators min and max of two sets A and B result in the sets
C and D as follows:
D = AB = {max(a,b)} aA, bB
C = A B = {min(a,b)} aA, bB
61
and are shown in Figure 5.5. The AND operator is therefore synonymous
with the min operation and the OR operator with the max operation. It is
worth remembering this in the following chapters.
When operators are used on one element only they imply the
minimum (inf or infinum) or maximum (sup or supremum) of all the
elements of the set, thus:
A = inf(A) aA and
a = A = sup(A) aA
a=
(a ,a ,......a )
= a a ..... a
= k( a )
= (A ,A ,......A )
= A A ..... A
= k( A )
a =
When the elements of the set are functions of a variable, then the
operators are expressed as:
a=
x(a(x))
xX
It is noted, finally, that expressions that involve the min and max
operators use identical rules to those of arithmetic multiplication and addition respectively.
Chapter 5
62
1
(x)
1
1
(x)
0
1
(x)
D(x) - max
C(x) - min
0
63
64
Chapter 5
( ) =
The following properties apply only to fuzzy sets:
E
A = or 0 = 0
A = A or 0 =
A E = A or 1 =
A E = E or 1 = 1
where is the unit set specified by A(x) = 1 xX and is the null set.
65
The primary terms may have either continuous or discrete membership functions. Continuous membership functions are normally defined by analytic functions. The Danish company F. L. Smidth in its
fuzzy controllers designed for the cement industry uses Gaussian-like
membership functions of the type shown in Figure 5.7 given by the expression:
A ( x) = 1 e
)
| x|
(x)
1
x
-1
Chapter 5
66
Linguistic Variable
Positive_Large
Positive_Medium
Positive_Small
Positive_Zero
Zero
Negative_Zero
Negative_Small
Negative_Medium
Negative_Large
Large
Normal
Low
Acronym
LP
MP
SP
ZP
ZE
ZN
SN
MN
LN
HIGH
OK
LOW
0.25
0.25
0.25
0.1
0.25
0.1
0.25
0.25
0.25
0.5
0.6
0.5
2.5
2.5
2.5
6
6
6
2.5
2.5
2.5
6
8
6
1
0.7
0.4
0.1
0
-0.1
-0.4
-0.7
-1
1
0
-1
for x
for x
for x
for x
(x)
1
67
X = {0 + 1 + 2 + 3 + 4 + 5 + 6}
A(x)
Chapter 5
68
(x)
1
(x)
Neg_Large
-x
Neg_Small
Zero
0
Pos_Small
Pos_Large
x
then the fuzzy sets for the linguistic variables small, medium and large
as shown in Figure 5.11 could be defined as the sets:
69
5.7 Connectives
Negation (NOT) and the connectives AND and OR can be defined in
terms of the complement, union and intersection operations respectively.
Usually the connective AND is used for fuzzy variables which have different universes of discourse. If
= {A(x)/x}
B = {B(y)/y}
for xX
for yY
it follows that
(x)
(x)
small
(x)
medium
large
Thus if
= {A(x)/x} for xX
B = {A(x)/x} for xX
Chapter 5
70
then
A OR B = A(x) B(x)/(x)
= AB (x)/(x) for xX
The connective OR can be used only when the fuzzy variables
have different universes of discourse except in the case where the variables appear on the same side of a conditional if .... then statement as in
the rule:
if the PRESSURE is High or the SPEED is Low
then FUEL_FEED must be Zero.
The NOT operator is synonymous with negation in a natural language. Thus if:
= {A(x)/x} for xX
NOT == {1 A(x)/x}
The statement PRESSURE is NOT High is clearly identical to
the statement PRESSURE is Not_High.
Linguistic hedges are useful in generating a larger set of linguistic values from a smaller set of primary terms. Thus using the hedges
very, the connectives NOT, AND and the primary term Large, we may
generate the new fuzzy sets very_Large, NOT_very_Large, Large_
AND_NOT_very_Large, etc. In this manner it is possible to compute the
membership function of complex terms such as:
= NOT_Small AND_NOT_Large
whose membership function is
Chapter 6
Fuzzy Reasoning
At the core of every fuzzy controller is the inference engine, the computational mechanism with which decisions can be inferred even though the
knowledge may be incomplete. It is this very mechanism that can give
linguistic controllers the power to reason by being able to extrapolate
knowledge and search for rules which only partially fit any given situation for which a rule does not exist. Unlike expert systems that depend
on a variety of techniques to search decision trees, fuzzy inference engines perform an exhaustive search of the rules in the knowledge base to
determine the degree of fit for each rule for a given set of causes. The
contribution to the final decision of rules that exhibit a small degree of fit
is clearly small and may even be ignored while rules with a high degree
of fit are dominant. It is clear that a number of rules may contribute to
the final result to varying degrees. A degree of fit of unity means that
only one rule has fired and only one unique rule contributes to the final
decision, while a degree of fit of zero implies that the rule does not contribute to the final decision.
Inference engines can take different forms depending on the
manner in which inference is defined. It is therefore prudent to review
the fundamentals of fuzzy logic that will allow us to understand how the
inference works and how it may be implemented. A fuzzy propositional
implication defines the relationship between the linguistic variables of a
fuzzy controller. Given two fuzzy sets and that belong to the universes of discourse and respectively, then we define the fuzzy propositional implication as:
71
Chapter 6
72
R : IF THEN =
where is the Cartesian product of the two fuzzy sets A and B. The
Cartesian product is an essential operation of all fuzzy inference engines.
Using the conjunctive operator (min), the Cartesian product is
defined as:
=
while for the case of an algebraic product the Cartesian product is:
=
Fuzzy Reasoning
73
1
0.8
0.7
0.2
2
0.6
0.6
0.2
3
0.4
0.4
0.2
4
0.2
0.2
0.2
Chapter 6
74
x\y
1
2
3
1
0.8
0.56
0.16
2
0.6
0.42
0.12
3
0.4
0.28
0.08
4
0.2
0.14
0.04
which is shown graphically in Figure 6.2. It is observed that the graphical representations of the relational matrices of the two Cartesian products have similarities. The Cartesian product based on the conjunctive
operator min is much simpler and more efficient to implement computationally and is therefore generally preferred in fuzzy controller inference
engines. Most commercially available fuzzy controllers in fact use this
method.
R*
x
Fuzzy Reasoning
75
IF 1 THEN 1
IF 2 THEN 2
OR
...............................
IF THEN
This form is typically used in fuzzy control and is identical to the manner
and terms in which human operators think.
The connective OR, abbreviated as , depends on the fuzzy implication operator . Thus the membership function for N rules in a
fuzzy algorithm is given by:
R(x,y) = (R1(x,y), R2(x,y) .... )
= ((1(x) B1(y)), (2(x) B2(y))....)
The foregoing relations apply to simple variables and . In
general, the part of the conditional statement of the form IF THEN
ELSE involves more than one variable and can be expressed as a series of nested statements of the form:
IF 1 THEN (IF 2 THEN .... (IF N THEN ))
or as a statement where the antecedents are related through the connective AND, i.e.,
IF (1 AND 2 AND .... N) THEN
Chapter 6
76
whereupon:
R(x1,x2,.....xN) = {1(x1),(2(x2)),...((N(xN),(B(y))))}
for x1,x2....xn X1, X2 ... XN, yY
or
R(x1,x2,.....xn) = {1(x1) 2(x2) ....
( N(xN), B(y))}
Fuzzy Reasoning
77
Premise 1: x is
Premise 2: IF x is THEN y is
Consequence: y is
Premise 1: y is B
Premise 2: IF x is THEN y is
Consequence: x is A
Chapter 6
78
(y)
For the case of rules, use is made of the connective AND in which
case:
(x,y) =
RN =
RN
RN =
R
Fuzzy Reasoning
79
(y)) (1 - (x))
RN(x,y) =
(k(x) k(y))
Chapter 6
80
and
R(x,y) =
(
k
k
(x)
k(y)).
Fuzzy Reasoning
81
1 if (x) (y)
R(x,y) = (x) > (y) =
0 if (x) > (y)
Alternatively, using the algebraic product
1 if (x) (y)
R(x,y) = (x) > (y) =
(x) if (y) > (y)
A
(y)
Chapter 6
82
(
y
1
R (x,y)
R2(y,z))
(
y
1
R (x,y)
R2(y,z))
for x X
for y Y
Fuzzy Reasoning
83
(
x
A(x)/x
(
x
A(x)/x
Figure 6.3 The fuzzy sets Slow and Fast in the example
on the universes of discourse X, = {0,1,2,3,4,5,6}. The discrete membership functions are shown in Figure 6.3. We wish to determine the outcome if A = slightly Slow for which there no rule exists.
Chapter 6
84
min[1, 0]
min[0.7, 0]
min[0.3, 0]
min[0, 0]
min[0, 0]
min[0, 0]
0
0
0
0
0
0
0
0
0
0
0
0
min[1, 0.3]
min[0.7, 0.3]
min[0.3, 0.3]
min[0, 0.3]
min[0, 0.3]
min[0, 0.3]
0.3
0.3
0.3
0
0
0
0.7
0.7
0.3
0
0
0
1
0.7
0.3
0
0
0
min[1, 0.7]
min[0.7, 0.7]
min[0.3, 0.7]
min[0, 0.7]
min[0, 0.7]
min[0, 0.7]
min[1, 1]
min[0.7, 1]
min[0.3, 1]
min[0, 1]
min[0, 1]
min[0, 1]
min[1, 1]
min[0.7, 1]
min[0.3, 1]
min[0, 1]
min[0, 1]
min[0, 1]
1
0.7
0.3
0
0
0
Fuzzy Reasoning
'
85
'
Figure 6.4 The compositional inference rule using the max-min operators
min( 0, 0.3)
min(0, 0.7)
min(0, 1)
min(0, 0.7)
min(0, 0.3)
min(0, 0)
0
0
0
0
0
0
0
0
0
0
0
0
min(0.3, 0.3)
min(0.3, 0.7)
min(0.3, 1)
min(0, 0.7)
min(0, 0.3)
min(0, 0)
0.3
0.3
0.3
0
0
0
0.3
0.7
0.3
0
0
0
0.3
0.7
0.3
0
0
0
min(0.7, 0.3)
min(0.7, 0.7)
min(0.3, 1)
min(0, 0.7)
min(0, 0.3)
min(0, 0)
min(1, 0.3)
min(0.7, 0.7)
min(0.3, 1)
min(0, 0.7)
min(0, 0.3)
min(0, 0)
min(1, 0.3)
min(0.7, 0.7)
min(0.3, 1)
min(0, 0.7)
min(0, 0.3)
min(0, 0)
0.3
0.7
0.3
0
0
0
Chapter 6
86
[1* 0]
[0.7* 0]
[0.3* 0]
[0* 0]
[0* 0]
[0* 0]
0
0
0
0
0
0
[1* 0.3]
[0.7*0.3]
[0.3*0.3]
[0* 0.3]
[0* 0.3]
[0* 0.3]
0
0
0
0
0
0
0.3
0.21
0.09
0
0
0
[1* 0.7]
[0.7*0.7]
[0.3* 0.7]
[0* 0.7]
[0* 0.7]
[0* 0.7]
0.7
0.49
0.21
0
0
0
1
0.7
0.3
0
0
0
[1* 1]
[0.7* 1]
[0.3* 1]
[0* 1]
[0* 1]
[0* 1]
[1* 1]
[0.7* 1]
[0.3* 1]
[0* 1]
[0* 1]
[0* 1]
(1* 0.3)
(0.7*0.7)
(0.3* 1)
(0* 0.7)
(0* 0.3)
(0* 0)
(1*0.3)
(0.7*0.7)
(0.3* 1)
(0* 0.7)
(0* 0.3)
(0* 0)
1
0.7
0.3
0
0
0
whereupon
{(xi ) B(yj)} =
(0* 0.3)
(0* 0.7)
(0* 1)
(0* 0.7)
(0* 0.3)
(0* 0)
(0* 0.3)
(0* 0.7)
(0* 1)
(0* 0.7)
(0* 0.3)
(0* 0)
(0.3*0.3)
(0.21*0.7)
(0.09*1)
(0* 0.7)
(0* 0.3)
(0* 0)
(0.7*0.3)
(0.49*0.7)
(0.21* 1)
(0* 0.7)
(0* 0.3)
(0* 0)
Fuzzy Reasoning
0
0
0
0
0
0
0
0
0
0
0
0
0.09
0.15
0.09
0
0
0
0.21
0.35
0.21
0
0
0
0.3
0.49
0.3
0
0
0
87
0.3
0.49
0.3
0
0
0
'
'
In general, industrial fuzzy controllers are multivariable, involving m inputs and p outputs. It is, however, simpler to think in terms of p
parallel fuzzy controllers each with one output only. In practice this is
achieved by multiplexing a multi-input single output controller since the
precedents are the same and only the antecedents change in each case.
For the case of a fuzzy controller with m inputs and one output only:
RN = {RN(x1,x2....xm,y)/(x1,x2....xm,y)} for xk Xk and yY.
Now, given
k = {k(xk)/xk} for xk Xk, k=1,2...m
Chapter 6
88
. . . [
x1 x2
xm
(k(xk) RN(x1,x2....xm))]
for k=1,2...m.
Finally, for completeness, if the max-product is used in the compositional inference rule, the corresponding expressions for the resultant
consequence is given by:
(y) =
. . . [
x1 x2
xm
k(xk) RN(x1,x2....xm)]
for k=1,2...m
where now
RN(x1,x2....xm) =
[( Akj(xk) Bj(y)]
for k=1,2...m and j=1,2...n.
Chapter 7
Chapter 7
90
the measured plant variables and following completion of the fuzzy algorithm to de-fuzzify the result and thereby return to the engineering world.
This chapter discusses the procedure of fuzzification and de-fuzzification
as they apply to practical control.
x
FC1
y1
FC2
y2
FC3
y3
FCn
yn
91
7.2 Fuzzification
The algorithm for computing the crisp output of a fuzzy controller involves the following three steps:
(1) fuzzification
(2) inference
(3) de-fuzzification
To make these steps easier to understand, consider a fuzzy controller with three inputs and a single output only. It should be obvious
that the procedure that follows can be generalized for any number of inputs. Given a MISO controller with inputs x1, x2, x3 and output y and assuming that the linguistic control rules are of the form:
IF (1 AND 2 AND 3) THEN
then the membership function of the output of the controller is given by:
R(x1,x2,x3) = (1(x1) 2(x2)
= (
(3(xN), B(y)))
where the operator implies max-min or max-product. Using the intersection operator, the degree of fulfillment of the j-th rule j(k)[0,1] is
defined by:
j(k) = 1(x1)
2(x2)
....
N(xN)
Chapter 7
92
3(k)) o RN
(111
x1
x2
x3
RN(x1,x2,x3,y)
N
R (x1,x2,x3,y)
93
LO
LO
ZO
LH
ZO
ZO
LH
MH
LH
LH
MH
MH
MH
LH
MH
VH
VH
LH
VH
VH
For simplicity, assume, furthermore that the fuzzy sets of the inputs and
outputs are triangular and are as shown in Figure 7.2.
Chapter 7
94
The universes of discourse of Input_1 and Input_2 are assumed symmetric and are expressed as percentages of their maximum
permissible values. Output y involves 5 fuzzy sets and is assumed
asymmetric. Thus the inputs to the controller can take any value between
100% of their maximum permissible values while the output can take
any value between 0 and 100% of its maximum permissible value. For
example, the Output y could represent the opening of a servo-valve,
while Input_1 could be a pressure deviation and Input_2 could be
the temperature deviation about their nominal values.
LO
ZO
LH
MH
VH
1
Input_1
-100%
100%
VL
ZO
VH
1
Input_2
-100%
LO
100%
ZO
LH
MH
VH
1
Output
100 %
The first five rules in the rule base are depicted graphically in Figure 7.3.
Assume, furthermore, that at the instant of execution of the algorithm,
the instantaneous inputs to the controller are -20% and -50% respectively.
95
Input_1
LO
ZO
LH
MH
VH
VL
ZO
Output
VH
LO
ZO
LH
MH
VH
LO
ZO
LH
MH
VH
R1
100%
-100%
LO
ZO
LH
MH
VH
-100%
100%
VL
ZO
VH
100 %
1
R2
100%
-100%
LO
ZO
LH
MH
VH
-100%
100%
VL
ZO
VH
100 %
LO
ZO
LH
MH
VH 1
R3
100%
-100%
LO
R
ZO
LH
MH
VH
-100%
100%
VL
ZO
VH
100 %
LO
ZO
LH
MH
VH
100%
-100%
LO
ZO
LH
MH
VH
-100%
100%
VL
ZO
VH
100 %
LO
ZO
LH
MH
VH 1
R5
100%
-100%
x (k)
1
-100%
100%
100 %
x (k)
2
Figure 7.3 Graphical representation of first five rules in the rule base
For the given values of the inputs, it is clear that rules R1, R4 and R5
have no part in the final decision (and consequently the output) since
these rules have not fired. The degrees of fulfillment of the non-fired
rules are consequently zero. The intercepts of the vertical lines corresponding to the instantaneous value of Input_1 and Input_2 and the
corresponding fuzzy sets specifying the membership value are:
96
Chapter 7
97
respectively.
The degree of fulfillment j for every rule is computed from the
membership values and the operation min(j1,j2). Here
R1 : 1= min(11,12)=min(0, 0.5)=0
R2 : 2= min(21,22)=min(0.66, 0.5)=0.5
R3 : 3= min(31,32)=min(0.33, 0.5)=0.33
R4 : 4= min(41,42)=min(0, 0.5)=0
R5 : 5= min(51,52)=min(0, 0.5)=0
etc.
Chapter 7
98
Input_1
LO
ZO
LH
MH
VH
1
VL
ZO
Output
VH
LO
ZO
LH
MH
VH
R2
100%
-100%
LO
ZO
LH
MH
VH
1
-100%
100%
VL
ZO
VH
100 %
LO
ZO
LH
MH
VH 1
R3
100%
-100%
x (k)
1
-100%
100%
x (k)
2
100 %
(y)
100 %
99
Input_1
LO
ZO
LH
MH
VH
VL
ZO
Output
VH
LO
ZO
LH
MH
VH
R2
100%
-100%
LO
ZO
LH
MH
VH
-100%
100%
VL
ZO
VH
100 %
LO
ZO
LH
MH
VH
R3
100%
-100%
x (k)
1
-100%
100%
x (k)
2
100 %
1
(y)
100 %
100
Chapter 7
y COA =
( y )dy
( y )dy
where S is the support set of Y(y). In the case where the composite membership function is discrete with I elements, this becomes:
I
y COA =
y
i
i =1
I
i =1
( yi )
( yi )
This method is sensitive to changes in the shape of the membership functions of the output. Because it yields intuitive results, this method has
found extensive use in practical fuzzy control.
y COG =
i =1
i =1
( yi )
( yi )
On concluding de-fuzzification, the crisp output of the controller is applied to the plant actuators.
101
Chapter 7
102
POsitive) are used for coarse control and five for fine control. This technique has been applied with success in a number of processes requiring
high terminal accuracy.
NE
ZE
PO
(a)
NB
NM
NS
ZE
PS
PM
PB
(b)
103
ZE
PS
PM
PB
104
Chapter 7
Chapter 8
Fuzzy Industrial
Controllers
The industrial three-term controller without doubt constitutes the backbone of industrial control, having been in use for over a century. Threeterm controllers can take a number of forms, from the early mechanical
to later hydraulic, pneumatic, analog and digital versions. The modern
form takes the form of multi-tasking discrete-time three-term algorithms
embedded in almost all industrial PLCs and RTUs. Undisputedly, industrial progress would have been greatly limited but for these ubiquitous
controllers. To this very day, the majority of industrial plants rely almost
exclusively on this inexpensive, robust and easy to use conventional controller.
The output of a conventional industrial controller normally involves three-terms: the first is proportional to its input (the P term), the
second is proportional to the integral of the input (the I term) and the
third is proportional to the derivative of the input (the D term). In most
practical applications, the first two terms are sufficient and only a small
fraction of industrial controllers make use of the derivative term. Threeterm controllers can be configured in a variety of ways, from the simplest autonomous single-loop controller to cascade control when a single
controller is insufficient to provide the necessary control due to the interactions in the controlled variables of the plant. Three-term controllers
can also be configured so as to provide ratio or blending control when
105
106
Chapter 8
quantities must be maintained as percentages, typically found in materials blending and mixing processes.
Productivity is closely related to the quality of control. Low
quality of control implies poor product quality with products that cannot
meet standards, reduced productivity, loss of competitiveness and ultimately the collapse of the manufacturer. Effective control is thus of vital
importance where high product quality and productivity are essential,
high standards are to be maintained and market share assured. Effective
operation of a plant implies correct tuning of the controllers to meet the
product specifications while the efficiency of a plant is critically dependent on specifying the correct parameters of these controllers.
Traditionally, a three-term controllers are tuned on-line by human experts who excite the plant by injecting appropriate disturbances to
the set-points and then systematically adjust the parameters (i.e., gain
constants) of the controller until the plant meets its design specifications.
Re-tuning is normally necessary whenever the operating conditions of
the plant are changed. Controller tuning requires considerable expertise
and patience and takes time to master. The way in which a human tunes
a control loop or plant is based on heuristic rules which involve such factors as the rise time, settling time and steady state error of the closed system. Indeed, as will be seen later in this chapter, these rules are put to
good use in the design of expert controller tuners, which a number of
vendors offer today.
107
quire more computational effort but yield vastly improved plant responses. All these techniques assume that the controlled plant is scalar,
i.e., has a single input and a single output and are not applicable to multivariable plants. Multivariable plants, for which three-term controllers do
not find ready application, require an entirely different approach to controller design.
For best performance three-term controllers must be tuned for all
operating conditions. Unfortunately, the dynamic characteristics of most
industrial plants depend on their operating state and production rates and
these are far from linear or stationary. A three-term controller is normally tuned for best (note that use of the word optimum is tactfully
avoided) performance at a specific operating state. When the operating
conditions of the plant change, so does the operating state, whereupon
the parameters of the controller may no longer be the best and as a consequence performance is degraded. The degree to which such degradation is acceptable clearly depends on the nature of the controlled plant,
plants that are highly nonlinear being the most difficult to control effectively. The robustness of a controller is a measure of its ability to operate
acceptably despite changes in the operating state of the plant.
Where the variations in the plant are severe, a three-term controller with fixed parameters is no longer effective and alternate techniques, which are capable of tracking the changes in the plant must be
employed. Such techniques as gain-scheduling, auto-tuning and adaptive
control are commonly used to extend the domain of effectiveness and
thereby the robustness of the controller. Fuzzy logic can likewise be used
to extend the domain of effectiveness of a three-term controller.
108
Chapter 8
controller by establishing rules whereby these gains are varied in accordance with the operating state of the closed system. In this case the controller output has the generalized form
u = = fP(e,edt,De) + fI(e,edt,De)) + fD(e,edt,De)
which when fuzzified can be expressed as the weighted sum
u = fuzzy(kP) e + fuzzy(kI) edt + fuzzy(kD) De
Hybrid fuzzy three-term controllers in which only the proportional and derivative terms are fuzzified while the integral term remains
conventional, have also been used. In this case the controller output is
u = uPD + kI edt
An alternative class of fuzzy controllers, which possess the characteristics of a two-term PI controller is the generic fuzzy controller
which has been used extensively in practice. Generic fuzzy controllers
are very simple and require few rules to operate effectively. Using the
closed system error and its derivative only, this class of fuzzy controllers
is normally incremental with output
Du = f(e,De)
which must subsequently be integrated (or accumulated) to generate the
final controller output.
109
and respectively, then the control rules of a generalized fuzzy threeterm controller can be expressed as:
Rr: IF e is Er AND De is r AND edt is r THEN u is Ur
Further, if the union operator relates the control rules, then the fuzzy algorithm reduces to the fuzzy implication rule
(E E IE U )
R = R1R2.....Rn=
The fuzzy set of the output of the generalized fuzzy three-term controller
is thus given by
U = (EEIE) R
whose membership function is consequently
( (e)
U(u)=
(De)
(edt) R(e,De,edt,u))
for eE, DE and edtIE. A graphical display of the parameter surface of such a three-term controller would have to be three-dimensional
and it would be difficult to comprehend the effect of each parameter on
the controller output.
Chapter 8
110
contains high frequency extraneous noise, there may be certain misgivings in generating the derivative or difference term from the error since
noise aggravates the situation. In this case it is clear that some form of
low pass filtering or signal processing is necessary to reduce the effect of
high frequency noise.
uPD
e
FPD
De
FPI
uI
Integrator
The rule matrix or Fuzzy Associative Matrix for the FPD fuzzy subcontrollers is:
e\De
NB
NM
NS
ZO
PS
PM
PB
NB
NB
NB
NB
NB
NM
NS
ZO
NM
NB
NB
NM
NS
NS
ZO
PS
NS
NB
NB
NM
NS
ZO
PS
PM
ZO
NM
NM
NS
ZO
PS
PM
PM
PS
NM
NS
ZO
PS
PM
PB
PB
PM
NS
ZO
PS
PM
PB
PB
PB
PB
ZO
PS
PM
PB
PB
PB
PB
111
-3
-3
-3
-3
-3
-2
-1
0
-2
-3
-3
-2
-1
-1
0
1
-1
-3
-3
-2
-1
0
1
2
0
-2
-2
-1
0
1
2
2
1
-2
-1
0
1
2
3
3
2
-1
0
1
2
3
3
3
3
0
1
2
3
3
3
3
Chapter 8
112
4
2
0
-2
uPD
-4
De
1 2
3 4
5 6
7
e
Figure 8.2 Control surface of the FPD sub-controller
NB
NB
NM
NM
NS
NS
ZO
ZO
PS
PS
PM
PM
PB
PB
NB
PS
NM
PM
NS
PM
ZO
PB
PS
PM
PM
PM
PB
PS
113
De
uPD
FPD
e
uI
fuzzy(kI)
Integrator
Multiplier
Extending the method further, it is possible to design a threeterm controller using the configuration shown in Figure 8.4 with each of
the controller parameters (kP, kI and kD) specified by independent rules,
i.e.,:
U = fuzzy(kP)e + fuzzy(kI)edt + fuzzy(kD)De
Chapter 8
114
De
fuzzy(kP)
e
fuzzy(kI)
Integrator
fuzzy(kD)
The temporal error response to a step excitation and its derivative can be
broken up into regions defined by their zero crossover points. Thus the
error may be coarsely described as positive, zero at the crossover or
negative. Assume, therefore, that the three fuzzy sets (POsitive, ZerO
and NEgative) suffice to describe each control variable.
In Region 1 we can thus write the first generic control rule:
R1: IF e is PO AND De is NE THEN u is PO
The objective of this rule is to apply maximum positive control action
(e.g., torque in the case of a servomotor) to the controlled process in order to force it to accelerate to its final value with a minimum rise time.
In Region 2 the corresponding generic control rule is:
R2: IF e is AND De is NE THEN u is
Here the objective is to apply maximum negative control action to decelerate the process in order to minimize overshoot. Using similar reasoning, the 11 rule Fuzzy Associative Memory that follows is derived.
115
De
(a)
e
a
Chapter 8
116
Rule
De
Points
1
2
3
4
5
6
7
8
9
10
11
PO
ZO
NE
ZO
ZO
PO
NE
NE
PO
PO
NE
ZO
NE
ZO
PO
ZO
NE
NE
PO
PO
NE
PO
PO
NE
NE
PO
ZO
PO
NE
NE
PO
ZO
ZO
a,e,i
b,f,j
c,g,k
d,h,l
origin
i,v
ii,vi
iii,vii
iv,viii
ix
ix
De
Points
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
PL
PM
PS
ZO
ZO
ZO
NL
NM
NS
ZO
ZO
ZO
ZO
PL
PS
NL
NS
PS
NS
ZO
ZO
ZO
NL
NM
NS
ZO
ZO
ZO
PL
PM
PS
ZO
NS
NL
PS
PL
NS
PS
PL
PM
PS
NL
NM
NS
NL
NM
NS
PL
PM
PS
ZO
PM
NM
NM
PM
ZO
ZO
a
e
i
b
f
j
c
g
k
d
h
l
origin
i
i
iii
iii
ix
xi
117
Du
e
De
u0
u
Generic
Fuzzy
Controller
Integrator
118
Chapter 8
Chapter 9
120
Chapter 9
121
Effects
Causes
Real-time
Database RTDB
Fuzzifier FZ
De-fuzzifier
Inference
Engine IE
Knowledge
Base KB
Fuzzy
Controller
Kernel
Fuzzy
Sets FS
Development System DS
Chapter 9
122
RTU
RTU
LAN
PC
PC
PC
Clients
Figure 9.2 Architecture of a distributed supervisory control system
Distributed supervisory control systems involve a cluster of industrial grade microcomputers, RTUs, micro-controllers and peripherals
connected to a LAN. Each component of the cluster performs real-time
control of a specific sub-process of the plant. The host computer usually
123
contains the real-time database where all current data on the state of the
plant is stored and can serve this data to any of the clients (sometimes referred to as agents) in the cluster on demand.
An alternative architecture involves a distributed real-time database in which each client retains the data pertinent to the tasks it is assigned. The client can transmit this data to any other client on demand.
This leads to considerably more data having to be transmitted over the
LAN between clients, resulting in data transmission delays. Finally, a
hybrid architecture in which the local real-time databases are mirrored in
the server can be used. In this case, each client must continuously update
the data that has changed since the last transmission in the master database in the host computer. The advantage of this last architecture is that
in the unlikely case that the host computer fails and its data is lost or corrupted, then the master database can be restored from the local databases
in the clients when the host becomes operational again.
124
Chapter 9
ecutable software, which includes the knowledge base, fuzzy sets, inference engine, fuzzifier and de-fuzzifier, is downloaded to the microcontroller via a local link or is burned into an erasable programmable
read-only memory (EPROM) which is then plugged into the microcontroller.
A new class of intelligent industrial three-term controllers is
gradually replacing conventional industrial controllers in a number of
critical applications that require increased autonomy. These controllers
find use in situations where the operational demands of the application
do not permit fixed or programmed gains. Intelligent industrial controllers are implemented in software in micro-controllers (MC), programmable logical controllers (PLCs) or remote terminal controllers (RTUs) and
a number of vendors today offer appropriate software for their development. In new plants it would be wise to consider incorporating intelligent
controllers that have been shown to enhance control over conventional
industrial controllers.
In order to minimize memory requirements as well as accelerate
computation in embedded fuzzy controllers, many vendors restrict both
the number and the shape of the permissible fuzzy sets for both inputs
and outputs. Triangular fuzzy sets are almost universally used for the inputs and outputs of the controller. Rules are coded numerically and the
number of fuzzy sets is restricted. Singletons are often used to define the
fuzzy sets of the outputs of the controllers as they simplify defuzzification considerably.
125
Input
Output
On executing the fuzzy algorithm and following defuzzification, the new control variables are deposited in the real-time da-
126
Chapter 9
127
Grit chamber
Biological
treatment
Bar
racks
Skimming
tank
Sludge returns
Suspended
liquids
Remaining sludge
Solids
storage
Sludge Fusion
Sludge Drying
Chapter 9
128
Measurement of
BOD
Measurement of:
Temperature, DO
and MLSS
Reactor
AERATED
ZONE
ANOXIC
ZONE
Sludge
feed
Settling tank
Oxygen
Feed
Liquid Returns
Pump for return
of liquids
Measurement of
N=NO3 and N-NH3
Measurement of
BOD
Sludge returns
Remaining sludge
for fusion
1.
2.
3.
4.
5.
129
130
Chapter 9
O2Feed
MLSS
D(BOD)
131
132
Chapter 9
Most kiln operators prefer to operate the kiln in the region of overburning however, as it is more stable. In between the two extremes,
however, there is a narrow region of stable operation in which high productivity and product quality can be achieved. Kiln operators find this
state very difficult to maintain for long periods or time as the controls
must be continuously manipulated to account for small changes in the
operating state of the process.
Kiln operators learn to control their plant from linguistic rules of
the type:
IF the Kiln_KW demand is HIgh
AND the outlet oxygen content O2 is Low
AND the Previous_Fuel_Feed is OK
THEN make a SMall reduction to the Fuel_Feed
AND make NO change to the induced draft fan speed VIDF
Here, Kiln_KW, outlet oxygen content O2 and Previous_Fuel_Feed constitute the input fuzzy variables, while current
Fuel_Feed and induced draft fan speed VIDF are the output fuzzy
variables. Approximately 50-60 linguistic rule are used to provide very
good control of the kiln under normal operating conditions. For start-up
and shut-down conditions, as well as abnormal situations, different sets
of rules may be used.
The fuzzy controller can control this most difficult of processes as
well as, and certainly more consistently than, a human operator, by observing the same control variables and adjusting the same manipulated
variables. Fuzzy kiln controllers can easily maintain control of the process in this stable intermediate state, consistently achieving marked fuel
economy and high productivity. Fuzzy kiln controllers normally reside
in a client on a client-server network, receiving information on the current values of the control variables and returning the manipulated variables to the real-time data base on the file server for transmittal to the
local RTUs. The fuzzy controller can be executed either at regular intervals or following an interrupt from the control scheduler, which monitors the temporal changes in the control variables.
Using fuzzy kiln control, fuel costs have been reduced by up to 5%
while productivity has been increased by an equal amount. Today there
is a very large number of kilns worldwide under fuzzy control. Similar
fuzzy controllers have been used to control all of the processes associated with cement production.
133
VIDF
Precalciner
Prev_Fuel_Feed
Raw
Feed
Controller
O2
Kiln KW
Fuel Feed
Air flow
Kiln motor
Fuel
Rotary Kiln
Clinker flow
Chapter 10
136
Chapter 10
x = f (x,u); x0
where xn and um are the crisp n-dimensional process state vector
and m-dimensional control vector respectively and x0 is the initial state.
This explicit description of the process may be the result of deep knowledge about the process or the result of identification of the process from
experimental data using any of the well-known system identification
techniques.
One of the interesting features of the first Takagi and Sugeno
technique for designing model-based fuzzy controllers is that under cer-
137
tain conditions that are, unfortunately, not always easy to satisfy, this
technique guarantees stability of the closed system while specifying the
transient behavior of the closed system through pole-placement. These
are properties that are inconceivable with the heuristic fuzzy controller
design technique. The difficulties in meeting the conditions for stability
of the first method proposed by Takagi and Sugeno were eliminated in
the second version that uses state differences. Both techniques are outlined in this chapter.
X ij = X ij ( x) / x
X
for the discrete case. The universe of discourse is given as the set:
TXi = { X i 1 , X i 2 ...X iki }
where ki is the number of fuzzy values xi. In order to simplify the analysis that follows it will be assumed that:
Chapter 10
138
i2
in
xi
(10.1)
The symbolism x=Xi implies that the state of the process x belongs to the fuzzy region Xi. The consequent of each rule describes an
explicit local model of the process in the corresponding fuzzy region
139
Chapter 10
140
i
x i = S ( x) f i ( x, u )
where
i
S ( x) = X i ( x1 ) X i ( x 2 ) ... X i ( x n )
1
(10.3)
are the degrees of fulfillment of the local models of the process using
Mamdanis fuzzy compositional rule.
For each nominal state of the process, a state equation of the
form of (10.2) is determined. Using the set of fuzzy process rules (10.1)
we establish the fuzzy open-loop model of the process, which is the
weighted sum of the local models fi(x,u) , i.e.
i
x = wS ( x) f i ( x, u )
(10.4)
where
i
wS ( x ) =
S ( x)
S ( x)
i
[0, 1]
(10.5)
w
i
i
S
( x) = 1
141
u j = C ( x) g j ( x)
where
j
C ( x) = k ( X j ( x k ))
k
u = wC ( x) g j ( x)
j
(10.8)
where wCj are the control weights which are computed in Equation
(10.5).
Chapter 10
142
x i = f i ( x i , u i ) = Ai xi + Biu i
(10.9)
where
Ai =
f i
x
, Bi =
xi ,ui
f i
u i
xi ,ui
are the usual partial derivatives of the nonlinear functions fi() evaluated
at the nominal conditions (xi,ui). The set of locally linearized models at
these nominal states defines the state equations of the controlled process
at those states and is termed the overall fuzzy open-loop model of the
process.
For each linearized local model there must be a corresponding
linear control law that guarantees closed system stability while satisfying time-domain criteria. The complete set of control laws constitutes the
global control law of the closed system. In the Takagi-Sugeno approach,
the decision on the process model and the control law to use clearly depends on the nominal state of the process and is based on fuzzy linguistic
rules.
The linearized process model rule (10.2) now becomes:
RS i : IF x=xi THEN x = Ai x + Bi u
P
(10.10)
Modern control theory assumes that all the states of the process
are measurable or can be estimated, in which case a constant state feedback control law of the form:
(10.11)
143
u i = Ki x
can be applied, where Ki is a suitably gain matrix. Using any poleplacement technique, the elements of the gain matrix are chosen so that
the poles of the closed system yield the desired transient behavior. The
fuzzy control rule is therefore:
(10.12)
x = w i ( x)( Ai x + Bi u )
(10.13)
(10.14)
Finally, substituting Equation (10.14) in (10.13) yields the overall homogeneous closed system state equations:
x = w i ( x) w j ( x )( Ai + Bi K j ) x
(10.15)
x = w i ( x) w j ( x) Aij x
(10.16)
or
where
Aij = Ai + Bi K j
144
Chapter 10
he closed system (10.15) is asymptotically stable and stabilizable at the origin x=0, if and only if
1. the matrix Aij is Hurwitz, i.e., all its eigenvalues possess
negative real parts and
2. there exists a positive definite matrix P such that
(10.17)
.
Even though these stability conditions are necessary and sufficient, it is very difficult to determine a suitable positive definite matrix
P. Furthermore, if the matrix ij is not Hurwitz then a matrix P which
satisfies Equation (10.17) does not exist and this technique is not applicable.
145
x = A d ( x x d ) + B d (u u d )
(10.19)
which are linear state equations involving the state and control input deviations from their nominal states xd and ud respectively, while
A d = A( x d , u d ) =
f i ( x, u )
x
x = x d ,u = u d
f i ( x, u )
u
x = x d ,u = u d
and
B d = B( x d , u d ) =
it is valid only for small deviations in the state and input vectors from their nominal values and
for every change in the nominal state, the rules by which decisions are made must be changed and the linearization procedure repeated.
146
Chapter 10
147
LX i ( x i ) = min(1,1,...,1) = 1.
Thus at the centers of each fuzzy region, the linearized system in
the consequents of the fuzzy rules are given by Equation (10.19) with xi
in place of xd. The set of rules which describe the fuzzy open-loop model
reduce to:
(10.20)
(10.21)
x = w i ( x d ) A i ( x x d ) + B i (u u d )
(10.22)
u = w j (x d ) K * (x x d ) + u d
(10.23)
It is observed that both the closed system model and the control
law are linear since the normalized membership functions wi(xd) and
wj(xd) are constants less than unity. As in the previous case, the closed
system is now given by:
x = w i ( x d ) w j ( x d ) A i + B i K j ( x x d )
i
It follows that
w (x
i
Here
) = w j ( x d ) = wi ( x d ) w j ( x d ) = 1
j
(10.24)
Chapter 10
148
Ad = wi ( x d ) Ai ; B d = wi ( x d ) B i
i
and
K d = w j ( xd )K j
j
In an analogous way
x = A d ( x x d ) + B d (u u d )
and
u = K d (x xd ) + u d
The overall closed system is stable at the nominal state xd if and
only if:
A*=d+BdKd.
If these conditions hold, then we can state the following:
The fuzzy gain-scheduled closed system (10.24) is asymptotically stable if and only if positive definite matrices and
Q exist such that
A *T P + PA* = Q
(10.25)
149
computation of the control law and the conditions for stability are well established and
the determination of the matrix is almost always possible.
The second Takagi-Sugeno technique combines the simplicity of
heuristic fuzzy logic with rigorous hard control techniques and offers the
possibility of specifying the desired closed system response as well as
the conditions for stability. It suffers, however, from the fact that an explicit analytical model of the process must be known.
(b)
At low altitude, case (a), the dynamics of the plant are slow with a normalized time constant of T=2 whereas at high altitude in case (b), the
150
Chapter 10
response of the plant is faster, with a time constant T=0.5 and is considerably more sensitive to control actions. The corresponding step responses are shown in Figure 10.2.
(b)
(a)
151
Chapter 10
152
i
= i
1 + 2
x = 0.2 x + 0.2u
(a)
(b)
153
Chapter 11
Neural Control
The emulation of human cognitive ability is one of the primary fields of
research interest in Computational Intelligence. The human is nowhere
near as fast or as accurate in calculating as a modern computer, yet even
at a very early age one can easily recognize objects and relate them in
their natural environment even if they are distorted or partially hidden.
Exactly the opposite is true with computers they are far more capable
than humans in performing tedious tasks that involve extensive numerical computations yet they have difficulty performing cognitive tasks despite the impressive progress made in Artificial Intelligence.
The ability to learn through experience is one of the principal
characteristics of humans. Humans have the capacity to store huge quantities and types of information, recall this data and process it in a very
short time with little difficulty. One possible explanation for this superiority is the lack of suitable computer software to emulate the humans
ability to process information. A second explanation is the fact that the
human brain and computers work in radically different ways, the brain
being much more efficient at processing information. The human brain is
extremely powerful, comprising a huge number (of the order of 109) of
simple processing elements or neurons, each one of which is capable of
communicating with the others. This is massive parallelism and it is interesting that modern computer designs are increasingly following this
architecture.
154
Chapter 11
The neurons of an Artificial Neural Network (ANN) are arranged in such a manner as to process information in parallel and simultaneously. Each neuron sends activation or de-activation signals to other
neurons while its activation depends on signals received from other neurons to which it is connected. The term synapses is commonly used for
153
these connections. Suitable interconnection of these simple elements can
yield powerful networks with the ability to learn, adapt and infer. The
use of artificial neural networks is sometimes known as connectionism
and ANNs can therefore be viewed as generalized connectionist machines or generalized function mappers.
Since their re-emergence in the early 1980s, there has been an
explosion of interest in the application of ANNs for qualitative reasoning, which is at the core of the fields of Soft Computing and Intelligent
Systems. This interest has been encouraged by the increasing availability
of powerful parallel computing platforms capable of very high computational speeds and parallel programming techniques. Multi-layer ANNs
are finding use in an ever-increasing range of applications, from image
recognition, voice analysis and synthesis to system identification and industrial control. This chapter, and those that follow, present the most
commonly used ANN architectures that have found application in Control Engineering, the basic network-learning algorithms and examples of
industrial applications.
The origins of ANNs are to be found some fifty years ago in the
work of McCulloch and Pitts. The first contribution in the area of network learning was due to Hebb in 1949 who showed that learning in
complex networks can be achieved by adapting the strengths of the synapses. Rosenblatt introduced the Perceptron, an early form of neuron, in
the late 1950s.
The operation of multi-layer ANNs was not fully understood in
those early days and research was restricted to structured perceptrons.
Nilsson followed in the mid-1960s with learning machines and machines that were made up of clusters of threshold logic units. In 1969
Minsky and Papert published their seminal work on Perceptrons, in
which they proved that Perceptrons are limited in their ability to learn,
pointing to their inability to represent a simple R logic element. This
work was to dampen the enthusiasm in ANNs and research in the field
was virtually paralyzed for almost a decade.
Fortunately, ANNs re-emerged in the early 1980s due mainly to
the work of Hopfield who continued his research on network training
Neural Control
155
These properties satisfy the fundamental requirements for their use in Intelligent Control. Neural controllers and fuzzy controllers, thus constitute
the core of intelligent control.
An ANN is essentially a cluster of suitably interconnected nonlinear elements of very simple form that possess the ability of learning
and adaptation. These networks are characterized by their topology, the
way in which they communicate with their environment, the manner in
which they are trained and their ability to process information. ANNs are
classified as:
static when they do not contain any memory elements and their
input-output relationship is some non-linear instantaneous function, or
dynamic when they involve memory elements and whose behavior is the solution of some differential equation
Chapter 11
156
= w1 x1 + w2 x 2 + ....wn x n + b
where w and x are the synaptic weight and input vectors of the neuron
respectively, while b is the bias or offset. A positive synaptic weight implies activation, whereas a negative weight implies de-activation of the
input. The absolute value of the synaptic weight defines the strength of
the connection. The weighted sum activates a distorting (or compression) element f(i). One form that this element can take is the threshold
logic unit, in which the output of the neuron is triggered when the inner
product <w,x> exceeds the bias b. There are many variations of the nonlinear distorting element, the most common of which are
1) Linear (ADALINE):
f()=
2) Binary (Threshold Logic Unit or TLU):
f() = 1 if >0
= 0 if 0
Neural Control
157
3) Sigmoid:
f( ) =
1
[0,1]
1 + e
4) Hyperbolic tangent:
f ( ) =
1 e
=(1+tanh) [-1,1]
1 + e
5) Perceptron:
f() = if >0
=0 if 0
x1
w1
x2
y
f()
w2
xn
wn
b
The input to the compression element may take on either of the following forms, depending on whether the neuron is static or dynamic:
weighted sum (for the case of static memoryless neurons):
Chapter 11
158
w x
i
i =1
+ b=
n+1
w x
i
; x n+1 = 1, b = wn+1
i =1
( k ) = ( k 1) + wi x i ( k )
i =1
Neural Control
159
Outputs
Output
Layer
Hidden
Layer
Input
Layer
Inputs
160
Chapter 11
Outputs
Buses
Inputs
Neural Control
161
Chapter 11
162
Neural Control
163
outputs. The method is well established and is not limited to linear approximants. By way of example, consider the case of a SISO discretetime system that is to be identified by the ANN shown in Figure 11.4.
The input to the ANN is fed from the input to the physical plant. If, following training, the output of the ANN is identical to that of the plant
then we say that the plant has been exactly identified. In practice, perfect
identification is unlikely and the plant can be identified only approximately. The fidelity of the approximation depends on the complexity of
the network and is directly related to the order of the neural network and
the number of past samples of the input that are used.
ANN
Delayor
Dx
D 2x
y
D nx
Figure 11.4 Multi-layer dynamic neural network model of a SISO plant
Chapter 11
164
u
Neural
Controller
y
Plant
A neural controller that has found use in practice due to its simplicity uses an inverse model of the plant. The method has much in
common with conventional auto-tuning. During the training phase of the
ANN, which is performed off-line with known training sets, the objective is to establish the inverse relationship P-1 between the output(s) and
the input(s) of the physical plant, in effect the inverse transfer function if
the plant is linear. Thus if the physical plant is characterized by the mapping y=P(u), then following training the ANN will ideally generate the
inverse mapping u=P-1(y) so that the overall relationship between the
input and the output of the closed controlled system is unity, i.e., perfect
tracking! In keeping with accepted symbolism the output of the neural
Neural Control
165
controller, now the control signal to the plant has been renamed u
whereas y refers to the plant output. Network training is based on some
measure of the open system error between the desired and the actual outputs eo=d-y of the closed system. A flow diagram of the method is
shown in Figure 11.5.
It should be obvious that the very simplicity of the method is
questionable. In theory the method should work but in practice it may
not, because identification of an inverse mapping can never be exact, in
which case the overall transfer relationship of the system is not unity. In
order to work, even partially, the method requires repeated identification
at regular intervals, a fact that makes the method impractical for most industrial applications.
eC
u
Controller
y
Plant
Chapter 11
166
considerably more difficult, however, with this structure, due to the feedback action.
Plant
Model
y*
e*
d
u
Controller
y
Plant
During the training phase, the simulator ANN learns the functional relationship between input(s) and output(s) (i.e., the transfer function) of the physical plant. This is the identification phase, which is
based on some measure of the error between the output of the plant and
that of the plant model simulator ANN, i.e., e*=y-y*.
Neural Control
167
Training can be either off-line or on-line with random or pseudorandom signals. Simultaneously, the overall error e=d-y is used to train
the controller ANN. The advantage of this architecture is that it presents
easier training of the controller ANN on-line since the error can be
propagated backwards through the simulator ANN at every sampling instant.
Chapter 12
Chapter 12
170
propagating some measure of the error between the desired and actual
output of the network from its output back to its input.
In the case of unsupervised learning, no information on the desired output of the network that corresponds to a particular input is available. Here, the network is auto-associative, learning to respond to the
different inputs in different ways. Typical applications of this class are
feature detection and data clustering. Hebbs algorithm and competitive
learning are two examples of unsupervised learning algorithms. A wide
range of network topologies such as those due to Hopfield, Hamming
and Boltzmann, also use the same method of learning. In general, these
networks, with their ability to generate arbitrary mappings between their
inputs and outputs, are used as associative memories and classifiers.
171
J=
2
i
i =1
which is computed for all the elements of the training set. We seek the
values of the synaptic weights that minimize the objective function. The
inputs to the ADALINE may be either binary or real, whereas the values
of the synaptic weights are always real and may be positive or negative,
signifying activation and de-activation respectively. In terms of the inputs and the synaptic weights of the element, the error is:
e = d - <w,x>
where <w,x> is the inner product of the synaptic weight vector and the
input vector and thus the squared error is:
e2 = d2 2d<w,x> + <w,<x,x>w>
whose expected value is:
172
Chapter 12
E ( e 2 )
= -2p + 2Rw
w
(12.1)
where
= ek
k
w
2
instead of its expectation, made little difference to the final result. This
observation simplified network training significantly since the squared
error sensitivity could now be expressed in terms of the synaptic weights
and the error directly, i.e.,
= 2e ek = 2e (d < w , x >) = 2e w
k
k
k
k
k k
k k
wk
wk
The Widrow-Hoff algorithm can be expressed as the iteration:
~
wk +1 = wk + wk = wk k = wk + 2e k x k
(12.2)
173
wk = 2ek xk
it follows that
ek = -2<xk ,xk>ek = - ek
This means that the error is reduced by a factor of at each iteration. This factor thus plays a major role in the stability of convergence
of the algorithm and must lie in the range 0<<2. In practice values of
in the range of 0.1<<1 are preferred. Too small a value of leads to
very slow convergence while a large value leads to oscillations and ultimately instability.
The Widrow-Hoff training algorithm has the advantage of simplicity but is plagued by slow convergence. Training algorithms are the
subject of considerable research and algorithms with vastly increased
training rates have been developed. The back-propagation algorithm,
which was the major breakthrough that opened up the field of ANN, is
one of the most popular, though by no means the fastest or most reliable.
This algorithm is presented later in this chapter.
174
Chapter 12
e
y
f ( ) f ( )
= =
=
= g( )x
w w
w
w
It is obvious that for the error sensitivity to exist everywhere, it
is necessary that the gradient of the nonlinear function g() = f() exist
for all values of . This implies that the nonlinear function must be differentiable or smooth. In the special case of a linear neuron clearly
g()=1.
The development of the Delta algorithm follows that of the Widrow-Hoff algorithm closely. Here, the squared error sensitivity is
ek
ek2
f
f
~
= 2e
= 2ek
= 2ek
k =
w k
wk
wk
= 2ek g k xk
w k
which shows how the gradient g of the nonlinear function f enters the
training algorithm. This expression is very similar to that of the WidrowHoff algorithm except that an additional term has been added.
The Delta training algorithm is given by the iteration
~
wk +1 = wk + wk = wk k = w k + 2e k g k x k
(12.3)
175
Chapter 12
176
w
e
Training
Algorithm
177
The signals at the inputs and outputs of the neurons of the first
layer are respectively:
3=v1y1+v2y2+v3 ; y3=f(3)
The synaptic weights of the first layer are given by the vector w
and those of the second layer by the vector v. The error is
e = d - y3 = d - f(3)
1
w13
w11
x1
v1
w12
v2
w21
x2
v3
w22
w23
y3
178
Chapter 12
e 2
e
= 2e
; i = 1,3
vi
vi
Following the steps taken in developing the Delta training algorithm presented in the previous section, the synaptic weights of the first
layer must be adapted according to
Wk +1 = Wk + W k = Wk + 2 e k
e
W
v k+1 = v k + v k = v k + 2k e k e
v
The training algorithm thus requires evaluation of the partial derivatives of the errors with respect to the synaptic weights of both layers,
i.e. the error sensitivities
e
e
and
W
v
Dropping the iteration index k to simplify notation, the chain rule is used
to derive the first three partial derivatives for the first layer, which are:
179
e
y
f ( 3 ) 3
f ( 3 ) 3 f ( 1 ) 1
= 3 =
=
= g ( 3 ) g ( 1 )v1 x1
w11
w11
3 w11
3 f ( 1 ) 1 w11
e
y
f ( 3 ) w3
f ( 3 ) 3 f ( 1 ) 1
= 3 =
=
= g ( 3 ) g ( 1 )v1 x2
w12
w12
3 w12
3 f ( 1 ) 1 w12
f ( 3 ) 3 f ( 1 ) 1
y
f ( 3 ) 3
e
=
= g ( 3 ) g ( 1 )v1
= 3 =
3 f ( 1 ) 1 w13
w13
w13
3 w13
f ( ) =
1 e
2
and g ( ) = f ' ( ) =
1+ e
(1 + e ) 2
In the same manner, the partial derivatives for the neuron in the
second layer are
e
y
f ( 3 ) 3
= 3 =
= g ( 3 ) y1
v1
v1
3 v1
e
y
f ( 3 ) 3
= 3 =
= g ( 3 ) y2
v2
v2
3 v2
e
y
f ( 3 ) 3
= 3 =
= g ( 3 )
v3
v3
3 v3
These expressions are especially simple if the propagation is
through one layer only. Thus given some random values for the synaptic
weights in all layers of the ANN and the known input vector, the first
pass is made during which the signals 1, 2, 3 are computed. Computation of the neuron outputs y1, y2, y3 then follows from which the various
nonlinear functions and their derivatives (f,g) are computed.
At every iteration of the algorithm, the corrections to the synaptic weight matrix Wk for the first layer and the weight vector vk for the
second layer are computed. These corrections are then added to the previous synaptic weights and the algorithm is repeated until convergence,
Chapter 12
180
W v
1 2 y1 y2
Training
Algorithm
3 y3
First
layer
Second
Figure 12.3 Flow chart for the back-propagation algorithm for the 2-2-1 ANN
Chapter 13
182
Chapter 13
183
THEN
CONTROL_VARIABLE must be Positive_Large
will appear as the training string: [-0.5, 0.5, 0] [1]. This training
string can be used directly to form the training set of a neural network of
specified topology. The corresponding MATLAB Neural Toolbox statement is simply:
P=[-0.5
0.5
0.0]; inputs
The training set is the collection of all the (P,T) pairs corresponding to
every linguistic rule in the rule base.
-1.0;
0.5;
-0.5;
string of N triplets
184
Chapter 13
In a like manner, the corresponding output training set of a multi input single output neural controller can be stated as follows:
T=[0 0.5 -0.5 ...... -1.0] ; string of N corresponding
outputs
185
Controller
Actuator
Force Sensor
Lathe
Finally, the output of the controller is weighted before being applied to the plant as:
ck=gc uk
The parameters gi, gp and gc are the normalizing gains of the
controller, necessary to convert the inputs to the controller into the range
[-1,1]. The value for gc=(ck/uk)max while the pair of controller parameters
(gi,gp) are tuned on-line or obtained in an identical manner to the ZieglerNichols method.
The linguistic control rules required to control the lathe cutting
process are shown in the form of the checkerboard pattern in the
linguistic rule matrix in Figure 13.3.
186
Chapter 13
{w}
e
{v}
De
Du
1
Figure 13.2 Minimal neural controller for the mechatronic system
Both the ERROR (e) and the CHANGE_OF_ERROR (De) are quantized into five elements (equal to the number of linguistic variables assigned to each controller input) over the normalized ranges [-1,1]. Here,
each controller input has been assigned seven linguistic variables and
consequently the Linguistic Rule Matrix (LRM) or Fuzzy Associative
Memory (FAM), contains 49 possible rules not every one of which is
specified. Typically some 20-30% of the possible elements of the FAM
are specified. In the example shown in Figure 13.3, the FAM contains 13
of the 49 possible rules.
De\e
NL
PL
OK
NM
NMS
OK
PMS
PM
PM
PL
PL
PM
PMS
OK
OK
NM
NMS
PMS
OK
NMS
PM
OK
NM
NL
NL
NM
OK
Figure 13.3 Linguistic Rule Matrix (LRM) or Fuzzy Associative Memory (FAM)
187
+1
0
De
0
0.35
0
-0.55
-0.35
-1
+1
0.55
0.55
0
-0.55
-1
-1
0
Figure 13.4 Numerical FAM
+1 e
188
Chapter 13
e
0.8
0.8
0.8
0.3
0.3
0
0
0
-0.3
-0.3
-0.8
-0.8
-0.8
De
0.8
0
0.8
0.3
-0.3
0.8
0
-0.8
0.3
-0.3
0.8
0
-0.8
Du
1
0.55
0
0.35
0
0.55
0
-0.55
0
-0.35
0
-0.55
-1
where wij are the synaptic weights of the first layer and vi the synaptic
weights of the second layer. The corresponding biases are:
b1=0.6312
b2=0.166
b3=-0.5403
Figure 13.5 shows the Network Learning Rate and the Network Error (i.e., the sum of squared errors) as functions of the number of epochs. It is noted that less than 100 epochs are required to bring about
conversion. This translates into a few seconds of computational time depending on the platform used.
The performance of the closed system with the neural controller
compares favorably with that of a conventional two-term controller in
Figure 13.6, proving that unconventional control can be as good as conventional control and often superior.
189
Network Error
8
6
4
2
0
0
20
40
60
Epoch
Network Learning Rate
80
100
80
100
0.25
0.2
0.15
0.1
0.05
0
0
20
40
60
Epoch
1.2
1
0.8
0.6
0.4
0.2
0
0
10
20
30
Time (second)
40
50
60
Figure 13.6 Comparison of step responses of the mechatronic system with the
conventional controller (continuous line) and the neural controller (crosses)
190
Chapter 13
191
Five linguistic variables are used for each controller input, sufficient
to yield the desired accuracy, whereupon the overall FAM has
3555=375 rules. In practice this number is unwieldy and it is simpler to design three independent three-input single-output subcontrollers which are executed sequentially. Here the sub-controllers
have identical causes but different effects. The three sub-controllers can
consequently be trained independently. Fewer than 125 rules are necessary in practice to achieve satisfactory control. Rule pruning was systematically performed with a view to reducing the number of control
rules without loss of controller performance. This led to a reduced training set of 65 rules, an example of which is given below:
R:
DP
EXT
RDPR
UP
HADPR
FEED
CONTROLLER
UP(0)
EXT(0)
DP(0)
HADPR(0)
FEED(0)
RDPR(0)
192
Chapter 13
The controller algorithm is resident in the supervisory control system and is executed every 10 seconds. If the resultant incremental control actions are small, indicative of stable operation, they are ignored and
the process is maintained at its previous state.
Two such neural coal mill controllers have been in continuous operation since 1992 and have consistently led to energy demand reduction
of approximately 5% and a comparable increase in productivity, food for
thought for anyone still doubting the economics of intelligent control!
Chapter 14
Neuro-Fuzzy Control
Neuro-fuzzy controllers constitute a class of hybrid Soft Controllers that
fuse fuzzy logic and artificial neural networks. Though the principles of
fuzzy logic and artificial neural networks are very different, the two
techniques have important common features: fuzzy logic aims at reproducing the mechanism of human cognitive faculty while neural networks
attempt to emulate the human brain at the physiological level.
In fuzzy controllers linguistic rules embody the knowledge on
how to control a physical plant. In a neural controller this knowledge is
embedded in the structure and the synaptic weights of the network. Feedforward processing in ANNs is analogous to the inference engine in
fuzzy logic. Fuzzy controllers use fuzzy compositional rules to arrive at
their decisions, require fuzzification of the input variables and defuzzification of the composite fuzzy set of the output in order to obtain a
crisp output from the controller. In contrast, neural controllers use simple
arithmetic techniques, operating directly in the physical world. In both
cases, current data from the physical plant being controlled is stored in a
real-time database and then processed by an appropriate algorithm. Only
in the manner with which the two techniques arrive at this control action
do they differ radically. The ability to generalize, i.e., to extrapolate
when faced with a new situation, is a feature common to both.
Evolving from very different origins, fuzzy and neural controllers developed independently by researchers with very different backgrounds and very different objectives. Scant thought was given to the
193
Chapter 14
194
possibility of combining the two at the time. It did not take much time,
however, for control engineers to realize that the operations of a fuzzy
controller could be implemented to advantage with artificial neural networks, which, because of their inherent parallelism and their superior
computational speed, could lead to controllers capable of significantly
higher bandwidth as required in a number of critical situations.
Neuro-fuzzy control has been the subject of numerous books and
it is beyond the scope of this book to delve in depth into the various architectures that have been proposed. This chapter presents a brief introduction on how the two techniques can be combined and how the fuzzy
controller algorithm can be implemented with artificial neural networks.
A number of neuro-fuzzy controller architectures have been proposed, each with features that make them suitable for specific applications. Considering fuzzy and neural elements as distinct entities, it is
possible to construct a controller structured in layers, some of which are
implemented with neural elements and others with fuzzy elements. A
fuzzy element can, for instance, act as supervisor to a neural element that
controls some conventional industrial three-term controller.
The following characteristics of ANNs are useful in implementing fuzzy controllers: they
Neuro-Fuzzy Control
195
Chapter 14
196
d1
y1
dm
ym
Layer 4
Layer 3
Layer 2
Layer 1
u1
u2
un
Neuro-Fuzzy Control
197
to map the desired membership functions. The nodes in the third layer
perform the same function as the knowledge base in a fuzzy controller,
while the connections between the second and third layers correspond to
the inference engine in a fuzzy controller. The nodes in the third layer
map the membership functions of the output variables. In the fourth and
final layer, there is only one node for the output of the network and a
node from which the training sets are introduced to the network.
The various neurons of each ANN are shown as nodes in Figure
14.1 and have properties which depend on the layer to which they belong. The relation between the inputs and output of an elemental neuron
is, as before, simply:
p
i=1
wi ui where y = f()
where y is the output, ui are the inputs, is the weighted sum, wi the synaptic weights, and f() the non-linear (compression) function of the elemental neuron. There are p inputs and p+1 synaptic weights for each
neuron to account for the bias term.
In the first layer, each neuron distorts the weighted sum of the
inputs so that it corresponds to the membership function. For example, if
the fuzzy set is Gaussian, then
=-
(xi ij ) 2
s ij
and f()= e
where ij are the centers and sij the standard deviations of the membership functions. Here, the synaptic weights of the first layer of the network must be equal to the centers of the membership functions, i.e., wij=
ij. Using Mamdanis fuzzy compositional rule for instance, the nodes in
the second layer of the controller perform the AND operator (i.e., min) in
which
=min(u1, u2.up) and f()=
The neurons in the third layer perform the OR operator required
in the final stage of the fuzzy compositional rule. Here the synaptic
weights in this layer are unity and
Chapter 14
198
p
and f()=min(1,).
i =1
The fourth layer of the network possesses two sets of nodes. The
first set is required for de-fuzzification and in the case where the fuzzy
sets of the output are also Gaussian then the synaptic weights of these
nodes and the non-linear compression function are defined by
sij u i
The second set of nodes in this layer transfer the elements of the
training sets to the network in a reverse direction, i.e., from the output to
the input of the network and here i = di.
The training of the network is performed in two phases, at the
end of which the parameters (ij,sij) of the neurons in the first and third
layer are determined. During this phase, the network also learns the control rules, storing this knowledge in the synaptic weights of the connections between the second and third layer.
Neuro-Fuzzy Control
LO
199
HI
OK
ui
Figure 14.2 Fuzzy sets of the input variables
Furthermore, assume that the knowledge base comprises five rules distributed in control space (i.e., FAM) as shown in the tile diagram of Figure 14.3.
u2\u1
HI
LO
R1: OK
HI
R2: HI
R3: OK
OK
LO
OK
R4: LO
R5: OK
Chapter 14
200
R1
1
R2
R3
3
y
R4
R5
u
1
u
2
Given the membership values for each input, the nodes in the second layer compute the degree of fulfillment of each rule, as shown in
Figure 14.4. For the given input values, only rules R3 and R5 are fired
and the corresponding degrees of fulfillment are 0.2 and 0.5. Figure 14.5
shows the neuro-fuzzy controller with two inputs, five rules and one output. The five rules in the knowledge base are embodied in the second
layer. The connections between the nodes in this layer and the next are
determined by the rules. Thus, for example, the node corresponding to
rule R3 has connections from the nodes representing the fuzzy sets OK
and OK respectively while the node for rule R5 is linked to the nodes HI
and LO of the first layer.
Neuro-Fuzzy Control
201
Output
De-fuzzification
LO:OK:HI
R1:R2:R3:R4:R5
Rules
Input Fuzzy
Sets
LO:OK:HI
u1
u2
The outputs of the nodes of the second layer are the degrees of fulfillment of each rule. The fuzzy sets of the contributions from each rule
that has fired are combined (using the union operator) in the third layer
and finally the fourth and final layer performs the task of de-fuzzifying
the output fuzzy set to yield a crisp output at the output of the neurofuzzy controller.
Chapter 15
Evolutionary Computation
The design of intelligent controllers based on unconventional control
techniques will undoubtedly become increasingly common in the near
future and these developments will rely heavily on the use of the stochastic methods of Soft Computing in seeking optimum results. These
hybrid methods offer a new and very exciting prospect for Control Engineering, leading to solutions to problems that cannot be solved by conventional analytical or numerical optimization methods.
Although stochastic methods of optimization are computerintensive, the impressive progress that has been observed in computer
hardware over the past decades has led to the ready availability of extremely fast and powerful computers that make stochastic techniques
very attractive. One of the ascending techniques of Intelligent Control is
the fusion of Fuzzy and Neural Control with Evolutionary Computation.
Evolutionary Computation is a generic term for computational
methods that use models of biological evolutionary processes for the solution of complex engineering problems. The techniques of Evolutionary
Computation have in common the emulation of the natural evolution of
individual structures through processes inspired from natural selection
and reproduction. These processes depend on the fitness of the individuals to survive and reproduce in a hostile environment. Evolution can be
viewed as an optimization process that can be emulated by a computer.
Evolutionary Computation is essentially a stochastic search technique
with remarkable abilities for searching for global solutions.
203
204
Chapter 15
Evolutionary Computation
205
206
Chapter 15
Evolutionary Computation
207
Genetic Algorithms
Evolutionary Strategies
Evolutionary Programming
Classifier Systems
Genetic Programming
Chapter 15
208
methods, such as Genetic Algorithms that are not bound by such constraints.
Evolutionary Computation
209
Chapter 15
210
the first uses penalties (solutions which violate the constraints are penalized and their respective fitness function
values are reduced) and
the second uses a mapping of the candidate solutions with
simultaneous use of the exploration operators (recombination and mutation).
Evolutionary Computation
211
Chapter 15
212
15.4.1 Initialization
An initial population of N candidate solutions (one for each of the N unknowns) is created and for every solution/individual/chromosome xi the
corresponding objective function value i is evaluated. Alternative methods for the creation of the initial population or part of it, is through statistical analysis of the search space or through heuristic reasoning.
15.4.2 Decoding
The N candidate solutions of the optimization problem are converted into
binary strings of length L that are used to represent real numbers as follows:
000.0 = minimum value of the parameter
000.1 = minimum value of the parameter + q20
00010 = minimum value of the parameter + q21
Evolutionary Computation
213
lutions. Thus the string 000 000 represents the solution (0, 0), the string
000 001 the solution (0,1), the string 111 111 the solution (7,7), etc.
Following accepted terminology, the binary string is named a
genotype, the decoded information the phenotype, while every individual
solution is a chromosome.
Chapter 15
214
fi =
i
N
j =1
Q2=
and
Q1*=
Q2*=
and
In string Q1 the digits to the right of the crossover point are exchanged with these of the second string Q2, while the opposite is done
with the digits of the second string. Crossover can be performed at one
Evolutionary Computation
215
or more points that are selected randomly. An alternative form of crossover is uniform crossover where every digit of every offspring has equal
probabilities of being taken from either parent. The frequency with
which the crossover operator acts on the candidate solutions depends on
some pre-defined crossover probability pcross[0, 1]. Practical values of
the crossover probability are in the range [0.6-0.95], while techniques
have been proposed where the same search process adapts the crossover
probability.
During mutation, a random bit that is selected with some predefined mutation probability pmut, takes on values of 0 or 1 at random.
This operation results in an increase in the variability of the population.
Mutation is necessary since potentially useful genetic material may be
lost at specific locations of the generation during previous operations.
For instance, after mutation of the second digit/gene which is chosen
randomly, the string,:
Q1=
is transformed into:
Q1*=
15.4.5 Selection
During selection, N individuals are chosen for survival in the next generation according to their fitness values from a population of candidate
solutions-individuals. Individuals with high fitness values have an increased probability of survival in the next generation/iteration, compared
to those with low fitness values. Many methods of selection have been
proposed but here only the popular roulette-wheel method is considered.
Consider the surface of a roulette wheel that is divided according
to the fitness values, i.e., the angles of every sector of the roulette wheel
are set proportional to the fitness. If the relative fitness values are equal
(an unlikely situation in practice), then the roulette sectors will have
216
Chapter 15
equal angles, implying that there is an equal probability that the roulette
ball will stop in any of the sectors.
Evolutionary Computation
217
lution with low fitness may not be selected for survival in the next generation.
13.13%
25.25%
9.09%
A/A Chromosome
1
011100
2
000011
3
110100
4
010011
TOTAL
Fitness
% Totally
25
9
52
13
99
25.25%
9.09%
52.53%
13.13%
100%
52.53%
218
Chapter 15
Evolutionary Computation
219
1
0.8
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-1
-0.8
-0.6
-0.4
-0.2
0.2
0.4
0.6
0.8
Chapter 15
220
1
0.8
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-1
-0.5
0.5
2.5
1.5
0.5
10
20
30
40
50
60
Evolutionary Computation
221
Chapter 15
222
t e dt or
e 2 dt
where T. These are the familiar ITAE and ISE criteria respectively.
Alternatively some criterion which involves overshoot, steady state error
and rise time could be used.
N = ( n i + 1) n i +1
i =0
Evolutionary Computation
223
they do not require specific knowledge or derivative information of the objective function
discontinuities, noise or other unpredictable phenomena
have little impact on the performance of the method
they perform in parallel in the solution space, exploring
the search space with simultaneous exploitation of the
information derived and they do not become entrapped
in local optima
they have good performance in multidimensional largescale optimization problems and
they can implement in many different optimization problems without big changes in their algorithmic structure.
The main disadvantages of GAs are that they:
face some difficulties in locating the precise global optimum, although it is easy for them to locate the vicinity
where the global optimum exists and
require a great number of evaluations of the objective
function and therefore require considerable computational power.
224
Chapter 15
Chapter 16
Simulated Annealing
Simulated Annealing, which has much in common with Evolutionary
Computation, is a derivative-free stochastic search method for determining the optimum solution in an optimization problem. The method was
proposed by Kirkpatrick et al. in 1983 and has since been used extensively to solve large-scale problems of combinatorial optimization, such
as the well-known traveling salesman problem (TSP), the design of
VLSI circuitry and in the design of optimum controllers. The main difference between Evolutionary Computation and Simulated Annealing is
that the latter is inspired by the annealing process for metals during cooling, while the former is based on evolutionary processes.
The principle of annealing is simple: at high temperatures the
molecules in a metal move freely but as the metal is cooled gradually
this movement is reduced and atoms align to form crystals. This crystalline form actually constitutes a state of minimum energy. Metals that are
cooled gradually reach a state of minimum energy naturally, while if
they are forcibly cooled they reach a polycrystalline or amorphous state
whose energy level is significantly higher. Metals that are annealed are
pliable while the latter are brittle.
However, even at low temperatures there exists a small, but finite probability that the metal will enter a state of higher energy. This
implies that it is possible that the metal will leave the state of minimum
energy for a new state where the energy is increased. During the cooling
process, the intrinsic energy may rise or drop but as the temperature is
lowered the probability that the energy level will increase suddenly is re225
Chapter 16
226
duced. The probability that a change in the state of the metal at some
temperature T and initial energy level E1 to some other state with energy
level 2 is given by:
p=e
( E2 E1 )
T
if 2>1
=1 otherwise
Simulated Annealing
227
p(k ) = e
T (k )
otherwise go to step 7,
6. set x1=x2 and (x1)=(x2) and weight the current simulated temperature with the coefficient , where 0<<1, decreasing the
simulated temperature successively at every iteration, so that at
the (k+1)st iteration:
T(k+1) = T(k),
where k is the iteration index,
7. if the current simulated temperature is lower or equal to the final
temperature, i.e., T(k) Tfinal, then accept the current solution
vector as being optimum, otherwise return to Step 3 and repeat
the process.
If the Simulated Annealing algorithm is to succeed, it is important
that the temporal annealing strategy that is followed, i.e., the simulated
temperature profile, be suitable. The rate at which the simulated temperature is decreased depends on the weighting coefficient . Too high a
simulated cooling rate leads to non-minimum energy solutions, while too
low a cooling rate leads to excessively long computation times. The
closer the value of is to unity, the slower simulated temperature decreases. Figure 16.1 shows the probability of acceptance of the solution
p(), as a function of the iteration index for different values of . In order
to achieve effective exploration of the search space, it is advisable to use
0.95<<0.98. Finally, as in Evolutionary Computation, the trajectory of
an optimization problem is critically dependent on the initial estimates of
the optimum solutions that are heuristic or the result of statistical analysis.
Chapter 16
228
p()
1
=0.5
=0.8
=0.95
10
19
28
37
46
55
64
73
82
Simulated Annealing
229
Chapter 16
230
1
0.8
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-1
-0.5
0.5
2.5
1.5
0.5
0
0
50
100
150
200
250
300
350
Simulated Annealing
231
1
0.8
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
0
50
10
15
20
25
30
35
1
0.8
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
0
50
10
15
20
25
30
35
232
Chapter 16
u = K p e + Ki e( )d
0
Here e is the error between the desired and the real output and u is
the control variable. The unknown parameters of the industrial controller
are the gains Kp and Ki whose optimum values are sought. One way of
determining the best gain pair is to use classical tuning methods such
as those of Ziegler and Nichols or modern tuning techniques such as
those of Persson and Astrom (see Bibliography in chapter 18). These
methods (i) assume a simplified dynamic model of the plant and (ii) use
heuristics to arrive at the best parameters instead of an analytical error
criterion. Here in contrast, an analytical criterion is used directly and the
optimum pair is determined using stochastic techniques
Simulated Annealing
233
Using the ITAE criterion it is desired to obtain the values of the parameter pair (Kp,Ki), which minimize the objective function (i.e., error
criterion):
()= ITAE =
t e(t ) dt
T
234
Chapter 16
Figure 16.8 shows the evolution of the parameter pair (Kp,Ki) of the
industrial controller. It is noted that convergence is achieved, whatever
the initial values of the unknown parameters. Finally, the step response
of the closed-loop system is shown in Figure 16.9. This response must be
compared with that of Figure 14.6 for the non-optimized neural controller. A cursory glance will confirm that the response of this system is superior.
Chapter 17
Evolutionary Design of
Controllers
The criteria used in the design of control systems, better known as objective or cost functions, are normally formulated in terms of analytical
functions. In practice, multiple engineering objectives are often difficult
to express in closed analytical form and great effort is spent trying to
find suitable expressions that result in acceptable system performance. In
industrial three-term controller design, for instance, the optimum parameters of the controller must satisfy not only specific closed system
specifications but may also involve economical, ecological, production
and other engineering factors. These multiple objectives are difficult to
formulate analytically, conflicting and impossible to satisfy simultaneously.
Controller design with multiple objectives can be attempted using a composite objective function in which the various objectives are
assigned weights or penalties and the design problem is transformed into
a nonlinear optimization problem. Nonlinear programming is the traditional method for obtaining numerical solutions to this problem, but
there is no guarantee that the procedure will reach a global optimum. The
problem is compounded if the parameter search space is bounded. Stochastic optimization using Evolutionary Programming or Simulated Annealing is an attractive alternative when numerical solutions are required
and significant inroads in its use have been made in recent years.
236
Chapter 17
Stochastic optimization with a qualitative measure of performance of a closed system, instead of quantitative terms, offers distinct advantages in controller design to the Control Engineer as he is able to235
relate to the design problem directly in linguistic terms rather than through
some abstract analytical formulation.
237
that was described in Chapter 15. The main difference here is that the
evaluation of fitness does not follow the classical approaches, but is derived from a set of linguistic rules that express the multiple engineering
objectives of the problem. The consequent of each fuzzy rule is taken as
the objective function that can take m fuzzy linguistic values from the
set:
w = {w1, w2 wm}
Assume also that the array
a = {a1, a2 am}
is the set of parameters, which consist of the antecedents, and
vi = {vi1 , vi2 viq}
is the set of q fuzzy values of the variable ai. Then, the linguistic rules
that specify the fitness function in the Evolutionary Algorithm take the
form:
R: IF a1 is v1i AND a2 is v2i AND a3 is v3i THEN is wi
The total number of design rules is thus equal to a1*n1+a2*n2++ak*nk.
238
Chapter 17
(a) Rise_Time
(b) Overshoot
(c) Settling_Time
239
240
Chapter 17
(d) Fitness
Figure 17.1 (continued) Fuzzy sets used in the qualitative design technique
241
242
Chapter 17
Tref
C
Greenhouse
243
244
Chapter 17
The fuzzy sets of the three attributes that form the inputs to the
inference engine are assumed to be triangular while the fuzzy sets of
the suitability function are Gaussian. The fuzzy sets are shown in
Figure 17.1. In deriving the control surface, use is made of the
Mamdani min-max compositional inference rule. De-fuzzification uses
the Center of Gravity (COG). A simple Genetic Algorithm, which
follows an elitist strategy, is finally used to obtain the global optima of
the controller parameters. It is observed that fitness decreases with
increasing overshoot and increasing rise time.
ITAE
245
E-F
0.8
0.6
0.4
0.2
10
15
20
25
30
35
40
45
50
246
Chapter 17
E-F
Chapter 18
Bibliography
A. Computational Intelligence
Eberhart R. C., Dobbins R. C. and Simpson P. K. (1996) : Computational Intelligence PC Tools, AP Professional.
Kaynak O. (1998) : Computational Intelligence: Soft Comnputing and
Fuzzy-neuro Integration with Applications, Springer-Verlag,
Berlin.
Palaniswani M., Attikiouzel Y. and Marks R. (Eds) (1996) :
Computational Intelligence - a dynamic systems perspective, IEEE
Press, NY.
Pedrycz W. (1997) : Computational Intelligence - an Introduction, CRC
Press.
Poole D., Mackworth A. and Goebel R. (1998) : Computational
Intelligence, Oxford University Press, Oxford.
Reusch B. (Ed). (1999) : Computational Intelligence: Theory and
Applications, Springer-Verlag, Berlin.
Tzafestas S. G. (Ed.) (1999) : Computational Intelligence in Systems and
Control: Design and Applications, Kluwer Academic Publications, Hingham, Ma.
247
248
Chapter 18
B. Intelligent Systems
Antsaklis P. J., Passino K. M. and Wang S. J. (1989) : Towards
intelligent autonomous control systems: architecture and fundamental issues, Journal of Intelligent and Robotic Systems, Vol. 1,
pp. 315-342.
Bernard J. (1988) : Use of rule-based systems for process control,
IEEE Control Systems Magazine, Vol. 8, No. 5, pp. 3-13.
Bigger C. J. and Coupland J. W. (1982) : Expert Systems : a
bibliography, IEE Publications, London.
Chiu S. (1997) : Developing Commercial Applications of Intelligent
Control, IEEE Control Systems Magazine, April, pp. 94-97. 247
Francis J. C. and Leitch R. R. (1985) : Intelligent knowledge based
process control, Proc IEE Conference on Control, London.
Harris C. J., Moore C. G. and Brown M. (1993) : Intelligent Control,
Aspects of Fuzzy Logic and Neural Nets, World Scientific, Singapore.
Saridis G. N. (1979) : Towards the realization of intelligent control,
Proc IEEE, Vol. 67, No. 8, pp. 1115-1133.
Saridis G. N. and Valavanis K. P. (1988) : Analytical design of
intelligent machines, Automatica, Vol. 24, No. 2, pp. 123-133.
Saridis G. N. (1996) : On the theory of intelligent machines: a
comprehensive analysis, Int. Journal of Intelligent Control and
Systems, Vol. 1, No. 1, pp. 3-14.
Tzafestas S. G. (Ed.) (1993) : Expert Systems in Engineering
Applications, Springer-Verlag, Berlin.
Tzafestas S. G. (Ed.) (1997) : Methods and Applications of Intelligent
Control, Kluwer Academic Publishers, Hingham, Ma.
Tzafestas S. G. (Ed.) (1997) : Knowledge Based Systems Control, World
Scientific, Singapore.
Valavanis K. and Saridis G. N. (1992) : Intelligent robotic system
theory: design and applications, Kluwer Academic Publishers,
Hingham, Ma.
Bibliography
249
250
Chapter 18
Bibliography
251
252
Chapter 18
Bibliography
253
254
Chapter 18
H. Evolutionary Algorithms
Angeline P. J., Saunders G. M. and Pollack J. B. (1994) : An evolution
algorithm that constructs recurrent neural networks, IEEE Trans
on Neural Networks, Vol. 5, No. 1, pp. 54-65.
Back T., Hammel U. and Schwefel H-P. (1997) : Evolutionary
Computation: Comments on the History and Current State, IEEE
Trans on Evolutionary Computation, Vol. 1, No. 1, pp 3 - 17.
(contains over 220 references on Evolutionary and Genetic Algorithms).
Dasgupta D. and Michalewicz Z. (Eds) (1997) : Evolutionary Algorithms
in Engineering, Springer Verlag, Berlin.
Davis L. (1991) : Handbook of Genetic Algorithms, Van Nostrand, NY.
DeGaris H. (1991) : GenNETS - Genetically programmed neural nets,
Proc. IEEE Intl. Joint Conf. on Neural Networks, Singapore.
Bibliography
255
256
Chapter 18
Bibliography
257
Appendix A
Case Study:
Design of a Fuzzy
Controller using MATLAB
This Appendix considers a case study for the design of a generic fuzzy
controller for the control of a simple, yet representative process. The dynamic process exhibits nonlinear behavior and response asymmetry, for
which it is desired to compensate. The objective is to show the reader the
step-by-step procedure that must be followed and the ease with which it
is possible to examine the performance of the resultant fuzzy controller
using MATLAB and its Simulink and Fuzzy Toolboxes.
The steps in the design procedure are explained in sufficient detail so that the advantages and disadvantages of fuzzy control over conventional three-term control can be evaluated. The case study includes a
comprehensive study of the effects of the choice of fuzzy sets on the performance of the closed system. The case study is based on the example
given in the book by Gulley and Roger Jang (1995) on the use of the
MATLAB Fuzzy Toolbox.
259
260
Appendix A
Inflow
Level sensor
261
262
Appendix A
263
264
Appendix A
-1
265
266
Appendix A
three fuzzy sets LOw, OK and HIgh are used for the input variables for
simplicity.
267
268
Appendix A
269
270
Appendix A
Figure A.10(c) for instance, the fuzzy set Positive_Small has been
shifted to the left with the consequence that the control action for small
positive errors in the liquid level is greater than that for small negative
errors. Thus for small discrepancies in the liquid level about the nominal
level, the rate with which the valve is changed is increased when the tank
is filling and decreased when it empties. This leads to compensation of
response asymmetry.
A.9 Conclusions
It should have become clear that altering the shape of the fuzzy sets of
the controller does not lead to major changes in the control surface. This
is evident in Figures A.7(c) to A.11(c). In cases and , the control surfaces shown in Figures A.7(c) and A.8(c) are almost flat in the dead-zone
due the triangular nature of the fuzzy sets of both the inputs and the output. The corresponding step responses are shown in Figures A.11(a) and
A.11(b) are unsatisfactory because their steady-state error is non-zero
and response asymmetry is severe. It is noted, also, that in these two
cases, both the triangular fuzzy sets with a large support set and the singletons have comparable step responses. In contrast, in cases C, D and E
the control surfaces are smooth because of the smooth (Gaussian) shape
of the fuzzy sets of the controller inputs. The corresponding step responses are seen to be superior. In cases D and E (see Figures A.11(d)
and B.11(e)) the step responses are almost symmetric. Finally, in the last
three cases the steady-state errors are essentially zero and overshoot is
negligible. Case E appears to be the best as it demonstrates symmetric
response, zero steady-state error and no overshoot.
As was seen in all five cases, the closed system step response is
influenced significantly by the shape of the fuzzy sets of the inputs and
to a lesser extent by the fuzzy sets of the controller output. In general,
Gaussian fuzzy sets have smoother control surfaces, implying smoother
control actions and improved responses. The best shapes of the fuzzy
sets are not generally known and are the subject of ongoing research.
271
272
Appendix A
CASE B
273
274
Appendix A
CASE D
275
CASE E
276
Appendix A
277
278
Appendix A
Appendix B
280
Appendix B
281
end;
avg_obj(i+1)=avg_obj(i+1)/popsize;
if(best_cur_obj > best_obj(i)) % Apply Elitist
Strategy
phen(index1,:) = best_phen;
gen(index1,:) = best_gen;
object(index1) = best_obj(i);
best_obj(i+1) = best_obj(i);
elseif(best_cur_obj <= best_obj(i))
best_phen = best_cur_phen;
best_gen = best_cur_gen;
best_obj(i+1) = best_cur_obj;
end;
best_x(i+1)=best_phen(1); % Display evolution
of the best solution on the contour graph
best_y(i+1)=best_phen(2);
hold;
line(best_x,best_y);
for i1=1:2
fprintf(1,'%f ',best_phen(i1));
end;
fprintf(1,'---> %f\n',best_obj(i+1));
fprintf('\n');
fprintf(1,'BEST : %f WORST : %f AVG : %f
\n',best_obj(i+1),worst_obj(i+1),avg_obj(i+1));
end
xx=1:maxgen+1; % Display evolution of objective
functions for the worst, average and best
solutions
figure(2);
plot(xx,best_obj,xx,worst_obj,xx,avg_obj);
grid;
% File init.m - This function creates a random
population
function phen=init(vlb,vub, siz, sea)
for i=1:siz
phen(i,:)=(vub-vlb).*rand(1, sea) + vlb;
end
% File score.m - This function computes the fitness
and the objective function values of a population
function [fitness, object]=score(phen, popsize)
for i=1:popsize
282
end
Appendix B
object(i)=phen(i,1)^2+phen(i,2)^20.3*cos(3*pi*phen(i,1))0.4*cos(4*pi*phen(i,2))+0.7;
fitness(i)=1/(object(i)+1);
283
284
Appendix B
bits_index = 1:length(bits);
for i=bits_index,
bit_count = bit_count + bits(i);
b2_index = [b2_index bit_count];
end
for i=1:max(bits),
r = rem(b10,2);
b2(:,b2_index) = r;
b10 = fix(b10/2);
tbe = find( all(b10==0) | (bits(bits_index)==i) );
if ~isempty(tbe),
b10(:,tbe) = [];
b2_index(tbe) = [];
bits_index(tbe) = [];
end
if isempty(bits_index),
return
end
b2_index = b2_index-1;
end
Appendix C
Simulated Annealing
Algorithm
% Main_Program sa.m
Tinit=120; % Initial Simulated Temperature
l=0.98; % Temperature Decrement Parameter
Tfinal=0.00001; % Final Temperature
% Computation and Display of objective Function
Contour
x=-1:0.1:1;
y=-1:0.1:1;
[x1,y1]=meshgrid(x,y);
z1=x1.^2+y1.^2-0.3*cos(3*pi*x1)-0.4*cos(4*pi*y1)+0.7;
figure(1);
contour(x,y,z1);
Tcur=Tinit; % Initialize Simulated Temperature
x1=-1 + 2*rand; % Select First Solution (x1, x2)
x2=-1+2*rand;
z(1)=x1^2+x2^2-0.3*cos(3.*pi*x1)0.4*cos(4*pi*x2)+0.7;
r1(1)=x1;
r2(1)=x2;
i=1;
while Tcur>Tfinal % Start of Simulated Annealing Loop
285
286
Appendix C
287
Appendix D
Network Training
Algorithm
% Main_Program net.m
P=[0.8 0.8; 0.8 0; 0.8 -0.8; 0.3 0.3;
0.3 -0.3; 0
0.8; 0
0; 0
-0.8;
-0.3 0.3; -0.3 -0.3; -0.8 0.8; -0.8 0;
-0.8 -0.8];
T=[1 0.55 0 0.35 0 0.55 0 -0.55 0 -0.35 0
-0.55 -1];
[R,Q] = size(P); S1 =2; [S2,Q] = size(T);
[W10,B10] = rands(S1,R); Randomize network parameters
W20 = rands(S2,S1)*0.5; B20 = rands(S2,1)*0.5;
disp_freq = 20;
max_epoch = 9999; epoch limit
err_goal = 0.01; error measure limit
lr = 0.01; learning rate
lr_inc = 1.05; learning increment
lr_dec = 0.7; learning decrement
err_ratio = 1.04; error ratio
mom_const=0.95;
TP = [disp_freq max_epoch err_goal lr lr_inc
lr_dec mom_const err_ratio];
[W10,B10,W20,B20,epochs,TR]=trainbpx(W10,B10,
'purelin',W20,B20,'purelin',P,T,TP) ; training
algorithm with linear neurons in
289
290
Appendix D
both layers
plottr(TR); plot results
W10
; print synaptic weights of first layer
W20
; print synaptic weights of second layer
B10
; print bias of first layer
B20
; print bias of second layer
Index
292
[Evolutionary]
operations, 205
crossover, 206, 214
mutation, 206, 214
recombination (see
crossover)
selection, 206, 215
simulated evolution, 205
optimization, 205, 208
programming, 211
strategies, 211
Expert systems, 13, 49
classification, 32
development, 18
diagnosis of malfunctions, 28
elements, 15
energy management, 26
fault diagnosis, 20, 24
fault prediction, 24
implementation, 19
industrial controller
design, 24
LISP machines, 19
need, 17
operator training, 22
paradigms, 20
plant simulation, 22
prediction of emergency
plant conditions, 26
predictive maintenance, 25
product design, 21
production scheduling, 27
representation of
knowledge, 20
shells, 18, 20
supervisory control
systems, 23
tools and methods, 18
Flexible manufacturing systems
(FMS), 21, 28
Fuzzification, 91, 96
Index
degree of fulfillment, 91, 96
graphical interpretation of, 93
Fuzzy:
algorithm, 59
associative memory (FAM),
103, 115
conditional statements, 58
control, 54, 89
algorithm, 89
controllers, 105
coarse-fine, 117
decomposition, 90
embedded, 123
gain-scheduled, 40, 136
generalized three-term, 108
generic two-term, 113
hybrid architectures, 112
integrity, 101
optimization using genetic
algorithms, 221
partitioned architecture, 109
real-time, 119
robustness, 107
Tagaki-Sugeno, 136, 144
three-term, 107
fitness criteria, 236
gain-scheduling, 136, 146
implications, 78
Boolean, 78
GMP, 80
Larsen, 80
Lukasiewicz, 78
Mamdani, 79
Zadeh, 79
inference engine, 71
degree of fit, 71
linguistic variables, 64
logic, 1, 7, 8
algorithm, 59, 74
basic concepts, 54
logic control (FLC) (see also
Fuzzy controllers), 2
293
Index
operators, 60
conjunctive, 72
propositional implication, 71
reasoning, 71, 76
relational matrix, 73
sets, 55, 100
algebraic properties of, 64
choice of, 268
coarseness of, 100
completeness of, 101
linguistic descriptors of, 57
membership function of, 55
operations on, 63
complement, 63, 64
connectives, 69
DeMorgan's theorem, 64
intersection, 63, 64
product, 63
union, 63, 64
shape of, 100
support set of, 56
singletons, 67, 92
systems, 32
variable, 57
universe of discourse of, 55
Gain-scheduled controllers, 40
Generalized:
Modus Ponens (GMP), 77
Modus Tollens (GMT), 77
Genetic algorithms (GAs), 8, 205,
211
fitness functions, 203, 206,
213
initialization, 212
parameters, 217
Hard control, 42
Human:
intelligence, 6
operators, 59
Industrial:
control, 23
controller optimization, 232
Inference engine, 6, 15, 17
effectiveness, 37
quality, 37
Intelligent:
agents, 124
control, 6, 11, 31, 41, 43
autonomy, 45
basic elements, 34
conditions for use, 33
objectives, 34
techniques, 39
controllers, 7, 35
correctness, 10
extendibility, 10
precision, 10
reusability, 10
robustness, 10, 40
systems, 10
acceptance, 37
architecture, 46
design tools and methods,
18
distributed architecture, 47
efficiency, 37
hierarchical structure, 46
Knowledge:
base, 76
based systems, 13, 48
embedded, 193
empirical, 33
engineering, 37
and experience, 31
heuristic, 135
Learning machines, 154
Linguistic:
controller, 261
descriptors, 57
294
[Linguistic]
rule matrix, 186
rules, 8, 14, 16, 20, 32, 59
values, 57
variables, 57
Mamdani, 1, 79, 84, 111
Membership function, 55
generic S, 66
generic , 67
Model-based fuzzy control (see
also Tagaki-Sugeno
controllers), 135, 136
Modern control, 3
Multi-level relay controller, 111
Neural:
control, 51, 153, 160
learning and adaptation, 161
parallel processing, 161
rule-based, 181
controllers, 160
architectures, 162
indirect learning, 166
inverse model, 164
specialized training, 165
design using genetic
algorithms, 222
fidelity, 163
indirect training of, 166
inverse model of, 164
multi-variable, 161
properties of, 161
rule-based, 181
network training algorithms,
169
back-propagation (BP), 169,
176
flow chart, 180
Delta, 173
least mean squares (LMS),
171
Index
multi-layer, 175
supervised learning, 169
unsupervised learning, 169
Widrow-Hoff, 170
Neuro-fuzzy control, 8, 51, 193
architectures, 194
isomorphism, 195
fuzzification of neural
controllers, 195
neuralization of fuzzy
controllers, 195
Numerical Fuzzy Associative
Memory (NFAM), 187
Perceptron, 154
Procedural knowledge, 16
Real-time:
expert systems, 26
execution scheduler, 124
fuzzy control, 119
Relational algorithm, 7
Representation of knowledge, 20
Response asymmetry
compensation, 269
Rule:
composition, 82
conflict, 102
encoding, 182
granularity, 116
Rule-based:
neural control, 181
network training, 183
Saridis' principle, 10, 46
Shallow knowledge, 18, 24, 32
Simulated annealing, 8, 225
Metropolis algorithm, 226
optimization:
constrained, 229
industrial controller, 232
295
Index
Soft:
computing, 7, 41, 42, 154, 203
control, 42
Supervisory fuzzy controllers, 120
de-fuzzifier, 120
fuzzifier, 120
inference engine, 120
knowledge-base, 120
real-time data base, 120
Symbolic representation, 9
Synaptic weights, 156
Tagaki-Sugeno controllers (see
also Model-based
controllers),
136, 144
first approach, 136
fuzzy control law, 141