Fuzzy Control Lecture 6.1. Fuzzy Control Fuzzy Sets Design of a Fuzzy Controller –Fuzzification of inputs: get_inputs() –Fuzzy Inference –Processing the.

Slides:



Advertisements
Similar presentations
Fuzzy Logic 11/6/2001. Agenda General Definition Applications Formal Definitions Operations Rules Fuzzy Air Conditioner Controller Structure.
Advertisements

Fuzzy Sets and Fuzzy Logic
Example 20 Fuzzy Control Lecture L10.2.
Fuzzy Expert System  An expert might say, “ Though the power transformer is slightly overloaded, I can keep this load for a while”.  Another expert.
Fuzzy Logic and its Application to Web Caching
Fuzzy Inference and Defuzzification
Soft Computing. Per Printz Madsen Section of Automation and Control
Introduction to Fuzzy Control Lecture 10.1 Appendix E.
Fuzzy Logic The restriction of classical propositional calculus to a two- valued logic has created many interesting paradoxes over the ages. For example,
Fuzziness vs. Probability JIN Yan Nov. 17, The outline of Chapter 7 Part I Fuzziness vs. probability Part II Fuzzy sets & relevant theories.
CLASSICAL LOGIC and FUZZY LOGIC. CLASSICAL LOGIC In classical logic, a simple proposition P is a linguistic, or declarative, statement contained within.
An Introduction to Type-2 Fuzzy Sets and Systems
Fuzzy Logic.
FUZZY SYSTEMS. Fuzzy Systems Fuzzy Sets – To quantify and reason about fuzzy or vague terms of natural language – Example: hot, cold temperature small,
Fuzzy Sets and Fuzzification Michael J. Watts
Industrial Application of Fuzzy Logic Control © INFORM Slide 1 Tutorial and Workshop © Constantin von Altrock Inform Software Corporation 2001.
Fuzzy Logic Control Systems Ken Morgan ENGR 315 December 5, 2001.
Fuzzy Expert System.
Fuzzy Logic Richard E. Haskell Oakland University Rochester, MI USA.
Subroutines and Stacks Lecture L3.1. Subroutine and Stacks The System Stack Subroutines A Data Stack.
Fuzzy Control. Fuzzy Sets Design of a Fuzzy Controller –Fuzzification of inputs: get_inputs() –Fuzzy Inference –Processing the Rules: find_rules() –Centroid.
Chapter 18 Fuzzy Reasoning.
Fuzzy Control Chapter 14. Fuzzy Control Fuzzy Sets Design of a Fuzzy Controller –Fuzzification of inputs: get_inputs() –Fuzzy Inference –Processing the.
WELCOME TO THE WORLD OF FUZZY SYSTEMS. DEFINITION Fuzzy logic is a superset of conventional (Boolean) logic that has been extended to handle the concept.
Ming-Feng Yeh General Fuzzy Systems A fuzzy system is a static nonlinear mapping between its inputs and outputs (i.e., it is not a dynamic system).
Fuzzy Logic Dave Saad CS498. Origin Proposed as a mathematical model similar to traditional set theory but with the possibility of partial set membership.
Introduction to Fuzzy Logic Control
Fuzzy Systems and Applications
Fuzzy Logic. Sumber (download juga): 0logic%20toolbox.pdf
Revised: Sep 1, ECE 263 Embedded System Design Lesson Fuzzy Logic.
Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 3b: Dealing with Uncertainty (Fuzzy Logic)
Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic.
Fuzzy Control. Fuzzy Sets Design of a Fuzzy Controller –Fuzzification of inputs: get_inputs() –Fuzzy Inference –Processing the Rules: find_rules() –Centroid.
Fuzzy Rules 1965 paper: “Fuzzy Sets” (Lotfi Zadeh) Apply natural language terms to a formal system of mathematical logic
 Definition Definition  Bit of History Bit of History  Why Fuzzy Logic? Why Fuzzy Logic?  Applications Applications  Fuzzy Logic Operators Fuzzy.
