Unmanned aerial vehicle autonomous precise landing system and method based on double MCUs and machine vision

The autonomous and precise landing system for drones, which combines a dual-MCU architecture with machine vision, solves the problems of single-MCU computing power bottleneck and insufficient robustness of vision algorithms, and achieves centimeter-level precise landing and stable control of drones in complex environments.

CN121386889APending Publication Date: 2026-01-23段泽睿
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511645895.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-11
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing autonomous precision landing technologies for drones suffer from limitations in single-MCU computing power and real-time performance, insufficient robustness of visual algorithms, and a single landing control strategy, making it difficult to achieve high-precision and high-reliability autonomous landing in complex environments.

Method used

It adopts a dual-MCU architecture, in which the main MCU is responsible for computationally intensive visual data analysis and decision-making, and the auxiliary MCU is responsible for signal conversion. Combined with the OPENMV vision module, optical flow module and attitude sensor, it achieves precise landing of UAV through integral separation PID algorithm and multi-target optimization recognition algorithm.

Benefits of technology

It improves the continuity of attitude adjustment and instantaneous response capability of UAVs in complex environments, ensures the stability and reliability of centimeter-level precise landing, and has the ability to handle anomalies such as target loss and sensor failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121386889A_ABST
    Figure CN121386889A_ABST
Patent Text Reader

Abstract

The invention discloses an unmanned aerial vehicle autonomous precise landing system and method based on double MCUs and machine vision, and relates to the technical field of unmanned aerial vehicle control. A main MCU is used for executing calculation-intensive visual data analysis and advanced decision-making tasks including image feature extraction and recognition result filtering and fusion by means of the high computing power of the main MCU; according to the method, the main MCU and the auxiliary MCU are combined, complex control quantity calculation based on integral separation PID is carried out, meanwhile, the auxiliary MCU serves as a special motion control coprocessor and continuously converts the attitude control quantity issued by the main MCU into an accurate PWM waveform signal at a fixed high frequency, the framework decouples two key stages of decision generation and signal output on hardware, and therefore the precision of the motion control is improved. Therefore, even if the main MCU generates tiny calculation fluctuation due to processing of a complex vision algorithm, the auxiliary MCU still can stably and uninterruptedly output a smooth control signal to the execution layer based on the control quantity of the previous period, and the phenomenon that a control instruction is lost due to a single MCU is eliminated.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of unmanned aerial vehicle control, in particular to an unmanned aerial vehicle autonomous precision landing system and method based on double MCU and machine vision. BACKGROUND

[0002] The unmanned aerial vehicle autonomous precision landing technology is a key link to realize its intelligence and complete complex tasks, and has wide application requirements in material precision delivery, emergency rescue, competition and other scenes. These scenes require the unmanned aerial vehicle not only to fly stably, but also to identify the ground target in real time and accurately without human intervention, overcome environmental interference, and finally realize centimeter-level precision landing. However, the existing technology still has several technical bottlenecks in this high requirement task chain, which restricts the further expansion of its reliability, precision and application range.

[0003] Specifically, the existing technical solutions have the following three defects: first, in the control architecture, a single micro control unit (MCU) is generally used to process all computing tasks such as flight control, sensor data fusion and visual recognition. This centralized processing method makes the MCU have a high load in high-speed concurrent tasks, which easily leads to system response delay and control instruction lag, and further affects the real-time performance and accuracy of the unmanned aerial vehicle in the final stage of landing for rapid attitude adjustment. Secondly, in the aspect of visual recognition, the traditional single algorithm is often sensitive to light changes, target partial occlusion or background interference, and lacks differentiated and robust processing procedures for different landing targets, resulting in large recognition rate fluctuations and significant positioning errors. Finally, in the landing control strategy, most solutions use uniform speed landing or simple single-stage deceleration, and do not fully consider the attitude instability and position deviation caused by ground effect and inertia in the final stage of landing, and lack a refined landing process that can balance efficiency and stability.

[0004] In summary, the existing unmanned aerial vehicle autonomous landing technology is difficult to meet the requirements of high precision, high reliability and strong adaptability in complex application scenarios due to the limitations of single MCU computing power and real-time performance bottleneck, and the generalization and robustness of visual algorithms. Therefore, there is an urgent need for a new system architecture and method to systematically solve the above problems. SUMMARY

[0005] The purpose of the present application is to make up for the deficiencies of the prior art, provide a kind of unmanned aerial vehicle autonomous precision landing system and method based on double MCU and machine vision, it can be by main MCU with its strong computing power, for performing computationally intensive visual data analysis and high-level decision tasks, including image feature extraction, identification result filtering and fusion, and complex control quantity calculation based on integral separation PID, at the same time, auxiliary MCU is used as dedicated motion control coprocessor, with fixed high frequency continuously the attitude control quantity issued by main MCU is converted into accurate PWM waveform signal, this architecture decouples the two key stages of decision generation and signal output on hardware, so that even if main MCU appears slight computing fluctuation due to processing complex visual algorithm, auxiliary MCU can still based on the control quantity of last period, stable, uninterrupted output smooth control signal to execution layer, so as to eliminate the control instruction lag or loss phenomenon caused by single MCU task scheduling busy from system bottom, ensure the continuity and instantaneous response capability of unmanned aerial vehicle attitude adjustment in precision landing process.

[0006] The present application provides the following technical solutions to solve the above technical problems: on the one hand, a kind of unmanned aerial vehicle autonomous precision landing system based on double MCU and machine vision, the composition of the system includes perception layer, control layer and execution layer; The perception layer is used to collect the environmental data required for unmanned aerial vehicle landing, including: The OPENMV vision module is configured to collect images of ground landing targets in grayscale mode and QQVGA resolution, and process and identify the images, output target identification results and position deviation; The optical flow module is integrated with a laser time-of-flight sensor and is configured to output the horizontal position coordinates and real-time height data of the unmanned aerial vehicle; The attitude sensor is configured to collect the pitch angle, roll angle and heading angle of the unmanned aerial vehicle; The control layer adopts a double MCU division of labor and cooperation architecture, including: The main MCU is in communication connection with the perception layer, and is configured to perform power management, mode switching, visual data analysis, landing decision and exception handling, and generate control quantities of pitch, roll and heading angles based on the data of the perception layer; The auxiliary MCU is in communication connection with the main MCU, and is configured to receive the control quantities sent by the main MCU and convert them into multiple PWM control signals; The execution layer is in communication connection with the control layer, receives the control signals output by the control layer and converts them into physical actions of the unmanned aerial vehicle, to realize attitude adjustment and landing operation, including: The flight control module is configured to receive the PWM control signals generated by the auxiliary MCU, perform attitude calculation and output motor speed instructions; A power assembly configured to adjust the rotating speed according to the instruction of the flight control module, so as to realize the attitude adjustment and lifting motion of the UAV; A remote control assembly: a remote controller and a receiver, used for manual take-off, mode switching and emergency intervention.

