A multi-input model-compensated pesticide application control system and method for plant protection robots
By using a multi-input model-compensated pesticide application control system for plant protection robots, and leveraging AI edge computing and adaptive feedback control, precise spraying is achieved. This solves the problems of pesticide waste and uneven application in traditional plant protection robot application processes, thereby improving agricultural production efficiency and environmental protection.
Patent Information
- Application Number
- CN202411985658.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Traditional plant protection robots suffer from problems such as pesticide waste and uneven application during application. They cannot accurately allocate spraying volume based on geographical information and crop conditions, which increases costs and has adverse environmental impacts.
The plant protection robot spraying control system adopts a multi-input model compensation approach. It utilizes a deep learning model from an AI edge computing platform to identify target objects in real time. Combined with a dynamic pre-adjustment strategy for the virtual line of the spray boom and an adaptive feedback control method, it dynamically optimizes the spraying trigger timing to ensure accurate coverage of target crops and reduce pesticide waste.
It has enabled precise pesticide application, reduced pesticide waste, decreased environmental pollution, improved agricultural production efficiency and sustainability, and promoted the development of smart agriculture and green agriculture.
Smart Images

Figure CN119817551B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural plant protection technology, specifically to a multi-input model compensation plant protection robot spraying control system and control method. Background Technology
[0002] A plant protection robot is a robot used for the prevention and control of crop diseases and pests. It can perform tasks such as fertilizing, spraying pesticides, and monitoring diseases and pests according to the needs of crops.
[0003] Traditional plant protection robots often suffer from pesticide waste and uneven application during application, and cannot accurately allocate spraying volume based on geographical information and crop conditions. This not only increases costs but also has adverse environmental impacts. Therefore, it is necessary to design a multi-input model-compensated plant protection robot application control system and method. Summary of the Invention
[0004] The purpose of this invention is to provide a multi-input model-compensated plant protection robot spraying control system and control method to solve the problems mentioned in the background art.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a multi-input model compensation plant protection robot spraying control system, including an upper computer input system, a lower computer controller and a spraying system;
[0006] The host computer input system is based on the image processing unit of the AI edge computing platform. It uses a deep learning model to perform target recognition and extract key information of the target in real time, including boundary, center position, density, crop size and growth status, health status and other information.
[0007] The lower-level controller receives target information transmitted from the upper-level controller and adopts a dynamic pre-adjustment strategy for the virtual line of the spray boom. It dynamically controls the actuators based on the real-time vehicle speed, sensor data of the spraying system, and key information of the target crop or weeds to achieve precise target spraying.
[0008] The drug delivery system includes a drug tank, a plunger pump, a flow sensor, a pressure sensor, a switching valve, an electric ball valve, an overflow valve, a PWM proportional solenoid valve, and a nozzle array.
[0009] In a further embodiment, the dynamic pre-adjustment strategy of the virtual spray bar combines vehicle speed, spray valve opening delay, and droplet landing time to dynamically optimize the spraying trigger timing, ensuring accurate coverage of target crops under different operating conditions, maximizing pesticide utilization and reducing waste; the host computer input system continuously calculates and adjusts the pre-adjustment amount based on real-time data to ensure that the system can accurately trigger the spraying operation under various environmental conditions.
[0010] In a further embodiment, the image processing unit is powered by an AI edge computing platform, equipped with a deep learning model, and performs real-time image processing and target recognition based on visual recognition and dynamic control strategies. It also optimizes image analysis and data processing through parallel computing acceleration technology to ensure high real-time performance and high accuracy of image recognition, adapting to the accurate recognition and dynamic control of different types of targets.
[0011] In a further embodiment, during target spraying, a high-precision positioning system combined with real-time motion status feedback is used to dynamically adjust the timing of the spraying operation to ensure accurate spraying of the target.
[0012] A method for controlling pesticide application in a plant protection robot using a multi-input model compensation method includes the following steps:
[0013] S1. Construct a control model for flow and pressure;
[0014] S2. Control the water pump and electric ball valve;
[0015] S3. Perform PWM-controlled nozzle flow and pressure stabilization control;
[0016] S4. A multi-level adaptive feedback control method based on model compensation uses the target values of the prescription map input system and the visual target input system as the control reference. It controls three types of components: water pump speed, electric ball valve opening, and PWM proportional solenoid valve duty cycle to achieve pressure stability and flow control for each nozzle. Through closed-loop feedback, the flow and pressure are adjusted to ensure uniform and efficient drug application.
[0017] In a further embodiment, in step S1, the control model for flow rate and pressure is constructed as follows:
[0018] 1) Constructing a nozzle flow rate model:
[0019] Nozzle flow rate Q nozzle The duty cycle D of the PWM proportional solenoid valve and the main pipeline pressure P are affected. supply The dual control is calculated as follows:
[0020]
[0021] Where, k Q is the flow gain coefficient, which is related to the nozzle structure parameters; D is the duty cycle of the PWM proportional solenoid valve, ranging from [0,1]; P supply To alleviate the pressure on the main road;
[0022] 2) Distribute the system target flow rate and nozzle flow rate:
[0023] In the absence of a prescription map input system and a visual target input system, a fixed application rate per acre is used, with a target flow rate Q. requiredThe amount of pesticide applied per unit area, Q target The spray boom width W and vehicle speed v are determined and calculated as follows:
[0024] Q required =Q target ·W·v;
[0025] When there is a prescription map output system and a visual target input system, Q required It equals the sum of the target flow rates of all nozzles.
[0026] In a further embodiment, in step S2, the water pump and the electric ball valve are controlled as follows:
[0027] 1) Model the pesticide application system:
[0028] The relationship between pump flow rate and pump speed is as follows:
[0029] Q pump =k pump ·n pump ;
[0030] Establish the flow rate and opening degree V of the electric valve return water tank valve and the pressure P of the main road supply Nonlinear relationship between them:
[0031] Q recirculated =k valve ·(V valve ) α ·(P supply ) β ;
[0032] The total flow rate of the main pipeline is the pump flow rate minus the return flow rate of the electric valve to the water tank. Total flow rate of the main pipeline:
[0033] Q total =k pump ·n pump -k valve ·(V valve ) α ·(P supply ) β ;
[0034] Among them, the opening degree V of the electric valve valve The main pipeline pressure P is obtained through the sensor or control signal of the electric valve. supply Q is obtained through a pressure sensor. total The flow rate is obtained by a flow sensor installed on the main pipeline. In the absence of a flow sensor, the total flow rate of the main pipeline is calculated using the above formula.
[0035] 2) Adaptive control calculation:
[0036] Flow error EQ for:
[0037] E Q =Q required -Q total ;
[0038] The control law for the water pump speed is:
[0039]
[0040] K feedback A user-customizable feedback coefficient;
[0041] The opening control law of the electric valve is:
[0042]
[0043] Among them, K robust Let be the robust gain, and λ be a constant for adjusting the feedback rate. To optimize the opening control of the electric valve, robust feedback is added to the time derivative of the error.
[0044] 3) Control gain update:
[0045] In order to make the gain k valve k pump Furthermore, the unknown nonlinear parameters α and β can be adaptively adjusted. An error-based online update algorithm is designed, and the specific gain update is as follows:
[0046] (1) Pump gain update:
[0047]
[0048] (2) Electric valve gain update:
[0049]
[0050] (3) Adaptive parameter update:
[0051] For α and β, their values are dynamically adjusted by controlling the feedback of error and flow rate, based on the main pipeline flow rate Q. total The sensitivity is as follows:
[0052]
[0053] in, and The sensitivity coefficients for α and β are calculated as follows:
[0054]
[0055] Among them, γ1, γ2, γ3 and γ4 are adaptive gains used to adjust the learning rate.
[0056] In a further embodiment, in step S3, the image analysis and data processing involves control calculations for two input scenarios: prescription map and visual target targeting. During prescription map-based drug application and visual target targeting-based drug application, the target flow rate Q of each nozzle is... nozzle,i,target1 and Q nozzle,i,target2 Adjustments are made based on different inputs, as follows:
[0057] 1) Setting the target flow rate for each nozzle:
[0058] Prescription map application: Based on the latitude and longitude of the nozzle (x i ,y i The target flow rate Q for each nozzle is obtained by analyzing the prescription diagram. nozzle,i,target1 ,Right now:
[0059] Q nozzle,i,target1 =f prescription (x i ,y i );
[0060] Vision-based targeted pesticide application: Based on crop density and three-dimensional structure (ρ) identified by a visual system... i ,h i ), calculate the target flow rate Q for each nozzle. nozzle,i,target2 ,Right now:
[0061] Q nozzle,i,target2 =g visual (ρ i ,h i );
[0062] 2) Calculation of flow rate error for each nozzle:
[0063] For each nozzle, the flow error ΔQ is calculated in real time. i :
[0064] ΔQ i =Q nozzle,i,target -Q nozzle,i,actual
[0065] Among them, Q nozzle,i,target Q is calculated using a prescription map or visual system. nozzle,i,actual It can be estimated through pressure and duty cycle or measured directly;
[0066] 3) Calculation of duty cycle adjustment for each nozzle:
[0067] Based on real-time flow error and target flow, the duty cycle D of the PWM proportional solenoid valve corresponding to the nozzle is adjusted through adaptive control. i,new,as follows:
[0068]
[0069] Where, ΔQ i It is flow error; K p It is an adaptive gain; P supply It is the real-time main pipeline pressure; P set It sets the pressure;
[0070] To address the dynamic changes in the environment and system uncertainties, a compensation term based on stress feedback is added, and robust control is further enhanced. The adjusted duty cycle is:
[0071]
[0072] Where K robust It is a robust gain, which allows the controller to be more adaptable to disturbances and parameter uncertainties;
[0073] 4) Automatic adjustment of gain parameters:
[0074] Based on the flow error ΔQ i and pressure error ΔP i To update gain K p,i,new :
[0075] K p,i,new =K p,i,old +μ p,i ·(ΔQ i ·ΔP i )
[0076] Among them, K p,i,new For the updated gain parameter; K p,i,old The gain parameter before the update; μ p,i The learning rate is used for gain adjustment to control the size of the update step, ensuring smooth updates and avoiding system instability;
[0077] ΔQ i =Q target,i -Q actual,i , where is the flow error of the i-th nozzle, and the target flow rate Q is... target,i and actual traffic Q actual,i The difference between them; ΔP i =P set -P supply,i Let P be the pressure error of the i-th nozzle. set and real-time pressure P supply,i The differences between them;
[0078] Learning rate μ for gain adjustment p,iAdjustments are made based on the system's response. Generally, a smaller learning rate reduces system oscillations, while a larger learning rate accelerates convergence. The learning rate is adjusted as follows:
[0079]
[0080] Where, μ 0,i α is the initial learning rate; i ΔQ is the learning rate decay factor, used to adjust the learning rate based on the magnitude of flow and pressure errors. i and ΔP i These are flow rate error and pressure error, respectively.
[0081] 5) Updated gain calculation:
[0082] Gain K per nozzle p,i,new The calculation is as follows:
[0083]
[0084] Estimated gain K p,i,new Substituting these values into the formula for the controller above, the duty cycle signal of the PWM proportional solenoid valve corresponding to each nozzle is obtained as follows:
[0085]
[0086] The algorithm dynamically adjusts the difference between the target flow rate and the actual flow rate of each nozzle, and uses adaptive gain to adjust the duty cycle, ensuring that the nozzle can accurately control the flow rate in different application scenarios to achieve the effect of precise application.
[0087] The actual flow rate of each nozzle is adjusted by the duty cycle of the PWM proportional solenoid valve, and combined with pressure feedback, dual control of flow rate and pressure is achieved.
[0088] In a further embodiment, in step S3, for drug administration control when neither a prescription map nor visual information is available, the calculation based on nozzle pressure compensation and local gain adjustment is as follows:
[0089] 1) Nozzle pressure feedback:
[0090] Pressure differences at each nozzle can lead to different flow rates. Therefore, for each nozzle, local pressure feedback is used to correct the duty cycle. The pressure difference at each nozzle is determined by P. nozzle,i This means that the corrected duty cycle of each nozzle is dynamically adjusted based on its pressure difference;
[0091] Introducing global gain K global To adjust the control output of each nozzle and ensure that the flow rate of the entire system meets the target requirements, this is achieved by weighting based on the local duty cycle, as follows:
[0092]
[0093] 2) Adaptive control calculation:
[0094] A neural network adaptive algorithm is used to dynamically adjust the gain K. global A neural network model is introduced to estimate the pressure difference of the nozzle, and the gain is automatically adjusted based on real-time flow error and pressure feedback. The gain is calculated as follows:
[0095]
[0096] Among them, K global α is the current value of the global gain; α is the learning rate. It is the gradient of the loss function with respect to the gain;
[0097] The loss function J is the sum of squares of the flow error or other suitable performance metrics, and is calculated as follows:
[0098]
[0099] 3) The comprehensive control equation for nozzle flow rate and pressure stability is as follows:
[0100]
[0101] In a further embodiment, the duty cycle is adjusted by real-time flow error to ensure that the nozzle flow rate is close to the target value and to perform closed-loop flow control. At the same time, the duty cycle is dynamically adjusted based on the real-time pressure feedback of each nozzle to compensate for pressure differences and optimize the nozzle spraying effect. An adaptive algorithm is used for online gain adjustment to improve the adaptability and robustness of the system.
[0102] Compared with existing technologies, the beneficial effects achieved by this invention are as follows: Precision prescription map application accurately calculates the amount of pesticide needed by crops and precisely allocates the spraying amount based on geographical information and crop conditions. Visual target application utilizes real-time image recognition technology to dynamically adjust the spraying amount, ensuring that the pesticide only acts on the target crop and avoiding waste. By introducing model compensation and online adaptive algorithms, the system can dynamically adjust the control gain based on real-time monitored parameters such as flow rate and pressure to cope with the uncertainty and nonlinear changes in pesticide application in complex environments. This promotes the advancement of precision application technology in the agricultural field, reduces pesticide use, reduces environmental pollution, and improves the efficiency and sustainability of agricultural production, providing important technical support for promoting the development of smart agriculture and green agriculture. Attached Figure Description
[0103] Figure 1 This is a flowchart of the application control method of the present invention;
[0104] Figure 2This is a schematic diagram of the drug delivery system of the present invention;
[0105] Figure 3 This is a flowchart of the target spraying system of the present invention;
[0106] Figure 4 This is a schematic diagram of the field of view division for targeted drug delivery images according to the present invention;
[0107] Figure 5 This is a schematic diagram of the target application and collision decision algorithm of the present invention. Detailed Implementation
[0108] In the following description, numerous specific details are set forth in order to provide a more thorough understanding of the invention. However, it will be apparent to those skilled in the art that the invention can be practiced without one or more of these details. In other instances, certain technical features well-known in the art have not been described in order to avoid obscuring the invention.
[0109] Please see Figure 1-Figure 5 The present invention provides a technical solution: a multi-input model compensation plant protection robot spraying control system, including an upper computer input system, a lower computer controller and a spraying system;
[0110] The host computer input system is based on the image processing unit of the AI edge computing platform. It uses a deep learning model to perform target recognition and extract key information of the target in real time, including boundary, center position, density, crop size and growth status, health status and other information. The target includes crops, weeds, pests and other pests.
[0111] The lower-level controller receives target information transmitted from the upper-level controller and adopts a dynamic pre-adjustment strategy for the virtual line of the spray boom. It dynamically controls the actuators based on the real-time vehicle speed, the sensor data of the spraying system, and the key information of the target crop or weeds to achieve precise spraying. The actuators include three types of components: water pump speed, electric ball valve opening, and PWM proportional solenoid valve duty cycle.
[0112] The application system includes a medicine tank, a plunger pump, a flow sensor, a pressure sensor, a switching valve, an electric ball valve, a relief valve, a PWM proportional solenoid valve, and a nozzle array.
[0113] In a further embodiment, the dynamic pre-adjustment strategy of the virtual spray bar line combines vehicle speed, spray valve opening delay and droplet landing time to dynamically optimize the spray triggering timing, ensuring accurate coverage of target crops under different operating conditions, maximizing pesticide utilization and reducing waste; the host computer input system continuously calculates and adjusts the pre-adjustment amount based on real-time data to ensure that the system can accurately trigger the spraying operation under various environmental conditions.
[0114] The system divides the field of view of the binocular camera into N regions, such as... Figure 4 As shown, each area corresponds to a nozzle, thereby achieving independent spraying control. The image acquisition device collects image data of the crop area in front in real time and transmits the data to the AI edge computer for processing. The platform subscribes to the image data stream under the ROS framework, executes the target recognition model, and identifies the position and size of the target crop in each area in real time, providing accurate location information for spraying decisions.
[0115] like Figure 5 As shown, the virtual horizontal line represents the position of the spray boom in the binocular camera image coordinate system. The target detected in the image is matched with the nozzle on the spray boom to generate a solenoid valve control data frame, thereby precisely controlling the nozzle to spray the target. The virtual horizontal line divides the field of view into n+1 regions by n spray area boundary lines. Each horizontal line is divided into several segments by the spray area boundary line. Each spray interval corresponds to the number of solenoid valves on the spray boom, and the length of each region is the average spray width of each solenoid valve.
[0116] As the sprayer moves forward, the ground image moves downward. The host computer (AI edge computer) uses a deep learning target detection algorithm to detect and draw the predicted bounding box of the target in real time. The virtual horizontal line is used to determine whether the target has entered the spraying area. When the predicted bounding box intersects with the virtual horizontal line of the spray boom in the image, it means that the target has entered the corresponding spraying area. The spraying timing is determined based on the intersection of the virtual horizontal line of the spray boom in the image and the target crop position.
[0117] When the line connecting the midpoint of the target crop prediction box intersects the virtual horizontal line of the pre-adjusted spray boom in the image, the system's deep learning model predicts the target information in each spraying area, including the boundary, center position, density, crop size, growth status, and health status. Through the communication interface, the pixel area data is transmitted to the lower-level controller. After receiving the data, the lower-level controller converts it into the nozzle target flow signal for the corresponding area. The nozzle target flow value is positively correlated with the target information, and the mapping relationship between the two is obtained through regression of experimental data. Through this mechanism, the system can adjust the spraying amount in real time according to the crop size to ensure precise application.
[0118] To ensure target accuracy, the system employs a dynamic pre-adjustment strategy for the virtual spray line. Due to the influence of vehicle speed, the virtual line needs to be dynamically pre-adjusted based on vehicle speed, spray valve opening time, and droplet descent time. As vehicle speed increases, the pre-adjustment amount of the virtual line increases accordingly to trigger the spraying operation earlier and avoid spraying delays. At the same time, the spray valve opening response time and the time required for the pesticide to be sprayed from the nozzle also affect the pre-adjustment amount, ensuring that the pesticide is accurately sprayed above the target crop.
[0119] Physical Pre-distance Dphys It is the physical distance between the spray boom and the camera, determined by the vehicle's speed v. car Spray valve opening time t open and the time t of fog droplets fall To calculate this, the physical lead distance refers to the actual distance from the reference point in the camera coordinate system to the bottom of the spray boom. The calculation formula is as follows:
[0120] D phys =v car ×(t open +t fall )
[0121] Among them, v car It is the vehicle speed; t open It is the spray valve opening time; t fall It is the average fall time of fog droplets;
[0122] To convert the physical leading distance to the leading pixel distance in the image coordinate system, the camera's geometry is used. Without relying on the depth map, the camera's focal length is assumed to be f, and the ground projection width along the robot's forward direction, i.e., the field of view width, is W. view Then the distance of the front pixel is D pix Physical distance D phys The relationship between them is:
[0123]
[0124] Where f is the focal length of the camera; D phys It is the physical preceding distance; W view It is the width of the camera's field of view; D pix It is the pixel distance of the front distance in the image coordinate system.
[0125] The virtual line's pre-adjustment mechanism dynamically optimizes the spraying trigger timing by combining vehicle speed, spray valve opening delay, and droplet landing time. This ensures accurate coverage of target crops under different operating conditions, maximizing pesticide utilization and reducing waste. The host computer continuously calculates and adjusts the pre-adjustment amount based on real-time data, thereby ensuring that the system can accurately trigger spraying operations under various environmental conditions.
[0126] Through the above hardware design and control strategies, the system can achieve efficient and precise spraying control in complex field environments. The combination of global decision-making by the host computer and precise execution by the slave controller ensures the real-time performance and accuracy of spraying operations, reduces pesticide waste, and meets the high requirements of precision agriculture for operational precision and efficiency.
[0127] In a further embodiment, the image processing unit is handled by an AI edge computing platform, equipped with a deep learning model. Based on visual recognition and dynamic control strategies, it performs real-time image processing and target recognition, and optimizes image analysis and data processing through parallel computing acceleration technology to ensure high real-time performance and high accuracy of image recognition, adapting to the accurate recognition and dynamic control of different types of targets.
[0128] The system uses an Intel D435i binocular camera as the image acquisition device, which has high-resolution depth perception capabilities, a built-in IMU and a wide dynamic range sensor. It can provide clear images under strong or low light conditions. Through depth perception technology, the camera can accurately acquire distance information of the target crop. The camera is installed parallel to the ground and dynamically adjusts the field of view according to the robot's movement path to ensure full coverage of the crop area and provide high-quality visual input for subsequent target recognition.
[0129] The target recognition model is based on a deep learning model, including YOLO and Unet. It is developed using Python or C and deployed on a host computer. The model efficiently identifies target crops through real-time image processing to ensure spraying accuracy. During training, the deep learning model uses a large amount of labeled data for supervised learning, mainly including crop images, soil and open area annotations, to ensure that the model can accurately distinguish crops from the background in a complex environment.
[0130] The training data includes diverse samples with different lighting conditions, crop density, and shape. After data augmentation, the data is input into the deep learning model for training. The model training optimizes the recognition accuracy by gradually adjusting the weights of the convolutional neural network, ensuring that it can cope with crop recognition tasks in different environments. The training process adopts cross-validation and real-time feedback mechanisms to optimize the model's generalization ability, enabling it to work stably under various complex lighting and environmental conditions.
[0131] During the deployment phase, the deep learning model is integrated into the host computer software, which mainly realizes real-time image processing, environmental adaptive adjustment, and target data transmission. The host computer receives the real-time image stream from the binocular camera and uses the deep learning model to segment the image into target crops, soil, and open areas. It identifies the location, shape, and size of the target crops in real time. The identification results include feature information such as crop area, area, and density, and are transmitted to the slave computer through the RS232 interface.
[0132] To cope with changes in lighting conditions, the host computer software implements automatic exposure adjustment and image contrast enhancement, ensuring recognition stability under both strong and weak light conditions. This environmental adaptability processing enables the system to maintain high recognition accuracy under dynamically changing lighting conditions. The identified target data not only helps the spraying system to accurately locate crops, but also optimizes the spraying amount and coverage of the pesticide solution, reducing pesticide waste.
[0133] In a further embodiment, during target spraying, a high-precision positioning system combined with real-time motion status feedback is used to dynamically adjust the timing of the spraying operation to ensure accurate spraying of the target.
[0134] The lower-level controller hardware design is based on the DSP C2000 series MCU, integrating multiple functional modules to ensure high-precision spraying control and real-time data processing. The core functional modules include an ADC module, an EQEP module, a PWM module, a GPIO interface, and an RS232 communication interface. These modules work together to achieve precise pressure and flow acquisition and control.
[0135] Pressure sensor data acquisition: The lower-level computer acquires pressure sensor data in real time through an integrated ADC module. The MCU provides a 16-bit resolution ADC with a sampling rate of up to 1.1 MSPS per ADC channel and supports up to 12 external input channels. This high-precision data helps the system monitor the pressure changes of the pesticide application system in real time, ensuring the stability and uniformity of the spraying process. Accurate pressure monitoring provides reliable data support for controlling the spraying accuracy.
[0136] Flow sensor data acquisition: The EQEP module (Enhanced Quadrature Encoder Pulse) is used to acquire feedback data from the flow sensor. The EQEP module provides high-precision flow feedback, which helps the controller to accurately adjust the spray volume. Through this feedback, the system can adjust the nozzle flow in real time to ensure the consistency and accuracy of the spraying effect and reduce pesticide waste.
[0137] Communication and control signal transmission: The lower-level machine transmits data to the upper-level machine via the RS232 interface to ensure timely transmission of control signals. It is responsible for receiving target recognition data transmitted from the AI edge computer and accurately controlling the opening and closing of the nozzles according to the position and size of the target crop. The PWM control signal of each nozzle is precisely adjusted by the lower-level machine controller. The PWM module generates high-precision control signals to adjust the opening and closing of the nozzles and control the spraying volume of the liquid. The fine PWM signal control allows the spraying volume to be adjusted in real time according to the needs.
[0138] Proportional flow valve control: The system uses GPIO pins to link with MOS transistor amplifier circuits to precisely control the proportional flow valve. The GPIO pins receive signals generated by the MCU, and the MOS transistor amplifies the signals to drive the opening of the proportional flow valve, ensuring that the flow rate and pressure are precisely controllable during the spraying process. This ensures that each nozzle is precisely adjusted based on real-time feedback data, avoiding waste of pesticide and damage to crops.
[0139] Enhanced PWM Module: The controller is equipped with 24 enhanced PWM channels, enabling precise control of flow rate and pressure during spraying. By adjusting the PWM frequency and duty cycle, the system can finely control the spray volume from the nozzles, ensuring the uniformity and stability of the pesticide distribution. The high-resolution PWM channels ensure the nozzle's response speed and accuracy, adapting to dynamically changing spraying needs.
[0140] A method for controlling pesticide application in a plant protection robot using a multi-input model compensation method includes the following steps:
[0141] S1. Construct a control model for flow and pressure;
[0142] S2. Control the water pump and electric ball valve;
[0143] S3. Perform PWM-controlled nozzle flow and pressure stabilization control;
[0144] S4. A multi-level adaptive feedback control method based on model compensation uses the target values of the prescription map input system and the visual target input system as the control reference. It controls three types of components: water pump speed, electric ball valve opening, and PWM proportional solenoid valve duty cycle to achieve pressure stability and flow control for each nozzle. Through closed-loop feedback, the flow and pressure are adjusted to ensure uniform and efficient drug application.
[0145] The flow rate of the nozzles is regulated by PWM solenoid valves. The duty cycle and flow rate have a non-linear functional relationship. The flow rate target of each nozzle is determined by prescription map variable dosing or visual target dosing strategy. During the spraying process, the actual flow rate of each nozzle is measured in real time and the flow rate error is calculated. The flow rate is made close to the expected value by adjusting the duty cycle of the nozzles. In addition, the duty cycle of the nozzles is dynamically adjusted based on the real-time pressure of the main pipeline to ensure that the flow rate is not affected by pressure fluctuations.
[0146] In a further embodiment, in step S1, the control model for flow rate and pressure is constructed as follows:
[0147] 1) Constructing a nozzle flow rate model:
[0148] Nozzle flow rate Q nozzle The duty cycle D of the PWM proportional solenoid valve and the main pipeline pressure P are affected. supply The dual control is calculated as follows:
[0149]
[0150] Where, k Q is the flow gain coefficient, which is related to the nozzle structure parameters; D is the duty cycle of the PWM proportional solenoid valve, ranging from [0,1]; P supply To alleviate the pressure on the main road;
[0151] 2) Distribute the system target flow rate and nozzle flow rate:
[0152] In the absence of a prescription map input system and a visual target input system, a fixed application rate per acre is used, with a target flow rate Q. required The amount of pesticide applied per unit area, Q target The spray boom width W and vehicle speed v are determined and calculated as follows:
[0153] Q required =Q target ·W·v;
[0154] When there is a prescription map output system and a visual target input system, Q required It equals the sum of the target flow rates of all nozzles.
[0155] In a further embodiment, in step S2, the water pump and the electric ball valve are controlled as follows:
[0156] 1) Model the pesticide application system:
[0157] The relationship between pump flow rate and pump speed is as follows:
[0158] Q pump =k pump ·n pump ;
[0159] Establish the flow rate and opening degree V of the electric valve return water tank valve and the pressure P of the main road supply Nonlinear relationship between them:
[0160] Q recirculated =k valve ·(V valve ) α ·(P supply ) β ;
[0161] The total flow rate of the main pipeline is the pump flow rate minus the return flow rate of the electric valve to the water tank. Total flow rate of the main pipeline:
[0162] Q total =k pump ·n pump -k valve ·(V valve ) α ·(P supply )β ;
[0163] Among them, the opening degree V of the electric valve valve The main pipeline pressure P is obtained through the sensor or control signal of the electric valve. supply Q is obtained through a pressure sensor. total The flow rate is obtained by a flow sensor installed on the main pipeline. In the absence of a flow sensor, the total flow rate of the main pipeline is calculated using the above formula.
[0164] 2) Adaptive control calculation:
[0165] Flow error E Q For: E Q =Q required -Q total ;
[0166] The control law for the water pump speed is:
[0167]
[0168] K feedback A user-customizable feedback coefficient;
[0169] The opening control law of the electric valve is:
[0170]
[0171] Among them, K robust Let be the robust gain, and λ be a constant for adjusting the feedback rate. To optimize the opening control of the electric valve by adding robust feedback to the time derivative of the error, the opening control of the electric valve should not only consider model compensation (adaptive adjustment of gain), but also adjust the control input according to the flow error and error change, so as to enhance the stability and robustness of the system.
[0172] 3) Control gain update:
[0173] In order to make the gain k valve k pump Furthermore, the unknown nonlinear parameters α and β can be adaptively adjusted. An error-based online update algorithm is designed, and the specific gain update is as follows:
[0174] (1) Pump gain update:
[0175]
[0176] (2) Electric valve gain update:
[0177]
[0178] (3) Adaptive parameter update:
[0179] For α and β, their values are dynamically adjusted by controlling the feedback of error and flow rate, based on the main pipeline flow rate Q. total The sensitivity is as follows:
[0180]
[0181] in, and The sensitivity coefficients for α and β are calculated as follows:
[0182]
[0183] Among them, γ1, γ2, γ3, and γ4 are adaptive gains used to adjust the learning rate; through the above adaptive update, the opening control law of the electric valve updates the gain parameters in real time, i.e., the pump gain k. pump Electric valve gain k valve Furthermore, the unknown nonlinear parameters α and β can be adjusted in real time according to the control error, thereby achieving precise flow control. The introduction of robust feedback terms enables the control system to better cope with external disturbances, uncertainties in system parameters, and model errors, thus enhancing the robustness and stability of the system.
[0184] In a further embodiment, in step S3, the image analysis and data processing involves control calculations for two input scenarios: prescription map and visual target targeting. During prescription map-based drug administration and visual target targeting-based drug administration, the target flow rate Q of each nozzle is... nozzle,i,target1 and Q nozzle,i,target2 Adjustments are made based on different inputs, as follows:
[0185] 1) Setting the target flow rate for each nozzle:
[0186] Prescription map application: Based on the latitude and longitude of the nozzle (x i ,y i The target flow rate Q for each nozzle is obtained by analyzing the prescription diagram. nozzle,i,target1 ,Right now:
[0187] Q nozzle,i,target1 =f prescription (x i ,y i );
[0188] Vision-based targeted pesticide application: Based on crop density and three-dimensional structure (ρ) identified by a visual system... i ,h i ), calculate the target flow rate Q for each nozzle. nozzle,i,target2 ,Right now:
[0189] Q nozzle,i,target2 =gvisual (ρ i ,h i );
[0190] 2) Calculation of flow rate error for each nozzle:
[0191] For each nozzle, the flow error ΔQ is calculated in real time. i :
[0192] ΔQ i =Q nozzle,i,target -Q nozzle,i,actual
[0193] Among them, Q nozzle,i,target Q is calculated using a prescription map or visual system. nozzle,i,actual It can be estimated through pressure and duty cycle or measured directly;
[0194] 3) Calculation of duty cycle adjustment for each nozzle:
[0195] Based on real-time flow error and target flow, the duty cycle D of the PWM proportional solenoid valve corresponding to the nozzle is adjusted through adaptive control. i,new ,as follows:
[0196]
[0197] Where, ΔQ i It is flow error; K p It is an adaptive gain; P supply It is the real-time main pipeline pressure; P set It sets the pressure;
[0198] To address the dynamic changes in the environment and system uncertainties, a compensation term based on stress feedback is added, and robust control is further enhanced. The adjusted duty cycle is:
[0199]
[0200] Where K robust It is a robust gain, which allows the controller to be more adaptable to disturbances and parameter uncertainties;
[0201] 4) Automatic adjustment of gain parameters:
[0202] Based on the flow error ΔQ i and pressure error ΔP i To update gain K p,i,new :
[0203] K p,i,new =K p,i,old +μ p,i ·(ΔQ i ·ΔP i)
[0204] Among them, K p,i,new For the updated gain parameter; K p,i,old The gain parameter before the update; μ p,i The learning rate, used for gain adjustment, controls the size of the update step, ensuring smooth updates and avoiding system instability; ΔQ i =Q target,i -Q actual,i , where is the flow error of the i-th nozzle, and the target flow rate Q is... target,i and actual traffic Q actual,i The difference between them; ΔP i =P set -P supply,i Let P be the pressure error of the i-th nozzle. set and real-time pressure P supply,i The differences between them;
[0205] Learning rate μ for gain adjustment p,i Adjustments are made based on the system's response. Generally, a smaller learning rate reduces system oscillations, while a larger learning rate accelerates convergence. The learning rate is adjusted as follows:
[0206]
[0207] Where, μ 0,i α is the initial learning rate; i ΔQ is the learning rate decay factor, used to adjust the learning rate based on the magnitude of flow and pressure errors. i and ΔP i These are flow error and pressure error, respectively. By dynamically adjusting the learning rate, the gain can be updated more flexibly, and the update step size can be automatically increased when the flow and pressure errors are large, thereby improving the system's response speed.
[0208] 5) Updated gain calculation:
[0209] Gain K per nozzle p,i,new The calculation is as follows:
[0210]
[0211] Estimated gain K p,i,new Substituting these values into the formula for the controller above, the duty cycle signal of the PWM proportional solenoid valve corresponding to each nozzle is obtained as follows:
[0212]
[0213] The algorithm dynamically adjusts the difference between the target flow rate and the actual flow rate of each nozzle, and uses adaptive gain to adjust the duty cycle to ensure that the nozzles can accurately control the flow rate in different application scenarios to achieve precise application. The actual flow rate of each nozzle is adjusted by the duty cycle of the PWM proportional solenoid valve, and combined with pressure feedback, dual control of flow rate and pressure is achieved.
[0214] In a further embodiment, in step S3, for drug administration control when neither a prescription map nor visual information is available, considering the pressure difference of each nozzle, an algorithm based on nozzle pressure compensation and local gain adjustment is designed to make the control of each nozzle more precise, as follows:
[0215] 1) Nozzle pressure feedback:
[0216] Pressure differences at each nozzle can lead to different flow rates. Therefore, for each nozzle, local pressure feedback is used to correct the duty cycle. The pressure difference at each nozzle is determined by P. nozzle,i This means that the corrected duty cycle of each nozzle is dynamically adjusted based on its pressure difference;
[0217] Introducing global gain K global To adjust the control output of each nozzle and ensure that the flow rate of the entire system meets the target requirements, this is achieved by weighting based on the local duty cycle, as follows:
[0218]
[0219] 2) Adaptive control calculation:
[0220] Considering that nozzle pressure may vary in actual operation, and the pressure differences between nozzles may be significant, a neural network adaptive algorithm is used to dynamically adjust the gain K. global To better cope with complex and changing operating conditions, a neural network model is introduced to estimate the pressure difference of the nozzle, and the gain is automatically adjusted based on real-time flow error and pressure feedback. The gain update formula is as follows:
[0221]
[0222] Among them, K global α is the current value of the global gain; α is the learning rate. It is the gradient of the loss function with respect to the gain; the loss function J can be chosen as the sum of squares of the flow error or other suitable performance metrics.
[0223]
[0224] 3) The comprehensive control equation for nozzle flow rate and pressure stability is as follows:
[0225]
[0226] In a further embodiment, the duty cycle is adjusted by real-time flow error to ensure that the nozzle flow rate is close to the target value and to perform closed-loop flow control. At the same time, the duty cycle is dynamically adjusted based on the real-time pressure feedback of each nozzle to compensate for pressure differences and optimize the nozzle spraying effect. An adaptive algorithm is used for online gain adjustment to improve the adaptability and robustness of the system.
[0227] The preferred embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and all such equivalent transformations fall within the protection scope of the present invention.
Claims
1. A method for controlling pesticide application in a multi-input model-compensated plant protection robot, characterized in that, The steps include: S1. Construct a control model for flow and pressure; S2. Control the water pump and electric ball valve; S3. Perform PWM-controlled nozzle flow and pressure stabilization control; S4. A multi-level adaptive feedback control method based on model compensation uses the target values of the prescription map input system and the visual target input system as the control reference. It controls three types of components: water pump speed, electric ball valve opening, and PWM proportional solenoid valve duty cycle to achieve pressure stability and flow control for each nozzle. Through closed-loop feedback, the flow and pressure are adjusted to ensure uniform and efficient drug application. In step S1, the control model for flow rate and pressure is constructed as follows: 1) Constructing a nozzle flow rate model: Nozzle flow rate Q nozzle The duty cycle D of the PWM proportional solenoid valve and the main pipeline pressure P are affected. supply The dual control is calculated as follows: Where, k Q is the flow gain coefficient, which is related to the nozzle structure parameters; D is the duty cycle of the PWM proportional solenoid valve, ranging from [0,1]; P supply To alleviate the pressure on the main road; 2) Distribute the system target flow rate and nozzle flow rate: In the absence of a prescription map input system and a visual target input system, a fixed application rate per acre is used, with a target flow rate Q. required The amount of pesticide applied per unit area, Q target The spray boom width W and vehicle speed v are determined and calculated as follows: Q required =Q target ·W·v; When there is a prescription map output system and a visual target input system, Q required It equals the sum of the target flow rates of all nozzles; In step S2, the water pump and electric ball valve are controlled as follows: 1) Model the pesticide application system: The relationship between pump flow rate and pump speed is as follows: Q pump =k pump ·n pump ; Establish the flow rate and opening degree V of the electric valve return water tank valve and the pressure P of the main road supply Nonlinear relationship between them: Q recirculated =k valve ·(V valve ) α ·(P supply ) β ; The total flow rate of the main pipeline is the pump flow rate minus the return flow rate of the electric valve to the water tank. Total flow rate of the main pipeline: Q total =k pump ·n pump -k valve ·(V valve ) α ·(P supply ) β ; Among them, the opening degree V of the electric valve valve The main pipeline pressure P is obtained through the sensor or control signal of the electric valve. supply Q is obtained through a pressure sensor. total The flow rate is obtained by a flow sensor installed on the main pipeline. In the absence of a flow sensor, the total flow rate of the main pipeline is calculated using the above formula. 2) Adaptive control calculation: Flow error E Q for: E Q =Q required -Q total ; The control law for the water pump speed is: K feedback A user-customizable feedback coefficient; The opening control law of the electric valve is: Among them, K robust Let be the robust gain, and λ be a constant for adjusting the feedback rate. To optimize the opening control of the electric valve, robust feedback is added to the time derivative of the error. 3) Control gain update: In order to make the gain k valve k pump Furthermore, the unknown nonlinear parameters α and β can be adaptively adjusted. An error-based online update algorithm is designed, and the specific gain update is as follows: (1) Pump gain update: (2) Electric valve gain update: (3) Adaptive parameter update: For α and β, their values are dynamically adjusted by controlling the feedback of error and flow rate, based on the main pipeline flow rate Q. total The sensitivity is as follows: in, and The sensitivity coefficients for α and β are calculated as follows: Among them, γ1, γ2, γ3 and γ4 are adaptive gains used to adjust the learning rate.
2. The method for controlling pesticide application in a multi-input model-compensated plant protection robot according to claim 1, characterized in that: In step S3, the image analysis and data processing involves control calculations for two input scenarios: prescription map and visual target targeting. During prescription map-based drug application and visual target targeting-based drug application, the target flow rate Q of each nozzle is... nozzle,i,target1 and Q nozzle,i,target2 Adjustments are made based on different inputs, as follows: 1) Setting the target flow rate for each nozzle: Prescription map application: Based on the latitude and longitude of the nozzle (x i ,y i The target flow rate Q for each nozzle is obtained by analyzing the prescription diagram. nozzle,i,target1 ,Right now: Q nozzle,i,target1 =f prescription (x i ,y i ); Vision-based targeted pesticide application: Based on crop density and three-dimensional structure (ρ) identified by a visual system... i ,h i ), calculate the target flow rate Q for each nozzle. nozzle,i,target2 ,Right now: Q nozzle,i,target2 =g visual (ρ i ,h i ); 2) Calculation of flow rate error for each nozzle: For each nozzle, the flow error ΔQ is calculated in real time. i : ΔQ i =Q nozzle,i,target -Q nozzle,i,actual Among them, Q nozzle,i,target Q is calculated using a prescription map or visual system. nozzle,i,actual Estimated by pressure and duty cycle or measured directly by a flow sensor; 3) Calculation of duty cycle adjustment for each nozzle: Based on real-time flow error and target flow, the duty cycle D of the PWM proportional solenoid valve corresponding to the nozzle is adjusted through adaptive control. i,new ,as follows: Where, ΔQ i It is flow error; K p It is an adaptive gain; P supply It is the real-time main pipeline pressure; P set It sets the pressure; To address the dynamic changes in the environment and system uncertainties, a compensation term based on stress feedback is added, and robust control is further enhanced. The adjusted duty cycle is: Where K robust It is a robust gain, which allows the controller to be more adaptable to disturbances and parameter uncertainties; 4) Automatic adjustment of gain parameters: Based on the flow error ΔQ i and pressure error ΔP i To update gain K p,i,new : K p,i,new =K p,i,old +μ p,i ·(ΔQ i ·ΔP i ) Among them, K p,i,new For the updated gain parameter; K p,i,old The gain parameter before the update; μ p,i The learning rate is used for gain adjustment to control the size of the update step, ensuring smooth updates and avoiding system instability; ΔQ i =Q target,i -Q actual,i , where is the flow error of the i-th nozzle, and the target flow rate Q is... target,i and actual traffic Q actual,i The difference between them; ΔP i =P set -P supply,i Let P be the pressure error of the i-th nozzle. set and real-time pressure P supply,i The differences between them; Learning rate μ for gain adjustment p,i Adjustments are made based on the system's response. Generally, a smaller learning rate reduces system oscillations, while a larger learning rate accelerates convergence. The learning rate is adjusted as follows: Where, μ 0,i α is the initial learning rate; i ΔQ is the learning rate decay factor, used to adjust the learning rate based on the magnitude of flow and pressure errors. i and ΔP i These are flow rate error and pressure error, respectively. 5) Updated gain calculation: Gain K per nozzle p,i,new The calculation is as follows: Estimated gain K p,i,new Substituting these values into the formula for the controller above, the duty cycle signal of the PWM proportional solenoid valve corresponding to each nozzle is obtained as follows: The algorithm dynamically adjusts the difference between the target flow rate and the actual flow rate of each nozzle, and uses adaptive gain to adjust the duty cycle, ensuring that the nozzle can accurately control the flow rate in different application scenarios to achieve the effect of precise application. The actual flow rate of each nozzle is adjusted by the duty cycle of the PWM proportional solenoid valve, and combined with pressure feedback, dual control of flow rate and pressure is achieved.
3. The method for controlling pesticide application in a multi-input model-compensated plant protection robot according to claim 2, characterized in that: In step S3, for drug administration control when neither a prescription map nor visual information is available, the calculation based on nozzle pressure compensation and local gain adjustment is as follows: 1) Nozzle pressure feedback: Pressure differences at each nozzle can lead to different flow rates. Therefore, for each nozzle, local pressure feedback is used to correct the duty cycle. The pressure difference at each nozzle is determined by P. nozzle,i This means that the corrected duty cycle of each nozzle is dynamically adjusted based on its pressure difference; Introducing global gain K global To adjust the control output of each nozzle and ensure that the flow rate of the entire system meets the target requirements, this is achieved by weighting based on the local duty cycle, as follows: 2) Adaptive control calculation: A neural network adaptive algorithm is used to dynamically adjust the gain K. global A neural network model is introduced to estimate the pressure difference of the nozzle, and the gain is automatically adjusted based on real-time flow error and pressure feedback. The gain is calculated as follows: Among them, K global α is the current value of the global gain; α is the learning rate. It is the gradient of the loss function with respect to the gain; The loss function J is the sum of squares of the flow error or other suitable performance metrics, and is calculated as follows: 3) The comprehensive control equation for nozzle flow rate and pressure stability is as follows:
Citation Information
Patent Citations
Spray rod system testing method based on VeriStand and Simulink joint simulation
CN110794708A
Controlled Agricultural Systems and Methods of Managing Agricultural Systems
US20190259108A1