Observer-Based Sliding Mode Control for Path Tracking of a Spherical Robot

Phillip M. Drayer Electrical Engineering Department, Lamar University, Beaumont, TX, USA Electrical Engineering Department, Iran University of Science and Technology, Tehran, Iran School of Mathematics, Southeast University, Nanjing 210096, China Research Centre for Complex Systems and Network Sciences, Southeast University, Nanjing 210096, China Department of Power and Control Engineering, School of Electrical and Computer Engineering, Shiraz University, Shiraz 71348-51154, Iran


Introduction
Spherical robots are a class of rolling robots, which can be used in many applications: surveillance [1], environmental monitoring [2], exploration operations in unknown environments [3], rehabilitation [4], hobbies [5], and so on [6].Due to the ball-shaped shell, the enclosed components in a spherical robot are protected from collision and environmental states such as dust, humidity, and radiations.Spherical robots have highly manoeuvrable dynamics that enjoy the advantage of never tipping over [7] and the minimum skidding and resistance with the surface [8].Nonetheless, the underactuated nature of these robots calls for advanced control schemes to succeed with the path tracking problem [9,10].
Over the last few years, numerous studies have been conducted on modelling, point stabilization [11], and tracking control of the spherical systems.The motion of the sphere under rolling constraints is studied in [12].In [13], two computationally path-planning algorithms are presented for the rolling sphere.A first-order model for a spherical robot is derived in [14] from noninclined limitation and conservation of the angular momentum, as well as a path tracking method with minimum energy and time.In [15], a dynamic equation model is obtained for a spherical robot's motion with a mobile mass, which is placed inside the shell and it proposes its path planning on a surface with the presence of obstacles.Euler parameters are utilized in [16] to establish the kinematic equations for a spherical robot and represent the trajectory planning problems.The dynamics model and control of a spherical robot with a driving wheel on the bottom of the sphere are investigated in [8] where the platform is not plain.The dynamics model of a spherical robot with a rolling mechanism consisting of a 2-DOF is studied in [17], and the rotation matrices are derived to analyse the kinematics of the system.Then the Euler-Lagrange formalism is applied to develop the decoupled dynamic modelling for the motion of the robot in transverse and longitudinal axes.Also, fuzzy and feedback linearization controllers are employed for the trajectory tracking problem.In [18], utilizing the Lagrange method, the dynamics model and the motion control of a pendulum-based spherical robot on an inclined plane were investigated using a PID controller.
In the literature, a variety of control schemes is introduced for the tracking control of spherical robots.By considering the spherical robot's model, a backstepping feedback controller for the kinematic equations is developed in [3].In [6], a real-time fuzzy guidance approach for the trajectory tracking of a 2-DOF pendulum spherical robot is introduced, with a focusing on simultaneous convergence of attitude and position of the robot.The work in [19] proposes a neural network (NN) PID controller that has the advantages of simple forward and dynamic self-processing structure for an amphibious spherical robot.Modelling errors and uncertainties have motivated many researchers to utilize sliding mode control (SMC), as a kind of nonlinear robust controller [20,21], for the spherical robot path tracking problem.For example, in [22], a 1-DOF spherical robot is modelled where a SMC online learning method with fuzzy neural network controller is used for velocity control of the robot.In [23], a hierarchical sliding mode is introduced to control the spherical robot in the presence of unwanted disturbances and uncertainties in real time.
The aforementioned control approaches are designed with the assumption that all the states of the system are measurable.Nonetheless, it is sometimes technically costly or mechanically impossible to measure all the states of the physical systems.To address this issue, linear and nonlinear observers are introduced [24][25][26].There have been numerous efforts conducted on estimating unknown parameters and immeasurable states in spherical robots.For instance, in [27], disturbance in an omnidirectional spherical robot is estimated, and then it is delivered to an observerbased generalized proportional integral (GPI) for cancelation of the disturbance.In [28], an extended observerbased adaptive hierarchical sliding mode for longitudinal motion of the spherical robot is designed, in which the uncertain rolling resistance can be obtained without using traction sensors.
In this paper, the trajectory tracking problem of a popular spherical robot is studied for a robot that uses a 2-DOF pendulum for driving the motion by moving the sphere's mass centre, which creates gravitational torque [17].While all the robot's states need to be measurable for the controller design, the mechanical structure makes it a challenge to acquire the pendulum angles using sensors.Even if sensors are installed, the acquired values may not be precise due to the noise and measurement delays.Besides, uncertainties and nonlinear dynamics are intrinsic to spherical robots.To overcome these problems, in this paper, a sliding mode controller is introduced [29] that estimates the immeasurable states via a NN-based nonlinear observer [30].
NNs are widely utilized as adaptive observers to estimate the system nonlinearities and the immeasurable states of the nonlinear systems [31].Moreover, NNs are extensively used in path tracking by mobile robots [27].In [32], an adaptive NN with a robust controller is applied to overcome the challenge of environmental border trajectory tracking of underactuated mobile robots with uncertain dynamics as well as the presence of disturbances.In [33], the authors employ an adaptive path tracking control with an interneural computing approach for a mobile robot to follow a moving target.This controller is a mathematical scheme that employs neural pruning to the functions of rewards and punishment.
Due to the complicated nonlinear dynamics, in this paper, the spherical robot is modelled in a way that the dynamics are decoupled in two separated subsystems about transverse and longitudinal axes [17].It is assumed that the pendulum's angles around these axes are immeasurable.To measure the unknown states, a NN-based observer is designed that is adaptive against the robot's nonlinearities and unknown parameters.Then an extended SMC is developed that uses the estimated states in the presence of the model structural uncertainties.The SMC provides the torques for the spherical robot around transverse and longitudinal axes to track the desired trajectory.The proposed adaptive observer-based SMC not only rejects the uncertainties but can also estimate immeasurable states while the robot dynamics nonlinearities are assumed to be unknown.The Lyapunov theorem is utilized to guarantee that the overall closed-loop system is semiglobally uniformly ultimately bounded (SGUUB).The performance of the proposed scheme is verified with application to the spherical robot for tracking a desired trajectory on the horizontal plane.To the best knowledge of the authors, this is the first time that an adaptive observer-based SMC that estimates immeasurable states has been introduced to a nonlinear system in the presence of uncertainties and unknown nonlinearities.
The main contributions of this paper are as follows: (1) designing an observer to estimate immeasurable states, which are the angles of the pendulum about transverse and longitudinal angles, (2) designing a radial basis function (RBF) neural network to approximate the uncertainties and nonlinearities of the robot model, and (3) designing a modified SMC that guarantees the SGUUB of the overall closed-loop scheme in the presence of the state estimation errors, uncertainties, and unknown nonlinearities.
The rest of the paper is organized into six sections: the model of the robot is introduced in the second section; in the third section, kinematics and dynamics of the system are introduced; in section four, an observer for the robot is designed; and section five presents an NN and SMC.The simulation results and comparison with relative approaches in the literature are discussed in section six, followed by the conclusions in the last section.

