Omer Hussen Omer - Fuzzy Logic

You might also like

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

Fuzzy Logic

Research Project Submitted to the department of Mathematics in partial


fulfillment of the requirements for the degree of B.A or BSc. in
Mathematics

By:
Omer Hussen Omer

Supervised by:
Dr Hogir Mohammed Yaseen

May– 2021

i
Certification of the Supervisors

I certify that this report was prepared under my supervision at the Department of
Mathematics / College of Education / Salahaddin University-Erbil in partial fulfillment of the
requirements for the degree of Bachelor of philosophy of Science in Mathematics.

Signature:
Supervisor: Dr. Hogir Mohammed Yaseen
Scientific grade: Lecturer
Date: 26 / 5 / 2020

In view of the available recommendations, I forward this report for debate by the
examining committee.

Signature:
Name: Assistant Prof. Dr. Rashad Rashid Haji
Scientific grade: Professor
Chairman of the Mathematics Department

ii
Contents

Introduction 1
Chapter One P(3-9)
Preliminary and Background

Chapter 2
Fuzzy set and fuzzy logic P(10-18)

Chapter3 P(19-28)
Fuzzy system and application

Reference P(29)

iii
Abstract
In this work we study fuzzy logic and some of its applications. First we write the
definition of the basic concepts about fuzzy logic and we explain why we need use
fuzzy logic in our daily life. Then we study fuzzy set and fuzzy logic and some of
their applications. Finally, we study fuzzy system and some of its application.
Inadition, In each chapter we five many examples to illustrate the concepts and results.

iv
Introduction

Fuzzy logic is a problem-solving control system methodology that lends itself to


implementation in systems ranging from simple, small, embedded micro-controllers to large,
networked, multi-channel PC or workstation-based data acquisition and control systems. It can
be implemented in hardware, software, or a combination of both. Fuzzy logic provides a
simple way to arrive at a definite conclusion based upon vague, ambiguous, imprecise, noisy,
or missing input information. Fuzzy logics approach to control problems mimics how a person
would make decisions, only much faster.The concept of Fuzzy Logic (FL) was conceived at
the beginning of the 70s by Lotfi Zadeh, a professor at the University of California at Berkley,
and presented not as a control methodology, but as a way of processing data by allowing partial
set membership rather than crisp set membership or non-membership. This approach to set
theory was not applied to control systems until the 70's due to insufficient small-computer
capability prior to that time. Professor Zadeh reasoned that people do not require precise,
numerical information input, and yet they are capable of highly adaptive control. If feedback
controllers could be programmed to accept noisy, imprecise input, they would be much more
effective and perhaps easier to implement. In the majority of present-day applications, fuzzy
logic allows many kinds of designer and operator qualitative knowledge in system automation
to be taken into account. Fuzzy logic began to interest the media at the beginning of the
nineties. The numerous applications in electrical and electronic household appliances,
particularly in Japan, were mainly responsible for such interest. Washing machines not
requiring adjustment, camcorders with Steady shot (TM) image stabilization and many other
innovations brought the term “fuzzy logic” to the attention of a wide public. In the car industry,
automatic gear changes, injection and anti-rattle controls and air conditioning can be optimized
thanks to fuzzy logic, In continuous and batch production processes, as well as in automation
systems (which is the subject of this Cahier Technique), applications have also increased.
Fuzzy logic has developed in this area as it is an essentially pragmatic, effective and generic
approach. It allows systematization of empirical knowledge and which is thus hard to control.

1
The theory of fuzzy sets offers a suitable method that is easy to implement in real time
applications, and enables knowledge of designers and operators to be transcribed into dynamic
control systems. This makes fuzzy logic able to tackle automation of procedures such as
startup and setting of parameters, for which few approaches were previously available. This
Cahier Technique describes fuzzy logic and its application to production processes.
In this work we study fuzzy logic and some of its applications. This work is
organized as follows. In chapter one we write the definition of the basic concepts about fuzzy
logic and we explain why we need and use fuzzy logic in our modern life. In chapter two we
study fuzzy set and fuzzy logic and some of their applications. In the last chapter we study
fuzzy system, its application. In each chapter we five many example to illustrate the concepts.
.

2
Chapter One
Preliminary and Background

In introduction we briefly write the main daily life applications about the fuzzy logic. In
this chapter, we explain why we need and use fuzzy logic. Then we write basic concepts about
the fuzzy Set and fuzzy logic. Fuzzy logic offers several unique features that make it a
particularly good choice for many control problems.
1) It is inherently robust since it does not require precise, noise-free inputs and can be
programmed to fail safely if a feedback sensor quits or is destroyed. The output control is a
smooth control function despite a wide range of input variations.
2) Since the FUZZY LOGIC controller processes user-defined rules governing the target
control system, it can be modified and tweaked easily to improve or drastically alter system
performance. New sensors can easily be incorporated into the system simply by generating
appropriate governing rules.
3) Fuzzy logic is not limited to a few feedback inputs and one or two control outputs, nor is it
necessary to measure or compute rate-of-change parameters in order for it to be implemented.
Any sensor data that provides some indication of a system's actions and reactions is sufficient.
This allows the sensors to be inexpensive and imprecise thus keeping the overall system cost
and complexity low.
4) Because of the rule-based operation, any reasonable number of inputs can be processed
(1-8 or more) and numerous outputs (1-4 or more) generated.
5) Fuzzy logic can control nonlinear systems that would be difficult or impossible to model
mathematically.

