Fuzzy Logic Control of a Ball on Sphere System

The scope of this paper is to present a fuzzy logic control of a class of multi-input multioutput (MIMO) nonlinear systems called “system of ball on a sphere,” such an inherently nonlinear, unstable, and underactuated system, considered truly to be two independent ball and wheel systems around its equilibrium point. In this work, Sugeno method is investigated as a fuzzy controller method, so it works in a good state with optimization and adaptive techniques, which makes it very attractive in control problems, particularly for such nonlinear dynamic systems.The system’s dynamic is described and the equations are illustrated.Theoutputs are shown in different figures so as to be compared. Finally, these simulation results show the exactness of the controller’s performance.


Introduction
Recently, several attempts have been made to analyze the dynamic and control of a system containing a ball on a body and its stability which is used in education and research in control field including ball and beam [1], ball on wheel [2,3], and ball on sphere [4,5].This paper investigates particularly a nonlinear system of ball on a sphere [2] whose dynamical equations are extremely nonlinear and their parameters are interdependent in various directions; they have been considered to be two independent ball and wheel systems around the equilibrium point [3].This system of ball on a sphere is visualized in Figure 1.In the current work, based on the results, a considerably simpler fuzzy control technique for a larger class of these nonlinear systems is proposed [6], such as unmanned vehicles [7,8] and robot manipulators.It has now been realized that fuzzy control systems theory and methods offer a simple, realistic, and successful alternative for the control of complex, imperfectly modeled, and largely uncertain engineering systems.For this purpose, a combination of fuzzy control technology and advanced computer facility available in the industry provides a promising approach that can mimic human thinking and linguistic control ability, so as to equip the control systems with certain degree of artificial intelligence.This paper contains the following subjects.First, dynamic and modeling section which presents the dynamic of the modeling and its parameters has been presented.Next, the control law has been investigated and, by means of inputto-state stability theory, a new fuzzy control scheme is designed involving the equations parameters.Following that, the simulation results have been discussed by the graphs and tables, and finally the conclusion is presented in the last part.

Dynamic and Modeling
In the present work, a ball on a sphere system with arbitrary desires is controlled by the fuzzy logic controller.For this purpose, a model for the ball on a sphere system has been opted and, then, its dynamical equations have been derived [3,9].Although these dynamical equations are extremely nonlinear and their parameters are interdependent in various directions, they have been considered to be two independent ball and wheel systems (Figure 2) around the equilibrium point, since, in that point, the parameters are assumed independent in all directions.In present work, the system of ball on sphere is considered to be two-dimensional in all directions, like a ball and wheel system.One of our assumptions to consider the ball rolls on the sphere without slipping and without axial spin is that the coefficient of  friction is large enough [10].The system parameters are   ,   which, respectively, denote the ball and the spheres angles with respect to the  direction,   ,   which denote the ball and the spheres angles with respect to the  direction,   and   which are moments of inertia of the sphere and ball, respectively, and  as the balls mass.There are also  and  which already denote the sphere and balls' radiuses, respectively.
Then, by using the Euler-Lagrangian method, the systems equation will be derived [11]: where  =  −  (Lagrangian function), : kinetic energy, : potential energy, : generalized forces, and : generalized coordinates.Consider where So For state space we have (5)

Fuzzy Control
Fuzzy logic controller can be implemented by some information about general behavior, regardless of system dynamic model.So, the performance of the controller and stabilization of the system are independent of the system uncertainties.
In order to present a fuzzy control method [7,12,13] for a (robotic) system, one may begin with a fuzzy logic control model.Fuzzy controllers are commonly divided into "Sugeno" and "Mamdani" categories.Mamdani method is considerably capable of extracting expert information.The other one, Sugeno method, is computationally efficient so it works in a good state with optimization and adaptive techniques, which makes it very attractive in control problems, particularly for dynamic nonlinear systems.These adaptive techniques can be used to customize the membership functions so that fuzzy system best models the data [14].In this paper, the Sugeno method has been investigated and this controller is independent of dynamics and modeling.Parameters and their bound limited are defined by try and error.
In this decoupled system two states,  direction and  direction, are controlled separately, so the controller parameters are defined as following.
(i) Two inputs (angular position error and angular velocity error).
Seven phases are defined in Table 1.
Rules.Each two input fuzzes contain seven membership functions, so 49 rules are obtained, resulting in seven output fuzzes as shown in Table 2.
The plate established by rules is sketched in Figure 3. Angular position error membership functions are illustrated in Figure 4.
Angular velocity error membership functions are illustrated in Figure 5.
The control law schema is shown graphically in Figure 6 and finally fuzzy controller law is shown in Figure 7.

Simulation Results
In order to have a regulation control for this system of "ball on a sphere, " the key parameters are the ball and the sphere's physical properties already described in the modeling section.The values of these parameters are listed in Table 3.
There are also desired values for the initial condition which are shown in Table 4.These simulation results are summarized in Figures 8, 9, 10, 11, 12, 13, 14, and 15.

Conclusion
The purpose of this paper was to control a system of "ball on a sphere" by the fuzzy logic controller, which is perfectly able to  control such a dynamically nonlinear system, which describes two independent ball and wheel systems, and was already set to lead the system to the desired position as was evidenced in the simulation results and figures.The Sugeno method was investigated in this paper; as mentioned before, this controller is not model based method.Parameters and their bound limited are defined by try and error.The great accuracy of the diagrams represents the used fuzzy logic controller which works perfectly in this situation.

Figure 1 :
Figure 1: A ball on a sphere system.

Figure 2 :
Figure 2: Schema of the ball and wheel system.

Table 1 :Fuzz
Fuzzy membership and output parameters.ZR PS PM PB PB ZR ZR PS PS PM PB PB PM NS ZR ZR PS PM PM PB PS NS NS ZR ZR PS PM PB ZR NB NM NS ZR PS PM PB NS NB NM NS ZR ZR PS PM NM NB NM NM NS ZR ZR PS NB NB NB NM NS NS ZR ZR

Figure 8 :
Figure 8: Beta in  direction.Beta in  direction is plotted versus time in 30 seconds as shown in the figure.

Figure 9 :Figure 10 :Figure 11 :Figure 12 :Figure 13 :Figure 14 :
Figure 9: Beta in  direction.Beta in  direction is plotted versus time in 30 seconds as shown in the figure.

Figure 15 :
Figure 15: Torque in  direction.This torque is applied to the sphere in the  direction to control the position of the ball by means of changing beta in  direction.