Takagi-Sugeno Fuzzy Inference - Parametric Fuzzy System - u Takagi and Sugeno introduced a new...

23
Takagi-Sugeno Fuzzy Inference - Parametric Fuzzy System - Takagi and Sugeno introduced a new inference structure based on fuzzy sets theory. Such structure is either called a Takagi-Sugeno fuzzy inference system or a parametric fuzzy system. It has been demonstrated to function as a efficient model for systems that can be fully represented by their input / output relationships Like Mamdani’s Rule-Based Fuzzy Systems, parametric fuzzy systems are also based on a rule base approach. But the rules consequents, instead of being formed by fuzzy relations, are linear parametric equations in terms of the inputs of the system.

Transcript of Takagi-Sugeno Fuzzy Inference - Parametric Fuzzy System - u Takagi and Sugeno introduced a new...

Takagi-Sugeno Fuzzy Inference- Parametric Fuzzy System -

Takagi and Sugeno introduced a new inference structure based on fuzzy sets theory. Such structure is either called a Takagi-Sugeno fuzzy inference system or a parametric fuzzy system. It has been demonstrated to function as a efficient model for systems that can be fully represented by their input / output relationships

Like Mamdani’s Rule-Based Fuzzy Systems, parametric fuzzy systems are also based on a rule base approach. But the rules consequents, instead of being formed by fuzzy relations, are linear parametric equations in terms of the inputs of the system.

IF <VAR1> = <TERM11> AND <VAR2> = <TERM21> AND …… AND <VARk> = <TERMk1>, THEN <OUTPUT> = P10 + P11 * <VAR1> + … + P1k * <VARk>

Theoretically the consequents could be any function, even non-linear. However, linear functions have been employed most of the time. Adaptive training have been used for further non-linear capabilities

Combination of a global rule-base description with local linear approximations by means of a linear regression model corresponding to a linear input-output model that one would use for describing the system locally.

Parametric Fuzzy Controllers

The parametric form of fuzzy rules has the following structure:

IF s1 = S1i AND s2 = S2

i THEN vouti = a0

i + a1i s1+a2

i s2+…+ api sp

i

where si is an input variable; vout is an output variable, Sji is a linguistic fuzzy membership function, and the coefficient set {aji} is the parameter set to be identified.

In the parametric method, the linear equation coefficients Aij are trained by the example data. This is comparable with the learning phase of a neural network !

The linear equation outputs are then defuzzified, i.e., the weighted average of the consequents is evaluated by the respective membership values to determine the crisp output.

y=a1x+b1 y=a2x+b2 y=a3x+b3

A1 A2 A3

Example, consider two rules :

R1 : IF x1 is BIG AND x2 is MEDIUM THEN u1 = x1-3x2

R2 : IF x1 is SMALL AND x2 is BIG THEN u2 = 4 +2x1

BIG(x1) = 0.3 BIG(x2) =0.35

SMALL(x1) = 0.7 MED(x2) = 0.75

Thus the weighted normalized sum one gets U = [0.3(-176) + 0.35(12)]/(0.3 + 0.35) = -74.77

0 .7 51

0 x = 6 02

M E D IU M B IG

1 0 0

0 .3 50 .3

0 .7

1 0

1

0 x = 41

S M A L L B IG

Power Electronics Problem:

Look at the current waveform for a three-phase rectifier and by measuring the width and height of the current pulses try to figure out the RMS total current value

Assume that a table of values, gained either from measurements or simulations, is available for a two-input (W and H) single-output (Is) system. The task is to find linear segments of the output function by fitting a straight line on those of its values which correspond to the fuzzy inputs defined by linguistic membership functions.

Low Medium HighW

0.2 0.6

1

1H

0.5 0.8 1.1

0.4

Low Medium High

W H IS 1 0.1 0.8 0.3 2 0.2 0.7 0.4 3 0.15 0.6 0.7 4 0.3 0.7 0.8 5 0.4 0.1 0.1 6 0.5 0.5 0.5 7 0.5 0.9 0.2 8 0.45 0.15 0.65

Consider Rule 1: IF width (W) = medium AND height (H) = low THEN RMS current (Is ) = A

01 + A

11W + A

21H

