# Adaptive Hierarchical Sliding Mode Control for Double-Pendulum Gantry Crane Based on Neural Network
## 4 Simulation Analysis
After increasing the load mass, the system's swing amplitude tends to be consistent, and the residual swing angle also tends to be consistent. Increasing the load mass from 1 kg to 3 kg significantly increases the system's total inertia. The relationship between this change and the controller's response is evident in Figure 6d. After the load mass increases, the control system outputs larger control forces to achieve the same control objectives, which is in line with theoretical expectations. However, the control force curve remains smooth, without obvious high-frequency oscillations or chatter. The second group of simulation results demonstrates that the RBF neural network layered sliding mode control method has good robustness. When the rope length or load mass changes, the system can still achieve accurate trajectory tracking and effective swing suppression, and the control force remains smooth without significant oscillations. Third group: To verify the anti-interference ability of the proposed method in the face of external disturbances, under the working conditions of Table 3, a pulse signal interference of 50 N lasting for 0.5 s is added at 35 s. Additionally, a sinusoidal disturbance of 50 sin(t) and a random disturbance with an amplitude of 50 N lasting for 5 s are added at 25 s. Each disturbance type mimics a real-world event: the pulse disturbance at 35 s simulates a sudden impact or jolt; sinusoidal disturbances represent cyclical forces such as vibrations; and the random disturbance simulates unpredictable forces like turbulent wind  
Figure 6: Simulation results for different load masses: (**a**) trolley displacement; (**b**) hook pendulum angle; (**c**) load pendulum angle; (**d**) control force. gusts. This is to verify the robustness of the method under possible vibrations, collisions, and wind load effects [27; 28]. As shown in Figure 7a, under the action of the three above-mentioned external disturbances, the control system can still maintain accurate tracking of the target trajectory. Figure 7b,c show the changes in hook angle and payload angle under different disturbance conditions. It can be observed that the swing angle fluctuates significantly when the disturbance is applied. However, the system quickly returns to a stable state after the disturbance disappears. Furthermore, even with the continuous presence of sinusoidal disturbance, the system can maintain a stable swing angle within the desired range. The inset in Figure 7b specifically magnifies the system's response to the pulse disturbance (red line) that occurs at t = 35 s. It clearly illustrates that immediately following the sharp spike in the hook's swing angle (\(\theta_{1}\)) caused by the simulated impact, the controller aggressively counteracts the disturbance. Similarly, the inset in Figure 7c provides a detailed view of the controller's performance in handling the random disturbance (green line), which ceases at t = 30 s. It demonstrates that as soon as the unpredictable forces are removed, the controller immediately and swiftly cancels the remaining random oscillations. Figure 7d shows the change in control force. During the random disturbance from 25 s to 30 s, the control force exhibits corresponding random fluctuations to eliminate the swing. During the disturbance, the swing angle is stabilized within 1\({}^{\circ}\), and the swing is quickly eliminated after the disturbance ends. When the pulse disturbance occurs at 35 s, the control force responds and quickly eliminates the impact of the pulse disturbance. After the disturbance ends, the swing angle is less than 1\({}^{\circ}\) after 0.22 s, and then the swing is quickly eliminated. Throughout the control process, although the control force fluctuates,  
Figure 7: Simulation results under external disturbances: **(a)** trolley displacement; **(b)** hook pendulum angle; **(c)** load pendulum angle; **(d)** control force. there is no excessive saturation or severe oscillation.