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 inference rules – Use of an inference engine • FC can use knowledge elicited from human operators (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: e a a , , e b b , [ ] ∈ − Output: 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 [ ] − → ℜ f : a a , e • ℜ denotes the set of all fuzzy numbers • f e (x 0 ) is a fuzzy number chosen by f e as a fuzzy approximation to measurement e = x 0 • 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 e A and e B , then v C A B C , , are fuzzy numbers chosen from the linguistic states
Example: Design of the KB
Step 4: Design of the Inference Engine • Rules in the KB can be expressed as: × & If e e , is A B then is , v C where: ( ) ( ) ( ) ( ) µ = µ µ x y , min x , y × A B A B ( ) = × & e e , f ( x ) f y 0 0 e 0 e 0 • Then, we obtain the following: × Rule 1: If e e , & is A B , then is v C 1 1 1 × & Rule 2: If e e , is A B , then is v C 2 2 2 K K K K K K K K K K K K K K K K K K × & Rule n: If e e , is A B , then is v C n n n ( ) ( ) × & Fact: e e , is f x f y e 0 e 0 ===== ========================== 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 – Vacuum cleaners (M atsushita) – Washing machines (AEG) – CCD Autofocus Camera (Canon) – “ Intelligent” Dishwasher (M aytag)
Recommend
More recommend