Fault diagnosis method and device for power distribution network, terminal equipment and storage medium
Through digital twin technology and neural network model, the problem of low accuracy and efficiency in distribution network fault diagnosis is solved, and the rapid and accurate diagnosis of distribution network faults is achieved, and the safe operation of distribution network is ensured.
Patent Information
- Application Number
- CN202411112935.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-11-26
AI Technical Summary
Traditional mathematical models are difficult to accurately reflect the actual operating conditions of the distribution network, resulting in deviations in the fault diagnosis results, and the failure type cannot be determined quickly and accurately, which in turn affects the stable power supply of the distribution network.
Digital twin technology is used to obtain the digital twin model of the distribution network, and the model parameters are corrected through the nonlinear least squares optimization algorithm, fault characteristics are extracted and fault characteristics are constructed, and fault characteristics are undirected, and fault diagnosis is carried out in combination with neural network models.
It improves the efficiency and accuracy of fault diagnosis, reduces the need for manual monitoring, saves workload, and ensures the safe operation and stable power supply of the distribution network.
Smart Images

Figure CN119024097A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power grid technology, and in particular to a fault diagnosis method, device, terminal equipment and storage medium for a distribution network. Background Art
[0002] Based on traditional simulation modeling, digital twin technology has emerged. As a link between the physical world and the digital world, the digital twin's fusion mechanism and data modeling method have the potential to surpass previous models in terms of timeliness and accuracy. Therefore, digital twin technology has been widely used in the field of distribution networks, effectively improving the real-time, dynamic, accurate and scientific management of distribution networks.
[0003] With the rapid growth of power load in urban distribution networks and the increasing requirements for power reliability, the load scale has gradually increased and the topology of distribution networks has become more and more complex. In addition, with the access of distributed energy and the application of distributed power sources, the operation complexity of distribution networks has been greatly improved. For such a distribution network with a complex topology, if a systemic failure occurs, the consequences will be very serious and may even cause electrical accidents, causing huge losses to social life.
[0004] At present, due to the large number of distribution network facilities and lines, the manual timed monitoring and surveillance methods make the workload and labor intensity of personnel extremely high. In addition, when a distribution network fault occurs, traditional mathematical models are generally used to diagnose the fault. However, traditional mathematical models are often based on simplified assumptions and ideal conditions, which are difficult to accurately reflect the actual operating conditions of the distribution network, resulting in deviations in the diagnosis results. Therefore, the current mathematical model diagnosis method cannot quickly and accurately determine the type of fault, which makes it difficult for staff to quickly troubleshoot the fault to ensure the stable power supply of the distribution network. Therefore, how to quickly and accurately diagnose distribution network faults to ensure the stable power supply of the distribution network has become a problem that needs to be solved urgently. Summary of the invention
[0005] The embodiments of the present invention provide a method, an apparatus, a terminal device and a storage medium for fault diagnosis of a distribution network, which can effectively improve the efficiency and accuracy of fault diagnosis, thereby effectively ensuring the safe operation and stable power supply of the distribution network.
[0006] An embodiment of the present invention provides a method for diagnosing a fault in a power distribution network, comprising:
[0007] Acquire a digital twin model of a distribution network, and monitor the operating status of the distribution network according to the digital twin model;
[0008] When it is detected that the operating state is an abnormal state, extracting operating data of each device in the distribution network, and extracting fault characteristics from the operating data;
[0009] The fault characteristics are input into a preset fault diagnosis model so that the fault diagnosis model outputs the fault type of the power distribution network.
[0010] Furthermore, before obtaining the digital twin model of the distribution network, it also includes:
[0011] Constructing an initial digital twin model of the distribution network according to the topological structure of the distribution network, and establishing a communication connection between the initial digital twin model and each device in the distribution network;
[0012] When it is determined that the initial digital twin model has a model parameter error after connection, the initial digital twin model is corrected according to the model parameter error to generate the digital twin model.
[0013] Furthermore, the initial digital twin model is corrected according to the model parameter error to generate the digital twin model, including:
[0014] The initial digital twin model is repeatedly corrected by a nonlinear least squares optimization algorithm:
[0015] Δq k =(J(q k ) T J(q k )+u k I) -1 J(q k ) T ΔP(q k );
[0016] q k+1 =q k +Δq k ;
[0017]
[0018] Among them, Δq k is the model parameter error of the kth correction operation, J(q k ) is the parameter correction matrix of the kth correction operation; ΔP(q k ) is the position error of the kth correction operation; I is the unit matrix; u k is the adaptive damping coefficient of the kth correction operation; u0 is the initial damping coefficient; λ is the dimensionless iteration parameter; ‖ΔP(q k+1 )‖ is the second norm of the position error of the kth correction operation; ‖ΔP(q k )‖ is the second norm of the position error of the k+1th correction operation;
[0019] When it is determined that the difference between the bit norm of the position error of this correction operation and the bit norm of the position error of the previous correction operation is less than a preset threshold, it is determined that the initial digital twin model has been corrected, and the initial digital twin model corrected for the last time is used as the digital twin model.
[0020] Further, extracting fault features from the operation data includes:
[0021] Mapping the operating data of each device in the distribution network into a plurality of mapping vectors in a high-dimensional kernel space;
[0022] Constructing a fault feature undirected graph according to the plurality of mapping vectors;
[0023] There are several nodes in the fault feature undirected graph corresponding to any device in the distribution network, and the several nodes are connected according to the similarity of each device;
[0024] Calculating the eigenvalue of the mapping vector of each node according to the connection relationship of each node in the fault feature undirected graph, and constructing a mapping matrix according to the target mapping vector corresponding to the largest eigenvalue;
[0025] According to the mapping matrix, generate a number of orthogonal mapping vectors corresponding to the mapping vectors, and according to the orthogonal mapping vectors, generate a projection matrix;
[0026] The operation data is mapped into a low-dimensional space through the projection matrix, low-dimensional sensitive features corresponding to each operation data are generated, and a plurality of the low-dimensional sensitive features are used as the fault features.
[0027] Furthermore, constructing a fault feature undirected graph according to the plurality of mapping vectors includes:
[0028] Constructing an initial fault feature undirected graph according to the mapping vectors corresponding to each device in the distribution network;
[0029] There are several nodes in the initial fault feature undirected graph corresponding to any device in the distribution network, and the nodes are not connected;
[0030] According to the mapping vectors corresponding to each node, the similarity between the nodes is calculated;
[0031] Traversing a number of similarities, when the currently traversed similarity is greater than a preset similarity threshold, connecting two nodes corresponding to the currently traversed similarity;
[0032] When the traversal is completed, the fault feature undirected graph is generated.
[0033] Furthermore, the similarity between the nodes is calculated according to the mapping vectors corresponding to the nodes, including:
[0034] The similarity between nodes is calculated using the following formula:
[0035]
[0036] Among them, f i is the mapping vector of node i, f j is the mapping vector of node j, ‖f i ‖‖f j ‖ is the Euclidean norm of the mapping vector of node i and the mapping vector of node j, f i ·f j is the inner product of the mapping vector of node i and the mapping vector of node j.
[0037] Furthermore, the method for diagnosing a fault in a distribution network described in any one of the above embodiments of the invention further includes:
[0038] Construct a neural network model;
[0039] Acquire a number of historical operation data when a distribution network fault occurs, extract a number of historical fault features from the historical operation data, and construct training samples according to the number of historical fault features and the fault type corresponding to each historical fault feature;
[0040] The neural network model is trained with the historical fault features in the training samples as input and the fault types in the training samples as output, and the training of the neural network model is completed when a preset loss function converges to generate the fault diagnosis model.
[0041] Another embodiment of the present invention provides a fault diagnosis device for a power distribution network, comprising:
[0042] A state monitoring module, used to obtain a digital twin model of the distribution network and monitor the operating state of the distribution network according to the digital twin model;
[0043] A feature extraction module, used to extract the operating data of each device in the distribution network and extract fault features from the operating data when the operating state is detected to be an abnormal state;
[0044] The fault diagnosis module is used to input the fault characteristics into a preset fault diagnosis model so that the fault diagnosis model outputs the fault type of the distribution network.
[0045] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, a fault diagnosis method for a distribution network as described in any one of the embodiments is implemented.
[0046] Another embodiment of the present invention provides a storage medium, characterized in that the storage medium includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute a distribution network fault diagnosis method as described in any one of the above embodiments.
[0047] The following beneficial effects are achieved by implementing the present invention:
[0048] The present invention discloses a fault diagnosis method, device, terminal device and storage medium for a distribution network. The method monitors the operating status of the distribution network by a digital twin model, thereby avoiding the need for manual timed monitoring, saving a large amount of manual work and avoiding the possibility of human error. Furthermore, compared with the traditional mathematical model diagnosis method, the present invention performs fault diagnosis on the distribution network through a fault diagnosis model, which can effectively improve the efficiency and accuracy of fault diagnosis, and thus can effectively ensure the safe operation and stable power supply of the distribution network. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 It is a flow chart of a fault diagnosis method for a distribution network provided by an embodiment of the present invention.
[0050] Figure 2 It is a structural schematic diagram of a fault diagnosis device for a distribution network provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0053] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0054] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0055] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0056] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0057] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0058] See also Figure 1 , is a flow chart of a method for diagnosing a fault in a distribution network provided by an embodiment of the present invention, comprising:
[0059] S1. Obtain a digital twin model of a distribution network, and monitor the operating status of the distribution network according to the digital twin model;
[0060] In a preferred embodiment of the present invention, a data transmission and transfer function based on the UDP protocol is used to realize the connection between the digital twin model and the distribution network, so as to establish data transmission between the distribution network and the digital twin mapping model, so that the digital twin mapping model can monitor the operating status of the distribution network.
[0061] Preferably, before obtaining the digital twin model of the distribution network, the method further includes:
[0062] S01. Constructing an initial digital twin model of the distribution network according to the topological structure of the distribution network, and establishing a communication connection between the initial digital twin model and each device in the distribution network;
[0063] S02. When it is determined that the initial digital twin model has a model parameter error after connection, the initial digital twin model is corrected according to the model parameter error to generate the digital twin model.
[0064] Preferably, the correcting the initial digital twin model according to the model parameter error to generate the digital twin model includes:
[0065] S021. Repeat the correction operation on the initial digital twin model by using a nonlinear least squares optimization algorithm:
[0066] Δq k =(J(q k ) T J(q k )+u k I) -1 J(q k ) T ΔP(q k );
[0067] q k+1 =q k +Δq k ;
[0068]
[0069] Among them, Δq k is the model parameter error of the kth correction operation, J(q k ) is the parameter correction matrix of the kth correction operation; ΔP(q k ) is the position error of the kth correction operation; I is the unit matrix; u k is the adaptive damping coefficient of the kth correction operation; u0 is the initial damping coefficient; λ is the dimensionless iteration parameter; ‖ΔP(q k+1 )‖ is the second norm of the position error of the kth correction operation; ‖ΔP(q k)‖ is the second norm of the position error of the k+1th correction operation;
[0070] S022. When it is determined that the difference between the bit norm of the position error of this correction operation and the bit norm of the position error of the previous correction operation is less than a preset threshold, it is determined that the initial digital twin model has been corrected, and the initial digital twin model corrected for the last time is used as the digital twin model.
[0071] In a preferred embodiment of the present invention, in the process of establishing a digital twin mapping model, the traditional digital twin modeling method is generally implemented through physical or digital drive. In practical applications, due to the complex topological structure of the distribution network, it is relatively difficult to establish a digital twin mapping model using a physical method. Therefore, the present invention uses a data-driven method to capture the operating parameters of the distribution network to achieve the establishment of a digital twin mapping model. Specifically, in an embodiment of the present invention, it is first necessary to obtain the time series data of the distribution network, where the time series data includes the current information and voltage information of the distribution network nodes;
[0072] The calculation of the digital twin mapping model is carried out in Visual Studio (hereinafter referred to as VS software). In the specific implementation, the time series data of the distribution network is imported into the VS software. In the VS software, the imported time series data is used to start building a digital twin model before / after the fault. This model is a virtual copy of the distribution network, which can simulate the operating status and behavior of the distribution network and identify abnormal patterns in the distribution network by analyzing the time series data. Subsequently, the model is repeatedly run in the VS software to verify its accuracy and stability. Each time it is run, the digital twin model will update parameters and adjust the state to ensure its synchronization with the physical distribution network. This repeated operation process is a process of self-learning and optimization of the model. During the model operation, the VS software provides powerful computing support and can process and analyze a large amount of real-time data. These data are output through the distribution network communication interface, realizing the connection between the digital twin model and the physical distribution network. The communication interface is the key to realizing two-way data transmission. It allows the digital twin model to receive real-time data from the distribution network and feed back the analysis results to the distribution network to realize closed-loop control.
[0073] Further, when it is determined that the initial digital twin model has a model parameter error after connection, the parameter error of the initial digital twin model is calculated: q k+1 =q k +Δq k ;
[0074] Then the k+1th adaptive damping coefficient is automatically updated and expressed as:
[0075]
[0076] Furthermore, when ∥ΔP(q k+1 )∥-∥ΔP(q k )∥≤ε(ε=0.001), when the difference in the position error norms of adjacent iterative processes tends to 0, the initial digital twin model is considered to have converged, the initial digital twin model correction is completed, and the initial digital twin model corrected for the last time is used as the digital twin model.
[0077] S2. When it is detected that the operating state is an abnormal state, extracting operating data of each device in the distribution network, and extracting fault characteristics from the operating data;
[0078] Preferably, extracting fault features from the operating data includes:
[0079] S21, mapping the operation data of each device in the distribution network into a plurality of mapping vectors in a high-dimensional kernel space;
[0080] In a preferred embodiment of the present invention, before converting the fault data set to the high-order core space, data related to the distribution network equipment faults are first collected, including voltage, current, power, temperature, historical fault records, etc., to construct a sample data set; and also includes a process of preprocessing the above data set, including cleaning the data, removing missing values and outliers; and performing feature standardization or normalization to eliminate the influence of different dimensions.
[0081] Furthermore, a nonlinear mapping function of a Gaussian radial basis function kernel is used to map the collected data into a high-dimensional feature space, where the mapping function is expressed as: λ represents the parameter of the kernel function, which controls the width of the kernel function, e represents the base of the natural logarithm, and ‖xx′‖ represents the Euclidean distance between two data samples; further, the kernel matrix is calculated. For each pair of data samples x in the data set i and x j , calculate the kernel matrix K(x i ,x j ), the kernel matrix is defined as: K ij =K(x i ,x j )=φ(x i )·φ(x j );
[0082] Finally, the operating data of each device in the distribution network is mapped into a number of mapping vectors in a high-dimensional kernel space through the kernel matrix.
[0083] S22, constructing a fault feature undirected graph according to the plurality of mapping vectors;
[0084] There are several nodes in the fault feature undirected graph corresponding to any device in the distribution network, and the several nodes are connected according to the similarity of each device;
[0085] Preferably, constructing a fault feature undirected graph according to the plurality of mapping vectors comprises:
[0086] S221. Construct an initial fault feature undirected graph according to the mapping vectors corresponding to each device in the distribution network;
[0087] There are several nodes in the initial fault feature undirected graph corresponding to any device in the distribution network, and the nodes are not connected;
[0088] S222, calculating the similarity between the nodes according to the mapping vectors corresponding to the nodes;
[0089] Preferably, the calculating the similarity between the nodes according to the mapping vectors corresponding to the nodes includes:
[0090] S2221. Calculate the similarity between nodes using the following formula:
[0091]
[0092] Among them, f i is the mapping vector of node i, f j is the mapping vector of node j, ‖f i ‖‖f j ‖ is the Euclidean norm of the mapping vector of node i and the mapping vector of node j, f i ·f j is the inner product of the mapping vector of node i and the mapping vector of node j.
[0093] S223, traversing a number of similarities, and when the currently traversed similarity is greater than a preset similarity threshold, connecting two nodes corresponding to the currently traversed similarity;
[0094] S224. When the traversal is completed, the fault feature undirected graph is generated.
[0095] In a preferred embodiment of the present invention, the mapped data is used to construct an undirected graph of fault characteristics, in which a node represents a single device and an edge represents the similarity or association between devices; for each distribution network device, the mapping vector is expressed as: i =[f i1 , f i2 , ..., f in ], where f inRepresents the nth feature of device i; selects the cosine similarity calculation method to calculate the similarity of the distribution network devices of each adjacent node. According to the calculated similarity, if the similarity between two distribution network devices exceeds a preset threshold, an edge is established between the corresponding two nodes in the undirected graph.
[0096] S23, calculating the eigenvalue of the mapping vector of each node according to the connection relationship of each node in the fault feature undirected graph, and constructing a mapping matrix according to the target mapping vector corresponding to the largest eigenvalue;
[0097] S24, generating a number of orthogonal mapping vectors corresponding to the mapping vectors according to the mapping matrix, and generating a projection matrix according to the orthogonal mapping vectors;
[0098] S25. Mapping the operation data into a low-dimensional space through the projection matrix, generating low-dimensional sensitive features corresponding to each operation data, and using a plurality of the low-dimensional sensitive features as the fault features.
[0099] In a preferred embodiment of the present invention, the mapping vector corresponding to the maximum eigenvalue can tell us the main direction of change of the running data in the kernel space; therefore, by selecting the eigenvector corresponding to the largest eigenvalue, a matrix can be constructed, the columns of which are orthogonal, and can be used to map the data (mapping matrix) to a new feature subspace. In the principal component analysis method (PCA), the orthogonal mapping vectors can be decomposed by the eigenvalues of the covariance matrix or the correlation matrix to obtain a set of eigenvectors. These eigenvectors correspond to the principal components in the data, they are orthogonal, and are arranged in descending order according to the corresponding eigenvalues (variances); the mapping vector refers to the representation of the original data in the new feature space. In PCA, each point of the original data can be mapped to the new space through these eigenvectors.
[0100] Furthermore, the projection matrix is obtained by performing eigenvalue decomposition of the covariance matrix or the correlation matrix through the orthogonal mapping vector, which is used to map the data from the original space to the low-dimensional space. The low-dimensional embedding calculation uses the original data and finds the representation of the data in the low-dimensional space through the principal component analysis method. These representations can capture the main change trends of the data, that is, the low-dimensional sensitive features. The low-dimensional sensitive features are used as the compressed representation of the original data and are used for fault diagnosis.
[0101] The low-dimensional sensitive features are obtained through the following steps: the covariance matrix or correlation matrix of the original data set is calculated, the eigenvalues and eigenvectors of the matrix are solved, and the eigenvectors corresponding to the first few eigenvalues are selected according to the size of the eigenvalues. These eigenvectors define the basis of the low-dimensional space, and a projection matrix is constructed, whose columns are the transpose of the selected eigenvectors. The original data is projected into this low-dimensional space, and the new coordinates of the data points obtained are the low-dimensional sensitive features.
[0102] Preferably, in the process of obtaining the maximum eigenvalue of the mapping vector through the operation of the mapping matrix, this embodiment includes the step of using an intermediate matrix and a diagonal matrix to obtain the maximum eigenvalue of the mapping vector, wherein the intermediate matrix represents a transition matrix used in the eigenvalue decomposition process; the diagonal matrix is a square matrix with non-zero elements only on the diagonal, and in the eigenvalue decomposition, the diagonal matrix contains all eigenvalues; specifically, through the mapping matrix, the original data is converted to a new feature space, in this new space, we calculate the eigenvalue decomposition of the covariance matrix or the data matrix, which involves finding an intermediate matrix and performing eigenvalue decomposition on it, and the result of the decomposition is a diagonal matrix, which contains eigenvalues, and an eigenvector matrix whose columns are the corresponding eigenvectors, and the eigenvector corresponding to the largest eigenvalue is the maximum eigenvalue of the mapping vector, which represents the most significant direction in the new feature space.
[0103] S3. Input the fault characteristics into a preset fault diagnosis model so that the fault diagnosis model outputs the fault type of the distribution network.
[0104] Preferably, the method for diagnosing a fault in a distribution network described in the above-mentioned embodiment of the invention further includes:
[0105] Step a, constructing a neural network model;
[0106] In a preferred embodiment of the present invention, the neural network model includes a convolution layer, a pooling layer and a fully connected layer. The convolution layer performs a convolution operation on the input data. The convolution operation includes multiplying the input data elements with the corresponding weights and adding a bias vector. The convolution operation is expressed as: i =f(x i *w i +b i ), where y i represents the output data of the i-th layer convolution operation, f represents the activation function of the convolution operation, and the activation function is the linear function ReLU; x i is the input data, w i is the weight, b i represents the bias vector; * represents the convolution operation.
[0107] Furthermore, the present invention obtains local features of the model input data through convolution operation; then performs a pooling operation on the output data in a pooling layer. In the pooling layer, a maximum pooling method is selected to perform maximum pooling processing on the local features of the input model. The pooling operation is expressed as:
[0108] y′ max =max(y i,j ) i,j∈R;
[0109] Where R represents the pooling area, y′ max Represents the output data of the pooling layer under the maximum pooling method.
[0110] Accordingly, in order to prevent the network model from being overfitted due to excessive output weight parameters of the fully connected layer, the pooling operation of the pooling layer of the present invention also includes average pooling processing, and the average pooling operation is expressed as:
[0111] y′ mean =mean(y i,j ) i,j∈R;
[0112] Where R represents the pooling area, y′ mean Represents the output data of the pooling layer under the average pooling method.
[0113] It should be further explained that, due to the output data y′ of the pooling layer in the maximum pooling mode max For high-dimensional data, in order to convert the high-dimensional features into one-dimensional vectors and output them to the fully connected layer, the neural network model of this embodiment includes a Flatten layer, which is used to expand the output data from the pooling layer under the maximum pooling mode, and input the expanded data to the fully connected layer. The fully connected layer outputs low-dimensional data, and then uses a Dense layer with a Softmax activation function for multi-classification tasks as the output layer. The Dense layer is composed of 256 neurons and an activation function combined with L2 regularization and RELU function.
[0114] Step b, obtaining a number of historical operation data when a distribution network fault occurs, extracting a number of historical fault features from the historical operation data, and constructing training samples according to the number of historical fault features and the fault types corresponding to each historical fault feature;
[0115] Step c: using the historical fault features in the training samples as input and the fault types in the training samples as output to train the neural network model, and when a preset loss function converges, completing the training of the neural network model, generating the fault diagnosis model.
[0116] In a preferred embodiment of the present invention, a loss function and an optimizer of a neural network model are selected, model hyperparameters other than the learning rate in the model are fixed, the neural network model is trained using a training sample set, a selection range of the learning rate is determined, and different initial learning rates are tried through a loss curve. If the loss curve stabilizes at a certain value or shows slight oscillations, and the corresponding accuracy is lower than the expected level, the learning rate is reinitialized until the loss curve converges, and finally a fault prediction model that meets the requirements is obtained, and the fault type of the distribution network equipment is output;
[0117] Specifically, the initialized learning rate remains unchanged during the model training process, and the fine-tuning process of the learning rate is performed before the model training. Specifically, in the fine-tuning of the learning rate in the present invention, the selection range of the learning rate is first limited to a range interval, and illustratively, the range interval is 0.001-0.00001, and different initial learning rates are explored by observing the loss curve; prevent falling into a local optimal value due to a too small learning rate, if the loss curve stabilizes at a certain value or shows slight oscillation, and the corresponding accuracy is lower than the expected level, then reinitialize the learning rate until the loss curve converges;
[0118] Furthermore, the present embodiment reinitializes the learning rate until the loss curve converges, specifically including increasing the learning rate in the case of slow convergence; and reducing the learning rate when fast convergence is destroyed by oscillation until the accuracy meets the requirements. Furthermore, after training the neural network model, the present embodiment fine-tunes the learning rate parameters of the model so that the neural network model meets the requirements, completes the model training, and obtains a fault diagnosis model for distribution network fault prediction.
[0119] It should be further explained that in the process of training the neural network model, for the selection of the loss function, the present invention selects an improved cross entropy loss function, wherein the neural network model of the present invention calculates the confidence of each classification result based on the Softmax function after entering the Softmax classification layer:
[0120]
[0121] Among them, p i Indicates the confidence of predicting the class, i represents the sample number, z i Represents the output of the model in the fully connected layer, k represents the category number, and N represents the total number of categories.
[0122] Furthermore, the present invention determines the loss function of the neural network model of the present invention and the cross entropy loss function by calculating the degree of information differentiation between the model prediction results and the actual results;
[0123]
[0124] Among them, H(p,q) is the cross entropy value; p(x i ) represents the true probability distribution of the sample, q(x i ) represents the predicted probability distribution of the sample;
[0125] Furthermore, the process of training the neural network model also includes the selection of an optimizer. Specifically, the objective function of this embodiment compares the predicted results with the real data to determine the similarity, and then uses the gradient descent algorithm to optimize the weights to minimize the objective function and record the network parameters under different states. At this time, the trained neural network model can be used for fault diagnosis and prediction of the distribution network.
[0126] Furthermore, the embodiment also includes a data preprocessing step, wherein data preprocessing is one of the key steps in applying the neural network model to distribution network fault diagnosis. Through data preprocessing, the availability of data and the generalization ability of the network can be improved.
[0127] Specifically, the data preprocessing process of this embodiment includes using a data cleaning method to remove noise and outliers to improve the purity of the data; secondly, using a normalization method to normalize the data to a reasonable range to avoid the problem of uneven data distribution.
[0128] This embodiment provides a fault diagnosis method for a distribution network. By using a digital twin model to monitor the operating status of the distribution network, the need for manual timed monitoring is avoided, a large amount of manual work is saved, and the possibility of human error is avoided. Furthermore, compared with the traditional mathematical model diagnosis method, the present invention uses a fault diagnosis model to diagnose the distribution network, which can effectively improve the efficiency and accuracy of fault diagnosis, and thus effectively ensure the safe operation and stable power supply of the distribution network.
[0129] See also Figure 2 , is a schematic diagram of a structure of a fault diagnosis device for a distribution network provided by an embodiment of the present invention, comprising:
[0130] A state monitoring module, used to obtain a digital twin model of the distribution network and monitor the operating state of the distribution network according to the digital twin model;
[0131] A feature extraction module, used to extract the operating data of each device in the distribution network and extract fault features from the operating data when the operating state is detected to be an abnormal state;
[0132] The fault diagnosis module is used to input the fault characteristics into a preset fault diagnosis model so that the fault diagnosis model outputs the fault type of the distribution network.
[0133] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0134] Those skilled in the art can clearly understand that for the sake of convenience and brevity, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0135] Another preferred embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, a fault diagnosis method for a distribution network as described in any one of the above embodiments is implemented.
[0136] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0137] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and various interfaces and lines are used to connect the various parts of the entire terminal device.
[0138] The memory can be used to store the computer program, and the processor realizes various functions of the terminal device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0139] Another preferred embodiment of the present invention provides a storage medium, the storage medium is a computer-readable storage medium, the computer program is stored in the computer-readable storage medium, and the computer program, when executed by the processor, can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0140] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A fault diagnosis method for a distribution network, characterized in that: include: Acquire a digital twin model of a distribution network, and monitor the operating status of the distribution network according to the digital twin model; When it is detected that the operating state is an abnormal state, extracting operating data of each device in the distribution network, and extracting fault characteristics from the operating data; The fault characteristics are input into a preset fault diagnosis model so that the fault diagnosis model outputs the fault type of the power distribution network.
2. A method for diagnosing a fault in a distribution network as claimed in claim 1, characterized in that: Before obtaining the digital twin model of the distribution network, it also includes: Constructing an initial digital twin model of the distribution network according to the topological structure of the distribution network, and establishing a communication connection between the initial digital twin model and each device in the distribution network; When it is determined that the initial digital twin model has a model parameter error after connection, the initial digital twin model is corrected according to the model parameter error to generate the digital twin model.
3. A method for diagnosing a fault in a distribution network as claimed in claim 2, characterized in that: The step of correcting the initial digital twin model according to the model parameter error to generate the digital twin model includes: The initial digital twin model is repeatedly corrected by a nonlinear least squares optimization algorithm: Δq k =(J(q k ) T J(q k )+u k I) -1 J(q k ) T ΔP(q k ); q k+1 =q k +Δq k ; Among them, Δq k is the model parameter error of the kth correction operation, J(q k ) is the parameter correction matrix of the kth correction operation; ΔP(q k ) is the position error of the kth correction operation; I is the unit matrix; u k is the adaptive damping coefficient of the kth correction operation; u0 is the initial damping coefficient; λ is the dimensionless iteration parameter; ‖ΔP(q k+1 )‖ is the second norm of the position error of the kth correction operation; ‖ΔP(q k )‖ is the second norm of the position error of the k+1th correction operation; When it is determined that the difference between the bit norm of the position error of this correction operation and the bit norm of the position error of the previous correction operation is less than a preset threshold, it is determined that the initial digital twin model has been corrected, and the initial digital twin model corrected for the last time is used as the digital twin model.
4. A method for diagnosing a fault in a distribution network as claimed in claim 3, characterized in that: The extracting fault characteristics from the operation data includes: Mapping the operating data of each device in the distribution network into a plurality of mapping vectors in a high-dimensional kernel space; Constructing a fault feature undirected graph according to the plurality of mapping vectors; There are several nodes in the fault feature undirected graph corresponding to any device in the distribution network, and the nodes are connected according to the similarity of the devices they correspond to; Calculating the eigenvalue of the mapping vector of each node according to the connection relationship of each node in the fault feature undirected graph, and constructing a mapping matrix according to the target mapping vector corresponding to the largest eigenvalue; According to the mapping matrix, generate a number of orthogonal mapping vectors corresponding to the mapping vectors, and according to the orthogonal mapping vectors, generate a projection matrix; The operation data is mapped into a low-dimensional space through the projection matrix, low-dimensional sensitive features corresponding to each operation data are generated, and a plurality of the low-dimensional sensitive features are used as the fault features.
5. A method for diagnosing a fault in a distribution network as claimed in claim 4, characterized in that: The step of constructing a fault feature undirected graph according to the plurality of mapping vectors comprises: Constructing an initial fault feature undirected graph according to the mapping vectors corresponding to each device in the distribution network; There are several nodes in the initial fault feature undirected graph corresponding to any device in the distribution network, and the nodes are not connected; According to the mapping vectors corresponding to each node, the similarity between the nodes is calculated; Traversing a number of similarities, when the currently traversed similarity is greater than a preset similarity threshold, connecting two nodes corresponding to the currently traversed similarity; When the traversal is completed, the fault feature undirected graph is generated.
6. A method for diagnosing a fault in a distribution network as claimed in claim 5, characterized in that: The calculating the similarity between the nodes according to the mapping vectors corresponding to the nodes includes: The similarity between nodes is calculated using the following formula: Among them, f i is the mapping vector of node i, f j is the mapping vector of node j, ‖f i ‖‖f j ‖ is the Euclidean norm of the mapping vector of node i and the mapping vector of node j, f i ·f j is the inner product of the mapping vector of node i and the mapping vector of node j.
7. A method for diagnosing a fault in a distribution network as claimed in claim 6, characterized in that: Also includes: Construct a neural network model; Acquire a number of historical operation data when a distribution network fault occurs, extract a number of historical fault features from the historical operation data, and construct training samples according to the number of historical fault features and the fault type corresponding to each historical fault feature; The neural network model is trained with the historical fault features in the training samples as input and the fault types in the training samples as output, and the training of the neural network model is completed when a preset loss function converges to generate the fault diagnosis model.
8. A fault diagnosis device for a distribution network, characterized in that: include: A state monitoring module, used to obtain a digital twin model of the distribution network and monitor the operating state of the distribution network according to the digital twin model; A feature extraction module, used to extract the operating data of each device in the distribution network and extract fault features from the operating data when the operating state is detected to be an abnormal state; The fault diagnosis module is used to input the fault characteristics into a preset fault diagnosis model so that the fault diagnosis model outputs the fault type of the distribution network.
9. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, a fault diagnosis method for a distribution network as claimed in any one of claims 1 to 7 is implemented.
10. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is executed, the device where the storage medium is located is controlled to execute a fault diagnosis method for a distribution network as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
A multi-scale OGLPE feature extraction method applied to inverter faults
CN109815934A
Transformer fault diagnosis system and method based on digital twinning
CN112684379A
Power battery fault diagnosis and prediction method based on digital twinning
CN115236523A
Power distribution network fault diagnosis method, device and equipment and readable storage medium
CN117993274A
Identification of uncommon objects in containers
US20160335524A1
Cited By
Power distribution communication network fault repairing method and device, terminal equipment and computer readable storage medium
CN119544603A
10 kilovolt power distribution network fault detection method and system based on Internet of Things
CN121637718A
