Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Contents
Introducing Fuzzy Systems
Fuzzy Sets and Membership Functions
Fuzzy Function
Introducing Fuzzy Logic
Fuzzy Operand
IF-THEN Rule
Fuzzy Inference
Matlab Fuzzy Logic Toolbox
FIS Editor
Simulink Fuzzy Controller
Summery
1
What is Fuzzy Logic?
How important is it to be exactly right when a rough
answer will do?
So far as the laws of mathematics refer to reality, they are
not certain. And so far as they are certain, they do not refer to
reality. Albert Einstein
As complexity rises, precise statements lose meaning and
meaningful statements lose precision. Lotfi Zadeh
Fuzzy Systems
Fuzzy Systems are most human oriented knowledge-
based systems
Fuzzy variables : Linguistic variables
Fuzzy Propositions
IF-THEN Rules
2
Membership Function
Deterministic variable
1 x A
A ( x) =
0 x A
Fuzzy variable
A = set of tall men A (x)
1
Fuzzy Function
3
Fuzzy Logic
Fuzzy Operands:
Fuzzy Complement
C (0) = 1, C (1) = 0
C ( A ) = A
a < b C (a ) > C (b)
Fuzzy Aggregation
S (0, a ) = S ( a,0) = a, S (1, a ) = 1
S ( a, b) = S (b, a )
S ( A , B ) = AU B
a < a ' , b < b ' S ( a , b ) < S ( a ' , b ' )
S ( S (a, b), c) = S (a, S (b, c))
Fuzzy Companion
T (1, a ) = T ( a,1) = a, T (0, a ) = 0
T ( a, b) = T (b, a )
T ( A , B ) = AI B
a < a ' , b < b ' T ( a , b ) < T ( a ' , b ' )
T (T ( a, b), c) = T ( a, T (b, c))
Fuzzy Logic
Some examples of Fuzzy Operands:
Fuzzy Complement
1
CW (a ) = (1 aW ) W
Fuzzy Aggregation
1
SW ( a, b) = min(1, ( aW + bW ) W )
Fuzzy Companion
1
TW (a, b) = 1 min 1, ((1 a)W + (1 b)W ) W
4
Fuzzy Linguistic variables
A Fuzzy phrase consist of :
Fuzzy Variable such as Hot, Tall, Fast,
Fuzzy Adverbs such as Very , More or less,
we can define:
very A = ( A ) 2
more / less A = A
IF-THEN Rules
5
Fuzzy Inference
Deterministic Logic have its Inferences such as:
1- IF ( x is A ) THEN ( y is B )
2- x is A
So:
y is B
6
Matlab Fuzzy Toolbox
Matlab Fuzzy Toolbox consist of tow useful Tools:
FIS Editor:
This Editor in combination with 4 other editors
provides a powerful environment to define and
modify Fuzzy Inference System (FIS) variable
Fuzzy Controller:
This is a block in Fuzzy Toolbox Library in Simulink
environment. This Block admits FIS variable produced
by FIS Editor and implements the desirable rules
Modifying Input/Output
Membership functions
Visualization of
Relationship
7
FIS Diagram
To implement a Fuzzy Inference System, five steps must
be followed :
1. Fuzzification using input membership functions
2. Apply Fuzzy Operand
3. Apply Implication method on each rule
4. Aggregate all Outputs
5. Defuzzification of output set
FIS Editor
Double Click to load other Editors
Add or Remove
Input or Output
Change or
Modify
Inference
settings
8
Membership Function Editor
Change parameter by dragging and scrolling
Add or Remove
Membership
Functions
to or from any
Input or Output
Set Membership
Function
parameters
Manually
Rule Editor
Rule
List
Outputs
Membership
Functions
Inputs
Membership
Functions
Connectors
9
Rule Viewer
Output
Input Values
Values
Output
Sets
Scroll to
Change
Input Values
Surface Viewer
Change
Surface
View settings
Output
Selector
Input
Selector
10
FIS Editor Benefits
Easily Define and modify a Fuzzy system
Simply Add or Remove Inputs and/or Outputs
Set or modify Inference methodes
Simply add or remove Membership functions and easy
management of functions parameters
Easy Rule definition and modification
Great visualization area for FIS Diagram
2-D visualization of Inference for any Input pairs to any Output
11
ANFIS Editor
Input Data and
Trained results
Training
Data to be
Parameters
Loaded
Feedback
Path
12
Summery
Prof. Lotfi Zadeh says : In almost every case you can
build the same product without fuzzy logic, but fuzzy is
faster and cheaper
When using Fuzzy?
fuzzy logic is a convenient way to map an input space to an output
space. If you find its not convenient, try something else
When you know Input/Output relationship clearly, FIS
Editor and 4 other editors help you to implement your
knowledge, using simulink Fuzzy controller block
If you just know some distinct Input/Output points, ANFIS
Editor helps you to train your Membership functions
parameters to adjust all desired points
13