# Adaptive Hierarchical Sliding Mode Control for Double-Pendulum Gantry Crane Based on Neural Network
## 4 Simulation Analysis
Figure 4f shows that the control force of traditional sliding mode control exhibits significant high-frequency oscillations. The control force amplitude in Figure 4d is  
Figure 3: Controller block diagram. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Parameters** & **M** & **m\({}_{1}\)** & **m\({}_{2}\)** & **g** & **l\({}_{1}\)** & **l\({}_{2}\)** \\ \hline \multirow{3}{*}{Value} & Trolley & \multirow{2}{*}{Hood Mass} & \multirow{2}{*}{Payload Mass} & \multirow{2}{*}{Gravitational Acceleration} & \multirow{2}{*}{Pendulum Length 1} & \multirow{2}{*}{Pendulum Length 2} \\  & Mass & & & & & & \\ \cline{1-1}  & 10 kg & & & 1 kg & & 9.8 m/s\({}^{2}\) & 1 m & 0.5 m \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Simulation parameters. 5.23 N, which is reduced by 30.2% and 37.4% compared to the other methods, respectively. This indicates that the proposed method has a better control performance. The simulation parameters for different pendulum lengths are shown in Table 4. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Parameter** & **Symbol** & **Value** & **Value** & **Unit** \\ \hline Trolley Mass & M & 10 & 10 & kg \\ Hook Mass & m\({}_{1}\) & 0.1 & 0.1 & kg \\ Load Mass & m\({}_{2}\) & 1 & 1 & kg \\ Pendulum Length 1 & l\({}_{1}\) & 1 & 2 & m \\ Pendulum Length 2 & l\({}_{2}\) & 0.5 & 0.5 & m \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Simulation parameters for different pendulum lengths. Figure 4: Comparison of simulation results: (**a**) trolley displacement; (**b**) hook pendulum angle; (**c**) load pendulum angle; (**d**) RBF layered sliding mode control force; (**e**) layered sliding mode control force; (**f**) sliding mode control force. The simulation results are shown in Figure 5.  
The simulation results show that when the pendulum length l\({}_{1}\) increases from 1 m to 2 m, the proposed control method still maintains a good control performance. In terms of swing suppression, as the pendulum length l\({}_{1}\) increases, the system's natural frequency decreases, and the swing period increases, making swing suppression more difficult [26]. Figure 5b,c display the changes in the hook and load angles. The simulation results indicate that the system can keep the residual swing angle within a small range. Notably, the difference in the peak swing angle between the two cases is less than 0.2\({}^{\circ}\), which demonstrates the control method's good adaptability to variations in the pendulum length parameter. Figure 5 clearly demonstrates the controller's robustness; it successfully adapts to the change in system dynamics, maintaining stability and achieving effective swing suppression in both cases. As shown in Figure 5d, when the pendulum length l1 increases from 1 m to 2 m, the control force remains stable. This adaptability is vital for real-world cranes where the effective pendulum length changes with hoisting height. The simulation parameters for different load masses are shown in Table 5.  
Figure 5: Simulation results for different pendulum lengths: (**a**) trolley displacement; (**b**) hook pendulum angle; (**c**) load pendulum angle; (**d**) control force. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Parameter** & **Symbol** & **Value** & **Value** & **Unit** \\ \hline Trolley Mass & M & 10 & 10 & kg \\ Hook Mass & m\({}_{1}\) & 0.1 & 0.1 & kg \\ Load Mass & m\({}_{2}\) & 1 & 3 & kg \\ Pendulum Length 1 & l\({}_{1}\) & 1 & 1 & m \\ Pendulum Length 2 & l\({}_{2}\) & 0.5 & 0.5 & m \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Simulation parameters for different load masses. The simulation results are shown in Figure 6.  
The simulation results show that when the load mass m\({}^{2}\) increases from 1 kg to 3 kg, the proposed control method still maintains a good control performance. In Figure 6a, it can be seen that when the load mass changes, the control system can still maintain a good trajectory tracking performance. Figure 6b,c show the variations in the hook and load angles.