Unit 3 Introduction To Fuzzy System: Structure

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Introduction to

UNIT 3 INTRODUCTION TO FUZZY SYSTEM Fuzzy System

Structure
3.1 Introduction
Objectives
3.2 Fuzzy Membership Function
3.2.1 Intuition
3.2.2 Inference
3.2.3 Rank Ordering
3.2.4 Angular Fuzzy Sets
3.2.5 Neural Networks
3.2.6 Genetic Algorithm
3.2.7 Inductive Reasoning
3.3 Fuzzy Rules and their Operations
3.3.1 Fuzzy IF-THEN Rules
3.3.2 Fuzzy Logic Rule Base
3.3.3 Evaluation of Fuzzy IF-THEN Rules
3.4 Application of Fuzzy Logic in Flexible Manufacturing System (FMS)
3.5 Summary
3.6 Key Words
3.7 Answers to SAQs

3.1 INTRODUCTION
As the complexity of a system increases, our ability to make precise and yet significant
statements about its behavior diminishes until a threshold is reached beyond which
precision and significance become almost mutually exclusive characteristics. Zadeh’s
principle of incapability suggests complexity and ambiguity are correlated: “The closer
one looks at a real-world problem, the fuzzier becomes its solution”. For system with
little complexity, hence little uncertainty, closed from mathematical expressions provides
precise descriptions of the system. Systems that are little more complex, but significant
data exist, are modeled by methods such as artificial neural networks. Finally, for the
most complex systems where few numerical data exist and where only ambiguous or
imprecise information may be available, fuzzy reasoning provides a way to understand
system behavior by allowing us to interpolate approximately between observed input and
output situations. The imprecision in fuzzy models is therefore generally quite high.
Fuzzy systems can implement crisp inputs and outputs, and in this case produce a
nonlinear functional mapping just as algorithms do. Fuzzy set theory provides a means
for modeling the kind of uncertainty associated with vagueness, with imprecision, and/or
with a lack of information regarding a particular element of the problem on hand. The
underlying power of fuzzy set theory is that it uses linguistic variables, rather than
quantitative variables, to represent imprecise concept. The incorporation of fuzzy set
theory and fuzzy logic into computer models has shown tremendous payoff in areas
where intuition and judgment still play major roles in the model. Control applications,
such as process control in computer integrated manufacturing, traffic control, temperature
control, are the most prevalent of current fuzzy logic applications. The notion of set
membership is central to the representation of objects within a universe by sets defined
on the universe. Classical set contain objects that satisfy precise properties of
membership; fuzzy sets contain objects that satisfy imprecise properties of membership,
i.e. membership of an object in a fuzzy sets can be approximate. To elaborate, suppose
we have an exhaustive collection of individual elements x, which make up a universe of
information X. Further various combinations of these individual elements make up sets,
say A, on the universe.
39
Basics of Artificial For crisp sets an element x in the universe X is either a member of some crisp set A or it
Intelligence Tools is not. This binary issue of membership can be represented mathematically with the
indicator function. Zadeh extended the notion of binary membership to accommodate
various degrees of membership in a real continuous interval [0, 1], where the endpoints
of 0 and 1 confirm to no membership and full membership, respectively, just as indicator
function does for crisp sets, but where the infinite number of values in between the
endpoints can represent various degrees of membership for an element x in some set on
the universe. There are various methods viz. Intuition, Inference, Rank ordering, Angular
fuzzy sets, Neural networks, Genetic algorithms, Meta rules etc. that are being used to
develop membership function.
In the field of machine intelligence there are various ways to represent knowledge.
Perhaps the most common way to represent human knowledge is to form it into natural
language expression of the type.
IF premise, THEN conclusion . . . (3.1)
This form is commonly referred to as the IF-THEN rule-based form. The subjectivity that
exists in fuzzy modeling is a blessing rather than a curse. The vagueness present in the
definition of terms is consistent with the information contained in the conditional rules
developed by the practitioner while observing some complex process. Even though the
set of linguistic variables and their meanings is compatible and consistent with the set of
conditional rules used, the overall outcome of the qualitative process is translated into
objective and quantifiable results. Fuzzy mathematical tools and the calculus of fuzzy IF-
THEN rules provide a most useful paradigm for the automation and implementation of an
extensive body of human knowledge therefore not embodied in the quantitative modeling
process. These mathematical tools provide a means of sharing, communicating, and
transferring this human subjective knowledge of system and processes. The rule based
system is distinguished from classical expert systems in the sense that the rule
comprising a rule based system might derive from sources other than human expert, and
in this context are distinguished from expert system.
Objectives
After studying this unit, you should be able to
• understand fuzzy membership functions,
• describe fuzzy rules and their operations, and
• explain fuzzy logic applications.

3.2 FUZZY MEMBERSHIP FUNCTION


Membership function characterizes the fuzziness in a fuzzy set – whether the elements in
the set are discrete or continuous – in a graphical form for eventual use in the
mathematical formalism of fuzzy set theory. But the shapes used to describe the fuzziness
have very few restrictions indeed. It might be claimed that the rules used to describe
fuzziness graphically are also fuzzy. Nevertheless, as with any formal mathematical
structure, some standard terms related to the shape of membership functions have been
developed over the years, and these terms are defined here, just as there are an infinite
number of ways to characterize fuzziness, there are an infinite number of ways to
graphically depict the membership functions that describe fuzziness. Since the
membership function essentially embodies all fuzziness for a particular fuzzy set, its
description is the essence of a fuzzy property or operation. Because of the importance of
the “shape” of the membership function, a great deal of attention has been focused on the
development of these functions.
The core of membership function for some fuzzy set A is defined as that region of the
universe that is characterized by complete and full membership in the set A. That is, the
core comprises of those elements x of the universe such that μ A ( x ) = 1 .

40
The support of a membership function for some fuzzy set A is defined as that region of Introduction to
the universe that is characterized by non-zero membership in the set A. That is, the Fuzzy System
support comprises of those elements x of the universe such that μ A ( x ) > 0 .
The boundaries of a membership function for some fuzzy set A are defined as that region
of the universe containing elements which have a nonzero membership but not complete
membership. That is, the boundaries comprise of those elements x of the universe such
that 0 < μ A ( x ) < 1 . These elements of the universe are those with some degree of
fuzziness, or only partial membership in the fuzzy set. Figure 3.1 illustrates typical
normal and subnormal fuzzy sets.

