UAV flight control method and system based on optical flow positioning

By installing multiple optical flow sensors and real-time data fusion technology on the drone, a full range of environmental dynamic maps are generated, which solves the problem of unstable GPS signals in traditional drone navigation in complex environments and achieves high-precision and flexible flight. control, improving the accuracy and safety of task execution and reducing system costs.

CN118534823BActive Publication Date: 2024-10-15SHENZHEN YILUSHI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410992322.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-10-15
Estimated Expiration
2044-07-23

AI Technical Summary

Technical Problem

Traditional drone navigation relies on GPS, resulting in unstable or unavailable GPS signals in complex geographical environments, making it difficult to achieve small-scale obstacle avoidance and precision operations. Existing visual or laser sensor technology is sensitive to ambient light and has low data fusion efficiency, making it difficult to Reflect environmental changes in real time.

Method used

Multiple optical flow sensors are installed in different directions of the drone, and real-time data fusion and advanced optical flow algorithms are used to generate a full range of environmental dynamic maps, calculate pixel displacement and dynamic object movement trends, adjust the drone's heading, speed and altitude, and use Adaptive algorithms optimize flight paths.

Benefits of technology

It achieves high-precision positioning and flexible operation of UAVs in complex environments, improves the accuracy and safety of task execution, reduces system costs and energy consumption, and is suitable for a variety of application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118534823B_ABST
    Figure CN118534823B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of unmanned aerial vehicle flight control technology, and in particular to an unmanned aerial vehicle flight control method and system based on optical flow positioning, comprising the following steps: S1: collecting environmental image data obtained from multiple angles; S2: generating a full range of environmental dynamic images; S3: calculating pixel displacement, and analyzing the relative motion of dynamic objects and static backgrounds in the image; S4: obtaining the three-dimensional velocity vector and azimuth angle information of the unmanned aerial vehicle relative to the environment, and identifying the movement trend of dynamic objects in the environment; S5: adjusting the heading, speed and altitude of the unmanned aerial vehicle; S6: using an adaptive algorithm to optimize the flight path, thereby improving the safety and efficiency of the flight. The present invention, through real-time fusion and processing of multi-angle image data, realizes accurate positioning and dynamic obstacle avoidance without GPS, thereby significantly improving the flight safety and efficiency of the unmanned aerial vehicle in a complex environment, while reducing the cost and energy consumption of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of unmanned aerial vehicle flight control, and in particular to a unmanned aerial vehicle flight control method and system based on optical flow positioning. Background Art

[0002] With the rapid development of drone technology, they are widely used in logistics and transportation, environmental monitoring, disaster relief and other fields. The navigation of traditional drones relies on the global positioning system (GPS) for spatial positioning. However, in many cases, the GPS signal may become unstable or unavailable due to the obstruction of the geographical environment (such as high-rise buildings in cities, mountainous areas or indoor environments). In addition, the response speed and accuracy of the GPS system for small-scale obstacle avoidance and precision operations in dynamic environments are not sufficient to meet the growing application needs. The development of a drone positioning and navigation technology that does not rely on GPS is of great significance to improving the operational flexibility and mission execution efficiency of drones.

[0003] In the existing technology, although some advanced drones use visual or laser sensors to assist in positioning and obstacle avoidance, these technologies are usually sensitive to ambient light conditions, and the data fusion efficiency is not high when processing high-dynamic scenes, and it is difficult to reflect the rapidly changing conditions in the environment in real time. In addition, these systems often require complex calculations and a large amount of hardware support, which increases the cost and energy consumption of the system.

[0004] Therefore, the present invention aims to use optical flow technology and the camera system of the drone itself to achieve all-round dynamic capture of the environment and efficient data processing, thereby providing a more economical, efficient and stable drone flight control system. Summary of the invention

[0005] Based on the above objectives, the present invention provides a UAV flight control method and system based on optical flow positioning.

[0006] The UAV flight control method based on optical flow positioning includes the following steps:

[0007] S1: Multiple optical flow sensors are configured on the drone and distributed at different positions of the drone to collect environmental image data from multiple angles;

[0008] S2: Based on the image data collected in S1, a full range of dynamic environmental images are generated through real-time data fusion technology;

[0009] S3: Use advanced optical flow algorithms to process the omnidirectional environment dynamic map obtained in S2, calculate pixel displacement, and analyze the relative motion of dynamic objects and static background in the image;

[0010] S4: Based on the data processed by S3, the three-dimensional velocity vector and azimuth angle information of the UAV relative to the environment are obtained, and the movement trend of dynamic objects in the environment is identified;

[0011] S5: adjusting the heading, speed and altitude of the UAV based on the movement trend of the dynamic objects in the environment identified in S4 and the preset flight plan of the UAV;