How is Fuzzy logic used?


1) Define the control objectives and criteria: What am I trying to control? What do I have to
do to control the system? What kind of response do I need? What are the possible (probable)
system failure modes?
2) Determine the input and output relationships and choose a minimum number of variables
for input to the FL engine (typically error and rate-of-change-of-error).
3) Using the rule-based structure of FL, break the control problem down into a series of IF X

3
AND Y THEN Z rules that define the desired system output response for given system input
conditions. The number and complexity of rules depends on the number of input parameters
that are to be processed and the number fuzzy variables associated with each parameter. If
possible, use at least one variable and its time derivative. Although it is possible to use a single,
instantaneous error parameter without knowing its rate of change, this cripples the system's
ability to minimize overshoot for a step inputs.
4) Create FUZZY LOGIC membership functions that define the meaning (values) of
Input/Output terms used in the rules.
5) Create the necessary pre- and post-processing FL routines if implementing in S/W,
otherwise program the rules into the FUZZY LOGIC engine.
6) Test the system, evaluate the results, tune the rules and membership functions, and retest
until satisfactory results are obtained.
Steven D. Kaehler.

Now we write basic definitions about fuzzy logic that we need in our work.
Definition 1.1.[Zadeh , 1965]: If X is a collection of objects denoted generically by x ,
then a fuzzy set A in X is a set of order pairs :-

 __  
A   x , Ax  : x  X 
  
Ax  is called the membership function or grade of membership of x in A that maps X
to the unite interval 0 , 1 .
Definition 1.2.[Zadeh , 1965]: The standard intersection of fuzzy sets A and B is
defined as

for all x  X .
Definition 1.3.[Zadeh , 1965]: The standard union of fuzzy sets A and B is defined as

for all x  X .

4
Definition 1.4.[Zadeh , 1965]: The standard complement of a fuzzy set A is defined as
 __  __
  A   x   1  A x  .
 
Definition 1.5.[Zadeh , 1965]: Let A be a fuzzy set of X , the support of A , denoted
 
S A is the crisp set of X whose elements all have non zero membership grades in A ,

 __   __

that is S  A    x  X : Ax   0 .
   
Definition 1.6.[Zadeh , 1965]: (  -cut) An  - level set of a fuzzy set A of X is a non
fuzzy (crisp) set denoted by A   , such that
 __

 x  X : A x     , if  0
 
A   
__

cl  S  A  
__

  , if  0

    

Where cl S A denotes closure of the support of A .

Definition 1.8.[Chandra &Bector , 2005]: A fuzzy set A of a classical set X is called


__
normal , if there exists an x  X , such that A x   1 . Otherwise A is subnormal .

Definition 1.9.[Zadeh , 1965]: A fuzzy set A of X is called convex , if A  is a


__

convex subset of X , for all   0,1 . That is , for any x , y  A  , and for any   0 ,1

then  x  1    y  A  .
__

Definition 1.10.[Bushera , 2006]: A fuzzy set A whose S Acontains a single point x  X ,


__
with Ax   1 , is referred to as a singleton fuzzy set .

Definition 1.11.[Bushera , 2006]: The empty fuzzy set of X is defined as


   x,0  : x  X 

Definition 1.12.[Bushera , 2006]: The largest fuzzy set in X is defined as


I X   x,1 :  x  X 

5
Definition 1.13.[Bushera , 2006]: The concept of continuity is same as in other
functions, that say, a function f is continuous at some number c if lim f  x   f c 
xc

for all x in range of f , that require existing f c  and lim


x c
f x  . In fuzzy set theory the

__ __ __
condition will be lim A x   Ac  with x and c  A .
xc

Definition 1.14.[Zadeh , 1965]: A fuzzy set A is said to be a bounded fuzzy set , if it

 -cuts A  are (crisp) bounded sets , for all   0, 1 .


__

Definition 1.15.[Zadeh , 1965]: A fuzzy number A is a fuzzy set of the real line with a
normal ,(fuzzy) convex , and continuous membership function of bounded support .
Example 1.16.[Zadeh , 1965]: The following fuzzy set is fuzzy number approximately
"5"  3,0.2 , 4,0.6 , 5,1.0 , 6,0.7 , 7,0.1 .

Proposition 1.17.[Abdull Hameed , 2008]: Let A be a fuzzy number, then A   is a closed


__

, convex , and compact subset of R , for all   0, 1 .

Remark 1.18: We shall use the notation A    a1  , a2   , where A   is an  -cut


__ __

of the fuzzy number A , and a1 : 0,1  R , a1    min A  , is left hand side function
__

which monotone, increasing and continuous a2 :0,1  R , a 2    max A  is right


__

hand side function which monotone decreasing and continuous .

Proposition 1.19.[Abdull Hameed , 2008]:

If    , then A    A  .
__ __

Proposition 1.20.[Abdull Hameed , 2008] :


The support of a fuzzy number is an open interval a1 0 , a2 0  .
__ __
 __ 
Definition 1.21.[Zimmerman , 1995]: Let A be a fuzzy number . If S  A    x then A is
 
__ __
called a fuzzy point and we use the notion A  x . Let A  x be a fuzzy point , it is easy to see

that A   x, x   x,   0,1 .


__

