Fuzzy LogicIntroductionBrief HistoryHow it WorksSteps by Step ApproachSlide 6Slide 7Slide 8Slide 9Inverted PendulumSlide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Other ApplicationsQuestions?Fuzzy LogicFuzzy LogicSamson OkohSamson OkohEngr 315Engr 315Fall 2002Fall 2002IntroductionIntroductionBrief HistoryBrief HistoryHow it WorksHow it Works–Basics of Fuzzy LogicBasics of Fuzzy LogicRulesRules–Step by Step Approach of Fuzzy LogicStep by Step Approach of Fuzzy LogicFuzzificationFuzzificationRule EvaluationRule EvaluationDefuzzificationDefuzzification–Example ApplicationExample ApplicationInverted PendulumInverted PendulumOther applications of Fuzzy LogicOther applications of Fuzzy LogicConclusionConclusionBrief HistoryBrief HistoryFuzzy logic can be defined as a Fuzzy logic can be defined as a superset of conventional (Boolean) superset of conventional (Boolean) logic that has been extended to handle logic that has been extended to handle the concept of partial truth - truth the concept of partial truth - truth values between “completely true” and values between “completely true” and “completely false”“completely false”Brought up by Lofti Zedah in the 1960sBrought up by Lofti Zedah in the 1960sProfessor at University of California at Professor at University of California at BeckleyBeckleyHow it WorksHow it WorksBasics of Fuzzy Logic (Rules)Basics of Fuzzy Logic (Rules)–Operates similar to humansOperates similar to humansHumans base their decisions on conditionsHumans base their decisions on conditions–Operates on a bunch of IF-THEN Operates on a bunch of IF-THEN statements statements –An example is A then B, if C then D An example is A then B, if C then D where B and D are all set of A and C.where B and D are all set of A and C.Steps by Step ApproachSteps by Step ApproachStep OneStep One–Define the control objectives and criteria. Define the control objectives and criteria. Consider question likeConsider question like–What is trying to be controlled?What is trying to be controlled?–What has to be done to control the system?What has to be done to control the system?–What kind of response is needed?What kind of response is needed?–What are the possible (probable) system failure modes?What are the possible (probable) system failure modes? Step TwoStep Two–Determine input and output relationshipsDetermine input and output relationships–Determine the least number of variables for Determine the least number of variables for inputs to the fuzzy logic systeminputs to the fuzzy logic systemSteps by Step ApproachSteps by Step ApproachStep ThreeStep Three–Break down the control problem into a series of Break down the control problem into a series of IF X AND Y, THEN Z rules based on the fuzzy IF X AND Y, THEN Z rules based on the fuzzy logic rules. logic rules. –These IF X AND Y, THEN Z rules should define These IF X AND Y, THEN Z rules should define the desired system output response for the the desired system output response for the given systems input conditions. given systems input conditions. Step FourStep Four–Create a fuzzy logic membership function that Create a fuzzy logic membership function that defines the meaning or values of the input and defines the meaning or values of the input and output terms used in the rulesoutput terms used in the rulesSteps by Step ApproachSteps by Step ApproachStep FiveStep Five–After the membership functions are After the membership functions are created, program everything then into created, program everything then into the fuzzy logic systemthe fuzzy logic systemStep SixStep Six–Finally, test the system, evaluate results Finally, test the system, evaluate results and make the necessary adjustments and make the necessary adjustments until a desired result is obtainuntil a desired result is obtainSteps by Step ApproachSteps by Step ApproachThe above steps are summarized into The above steps are summarized into three main stagesthree main stages–FuzzificationFuzzificationMembership functions used to graphically Membership functions used to graphically describe a situationdescribe a situation–Evaluation of RulesEvaluation of RulesApplication of the fuzzy logic rulesApplication of the fuzzy logic rules–DiffuzificationDiffuzificationObtaining the crisp results Obtaining the crisp resultsSteps by Step ApproachSteps by Step ApproachInverted PendulumInverted PendulumTask: Task: –To balance a pole on a mobile platform To balance a pole on a mobile platform that can move in only two directions, that can move in only two directions, either to the left or to the right. either to the left or to the right.Inverted PendulumInverted PendulumThe input and output relationships of The input and output relationships of the variables of the fuzzy system are the variables of the fuzzy system are then determined. then determined. –Inputs:Inputs:Angle between the platform and the Angle between the platform and the pendulumpendulumAngular velocity of this angle. Angular velocity of this angle. –Outputs:Outputs:Speed of platformSpeed of platformInverted PendulumInverted PendulumUse membership functions to Use membership functions to graphically describe the situation graphically describe the situation (Fuzzification)(Fuzzification)The output which is speed can be The output which is speed can be high speed, medium speed, low high speed, medium speed, low speed, etc. These different levels of speed, etc. These different levels of output of the platform are defined by output of the platform are defined by specifying the membership functions specifying the membership functions for the fuzzy-sets for the fuzzy-setsInverted PendulumInverted PendulumInverted PendulumInverted PendulumDefine Fuzzy RulesDefine Fuzzy Rules–ExamplesExamplesIf angle is zero and angular velocity is zero, If angle is zero and angular velocity is zero, then speed is also zerothen speed is also zeroIf angle is zero and angular velocity is If angle is zero and angular velocity is negative low, the speed is negative lownegative low, the speed is negative lowIf angle is positive low and angular velocity If angle is positive low and angular velocity is zero, then speed is positive lowis zero, then speed is positive lowIf angle is positive low and angular velocity If angle is positive low and angular velocity is negative low,
View Full Document