A power grid fault locating method based on a generative adversarial network
By constructing a generative adversarial network structure, the problem of finding fault points in the power grid in the existing power grid fault detection model is solved, and the rapid and accurate location of power grid cable fault points is realized, improving the location efficiency and reliability.
Patent Information
- Application Number
- CN202111157233.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2041-09-30
AI Technical Summary
Existing power grid fault detection models are based on a single convolutional network structure, which fails to effectively utilize the adversarial structure of generative adversarial networks, making it difficult to locate power grid fault points.
A generative adversarial network (GAN) structure is constructed, consisting of a generator network G, a discriminator network D, and a feature extraction network H. By preprocessing and extracting features from the cable fault dataset, adversarial learning is used to train the generator network G and the discriminator network D to achieve Nash equilibrium, thereby enabling rapid and accurate localization of power grid fault points.
It improves the efficiency and reliability of locating fault points in power grid cables, and the detection results are faster and more accurate.
Smart Images

Figure CN113920080B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of fault location, in particular, to a power grid fault location method based on a generative adversarial network. BACKGROUND
[0002] The generative adversarial network (GAN) is a generative adversarial model, which is influenced by game theory, and is usually composed of a generator and a discriminator. The generator captures the latent distribution of real data and generates new data samples; the discriminator is a binary classifier that discriminates whether the input data is real data or a sample generated by the generator. The network structure of the generator and the discriminator is a convolutional neural network. The generative adversarial network involves the field of data analysis, and real data is input into the generative adversarial network to generate an analysis result. The authenticity of the analysis result determines the performance of the generative adversarial network. Power grid fault detection is the identification of fault points in fault topology data, and the selection of fault points is limited according to actual conditions. Fault detection model methods are generally divided into three categories: unsupervised fault detection, supervised fault detection, and semi-supervised fault detection. The supervised anomaly detection method is usually selected to train a model that outputs a specific fault location strategy in the analysis result. The structure of the traditional fault detection model is a single integrated convolutional network, and does not involve the two mutually opposing network structures in the generative adversarial network, which makes it difficult to find fault points. SUMMARY
[0003] The purpose of the present application is to solve the problem of high cost of using active crystal oscillator in the design process of RF circuit, and to minimize the size of RF module and realize frequency deviation correction under the premise of ensuring the original RF performance parameters of RFIC. A kind of RF signal frequency automatic calibration circuit and its control method are proposed, which can realize RF signal frequency calibration under the premise of low cost and high efficiency.
[0004] To achieve the above technical purpose, the present application provides a technical scheme, which is a power grid fault location method based on a generative adversarial network, comprising the following steps:
[0005] S1, obtain a cable fault data set on a power grid line, and construct a cable fault topology structure N=[J1, J2, …, Jn] representing the power grid line, wherein n is the node number of the cable fault point, and the cable fault data set is preprocessed, and the cable fault data set is divided into a test set Tx and a training set Td;
[0006] S2, construct a generative adversarial network structure, which includes a generative network G, a discriminative network D and a feature extraction network H; wherein the generative network G includes a convolutional layer, a deconvolutional layer, an LR layer and a B layer; the discriminative network D includes a convolutional layer, an LR layer and a B layer;
[0007] S3, extracting segmentation features of the training set Td through a feature extraction network H; obtaining the pixel number of the red insulating tape, the size of the black protective layer, and the pixel number of the exposed cable;
[0008] S4, inputting the segmentation features into a discrimination network D for feature comparison; based on an adversarial learning method, iteratively training the generation network G and the discrimination network D; and making the generation network G and the discrimination network D reach Nash equilibrium;
[0009] S5, inputting the test set Tx into the trained generative adversarial network for fault location detection.
[0010] In the scheme, the cable in the power grid line is selected as the detection object, the cable joint image data of the whole power grid is collected, the cable fault topology structure is made, the cable fault data set is generated, the image preprocessing is performed on the cable fault data set, and the preprocessing is used as the input of the generative adversarial network. Based on the adversarial learning method, the generation network G and the discrimination network D are iteratively trained; the generation network G and the discrimination network D reach Nash equilibrium, the trained generative adversarial network for power grid fault location is obtained, the detection result of the cable fault point in the power grid line through the trained generative adversarial network is more rapid and accurate, and the efficiency and reliability of the power grid cable fault point positioning are effectively improved.
[0011] As a preferred, in S1, the preprocessing of the cable fault data set includes the following steps:
[0012] The cable picture data of each detection point on the power grid line is collected, the YOLOV5 target detection algorithm is used to identify the target of the obtained picture, and the cable in the picture is identified; the labelme tool is used to label the cable in the picture;
[0013] According to the position of the cable detection frame, the cable is cut out from the picture to generate a picture data set.
[0014] As a preferred, in the feature extraction network H, the UNet segmentation network model is used to segment the corresponding cable features in the picture data set; the Mobilenet-V2 network is used as the backbone network of the UNet segmentation network model; and the morphological operation method is used to obtain the pixel number of the red insulating tape, the size of the black protective layer, and the pixel number of the exposed cable.
[0015] As a preferred, the UNet segmentation network model includes an encoder and a decoder, wherein:
[0016] The encoder is responsible for feature extraction, and the original image is reduced to four times down-sampling to fully extract and compress the features in the original image. The decoder is responsible for the up-sampling of the image, and the extracted features are up-sampled four times. Each up-sampling is fused with the same scale as the corresponding channel number of the encoder part. Finally, the features are restored to the size of the original image. The final result is the segmented picture. The intercepted cable picture is pre-processed to change the image to a uniform size. The pre-processed picture is input into the UNet segmentation network model. After down-sampling and up-sampling, a fixed size segmentation map is finally obtained.
[0017] As a preferred, in S4, the training set Td is pre-processed by the feature extraction network H to extract image feature data. The image feature data is input into the discrimination network D, and the discrimination network D outputs the first true-false possibility Pf / r of the fault image and the network intermediate layer feature parameter fmf / r=[fm0, fm1, fm2], to ensure the reliability of network training.
[0018] In the process of training the generative adversarial network, the generative network G generates the fault point Nfm corresponding to the labeled information according to the original training set Td. The fault point Nfm is input into the discrimination network D, and the discrimination network D outputs the fault possibility Pf of the fault point Nfm. The discrimination fault node Jn is input into the discrimination network D, and the discrimination network D outputs the true possibility Pr and the true feature parameter fmr=[fm0, fm1, fm2] of the discrimination fault node Jn. The discrimination network parameter of the discrimination network D is updated in time.
[0019] After the discrimination network D is updated, the fault point Nfm is input into the discrimination network D again, and the discrimination network D outputs the fault possibility Pf and the fault feature parameter fmf=[fm0, fm1, fm2] of the fault point Nfm. The true fault feature parameter is obtained, and the generative network parameter of the generative network G is immediately updated.
[0020] As a preferred, the discrimination network parameter of the discrimination network D is updated according to the following formula:
[0021] lD=-(log(1-Pf)+log(Pr)).
[0022] As a preferred, the generative network parameter of the generative network G is updated according to the following formula:
[0023] lG=-log(Pf)+Average((fmf-fmr)2),
[0024] Wherein, Average is the calculation of mean value.
[0025] As a preferred, the size calculation of the black protective layer includes the following steps:
[0026] Calculate the circumscribed minimum rectangular frame of the black protective layer, and obtain the long side and short side of the black protective layer rectangular frame,
[0027] Calculate the initial circumscribed rectangle A of the exposed cable area, and record the area S of the rectangle;
[0028] Calculate the point cluster of the cable exposed area by rotating the formula at an angle θ; calculate the circumscribed matrix frame of the point cluster after rotation, calculate the area of the matrix frame and compare the size with the area S, and assign the smaller area to S min ;
[0029] Rotate the point cluster by an angle β until it is rotated to 90 degrees, and calculate the rectangular frame area and update S min ;
[0030] Obtain the minimum circumscribed rectangular area S min corresponding to the rotation angle α; reverse rotate the initial circumscribed rectangle A by an angle α, that is, obtain the minimum circumscribed rectangle.
[0031] As preferred, the point cluster rotation formula is as follows:
[0032] x=x cos(θ)-y sin(θ)
[0033] y=x sin(θ)+y cos(θ)
[0034] Where, θ=θ+β, (x, y) is the pixel coordinates of the points in the point cluster, the initial value of angle θ is 0, and the angle step β is set to 1 degree.
[0035] The present application has the beneficial effects: the present application discloses a power grid fault positioning method based on a generative adversarial network, selects a cable in a power grid line as a detection object, collects cable joint image data of the whole power grid, makes a cable fault topology structure, generates a cable fault data set, after image preprocessing of the cable fault data set, as the input of the generative adversarial network, based on the adversarial learning mode, iteratively trains the generative network G and the discriminative network D; make the generative network G and the discriminative network D reach Nash equilibrium, and obtain the generative adversarial network for power grid fault positioning after training; the detection result of the cable fault point in the power grid line through the trained generative adversarial network is more rapid and accurate, which effectively improves the power grid cable fault point positioning efficiency and reliability. BRIEF DESCRIPTION OF DRAWINGS
[0036] Figure 1 The flowchart of the power grid fault positioning method based on the generative adversarial network of the present application. DETAILED DESCRIPTION
[0037] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only one preferred embodiment of this invention and are only used to explain this invention. They do not limit the scope of protection of this invention. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0038] Example:
[0039] like Figure 1 As shown, a power grid fault location method based on generative adversarial networks includes the following steps:
[0040] S1. Obtain the cable fault dataset on the power grid line and construct the topology N = [J1, J2, ..., Jn] to represent the cable fault on the power grid line, where n is the node number of the cable fault point. Preprocess the cable fault dataset and divide it into a test set Tx and a training set Td.
[0041] Preprocessing the cable fault dataset includes the following steps:
[0042] Cable image data were collected from various detection points along the power grid line. The YOLOv5 target detection algorithm was used to identify targets in the acquired images and identify the cables in the images. The labelme tool was used to annotate the cables in the images.
[0043] Based on the location of the cable detection frame, the cable is extracted from the image to generate an image dataset.
[0044] In the feature extraction network H, the UNet segmentation network model is used to segment the corresponding cable features in the image dataset; the Mobilenet-V2 network is used as the backbone network of the UNet segmentation network model; the number of pixels of red insulating tape, the size of black protective layer and the number of pixels of bare cable are obtained by morphological operation method.
[0045] The UNet segmentation network model consists of an encoder and a decoder, where:
[0046] The encoder is responsible for feature extraction, downsampling the image four times to reduce the size of the original image and fully extract and compress the features. The decoder is responsible for upsampling the image, upsampling the extracted features four times, and fusing them with the corresponding channel number of the encoder part at the same scale after each upsampling, finally restoring the features to the original image size. The final result is the segmented image. The captured cable image is preprocessed to resize it to a uniform size. The preprocessed image is used as input to the UNet segmentation network model. After downsampling and upsampling, a fixed-size segmentation image is finally obtained.
[0047] The size calculation of the black protective layer includes the following steps:
[0048] Calculate the minimum circumscribed rectangle frame of the black protective layer, and obtain the long side and short side of the black protective layer rectangular frame,
[0049] Calculate the initial circumscribed rectangle A of the exposed cable area, and record the area S of the rectangle;
[0050] Calculate the point cluster of the exposed cable area by rotating the formula at an angle θ; calculate the circumscribed matrix frame of the point cluster after rotation, calculate the area of the matrix frame and compare the size with the area S, and assign the smaller area to S min ;
[0051] Rotate the point cluster by an angle β until the point cluster is rotated to 90 degrees, and calculate the area of the rectangular frame and update S min ;
[0052] Get the minimum circumscribed rectangle area S min corresponding to the rotation angle α; rotate the initial circumscribed rectangle A by an angle α, that is, obtain the minimum circumscribed rectangle.
[0053] The point cluster rotation formula is as follows:
[0054] x=x cos(θ)-y sin(θ)
[0055] y=x sin(θ)+y cos(θ)
[0056] Where, θ=θ+β, (x,y) is the pixel coordinates of the points in the point cluster, the initial value of angle θ is 0, and the angle step β is set to 1 degree.
[0057] S2, construct a generative adversarial network structure, the generative adversarial network structure includes a generative network G, a discriminative network D and a feature extraction network H; wherein the generative network G includes a convolutional layer, a deconvolutional layer, an LR layer and a B layer; the discriminative network D includes a convolutional layer, an LR layer and a B layer;
[0058] S3, extract the segmentation features of the training set Td through the feature extraction network H; obtain the number of red insulating tape pixels, the size of the black protective layer and the number of exposed cable pixels;
[0059] S4, input the segmentation features into the discriminative network D for feature comparison; based on the way of adversarial learning, iteratively train the generative network G and the discriminative network D; make the generative network G and the discriminative network D reach Nash equilibrium;
[0060] including the following steps:
[0061] The training set Td is preprocessed by the feature extraction network H to extract image feature data, the image feature data is input into the discrimination network D, the discrimination network D outputs the first true or false possibility Pf / r of the fault image and the intermediate layer feature parameter fmf / r = [fm0, fm1, fm2] of the network to ensure the reliability of network training;
[0062] In the process of generating the adversarial network, the generation network G generates the fault point Nfm corresponding to the labeled information according to the original training set Td, inputs the fault point Nfm into the discrimination network D, and outputs the fault possibility Pf of the fault point Nfm; inputs the discrimination fault node Jn into the discrimination network D, and outputs the real possibility Pr and the real feature parameter fmr = [fm0, fm1, fm2] of the discrimination fault node Jn; and updates the discrimination network parameter of the discrimination network D in time;
[0063] After the discrimination network D is updated, the fault point Nfm is input into the discrimination network D again, and the fault possibility Pf and the fault feature parameter fmf = [fm0, fm1, fm2] of the fault point Nfm are output; the real fault feature parameter is obtained, and the generation network parameter of the generation network G is immediately updated.
[0064] The formula for updating the discrimination network parameter of the discrimination network D is as follows:
[0065] lD = -(log(1-Pf) + log(Pr)).
[0066] The formula for updating the generation network parameter of the generation network G is as follows:
[0067] lG = -log(Pf) + Average((fmf-fmr)2),
[0068] Wherein, Average is the calculation of mean.
[0069] S5, input the test set Tx into the trained generation adversarial network for fault positioning detection.
[0070] The embodiment has the beneficial effects that the cable in the power grid line is selected as the detection object, the cable joint image data of the whole power grid is collected, the cable fault topology structure is made, the cable fault data set is generated, the image preprocessing is performed on the cable fault data set, the preprocessing is used as the input of the generation adversarial network, the generation network G and the discrimination network D are iteratively trained based on the adversarial learning mode; the generation network G and the discrimination network D reach Nash equilibrium, the generation adversarial network for power grid fault positioning is obtained after training, the detection result of the cable fault point in the power grid line is more rapid and accurate through the trained generation adversarial network, and the efficiency and reliability of the cable fault point positioning of the power grid are effectively improved.
[0071] The above specific embodiments are the preferred embodiments of the power grid fault positioning method based on the generative adversarial network, and are not intended to limit the specific implementation range of the present application. The scope of the present application includes but is not limited to the specific embodiments. Any equivalent changes made according to the shape and structure of the present application are within the protection scope of the present application.
Claims
1. A power grid fault location method based on generative adversarial networks, characterized in that: Includes the following steps: S1. Obtain the cable fault dataset on the power grid line and construct the topology N=[J1, J2, ..., Jn] to represent the cable fault on the power grid line, where n is the node number of the cable fault point. Preprocess the cable fault dataset and divide the cable fault dataset into a test set Tx and a training set Td. S2. Construct a generative adversarial network (GAN) structure, which includes a generative network G, a discriminative network D, and a feature extraction network H. S3. Extract segmentation features from the training set Td using the feature extraction network H; obtain the number of pixels of the red insulating tape, the size of the black protective layer, and the number of pixels of the exposed cable. S4 inputs the segmentation features into the discriminant network D for feature comparison; based on adversarial learning, iteratively trains the generator network G and the discriminant network D to achieve Nash equilibrium; S5. Input the test set Tx into the trained generative adversarial network for fault location detection; The formula for updating the generator network parameters of the generator network G is as follows: lG=-log(Pf)+Average((fmf-fmr)2), where Average is the calculated mean; In the feature extraction network H, the UNet segmentation network model is used to segment the corresponding cable features in the image dataset; the Mobilenet-V2 network is used as the backbone network of the UNet segmentation network model; the number of pixels of the red insulating tape, the size of the black protective layer, and the number of pixels of the exposed cable are obtained according to the morphological operation method. In S4, the training set Td is preprocessed by the feature extraction network H to extract image feature data. The image feature data is used as the input of the discrimination network D. The discrimination network D outputs the first true / false probability Pf / r of the fault image and the intermediate layer feature parameters fmf / r = [fm0, fm1, fm2] to ensure the reliability of network training. During the training of the generative adversarial network, the generative network G generates fault points Nfm based on the original training set Td and the corresponding labeled information. The fault point Nfm is input into the discriminant network D, and the fault probability Pf of the fault point Nfm is output. The fault node Jn is input into the discriminant network D, and the true probability Pr of the fault node Jn and the true feature parameters fmr = [fm0, fm1, fm2] are output. The discriminant network parameters of the discriminant network D are updated in a timely manner. After the identification network D is updated, the fault point Nfm is input into the identification network D again, and the fault probability Pf and fault characteristic parameters fmf = [fm0, fm1, fm2] of the fault point Nfm are output. The true fault characteristic parameters are obtained, and the generation network parameters of the generation network G are updated immediately.
2. The power grid fault location method based on generative adversarial networks according to claim 1, characterized in that: In S1, the preprocessing of the cable fault dataset includes the following steps: Cable image data were collected from various detection points along the power grid line. The YOLOv5 target detection algorithm was used to identify targets in the acquired images and identify the cables in the images. The labelme tool was used to annotate the cables in the images. Based on the location of the cable detection frame, the cable is extracted from the image to generate an image dataset.
3. The power grid fault location method based on generative adversarial networks according to claim 1, characterized in that: The UNet segmentation network model consists of an encoder and a decoder, where: The encoder is responsible for feature extraction. It downsamples the image four times and reduces the size of the original image to fully extract and compress the features in the original image. The decoder is responsible for upsampling the image. It upsamples the extracted features four times. Each time it upsamples, it merges the features with the corresponding channel number of the encoder part at the same scale. Finally, it restores the features to the original image size, and the final result is the segmented image. The captured cable images are preprocessed to resize them. The preprocessed images are then used as input to the UNet segmentation network model. After downsampling and upsampling, a fixed-size segmentation image is finally obtained.
4. The power grid fault location method based on generative adversarial networks according to claim 1, characterized in that: The formula for updating the discrimination network parameters of discrimination network D is as follows: lD = -(log(1-Pf)+log(Pr)).
5. A power grid fault location method based on generative adversarial networks according to claim 1 or 2, characterized in that: The size calculation for the black protective layer includes the following steps: Calculate the minimum bounding rectangle of the black protective layer to obtain the long and short sides of the black protective layer rectangle. Calculate the initial circumscribed rectangle A of the exposed cable area and record the area S of the rectangle; Calculated using the rotation formula in terms of angles Clusters of points in the exposed area of the rotating cable; Calculate the bounding box of the rotated point cluster, calculate the area of this bounding box and compare it with the area S, then assign the smaller area to S. min ; From the angle The step size is used until the point cluster is rotated to 90 degrees. The area of the rectangular frame is calculated iteratively and S is updated. min ; Find the area S of the minimum bounding rectangle min The corresponding rotation angle Rotate the initial circumscribed rectangle A in reverse order. The angle is used to obtain the smallest bounding rectangle.
Citation Information
Patent Citations
Insulator fault detection method and device based on adversarial learning, and terminal equipment
CN112927220A