6
__
Definition 1.22.[Buckley , Eslami , 2005]: A fuzzy number A is called a triangular fuzzy
__
number ,where A is defined by three numbers a1  a2  a3 if :-
__ __
i  Ax   1 at x  a2 , ( A is normal)
__
ii  The graph of y  Ax  on a1 , a2  is straight line from a1 ,0  to a 2 ,1 , also on a 2 , a3 
__
the graph of y  Ax  is straight line from a2 ,1 to a3 ,0 .

iii Ax   0 for x  a1 or x  a3 .


__

__
We write A  a1 , a2 , a3  for triangular fuzzy number and its  -cut

A   a2  a1   a1 , a2  a3   a3  for all   0 ,1 .


__

Definition1.23
A fuzzy set is defined by its “membership function” which corresponds to the notion of a
“characteristic function” in classical logic. Let us assume that we want to define the set of
people of “medium height”. In classical logic, we would agree for example that people of
medium height are those between 1.60 m and 1.80 m tall. The characteristic function of the se

Definition1.24
A rule conclusion is a statement combining a linguistic variable and a linguistic term written
after the then of the rule. A conclusion can be made up of a combination of several statements.

Definition1.25
Data merge consists of extracting, from several pieces of data, one or more items of
information which may be different kinds.
For example: from variables R, V and B giving the colour of a biscuit, the cooking state of the
biscuit can be deduced. The term “Sensor merge” is also used.

Defuzzification1.26: Conversion, after inference, of a fuzzy set of a linguistic output


variableinto a numerical value.

7
Degree of membership:
An element x belongs to a fuzzy set A with a degree of membership between 0 and 1, given
by the membership function MA (x).

Definition1.27
The degree of truth, or degree of activation, of a rule is a value y between 0 and 1 deduced
from the degrees of membership of the rule predicates. It directly affects the value of the
conclusions of this rule. The rule is also said to be active at y.
Definition1.28
Set of membership functions and rules of a fuzzy system containing expertise, knowledge of
the operator, expert, etc.

Definition1.29
Term associated with a membership function characterising a linguistic variable.
Linguistic variable:Numerical variable with a name (pressure, temperature… to which are
associated inguistic terms.

Membership function:
A (x) associating to any input value x its degree of membership to the set A. This
gradual value belongs to the [0; 1] interval.
Predicate: Also known as premise or condition, a rule predicate is a statement combining a
linguistic variable and a linguistic term written between the if and the then of the rule. A
predicate can be made up of a combination of several statements linked by AND, OR, NOT
operators.

Singleton A (x), equals to zero for all x, except at a singular point x0.
Fuzzy logic Initially a theory, today fuzzy logic has become an operational technique. Used
alongside other advanced control techniques, it is making a discrete but appreciated
appearance in industrial control automation systems.
Fuzzy logic does not necessarily replace conventional control systems. Rather it completes
such systems. Its advantages stem from its ability to:

8
1) formalise and simulate the expertise of an operator or designer in process control and
tuning,
2) provide a simple answer for processes which are difficult to model,
3) continually take into account cases or exceptions of different kinds, and progressively
incorporate them into the expertise,
4) take into account several variables and perform “weighted merging” of influencing into
variables.
How does this technique contribute to industrial process control? What is the effect on product
quality and manufacturing cost?
Following a few basic theoretical notions, this Cahier Technique answers the questions asked
by automatic control engineers and potential users by means of industrial examples, in terms
of implementation and competitive advantages.

9
Chapter 2
Fuzzy set and fuzzy logic
Defining Fuzzy Sets
In mathematics a set, by definition, is a collection of things that belong to some definition.
Any item either belongs to that set or does not belong to that set. Let us look at another
example; the set of tall men. We shall say that people taller than or equal to 6 feet are tall. This
set can be represented graphically as follows:

The function shown above describes the membership of the 'tall' set, you are either in it or you
are not in it. This sharp edged membership functions works nicely for binary operations and
mathematics, but it does not work as nicely in describing the real world. The membership
function makes no distinction between somebody who is 6'1" and someone who is 7'1", they
are both simply tall. Clearly there is a significant difference between the two heights. The other
side of this lack of distinction is the difference between a 5'11" and 6' man. This is only a
difference of one inch, however this membership function just says one is tall and the other is
not tall. The fuzzy set approach to the set of tall men provides a much better representation of
the tallness of a person. The set, shown below, is defined by a continuously inclining function.

10
Defining Fuzzy Sets Mathematically
Fuzzy sets were first proposed by Lofti A. Zadeh in his 1965 paper entitled none other
than: Fuzzy Sets. This paper laid the foundation for all fuzzy logic that followed by
mathematically defining fuzzy sets and their properties. The definition of a fuzzy set
then, from Zadeh's paper is:
Let X be a space of points, with a generic element of X denoted by x. Thus X = {x}.
A fuzzy set A in X is characterized by a membership function fA(x) which associates with
each point in X a real number in the interval [0,1], with the values of fA(x) at x representing
the "grade of membership" of x in A. Thus, the nearer the value of fA(x) to unity, the higher
the grade of membership of x in A [Fuzzy Sets, Zadeh].
This definition of a fuzzy set is like a superset of the definition of a set in the ordinary
sense of the term. The grades of membership of 0 and 1 correspond to the two
possibilities of truth and false in an ordinary set. The ordinary boolean operators that
are used to combine sets will no longer apply; we know that 1 AND 1 is 1, but what is
0.7 AND 0.3? This will be covered in the fuzzy operations section.Membership
functions for fuzzy sets can be defined in any number of ways as long as they follow
the rules of the definition of a fuzzy set. The Shape of the membership function used
defines the fuzzy set and so the decision on which type to use is dependant on the
purpose. The membership function choice is the subjective aspect of fuzzy logic, it
allows the desired values to be interpereted appropriatly. The most common
membership functions are shown below:

11
www.mathworks.com
Addison-Wesley, 1995.Bernadett

Fuzzy logic operators

Fuzzy logic works with membership values in a way that mimics Boolean logic. To
this end, replacements for basic operators AND, OR, NOT must be available. There
are several ways to this. A common replacement is called the Zadeh operators:
Boolean Fuzzy

AND(x,y) MIN(x,y)

OR(x,y) MAX(x,y)

NOT(x) 1–x

For TRUE/1 and FALSE/0, the fuzzy expressions produce the same result as the
Boolean expressions.There are also other operators, more linguistic in nature,
called hedges that can be applied. These are generally adverbs such as very,
or somewhat, which modify the meaning of a set using a mathematical formula.
However, an arbitrary choice table does not always define a fuzzy logic function. In

12
the paper, a criterion has been formulated to recognize whether a given choice table
defines a fuzzy logic function and a simple algorithm of fuzzy logic function synthesis
has been proposed based on introduced concepts of constituents of minimum and
maximum. A fuzzy logic function represents a disjunction of constituents of minimum,
where a constituent of minimum is a conjunction of variables of the current area greater
than or equal to the function value in this area (to the right of the function value in the
inequality, including the function value).
Another set of AND/OR operators is based on multiplication, where
x AND y = x*y
NOT x = 1 - x
Hence,
x OR y = NOT( AND( NOT(x), NOT(y) ) )
x OR y = NOT( AND(1-x, 1-y) )
x OR y = NOT( (1-x)*(1-y) )
x OR y = 1-(1-x)*(1-y)
Given any two of AND/OR/NOT, it is possible to derive the third. The generalization
of AND.
Using these definitions they can be applied to all of the bivalent combinations above
as well as some fuzzy number combinations. The truth table for this can be seen below:
x Y min(x,y) max(x,y) 1–x

0 0 0 0 1

0 1 0 1 1

1 0 0 1 0

1 1 1 1 0

0.2 0.5 0.2 0.5 0.8

0.7 0.2 0.2 0.7 0.3

0.6 0.6 0.6 0.6 0.4

IF-THEN rules
IF-THEN rules map input or computed truth values to desired output truth values.
Example:

13
IF temperature IS very cold THEN fan_speed is stopped
IF temperature IS cold THEN fan_speed is slow
IF temperature IS warm THEN fan_speed is moderate
IF temperature IS hot THEN fan_speed is high
Other examples
 If a man is 1.8 meters, consider him as tall:
IF male IS true AND height >= 1.8 THEN is_tall IS true; is_short IS false
 The fuzzy rules do not make the sharp distinction between tall and short, that is
not so realistic:
IF height <= medium male THEN is_short IS agree somewhat
IF height >= medium male THEN is_tall IS agree somewhat
In the fuzzy case, there are no such heights like 1.83 meters, but there are fuzzy
values, like the following assignments:
dwarf male = [0, 1.3] m
short male = (1.3, 1.5]
medium male = (1.5, 1.8]
tall male = (1.8, 2.0]
giant male > 2.0 m
For the consequent, there are also not only two values, but five, say:
agree not = 0
agree little = 1
agree somewhat = 2
agree a lot = 3
agree fully = 4
In the binary, or "crisp", case, a person of 1.79 meters of height is considered medium.
If another person is 1.8 meters or 2.25 meters, these persons are considered tall.
The crisp example differs deliberately from the fuzzy one. We did not put in the
antecedent
IF male >= agree somewhat AND ...
as gender is often considered as a binary information. So, it is not so complex as

14
being
 If a man is 1.8 meters, consider him as tall:
IF male IS true AND height >= 1.8 THEN is_tall IS true; is_short IS false
 The fuzzy rules do not make the sharp distinction between tall and short, that is
not so realistic:
IF height <= medium male THEN is_short IS agree somewhat
IF height >= medium male THEN is_tall IS agree somewhat
For the consequent, there are also not only two values, but five, say:
agree not = 0
agree little = 1
agree somewhat = 2
agree a lot = 3
agree fully = 4
In the binary, or "crisp", case, a person of 1.79 meters of height is considered medium.
If another person is 1.8 meters or 2.25 meters, these persons are considered tall.
The crisp example differs deliberately from the fuzzy one. We did not put in the
antecedent
IF male >= agree somewhat AND ...
as gender is often considered as a binary information. So, it is not so complex as being.
144.D. DUBOIS, H. PRADE

Fuzzy classification
Classification normally consists of two steps:
c preparation: determining the classes to be considered,
c on line: assigning the elements to classes.
The notions of class and set are identical theoretically.
There are three types of assignment methods according to the result produced:
c boolean: the elements either belong or do not belong to the classes,
c probabilistic: the elements have a probability of belonging to boolean classes, such as

15
for example the probability that a patient has measles given
the symptoms that he shows (diagnosis),
c gradual: the elements have a degree of membership to the sets; for example a lettuce
belongs to a varying degree to the class of “fresh lettuces”.
Classification methods, whether they produce a gradual, boolean or probabilistic result,
can be developed from:
1) an experiment (case of “fuzzy ladder” mentioned above),
2) examples used for learning purposes (e.g. for neuron network classifiers),
3) mathematical or physical knowledge of a problem (for example, the comfort of a
thermal situation can be evaluated from thermal balanceequations).
4) Gradual (or fuzzy) classification methods can be used in control loops. This is the
case of the industrial cooking example for biscuits described later on

