## 4 PMSM Driving Control Design
Based on Equations (21) and (22), this study derived the error equation as Equation (23):  
\[\left(\ddot{\theta}_{m}-\ddot{\theta}_{d}\right)+K_{1}\left(\dot{\theta}_{m}- \dot{\theta}_{d}\right)+K_{0}(\theta_{m}-\theta_{d})=\delta a_{m}+\eta \tag{23}\]  
Moreover, through the definition of the following error vector \(e=\left[(\theta_{m}-\theta_{d})\quad\left(\dot{\theta}_{m}-\dot{\theta}_{d} \right)\right]^{T}\), Equation (23) can be rewritten as Equation (24):  
\[\dot{e}=Ae+b(\delta a_{m}+\eta), \tag{24}\]  
where \(A\) and \(b\) denote the error state matrix and uncertain input vector, respectively. Moreover,  
\[A= \begin{bmatrix}0&1\\ -K_{0}&-K_{1}\end{bmatrix} \text{ and }b= \begin{bmatrix}0\\ 1\end{bmatrix} . \tag{25}\]  
Herein, in case the uncertainty \(\eta\) is bounded by \(\rho\), i.e.,  
\[\|\eta\|<\rho \tag{26}\]  
The additional term \(\delta a_{m}\) can be designed as Equation (27) so that the solution trajectory of the error equation shown in Equation (24) is bounded. The Appendix A shows the detailed derivation. \[\delta a_{m}=\left\{ \begin{array}{ll}-\rho\frac{b^{T}Pe}{\|b^{T}Pe\|},&\|b^{ T}Pe\|>\sigma\\ -\frac{\sigma}{e}b^{T}Pe,&\|b^{T}Pe\|\leq\sigma\end{array} ,\right. \tag{27}\]  
where \(\sigma\) denotes a threshold constant. The matrix \(A\) in Equation (25) must be a stable matrix. Moreover, matrix \(P=P^{T}>0\) and matrix \(Q=Q^{T}>0\) must satisfy the Lyapunov equation as Equation (28):  
\[A^{T}P+PA=-Q \tag{28}\]  
Equations (17), (22), (27) and (28) construct the PMSM driving control designed in this study. Figure 6 shows the control structure developed in this study. The generated commands \(\theta_{d}\), \(\dot{\theta}_{d}\), and \(\ddot{\theta}_{d}\) and the actual responses \(\theta_{m}\) and \(\dot{\theta}_{m}\) are adopted to calculate the control term \(a_{m}\) and the additional term \(\delta a_{m}\) by using Equation (22) and Equations (27) and (28), respectively. Then, Equation (17) calculates the driving torque \(\tau_{m}\) to actuate the feed drive axis through the PMSM. Here, the commands \(\theta_{d}\), \(\dot{\theta}_{d}\), and \(\ddot{\theta}_{d}\) are generated from the axial component of the command cycle, and the actual response \(\theta_{m}\) produces the axial component of the response cycle, as shown in Figure 5.  
In this study, for simplicity, the matrix \(Q\) is designed as \(Q=q\cdot I\); where \(q\) is a positive and real variable. Therefore, the PMSM driving control includes five control parameters \(K_{1}\), \(K_{0}\), \(\rho\), \(\sigma\), and \(q\). The conservative design of the control parameters generally improves the stability but limits the performance of the PMSM driving control. On the other hand, to improve the performance, the design of the control parameters usually deteriorates the stability of the PMSM driving control. Therefore, due to the control parameters' design complexity, the control parameters were tuned manually to achieve a balanced performance  
Figure 6: PMSM driving control structure. and stability considering their control characteristics. Referring to Equations (24) and (25), the control parameters \(K_{1}\) and \(K_{0}\) determine the dynamic response of the solution trajectory. Thus, the control parameters \(K_{1}\) and \(K_{0}\) were tuned to rapidly attenuate errors without significant oscillations. Referring to Equation (27), because the threshold constant \(\sigma\) affects the chattering phenomenon of the solution trajectory, the threshold constant \(\sigma\) was tuned to suppress chattering. Furthermore, the larger the bounded value \(\rho\), the more stable control is achieved; however, a large bounded value usually increases the response time and steady-state errors of the PMSM driving control.