Description of the Robot Model
In this paper, a 2-DOF pendulum-driven spherical robot is studied.The pendulum rolls the robot in two directions by shifting the sphere's centre of gravity to different points.

Complexity
The schematic of this robot is shown in Figure 1.In the sphere, there are two aligned diagonal holes through which a shaft is fixed to the sphere.A 2-DOF pendulum is hanged from the centre point of the shaft.As indicated in Figure 1, two motors are employed to provide torque, so the pendulum takes the required direction.Motor 1 rotates the pendulum about the sphere's shaft that is considered as the transverse shaft.Motor 2 rotates the shaft about the longitudinal axis about the horizon.Rotation of the pendulum about the transverse axis moves the gravity centre towards the longitudinal axis, which causes the sphere to roll about that axis.Rotating the pendulum about the longitudinal axis makes the sphere roll about the longitudinal axis.Therefore, by using two motors, the motion of the robot can be controlled over a flat surface.
For deriving the dynamics model of the robot, it is assumed that two degrees of freedom do not have interaction on each other [17]; therefore, the equations of motion consist of two decoupled subsystems.With this assumption, the motions of a sphere on a flat surface (rolling without slipping) formulation of the kinematic and dynamic equations are derived in [17].
There exist three frames in Figure 2-oxyz represents the reference frames that is fixed to the ground, o 1 x 1 y 1 z 1 is the moving reference on the spherical centre that can translate with respect to oxyz,, and o 2 x 2 y 2 z 2 is a moving reference to the spherical centre which rotates with the sphere with respect to o 1 x 1 y 1 z 1 .The relative rotation angle of o 2 x 2 y 2 z 2 around o 1 x 1 is θ, and the relative rotation angle of o 2 x 2 y 2 z 2 around o 1 y 1 is ϕ. Figure 3 depicts the sphere's turning motion about its transvers axis.In Figures 2 and 3

Kinematics and Dynamics of the Spherical Robots
In this section, the kinematics and dynamics of the presented spherical robot are expressed.Linear and turning motions of the robot are represented in Figures 2 and 3, respectively.