Membership
value Core

0 x

support
Boundary
Boundary

Figure 3.1 : Core, Support and Boundaries of a Fuzzy Set

There are possibly more ways to assign membership values of functions to fuzzy
variables than there are to assign probability density function to random variables. This
assignment process can be intuitive or it can be based on some algorithmic or logical
operations. Some of the algorithms are as follows :
• Intuition
• Inference
• Rank ordering
• Angular fuzzy sets
• Neural networks
• Genetic algorithms
• Inductive reasoning
• Soft partitioning
• Meta rules
• Fuzzy statistics
Last two methods listed are not addressed in this unit because of the wealth of
information available in other texts and because of the relative complexity and depth
required to address them adequately.
3.2.1 Intuition
Intuition is simply derived from the capacity of humans to develop membership function
through their own innate intelligence and understanding. Intuitions involve contextual
and semantic knowledge about an issue; it can also involve linguistic truth values about
this knowledge. As an example, consider the membership function for the fuzzy variable
temperature. Figure 3.2 shows various shapes on the universe of temperature as measured
in unit degree Celsius. Each curve is a membership function corresponding to various
fuzzy variables, such as very cold, cold, normal, hot, and very hot. Of course, these
curves are function of context and the analyst developing them.
41
Basics of Artificial
Intelligence Tools

1 Cold Cool W arm Hot

Membership
value

0 20 40 60 80
0
Tem prature C

Figure 3.2 : Membership Function for the Fuzzy Variable “Temperature”


3.2.2 Inference
In the inference method we used knowledge to perform deductive reasoning. That is, we
wish to deduce or infer a conclusion, given a body of facts and knowledge. There are
many forms of this method documented in the literature, but the one we will illustrate
here relates to our formal knowledge of geometry and geometric shapes. In the
identification of triangle, let A, B and C be the inner angles of a triangle, in the
order A ≥ B ≥ C ≥ 0 , and let U, be the universe of triangles, i.e.

U = {( A, B, C ) | A ≥ B ≥ C ≥ 0; A + B + C = 180o } . . . (3.2)
We define a number of geometric shapes that we wish to be able to identify for any
collection of angles fulfilling the constraint given in Eq. (3.2). For this purpose we will
define the following five types of triangles :
• I Approximate isosceles triangle
• R Approximate right triangle
• IR Approximate isosceles and right triangle
• E Approximate Equilateral triangle
• T Other triangles
We can infer membership values for all these triangle prototypes through the method of
inference, because we posses knowledge about geometry that helps us to make
membership assignments. So we shall list this knowledge here to develop an algorithm to
assist us in making these membership assignments for any collection of angles meeting
the constraints of Eq. (3.2).
For the approximate isosceles triangle we have the following algorithm for the
membership, again for the situation of A ≥ B ≥ C ≥ 0 and A + B + C = 180o;
1
μ1 ( A, B, C ) = 1 − min ( A − B, B − C ) . . . (3.3)
60o
So, for example if A = B or B = C, the membership value in the approximate isosceles
triangle is μI = 1; if A = 1200, B = 60o, and C = 0, then μI = 0. For fuzzy right triangle,
μR = 1, or when A = 180o this membership vanishes, i.e. μR = 0. For the case of isosceles
and right angle triangle, we can find this membership function by taking the logical
intersection of the isosceles and right angle triangle membership functions, or
IR = I ∩ R . . . (3.4)
which results in
μ IR ( A, B, C ) = min [μ I ( A, B, C ), μ R ( A, B, C )]

⎡ 1 1 ⎤
= 1 − max ⎢ o min ( A − B, B − C ), o | A − 90o |⎥ . . . (3.5)
⎣ 60 90 ⎦
For the case of fuzzy Equilateral triangle, the membership function is given by
1
μ B ( A, B, C ) = 1 − ( A − C) . . . (3.6)
180o
42
For example when A = B = C, the membership value is μE (A, B, C) = 1; when A = 180o, Introduction to
Fuzzy System
the membership value vanishes, or μE = 0. Finally, for the set of “all other triangles” we
simply invoke the complement of the logical union of the three previous cases.
3.2.3 Rank Ordering
Assessing preferences by a single individual, a committee, a poll, and other opinion
methods can be used to assign membership values to a fuzzy variable. Preference is
determined by pair wise comparisons, and these determine the ordering of the
membership.
3.2.4 Angular Fuzzy Sets
Angular fuzzy sets differ from standard fuzzy sets only in their coordinate description.
Angular fuzzy sets are defined on a universe of angles; hence there are repeating shapes
for every 2 π cycles. In most applications angular fuzzy sets are used in quantitative
description of linguistic variables known as truth values. We can suggest that the variable
“truth” is no different from any other linguistic variable in that it can be described by a
fuzzy set. When a certain position has a membership value of 1 it is said to be true, and
when position has membership value 0 it is said to be false; values in between 0 and 1
corresponds to a proposition being partially true.
We will explain angular fuzzy sets with an example in environmental engineering.
Suppose we measure the pH value of some water samples collected from a polluted pond
and give these pH readings linguistic labels, such as very basic, fairly acidic, etc. to
communicate qualitative information about the pollution. It is well known that a natural
solution has a pH of 7. The linguistic terms can be built in such a way that a “neutral” (N)
π
solution corresponds to θ = 0 rad, “absolutely basic” (AB) corresponds to θ = rad, and
2
π
“absolutely acidic” (AA) corresponds to θ = − rad. Levels of pH between 7 and 0 are
2
labeled as very acidic (VA), acidic (A), fairly acidic (FA), and so on which are
π
represented between θ = 0 and θ = − . Using these linguistic labels for pH, the model
2
of the angular fuzzy set is shown in Figure 3.3.

μ (θ)
θ = 3 π/8 VB
AB
θ = π/4 B
θ = π/2

θ = π/8 FB

θ=0 N

θ = − π/8 FA

θ = − π/4 A
AA

θ = − π/2 θ = − 3 π/2 VA

Figure 3.3 : Angular Fuzzy Sets Defined on the Unit


