## 3 Design and Simulation of a Velocity Loop Controller Based on Discrete SMC
### A Novel Chatter-Free Approach Law Sliding Mode Control Based on Disturbance Compensator  
The SMC algorithm is widely applied in control systems because of its simple structure and good dynamic performance. After stabilization of the system states in the QSMD, the SMC is consistent with the nonlinear disturbance, and the smaller the width of the QSMD, the stronger the robustness of the system to the nonlinear factors. However, chattering is the main problem of SMC, which can lead to high frequency noise in the system, with adverse effects on the stability and control accuracy of the system. In this section, a novel chatter-free SMC algorithm is proposed to reduce the effects of chattering on the system and to suppress nonlinear disturbances in the low and medium frequency bands of the system. The novel chatter-free sliding mode approach law based on exponential approach law is shown as follows:  
\[\left\{ \begin{array}{l}s(k+1)=(1-\lambda T)s(k)-\kappa T\cdot\eta(k)\cdot \mathrm{sgn}[s(k)]+\omega(k)\\ \eta(k)=\frac{\big{|}c_{1}(k)\big{|}^{n}}{\delta+\left(1+|\xi_{1}(k)|^{n^{-1} }-\delta\right)\xi^{-\mu}\left(k\right)\xi^{\
u}}\end{array} \right., \tag{15}\]  
in this formula, \(\kappa>0\) is the coefficient of variable structure function; \(T\) is the sampling time of the system; \(\eta(k)\) is the error-related adaptive function, where \(0<\delta<1\), \(\gamma>1\), \(\mu>0\); \(|\epsilon_{1}(k)|\) represents the first state error of the state error vector, if \(|\epsilon_{1}(k)|>1\), \(0<\alpha<\)1,if \(0<|\epsilon_{1}(k)|\leq 1\), \(\alpha>1\); \(\omega(k)\) represents the disturbance compensator, which can be expressed as:  
\[\omega(k)=C_{e}(\varepsilon(k)-2\varepsilon(k-1)+\varepsilon(k-2)). \tag{16}\]  
**Remark 2**. : _If the system state is far away from the sliding mode surface, according to formula (12), s(k) and \(|\varepsilon_{1}(k)|\) tend to be great, so the coefficient of the switching function sgn[s(k)] tends to be \(\kappa T\cdot|\varepsilon_{1}|^{\alpha}/\delta\), which is greater than \(\kappa T\). The approaching movement is the state of the system that gradually approaches the sliding mode surface driven by the reaching law. If the system state is near the sliding surface, s(k) \(\approx\) 0, and the coefficient of the switching function sgn[s(k)] tends to \(\kappa T\cdot|\varepsilon_{1}|^{\alpha}/(1+|\varepsilon_{1}|^{\alpha})\), which is far smaller than \(\kappa T\), so the system state is stable in the QSMD for sliding mode motion. Thus, chattering on the sliding surface is reduced._  
**Lemma 2**. : _According to [22; 42], \(\varepsilon(k)=\mathcal{O}(T)\), \(\varepsilon(k)-\varepsilon(k-1)=\mathcal{O}(T^{2})\), (\(T\) is the sampling period), where \(\mathcal{O}(T)\), and \(\mathcal{O}(T^{2})\) represent the disturbance estimation error and are the first-order \(\mathcal{O}(T)\) and the second-order \(\mathcal{O}(T)\), respectively; \(\mathcal{O}(T)>\mathcal{O}(T^{2})\). Therefore, the magnitude of the disturbance estimation error shown in Equation (16) is the third-order \(\mathcal{O}(T)\), \(\varepsilon(k)-2\varepsilon(k-1)+\varepsilon(k-2)=\mathcal{O}(T^{3})\), \(\mathcal{O}(T^{3})<\mathcal{O}(T^{2})\)._  
According to Equation (11), (12), (15), and (16), the sliding mode controller can be deduced as follows:  
\[ \begin{array}{c}u(k)=\left(C_{e}B_{k}\right)^{-1}\left[C_{e}(R_{n}(k+1)-A_{ k}x(k))+(1-\lambda T)s(k)\right.\\ \left.-\kappa T\cdot\eta(k)\mathrm{sgn}[s(k)]-C_{e}(2\varepsilon(k-1)- \varepsilon(k-2))\right]\end{array}  \tag{17}\]  
**Remark 3**. : _The disturbance function \(\varepsilon(k-1)\) of the sliding mode controller (17) is usually deduced or calculated by the \"time delay estimation method\" [22; 42; 43; 44]:_  
\[\varepsilon(k-1)=x(k)-A_{k}x(k-1)-B_{k}u(k-1). \tag{18}\]  
**Remark 4**. : _According to Lemma 2, the width of the QSMD of the proposed SMC is related to the disturbance compensator, and its width is \(\mathcal{O}(T^{3})\) order, which is smaller than the \(\mathcal{O}(T^{2})\) order width described in [23; 42; 45].