## 2 Materials and Methods
### Design of the Variable-Parameter Sliding Mode Position Controller
Sliding mode control may exhibit a chattering phenomenon, and in general, reducing the value of \(\varepsilon\) appropriately can mitigate chattering. According to Equations (2) and (3), the expansion of \(\dot{s}\) is as follows:  
\[\dot{s}=\dot{cx}_{1}+\dot{x}_{2}=cx_{2}+\dot{\theta}_{\text{ini}}-\dot{\omega} _{\text{m}} \tag{5}\]  
Substituting Equation (5) into Equation (4) yields the output of the fixed-parameter sliding mode position controller, i.e., the speed reference value is as follows:  
\[\omega_{\text{mref}}=\dot{\theta}_{\text{ini}}+\int(cx_{2}+\varepsilon\text{ sgn}(s)+qs)\text{d}t \tag{6}\]  
Because \(\dot{\theta}_{\text{ini}}\) is an impulse function, it becomes zero after the initial moment, thus, Equation (6) can be simplified. \[\omega_{\text{mref}}=\int(cx_{2}+\varepsilon\text{sgn}(s)+qs)\text{d}t \tag{7}\]  
Clearly, \(\omega_{\text{mref}}\) is generated by the output of the integrator. The integrator acts as a filter to smooth the alternating signal, thus suppressing the chattering of SMC. The above is the basic principle of fixed-parameter sliding mode position control. Next, the design idea of variable-parameter sliding mode control (VSMC) will be introduced. Following this, the design concept of the system phase point (\(x_{1},x_{2}\)) lies on the positive half-axis of \(x_{1}\). Under sliding mode control, its trajectory is shown as the red line in Figure 4.  
Let \(x_{1}(t_{0})\) denote the value of the state variable \(x_{1}\) when the phase point first reaches the sliding mode surface (corresponding to point A in Figure 2). From Equations (2) and (3), we can infer the trend of the changes in \(x_{1}\) and \(x_{2}\) during the sliding mode motion process as follows:  
\[\left\{ \begin{array}{l}x_{1}(t)=x_{1}(t_{0})\mathrm{e}^{-ct}\\ x_{2}(t)=-cx_{1}(t_{0})\mathrm{e}^{-ct}\end{array} \right. \tag{8}\]  
From Equation (8), it can be observed that, by adjusting the parameter \(c\), the speed at which \(x_{1}\) approaches zero can be controlled. The larger the \(c\), the faster the approach speed, meaning that the speed of the position response increases with the increase in \(c\). During the position step response process, the approximate variation trend of the given speed \(\omega_{\mathrm{mref}}\) and the actual speed \(\omega_{m}\) is shown in Figure 5. Segment OB represents the approaching movement, and segment BC represents the sliding mode motion. Point B corresponds to point A in Figure 4. Usually, the stage where the actual speed decreases at the end (segment BC) is referred to as the positioning stage. The motion equation during the positioning stage is given by Equation (9), where the acceleration \(\mathrm{d}\omega_{m}/\mathrm{d}t\) is negative. \[\frac{\mathrm{d}\omega_{\mathrm{m}}}{\mathrm{d}t}=\frac{T_{e}-T_{\mathrm{L}}- B_{\mathrm{m}}\omega_{\mathrm{m}}-T_{f}\mathrm{sgn}(\omega_{\mathrm{m}})}{J} \tag{9}\]  
Figure 4: Sliding mode control schematic diagram. Figure 5: Rotation speed change trend diagram during the position response process. The maximum rate of change in speed during this stage is given by Equation (10). \[\left|\frac{\mathrm{d}\omega_{\mathrm{m}}}{\mathrm{d}t}\right|_{\mathrm{max}}= \frac{T_{\mathrm{emax}}+T_{\mathrm{Lmax}}+B_{\mathrm{m}}\omega_{\mathrm{m}}+T_{f }}{J_{\mathrm{min}}} \tag{10}\]  
For typical motors, the comprehensive friction torque is much smaller compared to the maximum value of electromagnetic torque, so Equation (10) can be further simplified to the following:  
\[|\frac{\mathrm{d}\omega_{\mathrm{m}}}{\mathrm{d}t}|_{\mathrm{max}}=\frac{T_{ \mathrm{emax}}+T_{\mathrm{L}}}{J} \tag{11}\]  
As observed, it is limited by the maximum value of electromagnetic torque \(T_{\mathrm{emax}}\), the load torque \(T_{\mathrm{L}}\), and the system inertia \(J\), and cannot increase indefinitely. Analyzing Figures 4 and 5, point B in Figure 5 corresponds to point \(A\) in Figure 4, i.e., during the positioning stage, the phase point undergoes sliding mode motion.