[0012] S6: Optimize flight paths using adaptive algorithms by continuously monitoring a dynamic picture of the omnidirectional environment and updating flight data in real time.

[0013] Furthermore, the S1 specifically includes:

[0014] S11: Optical flow sensors are fixedly installed at the front, rear, left, right and bottom of the drone, with at least one sensor configured in each direction;

[0015] S12: Each optical flow sensor is equipped with a high-resolution image acquisition module and an advanced image processing module. The image acquisition module continuously captures environmental images through high-speed camera technology, and the image processing module analyzes the captured images in real time and calculates the movement speed and direction of the ground or surrounding objects relative to the drone by comparing the pixel changes between consecutive frames.

[0016] S13: By designing the installation angles of each sensor, the fields of view of two adjacent sensors overlap. The overlapping field of view design allows data to be seamlessly transferred from one sensor to another, providing a continuous and unified environmental image view.

[0017] Furthermore, the S2 specifically includes:

[0018] S21: receiving image data from each optical flow sensor of S1, and performing time synchronization on the images captured by each sensor;

[0019] S22: Apply image alignment technology to process the time-synchronized images. The image alignment technology uses a feature point matching algorithm to spatially align images captured from different sensor perspectives. The calculation formula is: ,in, is the transformed image coordinate; is the original image coordinate, indicating the position of the point in the unaligned image; is the camera intrinsic parameter matrix; represents the rotation and translation matrix from one image to another, where is the rotation matrix, is the translation vector, and the matrix is ​​used to describe and implement the geometric transformation between two images;

[0020] S23: Perform image data fusion, and use the weighted average method to synthesize the aligned images into a full-scale environment dynamic map. The weight is determined by the clarity and image quality of each sensor's viewing angle. The specific calculation formula is: ,in, is the fused image; For the The image of the sensor; For the Image weights for each sensor; is the total number of sensors, indicating the number of sensors involved in the image data fusion process;

[0021] S24: Finally, the fused image is enhanced by using an image enhancement algorithm to optimize image contrast and details.

[0022] Furthermore, the S3 specifically includes:

[0023] S31: receiving the omnidirectional environment dynamic map generated in S2;

[0024] S32: Apply an optical flow algorithm to process the dynamic image received in S31. The optical flow algorithm uses a gradient-based optical flow estimation method to calculate the pixel displacement between two consecutive frames. The specific calculation formula is: ,in, Indicates at time and location The pixel value of and is and Displacement in direction, It is the sum of squares of the difference between the image after displacement and the previous frame, which is used to estimate the optimal displacement;

[0025] S33: Analyze the pixel displacement calculated in S32, identify the dynamic object and static background in the image, and specifically judge the significance of the pixel displacement by setting a threshold to distinguish the dynamic and static areas, wherein the dynamic object is a high displacement value exceeding the threshold, and the static background is a small displacement value less than the threshold;

[0026] S34: Combined with the analysis results of S33, the motion trend of dynamic objects and the stability of static background are extracted, and statistical methods are used to evaluate the average moving speed and direction of dynamic objects, providing the drone with detailed information about the moving and non-moving parts of the environment.

[0027] Furthermore, the S4 specifically includes:

[0028] S41: receiving pixel displacement data and dynamic object motion trend analysis results from S3;

[0029] S42: A 3D reconstruction algorithm is applied to convert the 2D pixel displacement data into a 3D velocity vector, and a 3D model is generated by estimating the relative motion between the UAV and the environment. The formula of the 3D reconstruction algorithm is: ,in, is the three-dimensional velocity vector, is the two-dimensional pixel displacement vector, is the inverse of the camera intrinsic parameter matrix, used to convert from pixel coordinates to actual coordinates, is the distance estimate from the UAV to the target object;

[0030] S43: Calculate the azimuth angle of the UAV relative to its flight environment using an azimuth estimation algorithm. The azimuth estimation algorithm considers the current flight attitude and three-dimensional velocity vector of the UAV to determine its specific direction in space. The azimuth angle calculation formula is: ,in, is the azimuth, and They are the components of the two-dimensional velocity vector on the horizontal plane;

[0031] S44: According to the results of S42 and S43, the movement trend of the dynamic object in the environment is identified and tracked, specifically combining the three-dimensional velocity vector and azimuth information with the motion trajectory of the dynamic object.

[0032] Furthermore, the S44 specifically includes:

[0033] S441: Azimuth obtained from S43 and the three-dimensional velocity vector Provides the current motion state of the dynamic object and initializes the position of the dynamic object according to the current state and speed;

[0034] S442: Apply the uniform linear motion model to predict the future position of the object. Assuming that the object moves at a constant speed in a short period of time, its position changes over time. The specific formula is: ,in, Represents at time The position vector of Represents at time The predicted position vector of Then, the new position is predicted based on the current speed; is the three-dimensional velocity vector; is the time interval, which indicates the time difference between two location updates and is used to calculate the change in location;