[0007] Further, the OPENMV vision module of the perception layer adopts a gray mode and a QQVGA resolution, is used for collecting images of a ground landing target, and performs image processing and identification, specifically including: Rectangular target identification: interference frames are removed through erosion filtering, and a rectangular detection algorithm is called after binarizing the image to screen the target, and the deviation of the rectangular center from the image center is calculated; Circular target identification: the target center is detected through contrast enhancement and Hough transform, and the deviation is smoothed by combining median filtering; Black line identification: line parameters are calculated through morphological filtering and edge detection, and the heading and roll control amount is calculated.

[0008] Further, the main MCU of the control layer communicates with the auxiliary MCU through an I2C interface, the main MCU is responsible for generating pitch, roll and heading angle control amounts, the auxiliary MCU converts the control amounts into PWM signals and transmits them to the flight control module, specifically including: The vision data analysis module of the main MCU: processing the identification results output by the OPENMV vision module, and calculating the control amount by combining integral separation PID algorithm; The PWM signal generation module of the auxiliary MCU: converting the control amount of the main MCU into a PWM signal of 1000-2000us, and adjusting the motor rotating speed through the flight control module.

[0009] Further, the power assembly of the execution layer includes a motor and an electronic speed regulator, the motor receives the flight control instruction to adjust the rotating speed, realizes the lifting and attitude adjustment of the UAV, and controls the UAV to perform two-stage landing, including: Fast descending stage: by adjusting the throttle PWM signal to 1300us, the UAV descends at a speed of 0.5m / s; Slow landing stage: by reducing the throttle PWM signal to 1100us, the UAV lands at a speed of 0.1m / s.

[0010] On the other hand, a UAV autonomous precise landing method based on double MCUs and machine vision, the specific steps of the method are: S100, system initialization and manual take-off height setting: after the system is powered on and initialized, the operator controls the UAV to take off manually through the remote controller, when the optical flow module detects that the UAV reaches the preset height, the main MCU triggers the height setting program, so that the UAV realizes point hovering; S200, autonomous target search and identification: the operator switches to the autonomous mode, the main MCU sends the identification instruction to the OPENMV vision module according to the preset task, the OPENMV vision module executes the optimized identification algorithm for different targets, and outputs the target deviation data; S300, attitude alignment and stability judgment: the main MCU receives the identification result, calculates the control amount in combination with the integral separation PID algorithm, and sends it to the auxiliary MCU through the I2C interface, the auxiliary MCU converts the control amount into a PWM signal and transmits it to the flight control module, adjusts the motor speed to make the unmanned aerial vehicle align the target, and the main MCU judges whether the deviation between the target center and the image center meets the landing condition; S400, two-stage precise landing: the main MCU sends the landing instruction to the auxiliary MCU, the auxiliary MCU adjusts the throttle PWM signal to realize the rapid descent stage, and when the optical flow module detects that the height is reduced to 0.3m, the main MCU triggers the slow landing stage, and the auxiliary MCU adjusts the throttle PWM signal to realize the slow landing; S500, target loss processing: during the autonomous landing process, when the target is lost or the sensor fails, the main MCU executes the corresponding exception handling subroutine.

[0011] Further, in the S200, the optimized identification algorithm executed by the OPENMV vision module includes: For a rectangular target, erosion filtering and binary processing are performed to screen the target rectangle, the deviation of the center from the image center is calculated, and median filtering is used for smoothing; For a circular target, Hough transform is performed to detect the target center, and median filtering is used to smooth the center coordinate deviation; For a black line, edge detection and Hough transform are performed to solve the line parameters, and the heading and roll control amount is calculated by linear weighting.

[0012] Further, in the S300, the specific implementation of the integral separation PID algorithm includes: The proportional term control amount = current deviation x proportional coefficient; The integral term control amount is only accumulated when the absolute value of the current deviation is less than the set threshold, otherwise the integral term is zero; The differential term control amount = differential coefficient x (current deviation - last time deviation).

[0013] Further, in the S500, the exception handling subroutine specifically includes: Target loss processing: when the OPENMV vision module does not detect the target for a continuous first preset time, the main MCU controls the unmanned aerial vehicle to fly forward at a preset speed, and reduces the threshold of the optimized identification algorithm until the target is re-identified; Sensor fault handling: when the horizontal deviation detected by the optical flow module exceeds the preset tolerance, the main MCU switches to the backup height determination mode assisted by laser height determination and gyroscope, and controls the LED red light to flash to warn.

[0014] Compared with the prior art, the unmanned aerial vehicle autonomous precise landing system and method based on double MCUs and machine vision have the following beneficial effects: Firstly, the main MCU is used to perform computationally intensive visual data analysis and advanced decision-making tasks, including image feature extraction, recognition result filtering and fusion, and complex control quantity calculation based on integral separation PID, while the auxiliary MCU is used as a dedicated motion control coprocessor to continuously convert the attitude control quantity issued by the main MCU into accurate PWM waveform signals at a fixed high frequency.

[0015] Secondly, the visual recognition algorithm of the present application does not rely on a single recognition model, but rather a set of feedforward preprocessing and postprocessing filtering anti-interference mechanisms are designed for different noise characteristics and morphological features of different physical landing targets in images.

[0016] Other advantages, objects and features of the present application will be set forth in part in the description which follows, and in part will become apparent to those skilled in the art upon examination of the following or can be learned from practice of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to make the technical solutions of the embodiments of the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative effort on the basis of these drawings.

[0018] Figure 1 Signal flow chart designed for the unmanned aerial vehicle system in embodiment one; Figure 2 Unmanned aerial vehicle take-off flow chart in embodiment one; Figure 3 Unmanned aerial vehicle landing flow chart in embodiment one; Figure 4 Unmanned aerial vehicle flight area chart in embodiment two. DETAILED DESCRIPTION

[0019] In order to further illustrate the technical means and effects adopted by the present application to achieve the predetermined application purpose, the specific embodiments, structures, features and effects according to the present application will be described in detail below in combination with the accompanying drawings and preferred embodiments.

