Automatic obstacle avoidance point selection and obstacle avoidance method for photovoltaic station polled by unmanned aerial vehicle
Through a data fusion system and machine learning algorithm equipped with a variety of sensors on the photovoltaic power station, combined with the drone collaborative communication network, the drone's flight strategy and obstacle avoidance paths are dynamically adjusted, and the drone patrol efficiency and reliability problems caused by the complex terrain and obstacle distribution of photovoltaic power stations are solved, achieving efficient and safe patrol tasks.
Patent Information
- Application Number
- CN202411855000.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-05-06
AI Technical Summary
The complex terrain and obstacle distribution of photovoltaic power plants make it difficult for drones to quickly and accurately identify obstacles during patrol, affecting the efficiency and reliability of obstacle avoidance methods and obstacle avoidance path planning.
The photovoltaic station is classified and analyzed through a data fusion system equipped with multiple sensors, and a machine learning algorithm is used to predict the difficulty of obstacle avoidance of drones, select the appropriate type of drones, and coordinate the flight and mission execution of multiple drones through the drone collaborative communication network. Monitor the drone status and patrol progress in real time, and dynamically adjust flight strategies and obstacle avoidance paths.
It significantly improves the efficiency and safety of photovoltaic station inspection, reduces the cost and time of manual inspection, and realizes high-precision obstacle detection and classification, real-time flight adjustment and path planning.
Smart Images