[0035] S443: Use azimuth To adjust the direction of movement, the direction adjustment is expressed as a rotation matrix The specific formula is: ,in, represents the adjusted predicted position vector; Represents the rotation matrix, according to the azimuth Generate, used to adjust the direction of the predicted path; is the azimuth, which represents the angle between the forward direction of the drone or dynamic object and the north, and is used to adjust the movement direction to match the actual observation direction;

[0036] S444: Adjust the position Updated with new predicted location.

[0037] Furthermore, the S5 specifically includes:

[0038] S51: Receive from The obtained three-dimensional velocity vector and azimuth information , and the predicted position of the dynamic object ;

[0039] S52: Calculate the adjusted flight parameters based on the preset flight plan of the drone and the data received by S51. Specifically, use the obstacle avoidance algorithm to determine the new heading and speed of the drone. The heading adjustment calculation formula is: ,in, is the current heading angle, is the angle that needs to be adjusted;

[0040] S53: Adjust the flight altitude of the drone to adapt to obstacles on the ground or in the air. When the predicted trajectory shows that an altitude conflict is about to occur, the altitude adjustment formula is: in, is the current flight altitude, It is the height adjustment value calculated based on the obstacle position and safety distance;

[0041] S54: Use the dynamic path planning algorithm to update the speed setting of the drone. The speed adjustment formula is: ,in, is the current flight speed, It is the speed adjustment ratio calculated based on flight conditions and environmental factors.

[0042] Furthermore, the S6 specifically includes:

[0043] S61: Receives flight parameters adjusted from S5, including the heading, speed and altitude information of the drone, as well as the latest data from the dynamic picture of the all-round environment;

[0044] S62: Dynamically optimize the flight path using an adaptive control algorithm. The adaptive control algorithm adjusts the flight parameters based on the difference between the prediction model and the actual flight data. The optimization formula is expressed as: in, Represents at time The optimized predicted position of Represents the current time The predicted position of is the position of the reference trajectory; is the proportional control gain; is the derivative control gain, which is used to adjust the UAV’s response according to the rate of position change; is the change in position;

[0045] S63: Continuously monitor environmental dynamics, including weather changes and obstacle movement, to update flight data and all-round environmental dynamic maps in real time;

[0046] S64: Recalculate the flight path based on real-time data and the adaptive control adjustments in S62;

[0047] S65: Feedback the updated flight data to the flight control system for flight adjustment in the next cycle, forming a closed-loop control system.

[0048] The UAV flight control system based on optical flow positioning is used to implement the above-mentioned UAV flight control method based on optical flow positioning, and includes the following modules:

[0049] Multi-optical flow sensor module: Optical flow sensors are installed at multiple locations on the drone to collect multi-angle environmental image data in real time;

[0050] Data fusion module: receives image data from multiple optical flow sensor modules and generates a full range of dynamic environmental images through real-time data fusion technology;

[0051] Image processing module: uses advanced optical flow algorithms to process the omnidirectional dynamic image of the environment provided by the data fusion module, calculates pixel displacement, and analyzes the relative motion of dynamic objects and static background in the image;

[0052] Flight adjustment module: According to the three-dimensional velocity vector and dynamic object motion trend provided by the image processing module, the heading, speed and altitude of the UAV are adjusted to adapt to the dynamic changes and potential obstacles detected in the environment, and the optimized flight path instructions are generated;

[0053] Flight control unit: receives optimized flight path instructions from the flight adjustment module and implements real-time flight control of the drone, including heading adjustment, speed control, and altitude adjustment.

[0054] Beneficial effects of the present invention:

[0055] The present invention, by adopting a multi-optical flow sensor module, can capture environmental images from multiple directions and realize all-round dynamic monitoring of the environment around the UAV. This method does not rely on external signals such as GPS, so it can still maintain high-precision positioning function in an environment where GPS signals are unavailable. By processing these image data in real time to calculate the position and speed, the UAV can achieve more flexible and precise flight operations in complex and changeable environments, significantly improving the accuracy and safety of mission execution.

[0056] The present invention, through the joint work of the data fusion module and the image processing module, can not only generate an all-round dynamic image of the environment, but also analyze and identify dynamic and static obstacles in the environment in real time. This function enables the flight adjustment module to quickly adjust the heading, speed and altitude of the drone according to real-time data, optimize the flight path, and effectively avoid potential obstacles. This function enhances the adaptive ability of the drone in unknown or hostile environments, and greatly improves the safety and efficiency of the flight process.