[0020] Embodiment one This embodiment is aimed at the autonomous precise landing demand of unmanned aerial vehicles in the material delivery scene, and applies an autonomous precise landing system of unmanned aerial vehicles based on double MCUs and machine vision. Through the collaborative work of the perception layer, the control layer and the execution layer, the system realizes the precise identification, attitude adjustment and two-stage stable landing of the unmanned aerial vehicle to the specified landing target on the ground. The system solves the single MCU computing power bottleneck by adopting a double MCU division architecture, combines the multi-target optimization identification algorithm of the OPENMV vision module and the integral separation PID control algorithm, effectively improves the landing precision and stability, and has the abnormal processing capability of target loss and sensor failure, which meets the requirements of centimeter-level precise landing in the material delivery scene. The hardware connection relationship of the system is shown in Figure 1 The connection mode between the main MCU (STM32F407), the auxiliary MCU (STM32F103), the OPENMV vision module, the flight control module and the receiver is shown.

[0021] (I) Working principle and running process of the perception layer As the data acquisition core of the system, the perception layer is responsible for obtaining the environmental data required for the landing of the unmanned aerial vehicle, including the ground target image, the unmanned aerial vehicle position and attitude information, and providing data support for the decision of the control layer. The specific work flow of each module is as follows: The OPENMV vision module runs in a grayscale mode and QQVGA resolution. The combination of the mode and the resolution can reduce the data volume and processing time, improve the real-time identification, and enhance the image clarity to meet the identification requirements. After the module is powered on, the ground landing target image is continuously collected, and different optimization identification algorithms are executed for different target types. If the target is a rectangle, first, the collected grayscale image is subjected to an erosion filtering operation to eliminate small noise points and interference pixels in the image, remove the interference frame formed by the non-target area, and reduce the subsequent identification error. Then, the binary processing is performed to convert the grayscale image into a black and white binary image, highlight the contour edge of the rectangular target, and then call the rectangle detection algorithm to traverse the contour features in the binary image, filter out the rectangular area that meets the preset size and proportion range, determine it as the target area, and finally calculate the pixel coordinates of the center of the rectangular area and compare them with the image center pixel coordinates to output the position deviation data of the two in the horizontal and vertical directions to provide the target alignment basis for the control layer to adjust the unmanned aerial vehicle attitude.

[0022] If the target is a circle, first, the grayscale image is subjected to a contrast enhancement processing to stretch the image grayscale value range and improve the brightness difference between the circular target and the background. Then, the Hough transform algorithm is used to detect the circular contour of the enhanced image, accumulate the pixel points in the image that meet the circular equation, and determine the center pixel coordinates of the circular target. To reduce the coordinate fluctuation caused by environmental jitter, the module performs a median filtering operation on the center coordinates detected by the continuous 5 frames of images to output the smooth center position deviation data after removing the outliers.

[0023] If the target is a black line, first, the morphological filtering is performed to fill the gap in the line by combining the dilation and erosion operations to enhance the continuity of the line. Then, the edge detection is performed to extract the edge pixels of the black line and determine the line direction. Subsequently, the Hough transform is used to solve the slope and intercept parameters of the line, and the line parameters are converted into the heading deviation and roll deviation based on the current image collection angle of the unmanned aerial vehicle to finally calculate the control amount basis data for adjusting the heading and roll attitude of the unmanned aerial vehicle.

[0024] The optical flow module integrates a laser time-of-flight sensor, which calculates the real-time distance between the UAV and the ground, i.e., height data, based on the speed of light and the time difference of the laser round trip, by emitting a laser beam and receiving the reflected beam, meeting the precision requirements of height control during landing. At the same time, the module analyzes the displacement changes of the pixel points in adjacent frames of images, combines the UAV flight speed and time parameters, and solves the position coordinates of the UAV in the horizontal plane, ensuring that the horizontal position offset of the UAV is reflected in real time. During the landing process, the optical flow module continuously transmits height data and horizontal position coordinates to the main MCU of the control layer. When the height data drops to 0.3 m, the landing stage switching of the execution layer is triggered. If the horizontal position coordinate deviation exceeds the preset tolerance, the sensor fault handling program is triggered.

[0025] The attitude sensor adopts a combination scheme of three-axis gyroscope and three-axis accelerometer, which collects the angular velocity and acceleration data of the UAV in three-dimensional space, solves the pitch angle, roll angle and heading angle of the UAV, and ensures that the attitude changes of the UAV are captured in real time. During operation, the sensor continuously transmits the three attitude angle data to the main MCU, and the main MCU combines the target deviation data output by the OPENMV vision module to determine whether the current attitude of the UAV meets the requirements of aligning the target. If the attitude angle deviation exceeds the allowed range, the corresponding attitude adjustment control quantity is generated.

[0026] Specifically, as shown in Figure 2 The specific process of the UAV system in the autonomous mode for takeoff and initial positioning is as follows: Start and hardware initialization: the system is powered on, and the main MCU, auxiliary MCU, OPENMV vision module, optical flow module and attitude sensor complete self-checking and parameter initialization, and enter the standby state.

[0027] Obtain data images: after the operator controls the UAV to take off manually through the remote controller, the main MCU receives the mode switching instruction, and then commands the OPENMV vision module to start, continuously collecting ground image data in grayscale mode and QQVGA resolution.

[0028] Binary processing: the OPENMV vision module performs binary processing on the collected grayscale image, converts the image to a black and white binary image according to the preset grayscale threshold, and separates the potential target area and background.

[0029] Edge detection: the binary image is subjected to edge detection operation, which strengthens and extracts the contour features of the target object, preparing for subsequent shape recognition and parameter solving.

[0030] Linear regression: for targets with directionality such as black lines, linear regression analysis is performed on the pixel point set obtained by edge detection, and the linear equation of the line is fitted, and then the included angle of the line relative to the direction of the UAV nose is solved.

[0031] Control algorithm: The main MCU receives data from the sensing layer modules, including the target position deviation, the real-time height and attitude angle of the UAV. Based on these data, the main MCU runs the integral separation PID control algorithm to calculate the control amount for correcting the pitch, roll and heading angle of the UAV.

[0032] Output control key: The main MCU sends the calculated attitude control amount to the auxiliary MCU through the I2C interface.