3.2.5 Neural Networks
A neural network is a massively parallel distributed processor made up of simple
processing units, which has a natural propensity for storing experiential knowledge and
making it available for use. It resembles the brain in two respects :
43
Basics of Artificial • Knowledge is acquired by the network from its environment through a
Intelligence Tools learning process.
• Interneuron connection strengths, known as synaptic weights, are used to
store the acquired knowledge.
We consider here a method by which a membership function may be created for fuzzy
classes of an input data set. We select a number of input data values and divide them into
training data set and a checking data set. The training data set is used to train the neural
network. Let us consider an input training data set as shown in Figure 3.4(a). Table 3.1
shows the coordinate values of the different data points considered. The data points are
expressed with two coordinates each, since the data shown in Figure 3.4(a) represents a
two dimensional problem. The data points are first divided into different classes by
conventional clustering technique.
Table 3.1 : Variable Describing the Data Points to be Used as a Training Data Set

Data Point 1 2 3 4 5 6 7 8 9 10

x1 0.05 0.09 0.12 0.15 0.20 0.75 0.80 0.82 0.90 0.95

x2 0.02 0.11 0.20 0.22 0.25 0.75 0.83 0.80 0.89 0.89

X2 R1 X2

+
+
R2 + +
+ X1 + R2 +
+ + +
+ R2 +

+ +
++ ++
+ R3 +
R1 + R3 +
X2 R1 + R3 +
+ +

X1 X1
(a) (c)
(b)

Data Points
Data Points R1
1 2 ... 14
1 2 ... 14 X1
0 0
NN R2
0.7 0.8
1 0
0.8 0.2
R3 0 1
X2
(d) (f)

(e)

R1

X1 0.1

0.5 NN R2 0.8

0.5
0.1

(g) R3
X2
(i)

(h)

Figure 3.4 : Using Neural Network to Determine Membership Functions


44
μ Introduction to
Fuzzy System
1
0.8

0.1 0.1

0
R1 R2 R3

Region

Figure 3.5 : Membership Function for Data Point (X1, X2 = 0.5, 0.5)
As shown in Figure 3.4(a) the data point have been divided into three regions, or classes
R1, R2, and R3. Let us consider data point 1, which has input coordinate values of x1 = 0.7
and x2 = 0.8 (Figure 3.4(d)). As this is in region R2, we assign to it a complete
membership of one in class R2 and zero membership in class R1 and R3 (Figure 3.4(f)).
Similarly, the other data points are assigned membership values of unity for the classes
they belong to initially. A neural network is created (Figure 3.4(b), 3.4(e), 3.4(h)) that
uses the data point marked 1 and the corresponding membership values in different
classes for training itself to simulate the relationship between coordinate locations and
the membership values. Figure 3.4(c) represents the output of the neural network, which
classifies data points into one of the three regions. The neural network then uses the next
set of data values and membership values to train itself further as seen in Figure 3.4(d).
This repetitive process is continued until the neural network can simulate the entire set of
input-output values. The performance of the neural network is then checked using the
checking data set. Once the neural network is ready, its final version (Figure 3.4(h)) can
be used to determine the membership values of any input data (Figure 3.4(g)) in different
regions (Figure 3.4(i)).
Notice that the points shown in the table in Figure 3.4(i) are actually the membership
values in each region for the data points shown in Figure 3.4(g). These could be plotted
as a membership function, as shown in Figure 3.5. A complete mapping of the
membership of different data points in the different fuzzy classes can be derived to
determine the overlap of different classes.
3.2.6 Genetic Algorithm
Genetic algorithm uses the concept of Darwin’s theory of evolution. Darwin’s theory
basically stressed the fact that the existence of all living things is based on the rule of
“survival of the fittest.” Darwin also postulated that new breeds or classes of living things
come into existence through the process of reproduction, crossover, and mutation among
existing organisms. The benefit of genetic technique is that it searches for a solution from
a broad spectrum of possible solutions, rather than restrict the search to a narrow domain
where the results would be normally expected. Genetic algorithms try to perform an
intelligent search for a solution from a nearly infinite number of possible solutions.
Genetic algorithms can be used to compute membership functions. Given some
functional mapping for a system, some membership functions and their shapes are
assumed for the various fuzzy variables defined for a problem. These membership
functions are then coded as bit strings that are connected. An evaluation function is used
to evaluate the fitness of each set of membership functions. This procedure is illustrated
for a simple problem in the next example.
Let us consider that we have a single input (x) – single output (y) system with
input-output values as shown in Table 3.2. Table 3.3 shows a functional mapping for this
system between the input (x) and the output (y). In Table 3.3 we see that each of the
variables x and y makes use of two fuzzy classes [x uses S (small) and L (large); y uses
L (large) and VL (very large)]. The functional mapping tells us that a small x maps to a
small y, and a large x maps to a very large y. We assume that the range of the variable x is
[0, 5] and that of y is [0, 25]. We assume that each membership function has the shape of
right triangle, as shown in Figure 3.6.
Table 3.2 : Data for a Single Input – Signal Output System
45
Basics of Artificial
Intelligence Tools x 1 2 3 4 5

y 1 4 9 16 25

Table 3.3 : Functional Mapping for the System

x 1 2

y 1 4

The membership function on the right side of Figure 3.6 is constrained to have the right
angle wedge at the upper limit of the range of the fuzzy variable. The membership
function on the left side is constrained to have the right angle wedge on the lower limit of
the range of the fuzzy variable. It is intuitively obvious that under the forgoing
constraints the only thing needed to describe the shape and position of the membership
function fully is the length of the base of the right angle membership functions. We use
this fact in encoding the membership functions as bit strings.
μx

1 S V

0
Base 1 Base 2

Figure 3.6 : Membership Functions for the Input Variables are Assumed to be Right Triangle
The unknown variables in this problem are the lengths of the bases of the four
membership functions (x (S, L) and y (S, VL)). We use six-bit binary string to define the
base of each of the membership functions. These strings are then concatenated to give us
a 24-bit (6*4) string. As shown in Table 3.4, column we start with an initial population of
four strings. These are decoded to the binary values of the variables as shown in
Table 3.4, column 2, 3, 4, and 5. The binary values are mapped to decimal values for the
fuzzy variables using following Equation.
Table 3.4 : First Iteration using a Genetic Algorithm for
Determining Optimal Membership Functions
(2) (3) (4) (5) (6) (7) (8)
(1) Base Base Base Base Base Base Base
String
1 2 3 4 1 2 3
Number String
(bin.
(bin.) (bin.) (bin.)
)
1. 000111 010100 010110 110011 7 20 22 51 0.56 1.59 8.73

