Вы находитесь на странице: 1из 54

Fuzzy Sets and Systems

Lecture 6
(Fuzzy Inference Systems)
Bu
- Ali Sina University
Computer Engineering Dep.
Spring 2010

Outline

Fuzzy inference system


Fuzzifiers
Defuzzifiers

Fuzzy Systems with Fuzzifier and Defuzzifier (Fuzzy inference)

Fuzzy Rule Base

Fuzzifier
x in U

Fuzzy Inference
Engine

Fuzzy Sets in U

U =U1 LUn Rn

Defuzzifier

Fuzzy Sets in V

y in V

V R

Fuzzy inference systems

Fuzzifiers (construction of fuzzy sets)


With experts knowledge (Direct and indirect
methods)
Direct methods: Experts give answers to questions that
explicitly pertain to the constructed membership function.
Indirect methods: Experts answer simpler questions, easier to
answer, which pertain to the constructed membership function
only implicitly.

Direct method with one expert and multiple experts


An expert is expected to assign to each given element x
X a membership grade A(x) that, according to his or her
opinion, best captures the meaning of the linguistic term
represented by the fuzzy set A.
When a direct method is extended from one expert to
multiple experts, the opinions of individual experts must
be appropriately aggregated. One of the most common
methods is based on a probabilistic interpretation of
membership functions.
Or

where

Indirect methods with one and multiple experts


Let xl, x2, . . . , xn, be elements of the universal set X for which
we want to estimate the grades of membership in A.
our problem is to determine the values ai = A (x,) for all i 4 N.
Instead of asking the expert to estimate values ai directly, we
ask him or her to compare elements x1, x2, . . . , xn, in pairs
according to their relative weights of belonging to A.

The pairwise comparisons is


And with simplication we have

Construction from sample data


Lagrange interpolation
Least square curve fitting
Construction by neural network
Construction by genetic algorithm
In each of the discussed methods, we assume that
n sample data:

Lagrange curve fitting

Example
For this data samples:
We have

Least square curve fitting


in this method we chose f
where E is minimized:
One of the best choice is
the bell function:
Therefore the membership
function is:
Another choice is the
trapezoidal function:

Example

By NN
In general, constructions by neural networks are
based on learning patterns from sample data.

Defuzzifiers
Defuzzifier :
Defined as a mapping from fuzzy set B' in V
crisp point y* V.

R to

Conceptually, the defuzzifier is to specify a point in V


that best represents the fuzzy set B'.
This is similar to the mean value of a random variable.
Since the B' is constructed in some special ways,
A number of choices there are in determining this
representing point.

Defuzzify: calculate a single-valued output estimate


(the best representative point within the aggregate).

Defuzzification

Defuzzifiers
Mean of maximum (MOM)
Center of area (COA)
The height method

Mean of maximum (MOM)


Calculates the average of those output values
that have the highest possibility degrees

Defuzzification
Maximum Defuzzification Technique
This method gives the output with the highest membership function.

A ( x* ) A ( x)

for all x in X

1
0.9

X* 25

50

Center of area (COA)


Calculate the center-of-gravity (the weighted
sum of the results)

Defuzzification
Centre of gravity (COG):
COG =

( 0 + 10 + 20 ) 0.1 + (30 + 40 + 50 + 60 ) 0.2 + ( 70 + 80 + 90 + 100 ) 0.5


= 67 .4
0 .1 + 0 .1 + 0 .1 + 0 . 2 + 0 . 2 + 0 .2 + 0 .2 + 0 .5 + 0 . 5 + 0 .5 + 0 .5

Degree of
Membership
1.0
0.8
0.6
0.4
0.2
0.0
0

10

20

30

40

50

60

70
67.4

80

90

100
Z

Center of Gravity Defuzzifier

The height method


Convert the consequent membership function
Ci into crisp consequent y = ci

wi is the degree to which the ith


rule matches the input data

0.9
0.5

Approximate Reasoning

