Loading in 5 sec....

F UZZY C ONTROL : Mamdani & Takagi-Sugeno ControllersPowerPoint Presentation

F UZZY C ONTROL : Mamdani & Takagi-Sugeno Controllers

- 118 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about 'F UZZY C ONTROL : Mamdani & Takagi-Sugeno Controllers' - caleb-fleming

**An Image/Link below is provided (as is) to download presentation**

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

### FUZZY CONTROL:Mamdani & Takagi-Sugeno Controllers

Khurshid Ahmad,

Professor of Computer Science,

Department of Computer Science

Trinity College,

Dublin-2, IRELAND

October 29/Nov 5th, 2010

https://www.cs.tcd.ie/Khurshid.Ahmad/Teaching/Teaching.html

1

FUZZY CONTROL Control Theory?

- The term control is generally defined as a mechanism used to guide or regulate the operation of a machine, apparatus or constellations of machines and apparatus.

FUZZY CONTROL Control Theory?

An Input/Output Relationship

FUZZY CONTROL Control Theory?

An Input/Output Relationship IDENTIFIED using Fuzzy Logic

FUZZY CONTROL Control Theory?

An Input/Output Relationship IDENTIFIED using Fuzzy Logic

FUZZY CONTROL Control Theory?

- Typically, rules contain membership functions for both antecedents and consequent.
- Argument is that the consequent membership function can be simplified – this argument is based on a heuristic that operators in a control environment divide the variable space (say, error, change in error and change in control) into PARTITIONS;
- Within each partition the output variable is a simple, often linear function of the input variables and not membership functions

FUZZY CONTROL Control Theory?

- Typically, rules contain membership functions for both antecedents and consequent.
- Mamdani Controller
- If e(k) is positive(e) and Δe(k) is positive(Δe)
- then Δu(k) is positive (Δu)
- Takagi-Sugeno Controllers:
- If e(k) is positive(e) and Δe(k) is positive(Δe)then Δu(k) =e(k)+ß Δe(k)+δ;
- , ß and δ are obtained from empirical observations by relating the behaviour of the errors and change in errors over a fixed range of changes in control

FUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

According to Yager and Filev, ‘a known disadvantage of the linguistic modules is that they do not contain in an explicit form the objective knowledge about the system if such knowledge cannot be expressed and/or incorporated into fuzzy set framework' (1994:192).

Typically, such knowledge is available often: for example in physical systems this kind of knowledge is available in the form of general conditions imposed on the system through conservation laws, including energy mass or momentum balance, or through limitations imposed on the values of physical constants.

FUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

- Tomohiro Takagi and Michio Sugeno recognised two important points:
- Complex technological processes may be described in terms of interacting, yet simpler sub processes. This is the mathematical equivalent of fitting a piece-wise linear equation to a complex curve.
- The output variable(s) of a complex physical system, e.g. complex in the sense it can take a number of input variables to produce one or more output variable, can be related to the system's input variable in a linear manner provided the output space can be subdivided into a number of distinct regions.

Takagi, T., & Sugeno, M. (1985). ‘Fuzzy Identification of Systems and its Applications to Modeling and Control’. IEEE Transactions on Systems, Man and Cybernetics. Volume No. SMC-15 (No.1) pp 116-132.

FUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

Takagi-Sugeno fuzzy models have been widely used to identify the structures and parameters of unknown or partially known plants, and to control nonlinear systems.

FUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

Mamdani style inference:

The Good News: This method is regarded widely ‘for capturing expert knowledge’ and facilitates an intuitively-plausible description of knowledge;

The Bad News: This method involves the computation of a two-dimensional shape by summing, or more accurately integrating across a continuously varying function. The computation can be expensive.

FUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

Mamdani style inference:

The Bad News: This method involves the computation of a two-dimensional shape by summing, or more accurately integrating across a continuously varying function. The computation can be expensive.

For every rule we have to find the membership functions for the linguistic variables in the antecedents and the consequents;

For every rule we have to compute, during the inference, composition and defuzzification process the membership functions for the consequents;

