## 2 Materials and Methods
### Design of the Variable-Parameter Sliding Mode Position Controller
Combining Equations (2) and (8), let the average rate of decrease in the given speed during the positioning stage be as follows:  
\[|\frac{\mathrm{d}\omega_{\mathrm{mref}}}{\mathrm{d}t}|_{\mathrm{avg}}=\frac{c ^{2}x_{1}(t_{0})}{2} \tag{12}\]  
From Equation (12), it is evident that, the larger the sliding mode surface parameter \(c\), the greater the average rate of decrease in the given speed. When this rate exceeds the maximum rate of change in speed, the actual speed cannot follow the given speed, resulting in overshoot in the position response when the given speed is equal to zero (\(\omega_{\mathrm{mref}}=0\)). The objective of servo system control is to achieve a fast and overshoot-free position response to the given value. From the previous analysis, it is clear that a larger \(c\) leads to a faster response, but excessively large \(c\) values can cause overshoot. The optimal value of \(c\) is the maximum value that ensures no overshoot in the position response, and this optimal value is constrained by the maximum rate of change in speed, which is positively correlated with it. Additionally, Equation (11) indicates that, under constant conditions, the maximum rate of change in speed during the positioning stage is related to \(T_{\mathrm{L}}\) and \(J\), so the optimal value of parameter \(c\) is also related to them. In a system using fixed-parameter SMC, the value of \(c\) remains constant (i.e., the average rate of decrease in the given speed remains constant). When variations in \(T_{\mathrm{L}}\) and \(J\) lead to a maximum rate of change in speed smaller than this average rate, overshoot occurs in the position response. Conversely, the position response cannot follow the given value at the fastest rate. Therefore, fixed-parameter SMC cannot achieve optimal control under any operating conditions; its performance is significantly affected by \(T_{\mathrm{L}}\) and \(J\), and its robustness is poor. Therefore, this paper proposes a variable-parameter sliding mode position controller, in which the parameter \(c\) is dynamically adjusted according to \(T_{\mathrm{L}}\), \(J\), and \(\theta_{\mathrm{ini}}\). Additionally, when the position reference undergoes a step change, the smaller the \(\theta_{\mathrm{ini}}\), the smaller the value of \(x_{1}(t_{0})\). From Equation (12), it is apparent that under constant average rate conditions, reducing \(x_{1}(t_{0})\) allows the value of \(c\) to be appropriately increased. Thus, the parameter \(c\) should also vary with changes in \(\theta_{\mathrm{ini}}\). In summary, the VSMC proposed in this paper dynamically adjusts its sliding mode surface parameter \(c\) according to the values of \(T_{\mathrm{L}}\)\(J\), and \(\theta_{\mathrm{ini}}\) to achieve optimal control under any operating conditions. Clearly, \(\theta_{\mathrm{ini}}\) can be directly calculated, while \(T_{\mathrm{L}}\) and \(J\) are unknown quantities. Therefore, this paper designs a recursive least squares observer to observe them. The following section will briefly introduce how to utilize this method to obtain their observed values.