[0057] The present invention avoids the reliance on high-cost, high-energy consumption additional sensor hardware by utilizing existing drone cameras and integrated optical flow sensors. Compared with reliance on GPS or other external navigation systems, this image processing-based method greatly reduces the overall cost of the system and the energy consumption during operation. This makes the present invention not only suitable for high-end commercial drones, but also provides a practical flight control solution for low-cost consumer drones, broadening the application areas and market potential of drone technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0059] Figure 1 A schematic diagram of a UAV flight control method according to an embodiment of the present invention;

[0060] Figure 2 Schematic diagram of a UAV flight control system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0061] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.

[0062] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0063] like Figure 1 As shown, the UAV flight control method based on optical flow positioning includes the following steps:

[0064] S1: Multiple optical flow sensors are configured on the drone and distributed at different positions of the drone to collect environmental image data from multiple angles;

[0065] S2: Based on the image data collected in S1, a full range of dynamic environmental images are generated through real-time data fusion technology;

[0066] S3: Use advanced optical flow algorithms to process the omnidirectional environment dynamic map obtained in S2, calculate pixel displacement, and analyze the relative motion of dynamic objects and static background in the image;

[0067] S4: Based on the data processed by S3, the three-dimensional velocity vector and azimuth angle information of the UAV relative to the environment are obtained, and the movement trend of dynamic objects in the environment is identified;

[0068] S5: Based on the movement trend of the dynamic objects in the environment identified in S4 and the preset flight plan of the UAV, the heading, speed and altitude of the UAV are adjusted to adapt to the dynamic changes and potential obstacles detected in the environment;

[0069] S6: Improves flight safety and efficiency by continuously monitoring a dynamic picture of the all-round environment and updating flight data in real time, using adaptive algorithms to optimize flight paths.

[0070] S1 specifically includes:

[0071] S11: Optical flow sensors are fixedly installed at the front, rear, left, right and bottom of the drone, with at least one sensor configured in each direction, to ensure that the drone can capture environmental image data from 360 degrees, covering all viewing angles around the drone, so that environmental information can be obtained in any flight direction;

[0072] S12: Each optical flow sensor is equipped with a high-resolution image acquisition module and an advanced image processing module. The image acquisition module continuously captures environmental images through high-speed camera technology, and the image processing module analyzes the captured images in real time, calculating the speed and direction of the ground or surrounding objects relative to the drone by comparing the pixel changes between consecutive frames. This analysis helps the drone capture tiny image changes, which is crucial for flight control.

[0073] S13: By designing the installation angles of each sensor, the fields of view of two adjacent sensors overlap. The overlapping field of view design allows data from one sensor to another to be seamlessly connected, providing a continuous and unified environmental image view. The overlapping field of view also helps to improve the integrity and accuracy of the image data, especially when the drone turns quickly or encounters a complex environment. These three steps are closely related to each other and work together to ensure that the drone can obtain high-quality image data under any flight conditions, thereby achieving accurate environmental perception and flight control.

[0074] S2 specifically includes:

[0075] S21: receiving image data from each optical flow sensor of S1, and performing time synchronization on the images captured by each sensor to ensure the consistency of the image frames;

[0076] S22: Apply image alignment technology to process the time-synchronized images. The image alignment technology uses a feature point matching algorithm (such as scale-invariant feature transform, SIFT) to spatially align images captured from different sensor perspectives. The calculation formula is: ,in, is the transformed image coordinate, indicating the position of the points in the image in the new coordinate system after spatial alignment; is the original image coordinate, indicating the position of the point in the unaligned image; is the camera intrinsic parameter matrix, which contains the camera's focal length and optical center and other parameters. These parameters help convert the three-dimensional world coordinates into two-dimensional image coordinates. represents the rotation and translation matrix from one image to another, where is the rotation matrix, is the translation vector, and the matrix is ​​used to describe and implement the geometric transformation between two images;

[0077] S23: Perform image data fusion, and use the weighted average method to synthesize the aligned images into a full-scale environment dynamic map. The weight is determined by the clarity and image quality of each sensor's viewing angle. The specific calculation formula is: ,in, The fused image is a comprehensive image obtained by combining image data from multiple sensor perspectives; For the The image of a sensor represents the image of the environment from a single perspective captured by a specific sensor; For the The image weight of each sensor is dynamically allocated according to the quality and clarity of the image. Images with higher quality contribute more to the fusion result. is the total number of sensors, indicating the number of sensors involved in the image data fusion process;

[0078] S24: Finally, the fused image is enhanced and an image enhancement algorithm (such as histogram equalization) is used to optimize the image contrast and details to improve the overall visibility and usability of the omnidirectional environmental dynamic map. The above steps describe in detail how to generate a omnidirectional environmental dynamic map from image data from multiple angles through specific algorithms and steps. Each step has a clear input-output relationship and realizes the effective flow and processing of the previous and next data at the technical level. Through this method, the UAV can obtain a comprehensive and accurate view of the environment, providing important data support for flight control and navigation.