2. 010010 001100 101100 100110 18 12 44 38 1.43 0.95 17.46

3. 010101 101010 001101 101000 21 42 13 40 1.67 3.33 5.16

4. 100100 001001 101100 100011 36 9 44 35 2.86 0.71 17.46

(9) (10) (11) (12) (13) (14) (15) (16) (17)


Expected Actual
Base 4 y’ (x = 1) y’ (x = 2) y’ (x =3) y’ (x = 4) y’ (x = 5) Σ Error
Count = f/favg Count
20.24 0 0 0 7.49 25 829.58 1.18 1
15.08 12.22 0 0 0 25 521.11 0.74 0
15.87 3.1 10.72 15.48 20.24 25 890.46 1.27 2
13.89 6.98 12.22 0 0 25 559.67 0.80 1
Sum 2800.82
Average 700.20
Maximum 890.46
μx
μy
46
1 S V 1 S VL
Introduction to
Fuzzy System

Figure 3.7 : Physical Representation of the First String in Table 3.4 and
the Graphical Determination of Y and X

b
Ci = Cmin + (Cmaxi − Cmini ) . . . (3.7)
2 −1
L

For the fuzzy variable x (range x = 0.5) we use Cmin = 0 and Cmax = 5 for both the
membership functions S (Small) and L (Large). For the fuzzy variable y we use Cmin = 0
and Cmax = 25.
The physical representation of the first string is shown in Figure 3.7. In this Figure the
base values are obtained from Table 3.4, column 6, 7, 8, and 9. So, for example, the base
values for the variable x for string number 1 are 0.56 and 5 – 1.59 = 3.14, and the base
values for the variables y are 8.73, and 25 – 20.24 = 4.76. To determine the fitness of the
combination of membership functions in each of the strings, we want a measure of the
square of the errors that are produced in estimating the values of the output y, given the
inputs x from Table 3.2. Figure 3.7 shows how the value of the output y, can be computed
graphically for the membership functions for string number 1 in Table 3.4. For example,
for x = 4 we see that the membership of x in the fuzzy class large is 0.37. Referring to the
rules in Table 3.3, it can be seen that if x is Large then y is very large. Therefore, we look
for the value in the fuzzy class very Large (VL) of fuzzy variable y that has a
membership of 0.37. We determine this to be Equal to 12.25. The corresponding actual
value for y is 16.Therefore the squared error is
(16 – 12.25)2 = 14.06. Columns 10, 11, 12, 13, 14 of Table 3.4 shows the values
computed for y using the respective membership functions. Table 3.4 column 15 shows
the sum of the squared errors subtracted from 1000 (this is done to convert the fitness
function from a minimization problem to a maximization problem). Table 3.4, column 15
thus shows the fitness values for the four strings. We find the sum of all the fitness values
in the generation and the average fitness of the generation. The average fitness of the
generation is used to determine the relative fitness of the strings in the generation, as seen
in Table 3.4, column 16. These relative fitness values are used to determine which strings
are to be eliminated and which string gets how many copies to make the next generation
of strings. In this problem a cutoff value of 0.75 has been used for the acceptability of a
string propagating into the next generation. Table 3.4, column 17 shows the number of
copies of each of the four strings that would be used to create the next generation of the
strings.
The process of generating and evaluating strings is continued until we get a convergence
to the solution within a generation, i.e. we get the membership functions with the best
fitness value.
3.2.7 Inductive Reasoning
An automatic generation of membership functions can also be accommodated by using
the essential characteristic of the inductive reasoning, which derives a general consensus
from the particular (derives the generic from specific). The induction is performed by the
entropy minimisation principle, which clusters most optimally the parameter
corresponding to the output classes.
This method is based on an ideal scheme that describes the input and output relationship
for a well established database, i.e. the method generates memberships functions based
solely on data provided. The method can be quite useful for complex systems where the
data are abundant and static. In situations where the data are dynamic, the method may
not be useful, since the membership functions will continually change with time. The 47
Basics of Artificial intent of induction is to discover a law having objective validity and universal
Intelligence Tools application. The laws of induction are summarized here :
• Given a set of irreducible outcomes of an experiment, the induced
probabilities are those probabilities consistent with all available information
that aximize the entropy of the set.
• The induced probability of a set of independent observations is proportional
to the probability density of the induced probability of a single observation.
• The induced rule is that rule consistent with all available information of
which the entropy is minimum.
Among these three laws above, the third one is appropriate for membership function
development. A key goal of entropy minimization analysis is to determine the quality of
information in a given data set. The entropy of a probability distribution is a measure of
the uncertainty of the distribution. This information measures the contents of data to a
prior probability for the same data. The higher the prior estimate of the probability for an
outcome to occur, the lower will be the information gained by observing it to occur. The
entropy on a set of possible outcomes of a trail where one and only one outcome is true is
defined by the summation of probability and the log of the probability for all outcomes.
In other words, the entropy is the expected value of information.
SAQ 1
(a) What is fuzzy membership function?
(b) How fuzzy membership function is determined by neural network approach?
(c) What is the difference between fuzzy sets and crisp sets?
(d) What are the various methods of membership determination?
(e) Discuss the advantages of fuzzy logic?

3.3 FUZZY RULES AND THEIR OPERATIONS


Natural language is perhaps the most powerful form of conveying information that
humans posses for any given problem or situation that requires solving or reasoning. This
power has largely remained untapped in today’s mathematical paradigms; not so
anymore with the utility of fuzzy logic. In this section of the unit, we introduce the use of
fuzzy sets as a calculus for the interpretation of natural language. Natural language,
despite its vagueness and ambiguity, is the vehicle for human communication, and it
seems appropriate that a mathematical theory that deals with fuzziness and ambiguity is
also the some tool used to express and interpret the linguistic character of our language.
Further, we will also elaborate the use of natural language in the expression of
knowledge form known as rule-based system. The decomposition of compound rules into
canonical forms and the treatment of canonical rule forms as logical propositions are
addressed. The characterization of the confidence in a particular rule is addressed using
truth qualifications.
Fuzzy rule base is the core of a fuzzy system. To introduce this concept, a single fuzzy
rule is first discussed.
3.3.1 Fuzzy IF-THEN Rules
First, recall the fuzzy logic operations and, or, not, implication, and also Equivalence :
a ∧ b, a ∧ b, a , a ⇒ b, a ⇔ b ,
48
and their evaluations on a fuzzy sets, A, with the membership function μ A (.) : Introduction to
Fuzzy System
μ A ( a ∧ b) : = min {μ A ( a ), μ A (b)} = μ A ( a ) ∧ μ A (b);