Given the non-linear relationship between the inputs and the output, it is not easy to identify the membership functions for the linguistic variables in the consequent

FUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

Literature on conventional control systems has suggested that a complex non-linear system can be described as a collection of subsystems that were combined based on a logical (Boolean) switching system function.

In realistic situations such disjoint (crisp) decomposition is impossible, due to the inherent lack of natural region boundaries in the system, and also due to the fragmentary nature of available knowledge about the system.

FUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

Takagi and Sugeno (1985) have argued that in order to develop a generic and simple mathematical tool for computing fuzzy implications one needs to look at a fuzzy partition of fuzzy input space.

In each fuzzy subspace a linear input-output relation is formed. The output of fuzzy reasoning is given by the values inferred by some implications that were applied to an input.

FUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

Takagi and Sugeno have described a fuzzy implication R as:

R: if (x1 is mA(x1),… xk is mA(xk))then y = g(x1, …, xk)

A solution for the coefficients of the consequent in TSK Systems

There are two unknowns: p0 and p1. So we need two simultaneous equations for two values of x, say x1 and x2, and two values of y – y1 and y2

A solution for the coefficients of the consequent in TSK Systems

Consider a two rule system:

A solution for the coefficients of the consequent in TSK Systems

There are 4 unknowns p01, p11, p02, p12, so we need 4 equations. And, these can be obtained from 4 observations comprising 4 diffierent values of and 4

A solution for the coefficients of the consequent in TSK Systems

There are 4 unknowns p01, p11, p02, p12, so we need 4 equations. And, these can be obtained from 4 observations comprising 4 diffierent values of and 4

A solution for the coefficients of the consequent in TSK Systems

There are 4 unknowns p01, p11, p02, p12, so we need 4 equations.

A solution for the coefficients of the consequent in TSK Systems

Takagi and Sugeno have (a) generalised the method to an n-rule, m-parameter system; and (b) claim that ‘this method of identification enables us to obtain just the same parameters as the original system, if we have a sufficient number of noiseless output data for identification’ (Takagi and Sugeno, 1985:119).

A solution for the coefficients of the consequent in TSK Systems

In order to determine the values of the parameters p in the consequents, one solves the LINEAR system of algebraic equations and tries to minimize the difference between the ACTUAL output of the system (Y) and the simulation [X]T[P] :

A solution for the coefficients of the consequent in TSK Systems

In order to determine the values of the parameters p in the consequents, one solves the LINEAR system of algebraic equations and tries to minimize the difference between the ACTUAL output of the system (Y) and the simulation [X]T[P] :

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

Takagi and Sugeno have described a fuzzy implication R as:

R: if (x1 is mA(x1),… xk is mA(xk))then y = g(x1, …, xk), where:

A zero order Takagi-Sugeno Model will be given as

R: if (x1 is mA(x1),… xk is mA(xk))then y = k

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

Consider the problem of controlling an air-conditioner (again). The rules that are used to control the air-conditioner can be expressed as a cross product:

CONTROL = TEMP× SPEED

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

The rules can be expressed as a cross product of two term sets: Temperature and Speed.

CONTROL = TEMP× SPEED

Where the set of linguistic values of the term sets is given as

TEMP = COLD + COOL + PLEASANT + WARM + HOT

SPEED = MINIMAL + SLOW + MEDIUM + FAST + BLAST

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

A Mamdani Controller

Recall that the rules governing the air-conditioner are as follows:

RULE#1: IF TEMPis COLD THEN SPEEDis MINIMAL

RULE#2: IF TEMPis COOL THEN SPEEDis SLOW

RULE#3: IF TEMPis PLEASENT THEN SPEEDis MEDIUM

RULE#4: IF TEMPis WARM THEN SPEEDis FAST

RULE#5: IF TEMPis HOT THEN SPEEDis BLAST

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

A Zero-order Takagi-Sugeno Controller

Recall that the rules governing the air-conditioner are as follows:

RULE#1: IF TEMPis COLD THEN SPEED=k1

RULE#2: IF TEMPis COOL THEN SPEED= k2

