Liquid fertilizer control method based on EDBKA-PID, soil testing and formulated fertilization system and method
By introducing the EDBKA-PID control method into the integrated water and fertilizer system, the PID parameters are optimized, and the time-varying, nonlinear and hysteresis problems of the system when regulating water and fertilizer resources are solved, and the precise regulation of liquid fertilizer flow and efficient utilization of water and fertilizer resources are achieved.
Patent Information
- Application Number
- CN202411872375.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-03-25
AI Technical Summary
The existing integrated water and fertilizer system has time-varying, nonlinear and hysteresis problems in regulating water and fertilizer resources, resulting in low utilization of water and fertilizer resources. The traditional PID controller has shortcomings in parameter setting and control accuracy, making it difficult to meet higher accuracy requirements.
The liquid fertilizer flow control method based on EDBKA-PID is adopted, and the PID parameter combination is optimized, the algorithm convergence speed and accuracy are improved, and the liquid fertilizer flow is precisely regulated by introducing elite operators and differential evolution strategies.
High-precision regulation of liquid fertilizer flow is achieved, water and fertilizer resource utilization is improved, and the system's adaptability and control accuracy are enhanced.
Smart Images

Figure CN119689839A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of agriculture, and in particular relates to a liquid fertilizer control method based on EDBKA-PID, a soil testing and formula fertilization system and a method. Background Art
[0002] Water-fertilizer integration based on soil testing and formula is a modern agricultural information technology based on the drip irrigation system, which aims to achieve the goals of water and fertilizer saving, high yield and high efficiency. Its core concept is to regulate and optimize water and fertilizer resources according to the nutrient content of the soil and the fertilizer requirements of crops. This technology has attracted much attention in the field of modern agricultural science and plays an important role in promoting the sustainable development of agriculture.
[0003] The fertilization strategies currently used are highly unified, but there are few integrated water and fertilizer systems involving soil testing and formulation, which ignore the spatial differences in crop water and fertilizer requirements and soil nutrients, resulting in low water and fertilizer resource utilization. At the same time, the time-varying, nonlinear and hysteresis characteristics of the integrated water and fertilizer system will have an adverse effect on the operating efficiency of water and fertilizer irrigation. In the actual production site, the demand for water and fertilizer concentration is not fixed, resulting in complex parameter setting. Conventional PID controllers often have poor parameter settings and low control accuracy, poor adaptability to actual production, and are difficult to meet higher precision requirements. Therefore, it is crucial to formulate an efficient fertilizer and water irrigation control strategy.
[0004] At present, the control strategies mainly used at home and abroad, such as optimization algorithms, neural networks, etc., combined with PID, can achieve precise control of the system. The optimization PID based on intelligent algorithms has solved the problems of time-varying and poor adaptive ability of water-fertilizer systems to a certain extent, but most of the current research is still in the experimental simulation stage, and there are relatively few studies combined with intelligent algorithms.
[0005] In view of this, the present invention designs a new PID-based liquid fertilizer control method and system, and a soil testing formula fertilization system, which is a liquid fertilizer control system based on soil testing formula, and a flow control method of EDBKA optimizing PID parameters, so that irrigation and fertilization are more precise. Summary of the invention
[0006] The invention aims to provide a liquid fertilizer flow control method based on EDBKA-PID, introduce elite operators and differential evolution strategies into black kite optimization, optimize PID parameter combination, make the algorithm converge faster and more accurate, and realize accurate regulation of liquid fertilizer flow.
[0007] In order to achieve the above purpose, the technical solution adopted is:
[0008] A liquid fertilizer flow control method based on EDBKA-PID comprises the following steps:
[0009] S10: Calculate the deviation between the target fertilizer application amount and the actual fertilizer application amount, and transmit the deviation to the PID controller;
[0010] S20: The PID controller performs calculation according to the deviation to obtain an output signal;
[0011] S30: According to the output signal, the fertilizing device adjusts the flow rate of the liquid fertilizer in the fertilizer outlet pipe through the frequency converter and the asynchronous motor, thereby achieving accurate control of the flow rate of the liquid fertilizer.
[0012] Furthermore, the overall flow control function of the system is as follows:
[0013] G(s)=G1(s)G2(s)G3(s);
[0014] In the formula, G1(s) is the linearized transfer function of the fertilizer outlet pipeline, G2(s) is the linearized transfer function of the three-phase asynchronous motor, and G3(s) is the transfer function of the inverter and other parts;
[0015] Furthermore, the linear transfer function of the fertilizer outlet pipeline is: Where, T1 is the inertia time constant of the fertilizer outlet pipeline, s is the Laplace transform variable, k1 is the gain constant of the fertilizer outlet pipeline, e is the exponential factor, and τ is the time lag constant of the fertilizer outlet pipeline;
[0016] The linear transfer function of the three-phase asynchronous motor is: In the formula, T2 is the inertia time constant of the motor, and k2 is the gain constant of the motor;
[0017] The transfer function of the frequency converter and other parts is: G3(s)=k3; wherein k3 is the gain constant of the frequency converter and other links of the system.
[0018] Furthermore, in the PID controller, EDBKA is used to adjust the PID parameter K p , K i , K d Make optimizations.
[0019] Furthermore, the optimization comprises the following steps:
[0020] (1) Using decimal-coded EDBKA, set the algorithm parameters: population size pop, attack behavior state probability p, and maximum number of iterations T;
[0021] (2) Randomly generate the initial values of PID parameters, using each group of K p , K i , K dThe value of is solved according to the objective function to determine the optimal fitness and optimal position of the individual;
[0022] (3) Attack behavior: According to the probability of attack behavior, hovering or hovering is selected to perform attack behavior, and then the best fitness and position of the black kite are found and updated according to the fitness;
[0023] (4) Migration behavior: Determine whether the current population fitness is less than the random population fitness, and let the best individual lead the migration, and then find and update the individual's best fitness and position based on the fitness;
[0024] (5) Introduce the elite operator to replace the worst individual in the current iteration with the best individual after the previous iteration, and then perform the differential evolution strategy to retain the individual with the highest adaptability;
[0025] (6) During each iteration, determine whether the preset maximum number of iterations has been reached. If so, output the global optimal point and the individual optimal point; otherwise, return to the aforementioned attack behavior.
[0026] Furthermore, the objective function, i.e., fitness, uses the time integral multiplied by the absolute error criterion as an evaluation index, and its formula is as follows:
[0027] ∫0 ∞ t|e(t)|dt;
[0028] Where, e(t)=r(t)-y(t), is the deviation of the control system, r(t) is the expected input, y(t) is the system output, t is the time, and |e(t)| is the absolute value of the deviation.
[0029] Furthermore, the attack behavior is formulated as follows:
[0030]
[0031] In the formula, Indicates the position of the black kite after the attack. represents the current position of the black-winged kite, r is a random number between 0 and 1, n is the step size control parameter, p is the probability constant for generating an attack behavior state, T is the total number of iterations, and t is the current number of iterations;
[0032] The formula for the migration behavior is as follows:
[0033]
[0034] In the formula, Indicates the location of the black-winged kite after migration. Indicates the current location of the black-winged kite. represents the leader position, m is the migration step parameter, Fi is the current population fitness, F ri is the fitness of the random population, and C(0,1) represents the Cauchy mutation.
[0035] Furthermore, the differential evolution strategy includes three parts:
[0036] Mutation: In each iteration, the mutation process is to select three different particles in the population and generate new particles by the following formula;
[0037] V i =X i3 +F*(X i1 -X i2 );
[0038] Where V i For the new particle, X i1 , X i2 , X i3 are different individuals randomly selected from the population, F is the mutation factor, which controls the scaling of the difference vector;
[0039] Crossover: Select according to a certain probability, and the newly generated individuals cross with the current particles according to the following formula, otherwise, keep the original state;
[0040]
[0041] Where U i,j is the j-th dimension gene value of the new individual generated after the crossover operation, v i,j is the j-th dimension value of the mutation vector, x i,j is the j-th dimension value of the current population individual, CR is the crossover probability factor, j rand is a random probability;
[0042] Selection: Select according to the following formula, calculate the fitness of the new particles generated by mutation and crossover, compare them with the target particles, and retain the better particles;
[0043]
[0044] Where, X inew is a new particle, U i is the particle after mutation and crossover, X i is the current particle, f(U i,G+1 ) is the fitness value of the particle after mutation and crossover, f(X i ) is the fitness value of the current particle.
[0045] The second invention object of the present invention is to provide a soil testing and formula fertilization system based on EDBKA-PID. In view of the empirical irrigation and fertilization method, a soil testing and formula-based method is cleverly used to self-distribute water and fertilizer in the control system, making irrigation and fertilization more precise.
[0046] In order to achieve the above purpose, the technical solution adopted is:
[0047] A soil testing and formula fertilization system based on EDBKA-PID, comprising:
[0048] Soil testing and analysis module: accurately tests the nutrient content in the soil, and generates a suitable fertilization formula based on the collected soil data and the fertilizer requirements of the crops;
[0049] Fertilizer preparation module: accurately prepare liquid fertilizer according to the fertilization formula and store the prepared liquid fertilizer;
[0050] Intelligent control module, including: PID controller, sensor device;
[0051] Drip irrigation module: It is composed of a drip irrigation pipe network, through which the liquid fertilizer prepared by the fertilizer module is mixed with water and accurately transported to the roots of crops;
[0052] Monitoring and feedback module: monitors environmental factors such as soil moisture, temperature, crop growth conditions, etc., and feeds the data back to the soil testing and analysis module.
[0053] The intelligent control module and the drip irrigation module provide the above-mentioned liquid fertilizer flow control method.
[0054] The third invention objective of the present invention is to provide a soil testing and formula fertilization method based on EDBKA-PID, using the above-mentioned soil testing and formula fertilization system for fertilization.
[0055] Compared with the prior art, the present invention has the following beneficial effects:
[0056] 1. The technical solution of the present invention, through reasonable analysis and design, abandons the method of irrigation and fertilization relying on experience, and cleverly adopts a method based on soil testing and formula to self-distribute liquid fertilizer in the control system, making irrigation and fertilization more precise.
[0057] 2. The technical solution of the present invention, when regulating the water and fertilizer flow, the control effect of the traditional PID optimization algorithm is not ideal. A hybrid strategy is designed to improve the PID algorithm, which solves the problems of relying on experience for fertilization and the low precision of liquid fertilizer flow control in the prior art. The innovations are as follows:
[0058] (1) The newly proposed Black Kite Optimization Algorithm (BKA) is introduced, which has significant features, strong evolutionary potential, fast search speed and excellent optimization ability.
[0059] (2) Introduce elite operators to further accelerate the convergence speed; introduce differential evolution local search strategy to update the variable values of the solution and jump out of the local optimal solution.
[0060] (3) Through reasonable analysis and design, the method of irrigation and fertilization based on experience was abandoned, and a method based on soil testing and formula was cleverly adopted to self-distribute liquid fertilizer in the control system, making irrigation and fertilization more precise. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 This is the structural diagram of the liquid fertilizer control system based on soil testing and formulation.
[0062] Figure 2 This is the liquid fertilizer flow control structure diagram.
[0063] Figure 3 Schematic diagram of the process of optimizing PID parameters for EDBKA.
[0064] Figure 4 This is the EDBKA flow chart.
[0065] Figure 5 Simulate the control flow graph for the model.
[0066] Figure 6 This is a comparison chart of the convergence speed with other algorithms.
[0067] Figure 7 This is a comparison chart of the step response curve with other algorithms. DETAILED DESCRIPTION
[0068] In order to further explain the liquid fertilizer control method based on EDBKA-PID, the soil testing formula fertilization system and method of the present invention and achieve the intended purpose of the invention, the following is a detailed description of the liquid fertilizer control method based on EDBKA-PID, the soil testing formula fertilization system and method proposed in accordance with the present invention, its specific implementation method, structure, characteristics and efficacy, as described below in combination with the preferred embodiments. In the following description, different "one embodiment" or "embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0069] The following will further introduce in detail a liquid fertilizer control method based on EDBKA-PID, a soil testing and formula fertilization system and method of the present invention in conjunction with specific embodiments:
[0070] Aiming at the problems of irrigation and fertilization relying on experience and low precision of liquid fertilizer flow control in the prior art, the technical solution of the present invention is proposed. The details are as follows:
[0071] A liquid fertilizer flow control method based on EDBKA-PID comprises the following steps:
[0072] S10: Calculate the deviation between the target fertilizer application amount and the actual fertilizer application amount, and transmit the deviation to the PID controller;
[0073] S20: The PID controller performs calculation according to the deviation to obtain an output signal;
[0074] S30: According to the output signal, the fertilizing device adjusts the flow rate of the liquid fertilizer in the fertilizer outlet pipe through the frequency converter and the asynchronous motor, thereby achieving accurate control of the flow rate of the liquid fertilizer.
[0075] Preferably, the overall flow control function of the system is as follows:
[0076] G(s)=G1(s)G2(s)G3(s);
[0077] In the formula, G1(s) is the linearized transfer function of the fertilizer outlet pipeline, G2(s) is the linearized transfer function of the three-phase asynchronous motor, and G3(s) is the transfer function of the inverter and other parts;
[0078] Further preferably, the linearized transfer function of the fertilizer outlet pipe is: Where, T1 is the inertia time constant of the fertilizer outlet pipeline, s is the Laplace transform variable, k1 is the gain constant of the fertilizer outlet pipeline, e is the exponential factor, and τ is the time lag constant of the fertilizer outlet pipeline;
[0079] The linear transfer function of the three-phase asynchronous motor is: In the formula, T2 is the inertia time constant of the motor, and k2 is the gain constant of the motor;
[0080] The transfer function of the frequency converter and other parts is: G3(s)=k3; wherein k3 is the gain constant of the frequency converter and other links of the system.
[0081] Preferably, in the PID controller, EDBKA is used to adjust the PID parameter K p , K i , K d Make optimizations.
[0082] Further preferably, the optimization comprises the following steps:
[0083] (1) Using decimal-coded EDBKA, set the algorithm parameters: population size pop, attack behavior state probability p, and maximum number of iterations T;
[0084] (2) Randomly generate the initial values of PID parameters, using each group of K p , K i , K d The value of is solved according to the objective function to determine the optimal fitness and optimal position of the individual;
[0085] (3) Attack behavior: According to the probability of attack behavior, hovering or hovering is selected to perform attack behavior, and then the best fitness and position of the black kite are found and updated according to the fitness;
[0086] (4) Migration behavior: Determine whether the current population fitness is less than the random population fitness, and let the best individual lead the migration, and then find and update the individual's best fitness and position based on the fitness;
[0087] (5) Introduce the elite operator to replace the worst individual in the current iteration with the best individual after the previous iteration, and then perform the differential evolution strategy to retain the individual with the highest adaptability;
[0088] (6) During each iteration, determine whether the preset maximum number of iterations has been reached. If so, output the global optimal point and the individual optimal point; otherwise, return to the aforementioned attack behavior.
[0089] Further preferably, the objective function, i.e., fitness, uses the time integral multiplied by the absolute error criterion as an evaluation index, and its formula is as follows:
[0090] ∫0 ∞ t|e(t)|dt;
[0091] Where, e(t)=r(t)-y(t), is the deviation of the control system, r(t) is the expected input, y(t) is the system output, t is the time, and |e(t)| is the absolute value of the deviation.
[0092] Further preferably, the attack behavior is formulated as follows:
[0093]
[0094] In the formula, Indicates the position of the black kite after the attack. represents the current position of the black-winged kite, r is a random number between 0 and 1, n is the step size control parameter, p is the probability constant for generating an attack behavior state, T is the total number of iterations, and t is the current number of iterations;
[0095] The formula for the migration behavior is as follows:
[0096]
[0097] In the formula, Indicates the location of the black-winged kite after migration. Indicates the current location of the black-winged kite. represents the leader position, m is the migration step parameter, F i is the current population fitness, F ri is the fitness of the random population, and C(0,1) represents the Cauchy mutation.
[0098] Further preferably, the differential evolution strategy includes three parts:
[0099] Mutation: In each iteration, the mutation process is to select three different particles in the population and generate new particles by the following formula;
[0100] V i =X i3 +F*(X i1 -X i2 );
[0101] Where V i For the new particle, X i1 , X i2 , X i3 are different individuals randomly selected from the population, F is the mutation factor, which controls the scaling of the difference vector;
[0102] Crossover: Select according to a certain probability, and the newly generated individuals cross with the current particles according to the following formula, otherwise, keep the original state;
[0103]
[0104] Where U i,j is the j-th dimension gene value of the new individual generated after the crossover operation, v i,j is the j-th dimension value of the mutation vector, x i,j is the j-th dimension value of the current population individual, CR is the crossover probability factor, j rand is a random probability;
[0105] Selection: Select according to the following formula, calculate the fitness of the new particles generated by mutation and crossover, compare them with the target particles, and retain the better particles;
[0106]
[0107] Where, X inew is a new particle, U i is the particle after mutation and crossover, X i is the current particle, f(Ui,G+1 ) is the fitness value of the particle after mutation and crossover, f(X i ) is the fitness value of the current particle.
[0108] A soil testing and formula fertilization system based on EDBKA-PID, comprising:
[0109] Soil testing and analysis module: accurately tests the nutrient content in the soil, and generates a suitable fertilization formula based on the collected soil data and the fertilizer requirements of the crops;
[0110] Fertilizer preparation module: accurately prepare liquid fertilizer according to the fertilization formula and store the prepared liquid fertilizer;
[0111] Intelligent control module, including: PID controller, sensor device;
[0112] Drip irrigation module: It is composed of a drip irrigation pipe network, through which the liquid fertilizer prepared by the fertilizer module is mixed with water and accurately transported to the roots of crops;
[0113] Monitoring and feedback module: monitors environmental factors such as soil moisture, temperature, crop growth conditions, etc., and feeds the data back to the soil testing and analysis module.
[0114] The intelligent control module and the drip irrigation module provide the above-mentioned liquid fertilizer flow control method.
[0115] A soil testing and formula fertilization method based on EDBKA-PID adopts the soil testing and formula fertilization system to carry out fertilization.
[0116] Since the method of irrigation and fertilization relies on experience, the utilization rate of water and fertilizer resources is not high, causing environmental pollution. Based on this, the PID-based liquid fertilizer control method and system and soil testing formula fertilization system described in the present invention are proposed. It is a liquid fertilizer control system based on soil testing formula and a flow control method of EDBKA optimizing PID parameters. The technical solution of the present invention adopts a method based on soil testing formula to self-distribute liquid fertilizer in the control system, making irrigation and fertilization more precise. The specific embodiments are as follows:
[0117] Example 1: Liquid fertilizer control system based on soil testing formula
[0118] System structure Figure 1 As shown, the following steps are included:
[0119] (1) Conduct soil testing and formulate formula
[0120] ① Before formulating fertilizer formulas, investigate soil conditions. Specifically, investigate the topography, drainage, soil type, soil thickness, soil texture, pH, organic matter content, and general fertility of the soil in the formulation area.
[0121] ② Collection and testing of soil samples: Soil samples were collected using a five-point sampling method in the formulation area. A representative sample was collected at a depth of 30 cm and geographically referenced using the Global Positioning System (GPS). The five collected soil samples were quartered to obtain 1 kg of formulation area soil sample. The soil samples were air-dried, crushed, sieved, and the general soil agrochemical analysis method was used to determine the soil nutrient content.
[0122] ③ Analyze the fertilizer requirements of crops. According to the growth characteristics and yield targets of the crops, analyze the nutrients required for the crops to grow throughout the year. Taking nitrogen application as an example, the formula for calculating nitrogen application is usually based on the Stanford formula principle, that is, the yield of crops is composed of two parts: the contribution of soil and the contribution of fertilizer. Specifically for the calculation of nitrogen fertilizer, the formula can be expressed as:
[0123] Nitrogen fertilizer requirement (pure) = (target yield × nutrient absorption per unit yield - soil nitrogen supply) / fertilizer utilization rate in the season.
[0124] More specifically, the formula can be expressed as:
[0125] Nitrogen fertilizer dosage (kg / mu) = (target yield × nutrient absorption per unit harvest - soil measured value × conversion coefficient) ÷ (fertilizer utilization rate × fertilizer nutrient content).
[0126] ⑤ Formulate a scientific fertilization formula based on soil nutrient test results and crop fertilizer requirement analysis to determine the types, amounts and proportions of various fertilizers.
[0127] ⑥ Evaluate the effect of fertilization, apply fertilizer according to the fertilization formula, observe the effect of fertilization during the growth of crops, and make necessary adjustments and optimization to the formula.
[0128] (2) Combine the method in (1) to build a liquid fertilizer control system based on soil testing and formulation
[0129] Based on the above-mentioned soil testing and crop fertilizer requirement analysis, intelligent algorithms and sensor technology are used to monitor and analyze soil nutrient content, crop growth conditions and environmental conditions in real time, so as to formulate a scientific and reasonable liquid fertilizer application plan and achieve precise application through the control system.
[0130] Combination Figure 1 The system mainly consists of the following parts:
[0131] Part 1: Soil testing and analysis module uses advanced soil testing instruments and methods to accurately test the nutrient content of nitrogen, phosphorus, potassium and trace elements in the soil. Based on the collected soil data and the fertilizer requirements of the crops, a suitable fertilization formula is generated.
[0132] The second part: the fertilizer preparation module, which accurately prepares liquid fertilizer according to the soil testing formula (i.e. the fertilization formula generated in the first part). The fertilizer tank stores the prepared liquid fertilizer and transports it to the fertilization device (i.e. the drip irrigation module) through the pipeline system.
[0133] The third part, the intelligent control module, includes: ① flow regulation, controlling the flow of liquid fertilizer to ensure uniform application of fertilizer, usually using PID controller to adjust the flow. ② sensor feedback, real-time monitoring of fertilizer flow rate, pressure and application amount to ensure that the system operates according to the set parameters.
[0134] The fourth part, the drip irrigation module, is composed of a drip irrigation network. The prepared liquid fertilizer is mixed with water through the drip irrigation pipes and accurately delivered to the roots of crops.
[0135] The fifth part, the monitoring and feedback module, monitors environmental factors such as soil moisture, temperature, and crop growth conditions, and feeds the data back to the system (i.e., the soil testing and analysis module). By real-time monitoring of crop growth and soil conditions, the fertilization plan can be dynamically adjusted to ensure optimal fertilizer utilization efficiency.
[0136] In the traditional liquid fertilizer control system based on soil testing formula, the accuracy is lacking because the traditional PID algorithm is used to establish a model in regulating the liquid fertilizer flow, and it is easy to fall into the local optimal solution during the search process, resulting in the inability to achieve more accurate liquid fertilizer flow control. The present invention designs a hybrid strategy to improve the PID algorithm and introduces the latest black-winged kite optimization algorithm. The black-winged kite optimization algorithm has significant characteristics, strong evolutionary potential, fast search speed and excellent optimization ability; and combined with elite operators and differential evolution strategies, it can effectively realize the precise control of liquid fertilizer flow. On the basis of Example 1, the method of water and fertilizer regulation is further defined, and the specific embodiments are as follows:
[0137] Example 2: Liquid fertilizer flow control method based on PID
[0138] Combination Figure 2 , the specific steps are as follows:
[0139] S10: In this process, the target fertilizer amount r(t) set by the system is used as input, and the actual fertilizer amount y(t) data collected by the flow sensor is transmitted to the control system. The control system calculates the deviation between the target fertilizer amount and the actual fertilizer amount, and transmits this deviation to the PID controller.
[0140] S20: The PID controller performs calculations based on the deviation to obtain an output signal.
[0141] S30: According to the output signal, the flow rate of the fertilizer liquid in the pipeline is adjusted through the frequency converter and the asynchronous motor, so as to achieve precise control of the fertilizer liquid flow rate.
[0142] Combination Figure 2-5 , the mathematical model of flow control in the water and fertilizer regulation process is as follows:
[0143] (1) System overall flow control function in water and fertilizer regulation system
[0144] ① Establishment of mathematical model of fertilizer outlet pipeline: Liquid fertilizer will gradually fill the fertilizer outlet pipeline until it reaches a stable state. This process can be regarded as a first-order inertia link with pure lag, that is, the linearized transfer function of the fertilizer outlet pipeline, and its formula is expressed as follows:
[0145] Where T1 is the inertia time constant of the fertilizer outlet pipeline, s is the Laplace transform variable, k1 is the gain constant of the fertilizer outlet pipeline, e is the exponential factor, and τ is the time lag constant of the fertilizer outlet pipeline.
[0146] ② Establishment of mathematical model of three-phase asynchronous motor: The electromagnetic inertia of the three-phase asynchronous motor is ignored, and the static working point is simplified and approximated using the linearization method. The linearized transfer function of the three-phase asynchronous motor is obtained, which is a first-order inertia link. Its formula is as follows:
[0147] Where T2 is the inertia time constant of the motor and k2 is the gain of the motor.
[0148] ③ Establishment of mathematical models of frequency converter and other links: The frequency converter is used to realize the soft start process of three-phase asynchronous motor. In this process, since the time constant of the frequency converter is much smaller than its lag time constant, the frequency converter can be approximately regarded as a proportional link. In addition, relay control and flow detection can also be regarded as proportional links. Therefore, the transfer function of the frequency converter and other parts in the flow control system can be equivalently expressed as a proportional link, and its formula is as follows:
[0149] G3(s)=k3; where k3 is the gain of the system's inverter and other links.
[0150] ④ Establishment of the overall flow control model of the system: In general, the mathematical model of the flow control system can be regarded as consisting of a first-order inertia link, a first-order inertia link with pure lag, and a proportional link. G(s) is the overall expression, describing the mathematical model of the dynamic behavior of the system. The transfer function G(s) is obtained by connecting the three parts in series in sequence. Its transfer function G(s) can be expressed as:
[0151]
[0152] Where k is the total system gain. K = k1 × k2 × k3.
[0153] Since the parameters of the flow control system transfer function are determined by the structure and parameters of the system itself, the parameters of the flow control system transfer function G(s) are determined once the system structure and hardware equipment are determined, and are not affected by other factors. Therefore, without considering external interference, the parameters k, T1, T2, and τ of the flow control system can be 450, 1, 5, and 60 respectively, that is, the transfer function of the system is:
[0154]
[0155] (2) G(s) transfer function and regulation process
[0156] 1) G(s) transfer function, its functions include:
[0157] ① System response description, G(s) expresses the relationship between the system input U(s) and output Y(s):
[0158] Y(s)=G(s)U(s)
[0159] It can be used to analyze the dynamic response of the system under different inputs (such as step, pulse, and sinusoidal signals).
[0160] ② Dynamic characteristics analysis: The system gain, time constants T1, T2 and lag time τ determine the system's rapidity, stability and oscillation characteristics. Through G(s), the system's poles, zeros, steady-state error, overshoot and other performance indicators can be calculated.
[0161] ③ Controller design basis: PID controller is designed based on the transfer function characteristics of the system. G(s) provides the dynamic characteristics of the system and helps to select appropriate control parameters (proportional K p , integral K i , differential K d ).
[0162] 2) Adjustment process of G(s) transfer function
[0163] G(s) transfer function, which realizes the regulation process in PID control:
[0164] The PID controller adjusts K p , K i , K d Parameters, adjust the system to achieve the ideal response effect. The specific steps are as follows:
[0165] ①The transfer function of PID controller:
[0166]
[0167] Among them, K p: Proportional gain, affecting the sensitivity of system response. K i : Integral gain, eliminates steady-state error, but may cause oscillation. K d : Differential gain, which improves the system response speed but is sensitive to noise.
[0168] ② Closed-loop system transfer function:
[0169] The PID controller and the system transfer function G(s) are connected in series, and feedback is introduced to form a closed loop. The formula is as follows:
[0170]
[0171] ③Parameter adjustment target:
[0172] By adjusting K p , K i , K d , achieving the following goals:
[0173] Rapidity: Improve response speed and reduce rise time.
[0174] Stability: Avoid overshoot and oscillation to ensure system stability.
[0175] Accuracy: Reduce steady-state error and improve the steady-state performance of the system.
[0176] (3) Elite differential evolution black kite algorithm optimizes PID control parameters
[0177] In order to solve the optimal combination of PID controller parameters, an elite differential evolution black kite algorithm (EDBKA) is proposed. The black kite algorithm is a swarm intelligence optimization method inspired by nature, and its design is inspired by the survival strategy of black kites. The algorithm has significant characteristics, strong evolutionary potential, fast search speed and excellent optimization ability, but it also faces the risk of falling into local optimal solutions. To overcome this challenge, elite operators and differential evolution strategies are introduced to effectively prevent the EDBKA algorithm from falling into local optimal solutions. Specifically, the present invention uses EDBKA to optimize the parameters (K p , K i , K d ) combination, thereby reducing the overshoot and adjustment time of the PID controller response curve and improving its control effect. Figure 3-5 , optimize the PID controller parameters in (1), the specific steps are as follows:
[0178] 1) Determine the encoding method of EDBKA, the initialization population and related parameters, and the parameter k of the PID controller p , k i , k dis a real number, and the algorithm iteration method of EDBKA is to update the spatial position of the black-winged kite, so EDBKA uses decimal encoding. Set the algorithm parameters: population size n, attack behavior state probability p, maximum number of iterations T, mutation probability r. For the PID controller parameter optimization problem, it is necessary to solve k p , k i , k d The optimal combination of parameters corresponds to the spatial position of the black-winged kite in three-dimensional space. The decimal code of the black-winged kite individual can be expressed as:
[0179] f i =[x, y, z]; where x is k p value, y is k i value, z is k d .
[0180] After determining the coding method of individual black-winged kites, the coding method of the black-winged kite population can be expressed as:
[0181] pop(i) = [x i ,y i , z i ]; where x i is the i-th k p Value, y i is the i-th k i Value, z i is the i-th k d value.
[0182] 2) Randomly generate the initial values (i.e. initial positions) of the PID parameters, using each group of K p , K i , K d The value of is solved according to the objective function to determine the optimal fitness and optimal position of the individual. That is, the population position is randomly initialized, and the optimal fitness value f and optimal position x of the individual are determined according to the objective function value at the position, that is, the best leader.
[0183] Calculate the EDBKA fitness. When evaluating the control effect of the water and fertilizer regulation process, the response time, overshoot and error of the flow control system are very critical. In view of this, the objective function is determined, that is, the fitness uses the time integral multiplied by the absolute error (ITAE) criterion as the evaluation index to reflect the rapid response and precise control ability of the control system. In order to further explore the performance of EDBKA, ITAE is set as its core objective function, and its calculation formula is expressed as follows:
[0184]
[0185] Where, e(t)=r(t)-y(t), is the deviation of the control system, r(t) is the expected input, y(t) is the system output, t is the time, and |e(t)| is the absolute value of the deviation.
[0186] 3) Attacking behavior: As a predator of small mammals and insects in grasslands, black-winged kites can adjust the angle of their wings and tail according to wind speed during flight, hover silently to observe prey, and then launch a swift dive attack. Before attacking, they show two main states: one is the attack preparation state of hovering in the air, and the other is the standby state of hovering in the air.
[0187] According to the probability of attack behavior, the circling or hovering state is selected for attack behavior, and then the best fitness and position of the black kite are found and updated according to the fitness. The following is a mathematical model that describes the attack behavior of the black kite:
[0188]
[0189] In the formula, Indicates the position of the black kite after the attack. represents the current position of the black-winged kite, r is a random number between 0 and 1, sin(r) is a random sine value, n is a step size control parameter, p is a probability constant for generating an attack behavior state, T is the total number of iterations, and t is the current number of iterations.
[0190] 4) Migration behavior: Determine whether the current population fitness is less than the random population fitness, and the best individual will lead the migration. Finally, find and update the individual's best fitness and position based on the fitness. Specific: Migration behavior. Bird migration is a complex behavior that is deeply restricted by environmental factors such as climate and food supply. In order to adapt to the change of seasons, black-winged kites migrate from north to south in winter to seek a better living environment and resources. During the migration process, the direction is usually guided by a leader with excellent navigation skills, which plays a key role in the success of group migration.
[0191] If the fitness of the current population is lower than that of the random population, the leader will take the initiative to give up the leadership position and integrate into the migrating population. This behavior indicates that it is not suitable to continue to lead the population forward. On the contrary, if the fitness of the current population is higher than that of the random population, the leader will continue to guide the population to the destination. This strategy can dynamically select excellent leaders to ensure the smooth completion of migration activities. The following is a mathematical model of the migration behavior of black-winged kites:
[0192]
[0193] In the formula, Indicates the location of the black-winged kite after migration. Indicates the current location of the black-winged kite. represents the leader position, m is the migration step parameter, F i is the current population fitness, F ri is the fitness of the random population, C(0,1) represents the Cauchy mutation, The phase of a random sine value domain is shifted by 90 degrees.
[0194] 5) Introduce elite operators to retain the best individuals in the current population and pass them directly to the next generation to avoid degradation in subsequent iterations. Then use differential evolution strategy to perform random mutation, crossover and selection operations on the current population to retain the individuals with the highest adaptability.
[0195] Elite operator: In order to shorten the search time, an elite operator is designed to replace the worst individuals to maintain excellent solutions in the population, thereby improving the efficiency of the algorithm, which makes the algorithm converge faster.
[0196] Differential evolution strategy: Differential evolution strategy consists of three parts: individual mutation, crossover and selection operations. The specific operations are as follows:
[0197] Mutation: In each iteration, the mutation process is to select three different particles in the population and generate new particles by the following formula;
[0198] V i =X i3 +F*(X i1 -X i2 )
[0199] Where V i For the new particle, X i1 , X i2 , X i3 are different individuals randomly selected from the population, and F is the mutation factor that controls the scaling of the difference vector.
[0200] Crossover: Select according to a certain probability, and the newly generated individuals cross with the current particles according to the following formula, otherwise, keep the original state;
[0201]
[0202] Where U i,j is the j-th dimension gene value of the new individual generated after the crossover operation, v i,j is the j-th dimension value of the mutation vector, x i,j is the j-th dimension value of the current population individual, CR is the crossover probability factor, j rand is a random probability.
[0203] Selection: Select according to the following formula, calculate the fitness of the new particles generated by mutation and crossover, compare them with the target particles, and retain the better particles;
[0204]
[0205] Where, X inew is a new particle, U i is the particle after mutation and crossover, X i is the current particle, f(U i,G+1 ) is the fitness value of the particle after mutation and crossover, f(X i ) is the fitness value of the current particle.
[0206] 8) Termination condition: During each iteration, EDBKA will check whether the termination condition is met, that is, whether the preset maximum number of iterations has been reached. Specifically, during each iteration, it is determined whether the preset maximum number of iterations has been reached. If yes, the global optimal point and the individual optimal point are output; otherwise, it returns to the above attack behavior.
[0207] The simulation results and the convergence speed comparison with other algorithms are shown in the figure below. Figure 6 As shown in the figure, the step response curve comparison with other algorithms is shown in Figure 7 As shown. Figure 6-7 It can be seen that the technical solution of the present invention realizes the self-distribution of liquid fertilizer, making irrigation and fertilization more precise and having a better control effect.
[0208] The beneficial effect of adopting the above technical solution is that the present invention provides a liquid fertilizer control system based on soil testing formula and a flow control method of EDBKA optimizing PID parameters. It aims at the problems of irrigation and fertilization relying on experience and the low precision of liquid fertilizer flow control in the prior art. The present invention proposes a liquid fertilizer control system based on soil testing formula to realize self-distribution of liquid fertilizer, so that irrigation and fertilization are more precise; at the same time, when regulating the flow of liquid fertilizer, the control effect of the traditional PID optimization algorithm is not ideal, and a hybrid strategy is designed to improve the PID algorithm, and the latest black-winged kite optimization algorithm is introduced. The algorithm has significant characteristics, strong evolutionary potential, fast search speed and excellent optimization ability, and introduces elite operators to further accelerate the convergence speed; introduces differential evolution local search strategy, updates the variable value of the solution, and jumps out of the local optimal solution.
[0209] The above is only a preferred embodiment of the embodiment of the present invention, and does not impose any form of limitation on the embodiment of the present invention. Any simple modification, equivalent changes and modifications made to the above embodiment based on the technical essence of the embodiment of the present invention are still within the scope of the technical solution of the embodiment of the present invention.
Claims
1. A liquid fertilizer flow control method based on EDBKA-PID, characterized in that: The following steps are involved: S10: Calculate the deviation between the target fertilizer application amount and the actual fertilizer application amount, and transmit the deviation to the PID controller; S20: The PID controller performs calculation according to the deviation to obtain an output signal; S30: According to the output signal, the fertilizing device adjusts the flow rate of the liquid fertilizer in the fertilizer outlet pipe through the frequency converter and the asynchronous motor, thereby achieving accurate control of the flow rate of the liquid fertilizer.
2. The liquid fertilizer flow control method according to claim 1, characterized in that: The overall flow control function of the system is as follows: G(s)=G1(s)G2(s)G3(s); Where G1(s) is the linearized transfer function of the fertilizer outlet pipe, G2(s) is the linearized transfer function of the three-phase asynchronous motor, and G3(s) is the transfer function of the inverter and other parts.
3. The liquid fertilizer flow control method according to claim 2, characterized in that: The linear transfer function of the fertilizer outlet pipeline is: Where, T1 is the inertia time constant of the fertilizer outlet pipeline, s is the Laplace transform variable, k1 is the gain constant of the fertilizer outlet pipeline, e is the exponential factor, and τ is the time lag constant of the fertilizer outlet pipeline; The linear transfer function of the three-phase asynchronous motor is: In the formula, T2 is the inertia time constant of the motor, and k2 is the gain constant of the motor; The transfer function of the frequency converter and other parts is: G3(s)=k3; wherein k3 is the gain constant of the frequency converter and other links of the system.
4. The liquid fertilizer flow control method according to claim 1, characterized in that: In the PID controller, EDBKA is used to adjust the PID parameter K p , K i , K d Make optimizations.
5. The liquid fertilizer flow control method according to claim 4, characterized in that: The optimization comprises the following steps: (1) Using decimal-coded EDBKA, set the algorithm parameters: population size pop, attack behavior state probability p, and maximum number of iterations T; (2) Randomly generate the initial values of PID parameters, using each group of K p , K i , K d The value of is solved according to the objective function to determine the optimal fitness and optimal position of the individual; (3) Attack behavior: According to the probability of attack behavior, hovering or hovering is selected to perform attack behavior, and then the best fitness and position of the black kite are found and updated according to the fitness; (4) Migration behavior: Determine whether the current population fitness is less than the random population fitness, and let the best individual lead the migration, and then find and update the individual's best fitness and position based on the fitness; (5) Introduce the elite operator to replace the worst individual in the current iteration with the best individual after the previous iteration, and then perform the differential evolution strategy to retain the individual with the highest adaptability; (6) During each iteration, determine whether the preset maximum number of iterations has been reached. If so, output the global optimal point and the individual optimal point; otherwise, return to the aforementioned attack behavior.
6. The liquid fertilizer flow control method according to claim 5, characterized in that: The objective function, i.e., fitness, uses the time integral multiplied by the absolute error criterion as the evaluation index, and its formula is as follows: Where, e(t)=r(t)-y(t), is the deviation of the control system, r(t) is the expected input, y(t) is the system output, t is the time, and |e(t)| is the absolute value of the deviation.
7. The liquid fertilizer flow control method according to claim 5, characterized in that: The attack behavior is formulated as follows: In the formula, Indicates the position of the black kite after the attack. represents the current position of the black-winged kite, r is a random number between 0 and 1, n is the step size control parameter, p is the probability constant for generating an attack behavior state, T is the total number of iterations, and t is the current number of iterations; The formula for the migration behavior is as follows: In the formula, Indicates the location of the black-winged kite after migration. Indicates the current location of the black-winged kite. represents the leader position, m is the migration step parameter, F i is the current population fitness, F ri is the fitness of the random population, and C(0,1) represents the Cauchy mutation.
8. The liquid fertilizer flow control method according to claim 5, characterized in that: The differential evolution strategy includes three parts: Mutation: In each iteration, the mutation process is to select three different particles in the population and generate new particles by the following formula; V i =X i3 +F*(X i1 -X i2 ); Where V i For the new particle, X i1 , X i2 , X i3 are different individuals randomly selected from the population, F is the mutation factor, which controls the scaling of the difference vector; Crossover: Select according to a certain probability, and the newly generated individuals cross with the current particles according to the following formula, otherwise, keep the original state; Where U i,j is the j-th dimension gene value of the new individual generated after the crossover operation, v i,j is the j-th dimension value of the mutation vector, x i,j is the j-th dimension value of the current population individual, CR is the crossover probability factor, j rand is a random probability; Selection: Select according to the following formula, calculate the fitness of the new particles generated by mutation and crossover, compare them with the target particles, and retain the better particles; Where, X inew is a new particle, U i is the particle after mutation and crossover, X i is the current particle, f(U i,G+1 ) is the fitness value of the particle after mutation and crossover, f(X i ) is the fitness value of the current particle.
9. A soil testing and fertilization system based on EDBKA-PID, characterized in that: include: Soil testing and analysis module: accurately tests the nutrient content in the soil, and generates a suitable fertilization formula based on the collected soil data and the fertilizer requirements of the crops; Fertilizer preparation module: accurately prepare liquid fertilizer according to the fertilization formula and store the prepared liquid fertilizer; Intelligent control module, including: PID controller, sensor device; Drip irrigation module: It is composed of a drip irrigation pipe network, through which the liquid fertilizer prepared by the fertilizer module is mixed with water and accurately transported to the roots of crops; Monitoring and feedback module: monitors soil moisture, temperature, crop growth conditions and other environmental factors, and feeds the data back to the soil testing and analysis module; The intelligent control module and drip irrigation module adopt the liquid fertilizer flow control method described in any one of claims 1-8.
10. A soil testing and fertilization formula method based on EDBKA-PID, characterized in that: Fertilization is carried out using the soil testing and formula fertilization system described in claim 9.
Citation Information
Cited By
Field potato drip irrigation and fertilization method and system based on feedback control
CN120476807A
Feedback control-based drip irrigation fertilization method and system for field potatoes
CN120476807B
