# Advanced Servo Control and AI Integration in 3-DoF Platforms for Enhanced Simulation Interactivity
## 2 Control System
### Conventional Servo Control
At this point, the input voltage commands can be defined using the decoupling control method, as follows:  
\[v_{d}^{*}=u_{d}-\omega_{e}L_{d}i_{q}; \tag{3}\]  
\[v_{q}^{*}=u_{q}-\omega_{e}\big{(}L_{d}i_{d}+\lambda^{\prime}{}_{m}\big{)}. \tag{4}\]  
By comparing Equations (1) to (2) and Equations (3) to (4), we obtain the following:  
\[u_{d}=r_{s}i_{d}+L_{d}\frac{d}{dt}i_{d}; \tag{5}\]  
\[u_{q}=r_{s}i_{q}+L_{q}\frac{d}{dt}i_{q}. \tag{6}\]  
Based on Equations (1) to (4) and considering the current controllers in Equations (5) to (6), the closed-loop current transfer function can be obtained as follows:  
\[\frac{i_{d}(s)}{i_{d}^{*}(s)}=\frac{k_{p,d}s+k_{i,d}}{L_{d}s^{2}+(k_{p,d}+r_{s })s+k_{i,d}}; \tag{7}\]  
\[\frac{i_{q}(s)}{i_{q}^{*}(s)}=\frac{k_{p,q}s+k_{i,q}}{L_{q}s^{2}+(k_{p,q}+r_{s })s+k_{i,q}} \tag{8}\]  
where \(i_{d}^{*}\) and \(i_{q}^{*}\) are the \(d\)-axis and \(q\)-axis current commands. Thus, the voltage equations of the q-axis and d-axis can be decoupled into two independent linear systems, i.e., \(u_{d}\) with \(i_{d}\) and \(u_{q}\) with \(i_{q}\) exhibit linear characteristics. Utilizing these characteristics, the \(d\)-axis current controller and \(q\)-axis current controller in Figure 1 adopt a proportional-integral (PI) controller form, with their transfer functions given as follows:  
\[v_{d}=r_{s}i_{d}+L_{d}\frac{d}{dt}i_{d}-\omega_{e}L_{q}i_{q}, \tag{1}\]0  
\[v_{d}=r_{s}i_{d}+L_{d}\frac{d}{dt}i_{d}-\omega_{e}L_{q}i_{q}, \tag{1}\]1  
where \(k_{p,d}\) and \(k_{i,d}\) represent the proportional coefficient and integral coefficient of \(d\)-axis current control, respectively. \(k_{p,q}\) and \(k_{i,d}\) represent the proportional coefficient and integral coefficient of \(q\)-axis current control, respectively. In the conventional speed control system shown in Figure 1, the d-axis current is generally controlled to be zero. Therefore, the electromagnetic torque \(T_{e}\) is controlled by the q-axis current \(i_{q}\). The electromagnetic torque is expressed as follows:  
\[v_{d}=r_{s}i_{d}+L_{d}\frac{d}{dt}i_{d}-\omega_{e}L_{q}i_{q}, \tag{1}\]2  
where \(P\) denotes the number of poles of the motor, while \(K_{t}\) represents the torque constant. The dynamic mechanical equations for the rotor speed are expressed as:  
\[v_{d}=r_{s}i_{d}+L_{d}\frac{d}{dt}i_{d}-\omega_{e}L_{q}i_{q}, \tag{1}\]3  
where \(T_{L}\) represents the external load, \(B_{m}\) denotes the viscous coefficient of the motor, and \(J_{m}\) represents the moment of inertia of the motor. The electrical rotor speed and rotor angle are expressed, respectively, as follows:  
\[v_{d}=r_{s}i_{d}+L_{d}\frac{d}{dt}i_{d}-\omega_{e}L_{q}i_{q}, \tag{1}\]4\[v_{d}=r_{s}i_{d}+L_{d}\frac{d}{dt}i_{d}-\omega_{e}L_{q}i_{q}, \tag{1}\]5  
With the q-axis current controller \(C_{q}\), the speed control transfer function block diagram is as shown in \[v_{d}=r_{s}i_{d}+L_{d}\frac{d}{dt}i_{d}-\omega_{e}L_{q}i_{q}, \tag{1}\]6  
Assuming the bandwidth of the q-axis current control loop system is sufficiently wide, the transfer function of the q-axis current control loop can be approximated as 1 within the speed bandwidth range. At this point, considering the representation of the speed controller in the frequency domain, as shown in Figure 2, it can be expressed as follows:  
\[v_{d}=r_{s}i_{d}+L_{d}\frac{d}{dt}i_{d}-\omega_{e}L_{q}i_{q}, \tag{1}\]7  
where \(k_{p,s}\) and \(k_{i,s}\) represent the proportional coefficient and integral coefficient of speed control, respectively. Therefore, when the bandwidth of the q-axis current control loop system is much greater than the mechanical bandwidth, the delay in the q-axis current response can be neglected.