Power distribution network fault risk early warning method based on improved Transform model
Through the improved Transformer model, the problem of failure risk warning in the distribution network is solved, and the problem of difficulty in realizing intelligent and accurate fault warning in the existing technology is solved, the accuracy of fault identification and pre-warning capabilities are improved, and power outage accidents and operation and maintenance losses are reduced.
Patent Information
- Application Number
- CN202411890423.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-05-16
AI Technical Summary
It is difficult for existing distribution network fault monitoring systems to achieve intelligent and precise fault warning and positioning, and traditional methods are difficult to capture the complex dependencies and long-term trends in the distribution network, resulting in difficulties in fault warning and handling.
Using the improved Transformer model, by collecting and preprocessing the operating status data and historical fault data of the distribution network, building the Transformer model and training it, and deploying it in the distribution network monitoring system to achieve real-time monitoring and early warning.
It improves the accuracy of fault identification, realizes pre-warning of fault risks, reduces power outages and operation and maintenance losses, and improves the operating efficiency and reliability of the distribution network.
Smart Images

Figure CN120013225A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an early warning method, and in particular to a distribution network failure risk early warning method based on an improved Transformer model. Background Art
[0002] As the end of the power system, the distribution network undertakes the important task of safely and reliably transmitting electric energy from the high-voltage power grid to the end user. With the development of social economy and the acceleration of urbanization, the demand for electricity continues to grow, and the stability and reliability of the distribution network have become the focus of attention of the power industry and the public. The operation of the distribution network directly affects the quality of electricity consumption of users. Therefore, improving the operation reliability and fault handling capability of the distribution network is an important research topic in the power industry.
[0003] In the process of building new power systems, with the high proportion of distributed power sources, pulse loads, and power electronic equipment connected, as well as the increase in uncertainty of power, load, and spatiotemporal states, traditional monitoring and maintenance methods are difficult to meet current needs. At present, the intelligent fault monitoring system of the distribution network usually monitors information such as partial discharge, sheath circulation, and fault traveling waves. These monitoring information are scattered, the reliability of the analysis results is poor, and the comprehensive utilization rate of data is low. It is difficult to guide the operation and maintenance personnel to quickly carry out fault handling work intelligently and accurately. In addition, with the construction of new power systems, the uncertainty of both sides of the source and load increases, the operating status changes frequently, and the control decision variables increase. It is difficult to accurately identify and deduce faults by using traditional methods to analyze the power operation mechanism. It is impossible to fully explore the node relationship under the topological structure of the distribution network, and the mutual influence between the feeders between the equipment in the distribution network with different environmental information in the physical space, which makes it difficult to warn, identify, locate and troubleshoot power grid faults.
[0004] At present, the distribution network mainly relies on post-fault inspection and repair for maintenance. It is difficult to detect and control risks in time before power outages and other accidents occur. The equipment status and meteorological factors in the distribution network are important causes of distribution network failures. However, the use of traditional methods is difficult to provide a scientific basis for the risk prevention and control of distribution network safety accidents, and it is impossible to fully tap the growing massive operation and maintenance data of the distribution network, and the role of on-site guidance is not strong. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a distribution network fault risk warning method based on an improved Transformer model to improve the accuracy of fault identification and achieve advance warning of fault risks, thereby reducing power outages and operation and maintenance losses.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] A distribution network fault risk early warning method based on an improved Transformer model, characterized by comprising the following steps:
[0008] (1) Collecting the operating status data and historical fault data of the distribution network, and preprocessing the collected data, including outlier processing and normalization processing;
[0009] (2) Classify the fault levels of the distribution network area and assign the preprocessed data points to different risk levels;
[0010] (3) Construct a Transformer model and train the constructed Transformer model;
[0011] (4) The trained model is deployed in the distribution network monitoring system, and the warning threshold is set to realize real-time monitoring and early warning of the distribution network status; if the model output exceeds the warning threshold, the system will issue an early warning to prompt the operation and maintenance personnel to conduct inspections or take preventive measures.
[0012] As a further preference, the data collected in step (1) includes physical quantities such as voltage, current, power, load, temperature and humidity.
[0013] As a further preference, the outlier processing in step (1) uses the standard deviation method, that is, if |x-μ|>kσ, then x is an outlier; where μ is the mean, σ is the standard deviation, and k is a threshold constant, which is usually 3.
[0014] As a further preference, the formula for the normalization process in step (1) is:
[0015] x′=(x-min(x)) / (max(x)-min(x)), used to scale the eigenvalue x to the interval [0,1];
[0016] In the above formula, x represents an eigenvalue in the original data, min(x) represents the minimum value of the eigenvalue in the data set; max(x) represents the maximum value of the eigenvalue in the data set; x′ represents the normalized eigenvalue, that is, the result of the original eigenvalue x after normalization.
[0017] As a further preference, the step (2) specifically comprises:
[0018] 2.1. Taking the urban area as the division unit, the frequency of faults in the area and the duration of power outages caused by faults are taken into consideration. Based on this, the distribution network is divided into four distribution network risk fault levels: mild, moderate, severe and emergency;
[0019] 2.2. Use the K-means clustering algorithm to assign the preprocessed data points to different risk levels, complete the fault level classification of the distribution network area in the data set, and label the data.
[0020] As a further preference, the K-means clustering algorithm formula is:
[0021] C(x)=argmin 1≤k≤K ||x-μ k ||;
[0022] In the above formula, C(x) is the risk level category of point x, x represents the data point to be classified, that is, the preprocessed multidimensional feature vector, including physical quantities such as voltage, current, power, load, temperature, humidity, etc.; μ k is the center position of all points in the kth cluster, and a cluster is a set of sample points in the data set.
[0023] As a further preferred embodiment, when constructing the Transformer model in step (3), the preprocessed data is used as input to form a set of input vectors; the input vectors are passed through the hidden layer of the neural network to obtain Q, K, and V vectors respectively, and the self-attention mechanism is used to obtain the Q, K, and V vectors. To capture the complex relationship in the data; according to the above formula, we get the vector Attention(Q,K,V), which is input into the LSTM unit through the Dropout layer, and the final model outputs the prediction;
[0024] The Q vector represents an element in the currently processed input sequence; the K vector works with the corresponding Q vector to determine the degree of association between each element in the input sequence and other elements; the V vector contains the actual content of each information point in the input sequence; is the square root of the dimension of the K vector and is used to scale the result of the dot product.
[0025] As a further preferred embodiment, when training the constructed Transformer model, the constructed Transformer model is trained using physical quantities such as voltage, current, power, load, temperature, humidity, etc. as the input of the model, and the regional fault level of the distribution network as the output of the model;
[0026] In the training phase, the mean-square error (MSE) is used as the loss function to quantify the accuracy of the model prediction, and the model parameters are adjusted by the gradient descent optimization algorithm to minimize the prediction error. The calculation formula of the mean-square error (MSE) is:
[0027] where y i Indicates the actual value of the fault risk level at a certain point in time or in a certain area; The model-predicted value representing the failure risk level predicted by the model.
[0028] As a further preferred embodiment, the setting formula of the warning threshold is: threshold = μ + kσ;
[0029] Among them, μ represents the mean of the data set, that is, the average value of all data points; σ represents the standard deviation of the data set; k is a constant used to determine the standard deviation multiple of the threshold distance mean, usually k = 2 or 3.
[0030] The beneficial effects of the present invention are:
[0031] 1. The present invention adopts an improved Transformer deep learning model to more accurately identify fault modes and risk factors from a large amount of operating data. This model uses self-attention mechanism and long-term memory ability to effectively capture complex dependencies and long-term trends in the distribution network, thereby improving the accuracy of fault prediction.
[0032] 2. Through in-depth analysis of historical fault data and real-time monitoring data, the present invention can predict potential fault risks and issue early warnings. This changes the traditional post-maintenance model, realizes data-driven pre-risk prevention and control, and reduces the occurrence of power outages.
[0033] 3. The present invention can reduce power outage time and improve fault handling speed, directly improving the operating efficiency of the distribution network. At the same time, accurate fault warning and positioning capabilities also enhance the reliability of the system and ensure the stability of power supply.
[0034] 4. This invention significantly improves the intelligence level of the power system by applying advanced deep learning technology to the fault risk warning and management of the distribution network. This provides strong technical support for the digital and intelligent transformation of the power industry.
[0035] The technical solution of the present invention effectively solves the technical problems in the risk warning and processing of distribution network faults through a series of innovative methods and improvement measures, bringing about many beneficial effects such as improving the accuracy of fault identification, realizing pre-risk prevention and control, optimizing the operation and maintenance process, improving the operating efficiency and reliability of the distribution network, reducing the operation and maintenance costs, enhancing the generalization capability of the system, improving the intelligence level of the power system, and having a wide range of promotion and application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a flow chart of the present invention.
[0037] Figure 2 It is a schematic diagram of the Transformer model constructed by the present invention. DETAILED DESCRIPTION
[0038] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0039] Reference Figures 1-2 As shown, the present invention relates to a distribution network fault risk early warning method based on an improved Transformer model, comprising the following steps:
[0040] 1. Data collection and preprocessing;
[0041] The data collection includes collecting the operating status data and historical fault data of the distribution network, specifically including characteristic values of physical quantities such as voltage, current, power, load, temperature, humidity, etc.;
[0042] The preprocessing includes performing outlier processing and normalization processing on the collected data in sequence; for removing data outliers and scaling the eigenvalue x to the interval [0,1];
[0043] The outlier processing uses the standard deviation method, that is, if |x-μ|>kσ, then x is an outlier; where x represents the characteristic value of the collected data, μ is the mean, σ is the standard deviation, and k is a threshold constant, which is usually 3;
[0044] The formula for the normalization process is:
[0045] x′=(x-min(x)) / (max(x)-min(x));
[0046] In the above formula, x represents an eigenvalue in the original data, min(x) represents the minimum value of the eigenvalue in the data set, which is the minimum value of all x values in the data set; max(x) represents the maximum value of the eigenvalue in the data set, which is the maximum value of all x values in the data set; x′ represents the normalized eigenvalue, that is, the result of the original eigenvalue x after normalization.
[0047] 2. Classify the fault levels of the distribution network area and assign the pre-processed data points to different risk levels; specifically:
[0048] 2.1. Taking the urban area as the division unit, the frequency of faults in the area and the duration of power outages caused by faults are taken into consideration. Based on this, the distribution network area is divided into four distribution network risk fault levels: mild, moderate, severe and emergency;
[0049] 2.2. Use the K-means clustering algorithm to assign the preprocessed data points to different risk levels, complete the fault level classification of the distribution network area in the data set, and label the data; the K-means clustering algorithm formula is:
[0050] C(x)=argmin 1≤k≤K ||x-μ k ||;
[0051] In the above formula, C(x) is the risk level category of point x, and point x represents the data point to be classified, that is, the multidimensional feature vector after preprocessing, including physical quantities such as voltage, current, power, load, temperature, humidity, etc.; μ k is the center position of all points in the kth cluster, and a cluster is a set of sample points in the data set.
[0052] 3. After processing the data and classifying the fault levels, an improved Transformer model is designed and established, introducing long-term memory and sticky memory mechanisms to address the limitations of the traditional Transformer model in dealing with long-term dependencies, such as Figure 2 As shown; and train the constructed Transformer model; specifically including:
[0053] 3.1. Take the preprocessed data as input to form a set of input vectors. The input vectors are passed through the hidden layer of the neural network to obtain Q, K, and V vectors respectively. To capture the complex relationship in the data; according to the above formula, we get the vector Attention(Q,K,V), which is input into the LSTM unit for processing through the Dropout layer, and the final model outputs the prediction;
[0054] The Q vector represents an element in the currently processed input sequence; the K vector works with the corresponding Q vector to determine the degree of association between each element in the input sequence and other elements; the V vector contains the actual content of each information point in the input sequence; It is the square root of the dimension of the K vector, which is used to scale the result of the dot product and stabilize the training process;
[0055] The LSTM (long short-term memory) unit is used to enhance the model's ability to process time series data, and to compensate for the Transformer's problems of information loss and insufficient capture of dependencies. The self-attention mechanism enables the model to dynamically allocate different attention levels between different positions in the sequence, allowing the model to capture long-distance dependencies within the sequence.
[0056] 3.2. Take voltage, current, power, load, temperature, humidity and other physical quantities as the input of the model, and the regional fault level of the distribution network as the output of the model to train the constructed Transformer model;
[0057] In the training phase, the mean-square error (MSE) is used as the loss function to quantify the accuracy of the model prediction, and the model parameters are adjusted by the gradient descent optimization algorithm to minimize the prediction error. The calculation formula of the mean-square error (MSE) is:
[0058] Among them, y i Indicates the actual value of the fault risk level at a certain point in time or in a certain area; The model-predicted value representing the failure risk level predicted by the model.
[0059] 4. Deploy the trained model in the distribution network monitoring system and set the warning threshold to realize real-time monitoring and warning of the distribution network status; if the model output exceeds the warning threshold, the system will issue a warning to prompt the operation and maintenance personnel to conduct inspections or take preventive measures.
[0060] The setting formula of the warning threshold is: threshold = μ + kσ;
[0061] Among them, μ represents the mean of the data set, that is, the average value of all data points; σ represents the standard deviation of the data set; k is a constant used to determine the standard deviation multiple of the threshold distance mean, usually k = 2 or 3.
[0062] 5. Use indicators such as accuracy, recall, and F1 score to evaluate the predictive performance of the model.
[0063] The calculation formula of the accuracy is:
[0064] The calculation formula of the recall rate is:
[0065] The calculation formula of the F1 score is:
[0066] Among them, TP represents the number of instances correctly recognized by the model, FP represents the number of instances of the category that the model mistakenly recognizes as instances of non-category instances, and FN represents the number of instances of the category that the model fails to recognize. These indicators help us comprehensively evaluate the performance of the model.
[0067] Through the above steps, the present invention can not only improve the accuracy of distribution network fault warning, but also realize pre-fault prevention and control, reduce power outage time, and improve the operating efficiency and reliability of the distribution network. At the same time, it helps to reduce operation and maintenance costs, improve the intelligence level of the power system, and bring technological progress to the power industry.
[0068] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A distribution network fault risk warning method based on an improved Transformer model, characterized in that The steps include: (1) Collecting the operating status data and historical fault data of the distribution network, and preprocessing the collected data, including outlier processing and normalization processing; (2) Classify the fault levels of the distribution network area and assign the preprocessed data points to different risk levels; (3) Construct a Transformer model and train the constructed Transformer model; (4) The trained model is deployed in the distribution network monitoring system, and the warning threshold is set to realize real-time monitoring and early warning of the distribution network status; if the model output exceeds the warning threshold, the system will issue an early warning to prompt the operation and maintenance personnel to conduct inspections or take preventive measures.
2. According to claim 1, a distribution network fault risk early warning method based on an improved Transformer model is characterized by: The data collected in step (1) include physical quantities such as voltage, current, power, load, temperature, and humidity.
3. According to claim 1, a distribution network fault risk early warning method based on an improved Transformer model is characterized by: The outlier processing in step (1) uses the standard deviation method, that is, if |x-μ|>kσ, then x is an outlier; Where μ is the mean, σ is the standard deviation, and k is the threshold constant, which is usually set to 3.
4. According to claim 1, a distribution network fault risk early warning method based on an improved Transformer model is characterized by: The formula for normalization in step (1) is: x′=(x-min(x)) / (max(x)-min(x)), used to scale the eigenvalue x to the interval [0,1]; In the above formula, x represents a feature value in the original data, and min(x) represents the minimum value of the feature value in the data set; max(x) represents the maximum value of the feature in the data set; x′ represents the normalized eigenvalue, that is, the result of the original eigenvalue x after normalization.
5. According to claim 1, a distribution network fault risk early warning method based on an improved Transformer model is characterized by: The step (2) specifically comprises: 2.
1. Taking the urban area as the division unit, the frequency of faults in the area and the duration of power outages caused by faults are taken into consideration. Based on this, the distribution network is divided into four distribution network risk fault levels: mild, moderate, severe and emergency; 2.
2. Use the K-means clustering algorithm to assign the preprocessed data points to different risk levels, complete the fault level classification of the distribution network area in the data set, and label the data.
6. According to claim 5, a distribution network fault risk early warning method based on an improved Transformer model is characterized by: The K-means clustering algorithm formula is: C(x)=argmin 1≤k≤K ||x-m k ||; In the above formula, C(x) is the risk level category of point x, x represents the data point to be classified, that is, the preprocessed multidimensional feature vector, including physical quantities such as voltage, current, power, load, temperature, humidity, etc.; μ k is the center position of all points in the kth cluster, and a cluster is a set of sample points in the data set.
7. The distribution network fault risk early warning method based on the improved Transformer model according to claim 1 is characterized by: When constructing the Transformer model in step (3), the preprocessed data is used as input to form a set of input vectors; the input vectors are passed through the hidden layer of the neural network to obtain Q, K, and V vectors respectively, and the self-attention mechanism is used to obtain the Q, K, and V vectors. To capture the complex relationship in the data; according to the above formula, we get the vector Attention(Q,K,V), which is input into the LSTM unit through the Dropout layer, and the final model outputs the prediction; The Q vector represents an element in the currently processed input sequence; the K vector works with the corresponding Q vector to determine the degree of association between each element in the input sequence and other elements; the V vector contains the actual content of each information point in the input sequence; is the square root of the dimension of the K vector and is used to scale the result of the dot product.
8. The distribution network fault risk early warning method based on the improved Transformer model according to claim 7 is characterized by: When training the constructed Transformer model, the physical quantities such as voltage, current, power, load, temperature, humidity, etc. are used as the input of the model, and the regional fault level of the distribution network is used as the output of the model to train the constructed Transformer model; In the training phase, the mean-square error (MSE) is used as the loss function to quantify the accuracy of the model prediction, and the model parameters are adjusted by the gradient descent optimization algorithm to minimize the prediction error. The calculation formula of the mean-square error (MSE) is: where y i Indicates the actual value of the fault risk level at a certain point in time or in a certain area; The model-predicted value representing the failure risk level predicted by the model.
9. The distribution network fault risk early warning method based on the improved Transformer model according to claim 1 is characterized by: The setting formula of the warning threshold is: threshold = μ + kσ; Among them, μ represents the mean of the data set, that is, the average value of all data points; σ represents the standard deviation of the data set; k is a constant used to determine the standard deviation multiple of the threshold distance mean, usually k = 2 or 3.