# Smooth Fractional Order Sliding Mode Controller for Spherical Robots with Input Saturation
## 2 Motion Equation and Control System  
When a spherical robot is moving in linear motion mode, the dynamical model can be simplified to a two-dimensional ring-pendulum system. Figure 1 shows a diagram of the related simplified 2D model.  
Where \(r\) is radius of sphere, \(M\) is weight of shell, \(m\) is weight of inner suspension, \(l\) is the distance from weight center of mass to sphere center, \(\varphi\) is rolling angle of the spherical robot, \(\theta\) is swinging-up angle of the inner suspension relative to the shell of the spherical robot, g is the acceleration of gravity, \(\tau\) is torque of motor, and \(\tau_{f}\) is rolling friction between the shell and ground. By ignoring the damping of the actuator and the relative sliding between the spherical robot and the ground, the dynamic equation of the linear motion can be written as [44]:  
\[\begin{bmatrix}(5M+3m)r^{2}\ /\ 3&mrl\cos\theta\\ mrl\cos\theta&ml^{2}\end{bmatrix}\begin{bmatrix}\ddot{\varphi}\\ \ddot{\theta}\end{bmatrix}+\begin{bmatrix}0&-mrl\dot{\theta}\cos\theta\\ 0&0\end{bmatrix}\begin{bmatrix}\dot{\varphi}\\ \dot{\theta}\end{bmatrix}+\begin{bmatrix}\tau_{f}\\ mgl\sin\theta\end{bmatrix}=\begin{bmatrix}\tau\\ \tau\end{bmatrix} \tag{1}\]  
To make the controller method more convenient, the state variables are redefined as  
\[x=[x_{1}\quad x_{2}\quad x_{3}\quad x_{4}]^{\tau}=[\varphi\quad\dot{\varphi} \quad\theta\quad\dot{\theta}]^{\tau} \tag{2}\]  
Therefore, Equation (1) transforms into the following state-space equation:  
\[\left\{\begin{array}{l}\dot{x}_{1}=x_{2}\\ \dot{x}_{2}=f_{1}(x)+b_{1}(x)\text{sat}(\tau)+g_{1}(x)\tau_{f}\\ \dot{x}_{3}=x_{4}\\ \dot{x}_{4}=f_{2}(x)+b_{2}(x)\text{sat}(\tau)+g_{2}(x)\tau_{f}\end{array}\right. \tag{3}\]  
The details of the nonlinear functions in Equation (3) are as follows  
\[\left\{\begin{array}{l}f_{1}(x)=\frac{bx_{4}z^{2}\sin x_{3}+bl\sin x_{3}\cos x _{3}}{ac-b^{2}\cos^{2}x_{3}}\\ b_{1}(x)=\frac{c-b\cos x_{3}}{ac-b^{2}\cos^{2}x_{3}}\\ g_{1}(x)=\frac{c-b\cos^{2}x_{3}}{ac-b^{2}\cos^{2}x_{3}}\end{array}\right. \tag{4}\]  
Figure 1: Diagram of Spherical Robot in Linear Motion.  
\[\left\{\begin{array}{l}f_{2}(x)=\frac{-ad\sin x_{3}+bx_{4}^{2}\sin x_{3}\cos x_{3 }}{ac-b^{2}\cos^{2}x_{3}}\\ b_{2}(x)=\frac{a-b\cos x_{3}}{ac-b^{2}\cos^{2}x_{3}}\\ g_{2}(x)=\frac{b\cos x_{3}}{ac-b^{2}\cos^{2}x_{3}}\end{array}\right. \tag{5}\]  
The input sat(\(\tau\)) is defined as  
\[\text{sat}(\tau)=\left\{\begin{array}{l}\tau_{\text{max}},\quad\tau>\tau_{ \text{max}}\\ \tau,\quad\tau_{\text{min}}\geq\tau\geq\tau_{\text{max}}\\ \tau_{\text{min}},\quad\tau<\tau_{\text{min}}\end{array}\right. \tag{6}\]  
where \(a=(5M+3m)\)\(r^{2}\)/3, \(b=mrl\), \(l=ml\), and \(d=mgl\).  
The overall system can be regarded as the shell subsystem and pendulum subsystem. Because of the existence of input saturation, there is a difference value, \(\Delta\tau\), between the design input \(\tau\) and the actual control input sat(\(\tau\)):  
\[\Delta\tau=\text{sat}(\tau)-\tau \tag{7}\]  
The objective is to design a fractional order hierarchical sliding mode controller to control the state \(x_{2}\) to track the desired state. With the help of this controller, better control performance and increased robustness under input saturation are achieved.