Feedback regulation system for spraying parameters based on online droplet mass deposit measurements

: In order to effectively optimize and regulate spraying parameters based on actual spraying performance and improve pesticide utilization rate, in this research, a feedback regulation system for the regulation of spraying parameters was designed based on droplet mass deposit online measurement. The system consisted of an online droplet mass deposit measurement module, wireless transmission module, decision module, and spraying parameters regulation module. First, the droplet mass deposits on the sampling points were measured. Based on the deviation between the measured and expected droplet mass, the expected spraying parameters were determined by the decision module. The spraying parameter was regulated to the expected value by regulating the pulse duty cycle on the pump motor using a micro control unit and a relay. Evaluation tests were conducted indoors using an indoor spraying platform and outdoors using an unmanned aerial vehicle. The results showed that the relative errors between the expected and measured droplet mass deposit after regulation were 6.84% and 11.48% for the indoor and outdoor tests, respectively. Therefore, an optimal spraying performance was observed after regulation. This research provided an experimental platform to quickly optimize spraying parameters and also provided technical references for precision spraying.


Introduction 
Variable-rate spraying is an important technique in precision pesticide application [1] . The variable-rate spraying technique can regulate the spraying flow rate automatically based on the detection of the sprayer velocity, crop feature, degree of diseases, and insect pests [1][2][3][4] . And the variable-rate spraying technique can thereby reduce pesticide residues and environmental pollution [1] . The variable-rate spraying technique has become an important development direction for pesticide application [5,6] .
Researches on the variable-rate spraying can be divided into two categories [1] .
One category is based on the crop prescription map method [7,8] . First, the spraying prescription map is generated based on the situation involving pests and diseases. Using the prescription map, the spraying flow rate is regulated based on the GPS positioning information, the travelling velocity information, the flow rate and pressure information of the sprayer.
In the other category, the crop features parameters and parts of the spraying parameters are detected by the sensors; then, along with the detected information, the spraying parameters are decided and regulated based on the models such as ground area (GA) model [9] , leaf wall area (LWA) model [10] and tree row volume (TRV) model [11] . For this category of variable-rate spraying technology, a sprayer prototype using ultrasonic sensors was investigated by Gil et al. [12,13] , and the spraying flow rate was regulated based on canopy size variations measured by the sensors. He et al. [14] designed an orchard automatic-target sprayer based on infrared detection technology. Zhu et al. [15,16] designed an air-assisted five-port sprayer.
The spraying flow rate was regulated based on tree canopy volume and density information detected by a laser sensor. Yan et al. [17] designed a system using the binocular vision technology. The system could detect the depth of grape leaf curtain, calculate the canopy volume, and regulate the flow rate to the required value. Wang et al. [18] developed a system using the pulse width modulation technique to regulate the flow rate based on the UAV velocity. Cen et al. [19] developed a system using the proportional-integral-derivative (PID) controller to regulate the flow rate based on the UAV velocity.
Therefore, to achieve the needed droplet mass deposit on the target (called expected droplet mass deposit), the spraying parameters were regulated primarily based on the crop prescription map, crop features and parts of the sprayer working parameters (e.g., the velocity) for the current variable-rate spraying system. However, various factors would affect the droplet mass deposit. These factors may include environmental temperature and humidity. Under the influence of these factors, there may be a deviation between the measured and expected droplet mass deposit.
In view of this problem, a spraying parameters regulation method based on the deviation between the measured and expected droplet mass deposit was investigated in this research. The measured droplet mass deposit approached the expected values after spraying parameters regulation. This research provides technical reference for variable-rate spraying technique.
The objectives of this research were to (1) design the spraying parameter feedback regulation system based on the online measurement of the droplet mass deposit, and (2) conduct the test to evaluate the performance of the designed system.