μ A ( a ∨ b) : = max {μ A ( a ), μ A (b)} = μ A ( a ) ∨ μ A (b);

μ A (a ) = μ A (a) = 1 − μ A (a)

μ A ( a ⇒ b) = μ A ( a ) ⇒ μ A (b) = min {1, 1 + μ A ( a ) − μ A (b)}

μ A ( a ⇔ b ) = μ A ( a ) ⇔ μ A (b ) = 1 − | μ A ( a ) − μ A (b ) |
Recall also the fuzzy relations among elements of two fuzzy sets A and B, on which a
membership function μA × B (a, b) is defined, with a ∈ A and b ∈ B. It is clear that one can
B

certainly consider the above fuzzy logic computations as some special fuzzy relations,
with A = B and μA × A = μA.
The implication relation a ⇒ b can be interpreted, in linguistic terms, as
“IF a is true THEN b is true.”
For fuzzy logic performed on a fuzzy set A, there is a membership function μA describing
the truth values of a ∈ A and b ∈ A. In this case, a more complete linguistic statement
would be
“(IF a ∈ A is true with a truth value μA (a)
THEN b ∈ A is true with a truth value μA (b))
has the truth value μA (a ⇒ b) = min {1, 1 + μA (b) – μA (a)}.”
In the above, both a and b belongs to the same fuzzy subset A and share the same
membership function μA. If they belong to different fuzzy sets A and B with different
membership functions μA and μB, then one has a non trivial fuzzy relation, which can be
B

quite complicated. In most cases, however, the implication relation a ⇒ b, performed on


fuzzy sets A and B, where a ∈ A and b ∈ B, is simply defined in linguistic terms as
“(IF a ∈ A is true with a truth value μA (a)
THEN b ∈ A is true with a truth vale μB (b))
has the truth value μA × B (a ⇒ b) = min {1, 1 + μB (b) – μA (a)}.”
Because all such statements have a standard format and their meaning is clear within
context, it is common to write them in the following simple form :
“IF a is A THEN b is B.”
A fuzzy logic implication statement of this form is usually called a fuzzy IF- THEN rule.
To be more general, let A1, A2, . . . , An and B be the fuzzy subsets with membership
functions μA1, μA2, . . . , μAn, and μB, respectively.
B

Definition 1
General fuzzy IF- THEN rule has the form
“IF a1 is A1 AND…AND an is An THEN b is B.”
Using the fuzzy logic AND operation, this rule is implemented by the following
evaluation formula :
μ Al (a1 ) ∧ . . . ∧ (an ) ⇒ μ B (b) ,

where μ Ai (a1 ) ∧ μ A j (a j ) = min {μ Ai (ai ), μ A j (a j )}

and, therefore,
μ Al (a1 ) ∧ . . . ∧ μ An (an ) = min {μ Al (a1 ), . . . , μ An (an )}
49
Basics of Artificial About this general fuzzy IF-THEN rule and its evaluation, a few issues have to be
Intelligence Tools clarified :
• There is no fuzzy logic OR operation in a general fuzzy IF-THEN rule.
What should one do if a fuzzy logic implication statement involves the OR
operation?
• There is no fuzzy logic NOT operation in a general fuzzy IF-THEN rule.
What should one do if a fuzzy logic implication statement involves the NOT
operation?
Answers to these questions are given below.
3.3.2 Fuzzy Logic Rule Base
Consider questions rose above. First, consider, for example, the following fuzzy
IF-THEN rule containing an OR operation :
IF a1 is A1 AND a2 is A2 OR a3 is A3 AND a4 is A4 THEN b is B.”
By convention, this is understood in logic as
“(IF a1 is A1 AND a2 is A2) OR (a3 is A3 AND a4 is A4) THEN b is B.”
With this convention and understanding, it is clear that this statement is Equivalent to the
combination of the following two fuzzy IF-THEN rules :
“IF a1 is A1 AND a2 is A2 THEN b is B.”
“IF a3 is A3 AND a4 is A4 THEN b is B.”
Hence, the fuzzy logic OR operation is not necessary to use: it may shorten a statement
of a fuzzy IF-THEN rule, but it increases the format complexity of the rules.
Second, consider the fuzzy logic NOT operation. For a negative statement like “IF a is
not A,” one can always interpret it by a positive one “IF a is A” or “IF a is A ” where A
means “not A” in logic theory and also “complement of A” in set theory. Moreover, the
statement “ a is A” or “a is A ” can be evaluated by
μ A (a ) = μ A (a) = 1 − μ A (a)

Therefore, the fuzzy logic OR operation necessary to use either.


Example 3.1
Given a fuzzy logic implication statement
“IF a1 is A1 AND a2 is not A2 OR a3 is not A3 THEN b is B,”
How one can rewrite it as a set of Equivalent general fuzzy IF-THEN rules in the
unified form?
Solution
One may first drop the fuzzy logic OR operation by rewriting the given statement
as
“IF a1 is A1 AND a2 is not A2 THEN b is B,”
“IF a3 is not A3 THEN b is B,”
One may then drop the fuzzy logic NOT operation by rewriting them as
“IF a1 is A1 AND a2 is not A2 THEN b is B,”
“IF a3 is A3 THEN b is B,”
Finally, these two general fuzzy IF-THEN rules can be evaluated as follows
μ A1 (a1 ) ∧ μ A2 (a2 ) ⇒ μ B (b)

μ A3 ( a3 ) ⇒ μ B (b)
50
Therefore, one only needs two general fuzzy IF-THEN rules, (1) and (2), and three Introduction to
Fuzzy System
membership ship values μ A1 ( a1 ), μ A2 (a2 ), μ A3 ( a3 ) , to infer the conclusion “b is
B,” namely, b ∈ B, with the truth values μB (b) calculated from the three given
B

membership values.
All the other fuzzy logic operations can be simply defined and expressed only by
the AND and OR operations. They can be evaluated via the min and max
operations as follows :
μ A1 (a1 ) ∧ μ A2 (a2 ) : min {μ1 ( a1 ), μ A2 ( a2 )};

μ A1 ( a1 ) ∧ μ A2 (a2 ) : max {μ1 (a1 ), μ A2 (a2 )};

