24
Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of an ordinary or crisp set. A fuzzy subset can be seen as a predicate whose truth values are drawn from the unit interval , I =[0,1] rather than the set {0,1} as in the case of an ordinary set. Thus the fuzzy subset has as its underlying logic a multivalued logic. The fuzzy set allows for the description of concepts in which the boundary between a property and not having a property is not sharp. Ex:- A set of heights forms a fuzzy set and its subsets include heights that can be categorized as tall, medium and short, here the property is height. All the temperatures in a year can be clustered into three groups (or fuzzy subsets) that belong to hot, moderate and cold. Here the property is temperature. In both these examples, the highest value of the property is taken as unity and the rest lie with in the interval [0, 1]. Membership function:- Let X be the universe of discourse (the domain of a property). A subset of A of X is associated with a membership function. A : x→ [0, 1] Where A (x) for each x indicates the degree to which x is a member of the set A. I t is also called the degree of association of x in A.

Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

  • Upload
    others

  • View
    198

  • Download
    7

Embed Size (px)

Citation preview

Page 1: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

Fuzzy Logic and Fuzzy Modeling

Fuzzy Logic:

Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of an ordinary

or crisp set. A fuzzy subset can be seen as a predicate whose truth values are drawn from

the unit interval , I =[0,1] rather than the set {0,1} as in the case of an ordinary set. Thus

the fuzzy subset has as its underlying logic a multivalued logic. The fuzzy set allows for

the description of concepts in which the boundary between a property and not having a

property is not sharp.

Ex:-

A set of heights forms a fuzzy set and its subsets include heights that can be categorized

as tall, medium and short, here the property is height. All the temperatures in a year can

be clustered into three groups (or fuzzy subsets) that belong to hot, moderate and cold.

Here the property is temperature. In both these examples, the highest value of the

property is taken as unity and the rest lie with in the interval [0, 1].

Membership function:-

Let X be the universe of discourse (the domain of a property). A subset of A of X is

associated with a membership function.

A : x→ [0, 1]

Where A (x) for each x indicates the degree to which x is a member of the set A. I t is

also called the degree of association of x in A.

Page 2: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

Depending on the variation of x in the set A, one can choose a particular shape for the

membership function. Some of the shapes are described in the following.

A triangular membership function (MF) is specified by three parameters {a, b, c} as

follows:

Triangular (x; a, b, c) =

0,

,

,

0,

x a

x aa x b

b a

c xb x c

c b

c x

A trapezoidal MF is specified by four parameters {a, b, c, d} as follows:

Page 3: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

Trapezoid (a; a, b, c, d) =

0,

,

,

0,

x a

x aa x b

b a

d xc x d

d c

d x

A Gaussian MF is specified by two parameters {c, }

Gaussian (x; c, ) = 1/ 2e

2x c

Page 4: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

A generalized bell MF is specified by three parameters {a, b, c}

Bell (x ; a ,b,c) = 2

1

1

bx c

a

where the parameter b is usually positive.

Page 5: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

Fuzzy Set:-

If X is a collection of objects denoted generally by x, then a fuzzy set A in X is defined as

a set of ordered pairs:

A = {[x, A (x) ] | x X }

Where A (x) is the MF for the fuzzy set A. Usually x is referred to as the universe of

discourse or simply the universe.

Ex :

Let X=R+ be the set of possible ages for human beings then the fuzzy set B= “about 50

years old “may be expressed as

Page 6: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

Support:

The support of fuzzy set A is the set of all points x in A such that A (x) >0:

Support (A) = {x │ A (x) >0}

Core:

The core of a fuzzy set A is the set of all points x in X such that A (x) =1

Core (A) = {x │ A (x) =1}

Crossover point:

A crossover point of a fuzzy set A is a point x X

At which A (x) = 0.5

Crossover (A) = {x │ A (x) =0.5}

Fuzzy singleton:

A fuzzy set whose support is a single point in x with A (x) = 1 is called fuzzy singleton.

Page 7: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

α­cut, strong α­cut:

The α-cut or α-level set of a fuzzy set A is a crisp set defined by

Aα = {x │ A (x) ≥α}

Strong αcut or strong α-level are defined similarly