Outline
Approximate Reasoning
Fuzzy expert systems
Fuzzy Implication
Selection of fuzzy implication
Multi-conditional approximate reasoning

Expert system
Expert system:

Knowledge base

Is represented by a set of fuzzy rules.


They have the form if A then B, where A and B are fuzzy sets.

Database

is to store data for each specific task of the expert system.

Inference engine

Operates on a series of rules and makes fuzzy inferences in two


approaches:
Data-driven (modus ponens).
Data are supplied to the expert system, to evaluate relevant
production rules and draw all possible conclusions.
Goal-driven (modus tollens).
Data specified in the IF clauses of production rules are searches that will

lead to the objective;


these data are found either in the knowledge base, in the THEN clauses
of other production rules, or by querying the user.

Fuzzy expert system


The inference engine may use knowledge regarding the
fuzzy production rules in the knowledge base.
This type of knowledge, is named meta knowledge.
The meta knowledge unit contains rules about the use
of production rules in the knowledge base.

The knowledge acquisition module, which is included only in


some expert systems, makes it possible to update the
knowledge base or meta knowledge base through interaction
with relevant human experts.

Approximate Reasoning

Reasoning based on fuzzy production


rules, which is usually referred to as
approximate reasoning.

Fuzzy Implication
Implication is essential for approximate reasoning.
A fuzzy implication, is a function of the form:

which for any possible truth values a, b of given fuzzy propositions p , q,


defines the truth value, y(a, b), of the conditional proposition "if p, then q."
This function should be an extension of the classical implication, p B q,
from (0,1) to the [0,1] of truth values in fuzzy logic.

Fuzzy Implication
IF A THEN B
In Boolean logic:
A
B
if A is true then B is true
In fuzzy logic: A
B
if A is true to some degree then B is true to
some degree.
0.5A => 0.5B (partial premise implies partially)

Implication Operators
As with intersection, union and complement we can define
implication functions on fuzzy sets.
We can generate an implication function I by assuming:

= A

a, b [0,1] I (a, b) = S (1 a, b)

Classical implication

S Implications (obtained from 11-2)

Implication
I=max(1-a,b)
1.
2.
3.
4.

IF 1+1=2, THEN 4>0 I=Max(1-1,1)=Max(0,1)=1


IF 1+1=3, THEN 4>0 I=Max(1-0,1)= Max(1,1)=1
IF 1+1=3, THEN 4<0 I=Max(1-0,0)= Max(1,0)=1
IF 1+1=2, THEN 4<0 I=Max(1-1,0)= Max(0,0)=0

In the forth case, a true hypothesis cannot produce


a false conclusion.

R implications (obtained from 11-4)

QL implications (Obtained from 11-7)

Combined implications

Mandami Implication
The most popular implication operator in fuzzy control is:
I(a,b)=min(a,b)
Of course, this is really a relation of intersection rather than implication

However it is the relation suggested by Zadeh and used in all


the earliest fuzzy control models (esp Mandami et al)
It has some significant advantage in minimising the
computational complexity if fuzzy inference.

Axioms of fuzzy implication

Fuzzy implication

Selection of fuzzy implication


Fuzzy inference:

Let us begin with the generalized modus ponens. According to this fuzzy
inference rule, given a fuzzy proposition and a fact "X is A'," we conclude
that "Y is B by the compositional rule of inference

If we assume A=A and B=B:

Any fuzzy implication suitable for approximate reasoning based on the


generalized modus ponens should satisfy this relation for arbitrary fuzzy
sets A and B.
The following fuzzy implications satisfy the relation for any t-norm i:

fuzzy implications suitable for approximate reasoning based upon the


generalized modus tollens should satisfy the equation

For the generalized hypothetical syllogism, the


following equation must be satisfied:

Multiconditional approximate reasoning


The general schema of multiconditional approximate reasoning has
the form:

This kind of reasoning is typical in fuzzy logic controllers

The most common way to determine B' is referred to as a method of


interpolation. It consists of the following two steps:

Mamdani Implication

Вам также может понравиться