RULE#3: IF TEMPis PLEASENT THEN SPEED=k3

RULE#4: IF TEMPis WARM THEN SPEED=k4

RULE#5: IF TEMPis HOT THEN SPEED=k5

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

A First-order Takagi-Sugeno Controller

Recall that the rules governing the air-conditioner are as follows:

RULE#1: IF TEMPis COLD THEN SPEED=j1+k1*T

RULE#2: IF TEMPis COOL THEN SPEED= j2+k2*T

RULE#3: IF TEMPis PLEASENT THEN SPEED=k3

RULE#4: IF TEMPis WARM THEN SPEED= j4+ k4 T

RULE#5: IF TEMPis HOT THEN SPEED=k5

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

The analytically expressed membership for the reference fuzzy subsets for the temperature are:

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

For FLC of Mamdani type

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

The zero-order speed control just takes one SINGLETON value at fixed values of the velocity; for all other values the membership function is defined as zero

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

Let the temperature be 5 degrees centigrade:

Fuzzification: 5 degrees means that it can be COOL and COLD;

Inference: Rules 1 and 2 will fire:

Composition:

The temperature is ‘COLD’ with a truth value of

μ COLD=0.5 the SPEED will be k1

The temperature is ‘COOL’ with a truth value of μCOOL =0.5 the SPEED will be k2

‘DEFUZZIFICATION’: CONTROL speed is

(μCOLD*k1+ μCOOL *k2)/(μCOLD+ μCOOL)=

(0.5*0+0.5*30)/(0.5+0.5)=15 RPM

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

FUZZIFICATION:Consider that the temperature is 16oC and we want our knowledge base to compute the speed. The fuzzification of the the crisp temperature gives the following membership for the Temperature fuzzy set:

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

INFERENCE: Consider that the temperature is 16oC and we want our knowledge base to compute the speed. Rule #2 & 3 are firing and are essentially the fuzzy patches made out of the cross products of

COOL x SLOW

PLEASANT x MEDIUM

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

COMPOSITION: The COOL and PLEASANT sets have an output of 0.3 and 0.4 respectively. The singleton values for SLOW and MEDIUM have to be given an alpha-level cut for these output values respectively:

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

DEFUZZIFICATION: The problem of finding a single, crisp value is no longer a problem for a Takagi-Sugeno controller. All we need is the weighted average of the singleton values of SLOW & MEDIUM.

Recall the Centre of Area computation for the Mamdani controller

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

DEFUZZIFICATION: For Takagi-Sugeno, the computation for η is restricted to the singleton values of the SPEED linguistic variable – we do not need to sum over all values of the variable y:

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

DEFUZZIFICATION: For Takagi-Sugeno, the computation for η is restricted to the singleton values of the SPEED linguistic variable – we do not need to sum over all values of the variable y:

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

DEFUZZIFICATION: Recall the case of the Mamdani equivalent of the fuzzy air-conditioner – where we had fuzzy sets for the linguistic variables SLOW and MEDIUM: The ‘Centre of Area’ (COA) computations involved a weighted sum over all values of speed between 12.5 and 57.5 RPM: in the Takagi-Sugeno case we only had to consider values for speeds 30RPM and 50 RPM.

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

DEFUZZIFICATION: Recall the case of the Mamdani equivalent of the fuzzy air-conditioner – where we had fuzzy sets for the linguistic variables SLOW and MEDIUM: The ‘Centre of Area’ (COA) computations involved a weighted sum over all values of speed between 12.5 and 57.5 RPM: in the Takagi-Sugeno case we only had to consider values for speeds 30RPM and 50 RPM.

The speed is

36.91 RPM

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

DEFUZZIFICATION:

For Mean of Maxima for the Mamdani controller, we had to have an alpha-level cut of 0.4, and the summation ran between 45-57.5 RPM, leading to a speed of 50 RPM. We get the same result for Takagi-Sugeno controllers:

η= (0.4*50)/0.4=50 RPM

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

DEFUZZIFICATION: Comparing the results of two model identification exercises – Mamdani and Takagi-Sugeno- we get the following results:

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