Overall design scheme of the system
The system consists of a droplet mass deposit online measurement module, a decision module, a wireless transmission module, and a spraying parameter regulating module, as shown in Figure 1.
The online droplet mass deposit measurement module comprises the droplet collection device, the solution conductivity sensor, and the conductivity transmitter. The module combines the functions of droplets collection and online measurements together. This module provides decision data for the regulating system.
The decision module consisted of the host computer and the software system.
The module can determine the expected spraying parameters based on the deviation between the measured and expected droplet mass deposit, and the spraying decision model.
The spraying parameter regulating module consists of the micro control unit (MCU), the solid-state relay, and the actuator (the pump). The I/O port of the MCU outputs the pulse signals with different duty cycles. The solid-state relay is triggered by a weak signal of the MCU, and the on-off switching speed attains the millisecond level. Using both the relay and the MCU, it is convenient to regulate the pulse duty cycle on the pump motor. (1) The related factors that affect the droplet mass deposit are analyzed. The mathematical model for the droplet mass deposit and the related factors is constructed. The feedback regulation decision model based on the deviation of measured and expected droplet mass deposit is constructed.
(2) The droplet mass deposit under the initial spraying parameters is measured.
The detailed methods are as follows: the droplet mass deposit online measurement devices are placed on the sampling points. The spraying process is conducted under the initial spraying parameters. After this, the measured droplet mass deposit and the used initial spraying parameters are sent to the decision module via wireless transmission module.
(3) The spraying parameters are regulated. The detailed methods were: the expected droplet mass deposit is decided based on the crop feature and disease situation, and the expected value was input to the host computer. The expected spraying parameters are decided by the decision module based on the expected and measured droplet mass deposit, the used initial spraying parameters and the feedback regulation decision model. The expected spraying parameters are sent to the spraying parameter regulating module by wireless transmission module, and finally the spraying parameters are regulated to the expected values.

Design of droplet mass deposit online measurement module
The research uses the droplet mass deposit online measurement module [20] based on the solution conductivity. According to the principles of electrochemistry, when environmental factors such as the pressure and electrolytic cell are stable, and the solution concentration is low, there is a good linear relationship between the solution conductivity (κ) and the concentration (C) [21] . κ = aC + b (1) where, coefficients a and b are determined by calibration tests for different electrolytes.
The initial mass of the pure water in the container is m 0 . After the spraying solution is collected, the mixed solution concentration C is mc o /(m+m o ) (the accumulated mass is m, and the concentration is c 0 ). The solution conductivity before and after spraying (κ 1 and κ 2 ) is measured using a sensor, and the accumulated droplet mass deposit (m 1 and m 2 ) before and after spraying is calculated using Equation (1). The mass difference (m 2m 1 ) is the droplet mass deposit of this current spraying. After an amount of pure water was added into the droplet collection box, the measurement module can be used to measure the droplet mass deposit for several times.
The droplet mass deposit measurement module [20] comprises the droplet collection box, the conductivity sensor and the transmitter (model DDG-3023, Chengci Company, China), as shown in Figure 2. The sensor and the transmitter are configured with a temperature sensor. When the temperature changes, the measurement result of the solution conductivity is calibrated automatically. The sensor and the transmitter have good stability and corrosion resistance as well as a wide application range and can be used for most electrolyte solutions (e.g. seawater). A micro pump is installed inside the box. The solution in the box is pumped to the pipe around the box inlet and then flows out from the holes along the pipe. Finally, it flows back into the box, forming a water curtain on the side wall of the box. In this way, the droplets on the side wall of the box are brought into the box; the droplets and the solution in box were quickly and uniformly mixed. The spraying solution can be the solutions of strong electrolytes such as KNO 3 and the pesticides of large conductivity; for the pesticides of small conductivity, the strong electrolyte tracers can be added [22] . The concentration of the spraying solution is determined based on the measurement requirement.

Design of wireless data transmission module
The wireless data transmission module is used to share data among modules in the system.
It consists of the MCU (STC89C52) and the wireless communication module (HC-12). The communication distance of HC-12 was 1000 m, its working frequency varies from 433 to 458.5 MHz and can operate under 255 communication channels.
It supports one-to-one, one-to-many, and many-to-many data communication patterns. The analog signal of the solution conductivity sensor is converted into the digital signal and sent to the MCU. Next, the MCU transmits the data to the host computer by the wireless transmission module. The host computer determines the expected spraying parameters based on the measured and expected droplet mass deposit, and the feedback regulation decision model. The expected spraying parameters are sent to the regulating module, and finally, the parameters of the sprayer are regulated to the expected values.

