Comparison of performance criteria for of PAPCS using tuned and no tuned FLC.

## 1. Introduction

In the early days, the parameters of the fuzzy logic systems were fixed arbitrary, thus leading to a large number of possibilities for FLSs. In 1992, it has been shown that linguistic rules can be converted into Fuzzy Basis Functions (FBFs), and numerical rules and its associated FBFs must be extracted from numerical data training. Since that time, a multitude of design methods to construct a FLS are proposed. Some of these methods are intensive on data analysis, some are aimed at computational simplicity, some are recursive and others are offline, but all based on the the same idea: * tune the parameters of a FLS using the numerical training data*. Methods for designing FLSs can be classified into two major categories: A first category where shapes and parameters of the antecedent MFs are fixed ahead of time and training data are used for tuning the consequent parameters, and a second category that consists of fixing the shapes of the antecedent and consequent MFs using training data to tune the antecedent and the parameters of the consequent.

Two kinds of FLSs, the Mamdani and the Takagi-Sugeno-Kang (TSK) FLSs are widely used and they are currently adopted by the scientific community. They solely differ in the way the consequent structure is defined. The fact that a TSK FLS does not require a time-consuming defuzzification process makes it far more attractive for most of applications.

In this chapter, we consider the first category to design a TSK FLS basing on alinear method. Our design approach requires a set of input-output numerical data training pairs. Given linguistic rules of the FLS, we expand this FLS as a series of FBFs that are functions of the FLS inputs. We use the input training data to compute these FBFs. Therefore, the system becomes linear in the FLS consequent parameters, and we consider each set of FBFs as a basis vector which is easy to be optimized. Then follows the consequent parameters optimization via a minimizing process of the error vector - * the output training data minus the FBFs vectors weighted by the consequent parameters*- norm. This minimzation can be obtained by applying the

*(GOP). Optimization process is carefully analyzed in this chapter and its applications in two major areas of concern are demonstrated including robotics and dynamic systems. Firstly, we shall show the improved results with analysis upon the application of GOP in the Fuzzy Logic Controller (FLC) for an inverted pendulum. Secondly, we show how a FLS based on this principle enhances the performance of forecaster for the chaotic time series.*Generalized Orthogonality Principle

## 2. Fuzzy Logic Systems (FLS) basic concepts

### 2.1. Fuzzy sets

A * Fuzzy Set*(FS),

*(MF),*Membership Function

where the membership degree of

### 2.2. Mamdani FLS

An FLS is an intuitive and numerical system that maps crisp (deterministic) inputs to a crisp output. It is composed of four elements which are depicted in Figure 1. To completly describe this FLS, we need a mathematical formula that maps the crisp input

#### 2.2.1. Rules

The FLS is associated with a set of * IF-THEN*rules with meaningful linguistic interpretations. The

*(MISO), is expressed as:*Multiple Input Single Output

where

#### 2.2.2. Fuzzifier

A fuzzifier maps any crisp input

#### 2.2.3. Inference

A fuzzy inference engine combines rules from the fuzzy rule base and gives a mapping from input fuzzy sets in

