Abstract:The application of water-fertilizer integration technology in cotton, wheat, tomato and other field crops planting scenarios is gradually increasing. However, the current research on control algorithms that can quickly and effectively adjust the fertilizer flow in the water-fertilizer integration system for field crops is relatively limited. The water-fertilizer integration system has the characteristics of time-varying, hysteresis and nonlinearity, and the common PID and BP-PID control algorithms cannot obtain the expected control effect. To solve these problems, a BP neural network PID controller based on bat algorithm (BA) optimization was designed. By using BA to optimize the initial weights of the BP neural network, the self-learning speed of the BP neural network was accelerated to achieve fast and accurate control of the fertilizer flow rate in the water-fertilizer integration system, which reduced the amount of overshooting and improved the response speed. At the same time, a water-fertilizer integration flow regulation test platform was built based on STM32 microcontroller, and the performance of the controller was experimentally verified. The results showed that compared with the conventional PID controller and the BP neural network-based PID controller, the designed controller had higher control accuracy and robustness, and reduced the effects caused by time lag, nonlinearity and other factors. The average maximum overshoot was 4.78% and the average regulation time was 41.24s. Especially when the fertilizer application flow rate was 0.6m3/h, the controller showed the best comprehensive control performance and achieved the effect of precise fertilizer application.