Sunteți pe pagina 1din 15

Engineering Systems Design and Analysis

(ENG 504)
504)
Lecture 6
/


Email: amhm@zu.edu.eg / amhm162@gmail.com
Webpage: http://www.staff.zu.edu.eg/amhm/

In the previous lectures

Expert systems
Propositional logic
Predicate logic

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

2013/2014

Agenda

Expert systems
Propositional logic
Predicate logic
Fuzzy logic

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

Fuzzy Logic

2013/2014

Fuzzy Logic

Flexible machine learning technique.


Fuzzy logic is a multi-valued logic and allow intermediate values to be defined.
Propositional logic and predicate logic are called two-valued logic.
Fuzzy systems are suitable for uncertain or approximate reasoning.

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

2013/2014

Fuzzy Logic

The notion of fuzzy sets was introduced first by Lotfi Zadeh in 1965.
Fuzzy logic operations are based on operations over fuzzy sets.
Fuzzy propositions are no more true or false only, but they have grayness of
truth defined by the fuzzy values in them.
The fuzzy connectives are the same as in propositional logic.
The truth-values of the complex propositions are defined by the fuzzy
membership function.

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

2013/2014

Fuzzy Logic characteristics

Every thing is a matter of degree.


Exact reasoning is a special case of approximate reasoning.
Knowledge is represented as a collection of fuzzy constraints (sentences)
on a collection of variables.
Inference is viewed as a process of propagating elastic constraints.
Any (crisp) logic system can be fuzzified.

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

2013/2014

Fuzzy Logic characteristics

The goal is to provide foundations for approximate reasoning using imprecise


propositions based on fuzzy set theory.
Fuzzy logic allows the imprecise linguistic terms such as:
Fuzzy predicates:
old, rare, severe, expensive, high, fast
Fuzzy quantifiers:
many, few, usually, almost, little, much
Fuzzy truth values:
very true, true, unlikely true, mostly false, false, definitely false.

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

2013/2014

Set Theory

Classical Set Theory

Some elements that share some property or relationship construct a set:


Set of even numbers: {2, 4, 6, 8, 10,}
Set of colors: {black, white, red, green, blue, yellow}
Set of elements: A={a1, a2, a3}
Is this entity (element) a member of that set?
Answer is Yes or No.
There is no partial memebership!.
But Fuzzy sets accept partial memberships, and thus they are extensions for
the classical sets.
This is the case in many real-world application.

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

2013/2014

Classical Set Theory

Some concepts:
Given a set S:={2,3,5,7,11,13}
S1={2,7,13} is a subset of S, expressed as: S1 S
3 belongs to S, expressed as: x S
4 does not belong to S, expressed as: x S
For any set A, the characteristic function of A is defined by:

1, if x A
X A ( x) =
0, if x A

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

Classical Set Theory

2013/2014

Some concepts:
Given two sets A, B, then
Intersection: A B = {c | c A and c B}
Union: A B = {c | c A or c B}
Difference: A-B= {c | c A and c B}
There are many other operations
Basic notion of measure on sets:
We can apply a certain function to all elements of a set, then each member
has a measure.

: A [0, ]

is a nonnegative real valued function.

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

2013/2014

Classical Set Theory

10

Example:
A={room1,room2,room3,room4}
represents the temperature, then
(room1)=27, (room2)=22, (room3)=29.5, (room4)=37 .
This measure has some characteristics like natural measure, trivial measure,
finite measure,.

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Fuzzy Sets

Zagazig Univ-Eng. Faculty

2013/2014

Fuzzy Set Theory

11

For a fuzzy set, there is a degree of membership.


Example: let S be the set of all human beings, then let
Example

S f = {s | s S and s is old }
Thus, Sf is a fuzzy set because the property old is not well defined and
cannot be precisely measured.
That means that if we have a person who is 40 years old, then it is not clear
that this person belongs to the set Sf or not.
Thus, to make the subset Sf well defined, we have to quantify the concept
old.

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