Kinematics Equations.
For deriving the kinematics model, we use two rotations around the transverse and longitudinal axes.i, j, k T , i 1 , j 1 , k 1 T , and i 2 , j 2 , k 2 T denote unit vectors which are attached to the oxyz C f ix , o 1 x 1 y 1 z 1 C 1 , and o 2 x 2 y 2 z 2 C 2 coordinates, respectively.The first rotation is written by the following transformation matrix.
Vertical axis

Complexity
The second transformation matrix for the second rotation is represented as follows: According to Figure 2, the angular and linear velocities of the sphere are written as follows: where ρ is the radius of the sphere.The position of the centre of mass of the pendulum can be written as follows: in (4) and ( 5), α and β denote the angle of the pendulum about transverse and longitudinal axes, respectively, and h is the length of the shaft which connects the pendulum to the center of the sphere.Using transformation matrices, the position of the pendulum in the o 1 x 1 y 1 z 1 coordinate is written as follows: where the position of the centre of mass of the pendulum in fixed coordinate C fix is equal to r x C 1 and r y C 1 .The angular velocities of the pendulum in o 2 x 2 y 2 z 2 and o 1 x 1 y 1 z 1 coordinates are written as where the angular velocities in the fixed coordinates are equal to ω As mentioned in Section 2, for deriving the dynamics equations of the robot, it is considered that the degrees of freedom do not have interaction on the dynamics of each other, so the dynamic equations consist of two decoupled subsystems, in which the following assumptions are made: (1) Rotations about transverse and longitudinal axes do not have any interaction with each other (2) Around the vertical axis, there is no rotational motion Using the Lagrangian equations, dynamic equations of the systems can be derived.The Lagrangian formula for a system of particles can be defined by where T is the total kinetic energy of the system and V is the potential energy of the dynamic system.Since the kinetic energy of the system is equal to the kinetic energies of the whole particles of the systems, the kinetic energy of the system is presented as where T s and T p , are equal to the kinetic energy of the sphere and pendulum, respectively.
In (11), the moments of inertia of the sphere and pendulum are where M s and M p are masses; the weight of the sphere and pendulum, ω s , ω p , V s and V p, represents angular velocities of sphere and pendulum and linear velocities of them, respectively.As the centre of mass of the sphere remains in constant height, the potential energy of the spherical robot depends on 4 Complexity the pendulum's mass and its vertical distance from the centre of the sphere.

V = M p gh 13
Let us decouple ( 8) into (11) and decouple the Lagrangian equation into two parts based on rotation in the transverse axis L x and vertical axis L y .
Euler's equations for systems can be presented as follows: where q i expresses θ and α q 1 = θ, q 2 = α and represents generalized coordinates.Besides, Q i is considered as input torque in the transverse axis Q 1,2 = τ x .Also, in the above equations, q j is equal to ϕ and β q 3 = ϕ, q 4 = β and they are generalized coordinates.Q j represents input torque in the longitudinal axis Q 3,4 = τ y .Let us plug ( 14) into (15) and rearrange the derived equations in a united state space and write the equation of motion in the matrix form [17].
M q t q t + Z q t , q t = τ, 16 where τ = τ x , τ x , τ y , τ y T , Z 21 = M p gh sin q 2 − q 1 , Z 31 = −M p gh sin q 4 − q 3 + M p ρh sin q 4 − q 3 q 2 4 + M p ρh sin q 4 − q 3 q 2 3 − 2M p ρh sin q 4 − q 3 q 3 q 4 , The objective of this paper is to design a path tracking control scheme for this robot, in the following sections: first, an observer will be designed to estimate the immeasurable states; then an adaptive neural network observer-based sliding mode controller will be proposed.

Observer Design
To the best knowledge of the authors, in the works that have been done on the spherical robots, it is assumed that α and β are available [17,18,23].However, since all the parts of the spherical robot, installed in the shell, rotate about some axis, measurement of α and β with sensors is costly or impractical due to mechanical inaccessibility.To overcome this problem, in this paper, an observer is designed to estimate the unavailable system states which are the degrees of freedom of the pendulum with respect to the transverse and longitudinal axes.
Considering the dynamics of system ( 16), two outputs of systems are to be controlled via the two inputs.In this study, X and Y are the outputs and the torques are control inputs of the system.Let us transform the dynamic system into the following form: In order to design an observer, ( 19) can be rewritten in the following state space form: 5 Complexity where x ∈ ℜ 8×1 are states of the system in which x 1 = θ, Moreover, (20) can be rewritten in the following form:

29
L s is chosen, so that L −1 s is a proper stable transfer function and H s L s is a proper SPR transfer function.Now, system (28) can be realized in state space as follows: where B C is chosen such that PB C = C. Moving on, h x needs to be approximated by utilizing a RBF neural network [35].RBF is a neural network that is used in the practical applications for its simple structure and its capabilities of nonlinear function approximation [35,36].Afterwards, h x is used to develop an adaptive controller with its adaptation law to meet the control objective and guarantee boundedness of all signals in the closed-loop system.h x is approximated (z ∈ Ω NN ⊂ ℜ n is the input 6 Complexity vector) by using RBF NN, as follows: where ψ = ψ 11 , ψ 12 , … , ψ 1l is the weight vector of the neural network system function vector with l nodes and with centre μ i = μ i1 , μ i2 , … , μ il T and width η, and δ x, x = h x − ĥ x | ψ is the neural network approximation error.
The neural network controller is designed.
Hence, ψ = ψ − ψ where ψ is an estimate of ψ.The adaptive law is Consider the following Lyapunov function for systems (30) and ( 33): By calculating the time derivative of Lyapunov function and using (27), we obtain In (35), h x = ψξ x + δ x, x = ψξ x − ψξ x + δ x, x can be approximated based on (31).Then by replacing neural network controller (32) in (35), we have By replacing (27) in (36), we have: Now, ψ T = ψ T and then by using ( 33) in ( 37), we have So, based on Assumption (1), the above equation can be written in the following equation: In the above equation, based on Young's inequality, we have and then we have where q 0 = λ min Q − 1 and λ min Q is the minimum characteristic value of Q.So, the observer is provided; in the next section, the SMC is given to control the spherical robot.

Sliding Mode Control
The aim of this paper is designing a robust controller, so the spherical robot tracks a desired trajectory, where the torques of the spherical robot about the transverse and longitudinal axes are the system inputs.To that end, the controller for the kinematics part of the robot will be designed.The kinematic models of the robot are written as follows.

42
where X and Y are the position of the spherical robot.By substituting θ and φ into (42) from (19), second derivatives of X, Y are calculated as follows: where the first row of D x ∈ ℜ 2×1 is derived from multiplying −ρ and the first row of −M −1 G and the second row of D x is derived from multiplying ρ and the third row of −M −1 G. And, in J x ∈ ℜ 2×2 , J 1,1 x and J 1,2 x are derived from multiplying −ρ and the first row of M −1 , and J 2,1 x and J 2,2 x are derived from multiplying ρ and the third row of M −1 .One should note that from (17), the matrix M ∈ ℜ 4×4 can be represented in a subblock-wise format as follows: where M A , M B ∈ ℜ 2×2 .Therefore, in (43), J 1,2 x and J 2,1 x are zero.Since all the states are not available for measurement, the observer state estimation from the previous section will be used, i.e., the estimated states x are used instead of the immeasurable states x .Taking the sliding surface, To reach trajectory tracking, S t should remain zero as long as the robot is moving.So, the following equivalent control law u eq is taken: where γ is a constant value.One should note that J is invertible due to the invertibility of M. As mentioned above, trajectories should reach a sliding manifold in a limited bound and remain being bound in the presence of uncertainty and unmodelled dynamics.Hence, the control law U is taken as where u s is taken for robust stability of the spherical robot in facing uncertainties and unmodelled dynamics.
where K 1 , K 2 are positive design parameters.Also, we take the Lyapunov stability theorem for this system as follows: By considering the sliding surface in (46), the control signal is

Complexity
The derivative of Lyapunov function with respect to time is By replacing U in (53), we have Now, the design of the observer-based SMC is complete and the steps of the design can be summarized as the following steps: first, designing a NN-based observer whose stability is studied in (34) and developing a SMC for tracking control of the spherical robot using the Lyapunov function in (51) with the stability analysis in (53).Now, we are ready to prove the overall stability of the proposed controller in the following theorem.
The next section is dedicated to the numerical evaluation of the proposed controller and comparing it with other controllers in the literature.