[0033] Comparison condition: The main MCU continuously compares the deviation of the target center from the image center and the current attitude of the UAV from the target attitude to determine whether the conditions for entering stable hovering or the next landing are met. If not, return to "get data image" to continue adjusting; if so, it indicates that the takeoff and initial alignment phase is complete.

[0034] Generation: The auxiliary MCU generates multi-channel PWM control signals with corresponding duty cycles based on the received control amount and transmits them to the flight control module to drive the power components to perform specific attitude adjustment actions, completing the closed-loop control of takeoff and target alignment.

[0035] (II) Working principle and operation process of control layer The control layer adopts a dual-MCU division of labor and cooperation architecture, with the main MCU responsible for decision-making and data processing, and the auxiliary MCU responsible for signal conversion. They communicate through the I2C interface to ensure real-time and stability of data transmission, effectively solving the problem of response delay caused by excessive task load of single MCU. The specific work process is as follows: The main MCU, as the decision-making core of the control layer, communicates with the OPENMV vision module, optical flow module and attitude sensor of the sensing layer, and mainly performs the following tasks: Power management: Real-time monitoring of the power supply voltage of each module in the system, when the detected power supply voltage is lower than the preset threshold, automatically cut off the power supply of non-critical modules, and prioritize the power supply of the core modules of the sensing layer and the execution layer to avoid system failure due to insufficient voltage.

[0036] Mode switching: Receive mode switching instructions from the remote control component: manual mode, autonomous mode. When the operator sends an autonomous mode switching instruction through the remote control, the main MCU sends a recognition instruction to the OPENMV vision module to start the autonomous target search and recognition process. If a manual mode instruction is received, the autonomous control program is suspended and control is handed over to the operator.

[0037] Visual data analysis: Receive target recognition results and position deviation data from the OPENMV vision module, combine with the current attitude angle data transmitted by the attitude sensor, and correct the deviation data through the visual data analysis module: Proportional term control amount calculation: multiply the corrected true target deviation by the preset proportional coefficient. The proportional term can quickly respond to the current deviation and achieve preliminary attitude adjustment.

[0038] Integral term control amount calculation: only when the absolute value of the current deviation is less than the set threshold, the current deviation is added to the integral term, to avoid excessive accumulation of the integral term when the deviation is large, causing overshoot; if the deviation exceeds the threshold, the integral term is reset to zero, ensuring the stability of the control amount.

[0039] Derivative term control amount calculation: multiply the difference between the current deviation and the deviation at the last time by the derivative coefficient. The derivative term can predict the trend of the deviation and suppress the oscillation during the attitude adjustment process. The main MCU adds the proportional term, integral term, and derivative term control amounts to obtain the final pitch, roll, and heading angle control amounts.

[0040] Landing decision: combine the height data and horizontal position coordinates transmitted by the optical flow module to determine whether the UAV meets the landing conditions.

[0041] Abnormality handling: real-time monitoring of the data transmission state of the perception layer. If the OPENMV vision module does not output the target recognition result for the first preset time, it is determined that the target is lost, and the target loss handling subroutine is executed: control the UAV to fly forward at a preset speed, and lower the threshold of the OPENMV vision module recognition algorithm to expand the recognition range until the target is detected again. If the horizontal position coordinate deviation transmitted by the optical flow module exceeds the preset tolerance, it is determined that the sensor is faulty, and the backup height-keeping mode is switched to, and the LED red light is controlled to flash at a frequency of 1 Hz to alert the operator to intervene in an emergency.

[0042] The auxiliary MCU establishes communication with the main MCU through the I2C interface, converts the attitude control amounts generated by the main MCU into PWM control signals recognizable by the execution layer, and the specific working process is as follows: Signal reception: receive the pitch, roll, and heading angle control amounts transmitted by the main MCU at a frequency of 50 Hz. Each frame of control amount contains adjustment parameters for three attitude angles.

[0043] PWM signal generation: map the attitude control amounts to PWM signals with a duty cycle of 1000-2000us through the PWM signal generation module.

[0044] Signal transmission: transmit the generated multi-channel PWM control signals to the flight control module of the execution layer. The transmission frequency is consistent with the frequency of receiving the main MCU control amounts, ensuring the continuity and real-time performance of the control signals.

[0045] (Three) Working principle and running process of the execution layer The execution layer receives the PWM control signal output by the control layer, converts it into the physical action of the UAV, realizes attitude adjustment and landing operation, and is the final execution link of the system control command. The specific work flow is as follows: The flight control module, as the control core of the execution layer, receives the PWM control signal transmitted by the auxiliary MCU, performs attitude calculation and motor speed instruction generation tasks, and the specific process is as follows: Signal analysis: decode the received PWM control signal and extract the adjustment parameters of pitch, roll and heading angle.

[0046] Attitude calculation: combine the current attitude angle data transmitted by the attitude sensor to perform secondary calculation on the attitude adjustment amount.

[0047] Speed instruction generation: calculate the required speed difference of the motor according to the calculated target attitude angle.

[0048] The power assembly is composed of a motor and an electronic speed regulator, which receives the speed instruction of the flight control module, performs speed regulation, realizes the attitude adjustment and lifting motion of the UAV, and the specific process is as follows: Instruction receiving: the electronic speed regulator receives the motor speed instruction transmitted by the flight control module, each instruction corresponds to a motor, and the receiving frequency is consistent with the output frequency of the flight control module.

[0049] Speed regulation: the electronic speed regulator adjusts the input voltage and current of the motor according to the speed instruction to control the motor speed.

[0050] Landing execution: in the two-stage landing process, the power assembly performs speed regulation in different stages according to the instructions of the flight control module: Fast descent stage: the flight control module generates a speed instruction corresponding to a throttle PWM signal of 1300us according to the landing instruction of the main MCU, and the electronic speed regulator controls the motor speed to reduce to a preset value of 1200rpm, so that the UAV descends at a speed of 0.5m / s; In this stage, the optical flow module continuously transmits height data, and the flight control module adjusts the motor speed according to the height data to ensure the stability of the descent speed.

[0051] Slow landing stage: when the optical flow module detects that the height of the UAV is reduced to 0.3m, the main MCU sends a stage switching instruction to the auxiliary MCU, the auxiliary MCU reduces the throttle PWM signal to 1100us, the flight control module generates a lower motor speed instruction of 1000rpm, and the electronic speed regulator controls the motor speed to further reduce the speed, so that the UAV lands slowly at a speed of 0.1m / s, avoiding the shaking of the machine body or the damage of the goods caused by the too fast landing speed.