Figure CN119937623A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to an automatic selection of obstacle avoidance points and an obstacle avoidance method for a photovoltaic station inspected by an unmanned aerial vehicle. Background Art
[0002] The terrain of photovoltaic power stations is complex and diverse, and the distribution of obstacles is intricate, which brings great challenges to drone inspections. It is necessary to classify the inspection areas according to the complexity of the terrain and the distribution of obstacles in the photovoltaic station. Different types of drones need to be selected for collaborative work in different levels of areas to complete efficient, safe and comprehensive inspection tasks. However, there are differences in the quality and clarity of the inspection images obtained by different types of drones. The image quality and clarity directly affect the speed and accuracy of drones in identifying obstacles. The speed and accuracy of identifying obstacles will affect the efficiency and reliability of drones in selecting obstacle avoidance methods and planning obstacle avoidance paths. This has formed a complex technical contradiction. Drones need to quickly and accurately identify obstacles in complex terrains, and plan obstacle avoidance paths efficiently and reliably; but the inspection image quality and clarity of different types of drones vary greatly, resulting in the speed and accuracy of obstacle identification cannot be guaranteed, which in turn affects the efficiency and reliability of obstacle avoidance method selection and obstacle avoidance path planning. How to select the appropriate combination of drone types according to the complex terrain and obstacle distribution of photovoltaic stations, obtain high-quality, high-definition inspection images, quickly and accurately identify obstacles, and efficiently and reliably select obstacle avoidance methods and plan obstacle avoidance paths based on the obstacle identification results is a key technical problem that needs to be solved urgently. Summary of the invention
[0003] The present invention provides a method for automatically selecting obstacle avoidance points and avoiding obstacles for a photovoltaic station inspected by a drone, which mainly includes:
[0004] After grading the PV stations according to the complexity of the terrain and the distribution of obstacles, the data fusion system equipped with multiple sensors analyzes each graded area to obtain maps of each area and the location information of obstacles;
[0005] Use machine learning algorithms to predict the difficulty of obstacle avoidance for drones in each area based on maps and obstacle information, and select appropriate drone types for different areas, including fixed-wing drones and multi-rotor drones;
[0006] Coordinate the flight and mission execution of multiple drones through the drone collaborative communication network to ensure that conflicts are avoided and inspection tasks can be completed. At the same time, monitor the status and inspection progress of drones in real time and dynamically adjust the flight strategy to cope with actual conditions;
[0007] For inspection images captured by drones equipped with different sensors, image processing is used to analyze image clarity in real time, and obstacles are classified and identified based on the difference in clarity, thereby optimizing the obstacle detection process;
[0008] When the speed of obstacle recognition is different, the flight speed and altitude of the drone are dynamically adjusted to obtain higher inspection image clarity and obstacle recognition efficiency;
[0009] Identify obstacles from inspection images and use the identification results to update the obstacle avoidance database of the drone in flight;
[0010] According to the real-time updated obstacle avoidance database and the current position of the UAV, the optimal obstacle avoidance path is planned and transmitted to the UAV in real time for execution;
[0011] While executing the optimal obstacle avoidance path, the drone system continuously monitors changes in the surrounding environment. If a new obstacle or obstacle movement is detected, the obstacle avoidance path is adjusted in real time.
[0012] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:
[0013] The present invention discloses an automatic selection of obstacle avoidance points and obstacle avoidance method for a photovoltaic station inspected by a drone. The invention uses a data fusion system of multiple sensors to classify the terrain complexity and obstacle distribution of the photovoltaic station, and then conducts detailed analysis to obtain detailed maps and obstacle location information of each area. In addition, the present invention uses a machine learning algorithm to predict the obstacle avoidance difficulty of drones in each area based on these maps and obstacle information, so as to select the most suitable drone type for different areas, such as fixed-wing drones and multi-rotor drones.
[0014] In general, the technical effect of the present invention is to significantly improve the efficiency and safety of photovoltaic station inspections, while reducing the cost and time of manual inspections, and providing a more intelligent and automated solution. By achieving high-precision obstacle detection and classification, real-time flight adjustment and path planning, the present invention ensures the efficient operation and mission completion rate of drones in complex environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 The present invention is a flowchart of the automatic selection of obstacle avoidance points and obstacle avoidance method for a photovoltaic station inspected by an unmanned aerial vehicle.
[0016] Figure 2 A schematic diagram of the automatic selection of obstacle avoidance points and obstacle avoidance method for a photovoltaic station inspected by an unmanned aerial vehicle according to the present invention. DETAILED DESCRIPTION
[0017] The following will describe the technical solutions in the embodiments of the present invention in detail in conjunction with the accompanying drawings in the embodiments of the present invention. The described embodiments are only part of the embodiments of the present invention.
[0018] like Figure 1-2 In this embodiment, a method for automatically selecting obstacle avoidance points and avoiding obstacles for a photovoltaic station inspected by a drone may specifically include:
[0019] Step S101, after grading the photovoltaic stations according to the complexity of the terrain and the distribution of obstacles, the data fusion system equipped with multiple sensors analyzes each graded area to obtain a map of each area and the location information of obstacles.
[0020] According to the terrain complexity and obstacle distribution of the photovoltaic station area, the photovoltaic station is graded by machine learning algorithm to obtain graded areas with different complexity. A data fusion system equipped with multiple sensors such as laser radar, optical camera and infrared thermal imager is deployed in each graded area. The point cloud data is obtained and preprocessed by laser radar, the high-resolution image data is obtained and preprocessed by optical camera, and the thermal map data is obtained and preprocessed by infrared thermal imager. These sensor data are synchronized in time and space and the coordinate system is unified, and the point cloud and image registration algorithm (such as ICP algorithm) is used to align them to the same coordinate system, and then the aligned data is fused using multi-sensor fusion algorithm (such as Kalman filter, particle filter, etc.) to generate high-precision three-dimensional spatial information. The acquired three-dimensional spatial information is processed, and the point cloud data of different areas are spliced using point cloud stitching algorithm (such as ICP algorithm, 3DSLAM algorithm, etc.) to generate a complete three-dimensional point cloud map. Then, semantic segmentation algorithms (such as PointNet++, SegNet, etc.) are used to semantically annotate the 3D point cloud map, and different objects and areas in the point cloud are classified and marked, such as the ground, buildings, vegetation, etc. According to the semantic segmentation results, the point cloud data of the obstacle is extracted, and clustering and edge extraction are performed to obtain the location information of the obstacle. According to the location information of the obstacle, the point cloud data of the obstacle is projected onto a two-dimensional plane to generate a two-dimensional image of the obstacle. The pre-trained YOLOv3 model is used to detect and classify the obstacle image to obtain the attribute information such as the category, position and size of the obstacle. The detected obstacle attribute information is matched with the 3D point cloud map to obtain the position and posture information of the obstacle in the 3D space. The attribute information such as the position, size, and category of the obstacle is converted into the same coordinate system and scale as the detailed map, and the 3D model or annotation information of the obstacle is added to the corresponding position in the detailed map to merge the obstacle information with the map. The fused map is visualized and analyzed to check the accuracy and completeness of the fusion result, and a hierarchical area map containing detailed information of the obstacle is generated to provide data support for the subsequent operation and maintenance planning of the photovoltaic station. The improved ICP algorithm is used to perform similarity matching on the detailed maps of different graded areas. The feature points of each graded area map, such as corner points, edge points, etc., are extracted. The improved ICP algorithm is used to match the feature points of maps of different areas and calculate the coordinate transformation relationship between them. The improved ICP algorithm introduces point-to-point and point-to-plane distance metrics to improve the accuracy and robustness of matching. According to the coordinate transformation relationship obtained by matching, the maps of different areas are spliced into a complete global map. The spliced global map is optimized and smoothed to eliminate splicing gaps and discontinuities. Based on the global map of the photovoltaic station, the inspection routes of drones and robots are planned using a combination of the improved A algorithm and the genetic algorithm.The global map is divided into several grids, each grid represents a reachable location. The improved A algorithm is used to search for the optimal inspection path, taking into account factors such as the location of obstacles, energy consumption, and inspection coverage. The improved A algorithm introduces heuristic functions and cost functions to improve search efficiency and path quality. The genetic algorithm is used to optimize the path obtained by the A algorithm, and a shorter and smoother inspection path is obtained through operations such as crossover and mutation. The optimized inspection path is converted into control instructions for drones and robots to achieve full coverage and high-efficiency autonomous inspection of photovoltaic station equipment, thereby improving the operation and maintenance efficiency and safety of photovoltaic stations.
[0021] Specifically, when grading photovoltaic stations, the K-means clustering algorithm can be used to divide the photovoltaic stations into 3-5 areas with different levels of complexity. Among them, the complexity of the terrain can be quantified by calculating the slope of each location, the rate of change of elevation and other indicators, and the distribution of obstacles can be quantified by calculating the obstacle density, average height and other indicators. In each grading area, the data fusion system deployed has a scanning angle of 360 degrees, a scanning frequency of 10Hz, and a point cloud density of 100 points / square meter; the resolution of the optical camera is 4000×3000 pixels, and the field of view is 90 degrees; the temperature resolution of the infrared thermal imager is 0.1 degrees Celsius, and the frame rate is 30Hz; these sensor data are synchronized in time and space and the coordinate system is unified, and the ICP algorithm based on the least squares method is used, the number of iterations is 100 times, and the convergence threshold is 0.01 meters. Then, the Kalman filter algorithm is used for multi-sensor data fusion. The state vector includes variables such as position, velocity, acceleration, etc. The observation vector includes the measurement values of each sensor, and the covariance matrix of process noise and observation noise is set according to experience. The point cloud density of the fused three-dimensional spatial information is increased to 200 points / square meter, and the position accuracy is better than 0.05 meters. When performing semantic segmentation on the three-dimensional point cloud map, the PointNet++ network structure is used. The feature dimension of the input point cloud data is 9 (XYZ coordinates, RGB color, normal vector), the number of output semantic categories is 10 (ground, buildings, vegetation, vehicles, etc.), the number of training iterations is 100 times, and the learning rate is 0.001. When clustering the obstacle point cloud data, the DBSCAN algorithm is used, the clustering radius is 0.5 meters, and the minimum number of points is 10. When detecting obstacles, the input image size of the YOLOv3 model is 416×416 pixels, the confidence threshold is 0.5, the non-maximum suppression threshold is 0.4, the number of training iterations is 10,000, and the learning rate is 0.001. When integrating obstacle information with the map, the octree structure is used for spatial indexing, and the size of the leaf node is 0.2 meters. When matching the similarity of maps in different regions, the improved ICP algorithm introduces the point-to-plane distance metric with a weight of 0.6, 200 matching iterations, and a convergence threshold of 0.005 meters. When planning inspection paths, the heuristic function of the A* algorithm uses the Euclidean distance, and the cost function comprehensively considers factors such as distance, energy consumption, and coverage, with weights of 0.5, 0.3, and 0.2, respectively. The population size of the genetic algorithm is 50, the crossover probability is 0.8, the mutation probability is 0.1, and the number of iterations is 100. The resulting inspection path length was shortened by 20%, energy consumption was reduced by 15%, and coverage was improved.
[0022] Step S102, using a machine learning algorithm to predict the difficulty of obstacle avoidance for drones in each area based on the map and obstacle information, and accordingly selecting appropriate drone types for different areas, including fixed-wing drones and multi-rotor drones.
[0023] According to the map information and obstacle distribution of the photovoltaic station, clustering algorithms such as K-means are used to divide the photovoltaic station area. Indicators such as obstacle density and terrain undulation are selected as clustering features. Several sub-areas with similar features are obtained through iterative optimization. Then, the features consistent with those in the clustering algorithm are extracted from each sub-area. After normalization, a weighted sum scoring function is designed. The weight coefficients of different features are multiplied by their normalized values, and then the sum is added to obtain the obstacle avoidance difficulty score of the area. The feature weights can be obtained through empirical settings or automatic learning of machine learning algorithms. In practical applications, some representative areas are first selected in the photovoltaic station, and obstacle avoidance flight tests are carried out using different types of drones. The obstacle information, flight trajectory, control instructions and other data during the flight are recorded by airborne sensors. A small-scale obstacle avoidance flight data set is constructed for training and tuning the prediction model, which is then applied to the obstacle avoidance difficulty prediction of the entire photovoltaic station. With the continuous development of drone inspection tasks, flight data is continuously collected, and the prediction model is iteratively updated to improve the accuracy of the prediction. Comprehensively consider the obstacle avoidance difficulty score, area size, terrain undulation, inspection task complexity and other factors of each sub-area, assign a weight coefficient to each factor, quantify the performance parameters of different types of drones, multiply by the weight coefficient to get the comprehensive performance score, and select the drone type with the highest comprehensive performance score as the optimal choice for the area. The weight coefficient can be allocated with reference to industry experience and expert opinions, or it can be automatically optimized through data analysis and machine learning methods. When the drone performs the inspection task, the flight status parameters such as the position, speed, and attitude of the drone are monitored in real time through GPS, IMU, laser radar, millimeter wave radar, optical camera, infrared camera, meteorological sensor and other equipment, the distance and direction of obstacles are detected, the surrounding visual images are obtained, the environmental parameters are measured, and their impact on the flight is evaluated. The monitoring software can set warning thresholds and rules, and issue an alarm to the operator in time when an abnormality occurs, and automatically adjust the flight mission and control instructions according to the preset emergency strategy to ensure flight safety. For areas with greater obstacle avoidance difficulty, they can be further subdivided into smaller sub-areas, and safe flight routes can be planned in each small area. The drone is equipped with more accurate obstacle avoidance sensors and high-performance flight control systems to cope with obstacle avoidance tasks in complex environments. In actual drone inspection tasks, corresponding flight plans and control strategies are formulated according to the characteristics of each sub-area and the type of drone assigned. Combined with real-time monitoring data, the route and obstacle avoidance strategy are dynamically adjusted to ensure that the drone can complete the inspection task of the photovoltaic station safely and efficiently.
[0024] Specifically, the K-means clustering algorithm is first used to divide the photovoltaic station into regions, the number of clusters is set to 5, and the obstacle density and terrain relief are selected as clustering features. The calculation formula of obstacle density is the number of obstacles / regional area, and the calculation formula of terrain relief is the elevation standard deviation in the region / regional area. The cluster center is obtained after 100 iterations, forming 5 sub-regions with similar features. Then, 10 environmental features consistent with the clustering features are extracted for each sub-region, including obstacle density, elevation mean, elevation standard deviation, vegetation density, etc. The maximum and minimum normalization method is used to normalize the eigenvalues to obtain normalized eigenvalues between 0 and 1. A weighted summation scoring function is designed, in which the weight coefficients of obstacle density and elevation standard deviation are set to 0.3, and the weight coefficients of other features are set to 0.1. The normalized eigenvalue is multiplied by the weight coefficient and then summed to obtain the obstacle avoidance difficulty score of each sub-region. The score range is 0-1, and the higher the score, the greater the obstacle avoidance difficulty. Six representative areas in the photovoltaic station were selected, each with an area of about 1 square kilometer. Three types of drones (fixed-wing, multi-rotor, vertical take-off and landing) were used to perform obstacle avoidance flight test tasks. Each drone flew 10 times, and a total of 180 obstacle avoidance flight data were collected, including lidar point cloud data, millimeter-wave radar target data, camera image data, GPS flight trajectory data, etc. At the same time, the environmental feature data of each area was recorded. The collected data were randomly divided into training set, validation set and test set, with a ratio of 6:2:2. The training set data was used to train machine learning models such as SVM, random forest, neural network, etc. The grid search method was used to optimize the model hyperparameters, such as the kernel function type and penalty coefficient of SVM, the number of decision trees and maximum tree depth of random forest, the number of hidden layers and activation function type of neural network, etc. The training was continuously iterated until the performance of the model on the validation set became stable. Finally, the random forest model with the best performance on the test set was selected as the obstacle avoidance difficulty prediction model, and the average accuracy of the model reached more than 85%. When selecting the optimal drone type for each sub-area, the four factors of obstacle avoidance difficulty score, area size, terrain undulation, and inspection task complexity of the area are first ranked in importance to obtain the factor weight vector [0.4, 0.3, 0.2, 0.1]. Then, the obstacle avoidance performance, endurance, climbing speed, and maneuverability of three types of drones, including fixed-wing, multi-rotor, and vertical take-off and landing, are scored respectively, with a score range of 1-10 points, and a 3×4 performance scoring matrix is obtained. The performance scoring matrix is multiplied by the factor weight vector to obtain a 1×3 comprehensive performance scoring vector. The drone type corresponding to the maximum value of the vector is selected as the optimal type. Considering the dynamic changes in environmental conditions and task requirements in actual applications, the prediction model and drone selection strategy are retrained and optimized every month using the latest collected drone flight data and environmental feature data to continuously improve the intelligence level and adaptability of the system.
[0025] Step S103, coordinate the flight and mission execution of multiple drones through the drone collaborative communication network to ensure that conflicts are avoided and the inspection mission can be completed; at the same time, monitor the status and inspection progress of the drones in real time, and dynamically adjust the flight strategy to cope with actual conditions.
[0026] By equipping drones with multiple communication devices such as WiFi, 4G / 5G, and satellite communications, a hierarchical and heterogeneous drone collaborative communication network is constructed. It is divided into three layers from bottom to top: perception layer, network layer, and application layer. Software-defined network (SDN) technology is used to realize flexible scheduling and optimization of network resources, and seamless switching and load balancing between different communication links are supported to ensure the real-time, reliability, and redundancy of communication. The multi-agent reinforcement learning algorithm MADDPG is used to coordinately optimize the flight paths and task allocation of multiple drones through centralized training and distributed execution, so that drones can make autonomous decisions based on their own status and environmental information, and improve task execution efficiency and adaptability while avoiding conflicts. A distributed drone status monitoring and inspection progress tracking mechanism is designed in the drone collaborative communication network. A status monitoring and tracking agent program runs on each drone, which periodically collects and broadcasts the drone's status information and receives status messages from other drones. The eventual consistency of status updates is achieved through the vector clock mechanism, forming a real-time updated global state table for drone collaborative decision-making and control. When an abnormal situation occurs in a UAV, an alarm message is sent in time through the cooperative communication network, and the task allocation and flight path are dynamically adjusted according to the global state table to ensure the continuity and integrity of the inspection task. According to the flight status and environmental conditions of the UAV, the working parameters of each communication link in the cooperative communication network are adaptively adjusted to improve the robustness and survivability of the network while ensuring the communication quality. By using the multi-source sensor data carried by the UAV, such as visible light images, infrared images, laser point clouds, etc., through data spatiotemporal alignment, convolutional neural network (CNN) feature extraction and semantic segmentation, multimodal decision-level fusion and other methods, the intelligent detection and precise positioning of abnormal conditions of photovoltaic modules are realized, and the detection results are shared with other UAVs and ground stations through the cooperative communication network, forming a distributed abnormal warning mechanism. A centralized task scheduling and monitoring center is set up at the ground station. It interacts with the UAV collaborative communication network through an asynchronous interaction mode based on a message queue (MessageQueue), sends control instructions, task adjustment and other messages to the specified Kafka message queue, and specifies the priority and expiration time of the message. The UAV subscribes and pulls the message for processing according to the identity. At the same time, the monitoring center also receives the status and task execution results reported by the UAV through the REST-style WebAPI to realize the active push of monitoring information. When a problem is found or an abnormal alarm is received, the control command is issued in time, and the flight strategy and task allocation of the UAV are dynamically adjusted to ensure the safety, reliability and intelligence level of the inspection of the photovoltaic power station.
[0027] Specifically, when building a heterogeneous UAV cooperative communication network, you can choose to carry more than two WiFi modules, one 4G / 5G module and one satellite communication module on the UAV, dynamically configure the working frequency band, channel bandwidth, transmission power and other parameters of each module through the SDN controller, and schedule the data flow in real time according to the link quality and throughput requirements. For example, when the distance between UAVs is close, WiFi is used for high-speed point-to-point communication. When the distance between UAVs is far or the terrain is blocked, switch to 4G / 5G or satellite link to ensure continuous and reliable communication coverage. When using the MADDPG algorithm for multi-UAV cooperative optimization, you can set the number of training rounds to 500 episodes, each episode contains 1000 timesteps, and use the Adam optimizer to update the parameters of the Actor network and the Critic network. The learning rates are set to 0.001 and 0.002 respectively. Training is carried out in a simulation environment of 100 UAVs, and finally an optimal cooperative strategy with an average task completion rate increase of 20% and an average energy consumption reduction of 15% is obtained. When designing a distributed state monitoring mechanism, the drone status can be collected every 200 milliseconds, and the status information can be encapsulated into a 512-byte UDP broadcast packet, which is propagated in the collaborative communication network through multi-hop relay. At the same time, the Lamport timestamp algorithm is used to generate the vector clock of the global state table. By comparing the local clock vector with the clock vector in the received state message, it is determined whether the local state needs to be updated, so that the final consistency convergence of the state of the entire network can be achieved within 500 milliseconds. When performing multimodal anomaly detection, a 640×480 resolution visible light camera, a 320×256 resolution long-wave infrared camera and a 64-line laser radar can be used. The Kalman filter algorithm is used to achieve the spatiotemporal alignment of sensor data, and the pre-trained YOLOv3 model is used to perform real-time semantic segmentation on the input image to obtain pixel-level annotation results of different categories such as photovoltaic components, foreign objects, and damage. The segmentation results of multiple sensors are comprehensively evaluated through the Bayesian decision fusion algorithm. When the probability of anomaly exceeds 95%, an alarm is triggered, and the three-dimensional spatial coordinates of the abnormal target are calculated by triangulation to achieve meter-level positioning accuracy. When designing the task scheduling and monitoring mechanism, the ground station can establish a Kafka message queue cluster containing 10 Topics. Each Topic corresponds to a specific control instruction or task type. The drone subscribes to the corresponding Topic according to its own role attributes and pulls messages from the corresponding message queue in real time for processing. At the same time, the drone uploads its own status and task execution results to the monitoring center through the REST API every 5 minutes. When the monitoring center receives an abnormal alarm or the task deviation exceeds 10%, it automatically generates a corresponding control message and sends it to the relevant drone to achieve dynamic adjustment of the task and abnormal handling.
[0028] Step S104: for inspection images captured by drones equipped with different sensors, image processing is applied to analyze image clarity in real time, and obstacles are classified and identified according to the difference in clarity, thereby optimizing the obstacle detection process.
[0029] The drone is equipped with various types of sensors such as visible light cameras, infrared thermal imagers, and lidar. During the flight inspection, it images the photovoltaic power station from different perspectives and modes, obtains multi-source heterogeneous image data, and transmits it to the ground station for real-time analysis and processing. The acquired inspection images are firstly processed with histogram equalization to improve the contrast and dynamic range of the images and make the image details clearer. Then, the adaptive median filter algorithm is used to denoise the images. The adaptive median filter replaces the central pixel value by calculating the median of the pixel values in the filter window. Compared with the ordinary median filter, it can better retain the edge and texture details of the image. The size of the filter window can be adaptively adjusted according to the noise type and intensity of the image. The clarity features of the image are extracted. The gradient-based Tenengrad function and the frequency-domain-based Fast Fourier Transform (FFT) algorithm are used to measure the clarity of the image from the spatial domain and frequency domain respectively. The Tenengrad function measures the clarity of the image by calculating the gradient square sum of the grayscale values of the image pixels. The gradient value can be calculated by the Sobel operator and other methods. The FFT algorithm measures the clarity of the image by performing Fourier transform on the image and calculating the high-frequency component energy of the image in the frequency domain. The larger the frequency domain energy, the more high-frequency detail information the image contains and the higher the clarity. According to the image clarity index, the K-means clustering algorithm is used to classify the images, and the images with similar clarity are divided into the same category to form several image subsets with high to low clarity. For the high-definition image subsets, the fast R-CNN and other high-precision but computationally intensive deep learning algorithms are used to accurately identify the category and position of the obstacles. The prior frame of RoI (Region of Interest) can be set according to the high-frequency area of the obstacles obtained by clustering to reduce invalid searches; for the low-definition image subsets, the visual saliency and other fast but relatively low-precision traditional machine learning algorithms are used to quickly segment the outline area of the obstacles from the background. The color, texture, shape and other prior features of different obstacle categories can be used to guide the extraction of significant areas. When the obstacle results detected by multiple image subsets are fused, the detection results of different sensors are first unified to the global coordinate system of the lidar point cloud, and the coordinate transformation is realized through camera calibration and external parameter estimation. Then, the Kalman filter algorithm is used to track the state of the obstacle continuously in time and space. The state vector is defined as the three-dimensional position, velocity, acceleration, etc. of the obstacle, and the observation vector is the detection result of each sensor. By establishing the state transfer equation and the observation equation, the optimal state of the obstacle is recursively estimated. Considering the detection accuracy, noise characteristics, failure probability and other factors of different sensors, a weighted fusion strategy is designed to dynamically adjust the weight coefficient of each sensor result, remove the duplicate or false detection results caused by the difference in clarity, and form a unified three-dimensional spatial distribution map of the obstacle.According to the GIS data of the photovoltaic power station, the type, location, and rated parameters of the electrical equipment, the category, size, and height of the obstacles, as well as the spatial relationship between the distance and orientation, etc., are comprehensively considered to establish a rule-based impact assessment model, give the danger level and impact range of the obstacles, and dynamically update the assessment results in combination with real-time factors such as environmental conditions and operation and maintenance requirements to generate a fault hidden danger investigation report. On this basis, heuristic search algorithms such as A* algorithm and genetic algorithm are used to search for the optimal route in the global map, which not only avoids dangerous obstacles, but also meets the constraints of full coverage and shortest path as much as possible; in terms of local obstacle avoidance, combined with the maneuverability of the UAV, such as the maximum climb rate and maximum tilt angle, a safe and stable obstacle avoidance trajectory is planned in real time. If necessary, through the coordination of multiple UAVs, obstacles are observed from different directions and heights to improve the robustness of perception and decision-making. Finally, the optimized route and obstacle avoidance strategy are fed back to the UAV flight control system to guide the UAV to complete the inspection task of the photovoltaic power station safely and efficiently.
[0030] Specifically, the drone is equipped with a 12-megapixel visible light camera, a 640×512-pixel long-wave infrared thermal imager, and a 16-line laser radar. It takes aerial photos of the photovoltaic power station at an altitude of 120 meters and a speed of 5 meters per second, and obtains visible light images with a resolution of 0.5 meters, infrared images with a resolution of 1 meter, and laser point cloud data with a detection range of 100 meters. One frame of multi-source image data is transmitted to the ground station every 10 seconds. The visible light image is histogram equalized with 256 grayscale levels, and the infrared image is denoised by a Gaussian filter of 0.20.4. The filter window size is adaptively adjusted according to the image gradient energy. The clarity score of the denoised image is calculated by the Tenengrad gradient function and normalized to a quantization level of 0100. At the same time, the image is transformed into a 2D FFT, the frequency domain energy spectrum is calculated, and the proportion of high-frequency components with a frequency greater than 100 to the total frequency components is extracted as the clarity score. The image is clustered after weighted averaging of the two clarity evaluation indicators. The number of clusters is set to 5, and it is iterated 20 times until the cluster center is stable. For the clearest type of images, the trained faster R-CNN network is used to detect obstacles, and ResNet50 is selected as the feature extraction network. The RoI prior box is adaptively sampled according to the Gaussian distribution of the obstacle appearance area in the cluster, and the mAP on the COCO dataset reaches 82%; for the most blurry type of images, the frequency domain saliency detection algorithm is used to calculate the image saliency map, and the threshold is adaptively generated according to the prior information such as the obstacle edge, color, and contrast, and morphological filtering is performed in the saliency area to obtain the segmentation mask of the obstacle. The detection results of multi-source sensors are uniformly mapped to the laser point cloud coordinate system through the PnP algorithm, with a matching accuracy of better than 90%. Then, the Kalman filter algorithm is used to track and fuse obstacles. The state vector includes the obstacle's position, volume, speed and other attributes, and the observation vector includes the pixel coordinates, depth value, confidence level and other attributes of different sensors. The Bhattacharyya distance is used to evaluate the similarity between observation and prediction, and the Kalman gain is adaptively adjusted. The trajectory of the obstacle tracked continuously for 10 frames is optimized and smoothed to eliminate the trajectory jitter caused by sensor errors, occlusions and other factors. Finally, the three-dimensional bounding box and probability grid map of the obstacle are output. Combined with GIS information such as the series-parallel topological relationship of photovoltaic components, cable line layout, inverter location, etc., it is judged whether the obstacle is in the electrical safety channel, whether it blocks the components, and whether it affects the operation of the power station. It is divided into 1 to 5 danger levels, and the impact trend of obstacle development on the power station is predicted. A heat map of the probability of hidden dangers is generated. When planning the UAV route, the lowest obstacle risk and the highest inspection coverage rate are used as the objective function. The A* heuristic search algorithm is used to plan the optimal path in the global scope. When avoiding local obstacles, the artificial potential field method is used to plan the optimal obstacle avoidance direction and distance in real time. Compared with manual planning, the generated route can shorten the flight distance by 15%, thereby improving the inspection efficiency.
[0031] Step S105, when the obstacle recognition speeds are different, dynamically adjust the flight speed and altitude of the UAV to obtain higher inspection image clarity and obstacle recognition efficiency.
[0032] The UAV uses an onboard computer to analyze the running speed and recognition accuracy of the obstacle recognition algorithm in real time, pre-sets the speed threshold and accuracy threshold, and counts the actual running speed and missed detection rate of the algorithm in real time during the flight, compares them with the preset thresholds, and adaptively adjusts the algorithm parameters so that the algorithm can run at an appropriate speed and accuracy in different environments, and associates the algorithm performance indicators with the flight status of the UAV. When the running speed of the recognition algorithm is lower than the preset threshold, the UAV reduces the flight speed through the PID control algorithm to extend the image acquisition time within the unit distance; at the same time, according to the camera focal length, field of view and other parameters, the flight altitude is adaptively adjusted to appropriately reduce the camera field of view while ensuring the image resolution, so as to improve the accuracy of target detection. The UAV detects environmental factors such as wind speed, illumination, temperature and humidity in real time through multi-sensor data fusion, selects image clarity, contrast, signal-to-noise ratio and other indicators as dependent variables to measure image quality, and uses machine learning algorithms such as multivariate regression and support vector machine to establish a nonlinear mapping model between environmental factors and image quality, and predicts the impact of different flight parameter combinations on image quality under current environmental conditions. According to the mapping model of flight speed, altitude and image quality, the image clarity, obstacle recognition accuracy and flight speed are set as three objective functions respectively. By setting the speed and altitude search space, population size, maximum number of iterations and other parameters, the particle swarm optimization algorithm is used to solve the multi-objective function and obtain a set of Pareto non-inferior solutions. Then, according to the mission requirements and flight safety performance constraints, such as the maximum speed and minimum flight altitude of the drone, an optimal solution that balances image quality and flight efficiency is selected from the Pareto solution set as the optimal flight strategy under the current environment. During the flight, the drone continuously evaluates the image quality and obstacle recognition performance, adds an online learning module to the airborne control system, uses temporal difference learning algorithms such as Q-learning, establishes a state-action-reward function, and learns the optimal speed and altitude control strategy in real time through continuous exploration and trial and error, so that the drone can autonomously adjust its flight attitude according to environmental changes and improve the flexibility and robustness of flight. For obstacles that are difficult to accurately identify in complex environments, the drone uses visual SLAM algorithms to continuously track and reconstruct them in three dimensions, obtain semantic information, spatial position, hazard level and other attributes of the obstacles, and align the obstacle model with the onboard GIS map in real time to determine the positional relationship of the obstacle relative to the drone and the photovoltaic panel area. After identifying key obstacles that pose a threat to flight and inspection, the drone uses obstacle avoidance algorithms such as artificial potential field method and RRT random tree to locally optimize and adjust the global route planning, comprehensively consider the drone's maneuver constraints and image quality requirements, and plan a safe, efficient and stable obstacle avoidance trajectory to guide the drone to bypass obstacles and return to the global optimal route as soon as possible.During the obstacle avoidance process, the drone continuously optimizes flight parameters such as speed, altitude, and heading, and iteratively solves the optimal control quantity through optimization algorithms such as gradient descent and quasi-Newton method, so that the imaging position, size, angle and other features of the obstacle in the camera's field of view meet the accuracy requirements of the recognition algorithm, while ensuring the flight efficiency and safety of the drone. The organic combination of online strategy learning, local obstacle avoidance optimization and global route planning enables drones to autonomously adapt and continuously inspect in complex environments, improving the intelligent level of photovoltaic power station operation and maintenance.
[0033] Specifically, the drone is equipped with a high-speed processor and 4GB of memory, running the YOLOv3 obstacle detection algorithm, setting a speed threshold of 20 frames per second and an IOU accuracy threshold of 90%, and real-time statistics of the algorithm's frame rate and missed detection rate at a resolution of 1920×1080. When the frame rate is 5% lower than the threshold, the input image size is adaptively reduced to 1280×720 and the number of proposals is reduced by 20%; when the IOU is 5% lower than the threshold, the image size is increased to 2560×1440 and the number of proposals is increased by 20%, so that the detection speed is stabilized at 1822FPS and the missed detection rate is stabilized within 5%. During the flight, the UAV dynamically adjusts the flight speed according to the frame rate of YOLOv3, with a speed range of 15m / s, acceleration limited to less than 0.5m / s, and a hovering height range of 10-100m. The fuzzy PID control algorithm is used, with speed error and height error as input, throttle and pitch angle as output, and PID parameters are adaptively generated according to the speed-height-image quality mapping model. The mapping model uses the radial basis kernel function (RBF) to construct a support vector regression model. The input features are environmental parameters such as wind speed, illuminance, temperature and humidity, and flight speed and height parameters. The output is image clarity, contrast, and signal-to-noise ratio. The model is trained and tested using the 5-fold cross validation method, and the mean square error (MSE) converges to less than 0.01.
[0034] The model prediction results and the UAV maneuverability constraints are used as the constraints of the particle swarm algorithm to optimize the search of 50 particles in the two dimensions of speed and height. The Pareto frontier is obtained after 100 iterations, and the solution with the best image quality and flight efficiency loss of no more than 10% is taken as the optimal flight strategy. The UAV continuously learns and optimizes strategies during route tracking and obstacle avoidance, using the Sarsa (λ) algorithm, and the state space is discretized using the Gaussian radial basis function network (RBF). The action space includes 27 speed and height combinations. The reward function comprehensively considers factors such as the distance between the obstacle and the route, the relative speed between the UAV and the obstacle, and the image quality. The discount factor is set to 0.9, and the learning rate is set to 0.01. After 500 test flights and training, the average reward converges to above 0.95. For complex obstacles such as densely distributed trees and power towers, the drone switches to hovering mode after detecting the obstacle, calls the ORB-SLAM2 algorithm to build a three-dimensional point cloud map of the local environment, and combines the point cloud density, height, and texture features to perform semantic segmentation on the obstacles, obtain the category label and voxel model of each obstacle, and align the local obstacle map to the global GIS map and mission route map through the iterative closest point (ICP) algorithm. On this basis, the drone calls the improved artificial potential field method for obstacle avoidance path planning. The radius of the repulsive potential field of the obstacle is dynamically generated according to its volume and height, and the direction of the gravitational potential field points to the closest waypoint to the drone on the route. The repulsive coefficient is 0.6 and the gravitational coefficient is 0.4. After the potential field is superimposed, the gradient descent method is used to solve the speed and direction of the drone's next movement, and the trajectory is smoothed with a B-spline curve. At the same time, the speed, acceleration, and pitch angle of the drone are controlled to meet the dynamic constraints. After avoiding the obstacle, the drone returns to the global optimal route safely and smoothly through the Dubins path planning. Actual tests show that this method enables the UAV to fly at an average speed of 3m / s for 30min in a Complexity Level-5 obstacle environment without collision, with image quality stable above 0.8 and obstacle detection accuracy reaching 95%, effectively improving the safety and efficiency of intelligent inspection of photovoltaic power stations.
[0035] Step S106, identifying obstacles from the inspection image, and using the identification results to update the obstacle avoidance database of the UAV during flight.
[0036] The deep learning-based target detection algorithm YOLOv5 is adopted, and the optimization strategies of EfficientDet, such as FPN and BiFPN, are used to improve the detection accuracy while taking into account the lightweight of the model. The model is further compressed through model distillation, pruning, quantization and other technologies, so that it can achieve real-time obstacle detection under the limited onboard computing resources of the UAV. Deep learning inference engines such as TensorRT and NCNN are deployed on the onboard computing platform of the UAV, and heterogeneous computing resources such as GPU and FPGA are used to accelerate and optimize the neural network model, which significantly improves the recognition speed while ensuring the recognition accuracy, and realizes real-time processing of high-resolution images. In view of the challenges of illumination changes and changeable weather in the photovoltaic power station environment, image preprocessing and post-processing modules are added to the recognition algorithm, and histogram equalization, sharpening enhancement and other methods are used to adaptively adjust image parameters. Appropriate enhancement and filtering strategies are adopted for different shadow situations, combined with shadow detection and removal models ShadowGAN, illumination estimation, reflection separation and other technologies to effectively deal with shadow interference; at the same time, multi-scale pyramid feature fusion, attention mechanism and other technologies are used to enhance the algorithm's detection robustness for obstacles of different sizes and angles. According to the obstacle identification results, the obstacle category, location, size and other attribute information are extracted, and combined with the prior knowledge of the drone's status information, global map, route planning, etc., a risk assessment model based on fuzzy logic, Bayesian network and other methods is used to quantitatively evaluate the threat level of obstacles. For obstacles with lower risk levels, the drone can maintain the current heading and speed and continue to fly; for obstacles with higher risk levels, the obstacle avoidance path is timely planned through artificial potential field method, RRT random tree and other methods, and the path is smoothly optimized using Dubins curve, B-spline curve and other methods. At the same time, the flight dynamics constraints and task requirements of the drone are taken into account, and multi-objective optimization, reinforcement learning and other methods are used to make intelligent trade-offs and dynamic adjustments between obstacle avoidance and inspection tasks. The obstacle information is mapped into a three-dimensional space coordinate system to obtain the geometric model of the obstacle. The structured attribute data and unstructured three-dimensional model data of the obstacle are stored and managed by combining relational and non-relational databases such as MySQL+MongoDB, and an efficient spatiotemporal index is established to support fast retrieval, update and deletion. Data redundancy backup and off-site disaster recovery measures are taken to ensure the reliability and continuity of the database.During the flight, the UAV continuously receives new obstacle samples, and uses incremental learning algorithms based on stream data mining such as HoeffdingTree and SAM-kNN to process and screen samples in real time, extract feature vectors of samples and update sample sets. For the screened samples, active learning strategies such as uncertainty sampling and density sampling are used, and samples with large model prediction uncertainty and obvious improvement effects are given priority for manual labeling. Incremental learning methods such as Fine-tuning and Few-shot Learning are then used to quickly adapt to new obstacle categories and features while retaining the original model knowledge. The ratio of new and old samples is weighed through methods such as EWC regularization and LearningwithoutForgetting to avoid "catastrophic forgetting", and reasonable performance evaluation indicators and thresholds are designed to monitor the model update iteration process in real time and stop losses in time. Build a task-oriented autonomous decision-making and control framework, comprehensively utilize obstacle recognition, SLAM positioning, trajectory planning, motion control and other technologies to realize autonomous obstacle avoidance and navigation of UAVs in complex environments, dynamically generate local obstacle avoidance paths and speed instructions based on real-time obstacle information, and smoothly and efficiently fly around obstacles through predictive control, model control and other methods, quickly return to the global optimal trajectory, and complete the refined inspection task of photovoltaic modules.
[0037] Specifically, the drone uses a compressed and quantized YOLOv5s model for obstacle detection, reducing the model parameters to 1 / 4 of the original, and the amount of calculation to 1 / 2. By using TensorRT acceleration on the NVIDIA Jetson TX2 platform, the detection frame rate can reach 25FPS, and the mAP on the VisDrone dataset reaches 92%. The photovoltaic panel image is first gamma transformed, and the gamma value is adaptively generated through histogram statistics. Then Laplace sharpening is performed, and the parameters are determined according to the image gradient energy. Finally, the shadow detection model ShadowGAN is used to remove the shadow area, and the reflection separation algorithm STAR is used to restore the original reflection information, improving the image contrast by 30%. The target detection model adopts a 6-layer feature pyramid structure, adds a Transformer encoder to extract global attention features, and adaptively weights and fuses features of different scales under the guidance of the attention map, which improves the detection rate of small targets and dense targets by 12 percentage points. According to the pixel coordinates and depth information of the obstacle in the image, after camera calibration matrix mapping and coordinate transformation, the obstacle's position, size, and heading deviation in three-dimensional space are obtained, and then the danger probability is calculated through Bayesian network reasoning. If it is higher than 0.7, the obstacle attribute is written into the MongoDB database, and the corresponding point cloud information is written into the MySQL database to build a "attribute-model" double index, which compresses the storage space by 50% and shortens the retrieval response time by 60%. The drone receives a batch of new samples every 30 seconds, and uses the SAM-KNN algorithm for incremental learning with a window size of 5 minutes. When the number of new samples exceeds 20% of the window size, the model update is triggered, which improves the detection accuracy by 5%. At the same time, an active learning strategy that minimizes the misclassification rate is adopted, and the Top-5% difficult samples with the largest number of support vectors are selected for manual labeling, and PrototypicalNetwork is used for Few-Shot fine-tuning. After 10 iterations, the detection accuracy of the new category can reach 85%, and the forgetting rate of the old category is controlled within 3%. The drone uses an autonomous obstacle avoidance strategy based on deep reinforcement learning. The state space is the relative position and speed of the obstacle, the action space is the yaw angle and pitch angle, and the reward function comprehensively considers factors such as obstacle distance, energy consumption, and task progress. After training 500 episodes, the average obstacle avoidance success rate reached 95%, energy consumption was reduced by 20%, and task completion efficiency was improved.
[0038] Step S107, planning an optimal obstacle avoidance path based on the real-time updated obstacle avoidance database and the current position of the drone, and transmitting the optimal obstacle avoidance path to the drone for execution in real time.
[0039] Through real-time communication with the UAV, the GPS position, IMU attitude, heading speed and other state information of the UAV are continuously obtained. The Kalman filter algorithm is used to predict and estimate the state of the UAV, and the precise position and movement trend of the UAV in three-dimensional space are obtained as the starting point of path planning. According to the current position of the UAV, the obstacle information within a certain radius is selected from the obstacle avoidance database with the position as the center. The attribute parameters such as the category, position, volume and so on of the obstacles are quickly retrieved and obtained through spatial indexing methods such as octree, and a local obstacle environment model is constructed. The octree recursively divides the space into eight sub-areas to form a tree-like hierarchical structure. The appropriate division strategy is selected according to the density and distribution of the obstacles. When querying, the parent node and adjacent nodes are recursively traversed according to the sub-area to which the UAV belongs, and the obstacle information that intersects with the UAV position or is less than the safety threshold is obtained. The search range is narrowed to the local area, the query efficiency is improved, and the tree structure is dynamically updated and balanced according to the real-time changes of the obstacles. On the basis of the local environment model, the kinematic constraints of the UAV are comprehensively considered, and the improved A* search algorithm is used for path planning. When the algorithm expands the node, it adaptively adjusts the search step size and direction according to the distance and direction from the current node to the target point. In the evaluation function, it comprehensively considers multi-objective factors such as flight time and energy consumption to generate a comprehensive evaluation value, and adopts an incremental path expansion strategy to terminate the search in advance under the premise of meeting the safety distance and time limit, thereby shortening the path search time. The initial obstacle avoidance path obtained by the search is optimized by curve fitting, and a parameterized curve fitting method such as B-spline curve is used to generate a smooth and continuous flight trajectory. The waypoints and aircraft attitude are obtained by solving the coordinates of the control points of the curve, and then a high-density trajectory discrete points are generated by the curve interpolation method as the input of the flight control system. In the process of path planning and curve fitting, the GPU acceleration platform is fully utilized, parallel computing and multi-threaded optimization technology are adopted, and the GPU is used under the CUDA framework to accelerate the path search and curve fitting algorithms, so that the calculation time of the path planning is controlled within 50 milliseconds. The search space is divided into multiple independent sub-regions, each of which corresponds to a GPU thread block. Multiple threads in the thread block search the nodes they are responsible for in parallel. The double-ended queue data structure is used to evenly distribute the nodes to be expanded to each thread. The GPU shared memory is used to batch load node status information to reduce the number of global memory accesses and improve computing efficiency. For curve fitting tasks, the curve is discretized into multiple control points, and the coordinate calculation of each control point is assigned to a GPU thread. Multiple threads calculate the coordinates of their respective control points in parallel, and then summarize the calculation results through GPU atomic operations. The size and number of CUDA thread blocks are reasonably selected to fully utilize GPU hardware resources.The optimal obstacle avoidance path obtained through planning is processed by data compression, encoding, encryption, etc., and then transmitted to the drone in real time using the 5G communication network. The path data is assigned a dedicated transmission channel and priority through the QoS service quality assurance mechanism to ensure low latency and high reliability of data transmission, with a delay jitter of less than 10 milliseconds and a packet loss rate of less than 0.1%. After receiving the path data, the drone performs decompression, decoding, decryption, etc. to reconstruct the obstacle avoidance path in three-dimensional space, and uses curve interpolation algorithms such as cubic spline interpolation and Catmull-Rom spline interpolation to generate smooth trajectory curves between adjacent waypoints. In strict accordance with the dynamic constraints of the drone, the interpolated discrete points are converted into control instructions of the flight control system, packaged into data frames in a specific format, and sent to the drone in real time through the interface. Based on the received waypoint information, the UAV uses the waypoint tracking control algorithm, takes the waypoint position deviation and the aircraft attitude deviation as control quantities, and designs a position controller and attitude controller including PID control and adaptive robust control. The speed control command and attitude angular velocity control command are calculated according to the GPS position deviation and IMU attitude deviation respectively. Through the motor mixed output, the UAV can achieve precise obstacle avoidance in three-dimensional space. At the same time, the UAV position and attitude state are monitored in real time, the actual flight trajectory is compared with the planned path, and the position and attitude deviations are calculated as controller feedback to achieve path tracking and trajectory correction, thereby ensuring the timeliness and accuracy of obstacle avoidance decisions.
[0040] Specifically, the drone establishes a real-time data link with the ground station through the onboard 4G communication module, and obtains GPS positioning and IMU attitude data at a frequency of 10Hz. The GPS horizontal positioning accuracy is better than 2m, the vertical positioning accuracy is better than 3m, and the IMU attitude angle measurement accuracy is better than 0.5°. The extended Kalman filter algorithm is used to fusion estimate the position, speed, and attitude, and the estimation error converges to 0.1m and 0.1m / s. After the ground station receives the current position of the drone, it takes the position as the center and searches the obstacle avoidance database within a radius of 500m. The database uses an octree index with a spatial division granularity of 10m and an index depth of 4. The corresponding obstacle attributes include position, volume, type, etc. The entire retrieval process takes less than 30ms. Based on local obstacle information, the improved A algorithm is used for path search. The search step size is dynamically adjusted in the range of 1 to 10m. The flight time weight coefficient in the evaluation function is 0.6, the energy consumption weight coefficient is 0.3, and the safety distance weight coefficient is 0.1. During the search process, heuristic path pruning is performed every 10 nodes. When the number of search nodes exceeds 1000, the early termination condition is triggered, and the average search time is controlled within 20ms. The path obtained by A search is fitted with a B-spline curve, with a curve degree of 3 and the number of control points being 1 / 5 of the number of path nodes. The average error of the fitted curve relative to the original broken line path is less than 0.5m, and the maximum error is less than 1m. 10,000 high-density trajectory discrete points are generated for flight control. Both path planning and curve fitting are performed on the NVIDIA Jetson TX2 platform. The search and fitting tasks occupy 200 CUDA cores respectively. The optimization level is set to O3 during compilation, and optimization technologies such as instruction pipelining and branch prediction are enabled. The non-blocking synchronous CUDA stream partitioning granularity is 10, and the shared memory utilization rate reaches 60%. The RC5-encrypted path data is transmitted to the drone through the 5G network. The uplink bandwidth is 500Mbps, the transmission delay is 10ms, and the data packet is added with a checksum and timestamp. The size of each data packet is 1KB, and the packet loss rate is less than 0.01%. After receiving the data, the drone uses cubic Catmull-Rom spline interpolation to reconstruct the trajectory. The node density of the interpolated trajectory is 0.1m, which meets the constraints of a minimum turning radius of 5m and a maximum climbing angle of 20°. The UAV adjusts its flight attitude in real time according to the trajectory nodes. The horizontal position control adopts an incremental PID algorithm with an integral coefficient of 0.5, a velocity feedforward coefficient of 0.8, and a control period of 20ms, achieving a steady-state tracking accuracy of 0.1m. The attitude control adopts an adaptive Backstepping sliding mode algorithm with a parameter adaptation rate of 1.0, a disturbance observer convergence time of 0.5s, and a robustness index of 2.5, achieving a steady-state attitude tracking accuracy of 0.5°.The actual flight trajectory of the UAV is measured by the onboard visual odometry, with a reprojection error of less than 1 pixel. It is compared with the planned path in real time, and the deviation is input into the PID controller for feedback correction, eliminating more than 50% of the trajectory deviation, and the obstacle avoidance success rate reaches more than 99%.
[0041] Step S108: While executing the optimal obstacle avoidance path, the UAV system continuously monitors changes in the surrounding environment. If a new obstacle or obstacle movement is detected, the obstacle avoidance path is adjusted in real time.
[0042] While executing the planned optimal obstacle avoidance path flight, the drone continuously scans and monitors the surrounding environment at a frequency of 10Hz through onboard sensors such as laser radar and millimeter wave radar, obtains multi-source heterogeneous data such as three-dimensional point cloud and radar echo, and perceives and updates environmental information in real time. The laser radar obtains high-precision point cloud data of the surrounding environment in real time by emitting laser beams in different directions and receiving the returned echo signals; the millimeter wave radar makes up for the blind spot of laser radar in bad weather with its strong penetration, low scattering loss, and all-weather operation. The complementary fusion of the two can greatly improve the robustness and reliability of environmental perception. The acquired multi-source sensor data is firstly subjected to spatiotemporal registration and coordinate transformation, and iterative optimization algorithms such as ICP and NDT are used to find the optimal transformation matrix between different sensor data, and unify them into a local coordinate system centered on the drone. Then, nonlinear estimation algorithms such as particle filtering are used to fuse heterogeneous sensor data. The angular velocity and acceleration measurements of IMU are used as process models, and the point cloud matching results of LiDAR are used as observation models. Through steps such as resampling and updating importance weights, the drone's position, velocity and other state quantities are recursively estimated to eliminate observation errors introduced by factors such as single sensor accuracy limitations, occlusion and noise. Semantic segmentation and target detection are performed on the fused environmental perception data. Point cloud semantic segmentation algorithms such as PointNet++ and KPConv are used to directly extract local and global features from the original point cloud, and semantic labels of point clouds are obtained by point-by-point classification. The point cloud is then divided into different categories such as roads, buildings, vehicles, pedestrians, etc. in combination with prior semantic maps to extract potential obstacle targets. Target detection uses lightweight detection models such as YOLOv5 and v6, and introduces improvements such as Focus structure, PAN attention mechanism, and GIOULoss to improve the detection performance of small and dense targets. Through multi-target tracking algorithms such as Kalman filtering and Hungarian algorithm, the dynamic properties of obstacles such as motion trajectory and speed are obtained to judge their potential threat to the UAV. The decision-making mechanism based on risk assessment is used to adjust the safety distance and obstacle avoidance strategy of the UAV in real time. The representation method of occupancy grid is introduced in the local environment map of the UAV, and the environment is divided into grids of equal size. Each grid is represented by a probability value to represent the possibility of being occupied by an obstacle. For dynamic obstacles, velocity layer and acceleration layer are introduced on the basis of occupancy grid, and their motion state is characterized by vector or Gaussian distribution. When new sensor data arrives, the posterior occupancy probability of each grid is updated in real time by Bayesian updating, and algorithms such as Kalman filtering and particle filtering are used to track and predict the movement trend of obstacles to construct a "dynamic occupancy grid map" to reflect the real-time changes of the environment. When the local map changes significantly, the obstacle avoidance path is replanned, and real-time search algorithms such as RRT* and APF are used to quickly generate a collision-free, efficient and smooth obstacle avoidance path under the premise of meeting the dynamic constraints and safety margin of the UAV.The replanned obstacle avoidance path is smoothed by the minimum snap trajectory optimization method. The path curve is modeled as a piecewise polynomial function. The objective function is set to the L2 norm of snap (fourth-order derivative). The constraints include the path start point, end point, waypoint, maximum speed, acceleration, etc. The SQP algorithm is used to iteratively solve the polynomial coefficients to obtain a smooth flight trajectory that minimizes snap energy and satisfies dynamic constraints. The trajectory is discretized into a waypoint sequence and sent to the flight control system for execution. After receiving the updated obstacle avoidance path, the flight control system switches to the new waypoint sequence in time, and uses advanced control laws such as nonlinear model predictive control and adaptive robust control to adjust the attitude and thrust of the drone in real time, so that it can fly stably and smoothly along the new obstacle avoidance path. At the same time, the actual flight trajectory of the drone is continuously monitored, and the trajectory deviation caused by external disturbances and modeling errors is quickly eliminated through position-velocity feedback control, trajectory tracking control, etc., to ensure the robustness and accuracy of flight control, and realize autonomous obstacle avoidance and continuous inspection operations of the drone in a dynamic unknown environment.
[0043] Specifically, the drone is equipped with a velodyne VLP-16 laser radar and a TIA WR1642 millimeter-wave radar. The laser radar rotates and scans at a frequency of 10 Hz to obtain 16 lines of high-resolution point cloud data, with a point cloud density of about 50,000 points per second and a detection distance of up to 100 meters. The millimeter-wave radar operates in the 76-81 GHz frequency band, scans at a frequency of 20 Hz, and has a detection distance of up to 150 meters. The PLICP algorithm is used to align the two sensor data, setting the distance threshold of the point cloud matching to 0.1 meters, and iterating 20 times to obtain a transformation matrix with an alignment error of less than 0.05 meters; then the PF filter algorithm with a capacity of 1,000 particles is used for fusion positioning, and the drone pose estimation result is output at a frequency of 100 Hz, with a positioning accuracy better than 0.1 meters. The fused point cloud data is processed by the improved PointNet++ semantic segmentation algorithm, and 8 semantic categories are set, including ground, buildings, trees, vehicles, pedestrians, etc., and the prior OSM map is added for point cloud conversion and segmentation, and the overall segmentation accuracy reaches more than 85%; on this basis, the YOLOv5-s target detection model is used to realize the recognition and positioning of obstacles. The model is trained for the 256×256 resolution point cloud top view. After 150 epochs, it reaches 95% mAP accuracy on the self-built data set, and the detection distance can reach 50 meters. The obstacle target is represented by a 3D occupancy grid map with a resolution of 0.2 meters, and the dynamic target is additionally given a speed attribute, and the KF filter algorithm is used to realize trajectory tracking and speed estimation. When the obstacle intersects with the predicted trajectory of the drone and the TTC is less than 5 seconds, the local path replanning is triggered. The current position of the drone is used as the root node and the preset waypoint is used as the sampling guide. The InformedRRT* algorithm is used to quickly search 100 random nodes within a radius of 20 meters, and the optimal path is selected with the minimum JWT energy as the cost function. The replanning frequency is 5Hz, and the single replanning time is less than 50 milliseconds. The replanned path is optimized using the mini-snap trajectory generation method. The path is discretized into 50 control points. The total path length, maximum speed (10m / s), maximum acceleration (4m / s^2), maximum jump (5m / s^3) and other constraints are set. The gradient-based LBFGS solver is used for iterative optimization to obtain a minimum snap curve that meets the dynamic constraints. The optimization takes about 10 milliseconds. The trajectory is decomposed into state quantities such as the expected position, speed, acceleration, and yaw angular velocity, and docked with the NLMPC controller in the PX4 flight control. The controller uses the ACADO library for real-time solution. The prediction time domain is set to 1 second, the control time domain is set to 0.2 seconds, the state quantity error weight is set to 10, the control quantity error weight is set to 1, the maximum number of iterations is set to 5, and the control frequency is set to 50 Hz. The deviation between the actual flight trajectory and the reference trajectory is kept within 0.2 meters.By controlling the three Euler angles of pitch, roll and yaw and the throttle output of the drone, decoupling control of the drone's attitude and position is achieved, allowing it to stably execute the entire obstacle avoidance process.
[0044] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for automatically selecting obstacle avoidance points and obstacle avoidance methods for a photovoltaic station inspected by a drone, characterized in that: The method comprises: After grading the PV stations according to the complexity of the terrain and the distribution of obstacles, the data fusion system equipped with multiple sensors analyzes each graded area to obtain maps of each area and the location information of obstacles; Use machine learning algorithms to predict the difficulty of obstacle avoidance for drones in each area based on maps and obstacle information, and select appropriate drone types for different areas, including fixed-wing drones and multi-rotor drones; Coordinate the flight and mission execution of multiple drones through the drone collaborative communication network to ensure that conflicts are avoided and inspection tasks can be completed. At the same time, monitor the status and inspection progress of drones in real time and dynamically adjust the flight strategy to cope with actual conditions; For inspection images captured by drones equipped with different sensors, image processing is used to analyze image clarity in real time, and obstacles are classified and identified based on the difference in clarity, thereby optimizing the obstacle detection process; When the speed of obstacle recognition is different, the flight speed and altitude of the drone are dynamically adjusted to obtain higher inspection image clarity and obstacle recognition efficiency; Identify obstacles from inspection images and use the identification results to update the obstacle avoidance database of the drone in flight; According to the real-time updated obstacle avoidance database and the current position of the UAV, the optimal obstacle avoidance path is planned and transmitted to the UAV in real time for execution; While executing the optimal obstacle avoidance path, the drone system continuously monitors changes in the surrounding environment. If a new obstacle or obstacle movement is detected, the obstacle avoidance path is adjusted in real time.
2. The method according to claim 1, wherein: After the photovoltaic stations are classified according to the complexity of the terrain and the distribution of obstacles, the data fusion system equipped with multiple sensors analyzes each classified area to obtain a map of each area and the location information of obstacles, including: According to the terrain complexity and obstacle distribution of the PV station area, the PV stations are classified using a machine learning algorithm to obtain classification areas with different complexity levels; Deploy a data fusion system equipped with multiple sensors such as lidar, optical cameras and infrared thermal imagers in each classified area; Obtain point cloud data and preprocess it through lidar, obtain high-resolution image data and preprocess it through optical camera, and obtain thermal map data and preprocess it through infrared thermal imager; These sensor data are synchronized in time and space and the coordinate system is unified. Point cloud and image registration algorithms (such as ICP algorithm) are used to align them to the same coordinate system. Multi-sensor fusion algorithms (such as Kalman filter and particle filter) are then used to fuse the aligned data to generate high-precision three-dimensional spatial information. Process the acquired three-dimensional spatial information, use point cloud stitching algorithms (such as ICP algorithm and 3DSLAM algorithm, etc.) to stitch point cloud data from different areas to generate a complete three-dimensional point cloud map; Then, semantic segmentation algorithms (such as PointNet++ and SegNet) are used to semantically annotate the 3D point cloud map and classify and mark different objects and areas in the point cloud, such as the ground, buildings, and vegetation. According to the semantic segmentation results, the point cloud data of the obstacle is extracted, and clustering and edge extraction are performed to obtain the location information of the obstacle; According to the location information of the obstacle, the point cloud data of the obstacle is projected onto a two-dimensional plane to generate a two-dimensional image of the obstacle; Use the pre-trained YOLOv3 model to detect and classify obstacle images to obtain attribute information such as obstacle category, location, and size; Match the detected obstacle attribute information with the 3D point cloud map to obtain the position and posture information of the obstacle in 3D space; The location, size, category and other attribute information of the obstacle are converted into the same coordinate system and scale as the detailed map, and the three-dimensional model or annotation information of the obstacle is added to the corresponding position in the detailed map to integrate the obstacle information with the map; Visualize and analyze the fused map, check the accuracy and completeness of the fusion results, generate a hierarchical area map containing detailed information on obstacles, and provide data support for subsequent PV station operation and maintenance planning; The improved ICP algorithm is used to perform similarity matching on detailed maps of different graded areas; Extract feature points of each graded area map, such as corner points and edge points; Use the improved ICP algorithm to match the feature points of maps in different regions and calculate the coordinate transformation relationship between them; The improved ICP algorithm introduces point-to-point and point-to-plane distance metrics to improve the matching accuracy and robustness; According to the coordinate transformation relationship obtained by matching, maps of different areas are spliced into a complete global map; Optimize and smooth the spliced global map to eliminate splicing gaps and discontinuities; Based on the global map of the photovoltaic station, the inspection routes of drones and robots are planned using a combination of improved A algorithm and genetic algorithm. Divide the global map into several grids, each grid represents a reachable location; Use the improved A algorithm to search for the optimal inspection path, taking into account factors such as obstacle location, energy consumption, and inspection coverage; The improved A algorithm introduces heuristic functions and cost functions to improve search efficiency and path quality; Use genetic algorithms to optimize the path obtained by algorithm A, and obtain a shorter and smoother inspection path through operations such as crossover and mutation; Convert the optimized inspection paths into control instructions for drones and robots, achieve full coverage and efficient autonomous inspection of photovoltaic station equipment, and improve the operation and maintenance efficiency and safety of photovoltaic stations.
3. The method according to claim 1, wherein: The machine learning algorithm is used to predict the difficulty of obstacle avoidance of drones in each area based on the map and obstacle information, and accordingly select the appropriate type of drone for different areas, including fixed-wing drones and multi-rotor drones, including: According to the map information of the photovoltaic station and the distribution of obstacles, clustering algorithms such as K-means are used to divide the photovoltaic station area. Indicators such as obstacle density and terrain undulation are selected as clustering features. Several sub-areas with similar features are obtained through iterative optimization. Then, the features consistent with the clustering algorithm are extracted from each sub-region, and after normalization, a weighted sum scoring function is designed. The weight coefficients of different features are multiplied by their normalized values, and then added to obtain the obstacle avoidance difficulty score of the region. The feature weights can be obtained through empirical settings or automatic learning by machine learning algorithms. In practical applications, some representative areas are selected in the photovoltaic station, and obstacle avoidance flight tests are carried out using different types of drones. The obstacle information, flight trajectory, control instructions and other data during the flight are recorded by onboard sensors to build a small-scale obstacle avoidance flight data set for training and tuning the prediction model, which is then applied to the obstacle avoidance difficulty prediction of the entire photovoltaic station. As drone inspection missions continue to be carried out, flight data is continuously collected, and the prediction model is iteratively updated to improve the accuracy of the prediction; Comprehensively consider the obstacle avoidance difficulty score, area size, terrain undulation, and inspection task complexity of each sub-area, assign a weight coefficient to each factor, quantify the performance parameters of different types of drones, multiply them by the weight coefficient to get the comprehensive performance score, and select the type of drone with the highest comprehensive performance score as the optimal choice for the area; The allocation of weight coefficients can refer to industry experience and expert opinions, or can be automatically optimized through data analysis and machine learning methods; When the drone performs inspection tasks, it uses GPS, IMU, laser radar, millimeter-wave radar, optical camera, infrared camera, meteorological sensor and other equipment to monitor the drone's position, speed, attitude and other flight status parameters in real time, detect obstacle distance and direction, obtain surrounding visual images, measure environmental parameters, and evaluate their impact on flight; The monitoring software can set warning thresholds and rules, and promptly send out alarms to operators when abnormalities occur. It can also automatically adjust flight missions and control instructions according to preset emergency strategies to ensure flight safety. For areas where obstacle avoidance is more difficult, they can be further subdivided into smaller sub-areas, and safe flight routes can be planned in each small area. The drone can also be equipped with more accurate obstacle avoidance sensors and high-performance flight control systems to cope with obstacle avoidance tasks in complex environments. In actual drone inspection tasks, corresponding flight plans and control strategies are formulated according to the characteristics of each sub-area and the type of drone assigned. Combined with real-time monitoring data, the route and obstacle avoidance strategy are dynamically adjusted to ensure that the drone can complete the inspection task of the photovoltaic station safely and efficiently.
4. The method according to claim 1, wherein: The flight and mission execution of multiple drones are coordinated through the drone collaborative communication network to ensure that conflicts are avoided and inspection tasks can be completed; At the same time, the status and inspection progress of the drone are monitored in real time, and the flight strategy is dynamically adjusted to cope with the actual situation, including: By equipping drones with multiple communication devices such as WiFi, 4G / 5G and satellite communications, a hierarchical heterogeneous drone collaborative communication network is constructed. The network is divided into three layers from bottom to top: perception layer, network layer and application layer. Software-defined network (SDN) technology is used to achieve flexible scheduling and optimization of network resources, and support seamless switching and load balancing between different communication links to ensure the real-time, reliability and redundancy of communication. Using the multi-agent reinforcement learning algorithm MADDPG, the flight paths and task allocation of multiple drones are collaboratively optimized through centralized training and distributed execution, enabling drones to make autonomous decisions based on their own status and environmental information, improving task execution efficiency and adaptability while avoiding conflicts; A distributed UAV status monitoring and inspection progress tracking mechanism is designed in the UAV cooperative communication network. A status monitoring and tracking agent program runs on each UAV to periodically collect and broadcast the status information of the UAV and receive the status messages of other UAVs at the same time. The (VectorClock) mechanism realizes the eventual consistency of state updates, forming a real-time updated global state table for drone collaborative decision-making and control; When an abnormal situation occurs in the drone, an alarm message is sent in time through the collaborative communication network, and the task allocation and flight path are dynamically adjusted according to the global status table to ensure the continuity and integrity of the inspection task; According to the flight status and environmental conditions of the UAV, the working parameters of each communication link in the cooperative communication network are adaptively adjusted to improve the robustness and survivability of the network while ensuring the communication quality; Utilize multi-source sensor data carried by drones, such as visible light images, infrared images, and laser point clouds, and use methods such as data spatiotemporal alignment, convolutional neural network (CNN) feature extraction, semantic segmentation, and multimodal decision-level fusion to achieve intelligent detection and precise positioning of abnormal conditions of photovoltaic modules. The detection results are shared with other drones and ground stations through a collaborative communication network, forming a distributed abnormal warning mechanism. A centralized task scheduling and monitoring center is set up at the ground station. It interacts with the UAV collaborative communication network through an asynchronous interaction mode based on a message queue (MessageQueue), sends control instructions and task adjustment messages to the specified Kafka message queue, and specifies the priority and expiration time of the message. The UAV subscribes and pulls messages for processing based on the identity. At the same time, the monitoring center also receives the status and task execution results reported by the UAV through the REST-style WebAPI to realize the active push of monitoring information. When a problem is discovered or an abnormal alarm is received, control instructions are issued in a timely manner to dynamically adjust the drone's flight strategy and task allocation to ensure the safety, reliability and intelligence level of photovoltaic power station inspections.
5. The method according to claim 1, wherein: The inspection images captured by drones equipped with different sensors are analyzed in real time by image processing, and obstacles are classified and identified according to the difference in clarity, thereby optimizing the obstacle detection process, including: The drone is equipped with various types of sensors such as visible light cameras, infrared thermal imagers and lidar. During the flight inspection, it images the photovoltaic power station from different perspectives and modes, obtains multi-source heterogeneous image data, and transmits it to the ground station for real-time analysis and processing; The acquired inspection images are first processed by histogram equalization to improve the contrast and dynamic range of the images and make the image details clearer; Then, the adaptive median filter algorithm is used to denoise the image. The adaptive median filter replaces the central pixel value by calculating the median of the pixel values in the filter window. Compared with the ordinary median filter, it can better preserve the edge and texture details of the image. The size of the filter window can be adaptively adjusted according to the noise type and intensity of the image. Extract the clarity features of the image, use the gradient-based Tenengrad function and the frequency-domain-based Fast Fourier Transform (FFT) algorithm to measure the clarity of the image from the spatial domain and frequency domain perspectives respectively; The Tenengrad function measures the clarity of an image by calculating the sum of the squares of the gradients of the grayscale values of the image pixels. The gradient value can be calculated using methods such as the Sobel operator. The FFT algorithm measures the clarity of an image by performing Fourier transform on the image and calculating the energy of the high-frequency components of the image in the frequency domain. The greater the frequency domain energy, the more high-frequency detail information the image contains and the higher the clarity. According to the image clarity index, the K-means clustering algorithm is used to classify the images, and the images with similar clarity are divided into the same category to form several image subsets with high to low clarity. For high-definition image subsets, a deep learning algorithm with high accuracy but high computational complexity, such as Faster R-CNN, is used to accurately identify the category and location of obstacles. The prior box of RoI (Region of Interest) can be set based on the high-frequency area of obstacles obtained by clustering to reduce invalid searches. For the low-definition image subset, traditional machine learning algorithms such as visual saliency are used to quickly segment the outline of obstacles from the background. Prior features such as color, texture, and shape of different obstacle categories can be used to guide the extraction of salient areas. When fusing the obstacle results detected by multiple image subsets, the detection results of different sensors are first unified into the global coordinate system of the lidar point cloud, and the coordinate transformation is achieved through camera calibration and external parameter estimation; Then, the Kalman filter algorithm is used to track the state of the obstacle in time and space continuously. The state vector is defined as the three-dimensional position, velocity and acceleration of the obstacle, and the observation vector is the detection result of each sensor. By establishing the state transfer equation and the observation equation, the optimal state of the obstacle is recursively estimated. Considering the detection accuracy, noise characteristics and failure probability of different sensors, a weighted fusion strategy is designed to dynamically adjust the weight coefficient of each sensor result, remove the repeated or false detection results caused by the difference in clarity, and form a unified three-dimensional spatial distribution map of the obstacle. Based on the GIS data of the photovoltaic power station, a rule-based impact assessment model is established to comprehensively consider the type, location and rated parameters of electrical equipment, the type, size and height of obstacles, and the spatial relationship between the distance and orientation of the obstacles. The model gives the danger level and impact range of obstacles, and dynamically updates the assessment results in combination with real-time factors such as environmental conditions and operation and maintenance requirements to generate a fault hidden danger investigation report. On this basis, heuristic search algorithms, such as A* algorithm and genetic algorithm, are used to search for the optimal route in the global map, avoiding dangerous obstacles while satisfying constraints such as full coverage and shortest path as much as possible; In terms of local obstacle avoidance, a safe and smooth obstacle avoidance trajectory is planned in real time in combination with the UAV's maneuverability, such as maximum climb rate and maximum tilt angle. If necessary, multiple UAVs are coordinated to observe obstacles from different directions and heights to improve the robustness of perception and decision-making. Finally, the optimized route and obstacle avoidance strategy are fed back to the UAV flight control system to guide the UAV to complete the inspection task of the photovoltaic power station safely and efficiently.
6. The method according to claim 1, wherein: The method of dynamically adjusting the flight speed and altitude of the drone when the obstacle recognition speeds are different to obtain higher inspection image clarity and obstacle recognition efficiency includes: The drone uses an onboard computer to analyze the running speed and recognition accuracy of the obstacle recognition algorithm in real time, pre-sets speed thresholds and accuracy thresholds, and collects statistics on the actual running speed and missed detection rate of the algorithm in real time during flight, compares them with the preset thresholds, and adaptively adjusts the algorithm parameters so that the algorithm can run at an appropriate speed and accuracy in different environments, and associates the algorithm performance indicators with the drone's flight status; When the running speed of the recognition algorithm is lower than the preset threshold, the drone reduces the flight speed through the PID control algorithm to extend the image acquisition time within the unit distance; At the same time, the flight altitude is adaptively adjusted according to the camera's focal length, field of view and other parameters, and the camera's field of view is appropriately narrowed while ensuring image resolution to improve the accuracy of target detection; The drone detects environmental factors such as wind speed, light intensity, temperature and humidity in real time through multi-sensor data fusion, selects indicators such as image clarity, contrast and signal-to-noise ratio as dependent variables to measure image quality, and uses machine learning algorithms such as multivariate regression and support vector machine to establish a nonlinear mapping model between environmental factors and image quality, and predict the impact of different flight parameter combinations on image quality under current environmental conditions; According to the mapping model between flight speed and altitude and image quality, the image clarity, obstacle recognition accuracy and flight speed are set as three objective functions respectively. By setting the speed and altitude search space as well as the population size and the maximum number of iterations, the particle swarm optimization algorithm is used to solve the multi-objective function and obtain a set of Pareto non-inferior solutions. Then, according to the mission requirements and flight safety performance constraints, such as the maximum speed and minimum flight altitude of the drone, an optimal solution that balances image quality and flight efficiency is selected from the Pareto solution set as the optimal flight strategy under the current environment; During the flight, the drone continuously evaluates the image quality and obstacle recognition performance. An online learning module is added to the onboard control system, using temporal difference learning algorithms such as Q-learning to establish a state-action-reward function. Through continuous exploration and trial and error, the optimal speed and altitude control strategy is learned in real time, enabling the drone to autonomously adjust its flight attitude according to environmental changes, thereby improving flight flexibility and robustness. For obstacles that are difficult to accurately identify in complex environments, the drone uses the visual SLAM algorithm to continuously track and 3D reconstruct them, obtain the semantic information, spatial position, hazard level and other attributes of the obstacle, and perform real-time registration of the obstacle model with the onboard GIS map to determine the positional relationship of the obstacle relative to the drone and the photovoltaic panel area; After identifying key obstacles that threaten flight and inspection, the drone uses obstacle avoidance algorithms such as artificial potential field method and RRT random tree to locally optimize the global route planning, comprehensively consider the drone's maneuver constraints and image quality requirements, and plan a safe, efficient and smooth obstacle avoidance trajectory to guide the drone to bypass obstacles and return to the global optimal route as soon as possible; During the obstacle avoidance process, the drone continuously optimizes flight parameters such as speed, altitude and heading, and iteratively solves the optimal control quantity through optimization algorithms such as gradient descent and quasi-Newton method, so that the imaging position, size and angle of the obstacle in the camera's field of view meet the accuracy requirements of the recognition algorithm, while ensuring the flight efficiency and safety of the drone; The organic combination of online strategy learning and local obstacle avoidance optimization with global route planning enables drones to autonomously adapt and continuously patrol in complex environments, improving the intelligence level of photovoltaic power station operation and maintenance.
7. The method according to claim 1, wherein: The method of identifying obstacles from the inspection image and using the identification results to update the obstacle avoidance database of the UAV during flight includes: The deep learning-based target detection algorithm YOLOv5 is adopted, and the optimization strategies of EfficientDet, such as FPN and BiFPN, are used to improve the detection accuracy while taking into account the lightweight of the model. The model is further compressed through model distillation, pruning and quantization technologies, so that it can achieve real-time obstacle detection under the limited onboard computing resources of drones. Deploy deep learning inference engines such as TensorRT and NCNN on the drone's onboard computing platform, and use heterogeneous computing resources such as GPU and FPGA to accelerate and optimize the neural network model, significantly improving the recognition speed while ensuring recognition accuracy, and achieving real-time processing of high-resolution images; In response to challenges such as changing light and changing weather in photovoltaic power station environments, image pre-processing and post-processing modules are added to the recognition algorithm. Histogram equalization and sharpening enhancement methods are used to adaptively adjust image parameters. Appropriate enhancement and filtering strategies are adopted for different shadow situations. Shadow detection and removal models ShadowGAN, light estimation, and reflection separation technologies are combined to effectively handle shadow interference. At the same time, multi-scale pyramid feature fusion and attention mechanism are used to enhance the algorithm's detection robustness against obstacles of different sizes and angles. According to the obstacle identification results, the obstacle’s attribute information such as category, location and size is extracted. Combined with the drone’s status information, global map and route planning and other prior knowledge, a risk assessment model based on fuzzy logic and Bayesian network is used to quantitatively assess the threat level of obstacles. For obstacles with a lower risk level, the drone can maintain the current heading and speed and continue to fly; For obstacles with higher risk levels, the obstacle avoidance path is planned in time through artificial potential field method and RRT random tree, and the path is smoothly optimized using Dubins curve and B-spline curve. At the same time, the flight dynamics constraints and mission requirements of the UAV are taken into account, and multi-objective optimization and reinforcement learning methods are used to make intelligent trade-offs and dynamic adjustments between obstacle avoidance and inspection tasks. Map obstacle information to a three-dimensional space coordinate system to obtain the geometric model of the obstacle. Use a combination of relational and non-relational databases such as MySQL+MongoDB to store and manage the structured attribute data and unstructured three-dimensional model data of the obstacle, establish an efficient spatiotemporal index, support fast retrieval, update, and deletion, and take data redundancy backup and off-site disaster recovery measures to ensure the reliability and continuity of the database. During the flight, the drone continuously receives new obstacle samples and uses incremental learning algorithms based on stream data mining, such as HoeffdingTree and SAM-kNN, to process and filter samples in real time, extract feature vectors of samples and update the sample set. For the selected samples, active learning strategies such as uncertainty sampling and density sampling are adopted, and samples with large model prediction uncertainty and obvious improvement effects are given priority for manual labeling. Then, incremental learning methods such as Fine-tuning and Few-shot Learning are used to quickly adapt to new obstacle categories and features while retaining the original model knowledge. The ratio of new and old samples is weighed through methods such as EWC regularization and Learning without Forgetting to avoid "catastrophic forgetting", and reasonable performance evaluation indicators and thresholds are designed to monitor the model update iteration process in real time and stop losses in time. Build a task-oriented autonomous decision-making and control framework, comprehensively utilize technologies such as obstacle recognition, SLAM positioning, trajectory planning and motion control, realize autonomous obstacle avoidance and navigation of UAVs in complex environments, dynamically generate local obstacle avoidance paths and speed instructions based on real-time obstacle information, smoothly and efficiently fly around obstacles through predictive control, model control and other methods, quickly return to the global optimal trajectory, and complete the refined inspection task of photovoltaic modules.
8. The method according to claim 1, wherein: The method of planning an optimal obstacle avoidance path based on the real-time updated obstacle avoidance database and the current position of the drone, and transmitting the optimal obstacle avoidance path to the drone for execution in real time, includes: Through real-time communication with the drone, the drone's GPS position, IMU attitude, heading speed and other status information are continuously obtained. The Kalman filter algorithm is used to predict and estimate the drone's status, and the drone's precise position and movement trend in three-dimensional space are obtained as the starting point for path planning. According to the current position of the UAV, obstacle information within a certain radius is selected from the obstacle avoidance database with the position as the center. The attribute parameters such as the category, position and volume of the obstacle are quickly retrieved and obtained through spatial indexing methods such as octree to build a local obstacle environment model. The octree recursively divides the space into eight sub-areas to form a tree-like hierarchical structure. It selects the appropriate division strategy according to the density and distribution of obstacles. When querying, it recursively traverses the parent node and adjacent nodes according to the sub-area to which the drone belongs, obtains obstacle information that intersects with the drone's position or is less than the safety threshold, narrows the search range to a local area, improves query efficiency, and supports dynamic updating and balancing of the tree structure according to real-time changes in obstacles. Based on the local environment model, the kinematic constraints of the UAV are comprehensively considered and the improved A* search algorithm is used for path planning; When the algorithm expands the node, it adaptively adjusts the search step size and direction according to the distance and direction from the current node to the target point. In the evaluation function, it comprehensively considers multiple objective factors such as flight time and energy consumption to generate a comprehensive evaluation value. It also adopts an incremental path expansion strategy to terminate the search in advance under the premise of meeting the safety distance and time limit, thus shortening the path search time. The initial obstacle avoidance path obtained by the search is optimized by curve fitting, and a smooth and continuous flight trajectory is generated by using parametric curve fitting methods such as B-spline curves. The waypoints and aircraft attitude are obtained by solving the coordinates of the control points of the curve, and then a high-density trajectory discrete points are generated by the curve interpolation method as the input of the flight control system; In the process of path planning and curve fitting, we fully utilize the GPU acceleration platform, adopt parallel computing and multi-threaded optimization technology, and use GPU under the CUDA framework to accelerate the path search and curve fitting algorithms, controlling the calculation time of path planning within 50 milliseconds. The search space is divided into multiple independent sub-areas, each of which corresponds to a GPU thread block. Multiple threads in the thread block search their respective nodes in parallel. The double-ended queue data structure is used to evenly distribute the nodes to be expanded to each thread. The GPU shared memory is used to batch load node status information, which reduces the number of global memory accesses and improves computing efficiency. For curve fitting tasks, the curve is discretized into multiple control points. The coordinate calculation of each control point is assigned to a GPU thread. Multiple threads calculate the coordinates of each control point in parallel, and then the calculation results are summarized through GPU atomic operations. The size and number of CUDA thread blocks are reasonably selected to fully utilize GPU hardware resources. The optimal obstacle avoidance path obtained through planning is processed through data compression, encoding and encryption, and then transmitted to the drone in real time using the 5G communication network. A dedicated transmission channel and priority are allocated to the path data through the QoS service quality assurance mechanism to ensure low latency and high reliability of data transmission, with a delay jitter of less than 10 milliseconds and a packet loss rate of less than 0.1%. After receiving the path data, the drone performs decompression, decoding and decryption to reconstruct the obstacle avoidance path in three-dimensional space. It uses curve interpolation algorithms such as cubic spline interpolation and Catmull-Rom spline interpolation to generate smooth trajectory curves between adjacent waypoints. It strictly follows the dynamic constraints of the drone and converts the interpolated discrete points into control instructions of the flight control system. The data is packaged into data frames in a specific format and sent to the drone in real time through the interface. Based on the received waypoint information, the UAV uses the waypoint tracking control algorithm, takes the waypoint position deviation and the aircraft attitude deviation as control quantities, and designs a position controller and attitude controller including PID control and adaptive robust control. The speed control command and attitude angular velocity control command are calculated according to the GPS position deviation and IMU attitude deviation respectively. Through the motor mixed output, the UAV can achieve precise obstacle avoidance in three-dimensional space. At the same time, the UAV position and attitude state are monitored in real time, the actual flight trajectory is compared with the planned path, and the position and attitude deviations are calculated as controller feedback to achieve path tracking and trajectory correction, thereby ensuring the timeliness and accuracy of obstacle avoidance decisions.
9. The method according to claim 1, wherein: While executing the optimal obstacle avoidance path, the UAV system continuously monitors changes in the surrounding environment. If a new obstacle or obstacle movement is detected, the obstacle avoidance path is adjusted in real time, including: While executing the planned optimal obstacle avoidance path, the drone continuously scans and monitors the surrounding environment at a frequency of 10Hz through onboard sensors such as lidar and millimeter-wave radar, obtains multi-source heterogeneous data such as 3D point clouds and radar echoes, and perceives and updates environmental information in real time; LiDAR acquires high-precision point cloud data of the surrounding environment in real time by emitting laser beams in different directions and receiving the returned echo signals. Millimeter-wave radar, with its strong penetration, low scattering loss and all-weather operation, makes up for the blind spots of lidar in bad weather. The complementary integration of the two can greatly improve the robustness and reliability of environmental perception. The acquired multi-source sensor data are firstly subjected to spatiotemporal registration and coordinate transformation, and iterative optimization algorithms such as ICP and NDT are used to find the optimal transformation matrix between different sensor data, and unify them into a local coordinate system centered on the drone. Then, nonlinear estimation algorithms such as particle filtering are used to fuse heterogeneous sensor data. The angular velocity and acceleration measurements of the IMU are used as the process model, and the point cloud matching results of the lidar are used as the observation model. Through steps such as resampling and importance weight update, the state quantities such as the drone's posture and velocity are recursively estimated to eliminate the observation errors introduced by factors such as the accuracy limitation of a single sensor, occlusion, and noise. Perform semantic segmentation and target detection on the fused environmental perception data; Point cloud semantic segmentation algorithms such as PointNet++ and KPConv are used to directly extract local and global features from the original point cloud. The semantic labels of the point cloud are obtained by point-by-point classification. The point cloud is then divided into different categories such as roads, buildings, vehicles, and pedestrians in combination with the prior semantic map to extract potential obstacle targets. Target detection uses lightweight detection models such as YOLOv5 and v6, and introduces improvements such as Focus structure, PAN attention mechanism and GIOULoss to improve the detection performance of small and dense targets; Through multi-target tracking algorithms such as Kalman filtering and Hungarian algorithm, the dynamic properties of obstacles such as motion trajectory and speed are obtained to determine their potential threat to the drone, and a decision-making mechanism based on risk assessment is used to adjust the drone's safe distance and obstacle avoidance strategy in real time; The occupancy grid representation method is introduced into the local environment map of the UAV, and the environment is divided into grids of equal size. Each grid is represented by a probability value to indicate the possibility of being occupied by an obstacle. For dynamic obstacles, velocity layer and acceleration layer are introduced based on the occupancy grid, and their motion state is characterized by vector or Gaussian distribution; When new sensor data arrives, the posterior occupancy probability of each grid is updated in real time through Bayesian updating, and algorithms such as Kalman filtering and particle filtering are used to track and predict the movement trend of obstacles, and a "dynamic occupancy grid map" is constructed to reflect real-time changes in the environment; When the local map changes significantly, the obstacle avoidance path is replanned, and real-time search algorithms such as RRT* and APF are used to quickly generate a collision-free, efficient and smooth obstacle avoidance path while meeting the UAV's dynamic constraints and safety margins. The replanned obstacle avoidance path is smoothed using the minimum snap trajectory optimization method. The path curve is modeled as a piecewise polynomial function. The objective function is set to the L2 norm of the snap (fourth-order derivative). The constraints include the path's starting point, end point, waypoints, maximum speed, and acceleration. The SQP algorithm is used to iteratively solve the polynomial coefficients to obtain a smooth flight trajectory that minimizes snap energy and satisfies dynamic constraints. The trajectory is discretized into a waypoint sequence and sent to the flight control system for execution. After receiving the updated obstacle avoidance path, the flight control system promptly switches to the new waypoint sequence and uses advanced control laws such as nonlinear model predictive control and adaptive robust control to adjust the attitude and thrust of the drone in real time, so that it can fly stably and smoothly along the new obstacle avoidance path. At the same time, the actual flight trajectory of the UAV is continuously monitored, and the trajectory deviation caused by external disturbances and modeling errors is quickly eliminated through position-velocity feedback control and trajectory tracking control, ensuring the robustness and accuracy of flight control, and realizing autonomous obstacle avoidance and continuous inspection operations of the UAV in dynamic unknown environments.
Citation Information
Cited By
Power distribution room intelligent inspection control method and system based on robot cooperation
CN120095840A
Hydropower engineering monitoring method and system based on unmanned aerial vehicle patrol and three-dimensional modeling
CN120164134A
Hydropower Engineering Monitoring Method and System Based on UAV Inspection and 3D Modeling
CN120164134B
Tree obstacle intelligent detection method and system based on multi-modal perception
CN120218632A
Unmanned aerial vehicle water depth monitoring method for channel inspection
CN120232402A