A power distribution network fine route planning method based on insulator detection
Patent Information
- Application Number
- CN202311655167.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-05
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2043-12-05
AI Technical Summary
该方法基于卫星遥感和已有航线建立航线3D立体模型,实现了无人机巡检,降低了巡检的人力物力消耗,但是仍存在以下问题:(1)无法应对动态变化:上述方法没有充分考虑无人机巡检过程的动态性,不能有效地处理巡检路径节点之间的特殊情况
[0057] Compared with existing technologies, this invention has the following advantages: First, it performs rough waypoint and flight path planning using point cloud data and tower details. Then, it uses an insulator detection model based on an improved YOLOv7 model to perform real-time detection of insulators during inspection flights. Even when detecting insulators in complex backgrounds, it still maintains high accuracy and reliability. Finally, it continuously and dynamically adjusts the UAV's position based on the detected insulators in real time to achieve refined waypoint and flight path planning. This fully considers the dynamic nature of the UAV inspection process, ensuring that the UAV accurately and efficiently covers each insulator during flight and avoids obstacles. This achieves comprehensive, efficient, precise, and safe inspection of the power distribution network, improving inspection efficiency and ensuring the stability and security of the power system.
Smart Images

Figure CN117707195B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power line inspection technology, specifically to a method for fine route planning of power distribution networks based on insulator detection. Background Technology
[0002] With the continuous growth of electricity demand, the distribution network, as an important component of the power system, plays a crucial role in transmitting electricity from power plants to end users. In the distribution network, insulators are critical components used in large quantities to ensure the safe and stable operation of circuits; therefore, regular inspections of insulators in the distribution network are necessary.
[0003] Traditional power line inspections typically rely on manual patrols, which suffers from low efficiency, high costs, and poor safety. However, with the maturity and widespread adoption of drone technology, applying drones to power line inspections has become an efficient, safe, and economical option. The key to drone power line inspections is developing an efficient and safe flight path. By scientifically planning flight routes, drones can avoid obstacles, choose the shortest and most economical path, fully cover the inspection area, improve mission efficiency, and reduce flight time and energy consumption.
[0004] Patent CN 116594416 A discloses a method for planning the flight path of a UAV in a substation based on flight path correction. The method includes: Step 1, establishing a 3D model of the flight path and determining reference waypoints; Step 2, creating new waypoints based on the reference waypoints and setting data; Step 3, optimizing and adjusting the parameters of the new waypoints; Step 4, optimizing the sorting and calibration of the waypoints and connecting them sequentially to obtain the corrected trajectory; and Step 5, simulating flight to verify and analyze the correction results. This method establishes a 3D model of the flight path based on satellite remote sensing and existing flight paths, realizing UAV inspection and reducing the manpower and material consumption of inspection. However, it still has the following problems: (1) It cannot cope with dynamic changes: The above method does not fully consider the dynamic nature of the UAV inspection process and cannot effectively handle the special situations between inspection path nodes. (2) It lacks intelligence: Traditional flight path planning is usually based on simple geometric shapes or geographic information system (GIS) data, lacking in-depth understanding and intelligent analysis of environmental complexity. (3) The shooting component is far away: The distance between the UAV and the inspection target is large, resulting in low image resolution and poor image quality, which affects the detailed observation of the inspection target. (4) The insulators of the distribution network are difficult to detect: The insulators of the distribution network are small and have complex backgrounds and types. When detecting insulators in a complex background, there are problems such as high false detection rate and high missed detection rate. Summary of the Invention
[0005] The purpose of this invention is to provide a method for fine route planning of distribution networks based on insulator detection, which is beneficial for comprehensive, efficient, precise and safe inspection of distribution networks.
[0006] To achieve the above objectives, the technical solution adopted by this invention is: a method for fine route planning in distribution networks based on insulator detection, comprising:
[0007] An insulator detection model based on an improved YOLOv7 model was constructed and trained offline. The trained insulator detection model was then converted into a format suitable for the target deployment environment and deployed onto the UAV's hardware. Finally, fine-grained power distribution network flight path planning was performed according to the following steps:
[0008] S1. Clean the distribution network point cloud data and tower details to obtain usable data; then, based on the obtained usable data, perform rough waypoint and route planning to obtain the preset route.
[0009] S2. During the inspection flight of the UAV according to the preset route, images are continuously captured and insulators are detected by the deployed insulator detection model; when an insulator is detected, the position of the UAV is adjusted in real time to meet the requirements, and then the position is used as a new waypoint for more refined route planning.
[0010] S3. After the flight mission is completed, the captured insulator images will be used as new samples for training the insulator detection model; at the same time, the newly generated refined waypoints and routes will be used as the coarse waypoints and routes for the next flight mission.
[0011] Furthermore, the improved YOLOv7 model enhances the focus on the shape of the insulator by adding edge detail shape data augmentation to the original YOLOv7 model data augmentation algorithm. Specifically, it first uses an image edge extraction algorithm to generate an edge detail image, then copies the edge detail image twice and stitches them together to generate a three-channel edge detail image, and then expands it into the training set.
[0012] Furthermore, the Sobel operator is used to generate edge detail images.
[0013] Furthermore, the improved YOLOv7 model incorporates a cross-channel and spatial multi-scale attention module (CCSMA) into the original YOLOv7 model. The CCSMA module employs a parallel substructure, consisting of a cross-channel learning module and a cross-space learning module. It uses three parallel lines to extract attention weight descriptors from the grouped feature maps: two 1×1 parallel branches and one 3×3 branch. In the cross-channel learning module, the two parallel 1×1 branches encode the channels using two global average pooling operations. The features from the two branches are then concatenated and grouped into a 1×1 convolution. The features from the two branches, the lower-level features, and the 3×3 convolution branch are simultaneously fed into the Softmax function to fit their linear transformation. Each branch receives an adaptive weight value, and then a weighted summation and feature recombination are performed to obtain the output of the cross-channel learning module. The output of the cross-channel learning module is expressed by the following formula:
[0014] (1)
[0015] (2)
[0016] in, This represents the feature vector passed to the Softmax function; This represents the weight values obtained after calculating each vector using the Softmax function. This represents the features reorganized by the cross-channel learning module;
[0017] The features output from the cross-channel learning module and the 3×3 output features are respectively subjected to 2D global average pooling, and then fed into the cross-spatial learning module to generate aggregated spatial attention weights. Finally, the features are aggregated with the low-level features using the sigmoid function to obtain the output features; the 2D global average pooling operation is expressed as:
[0018] (3)
[0019] Where H and W represent the height and width of the input feature size, respectively. This represents the input feature of the c-th channel;
[0020] The output of the cross-space learning module is expressed by the following formula:
[0021] (4)
[0022] (5)
[0023] By fusing contextual information at different scales in the network through the CCSMA module, the YOLOv7 network can achieve better pixel-level attention to insulator features, and the output of the CCSMA module is consistent with the size of the input.
[0024] Furthermore, in the original YOLOv7 model, the loss function is composed of the confidence loss function. Classification loss function and localization loss function It consists of three parts:
[0025] (6)
[0026] in, They represent , and Weighting coefficients;
[0027] The improved YOLOv7 model uses the MPDIoU loss function to calculate the loss value in the localization loss function part; the implementation method of the MPDIoU loss function is as follows:
[0028] In the insulator image, using This represents the coordinates of the top-left corner of the true bounding box. This represents the coordinates of the bottom right corner of the bounding box. This indicates the coordinates of the top-left corner of the prediction box. This indicates the coordinates of the bottom right corner of the prediction box. and These represent the distances between the top left and top left corners, and between the bottom right and bottom right corners, respectively, between the ground truth bounding box and the predicted bounding box;
[0029] (7)
[0030] (8)
[0031] After calculating the distances between the top-left corners and the bottom-right corners of the ground truth bounding box and the predicted bounding box, calculate:
[0032] (9)
[0033] (10)
[0034] Wherein, MPDIoU is the bounding box similarity comparison index, L MPDIoU The bounding box regression loss function is the MPDIoU loss function.
[0035] The MPDIoU loss function simplifies the similarity comparison between two bounding boxes and can adapt to regression of overlapping or non-overlapping bounding boxes; furthermore, LMPDIoU All factors are represented by the coordinates of the four points mentioned above, and the calculation formulas are shown in equations (11)-(13):
[0036] (11)
[0037] , , , (12)
[0038] (13)
[0039] in, This represents the area of the smallest bounding rectangle between the ground truth bounding box and the predicted bounding box. and These represent the center coordinates of the ground truth bounding box and the predicted bounding box, respectively. and This represents the width and height of the actual bounding box. and The width and height of the prediction box are represented; the deviations of the non-overlapping area, center point distance, width and height can also be calculated using equations (11)-(13).
[0040] Furthermore, the improved YOLOv7 model inputs the image data after image enhancement into the network. First, it passes through the Backbone section, which consists of CBS blocks, ELAN modules, and Downsampling-MP1 modules. The CBS blocks are composed of Conv-BatchNorm-SiLU, and the ELAN modules are stacked from multiple CBS blocks. The ELAN modules use 4-fold grouped convolutions, and their internal residual structures use skip connections. The Downsampling-MP1 module is composed of two branches, with the number of output channels matching the number of input channels. After processing by the Backbone section, three effective feature layers are obtained for the next step of network construction. The shapes of these three effective feature layers are (80, 80, 512), (40, 40, 1024), and (20, 20, 1024), respectively.
[0041] The Neck section consists of a Path Aggregation Network (PAN) and a Feature Pyramid Network (FPN), used to enhance feature fusion from the three effective feature layers at different scales obtained from the Backbone section. First, the effective feature layer obtained from Stage 5 is fed into the SPCSPC module for processing, where the number of channels decreases from 1024 to 512, but the size remains unchanged. Then, the three effective feature layers from Stage 3, Stage 4, and Stage 5 (processed by the SPCSPC module) are fed into the CCSMA module for further processing, enhancing the representation of more noteworthy features across channels and spatial dimensions. Next, the entire network is upsampled, and the upsampled features from the three branches are concatenated one by one. Then, the ELAN and Downsampling-MP2 modules are used for downsampling and concatenating the features one by one. Downsampling-MP2 has the same network structure as Downsampling-MP1, but the output channels are twice the number of input channels. After processing by the Neck section, three enhanced feature layers are obtained, with shapes of (80, 80, 128), (40, 40, 256), and (20, 20, 512), respectively.
[0042] The features of the three enhanced feature layers are fed into the Head part, processed by RepConv, and then fed into YOLOHead to generate prediction boxes. After processing by the Head part, the last three feature layers are obtained, with shapes of (80,80,18), (40,40,18), and (20,20,18), respectively. Finally, decoding is performed, and scores are sorted and non-maximum suppression is applied to generate the optimal prediction box that meets the confidence level.
[0043] Furthermore, in step S1, data cleaning includes:
[0044] A1) Check point cloud data: Check the imported data and identify potential problems, including abnormal coordinates, missing data, and duplicate records;
[0045] A2) Check the pole and tower details table: Check and handle any duplicate records to avoid introducing redundant data; reconfirm any missing or outlier values in the pole and tower details table;
[0046] A3) Check data consistency: Ensure that the pole locations in the point cloud data are consistent with the geographical locations in the pole details table, and perform spatial matching and comparison; at the same time, check whether the attribute information in the pole details table is consistent with the attribute information in the point cloud data.
[0047] Rough waypoint and route planning includes:
[0048] B1) Generate waypoints: Extract the precise geographic coordinates of the insulators from the point cloud data, and obtain the attribute information of each tower from the tower details table; determine the density between waypoints based on the UAV's flight altitude, field of view, and mission requirements; use the coordinates of the outside of the insulator as the location of the waypoints, and generate additional waypoints by uniformly interpolating between the outside of the insulators according to the determined waypoint density, to ensure smooth connection of the flight paths between insulators.
[0049] B2) Generate route: First, add turning points between waypoints to ensure that the aircraft can turn smoothly. Connect the generated waypoints in sequence to form a preliminary route. Then, considering terrain and obstacle factors, optimize the preliminary route using a "plowing method" to ensure the route is safe and efficient. Finally, verify the feasibility of the route to ensure that it covers all insulators.
[0050] Furthermore, in step S2, images are captured using a camera gimbal on the drone to detect the insulator.
[0051] Furthermore, in step S2, refining waypoints and routes includes:
[0052] (1) Unmanned aerial vehicle (UAV) flight and data acquisition: The UAV begins to fly according to the roughly planned waypoints and routes, and continuously takes pictures of the surrounding environment during the flight;
[0053] (2) Real-time insulator detection and adjustment: Insulators are detected in real time through the insulator detection model. When an insulator is detected, the attitude and position of the UAV are continuously adjusted to ensure that the insulator target is always in the center of the field of view. At the same time, since the distance between the insulator and the tower is less than the tower radius, it is determined whether the insulator belongs to the corresponding tower and the tower floor is determined according to the height.
[0054] (3) New waypoint recording and iterative update: When the insulator almost fills the screen and reaches the threshold distance, the current position is recorded as a new waypoint, the recorded new waypoint is added to the route sequence, and the waypoint belonging to the insulator is deleted;
[0055] (4) New route planning: When new waypoints are obtained and clear images of insulators are captured, the planned route is rewritten; based on the current UAV position and the newly recorded waypoints, the path planning A* algorithm is used to generate a new route; at the same time, the new route considers the smoothness of the route and avoids too drastic changes in heading and altitude to improve flight comfort and stability; when generating a new route, environmental factors are considered, including avoiding obstacles and adapting to different flight altitudes;
[0056] (5) Real-time update of flight path: Once a new flight path is generated, it is fed back to the UAV flight control system in real time, so that the UAV can adjust its flight direction and attitude according to the new flight path to ensure that the flight path is consistent with the detection target.
[0057] Compared with existing technologies, this invention has the following advantages: First, it performs rough waypoint and flight path planning using point cloud data and tower details. Then, it uses an insulator detection model based on an improved YOLOv7 model to perform real-time detection of insulators during inspection flights. Even when detecting insulators in complex backgrounds, it still maintains high accuracy and reliability. Finally, it continuously and dynamically adjusts the UAV's position based on the detected insulators in real time to achieve refined waypoint and flight path planning. This fully considers the dynamic nature of the UAV inspection process, ensuring that the UAV accurately and efficiently covers each insulator during flight and avoids obstacles. This achieves comprehensive, efficient, precise, and safe inspection of the power distribution network, improving inspection efficiency and ensuring the stability and security of the power system. Attached Figure Description
[0058] Figure 1 This is a flowchart illustrating the method implementation of an embodiment of the present invention;
[0059] Figure 2 This is a schematic diagram illustrating the implementation principle of the edge detail shape data enhancement method in this embodiment of the invention.
[0060] Figure 3 This is a network structure diagram of the CCSMA module in an embodiment of the present invention;
[0061] Figure 4 This is a schematic diagram illustrating the implementation principle of the MPDIoU loss function in this embodiment of the invention;
[0062] Figure 5 This is a network structure diagram of the improved YOLOv7 model in an embodiment of the present invention. Detailed Implementation
[0063] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0064] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0065] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0066] like Figure 1As shown, this embodiment provides a method for fine route planning in distribution networks based on insulator detection, including:
[0067] An insulator detection model based on an improved YOLOv7 model was constructed and trained offline. The trained insulator detection model was then converted into a format suitable for the target deployment environment and deployed onto the UAV hardware. Fine-grained power distribution network flight path planning was then performed according to the following steps:
[0068] S1. Clean the distribution network point cloud data and tower details table to obtain usable data; then, based on the obtained usable data, perform rough waypoint and route planning to obtain the preset route.
[0069] S2. During the inspection flight of the UAV according to the preset route, images are continuously captured and insulators are detected by the deployed insulator detection model. When an insulator is detected, the position of the UAV is adjusted in real time to meet the requirements, and then the position is used as a new waypoint for more refined route planning.
[0070] S3. After the flight mission is completed, the captured insulator images will be used as new samples for training the insulator detection model; at the same time, the newly generated refined waypoints and routes will be used as the coarse waypoints and routes for the next flight mission.
[0071] The following section will elaborate on the relevant aspects of this method.
[0072] 1. Insulator Detection Model Based on Improved YOLOv7 Model
[0073] The original YOLOv7 algorithm suffers from significant false negatives and false negatives when dealing with complex background images and small insulators. Therefore, this invention proposes an insulator detection model based on an improved YOLOv7 model. Improvements to YOLOv7 are made through data augmentation, network structure optimization, and a modified loss function to enhance insulator detection accuracy.
[0074] 1.1 Enhanced Edge Detail Shape
[0075] Since distribution network insulators are located outdoors, the backgrounds of the captured images are often complex, containing numerous buildings and trees, which increases the difficulty of insulator identification. When determining whether a component is an insulator, the shape characteristics of the insulator are usually the first thing to focus on. Therefore, we need to increase the attention paid to the shape information of the insulator in the network model.
[0076] In summary, the improved YOLOv7 model proposed in this invention enhances the neural network's attention to the insulator shape by adding edge detail shape data augmentation methods to the original YOLOv7 model data augmentation algorithm, such as... Figure 2As shown. Specifically, an image edge extraction algorithm is first used to generate an edge detail image. Since the YOLOv7 network input is an RGB three-channel image, while the edge detail image is a single-channel image, the edge detail image is copied twice and stitched together to generate a three-channel edge detail image, which is then expanded into the training set.
[0077] The Sobel operator boasts a fast computation speed, making it suitable for real-time applications. It also offers some noise suppression. While it may not be able to effectively detect minute edges, overall, it can capture the basic outline of insulators of varying sizes and resolutions, exhibiting excellent detection performance. Therefore, this invention employs the Sobel operator to generate edge detail images.
[0078] 1.2 Cross Channel and Spatial Multi-scale Attention Module (CCSMA)
[0079] In the original YOLOv7 backbone network, due to the stacking of a large number of convolutional blocks, insulator features may be lost as the number of image channels gradually decreases. Therefore, to enhance the model's attention to insulator features, this invention adds an attention mechanism module to the YOLOv7 network. Traditional SENet, STN, and CBAM models have good performance in generating more discriminative feature representations during model inference; however, modeling cross-channel relationships through channel dimensionality reduction may have side effects on insulator feature extraction. Therefore, the improved YOLOv7 model proposed in this invention adds a Cross Channel and Spatial Multi-scale Attention Module (CCSMA) to the original YOLOv7 model. Figure 3 As shown, the CCSMA module adopts a parallel substructure, consisting of two parts: a cross-channel learning module and a cross-space learning module. It uses three parallel lines to extract attention weight descriptors from the grouped feature maps: two 1×1 parallel branches and one 3×3 branch. In the cross-channel learning module, the two parallel 1×1 branches encode the channels using two global average pooling methods. The features from the two branches are then concatenated and grouped into 1×1 convolutions. The features from the two branches, the lower-level features, and the features from the 3×3 convolution branch are simultaneously fed into the Softmax function to fit its linear transformation. Each branch receives an adaptive weight value, and then a weighted summation and feature recombination are performed to obtain the output of the cross-channel learning module. The output of the cross-channel learning module is expressed by the following formula:
[0080] (1)
[0081] (2)
[0082] in, This represents the feature vector passed to the Softmax function, which contains four feature layers: Groups, X, Y, and Conv (3×3). This represents the weight values obtained after calculating each vector using the Softmax function. This represents the features after being reorganized by the cross-channel learning module.
[0083] After modeling the cross-channel information interaction along the channel direction, the network obtains multi-scale feature representations. This not only encodes inter-channel information to adjust the importance of different channels but also preserves precise spatial structure information within the channels. Based on this, the features output from the cross-channel learning module and the 3×3 output features are respectively subjected to 2D global average pooling. These are then fed into the cross-spatial learning module to generate an aggregation of two spatial attention weights. Finally, the features are aggregated with the low-level features using the sigmoid function to obtain the output features. The 2D global average pooling operation is expressed as follows:
[0084] (3)
[0085] Where H and W represent the height and width of the input feature size, respectively. This represents the input feature of the c-th channel.
[0086] The output of the cross-space learning module is expressed by the following formula:
[0087] (4)
[0088] (5)
[0089] The CCSMA module can fuse contextual information at different scales in the network, enabling the YOLOv7 network to focus better on high-level feature maps, especially insulator features. Furthermore, the final output of the CCSMA module is the same size as the input, so it can be used efficiently in YOLOv7.
[0090] 1.3 Loss Function
[0091] In the original YOLOv7, the loss function consisted of three parts: the confidence loss function ( ), classification loss function ( ) and localization loss function ( As shown in equation (6), the total loss function of the YOLOv7 model is a weighted sum of the losses from the three components mentioned above. Among them, the confidence loss function ( ) and classification loss function ( Both use the binary cross-entropy function to calculate the loss value, and locate the loss function ( The CIOU loss function is used to calculate the loss value. The confidence loss function determines whether a feature point contains an object, the classification loss function determines the type of object contained in the feature point, and the localization loss function determines the regression parameters of the feature point. During model training, after matching positive samples, prior boxes corresponding to each ground truth bounding box are obtained. All prior boxes corresponding to ground truth bounding boxes are positive samples, and the remaining prior boxes are negative samples. Cross-entropy loss is calculated based on the positive / negative samples and the prediction results of whether the feature point contains an object, and the result is used as the output of the confidence loss function. After obtaining the prior boxes corresponding to each box, the type prediction results of the prior boxes are extracted. Cross-entropy loss is calculated based on the type of the ground truth bounding box and the type prediction results of the prior boxes, and the result is used as the output of the classification loss function. Simultaneously, CIOU loss is calculated using the ground truth bounding boxes and the predicted bounding boxes, and the result is used as the calculation result of the localization loss function.
[0092] (6)
[0093] in, They represent , and The weighting coefficients.
[0094] To improve the training performance of bounding box regression during model training, and to increase convergence speed and regression accuracy, this invention uses the MPDIoU loss function to calculate the loss value in the localization loss function part. The MPDIoU loss function is a metric based on the intersection-union ratio (IU). Figure 4 As shown, it can minimize the distance between the top left and bottom right corners of the predicted bounding box and the ground truth box. The principle is shown in Equations (7)-(10).
[0095] In such Figure 4 In the insulator image shown, the yellow box represents the ground truth box, and the red box represents the predicted box. This represents the coordinates of the top-left corner of the true bounding box. This represents the coordinates of the bottom right corner of the bounding box. This indicates the coordinates of the top-left corner of the prediction box. This indicates the coordinates of the bottom right corner of the prediction box. and These represent the distances between the top left and top left corners, and between the bottom right and bottom right corners, respectively, between the ground truth bounding box and the predicted bounding box.
[0096] (7)
[0097] (8)
[0098] After calculating the distances between the top-left corners and the bottom-right corners of the ground truth bounding box and the predicted bounding box, calculate:
[0099] (9)
[0100] (10)
[0101] Wherein, MPDIoU is the bounding box similarity comparison index, L MPDIoU The bounding box regression loss function is the MPDIoU loss function.
[0102] The MPDIoU loss function simplifies the similarity comparison between two bounding boxes and can adapt to regression of overlapping or non-overlapping bounding boxes. Furthermore, the bounding box regression loss function L... MPDIoU All factors can be represented by the coordinates of the four points mentioned above, and the calculation formulas are shown in equations (11)-(13):
[0103] (11)
[0104] , , , (12)
[0105] (13)
[0106] in, This represents the area of the smallest bounding rectangle between the ground truth bounding box and the predicted bounding box. and These represent the center coordinates of the ground truth bounding box and the predicted bounding box, respectively. and This represents the width and height of the actual bounding box. and The width and height of the prediction box are represented; the deviations in non-overlapping areas, center point distance, width, and height can also be calculated using equations (11)-(13), indicating that... This invention not only improves the convergence ability of the network but also reduces computational costs. Therefore, this invention locates the loss function in YOLOv7. The MPDIoU function is used to calculate the loss value in part of the calculation.
[0107] 1.4 Improved YOLOv7 Model Structure
[0108] The improved YOLOv7 model structure is as follows: Figure 5 As shown, the improved YOLOv7 model inputs the image data after image enhancement into the network. First, it passes through the Backbone section, which consists of CBS blocks, ELAN modules, and Downsampling-MP1 modules. The CBS blocks are composed of Conv-BatchNorm-SiLU, and the ELAN modules are stacked CBS blocks. The ELAN modules use four-stage grouped convolutions, and their internal residual structures use skip connections to alleviate the gradient vanishing problem caused by increasing depth in deep neural networks. The Downsampling-MP1 module is composed of two branches concatenated, with the number of output channels matching the number of input channels. After processing by the Backbone section, three effective feature layers are obtained for the next step of network construction. The shapes of these three effective feature layers are (80, 80, 512), (40, 40, 1024), and (20, 20, 1024), respectively.
[0109] The Neck section consists of a Path Aggregation Network (PAN) and a Feature Pyramid Network (FPN), used to enhance feature fusion from the three effective feature layers at different scales obtained from the Backbone section. First, the effective feature layer obtained from Stage 5 is fed into the SPCSPC module for processing, at which point the number of channels decreases from 1024 to 512, but the size remains unchanged. Then, the three effective feature layers from Stage 3, Stage 4, and Stage 5 (processed by the SPCSPC module) are fed into the CCSMA module for processing, enabling the model to enhance the representation of more noteworthy features across channels and spatial dimensions. Next, the entire network is upsampled, and the upsampled features from the three branches are concatenated one by one. Then, the ELAN and Downsampling-MP2 modules are used for downsampling and concatenating the features one by one. It is worth noting that Downsampling-MP2 has the same network structure as Downsampling-MP1, but the output channels are twice the number of input channels. After processing by the Neck section, three enhanced feature layers are obtained, with shapes of (80,80,128), (40,40,256), and (20,20,512), respectively.
[0110] Next, the features from the three enhanced feature layers are fed into the Head section, processed by RepConv, and then fed into YOLOHead to generate predicted bounding boxes. After processing in the Head section, the final three feature layers are obtained. Since the Su22kV_broken dataset used in this method only contains the Su22_Broken category, the shapes of the final three feature layers are (80,80,18), (40,40,18), and (20,20,18), respectively. Finally, they are decoded and subjected to score sorting and non-maximum suppression filtering to generate the optimal predicted bounding boxes that meet the confidence requirements.
[0111] 2. Rough waypoints and route planning
[0112] 2.1 Data Cleaning
[0113] Data cleaning encompasses distribution network point cloud data and pole / tower detail tables, aiming to ensure the accuracy, completeness, and consistency of the datasets used. Specific methods are as follows:
[0114] A1) Check point cloud data: Check the imported data and identify potential problems, including coordinate anomalies, missing data, duplicate records, etc.
[0115] A2) Check the pole and tower details table: Check and handle any duplicate records to avoid introducing redundant data; reconfirm any missing or outlier values in the pole and tower details table.
[0116] A3) Check data consistency: Ensure that the pole locations in the point cloud data are consistent with the geographical locations in the pole details table, allowing for spatial matching and comparison. Simultaneously, check whether the attribute information in the pole details table is consistent with the attribute information (such as pole height, model, etc.) in the point cloud data.
[0117] 2.2 Generate rough waypoints and routes
[0118] One of the key factors in executing power line inspection missions is planning suitable flight routes in advance. A rough inspection route plan should detail the flight paths approaching and departing from the monitoring points, while also defining the scope of the inspection area. Specific methods are as follows:
[0119] B1) Waypoint Generation: Extract the precise geographic coordinates of the insulators from the point cloud data, and obtain the attribute information of each tower from the tower details table. Determine the density between waypoints based on the UAV's flight altitude, field of view, and mission requirements. Use the coordinates of the outer side of the insulator as the location of the waypoints, and generate additional waypoints uniformly between the outer sides of the insulators according to the determined waypoint density, ensuring smooth connection of flight paths between insulators.
[0120] B2) Route Generation: First, turning points are added between waypoints to ensure the aircraft can turn smoothly. The generated waypoints are then connected in sequence to form a preliminary route. Next, considering terrain and obstacle factors, the preliminary route is optimized using a "plowing the ox" method to ensure safety and efficiency. Finally, the feasibility of the route is verified to ensure coverage of all insulators.
[0121] 3. Refined waypoint and route planning
[0122] 3.1 Unmanned Aerial Vehicle (UAV) Inspection System
[0123] This invention uses a camera gimbal on a drone to capture images for insulator inspection. The power line inspection drone with camera gimbal is an intelligent device specifically designed for power system inspection. It combines advanced technologies such as drone technology, gimbal camera technology, and obstacle avoidance technology to perform efficient, accurate, and safe inspection tasks on power transmission lines.
[0124] (1) Remote control: Power inspection drones can be remotely controlled via remote controller, mobile application or ground station to achieve flexible flight path planning and control.
[0125] (2) Stable flight platform: The equipment is equipped with a stable flight control system and gimbal stabilizer to ensure that the camera can shoot stably and provide clear images under unstable weather conditions.
[0126] (3) High-definition camera: Equipped with a high-resolution camera to capture high-definition images for detecting the condition of equipment such as insulators, cables, and towers.
[0127] (4) Intelligent obstacle avoidance system: It integrates advanced obstacle avoidance sensors and algorithms, which can automatically identify and avoid obstacles, thereby improving flight safety.
[0128] (5) Automated inspection: It supports preset routes, autonomous flight and automated inspection. It can automatically complete tasks according to the predetermined inspection plan, reducing the risk of human operation.
[0129] (6) Real-time image transmission and analysis: It can transmit images and videos during the inspection process in real time, and supports image analysis and processing.
[0130] 3.2 Generate refined waypoints and routes
[0131] In generating refined waypoints and flight paths, insulators were selected as the benchmark component for refined planning of distribution network inspection lines. Firstly, insulators are located at the edges of towers, facilitating precise image capture by drones during data collection without compromising flight safety, ensuring both ease of operation and safety. Secondly, insulators in the distribution network have more prominent features compared to other components, resulting in higher detection accuracy. Detecting insulator positions improves planning accuracy and efficiency, providing drones with more refined flight paths. Most importantly, insulators are present on towers of varying heights; selecting insulators as reference targets enables the system to perform multiple tasks simultaneously, allowing for both insulator and tower inspections, thus enhancing the comprehensiveness and versatility of the inspection. Therefore, considering factors such as ease of operation, data richness, and multi-tasking capabilities, insulators were chosen as the primary reference target, giving the distribution network inspection system more efficient, accurate, and comprehensive intelligent planning capabilities. The steps for real-time generation of waypoints and flight paths are as follows:
[0132] (1) Unmanned Aerial Vehicle Flight and Data Acquisition: The UAV begins to fly according to the roughly planned waypoints and routes, and continuously takes pictures of the surrounding environment during the flight.
[0133] (2) Real-time insulator detection and adjustment: Insulators are detected in real time through the insulator detection model. When an insulator is detected, the attitude and position of the UAV are continuously adjusted to ensure that the insulator target is always in the center of the field of view. At the same time, since the distance between the insulator and the tower is less than the tower radius, it is determined whether the insulator belongs to the corresponding tower and the tower layer on the tower is determined according to the height.
[0134] (3) New waypoint recording and iterative update: When the insulator almost fills the screen and reaches the threshold distance, the current position is recorded as a new waypoint, the recorded new waypoint is added to the route sequence, and the waypoint belonging to the insulator is deleted.
[0135] (4) New route planning: When new waypoints are obtained and clear images of insulators are captured, the planned route is rewritten; based on the current UAV position and the newly recorded waypoints, a new route is generated using the path planning A* algorithm. Simultaneously, to ensure stable flight of the UAV, the new route considers the smoothness of the route, avoiding overly drastic changes in heading and altitude to improve flight comfort and stability. When generating a new route, the system also needs to consider environmental factors, such as avoiding obstacles and adapting to different flight altitudes.
[0136] (5) Real-time update of flight path: Once a new flight path is generated, it is fed back to the UAV flight control system in real time, so that the UAV can adjust its flight direction and attitude according to the new flight path to ensure that the flight path is consistent with the detection target.
[0137] This invention provides a method for fine route planning in power distribution networks based on insulator detection, which has the following technical advantages:
[0138] 1. Novel Flight Path Correction Method. This novel flight path correction method is based on insulator detection and continuously corrects the flight path according to real-time detected insulator information to ensure the optimal shooting distance and angle between the UAV and the target.
[0139] 2. High-precision insulator detection method. Insulator images in power distribution networks contain more complex backgrounds and tiny insulators. The insulator detection method based on the improved YOLOv7 has high accuracy and reliability through various improvements.
[0140] 3. Dynamic Adaptability. The system has the ability to dynamically adjust its flight path in real time, and can flexibly adjust the flight path based on the detected insulator information and environmental changes during the inspection process to ensure the safe flight of the UAV.
[0141] 4. Intelligent Path Optimization. This invention introduces intelligent path optimization technology, which can automatically select the optimal path based on the location and distribution of different insulators, ensuring efficient completion of inspection tasks. The system comprehensively considers factors such as the distance between insulators and the distribution of obstacles to perform intelligent path planning.
[0142] 5. A continuously optimized and iterative closed-loop system. The insulator detection model and inspection route are continuously optimized and iterated to improve the accuracy and effectiveness of insulator detection and inspection. This iterative system helps to continuously accumulate new data and optimize the model to adapt to constantly changing environments and needs.
[0143] 6. High degree of automation. This method and system integrate a high degree of automation, completing inspection tasks without human intervention, reducing manual operation costs and improving work efficiency.
[0144] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0145] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0146] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0147] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0148] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for fine-scale route planning in distribution networks based on insulator detection, characterized in that, include: An insulator detection model based on the improved YOLOv7 model was constructed and trained offline. The trained insulator detection model is then converted into a format suitable for the target deployment environment and deployed onto the UAV's hardware. Then, fine-grained power distribution network route planning is performed according to the following steps: S1. Clean the distribution network point cloud data and tower details to obtain usable data; then, based on the obtained usable data, perform rough waypoint and route planning to obtain the preset route. S2. During the inspection flight of the UAV according to the preset route, images are continuously captured and insulators are detected by the deployed insulator detection model; when an insulator is detected, the position of the UAV is adjusted in real time to meet the requirements, and then the position is used as a new waypoint for more refined route planning. S3. After the flight mission is completed, the captured insulator images will be used as new samples for training the insulator detection model; at the same time, the newly generated refined waypoints and routes will be used as the coarse waypoints and routes for the next flight mission. The improved YOLOv7 model enhances the focus on the shape of the insulator by adding edge detail shape data augmentation to the original YOLOv7 model data augmentation algorithm. Specifically, it first uses an image edge extraction algorithm to generate an edge detail image, then copies the edge detail image twice and stitches them together to generate a three-channel edge detail image, and then expands it into the training set. The improved YOLOv7 model incorporates a cross-channel and spatial multi-scale attention module (CCSMA) into the original YOLOv7 model. The CCSMA module adopts a parallel substructure, consisting of a cross-channel learning module and a cross-space learning module. It uses three parallel lines to extract attention weight descriptors for grouped feature maps: two 1×1 parallel lines and one 3×3 branch. In the cross-channel learning module, the two parallel 1×1 branches encode the channels using two global average pooling methods. The features from the two branches are then concatenated and grouped into a 1×1 convolution. The features from the two branches, the low-level features, and the features from the 3×3 convolution branch are simultaneously fed into the Softmax function to fit their linear transformation. Each branch obtains an adaptive weight value, and then the weighted summation and feature recombination are performed to obtain the output of the cross-channel learning module. The output of the cross-channel learning module is expressed by the following formula: (1) (2) in, This represents the feature vector passed to the Softmax function; This represents the weight values obtained after calculating each vector using the Softmax function. This represents the features reorganized by the cross-channel learning module; The features output from the cross-channel learning module and the 3×3 output features are respectively subjected to 2D global average pooling, and then fed into the cross-spatial learning module to generate aggregated spatial attention weights. Finally, the features are aggregated with the low-level features using the sigmoid function to obtain the output features; the 2D global average pooling operation is expressed as: (3) Where H and W represent the height and width of the input feature size, respectively. This represents the input feature of the c-th channel; The output of the cross-space learning module is expressed by the following formula: (4) (5) By fusing contextual information at different scales in the network through the CCSMA module, the YOLOv7 network can generate better pixel-level attention to insulator features, and the output of the CCSMA module has the same size as the input. In the original YOLOv7 model, the loss function is composed of the confidence loss function. Classification loss function and localization loss function It consists of three parts: (6) in, They represent , and Weighting coefficients; The improved YOLOv7 model uses the MPDIoU loss function to calculate the loss value in the localization loss function part; the implementation method of the MPDIoU loss function is as follows: In the insulator image, using This represents the coordinates of the top-left corner of the true bounding box. This represents the coordinates of the bottom right corner of the bounding box. This indicates the coordinates of the top-left corner of the prediction box. This indicates the coordinates of the bottom right corner of the prediction box. and These represent the distances between the top left and top left corners, and between the bottom right and bottom right corners, respectively, between the ground truth bounding box and the predicted bounding box; (7) (8) After calculating the distances between the top-left corners and the bottom-right corners of the ground truth bounding box and the predicted bounding box, calculate: (9) (10) Wherein, MPDIoU is the bounding box similarity comparison index, L MPDIoU The bounding box regression loss function is the MPDIoU loss function. The MPDIoU loss function simplifies the similarity comparison between two bounding boxes and can adapt to regression of overlapping or non-overlapping bounding boxes; furthermore, L MPDIoU All factors are represented by the coordinates of the four points mentioned above, and the calculation formulas are shown in equations (11)-(13): (11) , , , (12) (13) in, This represents the area of the smallest bounding rectangle between the ground truth bounding box and the predicted bounding box. and These represent the center coordinates of the ground truth bounding box and the predicted bounding box, respectively. and This represents the width and height of the actual bounding box. and The width and height of the prediction box are represented by equations (11)-(13). The non-overlapping area, center point distance, width and height deviation can also be calculated by equations (11)-(13).
2. The method for fine route planning of distribution networks based on insulator detection according to claim 1, characterized in that, The Sobel operator is used to generate edge detail images.
3. The method for fine route planning of distribution networks based on insulator detection according to claim 1, characterized in that, The improved YOLOv7 model inputs the image data after image enhancement into the network. First, it passes through the Backbone section, which consists of CBS blocks, ELAN modules, and Downsampling-MP1 modules. The CBS blocks are constructed using Conv-BatchNorm-SiLU, and the ELAN modules are composed of multiple stacked CBS blocks. The ELAN modules use four-fold grouped convolutions, and their internal residual structures use skip connections. The Downsampling-MP1 module is composed of two branches, with the number of output channels matching the number of input channels. After processing by the Backbone section, three effective feature layers are obtained for the next step of network construction. The shapes of these three effective feature layers are (80, 80, 512), (40, 40, 1024), and (20, 20, 1024), respectively. The Neck section consists of a Path Aggregation Network (PAN) and a Feature Pyramid Network (FPN), used to enhance feature fusion from the three effective feature layers at different scales obtained from the Backbone section. First, the effective feature layer obtained from Stage 5 is fed into the SPCSPC module for processing, where the number of channels decreases from 1024 to 512, but the size remains unchanged. Then, the three effective feature layers from Stage 3, Stage 4, and Stage 5 (processed by the SPCSPC module) are fed into the CCSMA module for further processing, enhancing the representation of more noteworthy features across channels and spatial dimensions. Next, the entire network is upsampled, and the upsampled features from the three branches are concatenated one by one. Then, the ELAN and Downsampling-MP2 modules are used for downsampling and concatenating the features one by one. Downsampling-MP2 has the same network structure as Downsampling-MP1, but the output channels are twice the number of input channels. After processing by the Neck section, three enhanced feature layers are obtained, with shapes of (80, 80, 128), (40, 40, 256), and (20, 20, 512), respectively. The features of the three enhanced feature layers are fed into the Head part, processed by RepConv, and then fed into YOLOHead to generate prediction boxes. After processing by the Head part, the last three feature layers are obtained, with shapes of (80,80,18), (40,40,18), and (20,20,18), respectively. Finally, decoding is performed, and scores are sorted and non-maximum suppression is applied to generate the optimal prediction box that meets the confidence level.
4. The method for fine route planning of distribution networks based on insulator detection according to claim 1, characterized in that, In step S1, data cleaning includes: A1) Check point cloud data: Check the imported data and identify potential problems, including abnormal coordinates, missing data, and duplicate records; A2) Check the pole and tower details table: Check and handle any duplicate records to avoid introducing redundant data; reconfirm any missing or outlier values in the pole and tower details table; A3) Check data consistency: Ensure that the pole locations in the point cloud data are consistent with the geographical locations in the pole details table, and perform spatial matching and comparison; at the same time, check whether the attribute information in the pole details table is consistent with the attribute information in the point cloud data. Rough waypoint and route planning includes: B1) Generate waypoints: Extract the precise geographic coordinates of the insulators from the point cloud data, and obtain the attribute information of each tower from the tower details table; determine the density between waypoints based on the UAV's flight altitude, field of view, and mission requirements; use the coordinates of the outside of the insulator as the location of the waypoints, and generate additional waypoints by uniformly interpolating between the outside of the insulators according to the determined waypoint density, to ensure smooth connection of the flight paths between insulators. B2) Generate route: First, add turning points between waypoints to ensure that the aircraft can turn smoothly. Connect the generated waypoints in sequence to form a preliminary route. Then, considering terrain and obstacle factors, optimize the preliminary route using a "plowing method" to ensure the route is safe and efficient. Finally, verify the feasibility of the route to ensure that it covers all insulators.
5. The method for fine route planning of distribution networks based on insulator detection according to claim 1, characterized in that, In step S2, images are captured using the camera gimbal on the drone to detect the insulator.
6. The method for fine route planning of distribution networks based on insulator detection according to claim 1, characterized in that, Step S2, refining waypoints and routes, includes: (1) Unmanned aerial vehicle (UAV) flight and data acquisition: The UAV begins to fly according to the roughly planned waypoints and routes, and continuously takes pictures of the surrounding environment during the flight; (2) Real-time insulator detection and adjustment: Insulators are detected in real time through the insulator detection model. When an insulator is detected, the attitude and position of the UAV are continuously adjusted to ensure that the insulator target is always in the center of the field of view. At the same time, since the distance between the insulator and the tower is less than the tower radius, it is determined whether the insulator belongs to the corresponding tower and the tower floor is determined according to the height. (3) New waypoint recording and iterative update: When the insulator almost fills the screen and reaches the threshold distance, the current position is recorded as a new waypoint, the recorded new waypoint is added to the route sequence, and the waypoint belonging to the insulator is deleted; (4) New route planning: When new waypoints are obtained and clear images of insulators are captured, the route is replanned; based on the current UAV position and the newly recorded waypoints, the path planning A* algorithm is used to generate a new route; at the same time, the new route considers the smoothness of the route and avoids too drastic changes in heading and altitude to improve flight comfort and stability; when generating a new route, environmental factors are considered, including avoiding obstacles and adapting to different flight altitudes; (5) Real-time update of flight path: Once a new flight path is generated, it is fed back to the UAV flight control system in real time, so that the UAV can adjust its flight direction and attitude according to the new flight path to ensure that the flight path is consistent with the detection target.
Citation Information
Patent Citations
Intelligent route planning method for refined inspection of power transmission line
CN111006671A
Unmanned aerial vehicle inspection fine route automatic planning system and method
CN112363526A