Feedback regulation decision model construction and analysis
To realize feedback regulation, it is important to analyze the factors related to the droplet mass deposit, construct the mathematical model between the droplet mass deposit and the related factors, and construct the feedback regulation decision model based on the deviation of measured and expected droplet mass deposit.
Generally, the relation among the droplet mass deposit on unit area, the flow rate, the spraying velocity is expressed as Equation (2) [18] : where, Q represents the pump flow rate, L/min; D represents droplet mass deposit per unit area, μL/cm 2 ; W represents the spraying swath width, m; v represents the sprayer velocity, m/s. Here the variable k represents the conversion coefficient, which is related to environmental factors such as temperature, humidity, and wind velocity. If the environmental factors vary not big, the variable k can be regarded as constant.
The feedback regulation decision model based on the deviation of the measured and expected droplet mass deposit is further discussed in this section.
Sprayers were used in sampling regions. When the current spraying flow rate is Q 0 and the velocity is v 0 , the corresponding detected droplet mass deposit is D 0 . According to Equation (2): Assuming that the expected flow rate is Q exp and the expected velocity is v exp to achieve the expected droplet mass deposit D exp , it can be obtained that: If the time interval for the spraying event before and after spraying parameters regulation was not big, the environment factors can be considered basically unchanged, and therefore, the variable k 0 is equal to the variable k 1 , then the following equation can be obtained: Specially, if the sprayer velocity was kept constant in the test, Equation (5) was further simplified as: This equation was the strategy for the feedback regulation.

Design of spraying parameters regulating module
The spraying parameters regulating module comprises of the MCU (STC89C52), the solid-state relay (model JQC, bestep Company) and the actuator (the pump). Using the MCU and the relay, the flow rate was regulated by changing the duty cycle on the pump.

Regulation principle
The methods used to determine the relationship between the flow rate and the duty cycle on the pumps were as follows: the nozzle (model TYI), the pump (model Yulu, Sanmu company) and the clean water were used as test materials. The spraying droplets were collected with a container, the mass was measured using a balance, and the spraying time was set by a relay (model YBD_06). The flow rate of the nozzle was the ratio of the total mass of the collected droplets and the setting time. The flow rates in the different duty cycles were recorded, and the curve expressing the relationship between the flow rate and the duty cycle is shown in Figure 3. The logarithmic expression was used to fit the data, and the square of the correlation coefficient (R 2 ) was 0.9988. This revealed that it was proper to use the logarithmic expression. The relationship of the flow rate and the duty cycle can be expressed as: Q = p· ln(R) + q (7) where, Q represents the flow rate, L/min; R represents the duty cycle, %; and p and q represent coefficients, which are determined by calibration. Figure 3 Fitting curve for flow rate and duty cycle on the pump motor Based on Equation (7), the relationship between the initial flow rate and duty cycle before regulation is: The relationship between the expected flow rate and the duty cycle is: Q exp = p· ln(R exp ) + q (9) Equations (6), (8) and (9) are used to calculate the expected duty cycle, which was calculated as follows: When the initial duty cycle R 0 before regulation is regulated to the expected value R exp , the initial flow rate Q 0 is regulated to the expected flow rate Q exp .

Regulation method
The pulses output from the I/O port of the MCU are used to control the solid-state relay to be on or off, and consequently, the working time of the pump motor in a pulse period is changed; thus, the flow rate is regulated.
The methods to regulate the duty cycle using the MCU are as follows: certain amount of time (the time length was T) is set by the MCU timer. Each time the setting time was up, the interruption codes are executed. The partial interruption codes (C language) are as follows: if(++time==high) wei=0; else if(time==period) {time=0; wei=1;} In the codes, the variable 'wei' is the register variable of I/O port, and this variable was used to control the relay to be on or off. The variable 'time' represented the overflow number of the MCU timer; each time the setting time was up, the variable "time" increases by 1. When the value of the variable "time" equals that of the variable "period", the value of the variable "time" was set to be 0. The variables "high" and "period" are used to regulate the duration of high and low voltages of the I/O port. The cycle of the pulse (t) is period×T, the duration for the high voltage (t 1 ) is high×T, and the duration for the low voltage (t 2 ) is (period-high)×T. When time<high, the voltage of the I/O port is high; when high<time<period, the voltage of the I/O port is low; thereby, the duty cycle=high/period.

Evaluation test
Evaluation tests were conducted indoors and outdoors. The expected and the measured droplet mass deposit after the spraying parameters regulation were compared.
The 2.5% KNO 3 was used as spraying liquid. For the indoor test, the environmental parameters were measured with a meteorological monitoring device (model PR 3000, Prsens Company).
The temperature was 20.7°C and the relative humidity was 64.9%. The spraying platform (Figure 4) consisted of the designed spraying parameters regulation system, the nozzle (model TYI), the pump (model Yulu, Sanmu company), the winch, the rail, and the frequency converter (model 8000B, DFL Company). The winch was used to provide the moving power for the platform. The moving velocity of the system was regulated by changing the electric frequency on the winch motor.