[0079] S3 specifically includes:

[0080] S31: receiving the omnidirectional environment dynamic image generated in S2, which is obtained by integrating multiple sensor perspectives through real-time data fusion technology, and includes continuous environment changes captured from multiple angles;

[0081] S32: Apply an optical flow algorithm to process the dynamic image received by S31. The optical flow algorithm uses a gradient-based optical flow estimation method (such as the Lucas-Kanade method) to calculate the pixel displacement between two consecutive frames. The specific calculation formula is: ,in, Indicates at time and location The pixel value of and is and Displacement in direction, It is the sum of squares of the difference between the image after displacement and the previous frame, which is used to estimate the optimal displacement;

[0082] S33: Analyze the pixel displacement calculated in S32, identify the dynamic object and static background in the image, and specifically judge the significance of the pixel displacement by setting a threshold to distinguish the dynamic and static areas, wherein the dynamic object is a high displacement value exceeding the threshold, and the static background is a small displacement value less than the threshold;

[0083] S34: Combined with the analysis results of S33, the motion trend of dynamic objects and the stability of static background are extracted, and the average moving speed and direction of dynamic objects are evaluated by statistical methods, providing the UAV with detailed information about the moving and non-moving parts of the environment; The above steps describe in detail the specific technical steps of using advanced optical flow algorithms to process omnidirectional environmental dynamic images. Through this method, the UAV can effectively identify and analyze dynamic changes in its flight environment, providing a scientific basis for real-time flight control and navigation decisions.

[0084] S4 specifically includes:

[0085] S41: receiving pixel displacement data and dynamic object motion trend analysis results from S3, which provide motion information and change trend of each pixel in the UAV environment;

[0086] S42: A 3D reconstruction algorithm is applied to convert the 2D pixel displacement data into a 3D velocity vector, and a 3D model is generated by estimating the relative motion between the UAV and the environment. The algorithm formula is: ,in, is the three-dimensional velocity vector, is the two-dimensional pixel displacement vector, is the inverse of the camera intrinsic parameter matrix, used to transform from pixel coordinates to actual coordinates, is the distance estimate from the UAV to the target object;

[0087] S43: Calculate the azimuth angle of the UAV relative to its flight environment using an azimuth estimation algorithm. The azimuth estimation algorithm considers the current flight attitude and three-dimensional velocity vector of the UAV to determine its specific direction in space. The azimuth angle calculation formula is: ,in, is the azimuth, and They are the components of the two-dimensional velocity vector on the horizontal plane;

[0088] S44: Based on the results of S42 and S43, identify and track the movement trends of dynamic objects in the environment, specifically combining the three-dimensional velocity vector and azimuth information with the motion trajectory of the dynamic objects to predict their future positions and running paths; through the above method, the UAV can effectively identify and analyze the spatial orientation and dynamic changes in its flight environment, providing a scientific basis for real-time flight control and navigation decisions.

[0089] S44 specifically includes:

[0090] S441: Azimuth obtained from S43 and the three-dimensional velocity vector Provides the current motion state of the dynamic object and initializes the position of the dynamic object according to the current state and speed;

[0091] S442: Apply the uniform linear motion model to predict the future position of the object. Assuming that the object moves at a constant speed in a short period of time, the change of its position over time can be expressed by the following formula: ,in, Represents at time The position vector represents the spatial position of the dynamic object at a specific time point, specifically a point in a three-dimensional coordinate system (e.g., XYZ coordinates with the drone as the reference system); Represents at time The predicted position vector of Then, the new position is predicted based on the current speed; is a three-dimensional velocity vector, obtained from step S42, describing the moving speed and direction of the dynamic object in space, including horizontal and vertical components; is the time interval, which indicates the time difference between two location updates and is used to calculate the change in location;

[0092] S443: Use azimuth To adjust the direction of motion, ensure that the predicted path is consistent with the actual observed motion trajectory. The direction adjustment is represented by a rotation matrix The specific formula is: ,in, Represents the adjusted predicted position vector, taking into account the adjustment of the azimuth angle to ensure the consistency between the predicted path and the actual motion trajectory; Represents the rotation matrix, according to the azimuth Generate, used to adjust the direction of the predicted path, this rotation matrix can be expressed in two-dimensional space as: ; In three-dimensional space, if the rotation around the Z axis is considered, the matrix is ​​expanded to: ; is the azimuth, which represents the angle between the forward direction of the drone or dynamic object and the north, and is used to adjust the movement direction to match the actual observation direction;

