## 4 Time Domain Dynamic Equations for the Anti-Swaying System
### Dynamic Analysis of the Anti-Swaying System
The weights of the anti-swaying wire ropes, the friction between the wheel and the rail, wind resistance, and air damping are ignored. The cross-sectional areas of the piston rods of the anti-swaying hydraulic cylinders are also not considered. The trolley and the load (including the spreader and the container) can be represented by \(m_{1}\) and \(m_{2}\), respectively, in units of kg. Since the mass of the spreader is less than that of the container, \(m_{2}\) is determined only by the mass of the container, and \(m_{2}\) is also referred to as the load. The coordinates of the centroids of \(m_{1}\) and \(m_{2}\) in the _Oxy_ coordinate system in Figure 3 are \(O_{1}(x_{1},y_{1})\) and \(O_{2}(x_{2},y_{2})\), respectively. The hoisting rope length is represented by \(l\), which has units of \(m\). The location of zero potential energy was selected as the horizontal plane where the \(O_{x}\) axis lies. The system's potential energy is expressed by \(-m_{2}gl\cos\varphi\). If the trolley position, \(x_{1}\), the load swaying angle, \(\varphi\), and the hoisting rope length, \(l\), are selected as generalized coordinates, then Equation (1) can be written as:  
\[\left\{ \begin{array}{c}y_{1}=0\\ y_{2}=x_{1}-l\sin\varphi\\ y_{2}=l\cos\varphi\end{array} \right.. \tag{1}\]  
The load swaying speed is expressed by Equation (2):  
\[v_{2}=\sqrt{\dot{x_{1}^{2}}+2\dot{x_{1}}\dot{l}\sin\varphi+2l\dot{x_{1}}\dot{ \varphi}\cos\varphi+\dot{l}^{2}+l^{2}\dot{\varphi}^{2}}. \tag{2}\]  
According to Equations (1) and (2), the system Lagrange function and the Lagrange equations are given by Equations (3) and (4), respectively. \[ \begin{array}{c}L=\frac{1}{2}(m_{1}+m_{2})\dot{x_{1}^{2}}+m_{2}\dot{x_{1}} \dot{l}\sin\varphi+m_{2}\dot{x_{1}}\dot{\varphi}\cos\varphi+\frac{1}{2}m_{2} \dot{l}^{2}\\ +\frac{1}{2}m_{2}l^{2}\dot{\varphi}^{2}+m_{2}gl\cos\varphi\end{array}  \tag{3}\]  
In Equation (3), \(g\) represents the acceleration of gravity, equal to \(9.81\) m/s\({}^{2}\). \[\frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial L}{\partial\dot{q}_{i}}-\frac{ \partial L}{\partial q_{i}}=F_{q_{i}}\quad(i=1,2,3) \tag{4}\]  
In Equation (4), \(q_{i}\) represents the generalized coordinate (\(q_{1}=x_{1}\), \(q_{2}=\varphi\), \(q_{3}=l\)); \(F_{q_{1}}\) is the generalized force, \(F_{q_{1}}=F(t)\) is the driving force of the trolley, and \(F_{q_{2}}=-G(t)l\cos\theta_{1}\cos\theta_{2}\cos\varphi\) and \(F_{q_{3}}=F_{l}(t)\) is the hoisting force of the load. According to hypothesis (2), Equation (5) can be obtained:  
\[F_{x}=\lambda v_{2} \tag{5}\]  
where \(\lambda\) is a proportional constant, with units of N \(\cdot\) s \(\cdot\) m\({}^{-1}\), that depends on the high-pressure loop pressure of the hydraulic system, and \(\lambda>0\). It is clear that \(\lambda\) depends on the pressure of the overflow valve (6) when the structure and size of the anti-swaying hydraulic cylinders A, B, C, and D are determined. After substituting Equations (2), (3), and (5) into Equation (4), the system dynamics equation could be obtained:  
\[\mathbf{A(q)\ddot{q}+B(q,\dot{q})\dot{q}+C(q)=u} \tag{6}\]  
where, \(q=[x_{1}\quad\varphi\quad l]^{T}\), \(\mathbf{C(q)}=[0\quad 2m_{2}gl\sin\varphi\quad m_{2}\cos\varphi]^{T}\), \(\mathbf{u}=[F(t)\quad-\hbar v_{2}\cos\varphi\quad F_{l}(t)]^{T}\), \(\mathbf{A(q)}= \begin{bmatrix}m_{1}+m_{2}&m_{2}l\cos\varphi&m_{2}\sin\varphi\\ m_{2}\cos\varphi&m_{2}l^{2}&0\\ m_{2}\sin\varphi&0&m_{2}\end{bmatrix} \mathbf{B(q,\dot{q})= \begin{bmatrix}0&m_{2}(l \cos\varphi-l\dot{\varphi}\sin\varphi)&m_{2}\dot{\varphi}\cos\varphi\\ 0&m_{2}\dot{l}&m_{2}\dot{\varphi}\\ 0&-m_{2}l\dot{\varphi}&0\end{bmatrix} \), and  
\[k=\lambda\cos\theta_{1}\cos\theta_{2} \tag{7}\]  
In Equation (7), \(k\) represents the structure parameter of the hydraulic anti-swaying system, termed the structure parameter for conciseness, and \(k>0\). It is clear that \(k\) primarily depends on the installation positions of the hydraulic system and the anti-swaying fixed pulley group (4) on the spreader (1).