**1. Introduction**

The spraying of liquid manure is an important direction in precision agriculture research. This technology can address the issues of high labor intensity, low efficiency of throwing liquid organic manure, and uneven artificial fertilization [1–3]. Liquid manure contains a large amount of soluble nutrients and a variety of bioactive substances, such as amino acids and trace elements. The reasonable application of liquid manure can promote plant growth, increase yield, reduce fertilizer cost, raise soil organic matter content, and add soil chemical and physical latent capacity. Studies have shown that precision spraying technology can increase crop yield by 8–19% on average, reduce fertilizer application by approximately 30%, and improve soil quality [4–6]. At present, although the amount of liquid manure used is increasing annually worldwide, crop yields have not increased correspondingly. An analysis of liquid manure application indicates that the main reason for this is the large difference in the amount of liquid manure application per mu of land. Especially at the edge of the plot, the excessive application of liquid manure on some plots and the insufficient application of liquid manure on others due to manual control of fertilizer application or changes in vehicle speed directly affects the normal growth of crops in subsequent periods. In addition, excessive fertilization damages the soil structure and affects the growth environment and survival rate of crops. Hence, to increase the utilization coefficient of liquid manure and ensure the normal use of land resources, a more accurate and reasonable liquid manure spreading control technology should be adopted.

The main component of liquid manure is biogas slurry, which can be used to spread the base fertilizer in the field. Generally, the amount of basic fertilizer per hectare is 55 L. When biogas slurry is used as a basic fertilizer in the field, its dosage should be strictly controlled

**Citation:** Wang, P.; Chen, Y.; Xu, B.; Wu, A.; Fu, J.; Chen, M.; Ma, B. Intelligent Algorithm Optimization of Liquid Manure Spreading Control. *Agriculture* **2023**, *13*, 278. https:// doi.org/10.3390/agriculture13020278

Academic Editors: Cheng Shen, Zhong Tang and Maohua Xiao

Received: 5 January 2023 Revised: 18 January 2023 Accepted: 19 January 2023 Published: 23 January 2023

**Copyright:** © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

to prevent ammonia poisoning. Therefore, the precise application of liquid manure is fundamental and represents an important field of research within precision agriculture for the rapid and accurate adjustment of the amount of liquid manure fertilizer applied, as well as to maintain the set requirements. Research on precision fertilization mainly involves the optimization of algorithms and the establishment of a fertilization system model. At present, research on the control modeling of the fertilization process mainly includes nonlinear and linear artificial intelligence models. Within nonlinear control optimization, feedback linearization transformation control, adaptive regulation, and other methods are commonly used. Since over the traditional PID (proportion, integral, derivative) control method it is difficult to deal with complex nonlinear and hysteretic spraying control in the fertilizer transportation process, there is a need to develop a more intelligent optimization algorithm in order to precisely adjust and control the spraying process [7].

In the process of liquid manure spraying, most spraying controllers internally need an experience PID control strategy. However, in the actual spraying course, the driving speed and intelligent algorithm have a significant impact on the control system, leading to problems, including time variation and the hysteresis of the controlled object of the system, that cannot be solved. In this context, the traditional PID control algorithm is usually ineffective for variable spraying. A previous study [8] used the fuzzy neural network PID control of particle swarm optimization to adjust the fertilization system and found that the control algorithm had a small overshoot, excellent constancy, and a short rise time, which can bring about the aim of a good fertilization system. In another study [9], the authors proposed a fuzzy PID control method according to a genetic algorithm to address the problem of a long response time in the control process of an electric proportional valve. Their experimental verification identified the control method as superior to the traditional PID operating system together with the fuzzy PID control system. Another study [10] used traditional PID control to adjust the deviation and deviation rate of the PH value in fertilizer, and found that the cognoscenti PID control exhibited fine control behavior. Chang, C. et al. [11] aimed at the problem of pressure fluctuation caused by high-frequency opening and closing of valves during liquid fertilizer point application; they designed a high-frequency intermittent fertilizer supply system to optimize the system, and the parameters of the PID algorithm were adjusted using the critical proportion method. The system had certain stability. Li, T. et al. [12] put forward a way to precisely fertilize maize in view of the wavelet BP neural network algorithm to compute the non-linear matter of fertilization, which improved the accuracy of the optimal fertilization amount. In another study [13], the nonlinear model of the elastic BP neural network along with mixture gray wolf optimization was used for predictive control. The corresponding simulation dispatch demonstrated that the controller was capable of effectively diminishing the jam due to nonlinearity and exhibited a good performance. Xiuyun et al. [14] designed a variable-rate deep application system for liquid fertilizer based on ZigBee. ZigBee was used for networking and realizing short-distance wireless communication between upper and lower computers and achieved accurate fertilization by controlling the frequency of the variable-frequency pump. The control system was optimized using the incremental integral derivative algorithm, and the control effect was good. A previous study [15] proposed a simplified and linearized deep construction model based on theoretical considerations using frequency domain identification technology estimation. According to the dynamic changes of the system in the process of fertilization, the worst case of stability of the depth control system was found, and the parameters of the fertilization model were determined to achieve shallow and deep fertilization. Guangkun [16] designed a variable-rate fertilizer injection operating system for fluidity fertilizer that optimized the operating system by using a PID algorithm. With the wheeled-point fertilizer injector as the carrier, the authors achieved a good variable-rate fertilizer application effect. However, owing to the simple control algorithm, the control of the flow and pressure continued to have a large optimization space. Accordingly, in studies on the variable-rate spraying process control system of liquid manure, there are many control methods for valves and variable-frequency pumps, with most research methods optimizing the control of valves with PWM or using a PID algorithm. The fuzzy control and neural network control algorithms were studied based on PID control. In a traction-type liquid manure fertilizer applicator [10] with slow current velocity monitoring retroaction, the calculation of liquid fertilizer concentration, together with the reaction time of the solenoid valve to modify the opening of valve in line with the need, were discovered as significant elements to consider in the alternating-quantity spread manure control system [12,17,18].

With this kind of situation of automatically spread manure, the aim of this study is improve the accuracy of the amount of liquid manure in the process of spraying, as follows: (i) optimize the parameters of the spraying process; (ii) apply the BPNN–PID algorithm for optimizing dominant weight parameters; (iii) simulate and check the conventional PID dominants and BPNN–PID dominants, as well as BPNN–PID dominants optimized using a genetic algorithm on the MATLAB/Simulink plate; (iv) evidence the practicability as well as stability of the recommended algorithm. The outcome identified that the optimized dominate algorithm had fewer errors and shorter system response time than before.

The remainder of this paper is organized as follows. In the first part of this study, the control process of liquid manure spraying is analyzed and a transfer function model is established. The second part constructs the classical PID pilot together with the BPNN–PID pilot and optimizes the BPNN–PID using the genetic algorithm. First, the control signal is received and collected. After that, the BPNN system is built, as well as a genetic algorithm is used to multilayer the neural network. The third part contrasts the pilot impression of three pilot methods by way of software simulation along with test checking, as well as, lastly, achieving the experimental fruit of the liquid manure spraying control system based on the present investigation.
