Robust Takagi-Sugeno Fuzzy Dynamic Regulator for Trajectory Tracking of a Pendulum-Cart System

Starting from a nonlinear model for a pendulum-cart system, on which viscous friction is considered, a Takagi-Sugeno (T-S) fuzzy augmentedmodel (TSFAM) aswell as a TSFAMwith uncertainty (TSFAMwU) is proposed. Since the design of aT-S fuzzy controller is based on the T-S fuzzy model of the nonlinear system, then, to address the trajectory tracking problem of the pendulum-cart system, three T-S fuzzy controllers are proposed via parallel distributed compensation: (1) a T-S fuzzy servo controller (TSFSC) designed from the TSFAM; (2) a robust TSFSC (RTSFSC) designed from the TSFAMwU; and (3) a robust T-S fuzzy dynamic regulator (RTSFDR) designed from the RTSFSC with the addition of a T-S fuzzy observer, which estimates cart and pendulum velocities. Both TSFAM and TSFAMwU are comprised of two fuzzy rules and designed via local approximation in fuzzy partition spaces technique. Feedback gains for the three fuzzy controllers are obtained via linear matrix inequalities approach. A swing-up controller is developed to swing the pendulum up from its pendant position to its upright position. Real-time experiments validate the effectiveness of the proposed schemes, keeping the pendulum in its upright position while the cart follows a reference signal, standing out the RTSFDR.


Introduction
A great number of nonlinear systems can be represented by Takagi-Sugeno (T-S) fuzzy models.They are considered universal approximators [1].In [2][3][4], the T-S fuzzy control system stability has been verified considering a common Lyapunov function determined using linear matrix inequalities (LMIs) and optimization algorithms.New relaxed stability conditions and designs based on LMI for fuzzy control systems in continuous and discrete time have been presented in [5] and its utility is demonstrated with a fuzzy regulator and a fuzzy observer design.
The pendulum-cart system is a perfect test bed for demonstrating the theoretical and practical aspects of the control theory because of its inherently unstable open-loop with highly nonlinear dynamics.Two different dynamics of the pendulum and the cart are coupled together.There are several limitations in controlling the system, such as the limited length of the rail, and the restriction on the maximum control action.
There are many works about the swing-up and stabilization of the pendulum-cart system using several methods, for instance, [6][7][8][9][10][11][12].In [6] the energy control method is used to swing the pendulum up from its pendant position to around the upright position, and a linear servo state feedback controller design by coefficient diagram method is used to stabilize the pendulum.In [7], a hybrid fuzzy controller with fuzzy swing-up and parallel distributed pole assignment schemes is adopted to position the pendulum and the cart at the desired states.The T-S fuzzy model proposed is obtained via linearization with respect to different operating points; it consists of seven fuzzy rules and friction is considered.