Fuzzy Inference (Expert) System
Fuzzy Systems Michael J. Watts
Lógica difusa  Bayesian updating and certainty theory are techniques for handling the uncertainty that arises, or is assumed to arise, from statistical.
PART 9 Fuzzy Systems 1. Fuzzy controllers 2. Fuzzy systems and NNs 3. Fuzzy neural networks 4. Fuzzy Automata 5. Fuzzy dynamic systems FUZZY SETS AND FUZZY.
Fuzzy systems. Calculate the degree of matching Fuzzy inference engine Defuzzification module Fuzzy rule base General scheme of a fuzzy system.
1 Stacks, Subroutines, I/O Routines Today: First Hour: Stacks, Subroutines –Section 3.9,3.10 of Huang’s Textbook –In-class Activity #1 Second Hour: I/O.
NEURO-FUZZY LOGIC 1 X 0 A age Crisp version for young age.
Could Be Significant.
Fuzzy Logic Artificial Intelligence Chapter 9. Outline Crisp Logic Fuzzy Logic Fuzzy Logic Applications Conclusion “traditional logic”: {true,false}
Chapter 10 FUZZY CONTROL Chi-Yuan Yeh.
Dinner for Two. Fuzzify Inputs Apply Fuzzy Operator.
Chapter 13 (Continued) Fuzzy Expert Systems 1. Fuzzy Rule-based Expert System 2.
Introduction to Fuzzy Logic and Fuzzy Systems
Fuzzy Inference System
Fuzzy Logic Control What is Fuzzy Logic ? Logic and Fuzzy Logic
Artificial Intelligence CIS 342
Fuzzy Systems Michael J. Watts
Fuzzy Control Design of Embedded Systems
Universe, membership function, variables, operations, relations
Fuzzy Logic 11/6/2001.
Artificial Intelligence
Fuzzy Logics.
Fuzzy Logic and Fuzzy Sets
Introduction to Fuzzy Logic
Fuzzy Control Tutorial
CLASSICAL LOGIC and FUZZY LOGIC
Dr. Unnikrishnan P.C. Professor, EEE
Richard E. Haskell Oakland University Rochester, MI USA
FUZZIFICATION AND DEFUZZIFICATION
فازی سازی و غیرفازی سازی
Fuzzy Logic Colter McClure.
Dr. Unnikrishnan P.C. Professor, EEE
This time: Fuzzy Logic and Fuzzy Inference
Hybrid intelligent systems:
Fuzzy Logic KH Wong Fuzzy Logic v.9a.
Presentation transcript:

Fuzzy Control Lecture 6.1

Fuzzy Control Fuzzy Sets Design of a Fuzzy Controller –Fuzzification of inputs: get_inputs() –Fuzzy Inference –Processing the Rules: find_rules() –Centroid Defuzzification –Output Defuzzification: find_output() –A Fuzzy Control Example -- Floating Ping-Pong Ball

Fuzzy Logic

Normal “Crisp” logic where everything must be either True or False leads to PARADOXES

The sentence on the other side of the line is false The sentence on the other side of the line is false

A barber has a sign that reads: “I shave everyone who does not shave himself” Who shaves the barber?

Fuzzy Logic Lotfi Zadeh - Fuzzy Sets Membership functions –Degree of membership between 0 and 1 Fuzzy logic operations on fuzzy sets A and B –NOT A => 1 - A –A AND B => MIN(A,B) –A OR B => MAX (A,B)

Membership Functions Young Age Not Young

Membership Functions Old Age Not Old

Membership Functions Age Not Old Not Young Middle Age = Not Old AND Not Young

Probabiltiy vs. Fuzziness Probability describes the uncertainty of an event occurrence. Fuzziness describes event ambiguity. Whether an event occurs is RANDOM. To what degree it occurs is FUZZY.

Probability: There is a 50% chance of an apple being in the refrigerator. Fuzzy: There is a half an apple in the refrigerator.

Fuzzy logic acknowledges and exploits the tolerance for uncertainty and imprecision.

Fuzzy Control Map to Fuzzy Sets Fuzzy Rules IF A AND B THEN L * * Defuzzification Inputs Output get_inputs(); fire_rules(); find_output();

Algorithm for a fuzzy controller do_forever { get_inputs(); fire_rules(); find_output(); }

get_inputs(); Given inputs x1 and x2, find the weight values associated with each input membership function. ZNMNSPSPM X W = [0, 0, 0.2, 0.7, 0]

Fuzzy Inference fire_rules(); find_output(); Rule 1: If x1 is A1 and x2 is B1 then y is L1 Rule 2: If x1 is A2 and x2 is B2 then y is L2 Given: x1 is a and x2 is b What is y?

Fuzzy Control Fuzzy Sets Design of a Fuzzy Controller –Fuzzification of inputs: get_inputs() –Fuzzy Inference –Processing the Rules: find_rules() –Centroid Defuzzification –Output Defuzzification: find_output() –A Fuzzy Control Example -- Floating Ping-Pong Ball

A Fuzzy Controller