[0052] The remote control assembly includes a remote controller and a receiver, mainly used for manual take-off, mode switching and emergency intervention, and is the manual control backup of the system. The specific work flow is as follows: Manual take-off: After the system is powered on and initialized, the operator sends a manual take-off instruction through the remote controller. The receiver receives the instruction and transmits it to the main MCU. The main MCU suspends the autonomous control program and transfers the attitude control right to the operator. The operator adjusts the throttle, pitch, roll, and heading through the joystick of the remote controller to control the UAV to take off until it reaches the preset height.

[0053] Mode switching: When the UAV reaches the preset height and achieves hovering, the operator sends an autonomous mode instruction through the mode switching button on the remote controller. The receiver transmits the instruction to the main MCU, which starts the autonomous target search and recognition process. The system switches from manual mode to autonomous mode. If an abnormality occurs during autonomous landing, the operator can switch back to manual mode through the mode switching button for emergency intervention.

[0054] Emergency intervention: When the main MCU executes the exception handling subroutine and still cannot solve the problem, the operator can directly send an emergency landing or manual adjustment instruction through the remote controller. The receiver receives and transmits the emergency instruction first. The main MCU suspends the current autonomous program and executes the emergency instruction to ensure the safety of the UAV.

[0055] Specifically, as shown in Figure 3 the specific process of the UAV system for autonomous precision landing is as follows: Start and hardware status confirmation: After completing take-off and target stable alignment, the system confirms that each hardware module is working normally, and the main MCU issues a permission to land instruction.

[0056] Obtain grayscale image: The OPENMV vision module continuously collects ground target images in grayscale mode during landing to ensure stable tracking of the target during height changes.

[0057] Binaryzation: Each frame of image is processed in real time to adapt to changes in light and shadow at different heights, ensuring the saliency of target features.

[0058] Edge detection: The edge detection accurately locks the outline of the target, providing data basis for calculating the precise geometric center or feature point of the target in the image.

[0059] Hough transform: For specific landing targets such as circles, the Hough transform algorithm is used to detect the circular outline of the target from the edge image and accurately calculate the pixel coordinates of the center of the circle in the image.

[0060] Calculate the center coordinates: Compare the identified center coordinates with the image center coordinates to calculate the position deviation of the UAV in the horizontal plane.

[0061] Control key operation: the main MCU synthesizes the real-time height data provided by the position deviation and optical flow module and the attitude sensor data, runs the integral separation PID control algorithm again, calculates the control amount for fine-tuning the horizontal position and attitude of the UAV during landing, and sends it to the auxiliary MCU.

[0062] Output control key: the auxiliary MCU receives the control amount and converts it into a stable PWM signal output to the flight control module.

[0063] Two-stage landing: the system makes conditional judgments according to the real-time height feedback by the optical flow module: when the height is higher than 0.3 meters, the fast descent stage is executed, the auxiliary MCU adjusts the throttle PWM signal to 1300us, and the UAV descends at a speed of about 0.5m / s; when the height detection decreases to 0.3 meters, the slow landing stage is triggered, the auxiliary MCU reduces the throttle PWM signal to 1100us, and the UAV slowly lands at a speed of about 0.1m / s.

[0064] Blocking: during the landing process, if the target is lost or the sensor data is abnormal, etc., the main MCU will immediately "block" the current landing instruction flow and trigger the corresponding exception handling subroutine until the problem is solved or taken over by the operator.

[0065] End: when the optical flow module or the contact sensor confirms that the UAV has landed smoothly, and the motor stops rotating, the entire autonomous precise landing process ends.

[0066] In summary, through the coordinated operation of the perception layer, the control layer and the execution layer, the embodiment realizes the UAV autonomous precise landing process based on dual MCU and machine vision. The OPENMV vision module of the perception layer accurately obtains the position deviation of different targets through differentiated optimization of the recognition algorithm, and the optical flow module and the attitude sensor provide real-time position and attitude data. The dual MCU architecture of the control layer solves the single MCU algorithm power bottleneck, the integral separation PID algorithm of the main MCU ensures the accuracy of the attitude control amount, and the PWM signal conversion of the auxiliary MCU ensures the continuity of the control signal. The power components of the execution layer realize the smooth landing of the UAV through two-stage landing control, and the remote control components provide artificial backup guarantee, effectively solving the problems of control delay, insufficient recognition robustness and single landing strategy in the prior art, and meeting the actual application requirements of UAV autonomous precise landing.

[0067] Embodiment two This embodiment is based on the aforementioned dual-MCU and machine vision unmanned aerial vehicle autonomous precise landing system. For the operation scene including material handling, autonomous pinpoint landing, and line following flight, the operation area division and task requirements of each link are clearly defined. Combined with the system hardware characteristics and algorithm advantages, manual operation and autonomous control strategies are designed respectively. In the material handling link, the operation efficiency is guaranteed through the multi-mode control of the remote controller and the flight control self-stabilization function; in the autonomous pinpoint landing link, the target recognition algorithm is optimized to solve the problem of weak anti-interference of traditional recognition methods; in the line following flight link, Hough transform is used to realize line and circular target recognition, and integral separation PID control is used to improve the flight and landing stability, which fully verifies the applicability and reliability of the system in multi-task scenarios.

[0068] As shown in Figure 3 , it is a flight area diagram for aerial robot special operation. The operation process is divided into three links, and the task requirements and area division of each link are as follows: Operation area and task rules The flight area includes take-off area A, material storage area B, material target area C, line following start point area E, line following crossing area F, line following landing area G, and 8 optional autonomous landing starting points S1-S8; The first link is material handling: the operator places the unmanned aerial vehicle at the specified take-off position in area A, controls the unmanned aerial vehicle to take off from area A, goes to area B to grab 6 materials of the same shape but different colors, and carries them to the corresponding target area in area C according to color, and returns to area A after completion; The second link is autonomous pinpoint landing: after completing the first link, the unmanned aerial vehicle can be maintained for no more than 1 minute; one of S1-S8 is randomly selected as the starting point, and the operator places the unmanned aerial vehicle at the starting point. The unmanned aerial vehicle needs to land at the specified pinpoint landing area P after taking off autonomously; The third link is line following flight: after completing the second link, the unmanned aerial vehicle can be prepared for maintenance for no more than 1 minute; the unmanned aerial vehicle takes off autonomously from area E, flies along the preset black line and crosses area F, and finally lands autonomously in area G. During flight, it needs to keep moving along the center of the black line, the flight height is limited to 1-2 meters, and it must not exceed the specified operation area boundary.

