Modeling of an Inverted Pendulum based on Fuzzy Clustering Techniques International Journal of Computer Applications (0975 – 8887) Volume 9– No.4, November 2010 23 Modeling of an Inverted Pendulum based on Fuzzy Clustering Techniques E.Sivaraman Assistant Professor, Annamalai University Annamalainagar, Tamilnadu India - 608002 S.Arulselvi Associate Professor, Annamalai University Annamalainagar, Tamilnadu India - 608002 S.P.Natarajan Professor, Annamalai University Annamalainagar, Tamilnadu India - 608002 ABSTRACT The inverted pendulum is a highly nonlinear and open loop unstable system. To develop an accurate model of the inverted pendulum, different linear and nonlinear methods of identification will be used. However one of the problems encountered during modeling is the collection of experimental data from the inverted pendulum system. Since the output data from the unstable system does not show enough information or dynamics of the system. This can be overcome by designing a feedback controller , which stabilize the system before identification can takes place. Recently Takagi-Sugeno (T-S) fuzzy modeling based on clustering techniques have shown great progress in identification of nonlinear systems. Hence in this paper, Takagi-Sugeno (T-S) model is proposed for an inverted pendulum based on fuzzy c- means , Gustafson-Kessel (G-K) and Gath-Geva (G-G) clustering techniques. Simulation results show that Gustafson-Kessel (G-K) clustering technique produces satisfactory performance. General Terms Fuzzy logic, Modeling. Keywords Nonlinear, Clustering, Fuzzy, Inverted Pendulum, Takagi-Sugeno. 1. INTRODUCTION Fuzzy control system, identification and design have been a subject of intense research in recent years. The heart of a fuzzy control system consists of a set of fuzzy “if – then” rules, which models the process state-control action relationship in the control domain. The design of appropriate fuzzy rules and membership is a critical bottleneck in developing powerful fuzzy control systems. Membership functions and fuzzy rules can be defined by the model developer (expert), using prior knowledge, or by experimentation, which is a typical approach in knowledge based fuzzy control [1]. Knowledge acquisition however is, a cumbersome task, and for (partially) unknown systems, human experts are not available. Therefore, data-driven construction of fuzzy membership function and rules from measured input - output data has received a lot of attention. Such modeling approaches typically seek to optimize some numerical objective function, while less attention is paid to the complexity of the resulting model in terms of the number of membership functions and rules, Babuska [2]. Takagi- Sugeno [3] proposed a heuristic method for designing Takagi - Sugeno type of fuzzy rules from input-output data, using some performance index. Subsequently, Sugeno and Tanaka reported [4] a method for on-line identification of a fuzzy system. Recently, several proposals are made to use fuzzy clustering for fuzzy system identification. An effective approach is to partition the available data into subsets and approximate each subset by a simple piecewise linear model. Fuzzy clustering can be used as tool to partition the data where transitions between the subsets are gradual [5]. Sugeno and Yasukawa [6] uses the fuzzy c-means algorithm to cluster the output data points to determine the fuzzy rules, and use some heuristics to select the most relevant input variables in fuzzy system design. Bezdek [7] combines the ideas in [6] and [8] to develop a neural network fuzzy control system which also utilizes clustering. Typically, the specification of a real-world control problem is given by a finite set of input-output data points zk = [ xk, yk], and the design task is to extract optimum membership functions and good set of fuzzy rules that best represent the input-output relationship in the data. This paper address the design issue by demonstrating good performance of the fuzzy clustering-based methods, which identifies clusters from the input-output data and constructs membership function thereby generating a fuzzy rule for each cluster. In this paper, the inverted pendulum problem has been considered as a typical representative of inherently unstable nonlinear control systems, thus it is an ideal choice for testing the modeling capability of the fuzzy c-means, Gustafson-Kessel (G-K) and Gath–Geva(G-G) clustering algorithms. Simulation results are presented using fuzzy modeling and identification toolbox [2]. The performance of the models obtained by fuzzy c- means ,G-K and G-G methods are compared in terms of RMSE. 2. TAKAGI-SUGENO FUZZY MODEL Consider the identification of an unknown nonlinear system )( xfy = (1) based on some available input-output data T k,nk,1 k ]x,.....x[x = and ky . The index k=1,…,N denotes the individual data samples. While it may be difficult to find a model to describe the unknown system globally, it is often possible to construct local linear models around selected operating points. The modeling framework that is based on combining local models valid in predefined operating region is called operating regime-based modeling. In this frame work, the model is generally given by ∑ += = c 1i i T ii )bxa)(x(y φ ) (2) International Journal of Computer Applications (0975 – 8887) Volume 9– No.4, November 2010 24 where )(i xφ is the validity function for the i th operating regime and T i T ii ]ba[=θ is the parameter vector of the corresponding local linear model. The operating regimes can also be represented by fuzzy sets, in which case the TS fuzzy model is obtained [6] as ]w[,bxay)x(AxR ii T iii += ) thenisIf: i=1,….c. (3) here, the number of rules is denoted by c, )x(Ai is a multivariable membership function, ai and bi are parameters of the local linear model as shown in Fig.1, and ]1,0[∈iw is the weight of the rule. Fig. 1. Local linear model and the membership function diagram. The value of iw is usually chosen by the designer of the fuzzy system to represent the belief in the accuracy of the i th rule. When such knowledge is not available iw =1, iA is used. The degree of fulfillment of the rule can be calculated as the product of the individual membership degrees and the rule’s weight ∏== = n 1j jj,iiiii )x(Aw)x(Aw)x(β (4) The rules are aggregated by using the fuzzy-mean formula ∑ ∑ + = = = c 1i i c 1i i T ii )( )ba)(( y x xx β β ) (5) From (2) and (5), one can see that the fuzzy model is equivalent to the operating regime-based model when the validity function is chosen to be the normalized rule degree of fulfillment as ∑ = = c 1i i i i )( )( )( x x x β β φ (6) Prior to clustering, the regression structure of the model is selected, in order to properly represent the system dynamics. Problems where little prior knowledge is available are usually represented in an input-output form. After the structure is determined, clustering in the product space of the regressors and of the regressand can be applied to partition the data. Since each cluster serves as a local linear model of the system, the fuzzy c- means , Gustafson-Kessel (G-K) and Gath-Geva clustering algorithms are capable of detecting clusters which lie in linear subspaces. 3. FUZZY MODEL IDENTIFICATION BASED ON FUZZY C-MEANS, G-K AND G-G CLUSTERING ALGORITHMS Forward and inverse modeling techniques helps to design model based control techniques like direct inverse, Internal Model Control and Model Predictive Control for nonlinear processes. These control techniques give satisfactory response when conventional control techniques fail. Hence, this necessitates the development of different modeling techniques based on fuzzy clustering. 3.1 Fuzzy Partition From the available input–output data pairs, the regression matrix X and the output vector y are constructed as given by ].N1 T N1 T y,...y[y]x,...x[X == and (7) where N>>n is the number of samples used for identification. The antecedent fuzzy sets Ai in (3) are determined by means of fuzzy clustering in the product space of the systems input and outputs. Hence, the data set N)1n( RZ ×+ = to be clustered is represented as a (n+1) × N data matrix composed from X and y ]y,X[Z T = (8) where each column , k z N,...,2,1k = of Z contains an input- output data pair as given by T k T kk ]y,X[Z = Given Z and an estimated number of clusters ‘c’, fuzzy clustering partitions Z into ‘c’ fuzzy clusters. A fuzzy partition can be represented as an ‘N × c’ matrix U, whose elements )x(iφ ∈ [0, 1] represents the membership degree of k Z in clusters ‘i’. Hence, the i th column of U contains the values of the membership function in the fuzzy partition, which is taken to be a point wise representation of the antecedent fuzzy set Ai of the i th rule as given in (3). The sum of each column of U is constrained to one, but the distribution of membership among the ‘c’ fuzzy subsets is not considered. Also, there can be no empty clusters and no cluster International Journal of Computer Applications (0975 – 8887) Volume 9– No.4, November 2010 25 may contain all the objects. This means that the membership degrees in the partition matrix U are normalized, and for the given identification data, the membership values )x(iφ correspond to the normalized degree of fulfillment of the rule antecedents as given in (6). In this paper, membership functions extracted using fuzzy c-means , G-K clustering and Gath - Geva algorithms are discussed in detail. Each cluster forms one fuzzy rule. 3.2 Cluster Validation Cluster validity refers to the problem whether a given fuzzy partition fits to the data all. The clustering algorithm always tries to find the best fit for a fixed number of clusters and the parameterized cluster shapes. However this does not mean that even the best fit is meaningful at all. Either the number of clusters might be wrong or the cluster shapes might not correspond to the groups in the data, if the data can be grouped in a meaningful way at all. Clustering data for different values of c, and using validity measures to assess the goodness of the obtained partitions. Different types of validity measure to find optimum number of clusters are given below 3.2.1 Partition Coefficient (PC) It measures the amount of “overlapping” between cluster. It is defined by Bezdek as follows ∑ ∑= = = c 1 N 1j 2 ij i )( N 1 )c(PC µ where µij is the membership of data point j in cluster i. The disadvantage of PC is lack of direct connection to some property of the data themselves. The optimal number of cluster is at the maximum value. 3.2.2 Classification Entropy (C) It measures the fuzziness of the cluster partition only, which is similar to the partition coefficient. )log( N 1 )c(CE ij c 1i N 1j ij µµ∑ ∑−= = = 3.2.3 Partition Index(SC) It is the ratio of the sum of compactness and separation of the clusters. It is a sum of individual cluster validity measures normalized through division by the cardinality of each cluster ∑ − −∑ ∑= = = = c 1k 2 i 2m ij N 1jc 1i ivk vN ivjx)( )c(SC µ SC is useful when comparing different partitions having equal number of clusters. A lower value of SC indicates a better partition. 3.2.4 Separation Index(S) On the contrary of partition index (SC), the separation index uses a minimum-distance separation for partition validity 2 ik k,i min 2 ij 2 ij N 1j c 1i vvN vx)( )c(S − −∑∑ = == µ 3.2.5 Xie andBeni’s Index (XB) It aims to quantify the ratio of the total variation within clusters and the separation of clusters 2 ijj,imin 2 ij m ij N 1j c 1i vxN vx)( )c(XB − −∑∑ = == µ The optimal cluster should mimimize the value of the index. 3.2.6 Dunn’s Index (DI) This index is originally proposed to use at the identification of “compact and well separated clusters”. So the result of the clustering has to be recalculated as it is a hard partition algorithm. { { } }         ∈∈ ∈∈ ≠∈∈ = )y,x(dmaxmax )y,x(dmin min)c(DI cy,xck jcy,icx ji,cj minci The main drawback of Dunn’s index is computational since calculating becomes computationally very expensive as c and N increase. 3.2.7 Alternative Dunn’s Index (DI) The aim of modifying the original Dunn’s index was that the calculation becomes more simple, when the dissimilarity function between two clusters ))y,x(dcy,cx(min ji ∈∈ is rated in value from beneath by the triangle-non equality: )v,x(d)v,y(d)y,x(d jj −≥ Where j v is the cluster centre of the j-th cluster. { } }           ∈∈ ∈∈ ∈ − ≠∈ = )y,x(dmaxmax )v,x(d)v,y(dmin ji,cj minmin)c(ADI cy,xck jijjcjx,icix ci International Journal of Computer Applications (0975 – 8887) Volume 9– No.4, November 2010 26 Note that the only difference of SC, S and XB is the approach of the separation of clusters. In the case of overlapped clusters the values of DI and ADI are not really reliable because of re- partitioning the results with the hard partition method. The above performance indexes are used to get optimum number of clusters for the following algorithms. 3.3 Fuzzy C-means Clustering Algorithm Most analytical fuzzy clustering algorithms are based on optimization of the basic c-means objective function, or some modification of it. The advantage of fuzzy c-means algorithm is simplicity and easy implementation. Given the data set Z, choose the number of clusters by cluster validation as 1 1. The termination tolerance 0>ε and the norm-inducing matrix A. Initialize the partition matrix randomly such that fc M∈ (0) U . The following steps are repeated using MATLAB software for i =1,2,…l, until the termination tolerance is achieved, then the values of membership functions [9] are obtained as given in (11). Step (1): Compute the cluster prototypes (means) ci1, )( Z)( V N 1k m)1l( ik N 1k k m)1l( ik )l( i ≤≤ ∑ ∑ = = − = − µ µ (9) Step (2): Compute the Euclidian distances ,)VZ(A)VZ(D )l( ik T)l( ik 2 ikA −−= (10) Nk1,ci1 ≤≤≤≤ Step (3): Update the partition matrix If 0DikA > for ,Nk1,ci1 ≤≤≤≤ ∑ = = −c 1i )lm/(2 jkAikA )l( ik )D/D( 1 µ otherwise ]1,0[,0Dif0 )l( ikikA )l( ik ∈>= µµ and (11) 1 c 1i )l( ik =∑ = µwith until 1)(l(l) UU −− < ε 3.4 G-K Fuzzy Clustering Algorithm Gustafson and Kessel extended the standard fuzzy c-means algorithm by employing an adaptive distance norm, in order to detect clusters of different geometrical shapes in one data set [7]. Each cluster has its own norm-inducing matrix Ai. The matrices Ai are used as optimization variables in the c-means functional, thus allowing each cluster to adapt the distance norm to the local topological structure of the data. Given the data set Z, choose the number of clusters by cluster validation as 1 1 and the termination tolerance 0>ε . Initialize the partition matrix randomly such that fc M∈ (0) U . The following steps are repeated using MATLAB software for l=1,2,…. ,.The G-K algorithm is same as that of fuzzy c-means, only the computation of distance measure is calculated using co- variance matrices as follows: Co-variance matrix , N 1k )( N 1k )VZ)(VZ()( F m)1l( ik T)l( ik )l( ik m)1l( ik i ∑ = ∑ = −− = − − µ µ (12) where ci1 ≤≤ Euclidian distance [ ]*1in/1iiT)l(ikiikA2 F)F((*)VZ(D −−= detρ ,)VZ( )l( ik − Nk1,ci1 ≤≤≤≤ (13) 3.5 G-G Fuzzy Clustering Algorithm The fuzzy maximum likelihood estimates (FMLE) clustering algorithm employs a distance norm based on the fuzzy maximum likelihood estimates proposed by Bezdek and Dunn [9]. The Euclidian distance functions is chosen as                  −−∑− ∑ =∑ )l( i v k z 1 i T )l( i v k z 2 1 exp* i P ) i det( i ikD , Nk1,ci1 ≤≤≤≤ (14) The priori probability of selecting cluster i is given by .ci1, N 1 P N 1k )1l( ik i ∑ ≤≤= = −µ (15) Given the data set Z, choose the number of clusters by cluster validation as 1ε . The following steps are repeated using MATLAB software for l=1,2,…. ,.The Gath - Geva algorithm is same as that of G-K, only the computation of distance norm involves an exponential term and thus decreases faster than the inner-product norm. The fuzzy covariance matrix of the i th cluster is given by , N 1k w)1l( ik N 1k T)l( ik )l( ik w)1l( ik i )( )VZ)(VZ()( ∑ ∑ −− =∑ = − = − µ µ .ci1 ≤≤ (16) International Journal of Computer Applications (0975 – 8887) Volume 9– No.4, November 2010 27 The difference between the matrix Fi in GK algorithm and the i ∑ define above is that the latter does not involve the weighting exponent m, instead of this it consists of w = 1. 4. THE INVERTED PENDULUM PROBLEM Very often the quality of a control algorithm is tested and demonstrated on the inverted pendulum problem due to its inherent instability and dynamic characteristics. Figure 2 shows the free-bodied diagram of the inverted pendulum system. It is the problem of learning, how to balance an upright pole. Its solution consists of finding the horizontal force to be applied to the cart in order to balance the pole. The cart is moving on the track with no friction. Also, the pole is tied up to the cart by a frictionless hinge. Both the cart and the pole have only one degree of freedom, i.e. each of them can move in vertical plane only. Lagrange equations can be used to derive dynamical system equations for a complicated mechanical system such as the inverted pendulum. The Lagrange equations use the kinetic and potential energy in the system to determine the dynamical equations of the inverted pendulum system. Fig. 2 Inverted pendulum where, θ - Angle of the pole with respect to the vertical axis θ& - Angular velocity of the pole with respect to the vertical axis F - Force applied to the cart M - Mass of the cart m - Mass of the pole x - Position of the cart x& - Velocity of the cart The kinetic energy of the system is the sum of the kinetic energies of each mass. The kinetic energy Ec of the cart is 2 c xM 2 1 E &= (17) The pole can move in both the horizontal and vertical directions. So the pole kinetic energy is ) 2 2 2 2p zx(m 2 1 E && += (18) From the free bodied diagram x2 and z2 are equal to ) θ sinL(xx 2 += (19) ) θ cos(Lz 2 = (20) θ )θsin(Lz 2 && −= (21) θ)θcos(Lxx 2 &&& += (22) The total kinetic energy, E of the system is equal to pc EEE += (23) Substitute Eq. (17),(18), (21)and (22) in (23) θ )cosθ ( xmLθmL 2 1 xm 2 1 xM 2 1 E 2222 &&&&& +++= (24) The potential energy, V of the system is stored in the pendulum so 2 mgzV = (25) Substitute equation (20) in (25) )cosθ(mgLV = (26) The Lagrangian function is V-EP = )θ cos(mgL θmL 2 1 θx)θ (cosmLxm)(M 2 1 P 222 − +++= &&&& (27) The state-space variables of the system are x and θ , so the lagrange equations are F x P x P dt d = ∂ ∂ − ∂ ∂       & (28) 0 θ P θ P dt d = ∂ ∂ − ∂ ∂       & (29) Solving equation (28) and (29) the dynamic equations of the inverted pendulum is obtained given below 21 xx =& (30) ( ) 1 2 1 2 211 1 2 xmcosm)(ML )Fcosx (-)x)(cosx (sinx mL )(sinx m)g(M x −+ − + =         & (31) 43 xx =& (32) International Journal of Computer Applications (0975 – 8887) Volume 9– No.4, November 2010 28 ( ) ( )12 1 2 11 2 21 4 xmcosm)(M F xmcosm)(M ) (cosx )(sinx mg-)x (sinx mL x −+ + −+ =& (33) Let the state variables θx1 = ; Angle of the pole with respect to the vertical axis θx 2 &= ; Angular velocity of the pole with respect to the vertical axis xx3 = ; Position of the cart xx4 &= ; Velocity of the cart 5. SIMULATION RESULTS To simulate the above equations, the mass of the cart, M is set to 1.2 kg, mass of the pendulum is set to 0.1 kg, length of the pendulum is 0.4 meters, gravitational force, g is set to 9.81 m/s. The above state equations are simulated using SIMULINK software. It is observed that the angle of the inverted pendulum shown in Fig. 3 does not give us enough information on the inverted pendulum system. The pendulum falls over quickly and 0 500 1000 1500 2000 -150 -100 -50 0 Time (samples) A n g le ( ra d ) Fig. 3. Open loop response of the inverted pendulum it found to be unstable. One of the requirements in system identification is the collection of ‘information rich’ input-output data. In order to adequately model the inverted pendulum it is necessary to stabilize it using a nonlinear feedback controller. 5.1 Design of Nonlinear Feedback Controller Using a nonlinear feedback controller, the output data will contain more information for describing the process. The following equations are the control law developed for the inverted pendulum. θ gsin 4l 3 h1 = (34) cosθ 4l 3 h2 = (35)       −= gsin2θ 8 3 θlsinθmf 2 1 & (36)       −+= θcos 4 3 1mMf 2 2 (37) 1 2 d12d11 2 2 f xc )x(xcθk)θ(θkh h f u −      + −++−+ = & & (38) Equation (38) calculates the required force u, to keep the pendulum stable. For simulation, k1=25, k2=10, c1=1 and c2=2.6 [10]. Also xd = 0 meters and d θ = 0 rad, which are the desired position of the cart and angle of the pendulum, respectively. The inputs to this controller are the four output states of the non-liner pendulum model. The correct magnitude and force to keep the pendulum stable is calculated by the control law. The control law and closed loop model of the inverted pendulum developed by simulink. The closed loop response of the inverted pendulum with controller and force applied to the cart are shown in Fig.4 and Fig.5 respectively. 0 500 1000 1500 2000 -0.015 -0.01 -0.005 0 0.005 0.01 Time (Samples) A n g le ( ra d ) Fig. 4. Closed loop response of the inverted pendulum with Controller. 0 500 1000 1500 2000 -1.5 -1 -0.5 0 0.5 1 Time (samples) F o rc e ( N e w to n s ) Fig.5 Force applied to the cart International Journal of Computer Applications (0975 – 8887) Volume 9– No.4, November 2010 29 5.2 Generation of Input-Output Data with Nonlinear Controller Fig.6 shows that the control law is working properly. The data matrix Z was constructed from the identification data set as: T 200021 200021 ,...., u,....u,u Z       = θθθ 5.3 Simulation results for Cluster Validation Validity measures given in section 3.2 were used with Gustafson- Kessel algorithm to validate the partitioning of the Inverted pendulum data with the current number of clusters. During the optimization parameters were fixed to the following values: m=2, 1,001.0 ==∈ ρ for each cluster, ]142[c∈ . The values of the validity measures depending from the number of cluster are plotted and embraced in table.1. 2 4 6 8 10 12 14 0 2 4 x 10 -4 Number of clusters D I 2 4 6 8 10 12 14 0 5 x 10 -4 Number of clusters A D I Fig.6 Values of Dunn’s Index and Alternative Dunn Index. 2 4 6 8 10 12 14 0.4 0.6 0.8 Number of clusters P C 2 4 6 8 10 12 14 0 1 2 Number of clusters C E Fig. 7 Values of Partition coefficient and classification entropy. 2 4 6 8 10 12 14 0 0.5 1 Number of clusters S C 2 4 6 8 10 12 14 0 2 4 x 10 -4 Number of clusters S 2 4 6 8 10 12 14 0 50 100 Number of clusters X B Fig. 8 Values of Partition index, Separation Index and Xie and Beni’s Index. Fig.9. Results showing number of clusters for Gustafson-Kessel algorithm applied to Inverted Pendulum. From Fig.8 SC and S hardly decreases at c=4 point. The xb index reaches this local minimum at c=4. considering that SC and S are more useful, when comparing different clustering methods with the same c, we choose the optimal cluster to 4, which is confirmed by Dunn’s index and Alternative Dunn index in Fig.6. 5.4 Simulation results implementing Fuzzy C- means algorithm Initialization parameters of fuzzy c-means algorithm are given as: number of clusters c = 4, fuzziness of clustering m = 2, termination tolerance ε = 0.001. These parameters are fixed by trial and error. Using these initialization parameters, the fuzzy c- means algorithm given in Section 3.3 is simulated. The modeling of inverted pendulum using fuzzy c-means algorithm is shown in Fig. 10. It does not exactly matching with actual process output. International Journal of Computer Applications (0975 – 8887) Volume 9– No.4, November 2010 30 0 500 1000 1500 2000 -0.015 -0.01 -0.005 0 0.005 0.01 Time (Samples) A n g le ( ra d ) Fuzzy c-means Actual output Fig.10 Simulated angle of fuzzy C-means and actual process output. 5.5 Simulation results implementing G-K algorithm Initialization parameters of G-K algorithm are given as: number of clusters c=4, fuzziness of clustering m=2, termination tolerance ε = 0.001, expected cluster volumes ρ =1. These parameters are fixed by trial and error. Using these initialization parameters, the G-K algorithm given in Section 3.4 is simulated. The model of inverted pendulum using G-K algorithm is shown in Fig.11. It is evident from the response the model output is exactly matching with the process output. 5.6 Simulation results implementing G-G algorithm Initialization parameters of Gath - Geva algorithm are given as: number of clusters c=4, fuzziness of clustering m=2, termination tolerance ε =0.001. Using these initialization parameters, the Gath-Geva algorithm given in Section 3.5 is simulated. The modeling of inverted pendulum using Gath - Geva algorithm is shown in Fig. 12. It does not exactly matching with actual process output. 0 500 1000 1500 2000 -0.015 -0.01 -0.005 0 0.005 0.01 Time (Samples) A n g le r a d ) G-K algorithm Actual output Fig. 11. Simulated angle of G-K algorithm and actual process output. 0 500 1000 1500 2000 -0.015 -0.01 -0.005 0 0.005 0.01 Time (Samples) A n g le ( ra d ) G-G algorithm Actual output Fig.12 Simulated angle of Gath – Geva algorithm and actual process output. Table 1. The numerical values of validity measures. No. of Cluster 2 3 4 5 6 7 8 9 10 11 12 13 14 SC 0.802 0.279 0.150 0.118 0.1204 0.125 0.101 0.103 0.103 0.106 0.113 0.113 0.094 PC 0.726 0.609 0.562 0.534 0.5115 0.486 0.472 0.462 0.469 0.453 0.442 0.429 0.440 CE 0.425 0.681 0.824 0.922 1.0156 1.109 1.176 1.227 1.244 1.307 1.357 1.415 1.390 XB 50.71 19.00 7.229 7.843 7.201 10.201 10.181 9.565 5.512 6.790 5.824 4.509 6.905 International Journal of Computer Applications (0975 – 8887) Volume 9– No.4, November 2010 31 5.7 Comparison of performance of fuzzy c- means, G-K and G-G Algorithm The model outputs obtained using c-means, G-K and Gath – Geva algorithms are compared with actual output is shown in Fig.10, Fig 11 and Fig.12. From the result and performance table 2, it is observed that G-K algorithm gives better result by minimizing the Root Mean Square Error (RMSE). The performance index measured on the free-run test experiment is given by ∑ = −= N 1k 2 ))k(y)k(y( N 1 ) RMSE where, N represents the number of input-output data used for validating the model, y(k) is the actual output and )k(y ) is the model output. Table 2. Performance measure (RMSE) for a inverted pendulum. 6. CONCLUSION The design and implementation of fuzzy model based on fuzzy c- means, g-k algorithm and Gath – Geva algorithms for the inverted pendulum are discussed in this paper. The effectiveness of G-K algorithm is verified through simulation studies and the results obtained are compared with that of actual process output. By means of product-space fuzzy c-means, G-K and Gath – Geva clustering, a data set generated by a inverted pendulum system can be partitioned into fuzzy subsets of data that are locally described by linear sub models are demonstrated in this paper. Also different cluster validation methods are discussed and presented to choose optimum number of cluster. From the simulation results it is observed that the G-K clustering gives better performance for the inverted pendulum. Hence, it can be concluded that the proposed G-K algorithm can be applied to decompose any nonlinear system into local linear models and can be used to design model based control techniques such as Internal Model Control. 7. REFERENCES [1] Abonyi, R. Babuska and F. Szeifert, 2001, Fuzzy modeling with multivariate membership functions: gray-box identification and control design, IEEE Trans. On Systems, vol. 31, pp. 755-767. [2] R. Babuska, 1998, Fuzzy Modeling for Control, Boston, MA: Kluwer. [3] T. Takagi and M.Sugeno, 1985, Fuzzy identification of systems and its application to modeling and control, IEEE Trans. Syst., Man, Cybern., vol SMC-15, pp. 116-132. [4] M. Sugeno, K. Tanaka, 1991, Successive identification of a fuzzy model and its application to prediction of a complex system, Fuzzy sets and system, Vol. 42, pp. 335-344. [5] S. Arulselvi, G.Uma and M. Chidambaram, 2004, Design of Takagi-Sugeno fuzzy model based on Gustafson Kessel clustering technique for a dc-dc converter, 4 th International conference on TIMA, CSIR complex, Chennai, pp. 221-227. [6] M. Sugeno, T. Yasukawa, 1993, A fuzzy logic based approach to qualitative modeling, IEEE Trans.on fuzzy systems, Vol. 1, No. 1, pp. 7-31. [7] J. Bezdek, hybrid models for fuzzy control, 1994, Proc. Of the first Int. Symp. On Integrating Knowledge and Neural Heuristics, pp. 3-14. [8] H. Berenji, Y.Y. Chen, C.C. Lee, J.S. Jang, S. Murugesan,1990,A hierarchical approach to designing approximate-reasoning based controllers for dynamical physical systems, Proc. Of 6 th Conf. on Uncertainityin AI, pp. 362. [9] J.C. Bezdek and J.C. Dunn, 1975,Optimal fuzzy partitions:A heuristic for estimating the parameters in a mixture of normal distributions, IEEE Transactions on Computers, pp. 835- 838. [10] A.Guez, J. Selinsky, 1988, A trainable neuromorphic controller, Journal of robotic systems, Vol.5, No.4, pp 363- 388. Modeling Fuzzy c-means Gath- Geva G – K algorithm RMSE 0.0017 0.0011 0.00049598