Main difference between fuzzy logic and probability theory


In our opinion any serious discussion on the relation between fuzzy logic and
probability must start by making clear the basic differences. Admitting some
simplification, we consider that fuzzy logic is a logic of vague, imprecise notiolls and
propositions, propositions that may be more or less true. Fuzzy logic is then a logic of
partial degrees of truth. On the contrary, probability deals with crisp notions and
propositions, propositions that are either true or false; the probability of a proposition
is the degree of belief on the truth of that proposition. If we want to consider both as
uncertainty degrees we have to stress that they represent very different sorts of
uncertainty (Zimmermann calls them linguistic and stochastic uncertainty,
respectively). If we prefer to reserve the word "uncertainty" to refer to degrees of belief,
then clearly fuzzy logic does not deal with uncertainty at all. The main difference lies
in the fact that degrees of belief are not extensional (truth-functional), e.g. the
probability of p A q is not a function of the probability of p and the probability of q,
whereas degrees of truth of vague notions adwit trutll-functional approaches (although
tliey are not bound to them). Forlilally speaking, fuzzy logic behaves as a many-valued
logic, whereas probability theory can be related to a kind of twevalued modal logic (cf.

16
e.g. [~ajek, 19931 or [Hajek, 1994) for mote details, also [Klir and Folger, 19881).
Thus, fuzzy logic is not a "poor man's probability theor3), as some people claim.
Comparing fuzzy logic and probability Nevertheless, relationships .between fuzzy
logic and 238 Hiijek, Godo, and Esteva probability theory have been studied. They
have not only been compared but also combined. First of all, we refer to [Zadeh, 19861;
even if the title of Zadeli's paper ends with the words "a negative view", he is rather
positive in colnbining fuzziness and probability by suggesting a definition of tlie
probability of a fuzzy proposition. Another important paper is [Dubois and Prade,
19931, in which the authors extensively survey the literature concerning the
relationship between fuzzy sets and probability theories; again, besides pointing out
the gaps between them, tlie authors build bridges be tween both theories, stressing in
this sense the importance of possibility theory. Our paper is an attempt to contribute
further to this bridge building. Probability is ground on classical equivalence We
restrict ourselves to propositional calcull~s; i.e. formulas are built from propcxsitional
variables and connectives (negation -, implication --, and possibly others. We shall
consider only calculi in which otlier connectives are definable from negation and
implication. Formulas can be endowed with varior~s semantics, among tlieln tlie
classical (boolean, tw~valued): there are just two truth values 0 and 1, each evaluation
e of propositional variables by zeros and ones extends uniquely to an evaluation of all
formulas i~sing cln+ sical trutli tables. Two fonnulns cp, 41 are clussically equivale~zt
if e(cp) = e(41) for ally boolean evaluation e. The second semantics of our interest is
that of Lukasiewicz's infittite-11u1tled calculus: trutli values are real numbers fro111
tlie unit interval [O,l], and truth functions are (we take the freedom of denoting a trutli
fuliction by the same symbol as its corresponding connective). Under this second
semantics, cp, II, are L-equivalent if e(cp) = e($) for any real-valued Lukasiewicz
evaluation e. Neglecting the difference between clas.sica1 and many-valued
equivalence of forlnulas tins been tlie source of known misunderstandings concerning
fuzzy logic. Clearly, if two forliiulas are L-equivalent then they are classically
equivalent, but the converse does not hold. On the otlier hand, a (finitely additive)
probubilitg on formulas is a niapping P assigning to each forlnula -cp a real number

17
P(cp) in [0,1] preserving clnssical equivalence (i.e. if cp, Ij, are classically equivalent
then P(p) = P($)) and satisfying the well known conditions: P(true) = 1, P( f alse) = 0,
and if pA$ is classically equivalent to false then P(PV$) = P(cp)+P($). Here true is a
classical identically true for~nula, e.g. p --, p, false is -true, cp V 1/, is (cp --, $) --, 1/,
(this is a possible definition of disjunction frorn implication) and cpAll, is -(-cpV-ll,).
In other words, a probability is in fact a function on the Boolean algebra of classes of
classically equivalent for~iiulas. Can the probability of a formula be understood as t h
e t r u t h degree of the same formula ? Clearly not in the truth-functional case: just
because probabilities are not truth-functional. However this is possible in the non-truth
functional case. Let us mention for instance tlie paper [Gerla, 19941, where the author
exhibits an abstract, non-truth functional fuzzy logical systeln whose set of
interpretations consists of all probabilities on the set of all formulas and presents a
cotilplete deductive system for this. Can we understand the probability of a formula as
the truth degree of another one ? Our claini is that we can when the other formula
expresses solnetlling like that the former one is "prob able". Tliis is the heart of our
approach. Probability preserves classical equivalence and therefore "understands"
forlnulas as crisp propositions. But prob ability is just a variable (like pressure,
temperature, etc.) and we liiay make fuzzy assertions on it: if cp is any formula we may
say ('9 is probable" or L'pmbabilikg-of-cp is I~igh", and these are typical fuzzy
propositions. Such approach was suggested in [~ajek and Harmancova, 1994); fuzzy
propositions about probabilities are also discussed in [Zimnermann, 19911. Our aim is
to describe a fuzzy theory in the frame of the truthfunctional Lukasiewicz-Pavelka's
logic which naturally relates to probability theory. Notice that our approach will clearly
distinguish between propositions like "(cp is probable) and ($ is probable)" on the one
hand and "(cp A 41) is probable" in the other. Fuzzy theories and their logic Following
Pavelka [Pavelka, 19791, we define a fwzy theory to be just a fuzzy set of formulas: if
T is a fuzzy theory and T(cp) = x (denoting that the membership degree of cp to T is
x) then 9 is an axiom to the degree x. Semantics is given by a set Sem of fuzzy sets of
forlnulas; each elenlent M of Sem is understood as an interpretation of the language,
i.e. M(cp) = x is read as "cp is true in M to the degree x" . M is a model of T if for any

18
cp, M(cp) 2 T(cp), i.e. each formula is at least as mucli true in M as the T-degree of
axiomness demands. 111 a trutll-frmctio~lal approach, Sem is tlie set of all evaluations
of formulas obtained froln evaluations of propositional variables by means of some
particular truth functions, e.g. the Lukasiewicz truth functions +,- above mentioned.
But let us stress that other choices which lead to non-truth functional systems are also
possible. In any case one should try to exhibit some notion of proof and try to prove
some complete ness result. The paper is organized as follows. After this intre duction
we survey in Section 2 the Rational Pavelka's. Logic - a generalization of Lukasiewicz's
logic discovered by Pavelka and sinlplified by Hdjek. In Section 3 we present our fuzzy
tlieory of probability and prove a completeness result. In Section 4 we colnnlent on
possible extensions and uses of the proposed approach. Finally, Section 5 coritains
some discussion on open problems and concluding remarks [Dubois and Prade, 1993].

19
Chapter3
Fuzzy system and application
Fuzzy Expert Systems
To date, fuzzy expert systems are the most common use of fuzzy logic. They are used
in several wide-ranging fields, including:
 Linear and nonlinear control.
 Pattern recognition.
 Financial systems.
and many others.

What is a Fuzzy Expert System?


Put as simply as possible, a fuzzy expert system is an expert system that uses fuzzy
logic instead of Boolean logic. In other words, a fuzzy expert system is a collection of
membership functions and rules that are used to reason about data. Unlike conventional
expert systems, which are mainly symbolic reasoning engines, fuzzy expert systems
are oriented toward numerical processing. The rules in a fuzzy expert system are
usually of a form similar to the following: if x is low and y is high then z = medium
where x and y are input variables (names for know data values), z is an output variable
(a name for a data value to be computed), low is a membership function (fuzzy subset)
defined on x, high is a membership function defined on y, and medium is a membership
function defined on z. The part of the rule between the "if" and "then" is the rule's
_premise_ or _antecedent_. This is a fuzzy logic expression that describes to what
degree the rule is applicable. The part of the rule following the "then" is the rule's
_conclusion_ or _consequent_. This part of the rule assigns a membership function to
each of one or more output variables. Most tools for working with fuzzy expert systems
allow more than one conclusion per rule. A typical fuzzy expert system has more than
one rule. The entire group of rules is collectively known as a rulebase or knowledge
base.

20
The Inference Process
With the definition of the rules and membership functions in hand, we now need to
know how to apply this knowledge to specific values of the input variables to compute
the values of the output variables. This process is referred to as [inferencing]. In a fuzzy
expert system, the inference process is a combination of four subprocesses:
[fuzzification], [inference], [composition], and [defuzzification]. The defuzzification
subprocess is optional.
For the sake of example3.1 in the following discussion, assume that the variables X,
Y, and Z all take on values in the interval [ 0, 10 ], and that we have the following
membership functions and rules defined below.
low(t) = 1 - t / 10 ; 0 <= t <= 10
high(t) = t / 10

Fuzzy Membership Functions

1.2

1
degree of membership

0.8

low(t)
0.6
high(t)

0.4

0.2

0
0 2 4 6 8 10 12
t

Fig. 1: Membership functions for LOW and HIGH fuzzy sets.

rule 1: if X is low and Y is low then Z is high


rule 2: if X is low and Y is high then Z is low

21
rule 3: if X is high and Y is low then Z is low
rule 4: if X is high and Y is high then Z is high
Notice that instead of assigning a single value to the output variable Z, each rule assigns
an entire fuzzy subset (low or high).
Notes:
1. In this example, low(t)+high(t)=1.0 for all t. This is not required, but it is fairly
common.
2. The value of t at which low(t) is maximum is the same as the value of t at which
high(t) is minimum, and vice-versa. This is also not required, but fairly common.
3. The same membership functions are used for all variables. This isn't required,
and is also not common.
Solved Example3.1
Let: X = 0.0 and Y = 3.2
Find the fuzzy membership function of the output variable Z, and hence find its crisp
value.

To solve this example, the following four steps should be done in sequence.
Step 1: Fuzzification
In the fuzzification subprocess, the membership functions defined on the input
variables are applied to their actual values, to determine the degree of truth for each
rule premise. If a rule's premise has a nonzero degree of truth (if the rule applies at
all...) then the rule is said to [fire].

Degree of µL µH
Membership
X 1.00 0.0
Y 0.68 0.32

Note that to compute µL(X) and µL(Y) we substitute in the equation {low(t) = 1 - t /

10} using values of {t} equals 0.0 and 3.2, respectively. Similarly, to compute µH(X)

22
and µH(Y) we substitute in the equation { high(t) = t / 10} using the same values of
{t}. Sometimes it is easier to have the membership functions in a tabulated form, and
you just look-up the given tables.
Step 2: Inference
In the inference subprocess, the truth value for the premise of each rule is computed,
and applied to the conclusion part of each rule. This results in one fuzzy subset to be
assigned to each output variable for each rule. The table below shows that we get µH(Z)
= 0.68 from rule 1, and µL(Z) = 0.32 from rule 2.
Activated Rules ANDing of Antecedents µL(Z) µH(Z)
1 min(1.00, 0.68) - 0.68
2 min(1.00, 0.32) 0.32 -

There are two [inference methods] or [inference rules]: [MIN] and [PRODUCT].

 In MIN inferencing, the output membership function is clipped off at a height


corresponding to the rule premise's computed degree of truth. This corresponds
to the traditional interpretation of the fuzzy logic AND operation.
 In PRODUCT inferencing, the output membership function is scaled by the rule
premise's computed degree of truth.

For example, let's look at rule 1 for x = 0.0 and y = 3.2. As shown in the table above,
the premise degree of truth works out to 0.68. For this rule, MIN inferencing will assign
z the fuzzy subset defined by the membership function (refer also to Fig. 2):
µ(Z) {from rule1} = { Z / 10, if Z <= 6.8; and = 0.68, if Z >= 6.8 }
Note: In most texts, the term "inference method" is used to mean the combination of
the things I'm referring to separately here as "inference" and "composition." Therefore,
you'll see terms such as "MAX-MIN inference" and "SUM-PRODUCT inference" in
the literature. They mean the combination of MAX composition and MIN inference,
or SUM composition and PRODUCT inference respectively, to use my terminology.

23
You'll also see the reverse terms "MIN-MAX" and "PRODUCT-SUM" - these mean
the same things as the reverse order. I think it's clearer to describe the two processes
separately.
Using the MIN inferencing method, the components of µ(Z) obtained from both rule
1 and rule 2 are shown in Fig. 2. Both rule 3 and rule 4 are not fired because their
premises has a zero degree of truth, and hence they will not add any component to
µ(Z). The following are the equations for the four components of the output
membership function µ(Z).
µ(Z) {from rule1} = { Z / 10, if Z <= 6.8; and = 0.68, if Z >= 6.8 }
µ(Z) {from rule2} = { 0.32, if Z <= 6.8; and =1 - Z / 10, if Z >= 6.8 }
µ(Z) {from rule3} = 0.0
µ(Z) {from rule4} = 0.0

Z-Membership from Rules 1 and 2 - MIN INFERENCE

0.8

0.7
Membership Functions for Z

0.6

0.5
Rule 1:Fz(t)
0.4
Rule 2:Fz(t)
0.3

0.2

0.1

0
0 2 4 6 8 10 12
t

Fig. 2: Membership function of the output Z using rule #1, #2 with MIN inference.
For the same conditions (rule 1: x = 0.0 and y = 3.2), PRODUCT inferencing will
assign Z the fuzzy subset defined by the membership function:
µ(Z) {from rule1} = 0.68 * high(Z); and = 0.068 * Z

24
Step 3- Composition
In the composition subprocess, all of the fuzzy subsets assigned to each output variable
are combined together to form a single fuzzy subset for each output variable.
There are two common composition rules: MAX composition and SUM composition.
 In MAX composition, the combined output fuzzy subset is constructed by taking
the pointwise maximum over all of the fuzzy subsets assigned to the output
variable by the inference rule.
 In SUM composition the combined output fuzzy subset is constructed by taking
the pointwise sum over all of the fuzzy subsets assigned to the output variable
by the inference rule.

Note that the SUM composition can result in truth values greater than one! For this
reason, SUM composition is only used when it will be followed by a defuzzification
method, such as the CENTROID method, that doesn't have a problem with this odd
case.
MAX composition would result in the following fuzzy subset (Fig.3).
µ(Z) = { 0.32, if Z <= 3.2
Z / 10, if 3.2 <= Z <= 6.8
0.68, if Z >= 6.8 }

{Solution using MIN inference and MAX composition}


After completing the MIN inference process, we proceed to compose the
membership function µ(F) of the variable Z. From step 2 we find that:
1. The maximum value of µ L(Z) is 0.32, then we draw the first component
of the required membership function µ(Z) by clamping the function
µL(Z) at level 0.32.
2. The maximum value of µH(Z) is 0.68, then we draw the second
component of the required membership function µ(Z) by clamping the
function µH(Z) at level 0.68.

25
3. The required membership function of the output µ(Z) is obtained by
taking the maximum values of the above-mentioned two components.

Fz(t) Obtained From ALL Rules - MAX COMPOSITION

0.8
0.7
0.6
0.5
Fz(t)

0.4 Fz(t)
0.3
0.2
0.1
0
0 2 4 6 8 10 12
t

Fig. 3: Membership function of the output Z using rules #1, 2, 3, 4.


{Using MIN inference and MAX composition}

Alternative Solution
An alternative solution for steps 2 (Inference) and 3 (Composition) is to use
PRODUCT inference with MAX composition. This solution is shown in Fig. 4 and
Fig. 5, respectively. These diagrams are obtained as follows:
 PRODUCT inferencing would assign the following four fuzzy subsets to Z:
µ(Z) {from rule1} = 0.068 * Z
µ(Z) {from rule2} = 0.32 - 0.032 * Z
µ(Z) {from rule3} = 0.0
µ(Z) {from rule4} = 0.0

 SUM composition would result in the fuzzy subset:


µ(Z) = 0.32 + 0.036 * Z

26
Z-Membership from Rules 1 and 2 - PRODUCT INFERENCE

0.8

0.7
Membership Functions for Z

0.6

0.5
Rule 1:Fz(t)
0.4
Rule 2:Fz(t)
0.3

0.2

0.1

0
0 2 4 6 8 10 12
t

Fig. 4: Membership function of the output Z using rule #1, #2 with PRODUCT
inference.

Fz(t) Obtained From ALL Rules - SUM COMPOSITION

0.8
0.7
0.6
0.5
Fz(t)

0.4 Fz(t)
0.3
0.2
0.1
0
0 2 4 6 8 10 12
t

Fig. 5: Membership function of the output Z using rules #1, 2, 3, 4.


{Using PRODUCT inference and SUM composition}
Step 4- Defuzzification
Sometimes it is useful to just examine the fuzzy subsets that are the result of the
composition process, but more often, this fuzzy value needs to be converted to a single
number - a crisp value. This is what the defuzzification subprocess does.

27
There are many defuzzification methods and there is a short paper that compared
roughly thirty defuzzification methods. Two of the more common techniques are the
CENTROID and MAXIMUM methods.

 In the CENTROID method, the crisp value of the output Z is obtained by


computing the centroid of the area under the composed membership curve.
Approximately the centroid can be computed from the following formula, where
(x) represents the values on the horizontal X-axis, and µ represents the
corresponding values on the vertical Y-axis.

C =  { x . µ(x) } /  µ(x)
 In the MAXIMUM method, one of the variable values at which the fuzzy subset
has its maximum truth value is chosen as the crisp value for the output variable.
There are several variations of the MAXIMUM method that differ only in what
they do when there is more than one variable value at which this maximum truth
value occurs. One of these, the AVERAGE-OF-MAXIMA method, returns the
average of the variable values at which the maximum truth value occurs.
For example, go back to our previous examples. The following table shows the output
crisp value as computed using four different methods (refer to Fig. 3 and Fig. 5). It is
clear that the centroid methods give decent values for both inference methods.
{Inference / Composition} CENTROID Average of Maxima
MIN / MAX Z = 5.88 Z = (6.8+10)/2 = 8.4
PRODUCT / SUM Z = 5.624 Z = 10
Note: sometimes the composition and defuzzification processes are combined, taking
advantage of mathematical relationships that simplify the process of computing the
final output variable values.
-Ruel.V. Churchil. James.W. Brown. Roger. F. Verhey. 1974 .

28
Reference
1-Fuzzy models for pattern recognition.IEEE Press, 1992.James C. BEZDEK & Sanker K. PAL.
2- Fuzzy sets and systems: Theory and applications.Academic Press 1980, Mathematics in Sciences
and Engineering vol. 144.D. DUBOIS, H. PRADE.
3- Evaluation subjective ; méthodes, applications et enjeux.Les cahiers des clubs CRIN, club CRIN
logique floue.
4- A.I. and expert system myths, legends and facts. IEEE Expert 02/90, pp 8-20, 29 réf.
M.S. FOX.
5-La logique floue et ses applications.Addison-Wesley, 1995.Bernadett
6- A B. PATKI, G. V. RAGHUNATHAN, ‘Trends in Fuzzy Logic Hardware’, JCIS, Sep. 28-Oct.1,
1995 North Carolina U.S.A.
7- BIMAL K. BOSE, ‘Expert System, Fuzzy Logic and Neural Network Applications in Power
Electronics and Motion Control.Proceedings of the IEEE, Vol.82, No. 8, August 1994.
8-CHUEN CHIIEN LEE, ‘Fuzzy Logic in control System: Fuzzy Logic Controller- Ports I & II’,
IEEE Transactions on Systems Man and Cybernetics Vol. 20, No.2, March/Apri
9- S. BADRINATH, D. K. ANVEKAR, B. S. SONDE, ‘Fuzzy Logic Based
Handover Prioritization in Mobile Cellular Communication System’, Proc.
National Symposium on Communications-2001, IETE, Chandigarh, Dec. 1995.
10- A. Q. Ansari, ‘Multiple Valued Logic Versus Binary Logic,’ C. S. I.
Communications, India, Vol.20, No.5, pp.30 – 31, November 1996

[Dubois and Prade, 19931 DUBOIS D., AND PRADE H. Fuzzv sets and ~robabilitv:
Misunderstanding, bridges and gaps. In roc, Second IEEE Int. Conf. on fizzy Systems (San
Francisco, 1993), pp. 1059-1068.

29
‫لوَجيكي ليَل (نارِون)‬
‫پرۆژەی دەرچوونە‬
‫پێشكەش بە بەشی ماتماتيك كراوە‪ ،‬وهك بهشێك لهپێداویستهكانی‬
‫بهدهستهێنانی بڕوانامهی بهكالۆریۆس له زانستی ماتماتيك‬

‫ئامادەكراوە لەالیەن‪:‬‬
‫عمر حسێن عمر‬

‫بهسهرپهرشتی‪:‬‬
‫د‪.‬هۆگر محمد یاسين‬

‫ئايار– ‪2021‬‬

You might also like