[0069] First link: material handling (manual operation mode) Control mode design: three manual control sub-modes are set on the remote controller, all of which are realized by position control. Specifically: mode one: full manual attitude control, the operator directly controls the pitch, roll, heading, and throttle of the unmanned aerial vehicle; mode two: semi-automatic position control, the flight control assists in maintaining height stability, and the operator only controls the horizontal position and heading; mode three: heavy lifting special mode, the flight control enhances the attitude self-stabilization function, suitable for heavy lifting scenarios; Signal transmission and attitude control: The operator sends control commands via remote control, and the receiver transmits the commands to the main MCU; the main MCU processes and filters the commands and sends them to the auxiliary MCU; the auxiliary MCU converts the commands into 50Hz PWM signals and transmits them to the flight control module; the flight control module combines the attitude data collected by the built-in gyroscope / accelerometer to perform attitude calculations and control the power components to adjust the motor speed, thereby achieving attitude and position control of the UAV; Stability assurance during heavy lifting: After the drone grabs the material, the flight control's closed-loop PID program combines the horizontal position data from the optical flow module with the altitude data from the laser ToF sensor to automatically activate the attitude self-stabilization function; if the drone is detected to tilt due to load changes, the flight control immediately adjusts the speed of the corresponding motor to quickly restore balance. Optical flow drift avoidance: When operating on a flat surface without obvious texture features, the optical flow module is prone to horizontal position detection drift; therefore, when operating manually, the operator should avoid the drone hovering over such a surface for a long time. If it is necessary to stay, the position should be manually fine-tuned through the remote control to compensate for the optical flow drift error.

[0070] Second stage: Autonomous landing (autonomous mode) Core functional objectives: To achieve fully autonomous control of the entire process from one-click takeoff to altitude hold and hovering, target search, attitude alignment, and precise landing, with a focus on solving the problems of anti-interference performance of P-mark recognition and landing accuracy; Analysis of the shortcomings of traditional recognition schemes: The initial attempt to locate the target based on the diagonal features of the concentric rectangles surrounding the P mark has two shortcomings: First, the rectangle's line width is only 2mm, making it susceptible to interference from ambient light and background clutter, resulting in a low image signal-to-noise ratio and a recognition accuracy of less than 70%; Second, to fully capture the rectangle's features, the drone needs to fly at an altitude of more than 3 meters, which increases the altitude detection error of the laser ToF sensor, and the image acquisition angle can easily cause target deformation, further reducing the robustness of recognition. Optimized recognition scheme design: A simplified scheme that directly identifies the subject of the P-mark is adopted, and the specific process is as follows: Image preprocessing: The OPENMV vision module starts grayscale mode and QQVGA resolution, skips the first 2000 frames of noisy images, and then performs 3×3 structural unit erosion filtering on the acquired P-marked image to filter out interference lines less than 2mm wide. Binarization: The image is binarized using a grayscale threshold of 190-255 to separate the subject (P) from the background, forming a black and white contrast image. Rectangular feature extraction: Using OpenMV, a detection threshold of 4000 is set to filter rectangular regions with a width and height both within the range of 9-25 pixels; if multiple rectangles that meet the criteria are detected, the average value of the rectangle centers is calculated using median filtering and used as the P-marker center coordinates; Parameter optimization: according to the actual size of the work area P mark and the height of the UAV operation, adjust the screening range and detection threshold; Autonomous control process: Take-off height: the operator sends autonomous take-off instructions through the remote controller, and the auxiliary MCU gradually increases the throttle PWM signal from 1000us to 1500us to control the vertical take-off of the UAV; when the optical flow module detects that the height reaches 1.2m, the main MCU triggers the height setting program, and the flight control maintains the height stable through the height closed loop PID control, while the optical flow module suppresses the horizontal drift to realize the fixed-point hovering; Target search: the main MCU sends P mark identification instructions to OPENMV, and OPENMV outputs the horizontal and vertical deviations of the P mark center from the image center every 100ms; if no target is detected for 500ms, the main MCU controls the auxiliary MCU to adjust the heading angle PWM signal, so that the UAV slowly rotates at a speed of 0.5 rad / s to expand the search range until a target is detected; Attitude alignment: after the main MCU receives the deviation data output by OPENMV, it calculates the pitch angle and roll angle control amount combined with the integral separation PID algorithm; when the absolute value of the deviation is > 4 pixels, only the proportional term and the differential term are used to avoid integral saturation; when the absolute value of the deviation is ≤ 4 pixels, the integral term is enabled to gradually eliminate static deviation; the control amount is sent to the auxiliary MCU through the I2C interface, and then converted into PWM signal and transmitted to the flight control to adjust the attitude of the UAV, so that the center of the P mark gradually aligns with the center of the image; Two-stage landing trigger: the main MCU monitors the deviation state through the internal timer, and if the absolute values of the horizontal and vertical deviations are both < 4 pixels and the state lasts ≥ 0.5s, it is determined that the landing condition is met; the main MCU sends the landing start instruction to the auxiliary MCU to start the two-stage landing process; Two-stage landing execution: Fast descent phase: the auxiliary MCU reduces the throttle PWM signal from 1500us to 1300us, and the flight control reduces the motor speed, so that the UAV descends vertically at a speed of 0.5m / s; the optical flow module feeds back the height data every 50ms, and the main MCU monitors the height change in real time; Slow landing phase: when the optical flow module detects that the height decreases to 0.3m, the main MCU triggers the slow landing subprogram, and the auxiliary MCU gradually reduces the throttle PWM signal from 1300us to 1100us at a step of 50us; the flight control controls the motor speed to slow down, and the UAV lands smoothly at a speed of 0.1m / s to avoid the UAV bouncing up due to too fast landing speed; Confirmation after landing: After landing, the flight control detects that the motor speed drops to the minimum and lasts for 1 second, sends a landing completion signal to the auxiliary MCU; the auxiliary MCU returns the signal to the main MCU, the main MCU controls the LED indicator light to be always on, prompting the successful landing, and at the same time cuts off the unnecessary power supply of OPENMV and the optical flow module, reducing power consumption.

