# Experimental Evaluation of a Takagi-Sugeno Fuzzy Controller for an EV3 Ballbot System +
## 1 Introduction
Control schemes based on a partial feedback linearization approach and an energy-based method were reported in [25; 26; 27]. The performance of the control schemes proposed in [19; 22; 24; 27] was validated through numerical simulation, whereas experimental results were exhibited in [20; 23], and both simulation and experimental results were included in [18; 21; 25; 26]. The Takagi-Sugeno Fuzzy Models (TSFMs) are universal approximators for a wide class of smooth nonlinear (systems) functions. The Takagi-Sugeno (TS) fuzzy systems are able to exactly represent or to approximate to an arbitrary degree of accuracy any nonlinear system in a compact set of state variables. A TSFM is a convex combination of local linear models whose structure facilitates stability analysis under the Lyapunov approach and LMIs. A TSFM comprises an if-then rule base. The rule antecedents partition a subset of the model variables into fuzzy sets, while the consequent of each rule is a linear model. A general TSFM utilizes an affine model with a constant term in the consequent part for each rule, so it is often referred to as an affine TSFM. In contrast with an affine TSFM, a TSFM having a linear model at its consequent part offers a limited capability in representing a nonlinear system. The TSFM, together with a Parallel Distributed Compensation (PDC) controller, forms a powerful framework for fuzzy control systems. The structure of the PDCuses a fuzzy state feedback controller that mirrors the structure of the associated TSFM. Interesting applications and resources about TS fuzzy systems related to robust control, optimal control, observer design, and control of nonlinear time-delay systems, cascaded TS systemsm and distributed TS systems can be encountered in [28; 29]. In this work, motivated by the fact that just a few nonlinear controllers have been reported in the literature for this class of LEGO underactuated robot and neglecting its respective experimental validation, a TSFC is implemented on an EV3 Ballbot Robotic System (EV3 BRS) in order to evaluate its performance in real time for this kind of easy-to-build lightweight and low-cost prototype with the aim of achieving the control task proposed in [30]. In this latter work, the proposal was just validated through simulation results. It must be highlighted that the EV3 BRS comprises an EV3 brick, a more recent version of the NXT brick but with better capabilities. Here, the TSFM comprises two fuzzy rules where the absolute value for the angular displacement of the EV3 BRS's body is considered as premise variable and whose membership functions differ from those of the Gaussian type used in [14]. Also, the TSFM is composed of two local linear models in contrast with those four local linear models used in [2], the first one was designed from a farther angle with respect to the vertically unstable equilibrium position of the EV3 BRS's body, while the second one was designed from the zero-degree reference for the upright position. Moreover, the dynamics of the actuators were taken into account when linearizing the nonlinear model. Furthermore, a conservative stability condition, in contrast with the relaxed condition employed in [14], is used in the design of the gains for the TSFC. The contributions from this work are as follows: (1) the construction of a ballbot robotic system, namely the EV3 BRS, but using the EV3 brick instead of a NXT brick; (2) the design of a TSFM for the EV3 BRS; (3) the design of a TSFC for the EV3 BRS; (4) the global asymptotic stability of the overall fuzzy control system guaranteed by the use of a conservative stability condition; (5) the experimental evaluation of the proposal; and (6) the measurement and control data to and from the EV3 BRS are transferred via telecontrol and telemetry. The manuscript is organized as follows. Section 2 describes the nonlinear dynamic model and the state variable equations of the EV3 BRS, including the dynamics of the actuator. The TSFM of the EV3 BRS and the design procedure of the TSFC are included in Section 3.