Introduction to Fuzzy Logic - PowerPoint PPT Presentation

About This Presentation
Title:

Introduction to Fuzzy Logic

Description:

Cars. Subway trains. Digital Image Stabilizer. Where Does Fuzzy logic Work? ... If the room is tool cool, then increase the heating power ... – PowerPoint PPT presentation

Number of Views:173
Avg rating:3.0/5.0
Slides: 29
Provided by: philipd92
Learn more at: http://egrweb.mercer.edu
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Fuzzy Logic


1
Introduction to Fuzzy Logic
  • Philip D. Olivier, Ph.D., P.E.
  • Mercer University

2
  • How to make computers and humans communicate?
  • Li-Xin Wang, A Course in Fuzzy Systems and
    Control, Prentice Hall, 1997

3
Fuzzy Success Stories
  • Cement Kilns
  • Washing Machines
  • Cars
  • Subway trains
  • Digital Image Stabilizer

4
Where Does Fuzzy logic Work?
  • Poor sensors (inexpensive)
  • Complex, nonlinear systems
  • Hard to model systems
  • Systems that humans control well, but are
    difficult to mathematically model

5
Logic
  • Assumes that each statement has a truth-value
  • Provides a calculus for determining the
    truth-value of complicated statements made up
    of many simple statements
  • What is the truth-value of the statement
    It is hot today?

6
IF-THEN Statements
  • Convert to IF-THEN statement
  • IF 90 lt Temp THEN It is hot today.
  • IF 80 lt Temp lt 90 THEN It is warm today.
  • IF 65 lt Temp lt 80 THEN It is comfortable today.
  • IF 50 lt Temp lt 65 THEN It is cool today.
  • IF Temp lt 50 THEN It is cold today.

7
IF-THEN Statements
  • Crisp (Boolean) Logic
  • Many rules One rule for each separate situation
  • One rule fires at a time
  • Example Mathematical functions
  • yf(x)x2
  • IF xa THEN ya2 (IF x2 THEN y4)
  • Fuzzy Logic
  • IF x is close to a THEN y is close to a2
  • Few rules Several rules fire at the same time
  • THEN parts of fired rules are blended
  • Rigorous mathematical foundation

8
Crisp Logic
  • Variables p, q, etc. represent truth values of
    statements that can be either T (true) or F
    (false) nothing else.
  • Example
  • It is hot today
  • Is this true or false?
  • Temp 100F
  • Temp 30F
  • Temp 77F

9
Crisp Logic
  • Introduce a function ?hot(Temp) that determines
    if a given temperature corresponds to hot. The
    output values of the function are limited to 0
    and 1.

10
Mathematizing Crisp Logic
  • Equivalents
  • p AND q ltgt min(p,q)
  • p OR q ltgt max(p,q)
  • (p gt q)ltgt(p AND q) OR NOT(q)
  • Other equivalents also
  • t-norms, s-norms
  • T1, F0
  • p AND q ltgt pq
  • p OR q ltgtpq-pq
  • NOT(p) ltgt1-p
  • (p gt q)ltgt NOT(p) OR q
  • gt means implies
  • ltgt means equivalent

11
Mathematizing AND OR
AND
AND
OR
OR
Differentiable
Non-Differentiable
Other ways to mathematize AND OR also
12
Fuzzy Logic
  • Statements have truth values other than 0 and 1
  • ?hot(90F)1
  • ?hot(80F).5
  • ?hot(70F)0
  • Other curves
  • Typical
  • S-shaped
  • Triangular
  • Z-shaped
  • Trapezoidal
  • Gaussian
  • Etc.

13
Fuzzy Logic
  • Logical combinations of statements using AND, OR,
    NOT, implication, etc are obtained in terms of
    the mathematical formulas (t-norms, s-norms)
  • Choosing the formula is part of the design
    process
  • Common choices
  • Min, max for easy computer implementation
  • , - for continuous functions, allows
    back-propagation, other learning algorithms
  • THEN-parts of firing rules must be blended