The apex points of membership function Medium on the horizontal axis for variable W are: 0.2 , 0.6 and those of Low for variable H are: 0.5 , 0.8. Go to the table and find those rows where the value of W fall between 0.2 and 0.6 and the values of H fall between 0.5 and 0.8. These are: Rows 2,3,4, and 6. W H Is

-------------------------------------------------------------------------------------- 2 0.2 0.7 0.4 3 0.15 0.6 0.7 4 0.3 0.7 0.8 6 0.5 0.5 0.5 The task is to find a straight line which could be fitted on these points such that the squares of the distances between the line and the points would be minimized (linear regression). The coefficients A01 , A11 , A 21 , calculated conveniently by means of a suitable program package, are the least square coefficients of the straight line fitted of these points. Rule 2 can be processed in the same way, until both rules can be written in terms of the known linear coefficients.

W /W m a x

M em b ership fun c tion sfo r w idth (W )

W id th (W )

W ( p u )

1 .0

0

I + If1 f2

I + IS1 S 2

D P F + D P F1 2

I = -1.4 37 6 + 0 .8 75 E -3W + 0 .4 21 3 HS2

I = -0.5 89 5 + 0 .4 07 9 E -3 W + 0.38 7 9 HS1

I = -1.93 5 9 + 1.1 38 7 E -3 W + 0 .2 9 3 2 Hf1

I = -0.70 7 8 + 0.4 89 8 E -3 W + 0 .2 4 9 3 Hf1

D P F = 1 .0 5 6 - 1 3.93 5 W1

D P F = 1 .3 5 7 - 1 6.82 2 W2

VB

ZO

PSS

PSB

PM

S

PM

B

PB

S

PB

B

0 1 .00 .5

I F

D P F

I S

The fuzzy parametric estimation algorithm shown can be summarized as follows: Read the parameters W and H for an operating condition. Convert W to a normalized value after dividing by the Wmax value to get W(pu).

Identify the interval in which W(pu) lies.

Fuzzify by calculating the degree of membership 1 and 2, as shown

Fire the two relevant rules and calculate Is1 - Is2, If1 - If2 and DPF1 - DPF2 from the

linear equations using the known W and H. Defuzzify the crisp output by the weighted average (C-o-A) method.

Linear Filtering with Parametric Fuzzy Systems

The beauty of Parametric Fuzzy Systems is the ability of representing very complex systems and to embedded linear controllers.

Linear controllers are linear filters as :

1

1

21

n

n

niiii dt

xda

dt

dxaxau

This equation describes a filter of n-th order whose coefficients dependent on the state vector

1,, nxxx x

The parametric fuzzy controller permits a smooth transition between the individual controllers with the following compact representation :

xLi Tii

icuxR thenisif:

which expressed linguistically says that

IF state vector x has the property Li

THEN apply controller fi(x)

Training Parametric Fuzzy Systems

In order to train the parametric fuzzy system it is necessary to have input-output data sets for the system to be modeled.

Fuzzy partitions are then created for the input variables of the data sets, i. e., fuzzy membership functions are defined to fill in the universe of discourse of the input variables.

Then, the combination of these membership functions for each input variable form the antecedent part of the fuzzy rule base.

Given a set of input-output data represented by x1j, x2j,…, xkj, yj, (j=1,2,…,m), the consequent parameters can be estimated by RLS

n

ikikiiik xPxPPxxxy