along with μ A (a ) = μ A (a) = 1 − μ A (a)

μ A ( a ⇒ b) = μ A ( a ) ⇒ μ A (b) = min {1, 1 + μ A ( a ) − μ A (b)}

μ A ( a ⇔ b) = μ A ( a ) ⇔ μ A (b) = 1 − | μ A ( a ) − μ A (b) |
Consequently, all finite combinations of these fuzzy logic operations can be
expressed only by the AND and OR operations, so that in any finite fuzzy logic
inference statement
IF … THEN …,
where the condition part “IF …” can be expressed only by the AND and OR
operations.
Consequently, a finite fuzzy logic implication can always be described by a set of
general IF-THEN rules containing only the fuzzy logic AND operation, in the
following generic form :
(a) “IF a11 is A11 AND . . . AND a1n is A1n THEN b1 is B1.” B

(b) “IF a21 is A21 AND . . . AND a2n is A2n THEN b2 is B2.” B

...
(c) “IF am1 is Am1 AND . . . AND amn is Amn THEN b2 is B2.” B

This family of general fuzzy IF_THEN rules is usually called a fuzzy logic rule
base.
It is remarked that the number of components in each rule need not to be the same.
If n = 2 but a rule has one component in the condition part, say,
“IF a11 is A11 THEN b1 is B1,” B

one cam formally rewrite it as


““IF a11 is A11 AND a12 is I12 THEN b1 is B1.” B

Where I12 is a fuzzy subset with μ12 (a) = 1 for all a ∈ I12
Here, one actually inserts an “always true” (redundant) condition into the “IF …
AND …” part to fill in the gap of the statement. In doing so, the format of a fuzzy
logic rule base can be kept simple in a general discussion of the subject.
It is clear that such a general form of a fuzzy logic rule base includes the non fuzzy
logic rule base include the non fuzzy case and the unconditional case (with only “b
is B”) as special cases. Moreover, this general fuzzy logic rule base (with only the
fuzzy logic AND operation in the condition part) also covers many unusual fuzzy
logic implication statements, such as the one shown in the next example.
Example 3.2
Given a fuzzy logic implication statement
“b is B unless a1 is A1 AND … AND an is An,” 51
Basics of Artificial which is understood in logic as
Intelligence Tools
“(b is B) unless (a1 is A1 AND … AND an is An),”
Solution
One can first convert it by using fuzzy logic NOT and OR operations as follows :
“IF (a1 is A1 AND … AND an is An) THEN b is B,”
namely,
“IF a1 is A1 OR … OR an is An THEN b is B,”
and then replace all the OR operations by a fuzzy logic rule base in the following
form :
(1) “IF a1 is A1 THEN b is B,”

(2) “IF a2 is A2 THEN b is B,”


...
(n) “IF an is An THEN b is B,”
This Equivalent rule base is in the general format, indeed.
In this example, however, it should be noted that the given statement is not
equivalent to the following :
“IF a1 is A1 AND … AND an is An THEN b is NOT B,”
since the conclusion can be “b has no relation with B.”
Finally, note that a fuzzy rule base has to satisfy some properties or requirements
(the so-called “3C requirement” – complete, consistent, and concise)
First, a fuzzy rule base has to be complete, in the sense that no other possible
conditions are left out. The following rule base is incomplete :
(a) IF a > 0 THEN b > 0,
(b) IF a = 0 THEN b < 0,
because the case of a < 0 is left out.
Second, a fuzzy rule base has to be consistent, in the sense that no conclusions are
contradictive. The following rule base is inconsistent :
(a) IF a > 0 THEN b > 0,
(b) IF a >0 THEN b = 0,
(c) IF a = 0 THEN b < 0,
(d) IF a <0 THEN b = 0,
Since the first two rules contradicts each other. Yet this rule base is complete.
Notice that the following two rules are consistent :
(a) IF a > 0 THEN b > 0,
(b) IF a = 0 THEN b > 0,
where two different conditions give the same conclusion, which is not a conflict,
and the following two rules are consistent, too :
(a) IF a > 0 THEN b > 0,
(b) IF a > 0 THEN c > 0,
Which are Equivalent to “IF a > 0 THEN b > 0 AND c > 0.”

52
Finally, some other requirements may need to be imposed as well for a fuzzy rule Introduction to
base in a particular application. In particular, a rule base should be concise with Fuzzy System
less or no redundancy.
The above 3C requirement provides a guideline for designing a correct, complete
and fuzzy rule base in engineering applications.
3.3.3 Evaluation of Fuzzy IF-THEN Rules
Consider the problem of evaluating a fuzzy IF-THEN rule :
μ A ⇒ B ( a, b) namely μ A ( a ) ⇒ μ B (b), a ∈ A, b ∈ B

For the classical two valued logic, this evaluation is simple :

⎧ 1 if μ A (a ) = 1,
μ B (b ) = ⎨
⎩0 if μ A (a ) = 0.
namely, “a ∈ A ⇒ b ∈ B,” and
⎧ 1 if μ A (a ) = 1,
μ B (b) = ⎨
⎩0 if μ A (a) = 0.
that is, “ a ∉ A ⇒ b ∈ B .”

For fuzzy logic, however, according to the choice of particular logical system, there are
several options for the IF-THEN rule
“ μ A (a) ⇒ μ A (a) ”

such as
(a) μ A ⇒ B ( a, b) = min {μ A (a), μ B (b)} ;

(b) μ A ⇒ B (a, b) = μ A (a), μ B (b) ;

(c) μ A ⇒ B (a, b) = min {1, 1 + μ B (b) − μ A (a )} ;

(d) μ A ⇒ B (a, b) = max {min {μ A ( a), μ B (b)}, 1 − μ A (a)} ;

(e) μ A ⇒ B (a, b) = max {1 − μ A ( a), μ B (b)} ;

(f) Goguen’s formula :

⎧ 1 if μ A (a ) ≤ μ B (b)

μA ⇒ B (a, b) = ⎨ μ B (b)
⎪ μ (a ) if μ A (a) > μ B (b)
⎩ A
All these evaluation formulas are valid for the fuzzy logic inference purpose, provided
that one uses consistently the same formula for the implication relation ⇒. Of course,
different formulas give different resulting values, which merely imply different degrees
of inference based on different logical systems, but not the validity of the answers.
Obviously, formulas (a) and (b) are very simple to use; but they are the same as the
logical AND operation ∧, formulas (d) and (f) seem too complicated. The most common
one is formula (c).
SAQ 2
(a) What do you mean by fuzzy IF-THEN rules?
(b) What is the physical significance of fuzzy IF-THEN rules?
(c) What is the fuzzy rule based system?
53
Basics of Artificial
Intelligence Tools

