S INGLE I NPUT V ARIABLE U NIVERSE F UZZY C ONTROLLER WITH C ONTRACTION -E XPANSION F ACTOR FOR I NVERTED P ENDULUM IN R EAL T IME

. In Conventional Fuzzy Logic Controller (CFLC), input variables are the error (E) and the change-in-error (EC) regardless of the complexity of controlled plant. The rule table constructed for CFLC is two dimensional in input space. This two dimensional rule table can be reduced to a single dimension by the signed distance method. This method also reduces the number of rules significantly. In this paper, a fuzzy controller is designed with the signed distance input variable. Then to improve the performance of this controller the technique of variable universe of discourse is used. After using these two techniques simultaneous to design a fuzzy controller, it is implemented to stabilize inverted pendulum in real time.


Introduction
The inverted pendulum is a multivariable, nonlinear fast reaction and unstable system [1].The dynamic description of the inverted pendulum is slightly complicated.As it is a challenging problem to stabilize an inverted pendulum, therefore it can also be used to analyze the performance of any control method.Fuzzy control, variable structure control and robust control are some of the methods which commonly used to solve this problem.The performance of Fuzzy Logic Controller (FLC) depends on the number of its inference rules.The performance of the FLC can be easily enhanced by increasing the number of rules.But the large set of rules also requires more computational time [2].This problem is solved by the introduction of a Single input Fuzzy Logic Controller (SFLC) [3].In conventional fuzzy controllers, the input variables are mostly the error and the change-in-error but in SFLC the input variable is the signed distance.This signed distance variable is sole fuzzy input variable in single input fuzzy logic controller.
Traditional fuzzy controller has many advantages, but its control accuracy is low [4].So this type of method is not appropriate in such applications where highly precise control is required.For high precision, a variable universe adaptive fuzzy controller was proposed by professor Li in 1999 [5].The controlling power of variable adaptive fuzzy control is verified for effective dealing with nonlinear system [6].So in this paper a controller is designed using the technique of submission.

Inverted Pendulum Structure
The structure of inverted pendulum is shown in Fig. 1.After ignoring the air resistance and other frictions, inverted pendulum can be simplified as a system of the cart and a quality rod, where M is the mass of cart, m is the mass of pendulum, l is the length of pendulum, θ is the angle between pendulum and vertical and F is the external force acting on the system.Force F is imposed by a DC motor and this force makes the cart move around the rail.The main objective is to erect the stable pendulums mounted on the cart, within the limited rail length and to achieve dynamic balance.

Mathematical Model of Inverted Pendulum
The mathematical model of the inverted pendulum system is established using Lagrange equation, taking the state variables [13]: The equilibrium state is taken around . 1 shows the parameters of the inverted pendulum used to derive state space model.

Single Input Fuzzy Logic Controller
The Conventional Fuzzy Logic Controller (CFLC) has two inputs, which are mostly the error and the change-inerror.It requires a 2-dimensional rule table for inference.The rule table for CFLC with two inputs (error & changein-error) is shown in Tab. 2. This rule table is in the skewsymmetric form.It can be observed from Tab. 2 that the output membership is same in a diagonal direction.Each point on the particular diagonal line has magnitude that is proportional to the distance from its main diagonal line (LZ).For any combination of   , e e  , the output membership function will lie in any one of the diagonal line (L NB , L NM , L NS , L Z , L PS , L PM , L PB ).The main diagonal line (L Z ) can be a representation as [7]: Where, λ is the slope magnitude of the main diagonal line L Z .The distance from any point   , e e  to the main diagonal line can be written as [7]: : If is ,..., and is then The so-called variable universe means that some universes such as X i and Y, can change along with changing variables x i and y [9].The transformed universe discourse is denoted as: Where factors [10].The varying universe is shown in Fig. 3 [11]: For   x  be the contraction-expansion factor, following conditions should be satisfied [6]:  Therefore change rule of   x  is: Where, k is a proportionality constant.
On moving x  to left and assuming , we will 0 des to obtain Integrating both si  Where K I is a proportionality constant,

Control Scheme For Inverted
error for inverted pendulum, i.e.