DEFUZZIFICATION: Comparing the results of two model identification exercises – Mamdani and Takagi-Sugeno- we get the following results:

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

A formal derivation

Consider a domain where all fuzzy sets are associated with linear membership functions.

Let us denote the membership function of a fuzzy set A as mA(x), xX. All the fuzzy sets are associated with linear membership functions. Thus, a membership function is characterised by two parameters giving the greatest grade 1 and the least grade 0.

The truth value of a proposition “x is mA and y is mB” is expressed as

F SystemsUZZY CONTROL FUZZY CONTROLLERS- An example

A worked example

Consider an FLC of Mamdani type:

which expresses rules like:

Rule 1: If e(k) is negative AND e(k) is negative then u(k) is negative

ALSO

Rule 9: If e(k) is positive AND e(k) is positive then u(k) is positive

F SystemsUZZY CONTROL FUZZY CONTROLLERS- An example

A worked example

Consider an FLC of Mamdani type:

The nine rules express the dependence of (change) in the value of control output on the error (the difference between expected and output values) and the change in error).

This dependence will capture some very complex non-linear, and linear relationships between e and Δe and Δu.

F SystemsUZZY CONTROL FUZZY CONTROLLERS- An example

A zero-order Takagi-Sugeno Controller

which expresses rules like:

Rule 1:If e(k) is negative AND e(k) is negative then u(k) =1

Rule 9:If e(k) is positive AND e(k) is positive then u(k) = 9

F SystemsUZZY CONTROL FUZZY CONTROLLERS- An example

A first-order Takagi-Sugeno Controller

which expresses rules like:

Rule 1:If e(k) is negative AND e(k) is negative then u(k) =1e+ß1e+δ1

Rule 9:If e(k) is positive AND e(k) is positive then u(k) =9e+ß9e+δ9

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

Takagi and Sugeno have described a fuzzy implication R is of the format:

R: if (x1 is mA(x1),… xk is mA(xk))then y = g(x1, …, xk), where:

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

In the premise if μA(xi) is equal to Xi for some i where Xi is the universe of discourse of xi, this term is omitted; xi is unconditioned; otherwise xi is regarded as conditioned.

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

In the premise if mA(xi) is equal to Xi for some i where Xi is the universe of discourse of xi, this term is omitted; xi is unconditioned. The following example will help in clarifying the argumentation related to 'conditioned' and 'unconditioned' terms in a given implication:

R:ifx1 is small and x2 is big theny = x1 + x2 + 2x3.

The above implication comprises two conditioned premises, x1 and x2, and one unconditioned premise, x3.

The implication suggests that if x1 is small and x2 is big, then the value of y would depend upon and be equal to the sum of x1, x2, and 2x3., where x3 is unconditioned in the premise.

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

Typically, for a Takagi-Sugeno controller, an implication is written as:

R:ifx1 is m1 and … and xk is mk

theny = p0 + p1x1 + … + pkxk.

The assumption here is that only ‘and’ connectives are used in the antecedants or premises of the rules. And, that the relationship between the output and inputs is strictly a LINEAR (weighted average) relationship. (The weights here are p0 ,p1….. pk).

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

Reasoning Algorithm

Recall the arguments related to the membership functions of the union and intersection of fuzzy sets. The intersection of sets A and B is given as:

mAÇB = min (mA, mB)

We started this discussion by noting that we will explore the problems of multivariable control (MultipleInputSingleOutput). Usually, the rule base in a fuzzy control system comprises a number of rules; in the case of multivariable control the relevant rules have to be tested for what they imply.

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

Consider a system with n implications (rules); the variable of consequence, y, will have to be notated for each of these implications, leading to yivariables of consequence. There are three stages of computations in Takagi-Sugeno controllers:

FUZZIFICATION: Fuzzify the input. For all input variables compute the implication for each of the rules;

INFERENCE or CONSEQUENCES: For each implication compute the consequence for a rule which fires. Compute the output y for the rule by using the linear relationship between the inputs and the output (y = p0 + p1x1 + … + pkxk.).

