## 2 Methodology
### Mathematical Model of PMSM  
As shown in Figure 3, this paper adopts vector control technology based on SVPWM to realize the decoupling control of torque and excitation components. Following the stator flux linkage orientation control rules, the d-axis of the reference coordinate is aligned with the motor flux direction, where \(i_{d}=0\). The stator flux linkage component on the d-axis is represented as \(\psi_{f}=\psi_{d}\). The voltage equation of the PMSM is formulated in the two-phase synchronous rotating reference frame. \[\left\{ \begin{array}{c}\frac{d\dot{i}_{d}}{dt}=\frac{1}{L_{d}}\left(-Ri_{d}+ P_{n}\omega_{m}L_{q}i_{q}+u_{d}\right)\\ \frac{d\dot{i}_{q}}{dt}=\frac{1}{L_{q}}\left(-Ri_{q}-P_{n}\omega_{m}L_{d}i_{d}+ u_{q}-P_{n}\omega_{m}\psi_{f}\right)\\ \frac{du_{m}}{dt}=\frac{1}{J}\left(T_{e}-T_{L}-B_{u}\omega_{m}\right)\end{array} \right. \tag{1}\]  
The torque reference (electromagnetic torque) \(T_{e}\) in the following equation is used:  
\[T_{e}=1.5P_{n}\left[\psi_{f}i_{q}+\left(L_{d}-L_{q}\right)i_{d}i_{q}\right] \tag{2}\]  
where \(R\) is the stator resistance (\(\Omega\)); \(L_{d}\) and \(L_{q}\) are the inductances (\(H\)) of the stator on the \(d\) and \(q\) axes, respectively; \(i_{d}\) and \(i_{q}\) are the current (\(A\)) of the stator on the \(d\) and \(q\) axes, respectively; \(u_{d}\) and \(u_{q}\) are the voltage (\(V\)) of the stator on the \(d\) and \(q\) axes, respectively; \(P_{n}\) is the number of pole pairs of the rotor; \(J\) is the inertia; \(\omega_{m}\) is the angular velocity measured from the motor; \(T_{L}\) is a constant load torque; \(B_{u}\) is the mechanical damping constant. Suppose that the load torque of the four motors in the \(X\) direction is equal, the output torque and speed are equal, the load torque of the two motors in the \(Y\) direction is equal, and the output torque and speed are equal. In order to build the mathematical model of the motor, it is necessary to select the specific motor first according to the required motor torque and speed. The motor torque \(T_{out}\) is divided into load torque \(T_{u}\) for overcoming rolling friction and accelerating torque \(T_{a}\) for maximum acceleration. \[T_{out}=q_{motor}(T_{u}+T_{a})=q_{motor}(\mu mgr_{w}+mar_{w}) \tag{3}\]  
Figure 3: Three-loop control of the crane in track-following servo subsystem. where the gross load hauled by the crane is about \(m_{x}=12,000\) kg, and the gross load hauled by the trolley is about \(m_{y}=2000\) kg. The number of motors for the moving crane system and the moving trolley system are \(q_{motor}^{X}=4\) and \(q_{motor}^{Y}=2\), respectively. The coefficient of rolling friction with railroad steel wheels on steel rails is \(\mu=0.05\), and the radius of the steel wheel is \(r_{w}=0.2\) m.  
The design speed of the crane is larger than the maximum speed (\(v_{max}\)) of the CLRV, so \(v_{ux}^{max}=5\) m/s is set. Additionally, the VLRV moves in a small range in the \(Y\) direction, so \(v_{uy}^{max}=3.5\) m/s is set. The \(v_{ux}\) and \(v_{ux}\) are the actual speeds of the crane and trolley, respectively. According to Equation (4), the max speeds of motors \(n_{x}^{max}\) and \(n_{y}^{max}\) can be calculated:  
\[n=\frac{60r_{g}}{2\pi r_{w}}v_{u} \tag{4}\]  
where the gear ratio of the crane motors is \(r_{g}^{X}=10\) and the gear ratio of the trolley motors is \(r_{g}^{Y}=10\). According to the calculation, the motors are selected. The parameters of the motors are shown in the following Table 1.  
In the system, the motors' speeds are \(n_{x}\) and \(n_{y}\), and the actual angular velocities of the motors are \(\omega_{mx}\) and \(\omega_{my}\), respectively. \[v_{ux}=\frac{2\pi r_{w}n_{x}}{60r_{g}^{X}}=\frac{r_{w}\omega_{m}^{X}}{r_{g}^{X}} \tag{5}\]  
\[v_{uy}=\frac{2\pi r_{w}n_{y}}{60r_{g}^{Y}}=\frac{r_{w}\omega_{m}^{Y}}{r_{g}^{Y}} \tag{6}\]  
In this paper, the PI control is adopted in the motor's current loop and speed loop control. The primary constraints during the controller design are the voltage and current constraints on the quadrature axis and direct axis.