###### Abstract  
Unmanned aerial vehicle (UAV) variable-rate spraying technology, as the development direction of aviation for plant protection in the future, has been developed rapidly in recent years. In the actual agricultural production, the severity of plant diseases and insect pests varies in different locations. In order to reduce the waste of pesticides, pesticides should be applied according to the severity of pests, insects and weeds. On the basis of explaining the plant diseases and insect pests map in the target area, a pulse width modulation variable spray system is designed. Moreover, the STMicroelectronics-32 (STM32) chip is invoked as the core of the control system. The system combines with sensor technology to get the prescription value through real-time interpretation of prescription diagram in operation. Then, a pulse square wave with variable duty cycles is generated to adjust the flow rate. A closed-loop Proportional-Integral-Derivative (PID) control algorithm is used to shorten the time of system reaching steady state. The results indicate that the deviation between volume and target traffic is stable, which is within 2.16%. When the duty cycle of the square wave is within the range of 40% to 100%, the flow range of the single nozzle varies from 0.16 L/min to 0.54 L/min. Variable spray operation under different spray requirements is achieved. The outdoor tests of variable spray system show that the variable spray system can adjust the flow rapidly according to the prescription value set in the prescription map. The proportion of actual droplet deposition and deposition density in the operation unit is consistent with the prescription value, which proves the effectiveness of the designed variable spray system. U  
20183  
in improving the utilization rate of pesticides and reducing pesticide residues [6]. [PERSON] et al. [7] developed a field information processing system based on a Beidou positioning embedded vehicle variable sprayer. The system was able to complete the spray operation according to the generated job prescription map. However, the performance of field information processing system was not completely verified by the field testing. [PERSON] et al. [8] used a geospatial prescription map prepared for olive trees, along with Real-Time Kinematic-Global Positioning System (RTK-GPS)-based position information to control the spray rate. This system only implements variable spray based on tree shape, and does not combine the degree of disease and pest with tree shape. [PERSON] et al. [9] used a variable-pressure spray system that controls the flow rate with an electric control valve. The step responses of the five target flows were measured experimentally. The results showed that the rise time, peak time and overshoot of the nonlinear system have amplitude correlation. However, the way of regulating flow by an electronic control valve is only applicable to ground machinery. Compared with the high-speed flight of plant protection unmanned aerial vehicles (UAV), the response time of the electronic control valve has a greater impact on the system. [PERSON] et al. [10] designed a nonlinear variable spray system based on pressure regulation. By establishing the transfer function of the open-loop system, the nonlinear control of the variable spray system was realized. However, for the low volume spray of plant protection UAV, the droplet size and the effect of spraying operation will be affected by the pressure. [PERSON] and [PERSON] [11] proposed an algorithm to improve the Pulse width modulation (PWM) algorithm. By controlling the rising or falling state of the valve opening corresponding to the high and low pulse levels, an adjustment range of the flow rate from 0% to 100% can be realized according to the adjustment precision of 2.5%. The response time by using pulse to adjust valve opening cannot meet the requirements of UAV high-speed flight. At present, the precision variable spraying technology for ground plant protection machinery in China is developing more rapidly.