Open access

Enhancing Fuzzy Controllers Using Generalized Orthogonality Principle

Written By

Nora Boumella, Juan Carlos Figueroa and Sohail Iqbal

Submitted: 09 July 2012 Published: 27 September 2012

DOI: 10.5772/51608

From the Edited Volume

Fuzzy Controllers - Recent Advances in Theory and Applications

Edited by Sohail Iqbal, Nora Boumella and Juan Carlos Figueroa Garcia

Chapter metrics overview

2,698 Chapter Downloads

View Full Metrics

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 Generalized Orthogonality Principle (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.


2. Fuzzy Logic Systems (FLS) basic concepts

2.1. Fuzzy sets

A Fuzzy Set (FS), FXis a set of ordered pairs of a generic element xand its degree, namely Membership Function (MF),μF(x). Any FS can be represented as follows:


where the membership degree ofx, μFx, is constrained to be betwwen 0 and 1 for all xX.

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 xinto a crisp output y=f(x),we can obtain this formula by following the signal xthrough the fuzzifier to the inference block and into the defuzzifier. We explain, in this section, the working principle of this formula.

2.2.1. Rules

The FLS is associated with a set of IF-THEN rules with meaningful linguistic interpretations. The lth rule of a FLS having pinputs x1,...,xp and one outputyY, Multiple Input Single Output (MISO), is expressed as:

Rl:If  x1  is  F1l  and,...,and  xp  is  Fpl  THEN  y  is  GlE2

where Fil (i=1,2,...,p) are fuzzy antecedent sets wich are represented by their MFsμFil, and Gl is a consequent set where l=1,...,M(Mis the number of rules in the FLS).

Figure 1.

Block diagram of a fuzzy logic system

2.2.2. Fuzzifier

A fuzzifier maps any crisp input x=(x1,...,xp)TX1××XpXinto a fuzzy set Fx in X[8].

2.2.3. Inference

A fuzzy inference engine combines rules from the fuzzy rule base and gives a mapping from input fuzzy sets in   Xto output sets inY. Each rule is interpreted as a fuzzy implication, i.e., a fuzzy set inX×Y, and can be expressed as:

Rl:  F1l×...×FplGl=AlGl        l=1,...,ME3

Usually in Mamdani FLS, the implication is replaced by a t-norm, i.e. (product ormin). Multiple antecedents are connected by a t-norm, so a rule can be expressed by its MF as follows:


where Tand are t-normoperators (productormin). The p-dimensional input to Rl is given by the fuzzy set Ax whose MF is expressed as [8]


Each rule detemines a fuzzy set Bl in Ywhich is derived from the sup-composition. Then, the MF of this output set is expressed as [8]

μBly=supxXTi=1pμXi(xi)Ti=1pμFil(xi)μGl  (y)E7

Finally, the lth rule is expressed as follows

μBl(y)=μGlyTi=1pμFilxi        yYE8

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, y¯l, then it calculates the centroid of the resultantF set of these singletons. The crisp output of this defuzzifier is expressed as:


where y¯l is the point having maximum membership in the output set [8].

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 lth rule of a first order type-1 TSK FLS having pinputs x1X1,...,xpXp and one output yYis expressed as:

Rl:   IF  x1 is F1l and x2 is F2l  and ... and xpisFpl  THEN      yl(x)=c0l+c1lx1+...+cplxpE10

wherel=1,...,M, cjl(j=0,..,p)are the consequent parameters, yl(x)is the output of the lth rule, and Fkl (k=1,...,p) are type-1 antecedent fuzzy sets.

The output of a TSK FLS is obtained by combining the outputs from the Mrules in the following form:


where fl(x) l=1,...,M are the rule firing levels and they are defined as:


where Tis a t-normoperation, i.e. minimum or product operation (Mendel [8]), and xis the vector of inputs applied to the TSK FLS.

2.4. Fuzzy basis functions

For Mamdani FLSs, assuming that all consequent MFs are normalized, i.e., μGly¯l=1,and using singleton defuzzification, max-product composition and product implication, then the output of the height defuzzifier 9 becomes:


The FLS in 13 can be expressed as:


where ϕl(x) is called a Fuzzy Basis Function (FBF) of the lthrule [11], and it is defined as:

ϕl(x)=fll=1Mfl        l=1,...,ME15

where fl is given in12.

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 11 can be expressed as:


It can also be expressed as:


where ϕkl(x) is the kthWeighted Fuzzy Basis Function (WFBF) of the lthrule which is expressed as [2]:

ϕkl(x)=xkϕl(x),    l=1,...,M;k=0,...,pE18

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 Nmeasurements collected in a N-vector, y, gathered for different values collected in another N-vector,ϕ. The problem is to find :


Figure 2.

Basic Idea of Orthogonality Principle

As shown in Figure 2, we can see that the optimal scalar θthat minimizes the norm of the error vector, e=y-θϕ, is obtained wheneϕ. This can be expressed as follows :


Solving for θwe have:


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 ckl l=1,...,M;k=0,...,p in 11 for a TSK FLS, and y¯l l=1,...,M in 9 for a Mamdani FLS.

4.1. Mamdani FLS design

Given a collection of Ninput-output numerical data training pairs


where x(i) and y(i) are respectively the vector input and scalar output of the FLS given by13. We have to tune the y¯l l=1,...,M using these data training. Firstly, we compute the FBFs with training input vectors, then we apply the orthogonality principle on these FBFs and the training output vector.

Equation (14) can be decomposed as follows:


So we have

y(x(i))=f(x(i))=l=1My¯lϕl(x(i))          i=1,...,NE24

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

ϕj=ϕj(x(1))ϕj(x(2))ϕj(x(N)),    j=1,2,...,ME25

where Mis the number of rules. We now collect all the Ntraining output data in the same vector y:


and the parameters of the consequent in a vectorθ:


By considering the Nequations, a FLS can be expressed in vector-matrix format as follows:


where the fuzzy basis function matrix Φis given by:


To find the optimal vector θ and because of fitting with basis sets, we generalize the presented orthogonality principle to a multi-dimensional basis leading to a GOP. The error vector should be perpendicular to all of the basis fuzzy vectors, as shown in Figure 2.

Figure 3.

Basic Idea of Generalized Orthogonality Principle. The error vector should be perpendicular to all of the basis fuzzy vectors.

In a matrix form, we obtain:


Solving forθ, we have:


where θopt is a vector which contains the parameters of the consequent, i.e., y¯lin (3) .

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 Ninput-output numerical training data pairs:


where x(i) is the p+1-dimensionalinput vector (p+1inputs withx01) and y(i) is the scalar output of the FLS given by11. We have to tune the ckl l=1,...,M;k=0,...,p using these data training.

The WFBF vectors are computed using the training input data, then the GOP is applied to the p+1 combinations of WFBF vectors and the p+1 of N-dimensional training output vector.

Using the elements of the input-output training pairs, the TSK output given in17, can be rewritten as follows:


wherex(i)=1,x1(i),...,xp(i)T. Collecting the Nequations we obtain:


By taking each set of NWFBFs as a Weighted Fuzzy Basis Vector, WFBV:

ϕkl=ϕkl(x(1))ϕkl(x(2))ϕkl(x(N)),    l=1,...,Mk=0,...,pE35

and each set of Noutputs as a vector, the output vector can be expressed as follows:


Now we have to tune p+1parameters for each rule, i.e., Mvectors of dimensionp+1.

cl=c0lcpl,    l=1,...,ME37

If we define the lth element of ΦTSK asΦTSK,l, we have:


the output vector 33 becomes :


In a matrix form, (36)becomes :


So the Weighted Basis Function Matrix (WBFM) Φcan be defined as:


The optimal parameters of the consequent conforms a vector, clin 34 are obtained when the error vector, yTSK-ΦTSKc1cMT, must be perpendicular to all the weighted fuzzy basis vectors,ϕklk=0,,pandl=1,,M, which are the columns of the WBFMΦTSK, as shown in Figure 4.

Figure 4.

Extended Generalized Orthogonality Principle. The error vector y-ΦyC1yCMT should be perpendicular to all the fuzzy basis vectors, ϕkl

This may be expressed directly in terms of the WBFM Φas follows:


Solving for yC1yCMT provides the following


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 xis the position of the cart, θis the angle of the pendulum with respect to the vertical direction and F is the external acting force in the x-direction.In order to keep the pendulum upright, we design a Fuzzy Logic Controller (FLC) using the GOP.

Figure 5.

A schematic drawing of the inverted pendulum on a cart

The Lagrange equation for the position of the pendulum, θ, is given by:


The Lagrange equation for the position of the cart, x, is given by:


where Jis the moment of inertia of the bar. The masses of the cart and the rod are M1= 2Kg andm=0.1Kg, respectively. The rod has a length l=0.5m.

Since the goal of the control system is to keep the pendulum upright the equations can be linearized aroundθ=0. We chose x=θθ˙xx˙Tas the state vector, where θ˙ is the pendulum angle variation and x˙ is the cart position variation. The state representation is given by:


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, θ, and its derivative, θ˙, i.e., x1=x1x2=θθ˙Tand its output is the applied force to the system y=force.

Figure 6.

Fuzzy control system of the PAPCS

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


where mFil and σFil are respectively the centers and standard deviations of these MFs.

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

Figure 7.

Membership functions for the first controller input θ

Figure 8.

Membership functions for the second crontroller input θ

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

Figure 9.

Data training and its approximation based on GOP

The obtained optimal consequent parameters are


Figure 10 shows the response of the pendulum system controlled by the designed FLC to a reference θref=0 with its response at the same reference when it is controlled by untuned FLC. The initial state vector isx0=θ0θ˙0x0x˙0T=0.10.200T.

Figure 10.

System responses of PAPCS controlled by a tuned and untuned FLC

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 (ISE=0e(t)2dt), Integral of the Absolute value of the Error (IAE=0e(t)dt) and Integral of the Time multiplied by Square Error (ITSE=0te(t)2dt)

Table 1 summarizes the obtained values of ISE, IAE and ITSE of PAPCS using FLC, when tuning and no tuning are used.

No tuningTuning

Table 1.

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

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.

Figure 11.

Integral of square error values of the PAPCS of tuned and no tuned consequent parameters. Rise time of the system is shorter for the tuned FLC

Figure 12.

Integral of the absolute value of the error values of PAPCS of tuned and no tuned consequent parameters The system is less oscillatory for the tuned FLC before becoming stable

Figure 13.

Integral of the time multiplied by square error values of PAPCS of tuned and no tuned consequent parameters. The error at the end of transition period is less important for the tuned FLC

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 x(t+6)of a Mackey-Glass time series 45 which is volatile. The following four antecedents were used: x(t-18),x(t-12), x(t-6)andx(t), which are known values of the time series ([2], [3]).


The training data are obtained by simulating 45 forτ=17. We use the samples x(1001),,x(1524)to train the IT2 FLS and the samples x(1501),,x(2024)for testing. We use two Gaussian MFs per antecedent, so we have then 16 rules. The MFs of the antecedents are Gaussian, where its mean and the standard deviation were obtained from the 524 training samples,x(1001),,x(1524). Table 2 summarizes the consequent parameters per each rule.


Table 2.

The optimal TSK FLS consequent parameters obtained by GOP design.

Figure 14.

Mackey-Glass time series. The samples x(1001),,x(1524)are used for designing the FLS forecaster

Figure 15.

Output of the TSK FLS time-series forecaster. The samples x(1525),,x(2024)are used for testing the GOP design

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.


  1. 1. BerenjiH.KhedkarP.1992Learning and tuning fuzzy logic controllers through reinforcements, IEEE Trans. Neural Networks 31724740
  2. 2. BoumellaN.DjouaniK.BoulemdenM.2011On 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, 16
  3. 3. BoumellaN.DjouaniK.BoulemdenM.2012A robust Interval Type-2 TSK fuzzy logic system design based on chebyshev fitting, International Journal of Control, Automation, and Systems 10(4).
  4. 4. BoumellaN.DjouaniK.IqbalS.2009A 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, 497502
  5. 5. FigueroaJ. C.2009An evolutive Interval Type-2 TSK fuzzy logic system for volatile time series identification, 2009 Conference on Systems, Man and Cybernetics, IEEE, 16
  6. 6. FigueroaJ. C.KalenaticD.LopezC. A.2010A neuro-evolutive Interval Type-2 TSK fuzzy system for volatile weather forecasting, Lecture Notes in Computer Science 6216142149
  7. 7. MelgarejoM.PeñaC. A.2007Implementing Interval Type-2 fuzzy processors I, Computational Intelligence Magazine 2(1): Pág. 6371
  8. 8. MendelJ.2001Uncertain Rule-Based Fuzzy Logic Systems: Introduction and New Directions, Prentice Hall.
  9. 9. StrangG.1988Linear Algebra and its Applications, Third edition, Brooks/Cole.
  10. 10. WangL.1992Fuzzy systems are universal approximators, in IEEE (ed.), Proc. IEEE Int’l. Conf. on Fuzzy Systems, San Diego, CA, IEEE, 11631170
  11. 11. WangL.MendelJ. M.1992Fuzzy basis functions, universal approximation, and orthogonal least squares learning, IEEE Trans. Neural Networks 35807814

Written By

Nora Boumella, Juan Carlos Figueroa and Sohail Iqbal

Submitted: 09 July 2012 Published: 27 September 2012