Abstract:Hilly and mountainous regions are characterized by complex terrain and agricultural machinery with high centers of gravity, which often leads to instability and rollover risks during rail transport operations. To address this challenge, a hydraulic automatic leveling anti-instability system for a mountain rail transport platform was proposed. The system integrated an ADXL345 triaxial accelerometer for real-time attitude monitoring and employed a particle swarm optimization fuzzy PID (PSO Fuzzy-PID) controller, using the platform’s Z-axis tilt angle as the feedback variable. A simulation model was established in Simulink to compare the performance of conventional PID, fuzzy PID, and PSO Fuzzy-PID controllers. Simulation results demonstrated that the PSO Fuzzy-PID controller achieved a rapid response time of 0.181s with zero overshoot, and outperformed conventional PID and fuzzy PID controllers in terms of adjustment time, stability, and overall dynamic response. Static experimental tests were conducted under track inclinations of 4°, 7°, and 10°, and the PSO Fuzzy-PID controller yielded an average leveling error standard deviation of only 0.068°, with maximum error constrained within 0.45°. The average leveling time was reduced by approximately 6.3% and 15.6% compared with that of fuzzy PID and conventional PID, respectively. Dynamic experiments further revealed that the system maintained a response delay below 0.4s, with platform attitude fluctuations confined to -0.079° to 0.497°, thereby meeting the precise leveling requirement within ±10°. These results confirmed the effectiveness and reliability of the proposed PSO Fuzzy-PID based hydraulic leveling system. The system significantly enhanced the operational stability and safety of agricultural machinery transport on hilly rail platforms, providing valuable technical support for the intelligent development and practical application of agricultural transport equipment in mountainous regions.