## 3 Sliding Mode Speed Controller
### Design of Speed Controller  
Considering the influence of external disturbance, TSMC equipped with finite convergence time is selected to further improve the anti-disturbance ability and robustness.  
Figure 3: The distribution of conduction interval.  
Further, on the basis of the above-advanced reaching law, speed controllers can behave well in speed tracking, dynamic response, torque ripple suppression, and anti-interference capability. To achieve the goal, the speed error and sliding mode surface are described as follows:  
\[\begin{array}{l}e=\omega^{*}-\omega\\ s=e\end{array} \tag{8}\]  
where \(\omega^{*}\) and \(c\) are the reference angular speed and positive coefficient, respectively.  
Take the derivative of \(s\), we have  
\[\dot{s}=\dot{\omega}^{*}-\dot{\omega} \tag{9}\]  
Let \(T_{e}{}^{*}=T_{1}+T_{2}\), where \(T_{1}\) and \(T_{2}\) are the torque with and without the disturbance, respectively. Substitute (8) and (9) into (3), \(T_{1}\) can be described as follows:  
\[T_{1}=J\dot{\omega}^{*}+B\cdot\omega+T_{L} \tag{10}\]  
Considering the disturbance caused by the external environment, the following equation can be established by combining (3) and (8).  
\[\dot{e}=\dot{\omega}^{*}-\frac{1}{J}(T_{e}{}^{*}-T_{L}-B\cdot\omega)-D \tag{11}\]  
Select the sliding mode surface \(s_{1}\) as follows:  
\[s_{1}=e-\int_{0}^{t}\bigg{(}\dot{\omega}^{*}-\frac{1}{J}(T_{1}-T_{L}-B\cdot \omega)\bigg{)}\mathrm{d}t \tag{12}\]  
Differentiate (12) and combine it with (11)  
\[\dot{s}_{1}=-\frac{T_{2}}{J}-D \tag{13}\]  
Then, the terminal sliding mode surface \(z\) and its first derivative are written as follows:  
\[\begin{cases}z=\dot{s}_{1}+\mu s_{1}{}^{m/n}\\ \dot{z}=\dot{s}_{1}+\mu\frac{m}{n}s_{1}{}^{m/n-1}\dot{s}_{1}\end{cases} \tag{14}\]  
where \(\mu>0\), \(m\) and \(n\) are positive odd numbers, and \(0<m<n<2m\).  
When the system state reaches the sliding mode surface, \(z=0\), the following equation is established.  
\[\frac{\mathrm{d}s_{1}}{\mathrm{d}t}=-\mu s_{1}{}^{m/n} \tag{15}\]  
Integrating both sides of (15), we find  
\[t_{s}=\frac{n}{\mu(n-m)}|s_{1}(0)|^{1-m/n} \tag{16}\]  
where \(t_{s}\) represents the finite time from any initial state to the equilibrium point.  
Furthermore, substitute (6) into (14)  
\[\ddot{s}_{1}=-\frac{\lambda\mathrm{tanh}(z)}{\alpha+(1-\alpha+1/|x|)e^{-\beta |z|}}-\eta|x|z-\frac{\mu m}{n}s_{1}{}^{m/n-1}\dot{s}_{1} \tag{17}\]  
Combining (13) and (17), \(T_{2}\) can be expressed as follows:  
\[T_{2}=J\!\int_{0}^{t}\!\bigg{(}\frac{\lambda\mathrm{tanh}(z)}{\alpha+(1- \alpha+1/|x|)e^{-\beta|z|}}+\eta|x|z+\frac{\mu m}{n}s_{1}{}^{m/n-1}\dot{s}_{1} -\dot{D}\bigg{)}dt \tag{18}\]where the disturbance is slowly varying with time, and \(\dot{D}=0\). Consequently, \(T_{\bullet}\) can be described based on above expressions.  
Similarly, \(V_{1}=z^{2}/2\) is chosen according to stability theory, and then  
\[\dot{V}_{1}=z\dot{z}=z\bigg{(}-\frac{\lambda\text{tanh}(z)}{\alpha+(1-\alpha+1/ |x|)e^{-\beta|z|}}-\eta|x|z\bigg{)}\leq 0 \tag{19}\]  
As a result, the stability of the controller can be guaranteed. The schematic diagram of the sliding mode speed controller using advanced reaching law is shown in Figure 4.