Figure 4 Spraying platform indoors
The arrangement of the sampling points is shown in Figure 5. These points were arranged on three lines. The distance between the first line and the second line was 2 m; the distance between the second line and the third line was 3 m. On each line, the interval of the points was 0.5 m along the x-axis direction. The nozzle moving direction was in the y-axis direction, and the nozzles were arranged symmetrically on both sides of the y-axis. The spraying height was 2 m, and the moving velocity of the nozzle was 0.5 m/s. The test outdoors was conducted in the open area of the campus. The environmental parameters were measured with a meteorological monitoring device (model PR 3000, Prsens Company). The temperature was 17.1°C, the relative humidity was 66.8%, the wind velocity was 0.82 m/s, and the wind direction was 39° (northeast). The atmosphere was cloudy. The spraying parameters regulating system was equipped on a multi-rotor UAV (model P30, Jifei Company), which was used as a carrier. The arrangement of the sampling points is shown in Figure 5. The distance between the first line and the second line was 10 m; the distance between the second line and the third line was 20 m. The other arrangement methods for the sampling points were the same as the test indoors. The spraying height was 2 m and the moving velocity of the nozzle was 3 m/s. Note: the numbers of 1, 2 and 3 respresent the first, the second and the third line expressed in the article. Figure 5 Sampling points arrangement These procedures were as follows: (1) The initial duty cycle R 0 was set to be 80%. Then, the spraying was conducted. After spraying, the droplet mass deposits on the sampling points (within the spraying swath width: -1.5-1.5 m in the x-axis direction) were measured by the system and sent to the host computer.
(2) The expected droplet mass deposit D exp was input into the host computer. The average droplet mass deposit of the sampling points (D 0 ) in step (1) was calculated. Then, based on Equation (10), the expected duty cycle R exp was calculated by the host computer. The expected duty cycle R exp was sent to the spraying parameters regulating module by the wireless transmission module. The duty cycle was regulated to the expected value and the spraying test was conducted again. After spraying, the droplet mass deposits on the sampling points (within the spraying swath width: -1.5-1.5 m in the x-axis direction) after regulation were sent to the host computer again and the average was calculated. Finally, the relative error between the expected and measured droplet mass deposit after regulation was calculated.
The expected droplet mass deposit was changed to another value, and steps (1) and (2) were performed again. The tests were repeated under each expected droplet mass deposit value. The measurements are listed in Tables 1 and 2.

Results and discussion
Tables 1 and 2 list the results of the evaluation tests. The results showed that the relative errors between the expected and measured droplet mass deposit after regulation were 6.84% and 11.48% for the indoor and outdoor tests, respectively. The droplet mass deposit was close to the expected value after regulation. The nozzle moving velocities were different for Tables 1 and 2  respectively, and the droplet mass deposits were different, therefore, it revealed that the droplet mass deposit could also be regulated by changing the travelling velocity. The relative error of the indoor test was smaller than that of the outdoor test. This was because the environment factors such as the temperature, the humidity and the wind were more stable indoors. If the relative error is still large after regulation, a second regulation can be conducted. The relative error threshold can be set in the program based on need, and in this research, it was set as 15% for the designed system.

Conclusions
In this study, a spraying parameter regulating system based on online droplet mass deposit measurements was designed.
Tests to evaluate the designed system performance were conducted indoors and outdoors. The results showed that the relative errors between the expected and measured droplet mass deposit after regulation were 6.84% and 11.48% for the indoor and outdoor tests, respectively. The measured droplet mass deposit after regulation approached the expected values, indicating the designed system had a good performance. This research provided an experimental platform to quickly optimize spraying parameters, and provided technical references for precision spraying.
In addition, as the pump worked within a flow-rate range, and only by regulating the flow rate, the regulation range for the expected droplet mass deposit was limited when the sprayer was at a certain velocity. If the expected droplet mass deposit was out of the regulation range, the velocity and the flow rate were required to be regulated simultaneously. In the actual spraying process, the droplet mass deposit was affected by environmental factors (e.g., the temperature and humidity), and the feedback regulation could be carried out at intervals to optimize the spraying parameters.
In this research, only the feedback regulation that was based on the droplet mass deposit was investigated; besides, there were other evaluation indices (e.g. the droplet size and the uniformity of the droplet mass distribution) to evaluate the spraying performance.
The feedback regulation based on these evaluation indexes will be future work.