AGGREGATE (& DEFUZZIFICATION): The final output y is inferred from n-implications and given as an average of all individual implications yiwith weights |y= yi |:

y = (S|y= yi | * yi)/ S|y= yi |

where |y= yi | stands for the truth value of a given proposition.

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

Consider the following fuzzy implications (or rules) R1,R2, R3 used in the design of a Takagi-Sugeno controller:

R1 If x1 is small1 & x2 is small2 then y(1) =x1+x2

R2 If x1 is big1 then y(2) = 2x1

R3 If x2 is big2 then y(3) =3x2

where y (i)refers to the consequent variable for each rule labelled Ri andx1andx2refer to the input variables that appear in premise of the rules.

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

The membership function for small1, small2, big1 and big2 are given as follows

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

The membership function for small1, small2, big1 and big2 are given as follows

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers An example

Let us compute the FINAL OUTPUT y for the following values:

x1 = 12 & x2 = 5

using Takagi and Sugeno’s formula:

y = (Σ|y= yi | * yi)/ Σ|y= yi |

where |y= yi | stands for the truth value of a given proposition.

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers An example

FUZZUFICATION: We have the following values of the membership functions for the two values x1 = 12 & x2 = 5:

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers An example

INFERENCE & CONSEQUENCE:

x1 = 12 & x2 = 5

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers An example

AGGREGATION (&DEFUZZIFICATION):

x1 = 12 & x2 = 5

y = (S|y= yi | * yi)/ S|y= yi |

Using a Centre of Area computation for y we get:

F SystemsUZZY CONTROL FUZZY CONTROLLERS

Key difference between a Mamdani-type fuzzy system and the Takagi-Sugeno-Kang System?

A zero-order Sugeno fuzzy model can be viewed as a special case of the Mamdani fuzzy inference system in which each rule is specified by fuzzy singleton or a pre-defuzzified consequent. In Sugeno’s model, each rule has a crisp output, the overall input is obtained by a weighted average – this avoids the time-consuming process of defuzzification required in a Mandani model. The weighted average operator is replaced by a weighted sum to reduce computation further. (Jang, Sun, Mizutani (1997:82)).

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

X

X

X

X

X

Takagi, T., & Sugeno, M. (1985). ‘Fuzzy Identification of Systems and its Applications to Modeling and Control’. IEEE Transactions on Systems, Man and Cybernetics. Volume No. SMC-15 (No.1) pp 116-132.

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Takagi-Sugeno Controllers

Takagi and Sugeno (1985) have argued that in order to develop a generic and simple mathematical tool for computing fuzzy implications one needs to look at a fuzzy partition of fuzzy input space. In each fuzzy subspace a linear input-output relation is formed. The output of fuzzy reasoning is given by the values inferred by some implications that were applied to an input.

F SystemsUZZY CONTROL FUZZY CONTROLLERS

A fuzzy logic controller (FLC) with a rule base is defined by the matrix:

where the matrix interrelates the error value e(k) at a given time k, e(k) denotes the change in error (= e(k) - e(k-1)), and the control change u(k) is defined as the difference between u(k) and u(k-1). The term-sets of the input and output variables of the FLC error e, error change e and control change u by the linguistic labels negative (N), approximately zero (Z) and positive (P). The above FLC matrix can equivalent antecedent/consequent rule set

F SystemsUZZY CONTROL FUZZY CONTROLLERS

A fuzzy logic controller (FLC) can be described as a function of a number of variables - an FLC helps us to see how the variables are related to each other.

This relationship uses rules (of thumb) involving vague predicates like:

e is approximately zero

u is positive

e is negative

F SystemsUZZY CONTROL FUZZY CONTROLLERS

Consider a fuzzy rule base comprising an n-rule rule-base inputs A&B and output C. Let χAm andχBm and χCmdenote the linguistic values represented as fuzzy subsets of the respective universes of discourse α (for A), β(for B), and κ (for C):

F SystemsUZZY CONTROL FUZZY CONTROLLERS