Mathematical Problems in Engineering
The effectiveness of the proposed controller is validated via numerical simulations.In [8] a hybrid fuzzy controller is proposed to swing and stabilize the pendulum-cart system.The controller is designed to have a robust performance using the LMIs technique for T-S fuzzy systems.The T-S fuzzy model proposed consists of three fuzzy rules obtained through linearization via Taylor's series where friction has not been considered.The effectiveness of this method is validated via simulation and real-time experiment.In [9] a swing-up and tracking controller design for a pendulumcart system using hybrid fuzzy control has been proposed.A fuzzy tracking controller is designed based on a synthesis of the tracking control theory of linear multivariable control and the T-S fuzzy model.A stabilizing compensator based on observer is chosen.The Takagi-Sugeno fuzzy model is obtained via Taylor's series linearization and consists of three fuzzy rules where friction has not been considered and both controller and observer gains are obtained via poles placement method.In [10] the robust fuzzy control problem for uncertain continuous-time nonlinear systems is considered.The T-S fuzzy model with norm-bounded parameter uncertainties is adopted.Parallel distributed compensation (PDC) scheme is employed to design, independently, the robust fuzzy controller and the robust fuzzy observer from the T-S fuzzy models.The number of rules is only two.Simulation on an inverted pendulum system demonstrates the effectiveness and the applicability of the proposed approach.On the other hand, in [11] robust  ∞ controller design methodologies for T-S descriptors are considered.Two different approaches, based on LMIs, are proposed.The first one involves classical closed-loop dynamics formulation and the second one redundancy closed-loop dynamics approach.The provided conditions are obtained through a fuzzy Lyapunov function candidate and a non-PDC control law.Both the classical and redundancy approaches are compared.It is shown that the latter leads to less conservative stability conditions.To show the applicability of the proposed approaches, the benchmark stabilization of an inverted pendulum on a cart is considered.Finally, in [12] a T-S fuzzy dynamic regulator for a pendulumcart system is proposed using local approximation in fuzzy partition spaces to derive the T-S fuzzy model of the nonlinear system.Both a fuzzy controller and a fuzzy observer are designed via PDC scheme for which feedback gains are obtained via LMIs technique.Real-time experiments validate the effectiveness of this approach for the regulation case only.
In this paper, unlike [12], the focus is placed on the trajectory tracking problem, that is, stabilizing the pendulum in its upright position while the cart follows a reference signal.Starting from a nonlinear model for a pendulum-cart system, on which viscous friction is considered, a Takagi-Sugeno fuzzy augmented model (TSFAM) as well as a TSFAM with uncertainty (TSFAMwU) is proposed.Since the design of a T-S fuzzy controller is based on the T-S fuzzy model of the nonlinear system, then, to address the trajectory tracking problem of the pendulum-cart system, three T-S fuzzy controllers are proposed: (1) a T-S fuzzy servo controller (TSFSC) designed from the TSFAM; (2) a robust TSFSC (RTSFSC) designed from the TSFAMwU; and (3) a robust T-S fuzzy dynamic regulator (RTSFDR) designed from the RTSFSC with the addition of a T-S fuzzy observer, designed also via PDC using the separation principle, which estimates cart and pendulum velocities.Both TSFAM and TSFAMwU are comprised of only two fuzzy rules and designed via local approximation in fuzzy partition spaces technique.The three T-S fuzzy controllers are designed via PDC scheme for which the state feedback gains of the local linear controllers are obtained via LMIs technique for Takagi-Sugeno fuzzy systems.A nonfuzzy swing-up controller is developed to swing the pendulum up from its pendant position to its upright position, where any of the three T-S fuzzy controllers takes action.Real-time experiments validate the effectiveness of the three proposed schemes, keeping the pendulum in its upright position while the cart follows a reference signal.The performance of the three proposed controllers is evaluated using the norm of the stable state errors of the cart and pendulum, based on the norm L 2 , standing out between the three controllers the RTSFDR, which presents the smaller errors.
This paper is organized as follows.Section 2 describes the state-space model of the pendulum-cart system.In Section 3 the framework of the T-S fuzzy modeling is described and also shows how the servo compensator model is introduced into a Takagi-Sugeno fuzzy model.The design of the three proposed fuzzy controllers is developed in Section 4. Realtime experimentation results are shown in Section 5. Finally, in Section 6 the conclusions are given.

State-Space Model of the Pendulum-Cart System
The state-space representation of the pendulum-cart system is given as in [12] (see Figure 1): where

Takagi-Sugeno Fuzzy Modeling and Control
The Takagi-Sugeno fuzzy model [13] is described by a set of fuzzy IF-THEN rules, which represent input-output local linear approximations of a nonlinear system.The main feature of a Takagi-Sugeno fuzzy model is its ability to express the local dynamics of each rule through a linear subsystem.
The overall fuzzy model of the system is achieved by fuzzy blending of the linear system models.
The structure of a T-S fuzzy model for a continuous system is described as follows.

Model Rule i
where  1 (), . . .,   () are known premise variables that may depend on the states variables, external disturbances, and/or time,   are fuzzy sets,  is the number of model rules, () ∈ R  is the state vector, () ∈ R  is the input vector, () ∈ R  is the output vector, and   ∈ R × ,   ∈ R × , and   ∈ R × .In this work it is assumed that the premise variables are not functions of the input variables ().
Given a pair of ((), ()), the final output of the T-S fuzzy system (2) is inferred using a singleton fuzzifier, a product inference engine, and a center average defuzzifier as follows [14]: where The fuzzy controller is designed via PDC technique, where each control rule is designed from the corresponding rule of the Takagi-Sugeno fuzzy model.The PDC offers a procedure to design a fuzzy controller from a given Takagi-Sugeno fuzzy model.The designed fuzzy controller shares the same fuzzy sets with the fuzzy model in the premise parts [2].The following fuzzy controller via PDC is suggested.
for  = 1, 2, . . ., , where  is the number of rules and   is the local feedback gain.The overall nonlinear fuzzy controller is given by

T-S Fuzzy Modeling with Uncertainty.
To address the robustness of fuzzy control systems, a first and necessary step is to introduce a class of fuzzy systems with uncertainty.For this, uncertainty blocks are introduced into the Takagi-Sugeno fuzzy model to arrive at the following fuzzy model with uncertainty [1].