3.4 APPLICATION OF FUZZY LOGIC IN FLEXIBLE


MANUFACTURING SYSTEM (FMS)
Generally, when a Flexible Manufacturing System (FMS) is being planned, the objective
is to design a system which will be efficient in the production of the entire range of parts.
This cannot be achieved until the design, production planning, scheduling, and
controlling stages work well. A Fuzzy Based Scheduling Model for FMS which is
developed here aims at making real-time control decisions that include dynamic
scheduling and variable part routing used to solve scheduling problems in FMS
environments.
Fuzzy logic, although a mathematical technique, defines its behavioral framework
through a compact linguistic rule base. It has the ability to simultaneously consider
multiple criteria and to model human experience in the form of simple rules.
Furthermore, the advantage of the fuzzy logic system approach is that it incorporates
both numerical and linguistic variables. The fuzzy based scheduling, in this unit, is
designed to solve the problem of selecting the best part routing for a given job which is
the sub-problem of scheduling in a flexible manufacturing cell (FMC). In particular, we
will show how to obtain scheduling via a proposed fuzzy model as shown in Figure 3.8.
Error! Fuzzy Model

Fuzzification Inference Defuzzification


Module Module Module
Work in Queue,
Processing Time, Route
Distance Selection

Membership
function Rule Base

Figure 3.8 : Fuzzy Model for Route Selection

The arrangement of the FMC hardware is shown in Figure 3.9. There are p different part
types, where each part type requires four operations. Each operation can be done by any
of the machines with different processing time. A Job consists of the work to be done for
the current scheduling horizon. A job has n parts to be processed on 4 machines, where
parts can follow different routings among 4 MCs. Each machine is capable of performing
different operations, but no machine can process more than one part at a time. Each part
type has several alternative routings. Operations are not divided or interrupted when
started. Set up times are independent of the job sequence and can be included in
processing times. The scheduling problem is to decide which alternative routes should be
selected for each part type.
The procedures of modeling the fuzzy based scheduling are as follows :
The route selection depends on three fuzzy time factors; the number of parts already
54 waiting in each machine buffer in terms of sum of processing time, how long it will take
to complete the requested operation and the traveling time of part through the route. Introduction to
Therefore, for our problem the chosen fuzzy variables are named as Work in Queue, Fuzzy System
Processing time, and Distance, whose base variables are tijk, ti, and tij, respectively. They
are the input variables used for the Route selection purpose which is chosen as the output
variable.

MC1 MC2

AGV2
Load/Unload
Station

AGV1

MC3 MC4

Figure 3.9 : Configuration of Flexible Manufacturing Cell

The fuzzy sets of each universe of discourse are labeled as the term set shown in
Table 3.5. The fuzzy sets of work in queue are indexed as SW, MW, and LW, indicating
short, medium and long work in queue. The fuzzy sets of processing time are indexed as
SP, MP, and LP, indicating short, medium and long processing time. The fuzzy sets of
distance are also indexed as ST, MT, and LT, indicating short, medium and long travel
time. The universe of discourse for these variables is [0, max], and each universe of
discourse is explained by three fuzzy sets. The membership functions for each fuzzy set
are triangular except at extreme left and right as shown in Figures 3.10(a), (b), and (c),
respectively.
Table 3.5 : Definition of Fuzzy Variable

Linguistic Variable Term Set

Work in queue SW, MW, LW

Processing Time SP, MP, LP

Distance ST, LT, MT

MN, LN, LO, NA, AV, PA, HI, PH,


Rout Selection
MX

Intuitively, we need to define another linguistic variable representing the route selection.
Let us denote it by Route selection and its base variable by Rs. Assume that Rs [0, 10]
and that we want the fuzzy model to deal with the nine distinctions characterizing the
route selection. In other words, the universe of discourse of Rs has nine fuzzy sets. The
membership functions for each fuzzy set are triangular. These fuzzy sets are labeled as
the term sets shown in Table 3.5. This term’s sets are MN, NL, LO, NA, AV, PA, HI, PH
and MX, which stand for minimum, negative low, low, negative average, average,
positive average, high, positive high, and maximum, respectively.
Experienced users of an FMS scheduling can express conditional fuzzy propositions in
the form :
If work in queue is ◊ and processing time is◊ and distance is◊ then route selection is◊ 55
Basics of Artificial where, appropriate states of the four linguistic variables are placed into the empty boxes
Intelligence Tools for each particular proposition. Since the variables of work in queue, processing time,
and distance have three states each, the total number of possible ordered pairs of these
states is twenty-seven. For each of these ordered pairs of states, we have to determine an
appropriate state of variable Route selection. A convenient way of defining all required
rules is a decision Table which is also called a fuzzy association memory (FAM) bank
matrix. It consists of 27 (3 *3 *3) rules and is constructed for Route selection as shown in
Table 3.6.
The route selection criteria now used to derive fuzzy inference rules are shown as an
example :
1. IF (Work_in_queue is SW) and (Processing_time is SP) and (Distance is
ST) THEN (Route_selection is MX)
2. If (Work_in_queue is SW) and (Processing_time is SP) and (Distance is
MT) then (Route_selection is MX)
:
:
27. If (Work_in_queue is LW) and (Processing_time is LP) and (Distance is
LT) then (Route_selection is MN)

SP MP LP
SW MW LW 1
1
Membership
Membership
Value
Value

0 0
Work in Queue Processing Time

(a) (b)

ST MT LT
1
Membership
Value

0
Distance

(c)
Figure 3.10 : Membership Functions of Fuzzy Set Variable, (a) Work in Queue;
(b) Processing Time; and (c) Distance

Table 3.6 : Inference Rules for Rout Selection using Three Inputs and One Output
Work in Queue
Processing Time Distance
SW MW LW
SP MX PA NA ST
SP MX PA LO MT
SP PH AV LO LT
56
Introduction to
MP PH AV LO ST
Fuzzy System
MP PH AV NL MT
MP HI AV NL LT
LP HI AV NL ST
LP HI NA MN MT
LP PA NA MN LT

