Unmanned aerial vehicle obstacle avoidance method based on AI
Through the AI-based drone obstacle avoidance method, sensors and A* algorithms are used to achieve real-time obstacle avoidance of drones in complex environments, solving the problem of insufficient adaptability and accuracy of environmental changes in the existing technology, and improving the non-existence of non-existence Human-machine obstacle avoidance and application performance.
Patent Information
- Application Number
- CN202411128040.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-11-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing UAV obstacle avoidance technology has problems such as poor adaptability, low accuracy and poor real-time performance in complex environments, making it difficult to accurately and independently avoid obstacles.
Using AI-based drone obstacle avoidance method, the drone attitude and heading are controlled by carrying sensors to perceive environmental information in real time, preprocess data, extract obstacle characteristic information, use the A* algorithm to plan the flight route, and control the drone attitude and heading through the flight control system to Avoid obstacles.
Real-time perception and response of drones in complex environments is realized, the accuracy of obstacle detection and environmental adaptability are improved, and the safety and performance of flight are ensured.
Smart Images

Figure CN118897572A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unmanned aerial vehicle (UAV) flight technology, and in particular to an AI-based unmanned aerial vehicle (UAV) obstacle avoidance method. Background Art
[0002] With the widespread application of drones in various fields, the research on drone control technology has also become one of the hot topics of research institutions. In recent years, drone aerial operations have become more and more common and have been widely used in various occasions, such as aerial photography, agricultural plant protection, logistics distribution, etc. Drones have effectively overcome the various shortcomings of manned aircraft in aerial operations, reduced maintenance and procurement costs, and increased the flexibility and adaptability of operations. However, drones often face security threats from tangible obstacles such as mountains, buildings, trees, and power lines during flight, as well as constraints from intangible obstacles such as no-fly zones and danger zones. Therefore, the obstacle avoidance capability of drones is still a major challenge for the current technological development, especially in complex environments such as dense cities and forests. Obstacle avoidance flight is a prerequisite for drones to complete complex, multi-functional and difficult actions.
[0003] At present, there have been extensive studies on obstacle avoidance for UAVs at home and abroad, which generally rely on three-dimensional elevation maps, binocular cameras and other high-precision equipment to achieve this. For example, the patent publication number is CN 108062109 A, the publication date is May 22, 2018, and the invention is named: obstacle avoidance method for UAVs. A method for obstacle avoidance for UAVs is disclosed, which includes the following steps: S1: installing a laser and a satellite positioning receiver on the UAV; S2: during the flight of the UAV, the obstacle information around the UAV is collected by the laser; S3: importing the three-dimensional map library into the information processing module of the UAV, converting the collected obstacle information into coordinates, and searching for the three-dimensional map of the target area in the three-dimensional map library; S4: replanning the flight route according to the three-dimensional map of the target area to achieve autonomous obstacle avoidance for the UAV. The method overcomes the shortcomings of the existing obstacle avoidance technology for UAVs that it is difficult to avoid obstacles accurately and autonomously, and provides an obstacle avoidance method for UAVs that can avoid obstacles accurately and autonomously.
[0004] Another example is the patent publication number: CN 118034352 A, publication date: May 14, 2024, the invention name is: UAV obstacle avoidance method, obstacle avoidance device and UAV, the application includes the following steps: using multiple sensors to monitor the surrounding environment of the UAV in real time, obtaining multiple sets of obstacle information, one set of obstacle information corresponds to one obstacle, and one set of obstacle information includes obstacle type, distance between the UAV and the obstacle and the position of the obstacle; determining the threat probability of the corresponding obstacle according to the multiple sets of obstacle information; obtaining an obstacle avoidance strategy according to the multiple sets of obstacle information and the threat probability corresponding to the obstacle; controlling the UAV to adjust the flight state according to the obstacle avoidance strategy to avoid the obstacle and return to the original auxiliary flight route, the original auxiliary flight route is the inspection route initially set for the UAV. This method solves the problem that the obstacle avoidance method of the UAV based on a single sensor or the deep learning method combined with perception training in the prior art has certain limitations due to the influence of lighting conditions and field of view limitations.
[0005] However, the above applications all have the drawback of being difficult to accurately and autonomously avoid obstacles. The obstacle avoidance flight technology of UAVs still has the disadvantages of being poorly adaptable to environmental changes, having low accuracy, and having poor real-time performance. Summary of the invention
[0006] To solve the above problems, the purpose of the present invention is to provide an AI-based drone obstacle avoidance method.
[0007] In order to achieve the above object, the present invention is implemented through the following technical solutions:
[0008] An AI-based drone obstacle avoidance method includes the following steps:
[0009] Step 1: Use sensors to perceive the surrounding environment in real time and obtain environmental information data;
[0010] Step 2, preprocessing the environmental information data obtained in step 1, obtaining preprocessed data, and constructing an environmental map;
[0011] Step 3: Analyze the preprocessed data obtained in step 2 and extract obstacle feature information to detect and identify obstacles around the drone in real time;
[0012] Step 4, planning the flight route of the UAV using the A* algorithm according to the obstacle feature information extracted in step 3;
[0013] Step 5, formulating a drone obstacle avoidance strategy according to the drone flight route planned in step 4;
[0014] Step 6, converting the obstacle avoidance strategy of the UAV described in step 5 into control instructions, and controlling the flight attitude and heading of the UAV through the flight control system for obstacle avoidance flight.
[0015] Preferably, the environmental information data in step 1 specifically includes obstacle locations, terrain information and meteorological data.
[0016] Preferably, the pre-processing process in step 2 is as follows:
[0017] Step 21, calibrate the data obtained by different sensors to ensure that the data are in the same coordinate system;
[0018] Step 22: Select a filter to perform filtering processing to remove noise in the environmental information data obtained by the sensor, so as to smooth the image and reduce the influence of noise;
[0019] Step 23: align the data acquired by different sensors in time or space for subsequent data processing and fusion;
[0020] Step 24: Convert the data acquired by the sensor into a coordinate system to determine the coordinate system data.
[0021] Preferably, the specific operation of step 3 includes the following steps: Step 31, select the Sobel operator, and grayscale the color image of the preprocessed data by weighted average method to obtain a grayscale image. The conversion formula is:
[0022] I gray (x,y)=0.299·R(x,y)+0.587·G(x,y)+0.114·B(x,y);
[0023] Among them, I gray (x, y) is the pixel value of the grayscale image at position (x, y), R(x, y), G(x, y), and B(x, y) are the pixel values of the red, green, and blue channels of the color image at position (x, y), respectively;
[0024] Step 32: convolution operation;
[0025] Step 33: Use non-maximum suppression to retain the local maximum of the gradient amplitude and suppress the non-maximum value to obtain a finer edge;
[0026] Step 34: determine the true edge through double threshold detection and edge connection, and extract the edge features of the obstacle from the grayscale image.
[0027] Further preferably, the specific steps of the convolution operation are:
[0028] Step 321: Use two convolution kernels to perform a convolution operation on the grayscale image obtained in step 31 to calculate the horizontal and vertical gradients. The specific formula is:
[0029]
[0030]
[0031] Among them, G x is the horizontal gradient, G y is the vertical gradient, I(x,y) is the input grayscale image, and * is the convolution operation;
[0032] Step 322: Calculate the gradient amplitude. The specific formula is:
[0033]
[0034] Where G is the gradient amplitude, which is calculated using the gradient values in the horizontal and vertical directions;
[0035] Step 323: Calculate the gradient direction. The specific formula is:
[0036]
[0037] Among them, θ is the gradient direction.
[0038] Preferably, the specific steps of step 4 are:
[0039] Step 41, initialization, set the starting point g(n) = 0, calculate the starting point f(n) and h(n), the formula is:
[0040] h(n)=|x n -x goal |+|y n -y goal |;
[0041] f(n)=g(n)+h(n)=0+h(n)=h(n);
[0042] Among them, n represents the current node, g(n) represents the actual cost from the starting point to the current node, h(n) represents the estimated cost from the current node to the target node, and h(n) uses the Manhattan function as the heuristic function. n ,y n ) is the current node coordinate, (x goal ,y goal ) are the coordinates of the target node;
[0043] Add the starting point to the open list;
[0044] Step 42, main loop, select the node n with the smallest f(n) in the open list, move n to the closed list, and calculate each adjacent node m of n. The formula is:
[0045] g(m)=g(n)+cost(n,m);
[0046] h(m)=|x m -x goal |+|y m -y goal |;
[0047] f(m)=g(m)+h(m);
[0048] If m is not in the open list, add it to the open list and set its parent node to n;
[0049] If m is already in the open list, check the new g(m). If it is smaller, update g(m) and f(m), and reset m's parent to n.
[0050] 7. The AI-based drone obstacle avoidance method according to claim 1 is characterized by:
[0051] The obstacle avoidance strategy of the drone described in step 5 specifically includes:
[0052] For static obstacles, the drone plans a detour path in advance to ensure safe passage;
[0053] Dynamic obstacles, the drone adjusts its flight speed and direction in real time to avoid collision;
[0054] The emergency obstacle avoidance mode allows the vehicle to escape from dangerous areas and ensure safety by rapidly descending and making sharp turns.
[0055] Preferably, the specific steps of step 6 are:
[0056] Step 61: Generate specific flight control instructions according to the obstacle avoidance strategy;
[0057] Step 62: Accurately control the attitude and direction of the UAV through the attitude control system and the heading control system to ensure that the UAV flies along the obstacle avoidance route;
[0058] Step 63: According to the control command, the attitude and heading of the UAV are adjusted in real time to achieve obstacle avoidance flight;
[0059] Step 64: The ground operator monitors the flight status of the UAV in real time through the remote control system to ensure the safety of the UAV's obstacle avoidance flight.
[0060] Preferably, step 21 calibrates the data acquired by different sensors to ensure that the data are in the same coordinate system. The specific steps are:
[0061] Step 211, error characteristic analysis, compensating for inherent deviations or systematic errors that may exist in the sensor during the measurement process through the calibration process; usually, random errors caused by the environment, electromagnetic interference or internal noise of the sensor are estimated and reduced through repeated measurements and statistical analysis;
[0062] Step 212, error estimation and calibration, by comparing the sensor measurement results with the known true values, calculating the magnitude of the systematic error and the random error, using a Kalman filter, etc., to extract and estimate the sensor error parameters from the calibration data, and then correct the sensor output data. The specific steps are:
[0063] Define the state space model, state transfer equation, the formula is:
[0064] x k =A k x k-1 +B k u k +w k ;
[0065] The observation equation is:
[0066] z k =H k x k +v k ;
[0067] Among them, x k is the state vector, A k is the state transfer matrix, u k is the state control vector, B k is the control variable matrix, w k is the noise of the control system, which obeys Gaussian distribution, z k is the measurement vector, H k is the transformation matrix from state vector to measurement vector, v k is the measured noise, which follows a Gaussian distribution;
[0068] Forecast, the formula is:
[0069]
[0070] Correction, the formula is:
[0071]
[0072] Where Q is the system noise covariance matrix, R is the measurement noise covariance matrix, and are the posterior state estimates at time k-1 and time k, respectively, k-1 and P k are the posterior estimated covariances at time k-1 and time k, respectively, K k is the Kalman gain;
[0073] Through the Kalman filter, the UAV sensor data can be dynamically tracked and calibrated in real time, and the errors in the sensor data can be continuously corrected, which can improve the accuracy and reliability of the sensor data.
[0074] Preferably, the step of constructing the environment map in step 2 comprises the following steps:
[0075] Confirm the location of obstacles based on the environmental data and positioning information obtained by the drone's onboard sensors;
[0076] Point cloud maps can accurately reflect the details and obstacle shapes in the environment. Point cloud maps are selected as the map representation method. The point cloud data obtained by the sensor is directly used as the representation of the environment map. Each point represents a specific location and feature information in the environment. The information of the environment image data is mapped to the map based on the feature extraction results.
[0077] Based on new sensor data, map information is updated in a timely manner to reflect dynamic changes in the environment. Map information is updated. Map representation is updated based on newly acquired sensor data. UAVs fly to build environmental maps.
[0078] Compared with the prior art, the present invention has the following advantages:
[0079] The present invention is based on the AI-based obstacle avoidance method for unmanned aerial vehicles. The unmanned aerial vehicle can perceive and respond to environmental changes in real time and make obstacle avoidance decisions quickly. Based on the Sobel operator, the features of obstacles can be accurately extracted, especially in complex environments, obstacles can be accurately identified to improve the accuracy of target detection. The A* algorithm comprehensively considers the actual cost and the estimated cost, and selects the node with the smallest value for expansion each time the node is expanded, so as to find the best path more quickly and improve the adaptability to the environment. The sensor carried by the unmanned aerial vehicle obtains environmental information in real time, can update obstacle information in time, and plan the route according to the obstacle information, and control the flight of the unmanned aerial vehicle in real time, thereby improving the flight safety of the unmanned aerial vehicle during the inspection of power transmission lines and improving the application performance of the unmanned aerial vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 It is a schematic diagram of the overall process of the AI-based unmanned aerial vehicle obstacle avoidance method of the present invention;
[0081] Figure 2 It is a schematic diagram of step 2 of the present invention;
[0082] Figure 3 It is a schematic flow chart of step 3 of the present invention. DETAILED DESCRIPTION
[0083] The purpose of the present invention is to provide an AI-based drone obstacle avoidance method. The present invention is further described below in conjunction with specific embodiments.
[0084] Example 1
[0085] An AI-based drone obstacle avoidance method uses the Sobel operator to analyze preprocessed data, extract obstacle feature information, detect and identify obstacles around the drone in real time, use the A* algorithm to plan the drone flight route, and formulate a drone obstacle avoidance strategy. Figure 1 As shown, the specific steps include:
[0086] Step 1: Use the DJI M300 equipped with sensors to perceive the surrounding environment in real time. Its multi-sensor configuration capability enables it to perform precise monitoring tasks in complex environments. When the drone flies along the transmission line, the high-resolution camera, infrared thermal imager, lidar and other sensors it carries can collect and transmit detailed data in real time. These data include the temperature of the transmission line, the wear of the equipment, the impact of the surrounding vegetation on the line, and potential obstacles, so as to obtain environmental information data including obstacle location, terrain information, and meteorological data.
[0087] Step 2, preprocessing the acquired environmental information data, acquiring preprocessed data, and constructing an environmental map;
[0088] Step 3: Analyze the acquired pre-processed data and extract obstacle feature information to detect and identify obstacles around the drone in real time;
[0089] Step 4, planning the flight route of the UAV using the A* algorithm according to the extracted obstacle feature information;
[0090] Step 5, formulating an obstacle avoidance strategy for the drone according to the planned flight route of the drone;
[0091] Step 6: Convert the obstacle avoidance strategy of the UAV into control instructions, and control the flight attitude and heading of the UAV through the flight control system to avoid obstacles.
[0092] The Sobel operator is used to find the boundary of the object by checking the change of grayscale value, so as to segment and extract features of the image, which can accurately extract the features of obstacles, especially in complex environments, which can improve the accuracy of target detection; the A* algorithm comprehensively considers the actual cost and the estimated cost, and selects the node with the smallest f(n) value to expand each time the node is expanded, so as to find the best path faster and improve the adaptability to the environment; the sensors carried by the drone obtain environmental information in real time, which can update the obstacle information in time, plan the route according to the obstacle information, and control the drone flight in real time, thereby improving the safety of drone flight during the inspection of power transmission lines and improving the application performance of drones.
[0093] Example 2
[0094] Based on Example 1, step 2 is further optimized, such as Figure 2 As shown, data preprocessing includes the following steps:
[0095] Step 21: Calibrate the position data obtained by different sensors to ensure that the data are in the same coordinate system, including:
[0096] Step 211, error characteristic analysis, compensating for inherent deviations or systematic errors that may exist in the sensor during the measurement process through the calibration process; usually, random errors caused by the environment, electromagnetic interference or internal noise of the sensor are estimated and reduced through repeated measurements and statistical analysis;
[0097] Step 212, error estimation and calibration, by comparing the sensor measurement results with the known true values, calculating the magnitude of the systematic error and the random error, using a Kalman filter, etc., to extract and estimate the sensor error parameters from the calibration data, and then correct the sensor output data. The specific steps are:
[0098] Define the state space model, state transfer equation, the formula is:
[0099] x k =A k x k-1 +B k u k +w k ;
[0100] The observation equation is:
[0101] z k =H k x k +v k ;
[0102] Among them, x k is the state vector, A k is the state transfer matrix, u k is the state control vector, B k is the control variable matrix, w k is the noise of the control system, which obeys Gaussian distribution, z k is the measurement vector, H k is the transformation matrix from state vector to measurement vector, v k is the measured noise, which follows a Gaussian distribution;
[0103] Forecast, the formula is:
[0104]
[0105] Correction, the formula is:
[0106]
[0107]
[0108] Where Q is the system noise covariance matrix, R is the measurement noise covariance matrix, and are the posterior state estimates at time k-1 and time k, respectively, k-1 and P k are the posterior estimated covariances at time k-1 and time k, respectively, K k is the Kalman gain;
[0109] Through the Kalman filter, the UAV sensor data is dynamically tracked and calibrated in real time, and the errors in the sensor data are continuously corrected, which can improve the accuracy and reliability of the sensor data;
[0110] Step 22: Preprocess the data acquired by the drone sensor to improve data quality and meet the needs of subsequent algorithm processing, including:
[0111] Use Gaussian filters to remove high-frequency noise from sensor data to smooth images or time series data and ensure signal stability;
[0112] Identify and handle outliers in the data caused by sensor errors, environmental changes, or equipment failures through the statistical method Z-score;
[0113] Apply data smoothing technique moving average to reduce fluctuations in data and make data changes smoother and more continuous;
[0114] Use statistical distribution-based filling methods to handle data missing problems caused by sensor failure or specific environmental conditions and restore missing data;
[0115] Ensure that the data obtained by different features or sensors are in the same numerical range through methods such as linear transformation or MinMax scaling;
[0116] Step 23: align the data acquired by the drone sensor from different sensors or collected at different times in time or space, so as to perform effective data processing and fusion;
[0117] Step 24: convert the data acquired by the sensor into a coordinate system, determine the coordinate system data, extract features from the environmental image data acquired by the sensor, and clarify the coordinate system definition of each sensor;
[0118] Use mathematical tools such as rotation matrices and translation vectors to transform data in different coordinate systems into a unified global coordinate system;
[0119] Ensure that the converted data remains accurate and consistent in actual applications, and perform calibration and verification.
[0120] Building the environment map described in step 2 specifically includes:
[0121] Confirm the location of obstacles based on the environmental data and positioning information obtained by the sensors on board the drone;
[0122] Point cloud maps can accurately reflect the details and obstacle shapes in the environment. Point cloud maps are selected as the map representation method. The point cloud data obtained by the sensor is directly used as the representation of the environment map. Each point represents a specific location and feature information in the environment. The information of the environment image data is mapped to the map based on the feature extraction results.
[0123] Based on new sensor data, map information is updated in a timely manner to reflect dynamic changes in the environment. Map information is updated. Map representation is updated based on newly acquired sensor data. UAVs fly to build environmental maps.
[0124] This embodiment can identify and process missing values, abnormal values and error values in the data by preprocessing the data obtained by the sensor, thereby improving the quality and reliability of the data; by standardizing and normalizing the original features of the data, the stability and convergence speed of the data model can be improved; data from different sources can be integrated and consolidated to eliminate inconsistencies between data, making the data more complete and usable. Building an environmental map can help drones identify and understand the surrounding environment, thereby planning routes and navigating, and help drones achieve precise positioning during power line inspections, and conduct practical monitoring and perception of the surrounding environment.
[0125] Example 3
[0126] On the basis of Example 1, step 3 is optimized. By calculating the density, shape, size and motion trajectory of the point cloud, static obstacles such as buildings, trees, and electric poles, as well as dynamic obstacles such as birds and other aircraft can be effectively identified. The high-performance processor and dedicated software platform equipped with the drone ensure that data can be processed and analyzed within milliseconds, and combined with geographic information system GIS data and real-time weather information, the accuracy and reliability of obstacle identification are further improved, helping the drone to navigate safely in a complex and changing environment. The specific steps are as follows:
[0127] Step 31: Use the Sobel operator to grayscale the color image of the preprocessed data using the weighted average method to obtain a grayscale image. The conversion formula is:
[0128] I gray(x,y)=0.299·R(x,y)+0.587·G(x,y)+0.114·B(x,y);
[0129] Among them, I gray (x, y) is the pixel value of the grayscale image at position (x, y), R(x, y), G(x, y), and B(x, y) are the pixel values of the red, green, and blue channels of the color image at position (x, y), respectively;
[0130] Step 32: Convolution operation, specifically:
[0131] Step 321: Use two convolution kernels to perform a convolution operation on the grayscale image obtained in step 31 to calculate the horizontal and vertical gradients. The specific formula is:
[0132]
[0133] Among them, G x is the horizontal gradient, G y is the vertical gradient, I(x,y) is the input grayscale image, and * is the convolution operation;
[0134] Step 322: Calculate the gradient amplitude. The specific formula is:
[0135]
[0136] Where G is the gradient amplitude, which is calculated using the gradient values in the horizontal and vertical directions;
[0137] Step 323: Calculate the gradient direction. The specific formula is:
[0138]
[0139] Among them, θ is the gradient direction;
[0140] Step 33: Use non-maximum suppression to retain the local maximum of the gradient amplitude and suppress the non-maximum value to obtain a finer edge;
[0141] Step 34: determine the true edge through double threshold detection and edge connection, and extract the edge features of the obstacle from the grayscale image.
[0142] Example 4
[0143] Based on the operation of Example 1, the specific operation of step 4 is optimized. The sensors carried by the drone collect the surrounding geographic information and obstacle distribution in real time. These data are input into the A* algorithm. The algorithm will plan the flight route of the drone based on the current position and the target position, combined with the preset heuristic function. The heuristic function evaluates the cost of each possible path by considering the length of the path, the expected flight time, and the possibility of avoiding obstacles. Specifically,
[0144] Step 41, initialization, set the starting point g(n) = 0, calculate the starting point f(n) and h(n), the formula is:
[0145] h(n)=|x n -x goal |+|y n -y goal |
[0146] f(n)=g(n)+h(n)=0+h(n)=h(n);
[0147] Among them, n represents the current node, g(n) represents the actual cost from the starting point to the current node, h(n) represents the estimated cost from the current node to the target node, and h(n) uses the Manhattan function as the heuristic function. n ,y n ) is the current node coordinate, (x goal ,y goal ) are the coordinates of the target node;
[0148] Add the starting point to the open list;
[0149] Step 42, main loop, select the node n with the smallest f(n) in the open list, move n to the closed list, and calculate each adjacent node m of n. The formula is:
[0150] g(m)=g(n)+cost(n,m);
[0151] h(m)=|x m -x goal |+|y m -y goal |;
[0152] f(m)=g(m)+h(m);
[0153] If m is not in the open list, add it to the open list and set its parent node to n;
[0154] If m is already in the open list, check the new g(m). If it is smaller, update g(m) and f(m), and reset the parent node of m to n.
[0155] In this embodiment, the A* algorithm evaluates the cost of each node through a heuristic function to ensure that the shortest path from the starting point to the end point is found, thereby reducing the flight time and energy consumption of the drone; the path can be adjusted in real time to avoid dynamic obstacles to ensure that the drone can safely avoid obstacles during flight; the A* algorithm can be extended to multi-objective path planning, and by introducing a multi-objective cost function, path planning that considers multiple goals at the same time can be achieved, and the path can be adjusted in real time to maintain the stability and robustness of the flight route.
[0156] Example 5
[0157] Based on the operation of Example 1, the specific operation of step 5 is optimized, and according to the planned flight route of the drone, a drone obstacle avoidance strategy is formulated to carry out obstacle avoidance flight. For static obstacles, the drone plans a detour path in advance to ensure safe passage; for dynamic obstacles, the drone adjusts the flight speed and direction in real time to avoid collision; for the emergency obstacle avoidance mode, the drone leaves the dangerous area by rapidly descending and making sharp turns to ensure safety, specifically:
[0158] Step 51: Fuse sensor data. The specific formula is:
[0159] Z=W1·Z1+W2·Z2+…+W n ·Z n ;
[0160] Among them, Z is the fused obstacle data, Z i is the data of the ith sensor, W i is the corresponding weight;
[0161] Step 52: Design an obstacle avoidance algorithm, including:
[0162] Dynamic path planning, the specific formula is:
[0163] P new =P old +ΔP;
[0164] Among them, P new is the new flight path, P old is the old flight path, ΔO is the path adjustment calculated based on the obstacle information;
[0165] Formulate an emergency obstacle avoidance strategy, the formula is:
[0166] ΔO = K·D;
[0167] Among them, K is the obstacle avoidance coefficient matrix, and D is the distance vector between the obstacle and the drone;
[0168] Step 53: The drone maintains a safe distance from obstacles, including:
[0169] Safety distance calculation formula is:
[0170] D safe =V·T response +D buffer ;
[0171] Among them, D safe is the safety distance, V is the speed of the drone, T response is the response time of the drone, D buffer is the buffer distance;
[0172] The speed adjustment formula is:
[0173]
[0174] Among them, V new is the new speed, V old It's the old speed, D current is the current distance to the obstacle.
[0175] Furthermore, the obstacle avoidance strategy of the UAV is converted into control instructions such as throttle adjustment, attitude control, and heading change. The flight attitude and heading of the UAV are controlled through the flight control system to improve the safety and mission execution efficiency of the UAV and enhance the autonomous obstacle avoidance capability of the UAV. Specifically:
[0176] Step 61: Generate a specific obstacle avoidance instruction according to the obstacle avoidance strategy, the instruction = {v, θ, h, φ}, and the instruction includes flight speed v, direction θ, height h and attitude φ parameters;
[0177] Step 62: Accurately control the pitch angle α, roll angle β and yaw angle γ of the drone through the attitude control system;
[0178] Adjust the direction θ of the drone through the heading control system;
[0179] Step 63: According to the control command, the pitch, roll and yaw actions are realized by changing the motor speed ω and the rudder angle δ to adjust the attitude of the UAV. The specific formula is:
[0180]
[0181]
[0182]
[0183] According to the control instructions, by changing the flight speed v and direction θ, the drone can be adjusted to achieve actions such as detour, turn and obstacle avoidance. The formula is:
[0184] θ=f θ (v,θ);
[0185] Step 64: The ground operator remotely controls the system to monitor the flight status of the UAV in real time, and performs remote intervention and control when necessary to ensure the safe obstacle avoidance flight of the UAV.
[0186] In step 63, preferably, the flight status and environmental changes of the drone are monitored in real time by sensors, and the data is fed back to the flight control system. According to the feedback data, the control algorithm is optimized in real time to improve the accuracy and stability of the obstacle avoidance flight;
[0187] In an emergency, it generates emergency commands such as rapid descent, sharp turn, hovering, or automatically switches to emergency obstacle avoidance mode to ensure flight safety.
[0188] Formulate obstacle avoidance strategies for drones and carry out obstacle avoidance flights. During the transmission line flight, drones can effectively identify and avoid potential obstacles such as buildings, trees, and wires, avoid collisions with obstacles, and ensure flight safety. Obstacle avoidance strategies can adjust flight attitude and heading according to the real-time conditions of the complex environment of the transmission line, enhancing the adaptability of drones in complex environments. Obstacle avoidance strategies are not just simple obstacle avoidance actions, but also include path planning optimization, so that drones can choose the optimal path to reduce unnecessary detours, save time and resources, and at the same time, reduce dependence on operator intervention and improve the efficiency of drone obstacle avoidance flights during transmission line inspections.
Claims
1. An AI-based drone obstacle avoidance method, characterized by: The following steps are involved: Step 1: Use sensors to perceive the surrounding environment in real time and obtain environmental information data; Step 2, preprocessing the environmental information data obtained in step 1, obtaining preprocessed data, and constructing an environmental map; Step 3: Analyze the preprocessed data obtained in step 2 and extract obstacle feature information to detect and identify obstacles around the drone in real time; Step 4, planning the flight route of the UAV using the A* algorithm according to the obstacle feature information extracted in step 3; Step 5, formulating a drone obstacle avoidance strategy according to the drone flight route planned in step 4; Step 6, converting the obstacle avoidance strategy of the UAV described in step 5 into control instructions, and controlling the flight attitude and heading of the UAV through the flight control system for obstacle avoidance flight.
2. The AI-based drone obstacle avoidance method according to claim 1, characterized in that: The environmental information data described in step 1 specifically includes obstacle locations, terrain information, and meteorological data.
3. The AI-based drone obstacle avoidance method according to claim 1, characterized in that: The preprocessing process in step 2 is as follows: Step 21, calibrate the data obtained by different sensors to ensure that the data are in the same coordinate system; Step 22: Select a filter to perform filtering processing to remove noise in the environmental information data obtained by the sensor, so as to smooth the image and reduce the influence of noise; Step 23: align the data acquired by different sensors in time or space for subsequent data processing and fusion; Step 24: Convert the data acquired by the sensor into a coordinate system to determine the coordinate system data.
4. The AI-based drone obstacle avoidance method according to claim 1, characterized in that: The specific operations of step 3 include the following steps: Step 31: Use the Sobel operator to grayscale the color image of the preprocessed data using the weighted average method to obtain a grayscale image. The conversion formula is: I gray (x,y)=0.299·R(x,y)+0.587·G(x,y)+0.114·B(x,y); Among them, I gray (x, y) is the pixel value of the grayscale image at position (x, y), R(x, y), G(x, y), and B(x, y) are the pixel values of the red, green, and blue channels of the color image at position (x, y), respectively; Step 32: convolution operation; Step 33: Use non-maximum suppression to retain the local maximum of the gradient amplitude and suppress the non-maximum value to obtain a finer edge; Step 34: determine the true edge through double threshold detection and edge connection, and extract the edge features of the obstacle from the grayscale image.
5. The AI-based drone obstacle avoidance method according to claim 3, characterized in that: The specific steps of the convolution operation are: Step 321: Use two convolution kernels to perform a convolution operation on the grayscale image obtained in step 31 to calculate the horizontal and vertical gradients. The specific formula is: Among them, G x is the horizontal gradient, G y is the vertical gradient, I(x,y) is the input grayscale image, and * is the convolution operation; Step 322: Calculate the gradient amplitude. The specific formula is: Where G is the gradient amplitude, which is calculated using the gradient values in the horizontal and vertical directions; Step 323: Calculate the gradient direction. The specific formula is: Among them, θ is the gradient direction.
6. The AI-based drone obstacle avoidance method according to claim 1, characterized in that: The specific steps of step 4 are: Step 41, initialization, set the starting point g(n) = 0, calculate the starting point f(n) and h(n), the formula is: h(n)=|x n -x goal |+|y n -y goal |; f(n)=g(n)+h(n)=0+h(n)=h(n); Among them, n represents the current node, g(n) represents the actual cost from the starting point to the current node, h(n) represents the estimated cost from the current node to the target node, and h(n) uses the Manhattan function as the heuristic function. n ,y n ) is the current node coordinate, (x goal ,y goal ) are the coordinates of the target node; Add the starting point to the open list; Step 42, main loop, select the node n with the smallest f(n) in the open list, move n to the closed list, and calculate each adjacent node m of n. The formula is: g(m)=g(n)+cost(n,m); h(m)=|x m -x goal |+|y m -y goal |; f(m)=g(m)+h(m); If m is not in the open list, add it to the open list and set its parent node to n; If m is already in the open list, check the new g(m). If it is smaller, update g(m) and f(m), and reset m's parent to n.
7. The AI-based drone obstacle avoidance method according to claim 1, characterized in that: The obstacle avoidance strategy of the drone described in step 5 specifically includes: For static obstacles, the drone plans a detour path in advance to ensure safe passage; Dynamic obstacles, the drone adjusts its flight speed and direction in real time to avoid collision; The emergency obstacle avoidance mode allows the vehicle to escape from dangerous areas and ensure safety by rapidly descending and making sharp turns.
8. The AI-based drone obstacle avoidance method according to claim 1, characterized in that: The specific steps of step 6 are: Step 61: Generate specific flight control instructions according to the obstacle avoidance strategy; Step 62: Accurately control the attitude and direction of the UAV through the attitude control system and the heading control system to ensure that the UAV flies along the obstacle avoidance route; Step 63: According to the control command, the attitude and heading of the UAV are adjusted in real time to achieve obstacle avoidance flight; Step 64: The ground operator monitors the flight status of the UAV in real time through the remote control system to ensure the safety of the UAV's obstacle avoidance flight.
9. The AI-based drone obstacle avoidance method according to claim 1, characterized in that: Step 21: Calibrate the data obtained by different sensors to ensure that the data are in the same coordinate system. The specific steps are: Step 211, error characteristic analysis, compensating for inherent deviations or systematic errors that may exist in the sensor during the measurement process through the calibration process; usually, random errors caused by the environment, electromagnetic interference or internal noise of the sensor are estimated and reduced through repeated measurements and statistical analysis; Step 212, error estimation and calibration, by comparing the sensor measurement results with the known true values, calculating the magnitude of the systematic error and the random error, using a Kalman filter, etc., to extract and estimate the sensor error parameters from the calibration data, and then correct the sensor output data. The specific steps are: Define the state space model, state transfer equation, the formula is: x k =A k x k-1 +B k u k +w k ; The observation equation is: z k =H k x k +v k ; Among them, x k is the state vector, A k is the state transfer matrix, u k is the state control vector, B k is the control variable matrix, w k is the noise of the control system, which obeys Gaussian distribution, z k is the measurement vector, H k is the transformation matrix from state vector to measurement vector, v k is the measured noise, which follows a Gaussian distribution; Forecast, the formula is: Correction, the formula is: Where Q is the system noise covariance matrix, R is the measurement noise covariance matrix, and are the posterior state estimates at time k-1 and time k, respectively, k-1 and P k are the posterior estimated covariances at time k-1 and time k, respectively, K k is the Kalman gain; Through the Kalman filter, the UAV sensor data can be dynamically tracked and calibrated in real time, and the errors in the sensor data can be continuously corrected, which can improve the accuracy and reliability of the sensor data.
10. The AI-based drone obstacle avoidance method according to claim 1, characterized in that: Building the environment map described in step 2 includes the following steps: Confirm the location of obstacles based on the environmental data and positioning information obtained by the sensors on board the drone; Point cloud maps can accurately reflect the details and obstacle shapes in the environment. Point cloud maps are selected as the map representation method. The point cloud data obtained by the sensor is directly used as the representation of the environment map. Each point represents a specific location and feature information in the environment. The information of the environment image data is mapped to the map based on the feature extraction results. Based on new sensor data, map information is updated in a timely manner to reflect dynamic changes in the environment. Map information is updated. Map representation is updated based on newly acquired sensor data. UAVs fly to build environmental maps.
Citation Information
Cited By
Low-altitude traffic control method and system for aircraft
CN119296394A
Low altitude traffic control method and system for aircraft
CN119296394B
Unmanned aerial vehicle task execution comprehensive control system based on AI assistance
CN119717862A
Unmanned aerial vehicle autonomous obstacle avoidance method based on deep learning and binocular vision
CN120722951A
Flight path calculation method of unmanned aerial vehicle, operation control device and unmanned aerial vehicle
CN121252815A