111021 )......(),...,,(

n

inini

ninii

xAxA

xAxA

111

11

))()^...^((

)()^...^(

where

Equations below show the input-output expressions for a general parametric fuzzy system that uses a set of n fuzzy rules and k inputs.

Then the parameter vector P can be calculated by

Let X (m x n.(k+1) matrix), Y (m vector) and

P (n.(k+1) vector) be :

Tnknn

Tm

nmkmk

mmm

k

nn

PPPPPP

yyY

xx

x

x

xx

X

],...,,...,,,...,[

],...,[

........

.

.........

.

........

111010

1

111

111

111

1111111111

YXXXP TT ..).( 1

The parameter vector can be recursively estimated by a stable-state Kalman filter like:

1,...,1,0..1

..

)..(.

11

11

11111

mixSx

SxxSSS

PxyxSPP

Tiii

iiiiii

iiiiiii

where xi are lines of the matrix X. The initial values

of P0 e S0 are set as follows, with being a large

initial value and I the identity matrix. :

IS

P

.

0

0

0

The following Matlab programs were developed to implement Parametric Fuzzy Models:• Init_TSModel.m• Adjust_TSModel.m• Run_TSModel.m

A test was made with a straight line data set (Adj1Reta.m) as well as a two straight lines data set (Adj2Reta.m).

The TS system is configured with rectangular membership functions covering the entire input space, one at a time, only two rules and 4 parameters. This will allow the system to learn the exact parameters of the straight lines used to generate the data sets.

0 100 200 300 400 500 600 700 800 900 1000-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

1Evolution of Estimated Parameters

0 10 20 30 40 50 60 70 80 90 1000

0.2

0.4

0.6

0.8

1

Parametric Fuzzy Activation Functions

0 10 20 30 40 50 60 70 80 90 100-70

-60

-50

-40

-30

-20

-10

0

10Function to be Approximated (Solid), Approximation (Circles)

Estimation of a system with two straight lines

Actual parameters :a1 = 0.2

b1 = -5.0

a2 = -0.7

b2 = 1.5

Estimated Parameters :a1= 0.1727

b1 = -5.6977

a2 = -0.6289

b2 = 1.6174

=> Discontinuity is very hard to capture

=> Convex membership functions will help to smooth out the discontinuity

=> System has good convergence !

-1 -0.5 0 0.5 10

0.5

1

1.5

2Trained Parametric Fuzzy System

0 50 100 150 200-1

0

1

2

3Evolution of Estimated Parameters

-1 -0.5 0 0.5 10

0.005

0.01

0.015

0.02

0.025Quadratic Error in the Range

Approximation of a Nonlinear Curve

Function approximated: Y = x3 + 1

Fuzzy partition with 6 terms, yielding 12 parameters to be estimated.

Average Error of 1 %.

Approximation of a Nonlinear Surface

Function approximated: Z = 1 – (x2 + y2)

Fuzzy partition with 10 terms, yielding 300 parameters to be estimated.

Average error of 2 %.

-1-0.5

00.5

1

-1

0

1-1

-0.5

0

0.5

1

Trained Parametric Fuzzy System

-1-0.5

00.5

1

-1

0

1-1

-0.5

0

0.5

1

Function to be Approximated

-1-0.5

00.5

1

-1

0

10

0.1

0.2

0.3

0.4

Absolute Error

Performance Criteria

Accuracy: The accuracy of the parametric approach is generally superior to the rule based approach for the same number of rules. Of course, accuracy can be improved by a larger number of membership functions and a correspondingly larger number of rules.

Response time: One outstanding advantage of fuzzy estimation is a very fast that the response time is very fast when compared to conventional hardware or software estimation. This is because the fuzzy method tends to estimate the output instantaneously from the input pattern. The reason is that fuzzy systems are memoryless input-output mapping systems and pattern recognizers like a neural network.

Robustness: Robustness means the system’s relative insensitivity to both external and internal disturbances. The fact that a system can be updated regularly on line in real time assures that the system is rapidly adapted to the latest changes that occurred.

Comparison between rule based and parametric fuzzy approaches

Rule based fuzzy approach is more suitable for acquiring and implementing expert human operator knowledge, while the parametric fuzzy approach is best used when input/output numerical data are available.

Parametric fuzzy approach yields a better estimation accuracy because it is a hybrid of rule based fuzzy and numerical components. The rule based fuzzy approach requires no training, while the parametric fuzzy approach requires linear coefficient adjustment performed by statistical multi-linear procedures.

Parametric fuzzy algorithm is inherently adaptive, because the coefficients Aij can be altered for system tuning. Thus a real-time adaptive implementation of the parametric approach is feasible by dynamically changing the linear coefficients by means of a recursive least-square algorithm repeatedly on a recurrent basis

Adaptive versions of the rule-based approach , changing the rule weights (Degree of Support) or the membership functions recurrently is possible.

Disadvantage of the parametric fuzzy approach is the loss of the linguistic formulation of output consequents, sometimes important for industrial plant/process control environment