Abstract:In view of the current problems such as uneven spraying, droplet drift, low effective utilization rate of fertilizers and pesticides, and serious waste and pollution caused by traditional spraying methods of unmanned aerial vehicles (UAVs), a variable angle and variable spraying device for plant protection UAVs was designed based on fruit tree canopy recognition. This device collected the canopy images of fruit trees through the camera and transmited them to Jetson Orin Nano. The recognition of the canopy boundary and the row width of fruit trees was achieved by using ROI selection and sub-interval line scanning methods. The recognition results were transmitted to the STM32 controller. Among them, the canopy boundary information was used to adjust the nozzle angle, and the pixel ratio information was used to regulate the nozzle flow rate. The feedback signals of the flowmeter and the magnetic encoder were processed by the fuzzy PID algorithm to achieve double closed-loop control of the nozzle angle and the spray volume. It was verified that the offline recognition rate of the fruit tree canopy boundary algorithm was 91.58%. The bench test results showed that the average error rate of this method in the recognition of the width of fruit tree rows was 7.32%, and the linear fitting R2=0.91. In the spray verification, when the spray angle was greater than the target area, after adjustment, the average number of deposits outside the target area could be reduced by 26.61 per cm2, and the number of droplet deposits could be reduced by 51.94%. When the spraying angle was smaller than the target area, after adjustment, the average number of external droplets deposited in the target area can be increased by 25.37 per cm2, and the number of droplets deposited can be increased by 54.8%. The kernel density estimation curve was smoother, effectively improving the uniformity of sedimentary distribution. The field test results showed that the statistical test results were t=3.29 and P=0.03,reaching a statistically significant level of P<0.05. The deposition effect was better when the device was turned on. This method realized variable angle and variable spraying control based on the width of fruit tree rows, which can effectively improve the utilization rate of droplets and provide technical support for precise pesticide application in unmanned aerial vehicle orchards.