Fuzzy Logic Control. Feedback Control System Plant, u, y Controller, e, u Reference input, r Sensor.

Slides:



Advertisements
Similar presentations
Graphical Technique of Inference
Advertisements

Fuzzy Inference Systems
 Negnevitsky, Pearson Education, Lecture 5 Fuzzy expert systems: Fuzzy inference n Mamdani fuzzy inference n Sugeno fuzzy inference n Case study.
AI – CS364 Fuzzy Logic Fuzzy Logic 3 03 rd October 2006 Dr Bogdan L. Vrusias
Fuzzy Approach.
Fuzzy Inference and Defuzzification
CS 561, Sessions This time: Fuzzy Logic and Fuzzy Inference Why use fuzzy logic? Tipping example Fuzzy set theory Fuzzy inference.
Fuzzy Logic The restriction of classical propositional calculus to a two- valued logic has created many interesting paradoxes over the ages. For example,
Fuzzy Expert System. Basic Notions 1.Fuzzy Sets 2.Fuzzy representation in computer 3.Linguistic variables and hedges 4.Operations of fuzzy sets 5.Fuzzy.
Fuzzy Expert Systems. Lecture Outline What is fuzzy thinking? What is fuzzy thinking? Fuzzy sets Fuzzy sets Linguistic variables and hedges Linguistic.
FUZZY Logic for Game Programmers
Fuzzy Logic E. Fuzzy Inference Engine. “antecedent” “consequent”
Lecture 6 MATLAB functions Basics of Built-in Functions, Help Feature, Elementary Functions (e.g., Polynomials, Trigonometric Functions), Data Analysis,
Fuzzy Expert System.
On the use of fuzzy techniques in cache memory management Chun-Fu Kung System Laboratory, Department of Computer Engineering and Science, Yuan-Ze University,
Fuzzy Logic E. Fuzzy Inference Engine. “antecedent” “consequent”
11 Inverted Pendulum Emily Hamilton ECE Department, University of Minnesota Duluth December 21, 2009 ECE Fall 2009.
Chapter 18 Fuzzy Reasoning.
Let remember from the previous lesson what is Knowledge representation
1 Chapter 18 Fuzzy Reasoning. 2 Chapter 18 Contents (1) l Bivalent and Multivalent Logics l Linguistic Variables l Fuzzy Sets l Membership Functions l.
Lecture 6 Sept 15, 09 Goals: two-dimensional arrays matrix operations circuit analysis using Matlab image processing – simple examples.
Concatenation MATLAB lets you construct a new vector by concatenating other vectors: – A = [B C D... X Y Z] where the individual items in the brackets.
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).
The Equivalence between fuzzy logic controllers and PD controllers for single input systems Professor: Chi-Jo Wang Student: Nguyen Thi Hoai Nam Student.
THE MODEL OF ASIS FOR PROCESS CONTROL APPLICATIONS P.Andreeva, T.Atanasova, J.Zaprianov Institute of Control and System Researches Topic Area: 12. Intelligent.
Teachers Name : Suman Sarker Telecommunication Technology Subject Name : Computer Controller System & Robotics Subject Code : 6872 Semester :7th Department.
Fuzzy Rule-based Models *Neuro-fuzzy and Soft Computing - J.Jang, C. Sun, and, E. Mizutani, Prentice Hall 1997.
Fuzzy Logic. Sumber (download juga): 0logic%20toolbox.pdf
Rule-Based Fuzzy Model. In rule-based fuzzy systems, the relationships between variables are represented by means of fuzzy if–then rules of the following.
Indian Institute of Technology Bombay GIS-based mineral resource potential mapping - Modelling approaches  Exploration datasets with homogenous coverage.
What are Neuro-Fuzzy Systems A neuro-fuzzy system is a fuzzy system that uses a learning algorithm derived from or inspired by neural network theory to.
CPSC 386 Artificial Intelligence Ellen Walker Hiram College
Gradient Descent Rule Tuning See pp in text book.
Fuzzy Rules 1965 paper: “Fuzzy Sets” (Lotfi Zadeh) Apply natural language terms to a formal system of mathematical logic
Fuzzy Inference (Expert) System
Ming-Feng Yeh Fuzzy Control The primary goal of control engineering is to distill and apply knowledge about how to control a process so that the.
Neural-Network-Based Fuzzy Logical Control and Decision System 主講人 虞台文.
Linear Algebra. Circuits The circuits in computers and other input devices have inputs, each of which is either a 0 or 1, the output is also 0s and 1s.
Course presentation: FLA Fuzzy Logic and Applications 4 CTI, 2 nd semester Doru Todinca in Courses presentation.
Lógica difusa  Bayesian updating and certainty theory are techniques for handling the uncertainty that arises, or is assumed to arise, from statistical.
Lec 34 Fuzzy Logic Control (II)
Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory.
Fuzzy Inference Systems. Fuzzy inference (reasoning) is the actual process of mapping from a given input to an output using fuzzy logic. The process involves.
Computer Simulation Lab Electrical and Computer Engineering Department SUNY – New Paltz SUNY-New Paltz “Lecture 2”
“Principles of Soft Computing, 2 nd Edition” by S.N. Sivanandam & SN Deepa Copyright  2011 Wiley India Pvt. Ltd. All rights reserved. CHAPTER 12 FUZZY.
Basic Concepts of Fuzzy Logic Apparatus of fuzzy logic is built on: Fuzzy sets: describe the value of variables Linguistic variables: qualitatively and.
Fuzzy Expert System n Introduction n Fuzzy sets n Linguistic variables and hedges n Operations of fuzzy sets n Fuzzy rules n Summary.
1 Lecture 4 The Fuzzy Controller design. 2 By a fuzzy logic controller (FLC) we mean a control law that is described by a knowledge-based system consisting.
Thinking Mathematically Logic 3.4 Truth Tables for the Conditional and Biconditional.
Finishing up Chapter 5. Will this code enter the if statement? G=[30,55,10] if G
VIDYA PRATISHTHAN’S COLLEGE OF ENGINEERING, BARAMATI.
Chapter 13 (Continued) Fuzzy Expert Systems 1. Fuzzy Rule-based Expert System 2.
Fuzzy Logic Control What is Fuzzy Logic ? Logic and Fuzzy Logic
Artificial Intelligence CIS 342
Expert System Structure
Fuzzy expert systems Fuzzy inference Mamdani fuzzy inference
Artificial Intelligence
Stanisław H. Żak School of Electrical and Computer Engineering
Homework 8 Min Max “Temperature is low” AND “Temperature is middle”
Fuzzy logic Introduction 3 Fuzzy Inference Aleksandar Rakić
Dr. Unnikrishnan P.C. Professor, EEE
Fuzzy System Structure
منطق فازی.
Dr. Unnikrishnan P.C. Professor, EEE
Homework 9 Min Max “Temperature is low” AND “Temperature is middle”
Chap 3: Fuzzy Rules and Fuzzy Reasoning
Dr. Unnikrishnan P.C. Professor, EEE
Fuzzy Inference Systems
Fuzzy Logic KH Wong Fuzzy Logic v.9a.
Presentation transcript:

Fuzzy Logic Control

Feedback Control System Plant, u, y Controller, e, u Reference input, r Sensor

Classical Controller Design Given mathematical model of plant (i.e. transfer function) Given objectives of Feedback Control System Use standard design techniques to determine controller to meet objectives (root locus, ITAE, Bode, etc.)

Fuzzy Logic Controllers Use Experienced operators Construct IF-THEN rules that describe how the operator uses his knowledge of the objectives and the measured outputs to determine inputs to the plant Convert the IF-THEN rules into mathematics (i.e. convert human knowledge into computer knowledge)

Elements of FL Controller Fuzzifier –Takes measurement data (crisp numbers) produces fuzzy sets (singleton fuzzifier, membership functions) Rule Base or Knowledge Base –IF-THEN rules from expert operator Inference engine –Choice of AND, OR, NOT. Determines how to interpret (implement) IF-THEN statements De-fuzzifier –Produces single crisp output to be sent to plant

IF-THEN rules and Math IF antecedent THEN conclusion –Logical IF-THEN statement IF condition THEN action –Programming IF-THEN statement Programming IF-THEN in FL –To the extent that the condition is true, implement the action (part of inference engine) Collection of rules = Rule Base = Knowledge Base Multiple rules are joined by inference engine and de-fuzzifier

FL implementation of functions Any mathematical function can be interpreted as IF- THEN statements Crisp logic interpretation of y = x 2 –IF x = 1 THEN y = 1 –IF x = 2 THEN y = 4 –Etc –One rule active at a time FL interpretation of y = x 2 –IF x is close to 1 THEN y is close to 1 –IF x is close to 2 THEN y is close to 4 –Etc –Many rules active at once. How to blend all active rules?