[0071] Third link: line following flight and autonomous landing (autonomous mode) Core function target: realize "fixed-height take-off-line following flight-circular target recognition-precise landing" autonomous control, focus on solving the problems of line following precision and circular target positioning stability; Line following control scheme: Image acquisition and preprocessing: OPENMV vision module uses grayscale mode and QQVGA resolution to acquire images of the ground black line; 1x1 morphological filtering is performed to remove salt and pepper noise, and dynamic grayscale thresholding is used for binary processing to highlight the line profile; Canny edge detection algorithm is used to extract line edge features; Line parameter solution: Hough transform is used to solve the polar coordinate parameters (p, q) of the line. p is the vertical distance between the line and the image origin, and q is the angle between the line and the positive direction of the image y-axis; q is corrected to -90°-90°. When q>90°, q=q-180°, so that q<0° represents left deviation of the line, q>0° represents right deviation of the line, and the control logic is simplified; Control quantity calculation and optimization: weighted fusion strategy is used to calculate the control quantity, specifically: roll control quantity=0.3x p control quantity+0.7x q control quantity; p control quantity is used to compensate for the horizontal deviation of the line from the image center, and q control quantity is used to correct the deviation of the line direction from the UAV heading; At the same time, the forward speed is dynamically adjusted according to the degree of line curvature: if the absolute value of q is <5°, the forward speed corresponding to the PWM signal is 1550us; if the absolute value of q is >5°, the forward speed is reduced to 1500us to avoid off-line caused by excessive speed; Line following stability guarantee: OPENMV outputs line parameters every 50ms, the main MCU combines the horizontal position data of the optical flow module, and if it is detected that the UAV deviates from the line center by >3cm, the roll control quantity is immediately increased to quickly return to the line center; the flight control collects real-time gyroscope attitude data, and if the roll angle deviation is >2°, the motor speed is automatically corrected to maintain the body level; Circular target recognition and landing control: Recognition scenario: 4 concentric circular targets are set at the landing point in G area, and the UAV needs to identify and align with the center of the innermost circle for landing; Algorithm optimization: To solve the problem of high memory occupation and long detection period in circular recognition, a half-radius level detection and multi-circle fitting scheme is used, as follows: Half radius detection: OPENMV detects the circular target in four times by 28-30 pixels, 30-32 pixels, 32-34 pixels, and 34-36 pixels radius range respectively. Each time only processes the pixel data in the corresponding radius range, reduces the single operation amount, and shortens the detection period from 200 ms to 100 ms; Multi-circle fitting: If ≥3 circles are detected at a time, calculate the average of all circle center x-axis and y-axis coordinates as the final target center. If only 1-2 circles are detected, call the median filter, supplement the missing values based on the circle center data of the previous 5 detections, and avoid positioning deviation caused by single circle detection error; Landing control: When the UAV flies to the G area 2 meters above, the main MCU switches the OPENMV working mode to circle recognition. If a circular target is detected, calculate the control amount based on the integral separation PID algorithm, adjust the UAV attitude, and make the circle center align with the image center. When the deviation is <3 pixels and lasts for 0.5 s, start the two-stage landing process, and finally achieve the landing with a precision of ±2 cm of the circular target center; Inertial matching processing: Since the circle recognition detection period is close to the control inertia time constant of the UAV, it may cause intermittent control output. Therefore, a 100 ms delay compensation mechanism is set: if no circular target is detected for 100 ms, the auxiliary MCU keeps the last PWM control amount unchanged to avoid loss of control of the UAV attitude due to control interruption. If no target is detected for 500 ms, start the target loss processing flow.

[0072] Abnormal processing and emergency intervention Target loss processing: In autonomous mode, if OPENMV does not output valid target data for 1.5 s, the main MCU determines that the target is lost. Immediately control the auxiliary MCU to adjust the pitch angle PWM signal to 1600us, making the UAV fly forward at a speed of 0.3 m / s to expand the search range. At the same time, the main MCU reduces the OPENMV recognition threshold and improves the target detection probability. If no target is re-identified for 5 s, the main MCU triggers the emergency return, controls the UAV to return to the take-off point and hover, and waits for the operator to manually intervene; Sensor fault processing: If the horizontal deviation feedback by the optical flow module is >10 cm and lasts for 200 ms, the main MCU determines that the optical flow module is faulty. Immediately switch to laser height fixing + gyroscope auxiliary mode: only rely on the laser ToF sensor to maintain height stability, calculate the horizontal position change based on the attitude data collected by the gyroscope, and compensate for the position detection loss caused by the optical flow module failure. At the same time, control LED1 red light to flash at a frequency of 1 Hz to alert the operator. If the fault lasts for 10 s, the main MCU triggers the emergency landing, and lands at the current position according to the two-stage landing process to avoid the risk of long-time fault flight; Manual emergency intervention: in the operation process of each link, if the operator observes the abnormal unmanned aerial vehicle through the remote controller, the emergency switching button of the remote controller is pressed for a long time, the system is forced to switch from the autonomous mode to the manual mode; the auxiliary MCU stops receiving the main MCU control instruction immediately, and responds to the remote controller instruction preferentially, so that the operator can manually control the unmanned aerial vehicle to adjust the position or return, and the operation safety is ensured In summary, by applying the unmanned aerial vehicle autonomous precise landing system in the multi-link operation scene, the effectiveness of the collaborative system and the feasibility of the method are verified. In the material handling link, the multi-mode design of the remote controller and the flight control closed-loop PID combined with laser and optical flow height stabilization function solve the attitude balance problem during heavy lifting, and avoid the influence of featureless plane optical flow drift. The autonomous pinpoint landing link improves the robustness and accuracy of P sign recognition by simplifying the target recognition process and optimizing the rectangular detection parameters. The two-stage landing strategy effectively avoids landing impact deviation. The line following flight link realizes accurate identification of line and circular targets by means of Hough transform, and solves the problems of high memory occupation and long detection period of the circle searching algorithm through parameter correction and control amount weighting optimization, ensuring the line following precision and landing stability. Overall, the embodiment fully utilizes the advantages of dual MCU division and cooperation, optimized machine vision algorithm and two-stage landing strategy, and provides practical reference for the application of the system in similar multi-task scenarios.

[0073] The above is only a preferred embodiment of the present application, and does not limit the present application in any form. Although the present application has been disclosed as above, it is not intended to limit the present application. Any person skilled in the art can make some changes or modifications to the above disclosed technical content to obtain equivalent embodiments with equivalent changes, without departing from the scope of the technical solution of the present application. Any modification, equivalent change and modification of the above embodiments based on the technical essence of the present application are still within the scope of the technical solution of the present application.

Claims