[0093] S444: Adjust the position Update to the new predicted position, and continue to apply this model for continuous path prediction; through the above steps, the UAV system can accurately predict and track the motion trajectory of dynamic objects in the environment, which is crucial for applications such as obstacle avoidance, target tracking, and environmental monitoring. This prediction method not only takes into account the current motion state of the dynamic object, but also adjusts the prediction accuracy through the azimuth angle, thereby enhancing the system's adaptability to dynamic environments.

[0094] S5 specifically includes:

[0095] S51: Receive from The obtained three-dimensional velocity vector and azimuth information , and the predicted position of the dynamic object ;

[0096] S52: Calculate the adjusted flight parameters based on the preset flight plan of the drone and the data received by S51. Specifically, use the obstacle avoidance algorithm to determine the new heading and speed of the drone to ensure a safe distance. The heading adjustment calculation formula is: ,in, is the current heading angle, is the angle that needs to be adjusted, calculated based on the relative position and velocity of the drone to the dynamic object;

[0097] S53: Adjust the flight altitude of the drone to adapt to obstacles on the ground or in the air. When the predicted trajectory shows that an altitude conflict is about to occur, the altitude adjustment formula is: in, is the current flight altitude, It is the height adjustment value calculated based on the obstacle position and safety distance;

[0098] S54: Use the dynamic path planning algorithm to update the speed setting of the drone to adapt to environmental changes and ensure the execution of the flight plan. The speed adjustment formula is: ,in, is the current flight speed, It is the speed adjustment ratio calculated according to flight conditions and environmental factors; the above steps describe in detail how to adjust the heading, speed and altitude of the drone based on environmental monitoring data and preset flight plans. Each adjustment step has a clear calculation method and logical relationship to ensure the safety of operation and the efficiency of flight. This comprehensive adjustment strategy enables drones to flexibly respond to complex and changeable flight environments and improve the accuracy and safety of mission execution.

[0099] S6 specifically includes:

[0100] S61: Receives flight parameters adjusted from S5, including the heading, speed and altitude information of the drone, as well as the latest data from the dynamic picture of the all-round environment;

[0101] S62: Dynamically optimize the flight path using an adaptive control algorithm. The adaptive control algorithm adjusts the flight parameters based on the difference between the prediction model and the actual flight data. The optimization formula is expressed as: ,in, Represents at time The optimized predicted position represents the new position adjusted based on the current position and control feedback; Represents the current time The predicted position of , which represents the expected spatial position of the drone at a specific point in time; The position of the reference trajectory, which is the ideal flight path predicted based on the dynamic map of the all-round environment and the preset flight plan of the drone. This reference point is the target of flight path optimization, and the flight adjustments of the drone are aimed at getting as close to this path as possible; is the proportional control gain, an adjustment parameter used to control the intensity of the drone's response to position deviation. Values ​​make the UAV more aggressively adjust its path to get closer to the reference trajectory; The derivative control gain is used to adjust the drone’s response according to the rate of position change. It helps the drone adjust its flight path smoothly, reducing overreaction and potential oscillation. is the change in position, calculated as the position difference between two consecutive time points, that is, , which represents the actual path change from the previous time point to the current time point;

[0102] S63: Continuously monitor environmental dynamics, including weather changes and obstacle movement, to update flight data and all-round environmental dynamic maps in real time;

[0103] S64: Recalculates the flight path based on real-time data and adaptive control adjustments in S62 to ensure the drone avoids new obstacles and completes the mission efficiently. Path recalculation utilizes enhanced obstacle avoidance algorithms to ensure safe flight in complex environments.

[0104] S65: Feedback the updated flight data to the flight control system for flight adjustment in the next cycle, forming a closed-loop control system to ensure continuous optimization and safety of the flight path; through the above method, the UAV can flexibly respond to environmental changes and adjust the flight strategy in real time, thereby improving the safety and efficiency of the flight mission. This adaptive control mechanism is crucial to improving the operational flexibility and responsiveness of the UAV, enabling it to maintain stable and efficient flight performance in a constantly changing environment.

[0105] like Figure 2 As shown, the UAV flight control system based on optical flow positioning is used to implement the above-mentioned UAV flight control method based on optical flow positioning, and includes the following modules:

[0106] Multi-optical flow sensor module: Optical flow sensors are installed at multiple locations on the drone to collect multi-angle environmental image data in real time;

[0107] Data fusion module: receives image data from multiple optical flow sensor modules and generates a full range of dynamic environmental images through real-time data fusion technology;

[0108] Image processing module: uses advanced optical flow algorithms to process the omnidirectional dynamic image of the environment provided by the data fusion module, calculates pixel displacement, and analyzes the relative motion of dynamic objects and static background in the image;

[0109] Flight adjustment module: According to the three-dimensional velocity vector and dynamic object motion trend provided by the image processing module, the heading, speed and altitude of the UAV are adjusted to adapt to the dynamic changes and potential obstacles detected in the environment, and the optimized flight path instructions are generated;