The rule-base in itself is a DISJUNCTION in that given an input value for A and B, all rules will be tested and whilst some will fire and others will fail to fire. The degree of firing or level of firing of the ith rule with respect to input values A=α1 and B=β1

τi= (χAiΛχBi)≈min(χAi,χBi)

will be chosen. This looks like an OR operation over all the rules.

F SystemsUZZY CONTROL FUZZY CONTROLLERS

Note that the degree of firing or level of firing of the ith rule with respect to input values A=α1 and B=β1

τi= (χAiΛχBi)≈min(χAi,χBi)

Takes value from the unit interval and the DOF ‘characterises the truthfulness of the antecedent part of the ith rule, different values of τi that are related to different levels of relevance between the measured values α1 and β1, and the conditions associated with the linguistic variables χAi,χBi. (Yager & Filev 1994:118-119).

F SystemsUZZY CONTROL FUZZY CONTROLLERS

Another way of writing a fuzzy rule-base is as follows

The chaining operator ALSO has disjunctive reading

F SystemsUZZY CONTROL FUZZY CONTROLLERS

Next individual rule outputs are to be determined and will be denoted by Fi(κ): The DOF τi interacts with the consequent, C of χCi, of the ith rule to provide the output Fi(κ).

This interaction is also referred to as fuzzy implication.

Typically in the fuzzy control system a method of for inferring the rule output AND-ing χCi and the DOF τi interact to produce the output Fi(κ).

F SystemsUZZY CONTROL FUZZY CONTROLLERS

Next we have to look at the aggregation of the output of all the rules for finally generating an output: The overall system output is given as

F SystemsUZZY CONTROL FUZZY CONTROLLERS

Defuzzification

Finally output of the system is defuzzified.

F SystemsUZZY CONTROL FUZZY CONTROLLERS

A CONTROL PROCEDURE

FINDthe firing level of each of the rulesFUZZIFICATION

FINDthe output of each of the rulesINFERENCE

AGGREGATEthe individual rule outputs to obtain the overall system outputCOMPOSITION

OBTAIN a crisp value to be input to the controlled system DEFUZZIFICATION

F SystemsUZZY CONTROL FUZZY CONTROLLERS

The level of matching: between the linguistic label Bi1 and the input value x1 is determined by the membership grade of x1* in the fuzzy set representing Bi1: Bi1(x1*) as the level of matching for the first antecedant. Similarly Bi2(x2*) is the level of matching for the second antecedant.

1. The level or degree of firing for a rule set of the type

Rule: If U1 is Bi1 AND U2 is Bi2 THEN V is Di

which has a conjunctive connection.

The degree of firing (DOF) of the ith rule with respect to input values U1 is x1* and U2 is x2* is given as i: i = Bi1(x1*) Bi2(x2*)

min(Bi1(x1*), Bi2(x2*))

F SystemsUZZY CONTROL FUZZY CONTROLLERS

EXAMPLE

U1 error e(k)

U2 change of error e(k)

and

V change of control u

B11 positive

B32 approximately zero

Given the inputs to an FLC are the values U1 = x1* and U2 = x2*, then we are faced with the problem of determining the appropriate value of the variable V.

F SystemsUZZY CONTROL FUZZY CONTROLLERS

2. The output of individual rule (Fi(y)) depends on the interaction between the DOF) (i) and the consequent of the rule (Di).

The MAMDANI method suggests that:

Fi(y) = i Di

min (i, Di)

F SystemsUZZY CONTROL FUZZY CONTROLLERS

3. The aggregation of the individual rule outputs to obtain the overall control system output (Fy).

The rules are ‘chained’ through ALSO thus individual rule outputs are aggregated using the disjunctive connective ALSO. The overall system output is:

(Fy) = ViFi(y) = Vi(iDi(y))

OR connective

Recall IF U1 is B11 AND U2 is B12 then U is D1

ALSO

IF U1 is Bm1 AND V2 is Bm2 then V is Dm

F SystemsUZZY CONTROL FUZZY CONTROLLERS

4. The extraction of a crisp output value:

The output fuzzy set cannot be used directly as input to the controlled system. We need to select one element y* from the universe Y (e.g., u* from all possible values of u - the change of control). So we should defuzzify: typically used methods of defuzzification include the so-called centre of area method.

Let the output Y be a finite universe of discourse and F(y) be a DISCRETE membership

function:

F SystemsUZZY CONTROL FUZZY CONTROLLERS- An example

Example

FLC of Takagi-Sugeno type:

which expresses rules like:

Rule 1: If e(k) is negative AND e(k) is negative then u(k) =1e+ß1e+δ1

Rule 9: If e(k) is positive AND e(k) is positive then u(k) =9e+ß9e+δ9

F SystemsUZZY CONTROL FUZZY CONTROLLERS- An example

Example

FLC of Takagi-Sugeno type:

which expresses rules like:

Rule 1: If e(k) is negative AND e(k) is negative then u(k) =k1

Rule 9: If e(k) is positive AND e(k) is positive then u(k) =9

F SystemsUZZY CONTROL FUZZY CONTROLLERS- An example

Example

FLC of Mamdani type:

which expresses rules like:

Rule 1: If e(k) is negative AND e(k) is negative then u(k) is negative

ALSO

Rule 9: If e(k) is positive AND e(k) is positive then u(k) is positive

F SystemsUZZY CONTROL FUZZY CONTROLLERS- Mamdani Controlers

A worked example

Consider an FLC of Mamdani type:

A source for MATLAb FILES FOR BUILDING Mamdani Controllers is

http://ist.psu.edu/yen/FLtext/matlab/FuzzyControl/

F SystemsUZZY CONTROL FUZZY CONTROLLERS- An example

The membership functions for the three elements of the term set for the error e are given as:

F SystemsUZZY CONTROL FUZZY CONTROLLERS

The reference fuzzy set for the error for a specific case is given as:

F SystemsUZZY CONTROL FUZZY CONTROLLERS- An example

The membership functions for the three elements of the term set for the change inerror e are given as:

F SystemsUZZY CONTROL FUZZY CONTROLLERS

The reference fuzzy set for the change in error e is given as:

F SystemsUZZY CONTROL FUZZY CONTROLLERS- An example

The membership functions for the three elements of the term set for the change incontrol u are given as:

F SystemsUZZY CONTROL FUZZY CONTROLLERS

The reference fuzzy set for the change in control u is given as:

F SystemsUZZY CONTROL FUZZY CONTROLLERS – An example

- Recall that there are nine rules in all:
- IFe(k) is NEGATIVE & De(k) is NEGATIVETHENDu(k) is NEGATIVE
- IFe(k) is NEGATIVE & De(k) is ZEROTHENDu(k) is NEGATIVE
- IFe(k) is NEGATIVE & De(k) is POSITIVETHENDu(k) is ZERO
- IFe(k) is ZERO & De(k) is NEGATIVETHENDu(k) is NEGATIVE
- IFe(k) is ZERO & De(k) is ZEROTHENDu(k) is ZERO
- IFe(k) is ZERO & De(k) is POSITIVETHENDu(k) is POSITIVE
- IFe(k) is POSITIVE & De(k) is NEGATIVETHENDu(k) is ZERO
- IFe(k) is POSITIVE & De(k) is ZEROTHENDu(k) is POSITIVE
- IFe(k) is POSITIVE & De(k) is POSITIVETHENDu(k) is POSITIVE

F SystemsUZZY CONTROL FUZZY CONTROLLERS – An example

F SystemsUZZY CONTROL FUZZY CONTROLLERS – An example

F SystemsUZZY CONTROL FUZZY CONTROLLERS – An example

F SystemsUZZY CONTROL FUZZY CONTROLLERS – An example

F SystemsUZZY CONTROL FUZZY CONTROLLERS – An example

F SystemsUZZY CONTROL FUZZY CONTROLLERS – An example

We need the the membership functions for the output in a discrete form. By equidistant discretization of the universe Y

Y=[-6,-4.5,-3,-1.5,0,1.5,3,4.5,6])

we have:

F SystemsUZZY CONTROL FUZZY CONTROLLERS – An example