Usually in Mamdani FLS, the implication is replaced by a * t-norm*, i.e. (product or

where

Each rule detemines a fuzzy set

Finally, the

#### 2.2.4. Defuzzifier

As we pointed out before, the main idea of a Mamdani FLS is to use crisp inputs to make fuzzy inference and finally find a crisp output which represents the behavior of the FLS. The process of finding a crisp output after fuzzification and inference is called * Deffuzification*. This final step consist on find an operation point given the results of the inference process of the FLS, which results on a fuzzy output set, so we need to use a mathematical method which returns a crisp measure of the behavior of the FLS.

There are many types of defuzzifiers, but we consider in this paper the * Height Defuzzifier*which replaces each rule output fuzzy set by a singleton at the point having maximum membership in that output set,

where

### 2.3. Takagi-Sugeno-Kang (TSK) FLS

A TSK FLS is a special FLS which is also characterized by IF-THEN rules, but its consequent is a polynomial. Its output is a crisp value obtained from computing the polynomial output, so it does not need a defuzzification process. The

where

The output of a TSK FLS is obtained by combining the outputs from the

where

where

### 2.4. Fuzzy basis functions

For Mamdani FLSs, assuming that all consequent MFs are normalized, i.e.,

The FLS in

where * Fuzzy Basis Function*(FBF) of the

where

This linear combination allows us to view an FLS as series expansions of FBFs [11], [12], [4] and [10] which has the capability of providing a mix of both numerical and linguistic information.

### 2.5. Weighted FBF

The crisp output of the TSK FLS in

It can also be expressed as:

where

This linear combination allows us to view the FLS as series expansions of WFBFs [2]. The WFBFs have also a capability of providing a combination of both numerical and linguistic information.

## 3. Orthogonality principle

We explain in this section how we can obtain, graphically, the optimal scalar that minimizes the norm of an error vector [9].Suppose that we have a set of

As shown in Figure 2, we can see that the optimal scalar

Solving for

## 4. FLS design based on GOP

GOP is an optimization principle which can be applied to both Mamdani and TSK FLSs. Under the premise of fixed shapes and the parameters of the antecedent MFs over the time, then a training dataset is used to tune the consequent parameters. The consequent parameters are

### 4.1. Mamdani FLS design

Given a collection of

where

Equation (14) can be decomposed as follows:

So we have

Now, if each FBF is considered as a basis function, we can compose the following vector:

where

and the parameters of the consequent in a vector

By considering the

where the fuzzy basis function matrix

To find the optimal vector

In a matrix form, we obtain:

Solving for

where

### 4.2. TSK FLS design

In the same way, the consequent parameters of a TSK FLS are tuned. The design approach is related to the following problem:

Given a collection of

where

The WFBF vectors are computed using the training input data, then the GOP is applied to the * dimensional*training output vector.

Using the elements of the input-output training pairs, the TSK output given in

where

By taking each set of

and each set of

Now we have to tune

If we define the

the output vector

In a matrix form,

So the * Weighted Basis Function Matrix*(WBFM)

The optimal parameters of the consequent conforms a vector,

This may be expressed directly in terms of the WBFM

Solving for

## 5. FLC design for controlling an inverted pendulum on a cart

### 5.1. Description of the system

Schematic drawing of an * Inverted pendulum On a Cart*(IPOC) system is depicted in Figure 5. where

The Lagrange equation for the position of the pendulum,

The Lagrange equation for the position of the cart,

where

Since the goal of the control system is to keep the pendulum upright the equations can be linearized around

### 5.2. FLC structure and design

We try to keep the pendulum upright regardless the cart’s position, i.e., * Pure Angular Position Control System*(PAPCS). Then, the two inputs of the Fuzzy Logic Controller FLC are the angular pendulum position,

*.*force

In this case, we use a Mamdani FLS with four rules. We use gaussian MF to fuzzify the two controller’s inputs

where

The MFs of the antecedents are depicted in Figures 7 and 8.

Figure 9 shows the 56 data training and the optimal fitting given by the GOP method.

The obtained optimal consequent parameters are

Figure 10 shows the response of the pendulum system controlled by the designed FLC to a reference

We evaluate the proposed design by using its error rate. For quantifying the errors, we use three different performance criteria to analyze the rise time, the oscillation behaviour and the behaviour at the end of transition period. These three criteria are: * Integral of Square Error*(

*(*Integral of the Absolute value of the Error

*(*Integral of the Time multiplied by Square Error

Table 1 summarizes the obtained values of * ISE*,

*and*IAE

*of PAPCS using FLC, when tuning and no tuning are used.*ITSE

No tuning | Tuning | |

ISE | 0.2338 | 0.2224 |

IAE | 4.7343 | 4.0403 |

ITSE | 6.7733 | 4.4278 |

We notice from this table that the errors obtained when tuning is used are all smaller than those obtained with untuned FLC. Fig.11, 12, 13 show the different quantified errors.

Figures 10, 11, 12 and 13 show that the system using tuning is less oscillatory, having a rise time and errors at the end of transition period smaller than those obtained by untuned FLC.

## 6. FLS design for predicting time series

We apply the GOP to design an FLS which predicts a time series. The FLS has to predict the future value

The training data are obtained by simulating

Figure 14 displays performance of the FLS in training data, and Figure 15 shows its results on Testing data. Note that the GOP-designed is a better forecaster, since the differences from original data are small in both training and testing data sets.

Some additional analyses should be performed to verify the goodness of fit of the method (See [5], and [6]), but in this case, the proposed GOP has shown good results, so we can recommend its application to real cases. Time series analysis is an useful topic for many decision makers, so the use of optimal and easy-to-be-implemented techniques, as the proposed one has a wide potential.

## 7. Concluding remarks

In this chapter we have presented an enhancement method of fuzzy controllers using the generalized orthogonality principle. We applied the method to two different cases: a first one involving control of an inverted pendulum and a second one for fuzzy forecasting. In the first application, numerical rules and their FBFs were extracted from numerical training data. This combination of both linguistic and numerical information simultaneously become FBFs an useful method. Since a specific FLS can be expressed as a linear combination of FBFs, we generalized orthogonality principle on FBFs that results in a better FLS.

In the second study case, we applied the GOP to design a FLS for time series forecasting. The FLS has been applied to a Mackey-Glass time series with better results compared to a non-GOP FLS. The results were validated with simulations.

All the FBFs can be seen as a basis vector, which allows to optimize the parameters of the consequents. This means that the error vectors are orthogonal to these FBFs, resulting in the minimization of the magnitudes of these error vectors, and consequently an optimal FLS.

The proposed method has a wide potential in complex forecasting problems ([5], and [6]). Its application to hardware design problems ([7]) can improve the performance of fuzzy controllers, so its implementation arises as a new field to be covered.

## References

- 1.
Berenji H. Khedkar P. 1992 Learning and tuning fuzzy logic controllers through reinforcements, IEEE Trans. Neural Networks3 1 724 740 - 2.
Boumella N. Djouani K. Boulemden M. 2011 On an Interval Type-2 TSK FLS A1-C1 consequent parameters tuning, in IEEE (ed.), Proc. SSCI 2011 T2FUZZ- 2011 IEEE Symposium on Advances in Type-2 Fuzzy Logic Systems, IEEE,1 6 - 3.
Boumella N. Djouani K. Boulemden M. 2012 A robust Interval Type-2 TSK fuzzy logic system design based on chebyshev fitting, International Journal of Control, Automation, and Systems 10(4). - 4.
Boumella N. Djouani K. Iqbal S. 2009 A new design of fuzzy logic controller based on generalized orthogonality principle, in IEEE (ed.), Proc. IEEE International Symposium on Computational Intelligence in Robotics and Automation, CIRA 2009, IEEE,497 502 - 5.
Figueroa J. C. 2009 An evolutive Interval Type-2 TSK fuzzy logic system for volatile time series identification, 2009 Conference on Systems, Man and Cybernetics, IEEE,1 6 - 6.
Figueroa J. C. Kalenatic D. Lopez C. A. 2010 A neuro-evolutive Interval Type-2 TSK fuzzy system for volatile weather forecasting, Lecture Notes in Computer Science6216 142 149 - 7.
Melgarejo M. Peña C. A. 2007 Implementing Interval Type-2 fuzzy processors I, Computational Intelligence Magazine 2(1): Pág.63 71 - 8.
Mendel J. 2001 Uncertain Rule-Based Fuzzy Logic Systems: Introduction and New Directions, Prentice Hall. - 9.
Strang G. 1988 Linear Algebra and its Applications, Third edition, Brooks/Cole. - 10.
Wang L. 1992 Fuzzy systems are universal approximators, in IEEE (ed.), Proc. IEEE Int’l. Conf. on Fuzzy Systems, San Diego, CA, IEEE,1163 1170 - 11.
Wang L. Mendel J. M. 1992 Fuzzy basis functions, universal approximation, and orthogonal least squares learning, IEEE Trans. Neural Networks3 5 807 814