Fuzzy Model Rule i
for  = 1, 2, . . ., , where the uncertain blocks satisfy that with , and the matrices   ,   ,   , and   , for all , are constants associated with parameter uncertainties of the linearized model [15].Then, the overall Takagi-Sugeno fuzzy model with uncertainties is represented as The next theorem provides a solution to the robust stabilization problem, which consists in selecting a PDC fuzzy controller (6) to maximize the norm of the uncertainty blocks, or equivalently, to minimize   and   .

T-S Fuzzy Observer.
In practical applications it is common to find that the state vector is not measurable at all.Under such circumstances, the question arises whether it is possible to determine the state from the system response to some input over some period of time.For linear systems, a linear observer provides an affirmative response if the system is observable.In linear systems theory, one of the most important results about observer design is the so-called separation principle.
As in any observer design, fuzzy observers are required to satisfy that () − x() → 0 as  → ∞, where x() denotes the state vector estimated by a fuzzy observer [1].As in the case of the controller design, the fuzzy observer is also designed via the PDC scheme.The following fuzzy observer via PDC is proposed [1].
where   ∈  × are the observer gains and () and ŷ() are the final output of the fuzzy system and fuzzy observer, respectively.The fuzzy observer has the laws of the linear observer in its consequent parts.
The final estimated state of the fuzzy observer is given as and the final output given by The fuzzy observer design problem is to determine the local gains   in the consequent parts.By substituting ( 4) and ( 15) into ( 14), then Using the final estimated states x() and ( 6), the following T-S fuzzy dynamic regulator [12] is obtained.

Takagi-Sugeno Fuzzy Augmented Model.
Let us consider the servo compensator model [16] given as follows: where   () ∈ R   are the servo compensator states and () ∈ R  is the tracking error, given by () =   () − (), where () is the output of the plant and   () is the reference signal, and where    is the companion matrix of the characteristic polynomial of the reference signal, that is, () =   + −1  −1 + ⋅ ⋅ ⋅ +  1  +  0 , such that Moreover, combining ( 2) and ( 21) the following T-S fuzzy augmented model (TSFAM) is obtained [9].
Besides, the overall TSFAM can be described as For easiness of notation, (25) can be rewritten as where Then, for (24) the following T-S fuzzy servo controller (TSFSC) via PDC approach is suggested [9].

Mathematical Problems in Engineering
Thus, the overall TSFSC is represented by where    = [    ] is the augmented feedback gain matrix and ℎ  (()) is the same as the weight of the th rule of the fuzzy system (3)- (4).
Substituting (28) into (25), the closed-loop behavior of the fuzzy control system is given by where The stability theorem for (29) has been derived by means of the Lyapunov direct method in [9].

Design of the Proposed T-S Fuzzy Controllers
In this section, based on the servo compensator approach, the design of the three proposed T-S fuzzy controllers is derived in order to meet the trajectory tracking objective for the pendulum-cart system.In [9], a fuzzy tracking controller uses the observer-based stabilizing compensator structure of the robust servo mechanism problem since there are two states of the pendulum-cart system immeasurable.In [17] it has been shown how to design a fuzzy output tracking controller based on the theory of multivariable control and Takagi-Sugeno fuzzy model.The goal of the tracking fuzzy controller is that the cart position  1 () asymptotically tracks the reference signal   () = 0.1 sin(0.2).The Laplace transformation for the sinusoidal signal is   () = 0.0628/( 2 + 0.3948) with characteristic polynomial () =  2 +0.3948.Thus, the servo compensator model (21) for () has the following parameters:

Design of the TSFAM for the Pendulum-Cart System.
In order to meet with the design of the TSFSC for the pendulum-cart system, a TSFAM from (1) must be constructed.Considering the pendulum deviation from the upright position, that is,  2 (), as premise variable and using the local approximation in fuzzy partition spaces technique [1], the following two-rule TSFAM for the nonlinear system is proposed.
Augmented Model Rule 1 Augmented Model Rule 2 where with for the fuzzy rules 1 and 2, respectively.