FL implementation of functions FL interpretation of y = x 2 –IF x is close to 1 THEN y is close to 1 –IF x is close to 2 THEN y is close to 4 –Many rules active at once. How to blend all active rules? Consider a number between x=1 and x=2. The extent to which a number, x, is close to 1 is The extent to which a number, x, is close to 2 is The actions of the two rules needs to be blended together to get the value of the function for numbers other than 1 and 2

Single Antecedent Formula Consider N fuzzy rules –IF x is in A 1 THEN y is y 1 more similar rules –IF x is in A N THEN y is y n The extent to which x is in A k is measured by the k th membership function The rules are blended together by

Examples/Assignments FL version of y = x 2, y = 3x/(x+1) FL version of y = sin(x), y = cos(x), y = tan(x) FL version of (you pick a function) FL version of {(x,y)}  experimental data (thermocouple data) Proportional controller with saturation Choices –Membership functions

Compound Antecedents Choose implementation of AND –Min or * or etc IF x 1 is A 1,k AND x 2 is A 2,k THEN y is y k Two input linguistic variables Each LV has its term set

Compound Antecedent formula Interpret x as a vector with components

Examples/Assignments Heat index formula Chill factor index formula PI controller PD controller PID controller You choose a function

More complex consequents Constant consequents Linear consequents Quadratic consequents Generic function consequents

Re-Discussion of FL controller components Fuzzy logic controllers convert an expert’s collection of IF-THEN rules into a mathematical function that operates similar to the expert Fuzzifier Rule Base Inference Engine Defuzzifier

Coding Rules in an Array Each row in array is a rule First N columns –N LV input variables –Entries determine term in term set of LV, hence membership function Last few columns –Determine consequent Programming in Sysquake/Matlab –Persistent variables

Examples/Assignments Code the FL functions using arrays –Array –Super Membership function for each LV Membership function for each term –Function Sum Prod Random assignment of functions to students

Sysquake Code function y = muz(x,left,right) i=find(x<left);y=ones(size(i)); x = x(length(i)+1:length(x)); i=find(x<right);y =[y (right-x(i))/(right-left)]; x = x(length(i)+1:length(x)); y = [y zeros(size(x))]; return;

function y = mus(x,left,right) i=find(x<left);y=zeros(size(i)); x = x(length(i)+1:length(x)); i=find(x<right);y =[y (x(i)-left)/(right-left)]; x = x(length(i)+1:length(x)); y = [y ones(size(x))]; Return;

function y = mutri(x,left,center,right) i=find(x<left);y=zeros(size(i)); x = x(length(i)+1:length(x)); i=find(x<center); y =[y (x(i)-left)/(center-left)]; x = x(length(i)+1:length(x)); i=find(x<right); y =[y (right-x(i))/(right-center)]; x=x(length(i)+1:length(x)); y = [y zeros(size(x))]; Return;

function y = mu(LV,T,x) // change LV to name of LV temp = 1; humidity= 2; //For each LV, something like: If (LV == temp) N = 1; Z = 2; P = 3 //term set with 3 terms left1 = -1; right1 = 0; // term N left2 = -1 ; center2 = 0; right2 = 1; //term Z left3 = 0; right3 = 1; //term P if (T==N) y = muz(x,left1,right1);//muN if (T==Z) y = mutri(x,left2,center2,right2);//muZ if (T==P) y = mus(x,left3,right3);//muP end //For 2 nd LV (similar to first) if (LV==humidity) end return;

Rules as Arrays function y = fuzzyfn(x) N1 = 1; Z1 = 2; P1 = 3; // term set for LV 1 N2 = 1; Z2 = 2; P2 = 3; // term set for LV 2 nLV = 2; // number of linguistic variables A = [N1 N2 10// rule 1 N1 Z2 6// rule 2 N1 P23];// rule 3 // more rules num = 0; den = 0 for i = 1:length(A(:,1));mu = 1; for LV = 1:nLV;mu=mu*mu(LV,A(i,LV),x(LV)); end num = num+mu*A(i,nLV+1); sum = sum+mu; //sum =1? end y = num/sum; // not needed if sum =1 return

Assignment Add rules Modify to accommodate linear consequents

P Controller u = K P e Rules like –If e = e k then u = u k

D controller u =K D (d/dt)e Rules like –If du = du k Then u = u k

I Controller If I = I k then u = u k or If e = e k then u = u+u k (or du=du k )

PID Controller