Fuzzy Control Fuzzy Sets Design of a Fuzzy Controller –Fuzzification of inputs: get_inputs() –Fuzzy Inference –Processing the Rules: find_rules() –Centroid Defuzzification –Output Defuzzification: find_output() –A Fuzzy Control Example -- Floating Ping-Pong Ball

The 68HC12 MEM Instruction

Neg_med Neg_small Zero Pos_small Pos_med

Fuzzy Control Fuzzy Sets Design of a Fuzzy Controller –Fuzzification of inputs: get_inputs() –Fuzzy Inference –Processing the Rules: find_rules() –Centroid Defuzzification –Output Defuzzification: find_output() –A Fuzzy Control Example -- Floating Ping-Pong Ball

Fuzzy Inference

Fuzzy Control Fuzzy Sets Design of a Fuzzy Controller –Fuzzification of inputs: get_inputs() –Fuzzy Inference –Processing the Rules: find_rules() –Centroid Defuzzification –Output Defuzzification: find_output() –A Fuzzy Control Example -- Floating Ping-Pong Ball

The 68HC12 REV Instruction

Fuzzy Control Fuzzy Sets Design of a Fuzzy Controller –Fuzzification of inputs: get_inputs() –Fuzzy Inference –Processing the Rules: find_rules() –Centroid Defuzzification –Output Defuzzification: find_output() –A Fuzzy Control Example -- Floating Ping-Pong Ball

Fuzzy Control Fuzzy Sets Design of a Fuzzy Controller –Fuzzification of inputs: get_inputs() –Fuzzy Inference –Processing the Rules: find_rules() –Centroid Defuzzification –Output Defuzzification: find_output() –A Fuzzy Control Example -- Floating Ping-Pong Ball

Fuzzy Control Fuzzy Sets Design of a Fuzzy Controller –Fuzzification of inputs: get_inputs() –Fuzzy Inference –Processing the Rules: find_rules() –Centroid Defuzzification –Output Defuzzification: find_output() –A Fuzzy Control Example -- Floating Ping-Pong Ball

;Fuzzy Control ;Data Structures ball_positionrmb24 ball_speedrmb24 in_out_arrayrmb16 rulesrmb129 centrmb cent

;Main program fuzzy ;get_inputs() ;JSRget_position;position in D STD2,-X;push on data stack LDD#ball_position;D -> ball_position STD2,-X;push on data stack JSRFILLWT;fill.weights ;JSRget_speed;speed in D STD2,-X;push on data stack LDD#ball_speed;D -> ball_speed STD2,-X;push on data stack JSRFILLWT;fill.weights ;fire_rules() LDD#in_out_array;D -> in_out_array STD2,-X;push on data stack LDD#rules;D -> rules STD2,-X;push on data stack JSRFIRERULES;fire rules ;find_output() LDD#rules;D -> rules STD2,-X;push on data stack LDD#cent;D -> cent STD2,-X;push on data stack JSRFINDOUT;find output BRAfuzzy

; Fill Weight Arrays ; fill.weights ( xi memfunc_addr -- ) FILLWT LDY 2,X+ ;Y -> input membership functions LDD 2,X+ ;B = xi PSHX ;save X TFR Y,X ;X -> membership functions LDY 2,X ;Y -> input weight table PSHB ;save xi LDD 4,X+ ;B = #mem functs; X->1st memb fnc PULA ;A = xi FW1 MEM ;fuzzy membership grade DBNE B,FW1 PULX ;restore X RTS

; Fire all rules ; firerules ( in.out_addr rules_addr -- ) FIRERULES LDD 2,X+ ;D -> rules LDY 2,X+ ;Y -> in.out.array PSHX TFR D,X ;X -> rules INX INX ;X -> Wout addr PSHY ;save Y LDY 2,X+ ;Y -> Wout, X -> 1st rule LDAB 0,Y ;B = #out.memb.fncs FR0 CLR 1,X+ ;clear W array DBNE B, FR0 PULY ;Y -> in.out.array LDAA #$FF REV ;rule evaluation PULX RTS

; Find Output value ; calc.output ( rules cent_addr -- output_value ) FINDOUT LDD 2,X+ ;D -> cent LDY 2,X+ ;Y -> rules PSHX TFR D,X ;X -> cent array LDY 2,Y ;Y -> Warray LDAB 0,Y ;B = #out.memb.fncs INY ;Y -> W array WAV EDIV ;Y = quotient TFR Y,D ;D = quotient A = 0, B = output PULX STD 2,-X RTS