2013/2014

Fuzzy Set Theory

12

Here is the membership function for Sf

So that we can say:


People above 120 are absolutely old.
Newborns are absolutely young.
A 40-years old person is old with degree 0.5 and young with degree 0.5.

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

2013/2014

Fuzzy Set Theory

13

The 40-years old person cannot be excluded from the set Sf, nor included
completely.
Notice that:
In classical sets: all subsets and their main set share the same
membership function (0-1 valued).
Each fuzzy subset has its own characteristic membership function
(i.e., many fuzzy subsets can be constructed from the same set)

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

Fuzzy Set Theory

2013/2014

14

Example: Let S be the set of all real numbers, and let

S f = {s | s S , s is positive and s is large}


s is positive is well defined proposition.
s is large is vague!
How can we decide if a number belongs to Sf or not?
one suitable characteristic membership function is:

0, if s 0,

S (s) =
f

s
1 e , if s > 0.

Now, the fuzzy subset Sf is well defined.

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

2013/2014

Fuzzy Set Theory

15

The representation of the characteristic function of Sf

Then, we can say:


1000 Sf with degree 0.999999999999 (=1-e -1000)

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

Fuzzy Set Theory

2013/2014

16

Notice that conflicted memberships are acceptable in fuzzy sets.


Example: Temperature degrees:
1
Very low

High

low

very high

0.35
0.2
0

Temperature
5

15

20

100

Here we say that a 20-degree temperature is low with membership value 0.2,
and is very low with membership value 0.35.
Such propositions are not valid mathematically!, but it is OK within fuzzy sets.
Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

2013/2014

Operations on Fuzzy sets

17

AB

AB

Intersection

Union

Complement

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

Fuzzy Systems

2013/2014

Fuzzy System

18

A fuzzy system consists of three parts:


Fuzzification: convert input values into linguistic variables.
Fuzzy rules & Fuzzy inference methods.
Defuzzification: Converts fuzzy output values to actions or decisions.

linguistic variable is a variable whose value is a word or sentence in a


natural language. Ex: Temperature is a linguistic variable if it takes
values like hot, cool, warm, normal,.

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

Fuzzy System

2013/2014

19

User deals only with input and output!

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

2013/2014

Fuzzification

20

The process of transforming bivalued input values into linguistic values.


Steps:
1.

Input values are translated into linguistic concepts, which are


represented by fuzzy set.

2. Memebership functions are applied to the measurements, and the degree


of membership is determined.

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

2013/2014

DeFuzzification

21

Converts the fuzzy values into bivalued (crisp) values.


Methods of defuzzification:
Max-membership method: chooses the element with the maximum value.
Centroid method: finds the center point of the targeted fuzzy region by
calculating the weighted mean of the output fuzzy region.
Others.

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

2013/2014

Fuzzy rules

22
If variable is set Then action.

Examples:
If Temperature is very cold Then stop air conditioner.
If Temperature is normal Then adjust air conditioner.
If Temperature is hot Then start air conditioner.

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

2013/2014

Modeling Fuzzy systems

Step 1: Choose the relative input and output variables.


Step 2: Determine the number of linguistic terms associated with each
input/output variable.
Step 3: Select a specific type of fussy system.
Step 4: Design a collection of fuzzy If-Then rules. The input space is divided
into multi dimensional partitions and actions are assigned to each
partition.

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

2013/2014

Fuzzy Logic Limitations

23

Fuzzy logic lacks of the capability of machine learning.


(not like neural networks).
Verification and validation of a fuzzy knowledge-base system require extensive
testing.
Determining exact fuzzy rules and membership functions is a hard task.

Dr. A. Helmi Eng. Sys. Design and Analysis (ENG 504)

Zagazig Univ-Eng. Faculty

Thanks

2013/2014

S-ar putea să vă placă și