Systematic Design of a Stable Type-2 Fuzzy Logic Controller Oscar Castillo Tijuana Institute of Technology Tijuana, Mexico ocastillo@tectijuana.mx Abstract: The concept of a type-2 fuzzy set was introduced by Prof. Zadeh, as an extension of the concept of an ordinary fuzzy set. A Fuzzy Logic System (FLS) described using at least one type-2 fuzzy set is called a type-2 FLS. Type-1 FLSs are unable to directly handle rule uncertain- ties, because they use type-1 fuzzy sets that are certain. On the other hand, type-2 FLSs, are very useful in circumstances where it is difficult to determine an exact membership function and the measurement of uncertainties is difficult or even impossible. Similar to a type-1 FLS, a type-2 FLS includes type-2 fuzzyfier, rule-base, inference engine and substitutes the defuzzifier by the output processor. The output processor includes a type-reducer and a type-2 defuzzyfier; it generates a type-1 fuzzy set output (from the type re- ducer) or a crisp number (from the defuzzyfier). A type-2 FLS is again characterized by IF-THEN rules, but its antecedent and/or consequent fuzzy sets are now of type-2. Type-2 FLSs, can be used when the circumstances are too uncertain to determine exact membership grades. For our description we are going to consider the well-known problem of designing a stabilizing controller for the inverted pendu- lum system. The state-variables are θ = 1 x - the pendulum’s angle, and θ = 2 x - its angular velocity. The system’s actual dynamical equation, which we will assume unknown, are shown in (1)-(3): u x x g x x f x x x ) , ( ) , ( 2 1 2 1 2 2 1 + = = (1) Where: + + = + + = m m x m l m m x x x g m m x m l m m x x mlx x x x f c c c c 1 2 1 1 2 1 1 2 2 1 2 1 cos 3 4 cos ) 2 , 1 ( cos 3 4 sin cos sin 8 . 9 ) , ( (2) (3) c m is the mass of the cart, m is the mass of the pole, l 2 is the pole length, and u is the applied force (control). In the simulations that follow we chose: kg m c 5 . 0 = , kg m 2 . 0 = and m l 3 . 0 = . To apply the fuzzy Lyapunov synthesis method, we assume that the exact equations are unknown ant that we have only the follow- ing partial knowledge about the plant: 1. The system has two degrees of freedom θ and θ , referred to as 1 x and 1 x , respectively. Hence, 2 1 x x = . 2. 2 x is proportional to u , that is, when u increases (decreases) 2 x increases (decreases). Our objective is to design the rule-base of a fuzzy controller ) , ( 2 1 x x u u = that will balance the inverted pendulum around its up- right position 0 2 1 = = x x . We choose: ) ( 2 1 ) , ( 2 2 2 1 2 1 x x x x V + = (4) as our Lyapunov function candidate. Clearly, V is positive-definite. Differentiating V , we have: 2 2 2 1 2 2 1 1 x x x x x x x x V + = + = (5) hence, we require: 0 2 2 2 1 < + x x x x (6) in some neighborhood of (0,0) T . We can now derive sufficient conditions so that (6) will hold: If 1 x and 2 x have opposite signs, then 0 2 1 < x x and (6) will hold if 0 2 = x ; if 1 x and 2 x are both positive, then (6) will hold if 1 2 x x < ; and if 1 x and 2 x are both negative, then (6) will hold if 1 2 x x > .We can translate these conditions into the following fuzzy rules: If 1 x is positive and 2 x is positive Then 2 x must be negative big If 1 x is negative and 2 x is negative Then 2 x must be positive big If 1 x is positive and 2 x is negative Then 2 x must be zero If 1 x is negative and 2 x is positive Then 2 x must be zero