Consider the case where e(k)= -2.1 and De(k)= 0.5. The fuzzification of the input leads to two observations:

F SystemsUZZY CONTROL FUZZY CONTROLLERS – An example

Consider the case where e(k)= -2.1 and De(k)= 0.5. The fuzzification of the input leads to two observations:

F SystemsUZZY CONTROL FUZZY CONTROLLERS – An example

For the case where e(k)= -2.1 and De(k)= 0.5, the level or degree of firing for the 9-rule rule set:

F SystemsUZZY CONTROL FUZZY CONTROLLERS – An example

The output of individual rule (Fi(y)) depends on the interaction between the degree (level) of firing (DOF or i) and the consequent of the rule (Di). We are considering the case where e(k)= -2.1 and De(k)= 0.5.

F SystemsUZZY CONTROL FUZZY CONTROLLERS – An example

The MAMDANI method suggests that:

Fi(y) = i Di min (i, Di)

We are considering the case where e(k)= -2.1 and De(k)= 0.5.

F SystemsUZZY CONTROL FUZZY CONTROLLERS – An example

The aggregation of the individual rule outputs to obtain the overall control system output (Fy). The rules are ‘chained’ through ALSO thus individual rule outputs are aggregated using the disjunctive connective ALSO.

The overall system output for the inputs e(k)= -2.1 and De(k)= 0.5 is:

F SystemsUZZY CONTROL FUZZY CONTROLLERS – An example

The extraction of a crisp output value: The output fuzzy set cannot be used directly as input to the controlled system. We need to select one element y* from the universe Y (e.g., u* from all possible values of u - the change of control). So we should defuzzify: typically used methods of defuzzification include the so-called centre of area method.

Let the output Y be a finite universe of discourse and F(y) be a DISCRETE membership

function:

F SystemsUZZY CONTROL FUZZY CONTROLLERS – An example

The extraction of a crisp output value: Centre of Area Computation:

The weighted average of the output fuzzy set with the corresponding value of the membership function for each of the change in control Du for the inputs e(k)= -2.1 and De(k)= 0.5 is:

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Another example

For the case where e(k)= -0.9 and De(k)= 0.2, the level or degree of firing for the 9-rule rule set:

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Another example

The output of individual rule (Fi(y)) depends on the interaction between the degree (level) of firing (DOF or i) and the consequent of the rule (Di). We are considering the case where e(k)= -0.9 and De(k)= 0.2

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Another example

The MAMDANI method suggests that:

Fi(y) = i Di min (i, Di)

We are considering the case where e(k)= -0.9 and De(k)= 0.2.

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Another example

The aggregation of the individual rule outputs to obtain the overall control system output (Fy). The rules are ‘chained’ through ALSO thus individual rule outputs are aggregated using the disjunctive connective ALSO.

The overall system output for the inputs e(k)= -0.9 and De(k)= 0.2 is:

F SystemsUZZY CONTROL FUZZY CONTROLLERS – Another example

The extraction of a crisp output value: Centre of Area Computation:

The weighted average of the output fuzzy set with the corresponding value of the membership function for each of the change in control Du for the inputs e(k)= -0.9 and De(k)= 0.2 is:

The defuzzified value of Du is

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

Takagi-Sugeno model is an approximation of a Mamdani controller – in that the Takagi-Sugeno model ignores the fuzziness of linguistic variables in the consequent, but accounts for the fuzziness of variables in the antecedants; whereas Mamdani controller takes into the fuzziness of variables appearing both in the antecdents and the consequent.

F SystemsUZZY LOGIC & FUZZY SYSTEMS Knowledge Representation & Reasoning: The Air-conditioner Example

Model Identification: Given a choice between two models, say Mamdani and Takagi-Sugeno, we have to first identify why to chose a fuzzy logic system (will a crisp description not work as it is simpler to compute) and second whether to use an elaborate model (say Mamdani) rather than an approximation to the model (say, Takagi-Sugeno).

The choice can be based on the relative performance of the two models

Download Presentation

Connecting to Server..