SAQ 3
(a) What is the part routing problem?
(b) How different rules are constructed in the problem considered?
(c) In which more problems, other then FMS, fuzzy modeling can be done?

3.6 SUMMARY
Fuzzy set theory provides a means for modeling the kind of uncertainty associated with
vagueness, with imprecision, and/or with a lack of information regarding a particular
element of the problem on hand. The underlying power of fuzzy set theory is that it uses
linguistic variables, rather than quantitative variables, to represent imprecise concept.
The incorporation of fuzzy set theory and fuzzy logic into computer models has shown
tremendous payoff in areas where intuition and judgment still play major roles in the
model. Fuzzy mathematical tools and the calculus of fuzzy IF-THEN rules provide a
most useful paradigm for the automation and implementation of an extensive body of
human knowledge therefore not embodied in the quantitative modeling process.

3.7 KEY WORDS


Membership Function : Membership function characterizes the fuzziness
in a fuzzy set – whether the elements in the set are
discrete or continuous – in a graphical form for
eventual use in the mathematical formalism of
fuzzy set theory.
Fuzzy If-Then Rules : “IF a is true THEN b is true.”
Fuzzy Based Scheduling Model : It aims to make real-time control decisions that
include dynamic scheduling and variable part
routing used to solve scheduling problems in FMS
environments.

3.8 ANSWERS TO SAQs


Refer the preceding text for all the Answers to SAQs.

REFERENCES
Torsun, I. S. (1995), Foundations of Intelligent Knowledge-Based Systems, New York:
Academic Press.
Turban, Efraim, and Jr. Louis E. Frenzel (1992), Expert Systems and Applied Artificial
Intelligence, New York : Maxwell Macmillan International.

57
Basics of Artificial Walker, Terri C., and Richard K. Miller. (1990), Expert Systems Handbook : An
Intelligence Tools Assessment of Technology and Applications, Englewood Cliffs, NJ : Prentice-Hall.
Weiss, Sholom M., and Casimir A. Kulikowski. (1991), Computer Systems that Learn:
Classification and Prediction Methods from Statistics, Neural Nets, Machine Learning,
and Expert Systems, San Mateo, CA : Morgan Kaufmann.
Anderson, J. (1977), Neural Networks with Cognitive Implications, in D. LaBerge and
S. Samuels (Eds.), Basic Process in Reading Preception and Comprehension, Lawrence
Erlbaum Associates, Hillsdale, NJ, pp. 413-451.
Hopfield, J. J. (1982), Neural Networks and Physical Systems with Emergent Collective
Computational Abilities, Proceedings of the Academy of Sciences, Volume 74,
pp. 2554-2558.
Rangwala, S. S., and Dornfield, D. A. (1989), Learning and Optimisation of Machining
Operations Using Computational Abilities of Neural Networks, IEEE Transactions on
Systems, Man, and Cybernetics, Volume 19, No. 2, pp. 299-314.
Zadeh, L. (1965), Fuzzy Sets, Inf. Control, Volume 8, pp. 338-353.
Bezdek, J. (1993), Editorial : Fuzzy Models – What are They, and Why?” IEEE Trans.
Fuzzy Syst., Volume 1, pp. 1-5.
Klir, G., and T. Folger (1988), Fuzzy Sets, Uncertainty, and Information, Prantice Hall,
Englewood Cliffs, Nj.
Blockley, D. (1980), The Nature of Structural Design and Safety, John wiley and Sons,
New York.

SOFT COMPUTING IN CIM


This course comprises 4 Blocks. Block 1, entitled Basics of Artificial Intelligence Tools,
describes about expert systems, neural networks and fuzzy systems. These systems and
58
techniques are useful in manufacturing systems. All these systems and techniques will Introduction to
provide you the specialised knowledge which allows you to make sound design Fuzzy System
decisions, thus improving design quality and design time. The basics of neural network
and its implementation on automatic acquisition of process planning knowledge have
been introduced. It also explains the concept of fuzzy set theory. The fuzzy set theory
provides a means for modeling the kind of uncertainty associated with impression, with a
lack of information regarding a particular element of the problem on hand.
Block 2, Intelligent Search Techniques, comprises three units – genetic algorithms,
nature inspired optimisation tools and immune systems. Genetic algorithm tools are
mostly used in process planning problems. Heuristic based on nature or bioinspired
algorithms are approximate algorithms that have the ability to identify an optimal or near
optimal solutions in minimum computational time. It also explains about the immune
system and their use in pattern recognition problems.
Block 3, entitled Applications of AI Tools in CIM, comprises 4 units. It explains the uses
of expert systems in manufacturing applications. Also it describes the various concepts of
neural networks in planning problems of CIM. It finds out the solutions for typical
operation and scheduling problems in manufacturing. Finally, a generic clonal algorithm
is illustrated to accomplish the task of parameter optimisation in computer integrated
manufacturing.
Block 4, Petrinet Models, comprises 3 units – Petrinets, petrinet applications in
manufacturing operations and advances of petrinets. Petrinets modeling and net theory
have become popular among the researcher community as an important computational
paradigm to represent and analyse a broad class of manufacturing systems. The concepts
involved in modeling the manufacturing systems using the petrinets have been explained.
Model complex systems using the advanced concepts of the petrinet theory have also
been described elaborately.

59
Basics of Artificial
Intelligence Tools BASICS OF ARTIFICIAL INTELLIGENCE
TOOLS
This block consists of 3 units. Unit 1 deals with elements of expert systems, expert
systems shells and application of expert systems in manufacturing operations. Most of
this unit explains the knowledge of expert systems and how they will be useful in
manufacturing applications.
Unit 2 elaborates on architecture of the neural networks, back propagation and
implementation of neural networks in process planning problems. Neural networks are a
class of computing systems that use a highly parallel architecture to efficiently perform
pattern recall, prediction and classification tasks. Neural network approach uses a single
methodology for generating useful inferences, rather than using explicit generation rules.
The concepts of fuzzy membership function, fuzzy rules and their operations are
discussed in Unit 3. It also explains the uses of fuzzy logic in modern manufacturing
systems, like flexible manufacturing systems and cellular manufacturing systems.
Finally, the fuzzy mathematical tools and the calculus of fuzzy IF-THEN rules provide a
most useful paradigm for the automation and implementation of an extensive body of
human knowledge.

60

You might also like