Simulation Results
6.1.Path Tracking.This section provides the simulation results through MATLAB, to verify the efficiency of the designed trajectory tracking controller observer-based SMC represented.The parameters of the spherical robot are M s = 3 (kg), M p = 2 (kg), ρ = 0 2 (m), l = 0 075 (m), and g = 9 81 (m/s 2 ).Simulation is carried out with initial conditions as follows: In the path tracking scheme, it is assumed that the centre of the spherical robot shell should move about the reference trajectory.The aim of the control is that the output tracks the reference path.The design parameters of the presented controller are chosen by trial and error as λ 1 = 50, The parameters of the proposed NN are selected by trial and error.In the simulations, for making the NN, 18 nodes are used.Moreover, to avoid the chattering caused by the SMC, the discontinuous sign function in the control law is substituted with the continuous tanh function [37].The equations of the system are sampled with a sampling period of 1.0 ms for the trajectories.The simulation results are obtained as demonstrated in Figures 4-7.
Figures 4-7 show that X and Y are able to track the desired path successfully where X and Y are illustrated against the time and in an X -Y plane, respectively.It can be observed that the tracking error is bounded and the 12 Complexity designed observer-based SMC can effectively reach the desired trajectory of the plant.In Figure 7, the input torques, τ x and τ y , about transverse and longitudinal axes for the desired trajectory are shown.Simulation results are presented in Figures 4-7.Figures 4  and 5 show that X and Y are able to track the desired path successfully.Moreover, in Figure 6, it is crystal clear that the system errors are converging to a small neighbour around the origin.In order to examine the robustness of the proposed controller, another simulation was carried out in the presence of measurement noise.A white noise with a power of 0.01 and sampling time of 0.1 s that passed through a filter  13 Complexity with the transfer function of 1/ 2s + 1 was applied to the position sensor output signals.
While disturbed by noise, Figure 8 shows that the robot is successfully able to track the desired trajectory with a bounded tracking error.Figure 9(a) shows the position of the robot with respect to time.Therefore, from the above results, it can be concluded that the spherical robot with the observer-based SMC-designed controller can robustly track a desired circular path in the presence of the measurement noise.The applied input torques in the presence of noise are illustrated in Figure 9(b).To prevent impractical large input torques, they are bounded by applying saturation functions with ranges of 10 N•m.

The Controller Design Comparison with SMC and
Feedback Linearization.In this subsection, the performance of the proposed approach is compared with the two other controllers in the literature.To this end, two of the most recent and well-known control methods, namely, the SMC [29] and feedback linearization [17], are selected.Figures 10 and  11 depict the performance of the above controllers against the desired trajectory in (61) with G 0 = −1 −1 T .As it is expected, under relatively similar conditions, the feedback linearization has the convergence time due to the assumption that the dynamics nonlinearities are known.However, while SMC and observer-based SMC are slower, they have more robustness to the uncertainties and oscillations.In addition, despite the SMC and feedback linearization that enjoys the measurability of all the states, the observer-based SMC must estimate the immeasurable states (α, β).This fact has made the proposed controller the slowest one in terms of convergence.Overall, in comparison with other methods, the proposed controller demonstrates the same accuracy with a slightly slower response in the tracking performance.

Conclusions.
In this work, we introduced an extended sliding mode control scheme for trajectory tracking control of a spherical robot that uses a pendulum with 2-DOFs to provide the rolling motion around the transverse and longitudinal axes.The angles of the pendulum with respect to these axes are assumed to be immeasurable due to mechanical technicalities.To estimate the immeasurable states, an adaptive neural network-based observer was proposed.The observer adaptively estimates the nonlinearities and rejects the uncertainties of the robot while estimating the sphere states using an output feedback.The SMC uses the estimated states instead of the actual ones to stabilize the robot's path tracking error.Finally, using the Lyapunov theorem, we showed that the proposed scheme is able to SGUUB stabilize the overall closed-loop system.Simulation results verify the proposed control scheme performance in comparison with other available approaches in the literature.
The following improvements are considered in future work: (1) manufacturing the spherical robot and practical implementation of the proposed observer-based SMC on the spherical robot and (2) modelling the spherical robot by taking into account the friction between the shell and the ground and without decoupling the two actuation mechanisms.
, θ, ϕ, and ψ are the rotational angles of the robot around the ox, oy, and oz axes.

p x C 1 and ω p y C 2
The linear velocities of the centre of mass of the pendulum in two subsystems are as follows:

Figure 4 :
Figure 4: Robot trajectory around X and Y directions.

Figure 5 :
Figure 5: Robot trajectory around the X -Y plane.

Figure 6 :
Figure 6: Trajectory error around X and Y directions.

Figure 10 :
Figure 10: Comparing the observer-based SMC performance with the SMC and feedback linearization controllers in the X -Y plane.

Figure 11 :
Figure 11: Comparing the observer-based SMC performance with the SMC and feedback linearization controllers: (a) trajectory tracking performance around X and Y directions and (b) trajectory tracking error convergence.