14
Fuzzy Logic It is hot today
  • Define a membership function ?hot(Temp) that
    determines to what extent a given Temp is a hot
    temperature.
  • Define another membership function ?cold(Temp)1-
    ?hot(Temp) that determines to what extent a given
    Temp is a cold temperature

15
Membership Functions
16
IF-THEN Rules in Control Engineering
  • View IF-THEN rules as commands
  • When the IF-part is true, perform the action
    specified in the THEN-part
  • Crisp Logic
  • IF-parts are either fully true, or fully false
  • Fuzzy Logic
  • IF-parts can be somewhat true
  • Perform the action specified in the THEN-part to
    the extent that the IF-part is true
  • When more than one rule fires, blend the
    THEN-parts (weighted average, max)

17
Logic based HVAC Control
  • Temp room temperature
  • Heuristic
  • If the room is too warm, then increase the
    chilling power
  • If the room is tool cool, then increase the
    heating power
  • If the room is comfortable, then leave everything
    alone

18
Crisp Logic HVAC Control
  • Separate all expected temperatures into ranges
  • For each range, determine what should be adjusted
    and by how much
  • Express as IF-THEN rules

19
Crisp Logic HVAC Control
  • IF 90 lt Temp THEN set cooling power to max.
  • IF 80 lt Temp lt 90 THEN set cooling power to
    max/2.
  • IF 65 lt Temp lt 80 THEN leave settings as-is.
  • IF 50 lt Temp lt 65 THEN set heating power to
    max/2.
  • IF Temp lt 50 THEN set heating power to max.

20
Fuzzy Logic HVAC Control
  • Determine linguistic temperature ranges (for this
    example hot, cold)
  • Define membership functions that determine how
    much a given temperature belongs to the
    linguistic temperature ranges
  • Determine fuzzy IF-THEN rules that specify what
    action to take under what conditions

21
Fuzzy Logic HVAC Control
  • Define ?hot(Temp), and ?cold(Temp)
  • IF Temp is hot THEN increase cooling power to max
    (u u max)
  • IF Temp is cold THEN increase heating power to
    max (u u- -max)
  • When both rules fire, blend their results by a
    weighted average (others just implement the THEN
    part associated with the most true IF-part)

22
Fuzzy Logic HVAC Control
  • Translation of rules into mathematics

23
Pure Fuzzy System
  • A fuzzy set is the set of points under discussion
    and the membership function that assigns to each
    point its level of membership in the set
    corresponding to the linguistic description. The
    hot temperatures vs. the cold temperatures.

24
Fuzzy System with Fuzzifier and Defuzzifier
25
Fuzzy Logic Approximations
  • Assume that some data has been collected for i
    1, , n, (xi, yi) are the data points
  • What is the function, f(x), that relates them?
  • Heuristic if x is close to xi then y is close
    to yi
  • Universal Approximators, just like the
    polynomials
  • Weierstrass-like Uniform approximation theorem
  • I am approximating segmented mirror this way

26
Comments
  • Fuzzy logic was invented to allow humans and
    computers to communicate
  • Fuzzy logic is better than Expert Systems since
    it requires fewer rules
  • Fuzzy logic has been used successfully to control
    (automatically) processes that classical control
    methods failed on
  • Fuzzy logic, like Neural networks, provides a
    point-of-view from which algorithms spring
  • The same algorithm might be developed anyway
  • Not a dogmatic theology

27
Homework
  • Read Chapter 1
  • Exercises 1.1, 1.2, pg. 16. And 1.3 and 1.4
    below.
  • Exercise 1.3. Explain how the function f(x,y)xy2
    is an IF-THEN rule.
  • Exercise 1.4. List 5 feedback control systems
    found in a House or car.
  • Quiz. Draw -from memory - Figure 1.3, 1.4. 1.5,
    1.6, or 1.7. Your cue will be the Figure caption.

28
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com