Power system fault diagnosis method based on target detection algorithm
By using the YOLOv4 network model to identify HVDC system faults, the problem of low fault recognition rate was solved, efficient and accurate fault diagnosis was achieved, manual intervention was reduced, and the stability and safety of the power system were ensured.
Patent Information
- Application Number
- CN202311171065.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-09-11
AI Technical Summary
The HVDC system has a low fault recognition rate and slow speed, and relies on manual inspections with insufficient efficiency and accuracy, making it difficult to detect transmission line problems in a timely manner, resulting in economic losses and environmental damage.
YOLOv4 network model is used for fault identification. By collecting fault image datasets and dividing them into training, validation and test sets, a YOLOv4 fault identification network model is established. The hyperparameters are trained and adjusted. Fault identification is performed using the CSPDarknet 53 backbone feature extraction network, SPP feature pyramid and PANet path aggregation network, combined with the improved NMS algorithm and GBCE loss function.
It improves the accuracy and efficiency of fault diagnosis, realizes automatic identification and diagnosis of faults, reduces manual operation time and costs, and ensures the safe operation of the power system.
Smart Images

Figure CN117152529B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power system protection, and in particular to a power system fault diagnosis method based on a target detection algorithm. Background Art
[0002] In recent years, high-voltage direct current (HVDC) technology has achieved significant breakthroughs and has been widely adopted in power system operations. As a novel transmission technology, HVDC occupies a crucial position in emerging power systems due to its unique advantages. Compared to traditional high-voltage alternating current (HVAC) transmission technology, HVDC boasts numerous advantages, including lower line costs, higher transmission capacity, lower losses, the ability to interconnect asynchronously, and limit short-circuit currents in power systems. Therefore, HVDC is widely used in long-distance, high-power, asynchronously interconnected power transmission scenarios.
[0003] HVDC systems are extremely large and complex, and various faults are inevitable during operation. When a system fault occurs, it is crucial to promptly identify the fault and organize personnel for emergency repairs to prevent a complete system outage. A system outage caused by a fault can cause significant economic losses to the entire system and impact user electricity demand. In severe cases, it can reduce the operational stability of the parallel power grid, significantly impacting the economic efficiency, safety, and stability of the entire power system. HVDC systems have a low fault identification rate and are slow to detect, requiring extensive manual intervention. However, manual inspections are not only increasingly risky but also increasingly inefficient and inaccurate. They often fail to promptly detect problems in transmission lines, leading to further economic losses. Furthermore, manual inspections can be detrimental to the natural environment. Therefore, there is an urgent need to establish an HVDC fault identification system to rapidly identify and address HVDC system faults. Summary of the Invention
[0004] This application provides a power system fault diagnosis method based on a target detection algorithm, and proposes using the YOLOv4 network to realize fault identification of the HVDC system. The YOLOv4 fault identification network model has fast recognition speed and high recognition accuracy, and can effectively realize fault identification of the HVDC system.
[0005] In order to solve the above technical problems, the present application provides a power system fault diagnosis method based on a target detection algorithm. First, the fault image dataset is processed and divided into a training set, a validation set, and a test set; then, a YOLOv4 fault recognition network model is established; finally, the model is trained and data testing is performed, and the results are obtained to evaluate the model.
[0006] Specifically, the power system fault diagnosis method comprises:
[0007] S1: collecting HVDC system fault pictures to make a data set;
[0008] S2: dividing the data set into a training set, a verification set and a test set;
[0009] S3: establishing a YOLOv4 fault recognition network model, inputting the training set data into the YOLOv4 fault recognition network model to fit samples, and inputting the verification set data into the YOLOv4 fault recognition network model to verify the fitting effect of the model;
[0010] S4: adjusting hyperparameters according to the verification result;
[0011] S5: testing the generalization of the YOLOv4 fault recognition network model in a preset detection task through the test set data;
[0012] S6: determining a final YOLOv4 fault recognition network model according to the detection result, and using the final YOLOv4 fault recognition network model for HVDC system fault diagnosis;
[0013] The YOLOv4 fault recognition network model is composed of a CSPDarknet 53 backbone feature extraction network, an SPP feature pyramid and a PANet path aggregation network.
[0014] Through the above steps, the power system fault diagnosis method based on the target detection algorithm can improve the accuracy, efficiency and real-time performance of the diagnosis. The target detection algorithm can accurately locate and identify fault objects, and can realize automatic recognition and diagnosis of fault pictures, reducing the time and cost of manual operation. In the power system fault diagnosis, more accurate results can be provided, which has a positive technical effect on the operation and safety of the power system.
[0015] In some implementations, the step S1 further comprises, before the step S1:
[0016] collecting an HVDC system fault video, extracting image frames from the HVDC system fault video at a preset time interval, labeling the fault types in the selected image frames with a rectangular frame, and normalizing the width and height of the labeled bounding box according to the width and height of the image frame;
[0017] The normalization process is as follows:
[0018]
[0019]
[0020] In the formula, ωb and h b are the normalized values of the width and height of the annotation bounding box respectively; ω box and h box are the true values of the width and height of the labeled bounding box respectively; ω img and h img The width and height of the image respectively.
[0021] The fault types include at least foreign object fault, insulator fault, lightning arrester fault, and loose conductor fault.
[0022] Before step S2, the method further includes: performing data enhancement processing.
[0023] The data augmentation method uses Mosaic data augmentation. Four pictures are randomly selected from the dataset, scaled separately, and placed in four corners corresponding to different directions. The blank areas are filled with gray. Finally, they are spliced together to form a new picture as training set data to enhance the model's ability to recognize target shapes and textures.
[0024] In the YOLOv4 fault identification network model, the CSPDarknet 53 backbone feature extraction network includes:
[0025] Use continuous convolution and residual blocks to achieve feature extraction at different levels;
[0026] The feature maps of the three residual blocks are used as the output of the feature extraction backbone network, where the sizes of the previous and next feature maps are multiples of each other;
[0027] Among them, each residual block contains a 3×3 convolution kernel and a 1×1 convolution kernel; the 3×3 convolution kernel is used to extract image features and reduce the feature map, and the 1×1 convolution kernel is used to compress the image feature representation.
[0028] In the YOLOv4 fault recognition network model, the SPP feature pyramid includes:
[0029] The pooling operation improves the receptive field of the model, allowing the YOLOv4 fault recognition network model to mine the information in the feature map to varying degrees.
[0030] In the YOLOv4 fault identification network model, the PANet path aggregation network includes:
[0031] It is composed of a bottom-up PAN module and a top-down FPN module, and aggregates the parameters of different layers;
[0032] The output result of each feature layer with the highest confidence is taken as the final output of the network, which serves as the target box position and corresponding category information.
[0033] In some implementations, the YOLOv4 fault identification network model further includes:
[0034] Definition: Set all targets except the true target as negative class J, and set a threshold t for the prediction of the negative class k ;
[0035] Construct the GBCE loss function, the formula is:
[0036] Based on the BCE loss function, only the true target s is retained l The closest s to the real target besides the real target i :
[0037]
[0038] Only keep the real targets l The closest s to the real target besides the real target i ;
[0039] According to the threshold value, the negative class is greater than or equal to the threshold value as J′ > , J′ > ={i:i∈J∧s i ≥t k};
[0040] Among them, x is the probability of the predicted target; y is the true target; N is the number of samples.
[0041] The YOLOv4 fault recognition network model further includes: using an improved NMS algorithm to suppress the scores of surrounding boxes,
[0042]
[0043] Where p i represents the score of the i-th detection box; thre represents the threshold; M and b i Represent the selected detection box and other detection boxes respectively.
[0044] In some implementations, step S4 includes:
[0045] Select the typical unsupervised learning algorithm k-means as the clustering algorithm, and update the anchor parameters based on k-means clustering; specifically:
[0046] S401 selects the initial cluster center by selecting any number of clusters k for n data;
[0047] S402 uses the Euclidean distance formula or the Manhattan distance formula to calculate the distance;
[0048] S403 assigns the data set to the nearest neighbor cluster according to the minimum distance principle;
[0049] Repeat S401-S403 until convergence, and finally output the cluster center and k cluster divisions.
[0050] In some implementations, step S6 further includes: evaluating the model based on the recognition results, and plotting a curve with the recall rate as the horizontal axis and the precision as the vertical axis is called a PR curve; defining the AP value as the area between the curve and the coordinate axis, and the mean thereof as the mAP value.
[0051]
[0052] Where, AP i It is the AP value of the i-th category. The larger the AP value, the better the model detects a certain type of target. The mAP value reflects the overall detection effect of the model.
[0053] The present invention has the following beneficial effects compared to the prior art:
[0054] 1. After existing drone inspections obtain line images, the status of each device still requires manual interpretation. The YOLOv4 fault recognition network model provides an automatic detection method for drone inspections, which has practical guiding significance for improving inspection efficiency.
[0055] 2. The present invention adopts the YOLOv4 fault identification network model to identify faults in the HVDC system. The model is simple, has fast identification speed and high identification accuracy, and can effectively implement fault identification of the HVDC system. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is a flow chart of a method for diagnosing power system faults based on a target detection algorithm according to an embodiment of the present application.
[0057] Figure 2 This is a diagram of the YOLOv4 network structure shown in an embodiment of the present application.
[0058] Figure 3 This is a flowchart of the YOLOv4 fault identification network model shown in one embodiment of the present application. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0060] Please refer to Figure 1 , Figure 1 A flow chart of a power system fault diagnosis method based on a target detection algorithm is provided in the first embodiment of the present application.
[0061] Specifically, the power system fault diagnosis method includes:
[0062] S1: Collect HVDC system fault images and create a dataset;
[0063] To replicate real-world faults, the data described in this paper was collected from HVDC system faults to enhance the model's generalization and the dataset's applicability. The original dataset was generated by selecting videos of HVDC system faults of different types and locations, and removing blur and obstructions.
[0064] S2: Divide the dataset into a training set, a validation set, and a test set; randomly select 70% of the image data as training data, randomly select 20% of the image data as validation data, and randomly select 10% of the image data as test data.
[0065] S3: Establish a YOLOv4 fault recognition network model, input the training set data into the YOLOv4 fault recognition network model to fit samples, and input the validation set data into the YOLOv4 fault recognition network model to verify the model fitting effect;
[0066] S4: Adjust hyperparameters such as learning rate, batch size, and network structure based on the verification results. By repeatedly iterating this process, the model performance is gradually improved and the fault identification effect is enhanced.
[0067] S5: The generalization of the adjusted YOLOv4 fault recognition network model in the preset detection task is completed through the test set data;
[0068] The actual labels of the test set are compared with the model's predictions to calculate the model's performance on the test set. Various metrics such as precision, recall, and F1 score can be used to evaluate the model's performance.
[0069] Evaluate model performance: Compare the true labels of the test set with the model's predictions and calculate the model's performance on the test set. You can use various metrics, such as precision, recall, and F1 score, to evaluate model performance.
[0070] If the generalization performance analysis reveals that the model performs poorly in specific situations, further improvements can be made based on the specific issues. For example, more samples can be added to cover more fault conditions, in-depth analysis of difficult samples can be performed to adjust the model, or data augmentation can be performed.
[0071] S6: Determine the final YOLOv4 fault identification network model based on the detection results and use it for HVDC system fault diagnosis.
[0072] The YOLOv4 fault recognition network model is composed of a CSPDarknet 53 backbone feature extraction network, an SPP feature pyramid, and a PANet path aggregation network.
[0073] Through the above steps, the power system fault diagnosis method based on the target detection algorithm can improve the accuracy, efficiency, and real-time performance of diagnosis. The target detection algorithm can accurately locate and identify faulty objects, enabling automatic recognition and diagnosis of fault images, reducing the time and cost of manual operations. It can provide more accurate results in power system fault diagnosis and have a positive technical impact on the operation and safety of the power system. By evaluating and analyzing the performance of the adjusted YOLOv4 model on the test set, we can determine the model's generalization performance in the preset detection tasks. This can help understand the model's adaptability to new data and enable further improvement and optimization as needed to improve the generalization performance of fault identification.
[0074] In some implementations, before step S1, the method further includes:
[0075] An HVDC system fault video is collected, and image frames are extracted from the HVDC system fault video at a preset time interval. Fault types in the selected image frames are marked with rectangular boxes, and the width and height of the marked bounding boxes are normalized according to the width and height of the image frames.
[0076] Among them, the rectangular frame marking is performed, and the specific implementation method is as follows:
[0077] The PASCAL VOC dataset format for computer vision was used to create the dataset. First, the surveillance video was converted into an image format using Adobe Premiere. To ensure real-time performance, an image was selected every 5 seconds and the fault type in the image was annotated with a rectangular box.
[0078] The normalization process is as follows:
[0079]
[0080]
[0081] Where,ω b and h b are the normalized values of the width and height of the annotation bounding box respectively; ω box and h box are the true values of the width and height of the labeled bounding box respectively; ωimg and h img The width and height of the image respectively.
[0082] The fault types include at least foreign object fault, insulator fault, lightning arrester fault, and loose conductor fault.
[0083] In some implementations, before step S2, the method further includes: performing data enhancement processing.
[0084] In addition to conventional random horizontal flipping, scaling, and color gamut conversion, the data augmentation method, in some implementations, also includes S2: Mosaic data augmentation, which randomly selects four images from the dataset, scales them individually, and places them in four corresponding corners. Blank areas are filled with gray, and the images are then stitched together to form a new image. This serves as training data to enhance the model's ability to recognize target shape and texture. The resulting new image enriches the detection context and, due to varying degrees of scaling, enhances the detection of small targets.
[0085] In some implementations, constructing the YOLOv4 fault identification network model specifically includes:
[0086] (1) The CSPDarknet 53 backbone feature extraction network includes:
[0087] Use continuous convolution and residual blocks to achieve feature extraction at different levels;
[0088] The feature maps of the three residual blocks are used as the output of the feature extraction backbone network, where the sizes of the previous and next feature maps are multiples of each other;
[0089] Among them, each residual block contains a 3×3 convolution kernel and a 1×1 convolution kernel; the 3×3 convolution kernel is used to extract image features and reduce the feature map, and the 1×1 convolution kernel is used to compress the image feature representation.
[0090] (2) The SPP feature pyramid includes:
[0091] The pooling operation improves the receptive field of the model, allowing the YOLOv4 fault recognition network model to mine the information in the feature map to varying degrees.
[0092] (3) The PANet path aggregation network includes:
[0093] It is composed of a bottom-up PAN module and a top-down FPN module, and aggregates the parameters of different layers to further improve the representation ability of model features.
[0094] The output result of each feature layer with the highest confidence is taken as the final output of the network, which serves as the target box position and corresponding category information.
[0095] Finally, the output result of each feature layer with the highest confidence is taken as the final output of the network, that is, the target box position and the corresponding category information.
[0096] In some implementations, the hyperparameters are adjusted according to the verification results, specifically as follows:
[0097] Initialize hyperparameters: First, initialize the model's hyperparameters, including learning rate, batch size, network structure, etc.
[0098] Model training: The model is trained using the training set data. During each training cycle, the training set data is divided into multiple small batches, each controlled by the batch size. Each small batch of data is fed into the model for forward and backward propagation. The loss function is used to calculate the loss value, and an optimization algorithm (such as gradient descent) is used to update the model parameters.
[0099] Model training: The model is trained using the training set data. During each training cycle, the training set data is divided into multiple small batches, each controlled by the batch size. Each small batch of data is fed into the model for forward and backward propagation. The loss function is used to calculate the loss value, and an optimization algorithm (such as gradient descent) is used to update the model parameters.
[0100] Hyperparameter adjustment: Adjust the hyperparameters based on the validation results. Based on the model's performance on the validation set, the following adjustments can be made:
[0101] Adjust the learning rate: If the model converges slowly during training, you can appropriately reduce the learning rate; if the model oscillates or diverges during training, you can appropriately increase the learning rate.
[0102] Adjust batch size: You can try different batch sizes, observe the performance of the model on the validation set, and choose an appropriate batch size.
[0103] Adjust the network structure: such as adding or removing layers, increasing or decreasing the number of nodes in the network, and other changes to explore model structures that are more suitable for the dataset and task.
[0104] Repeat training and validation: Based on the adjusted hyperparameters, train and validate the model again, repeating the above steps. Train with the new hyperparameters, observe the model's performance on the validation set, and further optimize the model's performance.
[0105] Iterative Tuning: Repeat the process of hyperparameter adjustment and model training and validation until the model achieves satisfactory performance on the validation set. Tuning can be terminated by setting certain stopping conditions (such as reaching the maximum number of iterations or no significant improvement in validation metrics).
[0106] By repeatedly adjusting hyperparameters, evaluating and adjusting the model based on its performance on the validation set, and continuously optimizing model performance, we can improve fault identification. This process requires patience and experimental experience to find the optimal hyperparameter combination and model configuration for better fault diagnosis.
[0107] The YOLOv4 algorithm uses the BCE loss function in the category and confidence prediction of the target box. The BCE loss function formula is as follows:
[0108]
[0109] Where x is the probability of the predicted target; y is the true target; N is the number of samples; the formula represents the total loss calculated for N samples.
[0110] To reduce the false detection rate of similar foreign objects, this paper introduces the concept of the GCE (Gradient-boosting Cross Entropy) loss function into the calculation process of YOLOv4. Based on the concept of the BCE loss function, the GBCE loss function is constructed. The GBCE loss function formula is as follows:
[0111] Definition: Set all targets except the true target as negative class J, and set a threshold t for the prediction of the negative class k ;
[0112] Construct the GBCE loss function, the formula is:
[0113]
[0114] In the process of predicting the target category, the algorithm generates a true target probability and several non-true target probabilities, sets the targets other than the true target as the negative class J, and sets a threshold t for the prediction of the negative class. k .
[0115] Based on the BCE loss function, only the true target s is retained l The closest s to the real target besides the real target i , so that we can pay more attention to targets that are easy to be misdetected, reduce the false detection and error detection rate, and improve the effect of distinguishing similar foreign objects in the data set.
[0116] In the above formula, according to the threshold value, the negative class is set to be greater than or equal to the threshold value as J′ >, J′ > ={i:i∈J∧s i ≥t k};
[0117] Among them, x is the probability of the predicted target; y is the true target; N is the number of samples.
[0118] In some implementations, most use the traditional NMS algorithm:
[0119] (1) Sort all detection box scores and select the box with the highest score;
[0120] (2) Traverse the remaining boxes and calculate the Intersection over Union (IoU) with the box with the highest score;
[0121] (3) Set an IoU threshold. If the IoU between the current box and the box with the highest score exceeds the threshold, set the score of the box to 0.
[0122] (4) Repeat (1) to (3) for the unprocessed frames until all frames are updated.
[0123] However, the NMS algorithm is prone to detection omissions. Based on this, the present invention adopts an improved NMS algorithm to suppress the scores of the surrounding boxes.
[0124]
[0125] Where p i represents the score of the i-th detection box; thre represents the threshold; M and b i Represent the selected detection box and other detection boxes respectively.
[0126] During the NMS calculation process, the surrounding boxes are suppressed according to the size of the IoU with the selected box. This method can make the model in this paper more suitable for HVDC systems with complex lines.
[0127] In some implementations, given that occlusion by other objects may increase the missed detection rate during detection, the present invention improves the anchor parameter update of YOLOv4 and designs a more suitable anchor preset value. This accelerates the convergence speed during network training and improves network performance, thereby achieving the purpose of accurately detecting HVDC system faults. The specific method is as follows:
[0128] Based on the clustering concept, this paper designs an anchor parameter update method to calculate the most suitable anchor value. To improve efficiency, the k-means algorithm, a typical unsupervised learning algorithm, is selected as the clustering algorithm. When clustering, the Euclidean distance formula or the Manhattan formula is used to calculate the distance, which are defined as:
[0129]
[0130]
[0131] Adopting the idea of high cohesion within a class and low coupling between classes, by reducing the distance between data within a cluster and increasing the distance between clusters, a mathematical sum squares for error (SSE) formula is established for evaluation:
[0132]
[0133] In the formula, k represents the number of clusters; x represents the data points generated by clustering; C i Indicates the numerical size of the cluster center; the size of SSE indicates the quality of the clustering result.
[0134] The present invention selects the typical unsupervised learning algorithm k-means as the clustering algorithm and performs anchor parameter update based on k-means clustering; specifically:
[0135] S401: Select the initial cluster center by selecting any number of clusters k for n data;
[0136] S402: Calculate the distance using the Euclidean distance formula or the Manhattan distance formula;
[0137] S403: Assigning the data set to the nearest neighbor cluster according to the minimum distance principle;
[0138] Iterate S401-S403 until convergence, that is, the cluster center no longer changes or changes slightly. Convergence conditions can be set, such as the maximum number of iterations, the range of change of the cluster center, etc. Finally, the cluster center and k cluster divisions are output.
[0139] Through the above specific steps, you can use the k-means algorithm to update the anchor parameters based on clustering. The cluster center and cluster division results can be used as anchor parameters in the YOLOv4 model for setting the anchor box in the target detection task to improve the detection accuracy of the model.
[0140] In some implementations, after completing the k-means clustering, the model's top-priority bounding box size is calculated as follows:
[0141] Clustering results: According to the clustering process of the k-means algorithm, the cluster center is obtained as the candidate size of the prior box.
[0142] Determine the target size range: Determine a target size range based on the true size of the target in the training dataset.
[0143] Optimal size selection: Based on the cluster center as the candidate size and the target size range, the optimal prior box size is selected. A common selection method is to select the cluster center with the smallest distance from the target size range as the optimal size.
[0144] Output the optimal prior box size: Use the optimal size as the prior box size in the model and make corresponding adjustments and adaptations as needed to meet the requirements of the target detection task.
[0145] After completing k-means clustering, the model's optimal a priori box size can be obtained by calculating the distance and selecting the optimal size. These a priori box sizes will be used to set the anchor box in the object detection task to improve the model's detection accuracy on objects of different sizes.
[0146] Using cluster centers as candidate sizes is a data-based heuristic that can be used to initialize the size of the prior bounding box. However, further adjustments and fine-tuning may be required to achieve better detection performance. This may include optimizing and adjusting the prior bounding box size based on the characteristics of the actual application scenario and the distribution of object sizes.
[0147] In some implementations, step S6 further includes: performing model evaluation based on the recognition results, specifically in the following manner:
[0148] The model evaluation indicators used are precision (P) and recall (R). The calculation formula is as follows:
[0149]
[0150]
[0151] In the formula, TP (True Positive) represents the positive sample predicted by the model as true; FP (False Positive) represents the negative sample predicted by the model as true; FN (False Negative) represents the positive sample predicted by the model as false.
[0152] Simply put, accuracy refers to the proportion of all samples correctly classified by the model to the total number of samples classified as that category by the model;
[0153] Accuracy = True Positives / (True Positives + False Positives).
[0154] True Positives: The number of samples correctly classified as this category by the model.
[0155] False Positives: The number of samples that are incorrectly classified as this category by the model.
[0156] The recall rate is the ratio of all samples correctly classified by the model to the total number of all samples in that category.
[0157] Recall = True Positives / (True Positives + False Negatives).
[0158] False Negatives: The number of samples that are incorrectly classified as other categories by the model.
[0159] Precision and recall are two important evaluation metrics that comprehensively assess model performance. Precision emphasizes the model's accuracy, specifically the percentage of predicted positive examples. Recall emphasizes the model's coverage, specifically the percentage of positive examples successfully detected. These two metrics are often conflicting, requiring careful consideration based on specific needs and scenarios.
[0160] When the IoU threshold changes, the model's precision and recall also change, so using only these two metrics has limitations. A curve plotted with recall as the horizontal axis and precision as the vertical axis is called a PR curve. The average AP value is defined as the area between the curve and the coordinate axes, and their mean is the mAP value.
[0161]
[0162] Where, AP i is the AP value for the i-th category. The AP value represents the model's performance in detecting a specific category of objects. A larger AP value indicates a better model for detecting that category of objects. The mAP value reflects the model's overall detection performance. The mAP value can be used as a comprehensive indicator to more comprehensively evaluate the performance of an object detection model. A higher mAP value indicates that the model performs well in detecting multiple categories of objects.
[0163] The PR curve can be used to observe the changing trend of the model's precision at different recall rates, thereby more comprehensively evaluating the model's performance. Generally speaking, a model maintains higher precision at a higher recall rate.
[0164] The present invention adopts the YOLOv4 fault identification network model to identify faults in the HVDC system. The model is simple, has a fast identification speed and high identification accuracy, and can effectively implement fault identification of the HVDC system.
[0165] In some implementations, S6: determining a final YOLOv4 fault identification network model based on the detection results and using it for HVDC system fault diagnosis, is specifically implemented as follows:
[0166] Integrate the exported YOLOv4 model with the actual HVDC system fault diagnosis system. This usually involves integrating the model with the corresponding software or hardware platform.
[0167] Prepare input data based on the actual HVDC system fault diagnosis system requirements and usage scenarios. This can be image or video data of power system faults, and needs to be preprocessed and formatted according to the model's input requirements.
[0168] The preprocessed fault image or video data is input into the HVDC system fault diagnosis system, which integrates the YOLOv4 fault recognition network model. The model is used to perform fault recognition on the input data to detect and locate the faulty object.
[0169] Fault diagnosis result analysis: Analyze and interpret the fault diagnosis results based on the model output. Determine the fault type, location, and severity based on the fault object information predicted by the model.
[0170] Fault handling and repair: Based on the fault diagnosis results, appropriate fault handling and repair are carried out. This may include dispatching maintenance personnel, replacing components, reorganizing the power system, and other measures.
[0171] Continuous optimization: We continuously monitor and evaluate model performance and, based on feedback from actual applications, continuously optimize and improve the YOLOv4 fault identification network model to enhance diagnostic accuracy and efficiency.
[0172] Through the above specific process, the final YOLOv4 fault identification network model is determined based on the detection results and used for HVDC system fault diagnosis, realizing automated fault diagnosis and processing. This can improve the accuracy and efficiency of fault diagnosis and help ensure the stable operation and safety of the power system.
[0173] The specific embodiments described above further illustrate the objectives, technical solutions, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit the scope of protection of this application. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this application by those skilled in the art should be included within the scope of protection of this application.
Claims
1. A power system fault diagnosis method based on target detection algorithm, characterized in that: The method comprises: S1: Collect HVDC system fault images and create a dataset; S2: Divide the dataset into training set, validation set and test set; S3: Establish a YOLOv4 fault recognition network model, input the training set data into the YOLOv4 fault recognition network model to fit samples, and input the validation set data into the YOLOv4 fault recognition network model to verify the model fitting effect; S4: Adjust hyperparameters according to the verification results; S5: The generalization of the adjusted YOLOv4 fault recognition network model in the preset detection task is completed through the test set data; S6: Determine the final YOLOv4 fault identification network model based on the detection results and use it for HVDC system fault diagnosis; The YOLOv4 fault recognition network model is composed of a CSPDarknet 53 backbone feature extraction network, an SPP feature pyramid, and a PANet path aggregation network. The CSPDarknet 53 backbone feature extraction network includes: Use continuous convolution and residual blocks to achieve feature extraction at different levels; The feature maps of the three residual blocks are used as the output of the feature extraction backbone network, where the sizes of the previous and next feature maps are multiples of each other; Among them, each residual block contains a 3×3 convolution kernel and a 1×1 convolution kernel; the 3×3 convolution kernel is used to extract image features and reduce the feature map, and the 1×1 convolution kernel is used to compress the image feature representation; The SPP feature pyramid includes: The pooling operation improves the model's receptive field, allowing the YOLOv4 fault recognition network model to mine information in the feature map to varying degrees. The PANet path aggregation network includes: It is composed of a bottom-up PAN module and a top-down FPN module, and aggregates the parameters of different layers; The output result of each feature layer with the highest confidence is taken as the final output of the network, which serves as the target box position and corresponding category information.
2. The method for diagnosing power system faults based on a target detection algorithm according to claim 1, characterized in that: Before step S1, the method further includes: Acquire an HVDC system fault video, extract image frames from the HVDC system fault video at a preset time interval, mark the fault type in the selected image frames with rectangular boxes, and normalize the width and height of the marked boundary boxes according to the width and height of the image frames; The fault types include at least foreign object fault, insulator fault, lightning arrester fault, and loose conductor fault.
3. The method for diagnosing power system faults based on target detection algorithm according to claim 2, characterized in that: The S2 also includes: using the Mosaic data enhancement method, randomly selecting 4 pictures from the data set, scaling the 4 pictures separately, placing them in the corners corresponding to 4 different directions, filling the blank areas with gray, and finally splicing them together to form a new picture as training set data to enhance the model's ability to recognize the target shape and texture.
4. The method for diagnosing power system faults based on target detection algorithm according to claim 3, characterized in that: The YOLOv4 fault identification network model also includes: Definition: Set all targets except the true target as negative class J , set a threshold for the prediction of the negative class ; Construct the GBCE loss function, the formula is: Only retain the true target based on the BCE loss function The closest thing to the real goal besides the real goal : ; Only keep the real target The closest thing to the real goal besides the real goal ; According to the threshold value, the negative class is set to be greater than or equal to the threshold , ; in, is the probability of predicting the target; is the true target; N is the number of samples.
5. The method for diagnosing power system faults based on target detection algorithm according to claim 4, characterized in that: The YOLOv4 fault recognition network model further includes: using an improved NMS algorithm to suppress the scores of surrounding boxes, ; Where, Indicates the The score of the detection box; thre represents the threshold; M and Represent the selected detection box and other detection boxes respectively.
6. A method for diagnosing power system faults based on a target detection algorithm according to claim 5, characterized in that: The step S4 comprises: Select typical unsupervised learning algorithms k -means is used as the clustering algorithm to update the anchor parameters based on k-means clustering; specifically: S401 selects the initial cluster center by Any number of clusters for each data point k choice; S402 uses the Euclidean distance formula or the Manhattan distance formula to calculate the distance; S403 assigns the data set to the nearest neighbor cluster according to the minimum distance principle; Repeat iterations S401-S403 until convergence, and finally output the cluster centers and k Cluster division.
7. A method for diagnosing power system faults based on a target detection algorithm according to claim 6, characterized in that: The step S6 also includes: evaluating the model based on the recognition results, and the curve drawn with the recall rate as the horizontal axis and the accuracy as the vertical axis is called PR curve; AP The value is defined as the area between the curve and the coordinate axis, and its mean is mAP value, ; ; Where, It is Class AP value, AP The larger the value, the better the model is at detecting certain types of targets. mAP The value reflects the overall detection effect of the model.
Citation Information
Patent Citations
Power transmission line target detection and identification method based on feature fusion
CN114445706A
Transient based method for identifying faults in a high / medium voltage electric power transmission system
US20220206055A1