[0110] Flight control unit: receives optimized flight path instructions from the flight adjustment module and implements real-time flight control of the UAV, including heading adjustment, speed control and altitude adjustment, to ensure that the UAV flies safely along the adjusted path; the above system modules are interdependent and work together to ensure that the UAV can perform precise, safe and efficient flight control in complex and changing environments. The function of each module is to support the UAV in real-time perception and adaptation to environmental changes when performing tasks, thereby improving its autonomous flight capability and operational safety.

[0111] The present invention is intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. The UAV flight control method based on optical flow positioning is characterized by: The following steps are involved: S1: Multiple optical flow sensors are configured on the drone and distributed at different positions of the drone to collect environmental image data from multiple angles; S2: Based on the image data collected in S1, a full range of dynamic environmental images are generated through real-time data fusion technology; The S2 specifically includes: S21: receiving image data from each optical flow sensor of S1, and performing time synchronization on the images captured by each sensor; S22: Apply image alignment technology to process the time-synchronized images. The image alignment technology uses a feature point matching algorithm to spatially align images captured from different sensor perspectives. The calculation formula is: ,in, is the transformed image coordinate; is the original image coordinate, indicating the position of the point in the unaligned image; is the camera intrinsic parameter matrix; represents the rotation and translation matrix from one image to another, where is the rotation matrix, is the translation vector, and the matrix is ​​used to describe and implement the geometric transformation between two images; S23: Perform image data fusion, and use the weighted average method to synthesize the aligned images into a full-scale environment dynamic map. The weight is determined by the clarity and image quality of each sensor's viewing angle. The specific calculation formula is: ,in, is the fused image; For the The image of the sensor; For the Image weights for each sensor is the total number of sensors, indicating the number of sensors involved in the image data fusion process; S24: Finally, the fused image is enhanced by using an image enhancement algorithm to optimize image contrast and details; S3: Use advanced optical flow algorithms to process the omnidirectional environment dynamic map obtained in S2, calculate pixel displacement, and analyze the relative motion of dynamic objects and static background in the image; The S3 specifically includes: S31: receiving the omnidirectional environment dynamic map generated in S2; S32: Apply an optical flow algorithm to process the dynamic image received in S31. The optical flow algorithm uses a gradient-based optical flow estimation method to calculate the pixel displacement between two consecutive frames. The specific calculation formula is: ,in, Indicates at time and location The pixel value of and is and Displacement in direction, It is the sum of squares of the difference between the image after displacement and the previous frame, which is used to estimate the optimal displacement; S33: Analyze the pixel displacement calculated in S32, identify the dynamic object and static background in the image, and specifically judge the significance of the pixel displacement by setting a threshold to distinguish the dynamic and static areas, wherein the dynamic object is a high displacement value exceeding the threshold, and the static background is a small displacement value less than the threshold; S34: Combine the analysis results of S33 to extract the movement trend of dynamic objects and the stability of static background, use statistical methods to evaluate the average moving speed and direction of dynamic objects, and provide the drone with detailed information about the moving and non-moving parts of the environment; S4: Based on the data processed by S3, the three-dimensional velocity vector and azimuth angle information of the UAV relative to the environment are obtained, and the movement trend of dynamic objects in the environment is identified; S5: adjusting the heading, speed and altitude of the UAV based on the movement trend of the dynamic objects in the environment identified in S4 and the preset flight plan of the UAV; The S4 specifically includes: S41: receiving pixel displacement data and dynamic object motion trend analysis results from S3; S42: A 3D reconstruction algorithm is applied to convert the 2D pixel displacement data into a 3D velocity vector, and a 3D model is generated by estimating the relative motion between the UAV and the environment. The formula of the 3D reconstruction algorithm is: ,in, is the three-dimensional velocity vector, is the two-dimensional pixel displacement vector, is the inverse of the camera intrinsic parameter matrix, used to convert from pixel coordinates to actual coordinates, is the distance estimate from the UAV to the target object; S43: Calculate the azimuth angle of the UAV relative to its flight environment using an azimuth estimation algorithm. The azimuth estimation algorithm considers the current flight attitude and three-dimensional velocity vector of the UAV to determine its specific direction in space. The azimuth angle calculation formula is: ,in, is the azimuth, and They are the components of the two-dimensional velocity vector on the horizontal plane; S44: according to the results of S42 and S43, identifying and tracking the movement trend of the dynamic object in the environment, specifically combining the three-dimensional velocity vector and azimuth information with the motion trajectory of the dynamic object; S6: Optimize flight paths using adaptive algorithms by continuously monitoring a dynamic picture of the omnidirectional environment and updating flight data in real time.

