M odels for Inexact Reasoning Fuzzy Logic Lesson 8 Fuzzy - - PowerPoint PPT Presentation
M odels for Inexact Reasoning Fuzzy Logic Lesson 8 Fuzzy - - PowerPoint PPT Presentation
M odels for Inexact Reasoning Fuzzy Logic Lesson 8 Fuzzy Controllers M aster in Computational Logic Department of Artificial Intelligence Fuzzy Controllers Fuzzy Controllers are special expert systems KB expressed in terms of fuzzy
Fuzzy Controllers
- Fuzzy Controllers are special expert systems
– KB expressed in terms of fuzzy inference rules – Use of an inference engine
- FC can use knowledge elicited from human
- perators (conversely to classical control)
– This is crucial in many control problems due to
- Difficult or impossible to build precise mathematical models
- Acquired models are difficult or expensive to use
– Nonlinearities, – Time-varying processes – Difficulty to obtain precise measurements from sensors, etc.
Fuzzy Controllers
- Knowledge of an experienced human can
substitute precise, mathematical models – Often this knowledge is difficult or impossible to
express in precise terms
– However, an imprecise linguistic description can
be easily articulated by the operator
- Example:
IF the temperature is very high AND the pressure is slightly low THEN the heat change should be slightly negative
Typical Architecture of a FC
Operative Cycle of a FC
- A FC operates by repeating the cycle:
1. M easurements are taken of all relevant variables 2. Fuzzification: conversion of the measurements into fuzzy sets to express their uncertainties 3. Fuzzified measurements are used by the inference engine to evaluate the control rules
- The result of this evaluation is one or more fuzzy sets
defined on the universe of possible actions
4. Defuzzification: the outcome is converted into a single crisp value (best representative of the fuzzy set)
Design of Fuzzy Controllers
- Step 1: Identification of I/ O variables
– Range their values – Select meaningful linguistic states for each
variable
- Use fuzzy numbers to carry out this task
- Examples:
– Approximately zero – Positive small – Negative small, etc.
Step 1: Example
- Let us suppose we have identified the
following variables: [ ] [ ] [ ]
Input: , , , Output: , e a a e b b v c c ∈ − ∈ − ∈ − &
- We have identified seven linguistic states for
each of the three variables
NL – Negative Large PL – Positive Large NM – Negative M edium PM – Positive M edium NS – Negative Small PS – Positive Small AZ – Approximately Zero
Step 1: Example
- Possible fuzzy quantization of the range [-a, a]
by triangular-shaped fuzzy numbers
Step 2: Fuzzification
- In this step a fuzzification function is introduced
for each input variable
[ ]
: ,
e
f a a − → ℜ
- ℜ denotes the set of all fuzzy numbers
- fe(x0) is a fuzzy number chosen by fe as a fuzzy
approximation to measurement e = x0
- In some applications measurements are not
fuzzified
- They are used directly as facts
Fuzzification: Example
ε is a parameter to be tuned Other shapes can be used instead of triangular functions
Step 3: Design of the KB
- In this phase, control knowledge is formu-
lated in terms of fuzzy inference rules
- Two possibilites:
– Elicit the rules from experienced human operators – Learn the rules from empirical data by suitable
learning methods
- M ost often using artificial neural networks
- Canonical form of rules:
If and , then , , are fuzzy numbers chosen from the linguistic states e A e B v C A B C = = = &
Example: Design of the KB
Step 4: Design of the Inference Engine
- Rules in the KB can be expressed as:
( ) ( ) ( )
( )
( )
If , is then is , where: , min , , ( )
A B A B e e
e e A B v C x y x y e e f x f y µ µ µ
×
× = = × & &
- Then, we obtain the following:
( ) ( )
1 1 1 2 2 2
Rule 1: If , is , then is Rule 2: If , is , then is Rule n: If , is , then is Fact: , is
n n n e e
e e A B v C e e A B v C e e A B v C e e f x f y × × × × ===== & & K K K K K K K K K K K K K K K K K K & & Conclusion: is v C ==========================
- Inferences: Interpolation method
Step 5: Defuzzification
- Purpose: convert each conclusion (fuzzy set)
into a single real number (crisp)
- The resulting number defines the action to be
taken by the fuzzy controller
- Different defuzzification methods
– Center of area (aka center of gravity) – Center of maxima – M ean of maxima
Example: Stabilization of an Inverted Pendulum
Knowledge Base (tuned)
Fuzzy Rule Base
Inference with Crisp Observations
Inference with Fuzzified Observations
Real World Applications
- Sendai Railway (Japan)
– Use of FC to control accelerating, braking and
stopping
- Industrial and Consumer Applications