Design of the TSFSC.
Assessing the matrices for each linear local subsystem of the TSFAM (32)-(33) and considering the nonlinear system parameters given by Table 1, as well as verifying beforehand that the pair (  ,   ) is controllable, it is possible to proceed with the design of the Takagi-Sugeno fuzzy servo controller (TSFSC).The TSFSC design problem is to determine the feedback gains    that satisfy the stability conditions of the following theorem.
Theorem 2 (see [9]).The equilibrium of the continuous fuzzy control system described by ( 27), (32), and ( 33) is globally asymptotically stable if there exists a common positive definite matrix  C such that The conditions (35) are not jointly convex in    and  C .Multiplying the inequality on the left-and right-hand sides by  −1 C and defining  =  −1 C and   =     such that    =    −1 for  > 0 exists, the next LMI conditions define the design problem of the stable fuzzy controller [1]: The feedback gains    and a common  C can be obtained as from the solutions  and   .Then, solving the design problem of the stable fuzzy controller using the LMI control toolbox of MATLAB, we have determined the existence of a common positive definite matrix  C obtained as follows: (39) 4.3.Design of the TSFAMwU for the Nonlinear System.Taking into account the same considerations from the TSFAM design proposed previously, the following TSFAM with uncertainty (TSFAMwU) for the pendulum-cart system is suggested.

Design of the RTSFSC.
Evaluating the matrices for the TSFAMwU (40)-(41) and, as before, verifying previously that the corresponding pair (   ,    ) is controllable, one can proceed with the design of the robust T-S fuzzy servo controller (RTSFSC).
Then, according to Theorem 2 and solving the stable fuzzy controller design problem (36)-(37), a common positive definite matrix  R can be obtained as follows: where  (45)

Design of the T-S Fuzzy
Observer.The real system has two states that are not measurable at all: the cart and pendulum velocities, namely,  3 () and  4 (), respectively.Consequently, it is necessary to design a fuzzy observer to estimate them.Using the separation principle from the linear systems theory, the fuzzy observer design problem can be solved satisfying stability conditions of the next theorem.
These inequalities can also be solved numerically through a LMI's framework.Considering the same premise variable of the TSFAM (32)-(33), namely,  2 (), the fuzzy rules are then established as follows.

Real-Time Results
The experimental inverted pendulum on a cart system used to evaluate the proposed schemes consists of a cart with horizontal movement mounted on a rail with physical limits.The cart has mounted a pendulum, which rotates freely (see Figure 3 and Table 1).The rail is too short (1.43 [m]) to let the tested fuzzy controllers drive the pendulum to its upright  position by themselves (this only happens on simulation conditions); for this reason, a nonfuzzy swing-up controller is used.A positive force  su(+) () = 23.5 N and a negative force  su(−) () = −21 N are used to swing the pendulum up, with short movements, from its pendant position to its upright position.The switching condition between the swing-up and any of the three T-S fuzzy controllers is set for a pendulum deviation of ±/8 with respect to the upright position.Due to the fact that the pendulum-cart system shows a large Coulomb friction in the rail, and the original nonlinear model does not consider this issue, a friction compensation was added in real-time experiments as mentioned in [12].The performance of the TSFSC, RTSFSC, and RTSFDR schemes applied on the pendulum-cart system is verified and exhibited in Figures 4-6.In Figure 4(a) the responses of the position of the pendulum caused by the TSFSC (blue line), the RTSFSC (red line), and the RTSFDR (black line) can be appreciated.In Figure 4(b) the reference signal   () (dashed  To have a better control performance appreciation, we proceed to calculate the average of the root mean square where  is the total time of the experiment (60 sec),  0 is the initial time of interest (15 sec in this case), and is the average control action (control effort).Table 2 presents the norms for each controller.It is clear that the RTSFDR has the smaller values for the three norms, showing hence not only the better performance, but also the less control effort.

Conclusions
In this paper, in order to meet the requirement of trajectory tracking, using the local approximation in fuzzy partition spaces technique, a TSFAM and a TSFAMwU for the pendulum-cart system have been proposed.Each T-S fuzzy model is comprised of two rules on which viscous friction has been considered and, for the robust case, uncertainties have been added.Then, from the proposed TSFAM or TSFAMwU, a TSFSC, a RTSFSC, and a RTSFDR are designed via PDC scheme, which are the contribution of this paper.To make the pendulum reach its upright position, a nonfuzzy swing-up controller was developed.The switching condition between the swing-up and any of the three T-S fuzzy controllers is set for a pendulum deviation of ±/8 with respect to the upright position.It has been demonstrated that in spite of the fact that our three T-S fuzzy controllers are comprised of only two rules, and in presence of viscous friction, a good realtime performance on the pendulum-cart system has been achieved, standing out the RTSFDR due to smaller errors and less control effort.

Figure 2 :
Figure 2: Control scheme proposed for the inverted pendulum-cart system.

Figure 6 :
Figure 6: Control force applied to the cart.