1. A dual MCU and machine vision based autonomous precision landing system for UAVs, characterized in that, The system comprises a perception layer, a control layer and an execution layer; The perception layer is configured to collect environmental data required for the landing of the unmanned aerial vehicle, and comprises: an OPENMV vision module configured to collect images of a ground landing target in a grayscale mode and a QQVGA resolution, and to process and identify the images to output a target identification result and a position deviation; a light flow module integrated with a laser time-of-flight sensor and configured to output horizontal position coordinates and real-time height data of the unmanned aerial vehicle; an attitude sensor configured to collect a pitch angle, a roll angle and a heading angle of the unmanned aerial vehicle; The control layer adopts a dual-MCU division and cooperation architecture, and comprises: a main MCU in communication connection with the perception layer and configured to perform power management, mode switching, visual data analysis, landing decision and exception handling, and to generate control amounts of the pitch angle, the roll angle and the heading angle based on data of the perception layer; an auxiliary MCU in communication connection with the main MCU and configured to receive the control amounts sent by the main MCU and convert the control amounts into multi-channel PWM control signals; The execution layer is in communication connection with the control layer, receives control signals output by the control layer and converts the control signals into physical actions of the unmanned aerial vehicle to realize attitude adjustment and landing operation, and comprises: a flight control module configured to receive the PWM control signals generated by the auxiliary MCU, perform attitude calculation and output motor speed instructions; a power assembly configured to adjust the speed according to the instructions of the flight control module to realize attitude adjustment and lifting motion of the unmanned aerial vehicle; a remote control assembly comprising a remote controller and a receiver for manual take-off, mode switching and emergency intervention. 2.The unmanned aerial vehicle autonomous precision landing system based on dual MCU and machine vision of claim 1, wherein, The OPENMV vision module of the perception layer adopts a grayscale mode and a QQVGA resolution to collect images of a ground landing target, and to perform image processing and identification, specifically comprising: rectangular target identification: removing interference frames through erosion filtering, calling a rectangular detection algorithm to screen targets after binarizing the image, and calculating the deviation of the center of the rectangle from the center of the image; circular target identification: detecting the target center through contrast enhancement and Hough transform, and smoothing the deviation in combination with median filtering; black line identification: calculating the heading and roll control amounts by solving the line parameters through morphological filtering and edge detection. 3.The unmanned aerial vehicle autonomous precision landing system based on dual MCU and machine vision of claim 1, wherein, The main MCU of the control layer communicates with the auxiliary MCU through an I2C interface, the main MCU is responsible for generating control amounts of the pitch angle, the roll angle and the heading angle, the auxiliary MCU converts the control amounts into PWM signals and transmits the PWM signals to the flight control module, specifically comprising: a visual data analysis module of the main MCU: processing the identification result output by the OPENMV vision module, and calculating the control amounts in combination with an integral separation PID algorithm; a PWM signal generation module of the auxiliary MCU: converting the control amounts of the main MCU into PWM signals of 1000-2000us, and adjusting the motor speed through the flight control module.

4. The autonomous precision landing system for UAVs based on dual MCUs and machine vision of claim 1, wherein, The power assembly of the execution layer comprises a motor and an electronic speed regulator, the motor receives the flight control instructions to adjust the speed, realizes the lifting and attitude adjustment of the unmanned aerial vehicle, and controls the unmanned aerial vehicle to perform two-stage landing, comprising: a rapid descent phase, in which the throttle PWM signal is adjusted to 1300us to make the unmanned aerial vehicle descend at a speed of 0.5m / s; Slow landing stage, by reducing the throttle PWM signal to 1100us, the UAV landed at a speed of 0.1m / s.

5. A method for autonomous and precise landing of a UAV based on dual MCUs and machine vision, applicable to the autonomous and precise landing system of the UAV based on dual MCUs and machine vision according to any one of claims 1-4, characterized in that, The specific steps of the method are: S100, system initialization and manual take-off height setting: after the system is powered on and initialized, the operator controls the UAV to take off manually through the remote controller, and when the optical flow module detects that the UAV reaches the preset height, the main MCU triggers the height setting program to make the UAV realize point hovering; S200, autonomous target search and identification: the operator switches to the autonomous mode, the main MCU sends an identification instruction to the OPENMV vision module according to the preset task, the OPENMV vision module executes an optimized identification algorithm for different targets, and outputs target deviation data; S300, attitude alignment and stability judgment: the main MCU receives the identification result, calculates the control amount in combination with the integral separation PID algorithm, and sends it to the auxiliary MCU through the I2C interface, the auxiliary MCU converts the control amount into a PWM signal and transmits it to the flight control module, adjusts the motor speed to make the UAV align with the target, and the main MCU judges whether the deviation between the target center and the image center meets the landing condition; S400, two-stage precise landing: the main MCU sends a landing instruction to the auxiliary MCU, the auxiliary MCU adjusts the throttle PWM signal to realize the fast descent stage, and when the optical flow module detects that the height is reduced to 0.3m, the main MCU triggers the slow landing stage, and the auxiliary MCU adjusts the throttle PWM signal to realize the slow landing; S500, target loss processing: in the autonomous landing process, when the target is lost or the sensor fails, the main MCU executes the corresponding exception handling subroutine.

6. The method of claim 1, wherein the method further comprises: In S200, the optimized identification algorithm executed by the OPENMV vision module includes: For rectangular targets, perform erosion filtering and binary processing to filter target rectangles, calculate the deviation between the center and the image center, and use median filtering for smoothing; For circular targets, perform Hough transform to detect target centers, and use median filtering to smooth the center coordinate deviation; For black lines, perform edge detection and Hough transform to solve line parameters, and calculate heading and roll control amounts by linear weighting.

7. The method of claim 1, wherein the method further comprises: In S300, the specific implementation of the integral separation PID algorithm includes: Proportional term control amount = current deviation × proportional coefficient; Integral term control amount, only accumulated when the absolute value of the current deviation is less than the set threshold, otherwise the integral term is zero; Derivative term control amount = derivative coefficient × (current deviation - last time deviation). 8.The method of claim 1, wherein, In S500, the exception handling subroutine specifically includes: Target loss processing: when the OPENMV vision module does not detect the target within a continuous first preset time, the main MCU controls the UAV to fly forward at a preset speed, and reduces the threshold of the optimized identification algorithm until the target is re-identified; Sensor failure processing: when the horizontal deviation detected by the optical flow module exceeds the preset tolerance, the main MCU switches to the backup height setting mode assisted by the laser height setting and the gyroscope, and controls the LED red light to flash to alarm.