Pendulum
There are two types of error in cart position (E 1 ) and error in the angle of pendulum (E 2 ).The derivatives of both of these errors will give velocity of cart (EC 1 ) and angular velocity of pendulum (EC 2 ).These four variables make the inverted pendulum a four dimensional system.In order to simplify the complexity of the system both errors (E 1 & E 2 ) and change-in-errors (EC 1 & EC 2 ) should be synthesize into only two variables the error (E) and the change in error (EC).This can be done by the help of Information Fusion Method [12].After this, the signed distance variable (d) is obtained by the help of Signed Distance Method [7].This signed distance variable is fed to fuzzy controller as sole fuzzy input.Then variable universe technique is used to improve the accuracy and respond time of the system [5].

Implementation of Information Fusion
Error E and change-in-error EC can be defined as: Now a state feedback matrix fo has to be designed.For this, make the quadratic ) are synthesis r the state equation performance index function [12]; where the positive semi definite matrix Q = diag (1000, 0, 00, 0) and symmetric positive definite ma For solving the Riccati equation: ed: The optimal feedback gain matrix values can be obtain err nd error variation EC are:

 
The Signed Distance Variable The error E and the change-in-error EC are combined to r n-error it is taken as 1.The schematic diagram for SFLC is shown in iverse contraction-expansion factor of Ds from n choosing, = 0,27, k = 10 -2 ; . Assume β (t)  rse contraction-expansion factor of output U. Then β(t) from ( 12) is:

5.2.
obtain the signed distance d by using (3).The gain facto for error is taken as 1,1 whereas for change-i Fig. 2.

Variable Universe Fuzzy Controller
The un (10) is:

. Simulation Results
MATLAB SIMULINK is used in this paper for simulation of the controller to control inverted pendulum.on Googol 1-stage e.The initial fuzzy universe of D is taken [-1 1] and for the output U it is

6
The this controller is implemented linear inverted pendulum in real tim n S [-1 1].Mamdani's fuzzy inference method is used in the controller's fuzzifier and defuzzifier.The membership functions of input and output variables contain seven variables and shown in Fig. 4. The control rules designed for inverted pendulum are described in Tab. 4.     The curve for cart position and pendulum angle for real time is shown in Fig. 8 and Fig. 9.Here the main objective is to stabilize the angle.The disturbance in position is only about 0,0015 m. Figure 9 shows the pendulum angle which is stabilized around 3,1415 rad (180 degrees).The angle of pendulum varies between the ranges from 3,14 rad to 3,15 rad.

Conclusion
An inverted pendulum system in real time is taken as controlled object for stabilization.To simplify the controller design, two pairs of the error and the changein-error are combined into single pair of the error (E) and the change-in-error (EC) by the method of information fusion.Then, E and EC are merged to form the signed distance (d) variable with the help of signed distance method.A suitable single input fuzzy controller with variable universe of discourse is designed and the length of the universe of discourse is adjusted by universe contraction-expansion factor.
Simulation results are obtained for two different cases with different initial conditions.Then this controller is implemented on inverted pendulum in real time and curves for position and angle are obtained.From the real time results, it can be observed that performance of the controller is precise in nature and also poses high degree of accuracy to the conventional fuzzy controller.


In control of inverted pendulum, the stability of inverted endulum at the given position is highl ial position of the cart and the initial angle of inverted pendulum.So first, simulation results are discussed and ength of simulation step is taken 1 ms and observed that system reach equilibrium position within 2 seconds.du  p y sensitive to the init then real time results are discussed.Now following two cases are taken with different initial conditions for simulation:Case A: In this case the initial simulation conditions are set at: x = 0,1 m, θ 1 = 0,1 rad.The l simulation time is 5 seconds.Now the cart is required to move at x = 0. Simulation results for case A are shown in Fig.6.From the simulation results it can be
[8]ending on the distance d, the new rule table can be constructed and given in Tab. 3. Rule table is one dimensional and contains only seven rules and confirms linear control surface.Number of input for FLC will be one and structure of single input FLC is given in Fig.2[8].The calculated distance (d) is the only input to the fuzzy logic controller.
Fuzzy control rule table.