2. The UAV flight control method based on optical flow positioning according to claim 1 is characterized in that: The S1 specifically includes: S11: Optical flow sensors are fixedly installed at the front, rear, left, right and bottom of the drone, with at least one sensor configured in each direction; S12: Each optical flow sensor is equipped with a high-resolution image acquisition module and an advanced image processing module. The image acquisition module continuously captures environmental images through high-speed camera technology, and the image processing module analyzes the captured images in real time and calculates the movement speed and direction of the ground or surrounding objects relative to the drone by comparing the pixel changes between consecutive frames. S13: By designing the installation angles of each sensor, the fields of view of two adjacent sensors overlap. The overlapping field of view design allows data to be seamlessly transferred from one sensor to another, providing a continuous and unified environmental image view.

3. The UAV flight control method based on optical flow positioning according to claim 1 is characterized in that: The S44 specifically includes: S441: Azimuth obtained from S43 and the three-dimensional velocity vector Provides the current motion state of the dynamic object and initializes the position of the dynamic object according to the current state and speed; S442: Apply the uniform linear motion model to predict the future position of the object. Assuming that the object moves at a constant speed in a short period of time, its position changes over time. The specific formula is: ,in, Represents at time The position vector of Represents at time The predicted position vector of Then, the new position is predicted based on the current speed; is the three-dimensional velocity vector; is the time interval, which indicates the time difference between two location updates and is used to calculate the change in location; S443: Use azimuth To adjust the direction of movement, the direction adjustment is expressed as a rotation matrix The specific formula is: ,in, represents the adjusted predicted position vector; Represents the rotation matrix, according to the azimuth Generate, used to adjust the direction of the predicted path; is the azimuth, which represents the angle between the forward direction of the drone or dynamic object and the north, and is used to adjust the movement direction to match the actual observation direction; S444: Adjust the position Updated with new predicted location.

4. The UAV flight control method based on optical flow positioning according to claim 3 is characterized in that: The S5 specifically includes: S51: Receive the three-dimensional velocity vector obtained from S4 and azimuth information , and the predicted position of the dynamic object ; S52: Calculate the adjusted flight parameters according to the preset flight plan of the drone and the data received by S51. Specifically, use the obstacle avoidance algorithm to determine the new heading and speed of the drone. The heading adjustment calculation formula is: in, is the current heading angle, is the angle that needs to be adjusted; S53: Adjust the flight altitude of the drone to adapt to obstacles on the ground or in the air. When the predicted trajectory shows that an altitude conflict is about to occur, the altitude adjustment formula is: in, is the current flight altitude, It is the height adjustment value calculated based on the obstacle position and safety distance; S54: Use the dynamic path planning algorithm to update the speed setting of the drone. The speed adjustment formula is: ,in, is the current flight speed, It is the speed adjustment ratio calculated based on flight conditions and environmental factors.

5. The UAV flight control method based on optical flow positioning according to claim 4 is characterized in that: The S6 specifically includes: S61: Receives flight parameters adjusted from S5, including the heading, speed and altitude information of the drone, as well as the latest data from the dynamic picture of the all-round environment; S62: Dynamically optimize the flight path using an adaptive control algorithm. The adaptive control algorithm adjusts the flight parameters based on the difference between the prediction model and the actual flight data. The optimization formula is expressed as: ,in, Represents at time The optimized predicted position of Represents the current time The predicted position of is the position of the reference trajectory; is the proportional control gain; is the derivative control gain, which is used to adjust the UAV’s response according to the rate of position change; is the change in position; S63: Continuously monitor environmental dynamics, including weather changes and obstacle movement, to update flight data and all-round environmental dynamic maps in real time; S64: Recalculate the flight path based on real-time data and the adaptive control adjustments in S62; S65: Feedback the updated flight data to the flight control system for flight adjustment in the next cycle, forming a closed-loop control system.

6. A UAV flight control system based on optical flow positioning, used to implement the UAV flight control method based on optical flow positioning as described in any one of claims 1 to 5, characterized in that: Includes the following modules: Multi-optical flow sensor module: Optical flow sensors are installed at multiple locations on the drone to collect multi-angle environmental image data in real time; Data fusion module: receives image data from multiple optical flow sensor modules and generates a full range of dynamic environmental images through real-time data fusion technology; Image processing module: uses advanced optical flow algorithms to process the omnidirectional dynamic image of the environment provided by the data fusion module, calculates pixel displacement, and analyzes the relative motion of dynamic objects and static background in the image; Flight adjustment module: According to the three-dimensional velocity vector and dynamic object motion trend provided by the image processing module, the heading, speed and altitude of the UAV are adjusted to adapt to the dynamic changes and potential obstacles detected in the environment, and the optimized flight path instructions are generated; Flight control unit: receives optimized flight path instructions from the flight adjustment module and implements real-time flight control of the drone, including heading adjustment, speed control, and altitude adjustment.