Aα’ = {x │ A (x) >α

Normality:

A fuzzy set A is normal if its core is nonempty.

In other words, we can always find a point x X such that A (x) = 1

Convexity:

A fuzzy set is convex if and only if for any x1,x2X and any λ [0,1] , A {λx1 + (1-

λ)x2 } min { A (x1), A (x2) }

Alternatively, A is convex if all its α –level sets are convex.

Fuzzy number:

A fuzzy number A is a fuzzy set in the real line (R) that satisfies the conditions for

normality and convexity.

Fuzzy set operations:

Before introducing the fuzzy set operations, first we shall define the notation of

containment, which plays a central role in fuzzy sets.

Containment or subset:

A fuzzy set A is contained in set B (or, equivalent A is α subset of B) if and only if A

(x) ≤ B (x) for all. In symbols,

A B A (x) ≤ B (x)

Union (disjunction):

Page 8: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

The union of two fuzzy sets A and B is a fuzzy set C , written as C=A B or C=a or B,

whose MF is related to those of A and B by

C (x)= max{ A (x),

B (x)}= A (x)

B (x) it is the “smallest” fuzzy set

containing both A and B.

Intersection (conjunction):

The interconnection of two fuzzy sets A and B is a fuzzy set C written as C=A B or C=

A and B whose MF is related to those of A and B by

C (x) = min { A (x), B (x)}= A (x) B (x)

It is the “largest” fuzzy set, which is contained in both A and B.

Complement (negation):

The complement of a fuzzy set A is denoted by A

1 AA

MFs of two Dimensions:

Some times it is necessary to use MFs with two inputs, each on a different universe of

discourse. MFs of this kind are generally referred to as two-dimensional MFs, where as

ordinary MFs are referred to as one-dimensional MFs. One natural way to extend one-

dimensional MF to two-dimensional ones is via cylindrical extension.

Cylindrical extension of one-dimensional fuzzy sets:

If A is a fuzzy set in X, then its cylindrical extension in X x Y is a fuzzy set c(A) defined

by

C (A) = A

XxY

/(x,y)

Page 9: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

Usually, A is referred to as a base set. The operation of projection on the other hand

decreases the dimension of a given (multidimensional) MF.

Projection of fuzzy sets:

Let R be a two dimensional fuzzy set on XxY. Then the projection of R onto X and Y are

defined as

xR = [max y R

x

(x,y)]/x

yR = [max x R

y

(x,y)]/y

respectively.

T and S operators:

The four conditions: commutativity, associativity, monotonicity and respective identities

have been used to characterize the T and S operators which in turn define the general

class of intersection and union.

An operator T: [ 0,1] x [ 0,1] [ 0,1 ]

Is called a t-norm operator if

(1) T (a, b) = T (b, a) Commutativity

(2) T( a,T( b,c)) = T(T ( a,b ),c) Associativity

(3) T (a, b) ≥ T (c,d) if a ≥ c and b ≥ d Monotonicity

(4) T(a,1) = a One identity

To see that the T reduces to the crisp intersection we note that (4) implies T(0,1) =0 and

T (1,1) =1.

Condition (1) implies T(0,1) = T(1,0) = 0. Finally, this fact along with condition (3)

implies that T (0,0) = 0.

Page 10: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

We note that the Min and product operators are examples of these t-norm operators. Part

of the uniqueness of the Min operator as a choice for the implementation of the

intersection operator is based on the fact that the Min operator is the largest of possible t-

norms, T(a,b) ≤ Min (a,b).

t-co norm or s operator:

An operator s: [0,1] x [0,1] [ 0,1]

Is called a t-conorm operator if

(1) s(a,b)= s(b,a) Commutativity

(2) s(a, s(b,c)) = s(s(a,b),c) Associativity

(3) s(a,b) ≥ s(c,d) if a ≥ c and b ≥ d Monotonicity

(4) s(a,0) = a Zero identity

It can be seen that the above conditions imply

s(1,1) = s(1,0) = s(0,1) = 1

s(0,0) = 0

We note that the Max and the a + b – ab operators are examples of these t- conorm

operators. Another example of the t- conorm is the bounded sum Min [1, a+b]. part of the

uniqueness of the max operator as a choice for the implementation of the union operator

is based on the fact that the Max operator is the smallest of all the t-co norms, for all s:

Max(a,b) ≤ s(a,b).

It should be noted that the only distinction between the T and S operators is in conditions

(4) and (4’). These conditions can be seen as the defining characteristics of the respective

operators. Essentially condition (4) implies that the smallest argument is the most

influential in the formulation of the “AND”, while condition (4’) implies that the biggest

argument is the most influential in the formulation of the “OR”.

The following is a short table of some commonly encountered t-co norm and t-co norm

duals:

Page 11: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

t-norm t- conorm

Min (a,b) Max (a,b) Min/Max

ab a+b-ab product/probabilistic sum

Max(0,a+b-1) Min(1,a+b) Bold union/Bounded sum

Extension Principle:

The extension principle is a basic concept of fuzzy set theory that provides a general

procedure for extending crisp domains of mathematical expressions to fuzzy domains.

This procedure generalizes a common point – to –point mapping of a function f (.) to a

mapping between fuzzy sets. More specifically, suppose that f is a function from X to Y

and A is a fuzzy on x defined as

1 1 2 2( ) / ( ) / ......... ( ) /A A A n nA x x x x x x

Then the extension principle states that the image of fuzzy set A under the mapping f (.)

can be expressed as a fuzzy set B,

1 1 2 2( ) ( ) / ( ) / ......... ( ) /A A A n nB f A x y x y x y

W here 2y = f( ix ), i =1,…,n. In other words, the fuzzy set B can be defined through the

values of f (.) in 1x ,………… nx .

Page 12: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

Ex :-

Application of the extension principle to fuzzy sets with discrete universes

Let A = 0.1/ -2 + 0.4 / -1 +0.8/0 + 0.9 / 1 +0.3 /2

And f(x) = 2x -3

Upon applying the extension principle, we have

B= 0.1/1 + 0.4/ -2 + 0.8/ -3 + 0.9/-2 + 0.3/1

= 0.8/ -3 + (0.4 0.9)/ -2 +(0.1 0.3)/1

= 0.8/ -3 +0.9/-2+0.3/1

Where represents max

Fuzzy relations:-

Binary fuzzy relations are fuzzy sets in XxY which map element in XxY to a

membership grade between 0 and 1.

In particular, unary fuzzy relations are fuzzy sets with one –dimensional MFs and so on.

Applications of fuzzy relations include areas such as fuzzy control and decision making.

Binary fuzzy relation:

Let X and Y be the two universes of discourse. Then

R ={((x,y), R (x,y)) │(x,y) XxY}

Is a binary relation in XxY.

Ex :-

Let X= Y = R + (the positive real line) and R = “Y is much greater than X”. The MF of

the fuzzy relation R can be subjectively defined as

Page 13: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

R (x, y) = ,

2

0 , y

y xy x

x y

x

If x = { 3, 4, 5} and y = {3, 4,5,6, 7}, then it is convenient to express the

fuzzy relation R as a Relation matrix:

0 0.111 0.2 0.273 0.333

0 0 0.091 0.167 0.231

0 0 0 0.077 0.143

R

Where the elements at row i and column j is equal to the membership grade between

i th element of x and j th element of y.

Max- Min composition :

Let 1R and 2R be two fuzzy relations defined on XxY and YxZ respectively. The Max-

Min composition of 1R and 2R is a fuzzy set defined by

1 2R R =

max min

y [

1( , )R x y ,

2( , )R y z ]

= y

y [ 1( , )R x y

2( , )R y z ]

Where and represent max and min, respectively

Or

1 21 2 {[( , ),max min( ( , ), ( , ))] | , , }y R RR R x z x y y z x X y Y z Z

When 1R and 2R are expressed as relation matrices, the calculation of 1 2R R is almost

the same as the matrix multiplication, except that X and + replaced by and

respectively. For this reason, max-min composition is also called the max-min product.

Page 14: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

Max-product composition: It is defined as follows:

1 2 1 2

( , ) max [ ( , ) ( , )]R R y R Rx z x y y z

Max-Min and max-product composition

Let 1R = “x is relevant to y”

2R = “y is relevant to z”

Be two fuzzy relations defined on X xY and Yx Z, respectively , where X = { 1,2,3} , Y

= { , , , } , and Z = {a, b}. Assume that 1R and 2R can be expressed as the following

relation matrices:

1

0.1 0.3 0.5 0.7

0.4 0.2 0.8 0.9

0.6 0.8 0.3 0.2

R

2

0.9 0.1

0.2 0.3

0.5 0.6

0.7 0.2

R

Now we want to find 1 2R R , which can be interpreted as a derived fuzzy relation “x is

relevant to z” based on 1R and 2R . For simplicity suppose that we are only interested in

the degree of relevance between 2 (X) and a (Z). If we adopt max- min composition,

then

1 2R R (2, a) =max ( 0.4 0.9,0.2 0.2,0.8 0.5,0.9 0.7

= max (0.4, 0.2, 0.5, 0.7)

= 0.7

On the other hand if we choose the max- product composition we have :

Page 15: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

1 2(2, ) max(0.4 0.9,0.2 0.2,0.8 0.5,0.9 0.7)R R a

=max (0.36, 0.04, 0.40, 0.63)

= 0.63

This figure shows that the relation between element 2 in X and element a in Z is built up

via 4 possible paths connecting these two elements.

The degree of relevance between 2 and a is the maximum of these 4 paths, while each

path’s strength is the minimum (or product) of the strengths of its consistent links.

Linguistic Variables:

These are used to describe information in qualitative terms when we are unable to

qualify the information.

If age is interpreted as a linguistic variable, then its term set T (age) could be

T (age) = (young ,not young ,very young, middle aged ,not middle aged ,….old , not old

, very old ,more or less old, ……….)

Page 16: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

where each term in T(age) is characterized by a fuzzy set of a universe of discourses X

= [0,100]. Usually we use “age is young” to denote the assignment of the linguistic value

“young” to the linguistic variable “age”.

From the above example we can see that the term set of several primary terms (young,

middle, aged, old) modified by the negation (“not”) and /or the hedges (very ,more or

less, quite, extremely, and so forth),, and then linked by connectives such as and, or,

either and neither, We treat the connectives, the hedges, and the negation as operators

that change the meaning of operands in a specified ,context independent fashion.

The figure below displays some of the typical membership functions of primary terms

and their hedges associated with linguistic variable “age”.

Concentration and Dilation:

Let A be a linguistic value characterized by a fuzzy set with membership function (.)A ,

then KA is interpreted as a modified version of the original linguistic value expressed as

Page 17: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

[ ( )] /K k

A

X

A x x

In particular, the operation of concentration is defined as

CON (A) = 2A

While that of dilation is expressed by

DIL (A) = 0.5A

Note that CON (A) and DIL (A) are the results of applying hedges : “very” and “ more

or less”, to the linguistic term A.

Fuzzy If –Then Rules:

A fuzzy if-then rule (also known as fuzzy rule, fuzzy implication or fuzzy conditional

statement) assumes the form :

If x is A then y is B

Where A and B are linguistic values defined by fuzzy sets on universes of discourse X

and Y respectively. Often “x is A ” is called the antecedent and “y is B” is called the

consequence (or consequent).

Ex :- Some fuzzy rules

- If pressure is high, then volume is small

- If road is slippery, then driving is dangerous.

- If tomato is red, then it is ripe.

- If the speed is high, then apply the brake a little.

-

Fuzzy reasoning:

The basic rule of inference in traditional two-valued logic is modus ponens, according to

which we can infer the truth of a proposition B from the truth of A and the implication

A B . That is

Page 18: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

Premise (fact): x is A

Premise 2 (rule): if x is A then y is B

Consequent: y is B

Assume that A B is expressed as a fuzzy relation R on X Y .

Then B = ( )A R A A B ( ) ( ( ) ( , ))xB y V A x R x y

= ;yproj G where G A R .

Approximate reasoning:

Suppose 'A is close to A and 'B is close to B. then we have

Premise 1 (fact) : x is 'A

Premise 2 (rule) : if x is A then y is B

Consequent: y is 'B

Then ' ' ' '( ) ( )B A R A A B

Single rule with multiple antecedents

Premise 1 (fact): x is 'A and y is 'B

Premise 2 (rule): if x is A and y is B then z =C

Consequent Z is 'C

' ' '

' '

' '

' ' '

,

,

1 2

( ) ( )

( ) [ ( ) ( )] [ ( ) ( ) ( )]

{[ ( ) ( ) ( ) ( )]} ( )

{ [ ( ) ( )]} {[ ( ) ( )]} ( )

( ) ( )

x y A B CC A B

x y A B CA B

x A Y B CA B

C

C A B A B C

Accordingly

Z V x y x y z

V x y x y z

V x x V y y z

w w z

Firing strength

Page 19: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

Multiple rules with multiple antecedents:

' '

1 1 1

2 2 2

'

1( ) :

2( 1) :

3( 2) :

:

premise fact If x is A and y is B

premise rule If x is A and y is B then z is C

premise rule If x is A and y is B then z is C

consequent z is C

' ' '

1 2

' ' ' '

1 2

' '

1 2

( ) ( )

[( ) ] [ )

C A B R R

A B R A B R

C C

The graphical representation of the above equation is shown in figure

Page 20: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

Fuzzy models:

A fuzzy inference system is known by other names ,such as fuzzy –rule based system

,fuzzy model , fuzzy associative memory, and simply fuzzy system. The basic structure

of a fuzzy inference system consists of a three conceptual components : a rule base,

which contains a selection of fuzzy rules; a database which defines the membership

functions used in the fuzzy rules; and a reasoning mechanism, which performs the

inference procedure upon the rules and given facts to derive a reasonable output or

conclusion. A fuzzy inference system implements a nonlinear mapping from its input

space to output space. This mapping is accomplished by a number of if-then rules, each

of which describes the local behavior of the mapping. In particular, the antecedent

defines a fuzzy region in the input space, while the consequent specifies the output in the

fuzzy region. We need a method of defuzzification to extract a crisp value that best

representations the fuzzy set of the out put. The following block diagram shows a fuzzy

inference system.

The aggregator combines the fuzzy rules in the rule base to yield fuzzy output, which is

converted into a crisp output by a defuzzifier.

Mamdani fuzzy model:

The Mamdani fuzzy interference system uses min and max for T-norm and T-conorm

operators, respectively. The rules in this system are of the form:

If x is 1A and y is 1B then z is 1C

If x is 2A and y is 2B then z is 2C

Page 21: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

These figures illustrate how to obtain the crisp output of the above rules using max-min

composition.

Ex:-

If x is small and y is small then z is negative large

If x is large and y is small then z is positive small

The crisp output is obtained as the centroid of area , COA of Z.

COAZ =

( )

( )

F

z

F

z

z zdz

z dz

where ( )F z is the aggregated output MF , i.e., 'C .

" "F is the fuzzy set of universe of discourse Z.

Derivation:

The fuzzy relation iR is given by the Cartesian product

i i i iR A B C

Page 22: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

( ) ( ) ( )i i iA x B y C z

( ) ( ) ( )i i iA x B y C z

2

1

i

i

R R

(As there are only two variables)

2

1[ ( ) ( ) ( )]i i i i i iR A x B y C z

Let A and B be the given input fuzzy sets. The fuzzy output ( )F z is obtained by

extending the max-min rule of inference to the case of two inputs by aggregating the

rules.

( ) ( ( ), ( ))F z A x B y R

, [ ( ) ( ) ( , , )]x y A x B y R x y z

2

,

1

( ) ( ) ( , , )x y i

i

A x B y R x y z

2

,

1

[ ( ) ( ) ( ) ( ) ( )]x y i i i

i

A x B y A x B y C z

2

1

[ { ( ) ( )}] [ { ( ) ( )}] ( )x i y i i

i

A x A x B y B y C z

2

1

[ | ] [ | ] ( )i i i

i

Poss A A Poss B B C z

2

1

( )i i

i

C z

( is for max, is for min and replace min by product for max product case)

where i is the degree of firing or firing strength of the ith rule. The crisp output is

obtained from

COA

( )

z =( )

F

z

F

z

z z dz

z dz

where ( )F z is the membership function of fuzzy set ( )F z . The above formulation can

be extended to any number of inputs and rules.

Page 23: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

Takagi-Sugeno (TS) model

A typical fuzzy rule in a TS fuzzy model has the form:

If x is A and y is B then z=f(x,y)

where A and B are fuzzy sets in the antecedent, while z= f(x,y) is a crisp function in the

consequent. Usually f(x,y) is a polynomial in the input variables x and y, but it can be any

function as long as it can appropriately describe the output of model within the fuzzy

region specified by the antecedent of the rule. When f(x,y) is the first order polynomial,

the resulting fuzzy inference system is called first order TS fuzzy model. When f is

constant, we then have a zero order TS fuzzy model, which can be viewed as a special

case of the Mamdani fuzzy inference system, in which case the rule's consequent is

specified by fuzzy singleton ( or a pre - defuzzified consequent).

The following figure shows the fuzzy reasoning procedure for a first order TS fuzzy

model for two rules:

Min or product:

If x is A1 and y is B1,then 1111 ryqxpz

If x is A2 and y is B2, then 2222 ryqxpz

The weighted average is given by:

21

2211

ww

zwzwz

Each of the linear functions in the rule consequents can be regarded as a linear model

with crisp inputs x and y, crisp output zi and parameters pi, qi and ri. The crisp output

z inferred by the TS fuzzy model is defined by the weighted average of crisp outputs

zi of individual linear subsystems:

2

1

2

1

i

i

i

ii z

z

=

2

1

2

1

)(

i

i

i

iiii ryqxp

Page 24: Fuzzy Logic and Fuzzy Modeling - 123seminarsonly.com · Fuzzy Logic and Fuzzy Modeling Fuzzy Logic: Fuzzy logic deals with fuzzy sets. A fuzzy set or subset is a generalization of

Where i is the degree of firing (DOF) of the ith rule for the crisp inputs, given by:

( ) ( )i i iA x B y

Geometrically, the rules of TS fuzzy model correspond to an approximation of

mapping ZYX by a piecewise linear function. Here XAi and YBi .In

a more general setting the linear functions in the consequents of the rules can be

replaced by non linear ones.