A method for time-varying topological state estimation of distribution network based on transfer learning
By adopting transfer learning methods in the distribution network, combining Bayesian ridge regression and deep residual neural network, a state estimation model is constructed using historical data of the source topology, and the overfitting problem caused by the small sample data in the new topology is solved. , realizes accurate state estimation under the new topology.
Patent Information
- Application Number
- CN202210966397.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-12
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-08-12
AI Technical Summary
Changes in the distribution network topology have led to overfitting traditional data-driven methods under new topology, making it difficult to achieve accurate state estimation, especially when there is little sample data.
Using a transfer learning-based method, Bayesian ridge regression combined with deep residual neural network, the state estimation model is constructed using historical data of source topology, and the residual block structure is improved through jump connection and full connection layer, reducing information loss and improving Nonlinear capability to realize state estimation of new topology.
It effectively solves the problems of deep learning gradient vanishing and gradient explosion, improves the accuracy of data-driven methods under a single topology, and reduces the impact of negative migration through Bayesian ridge regression, achieving accurate state estimation under the new topology.
Smart Images

Figure CN115130662B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of distribution network state estimation, and more specifically, relates to a distribution network time-varying topology state estimation method based on transfer learning. Background Art
[0002] As a key link in ensuring the safety of electricity use for users, the distribution network is facing an increasingly serious uncertainty problem of "source-load" with the large-scale access of distributed energy and the increase in the proportion of new loads such as electric vehicles. The feeder switches in the distribution network are operating more frequently, resulting in changes in the network structure of the distribution network. However, it is difficult to include all topological data information in the historical database. When the topology changes, there is little known data under the new topology, and the traditional data-driven method that relies on historical data for training will cause overfitting. Therefore, it is necessary to invent a method that can make up for the difficulty of state estimation caused by the small amount of sample data in the new topology.
[0003] State estimation methods are divided into physical model-based methods and data-driven methods. Traditional physical models, represented by WLS, construct measurement equations through topological structure and parameter information, and use Gauss-Newton iteration method to find the optimal solution of the equation, which is the state quantity to be estimated. However, in practical applications, the topological structure parameter information of the distribution network usually changes, resulting in inaccurate estimation results.
[0004] Data-driven methods can effectively improve the accuracy and convergence of state estimation by analyzing the spatiotemporal correlation characteristics of historical data and then establishing a multi-section data-driven model. Therefore, data-driven state estimation methods have become a research hotspot in the current state estimation field. However, data-driven models often require a large amount of historical data for training. When the topology mutates, the new topology has less available information. Traditional data-driven models will cause overfitting and it is difficult to achieve accurate results. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method for estimating the time-varying topology state of a distribution network based on transfer learning, which realizes the distribution network state estimation in the case of less data set under the condition of time-varying topology through a Bayesian ridge regression transfer learner.
[0006] To achieve the above-mentioned object of the invention, the present invention provides a method for estimating the time-varying topological state of a distribution network based on transfer learning, characterized in that it comprises the following steps:
[0007] (1) Collect historical measurement data of source topology;
[0008] The known topology of the distribution network is taken as the source topology, and then the measurement data and status data of each node in the source topology at different times t are collected. The measurement data includes: the active power P injected by the node i (t) and reactive power Qi (t), the active power P flowing into some branches ij (t) and reactive power Q ij (t), where t = 1, 2, ..., T, T is the number of sampling moments, i, j represent nodes in the source topology; state data include: voltage V(t) and phase angle
[0009] (2) Construct a training data set;
[0010] The measured data {P i (t),Q i (t),P ij (t),Q ij (t)} and status data Normalize the data, and then randomly add 20% error to the normalized data to form a training data set;
[0011] (3) Construct a source topology state estimation model;
[0012] k parallel deep residual neural network models are used as source topology state estimation models, where each deep residual neural network model consists of an input layer, a shaping layer, several residual blocks and an output layer connected in series;
[0013] Assume that there are 2n residual blocks in total, and every two adjacent residual blocks are equivalent to an extended residual block by adding a jump connection externally. The specific connection method is: starting from the lth residual block, the input of the lth residual block is added to the output of the l+1th residual block and the average is taken as the input of the l+2th residual block; the input of the l+2th residual block is added to the output of the l+3th residual block and the average is taken as the input of the l+4th residual block; and so on, the remaining residual blocks are still connected in series, that is, the input of the l+1th residual block is the output of the lth residual block, the output of the 2nth residual block is added to the input of the 2n-1th residual block, and the input of the first residual block is added together to take the average, and then pass through the Dropout and shaping layers to output the estimated value; where l = 1, 3, 5, ..., 2n-1, n is a natural number;
[0014] (4) Offline training source topology state estimation model
[0015] (4.1) In the training data set, the measurement data and state data at different times in a batch are input into k deep residual neural network models through the input layer. In each deep residual neural network model, the data features are extracted through the shaping layer and mapped into a high-dimensional space and converted into a tensor form and input into the series of residual blocks;
[0016] (4.2) In the series of residual blocks, traverse each residual block, where the input of the first residual block is directly input by the shaping layer. When it flows through the i-th residual block, i = 3, 5, ..., 2n-1, the input tensor of the i-2th residual block is x (i-3) , and the output tensor of the i-1th residual block Add and take the mean to get the input tensor of the i-th residual block Average means the mean operation;
[0017] Input tensor x (i-1) After entering the i-th residual block, it is divided into two branches. In the left branch of the i-th residual block, the input tensor x (i-1) After extracting features through the fully connected layer, weight normalization and ReLU activation function are performed, and then weight normalization is performed after the second fully connected layer to obtain the output tensor F(x (i-1) ); in the right branch, input tensor x (i-1) Directly with the output tensor F(x (i-1) ) are added, and then the output of the i-th residual block is obtained through the activation function. Activation represents the sum operation;
[0018] When flowing through the jth residual block, j = 2, 4, 6, ..., 2n, the input of the jth residual block is the output tensor of the j-1th residual block
[0019] When traversing to the last residual block, that is, the 2nth residual block, the output of the 2nth residual block is added together with the input of the 2n-1th residual block and the input of the first residual block to obtain the average value, which is then passed through the Dropout and Reshaping layers and then outputs the estimated value of the state data;
[0020] (4.3), calculate the mean absolute error MAE and the mean absolute percentage error MAPE as the loss function value;
[0021]
[0022]
[0023] Among them, m is the number of training data samples in each batch, z i is the true value of the state data input in the training data set, The estimated value of the state data predicted by the deep residual neural network model;
[0024] (4.4) Determine whether the loss function values MAE and MAPE of the k deep residual neural network models simultaneously meet the preset thresholds. If so, the iteration stops and k trained deep residual neural network models are obtained; otherwise, the Adam optimizer is used to optimize the network parameters, and then return to step (4.1) for the next round of training until all k deep residual neural network models converge;
[0025] (5) Transfer learning of source topology state estimation model;
[0026] (5.1) Collect small sample data of the new topology, including measurement data and state data, and construct the input data x target ;
[0027] (5.2), the input data x target Input into the source topology state estimation model to obtain k state data estimation values Z = (z1, z2, …, z i ,…,z k ), z i Represents the estimated value of the state data output by the i-th deep residual neural network;
[0028] (5.3), the k state data estimates Z = (z1, z2, …, z i ,…,z k ) is input into the Bayesian Ridge Regression Transfer Learner to obtain the weights W of each deep residual neural network model i ;
[0029] (6) Estimate the state of the new topology in real time;
[0030] The measurement data of the new topology is collected in real time, and then input into the source topology state estimation model with assigned weights to obtain the state estimation value
[0031] The object of the invention of the present invention is achieved in this way:
[0032] The invention discloses a method for estimating the state of a distribution network time-varying topology based on transfer learning. First, several representative source topology measurement data and corresponding state data information are collected, and data preprocessing is performed to meet the input requirements of the neural network. Then, a deep residual neural network is constructed to estimate the state of the source topology, and multiple deep residual network models are obtained. Then, a small amount of data of the new topology is collected, and the Bayesian Ridge regression method is used for training to determine the weight of the combined model to achieve state estimation of the new topology.
[0033] At the same time, the distribution network time-varying topology state estimation method based on transfer learning of the present invention also has the following beneficial effects:
[0034] (1) The present invention adopts a deep residual neural network model as a single topology state estimation model, which can solve the problems of gradient vanishing and gradient explosion in deep learning and effectively improve the accuracy of the data-driven method under a single topology;
[0035] (2) The Bayesian ridge regression method of the present invention realizes the transfer learning of the new topology, and combines the advantages of Bayesian and ridge regression, and uses the combined model method to reduce the impact of negative transfer, thereby obtaining an accurate state estimation model;
[0036] (3) The traditional deep residual neural network model directly obtains the output result through several residual blocks, while the present invention improves the deep residual neural network model by adding a jump connection outside every two residual blocks to be equivalent to an extended residual block. By adding jump connections, the information loss problem in the training process can be effectively reduced.
[0037] (4) The present invention also improves the structure of the residual block. The traditional residual block passes through a convolutional layer, while the present invention passes through two fully connected layers in the residual block to improve the nonlinear ability. Since time series data is not as complex as image data, the fully connected layer can be used to train a two-dimensional data set. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a flow chart of a method for estimating time-varying topological state of a distribution network based on transfer learning of the present invention;
[0039] Figure 2 It is the structural diagram of the deep residual neural network model;
[0040] Figure 3 1 is a comparison curve of topological state estimation between the present invention and several other methods, wherein (a) is a voltage curve and (b) is a phase angle curve. DETAILED DESCRIPTION
[0041] The specific implementation of the present invention is described below in conjunction with the accompanying drawings so that those skilled in the art can better understand the present invention. It should be noted that in the following description, when the detailed description of known functions and designs may dilute the main content of the present invention, these descriptions will be omitted here.
[0042] Example
[0043] Figure 1 It is a flow chart of the method for estimating time-varying topological state of distribution network based on transfer learning of the present invention.
[0044] In this embodiment, the simulation is carried out on the IEEE 33-node standard distribution network. Figure 1As shown, the present invention provides a method for estimating the time-varying topological state of a distribution network based on transfer learning, comprising the following steps:
[0045] S1, collect historical measurement data of source topology;
[0046] The known topology of the distribution network is taken as the source topology, and then the measurement data and status data of each node in the source topology at different times t are collected. The measurement data includes: the active power P injected by the node i (t) and reactive power Q i (t), the active power P flowing into some branches ij (t) and reactive power Q ij (t), where t = 1, 2, ..., T, T is the number of sampling moments, i, j represent nodes in the source topology; state data include: voltage V(t) and phase angle In this embodiment, the sampling time interval is set to 5 minutes, and 32 groups of nodes are selected to inject active power P i (t) and reactive power Q i (t), the active power P flowing into the 10 branches ij (t) and reactive power Q ij (t), a total of 84 input measurement data.
[0047] S2, build training data set;
[0048] Since there are large differences between the values and units of the quantities involved in the measurement information, in order to reduce the impact, the measurement data {P i (t),Q i (t),P ij (t),Q ij (t)} and status data Normalization is performed. In order to improve the robustness of the model, a 20% error needs to be randomly added to the normalized data to form a training data set.
[0049] S3, constructing a source topology state estimation model;
[0050] K parallel deep residual neural network models are used as source topology state estimation models, where each deep residual neural network model is composed of an input layer, a shaping layer, several residual blocks and an output layer connected in series; in this embodiment, k is 6, that is, 6 parallel topologies are selected as source domains.
[0051] The residual block consists of two branches, i = 2, 3, ..., 2n, 2n represents the total number of residual blocks; the left branch is the output tensor of the previous residual block, which is obtained after passing through the fully connected layer, weight normalization, activation function, fully connected layer and weight normalization; the right branch is the output tensor of the previous residual block directly added to the left output tensor, and then passes through the activation function to obtain the output tensor of the residual block.
[0052] In this embodiment, it is assumed that there are 2n residual blocks in total, and every two adjacent residual blocks are equivalent to an extended residual block by adding a jump connection externally. The extended residual block refers to the structure of a single residual block and adds a shortcut connection between two residual blocks, thereby reducing information loss. The specific connection method is: starting from the lth residual block, the input of the lth residual block is added to the output of the l+1th residual block and the average is taken as the input of the l+2th residual block; the input of the l+2th residual block is added to the output of the l+3th residual block and the average is taken as the input of the l+4th residual block; and so on, the remaining residual blocks are still connected in series, that is, the input of the l+1th residual block is the output of the lth residual block, the output of the 2nth residual block and the input of the 2n-1th residual block, as well as the input of the first residual block are added together to take the average, and then pass through the Dropout and shaping layers to output the estimated value; where l = 1, 3, 5, ..., 2n-1, n is a natural number;
[0053] In this embodiment, for example, the input of the third residual block is the average of the input of the first residual block and the output of the second residual block, and the input of the fourth residual block is the output of the third residual block; the input of the fifth residual block is the average of the input of the third residual block and the output of the fourth residual block, and the input of the sixth residual block is the output of the fifth residual block; the input of the seventh residual block is the average of the input of the fifth residual block and the output of the sixth residual block, and the input of the eighth residual block is the output of the seventh residual block;
[0054] S4. Offline training source topology state estimation model
[0055] S4.1. In the training data set, the measurement data and state data at different times in a batch are input into k deep residual neural network models through the input layer. In each deep residual neural network model, the data features are extracted through the shaping layer, mapped to the high-dimensional space, converted into tensor form and input into the series residual blocks.
[0056] S4.2. In the series of residual blocks, traverse each residual block, where the input of the first residual block is directly input by the shaping layer. When it flows through the i-th residual block, i = 3, 5, ..., 2n-1, the input tensor of the i-2th residual block is x (i-3) , and the output tensor of the i-1th residual block Add and take the mean to get the input tensor of the i-th residual block Average means the mean operation;
[0057] Input tensor x (i-1) After entering the i-th residual block, it is divided into two branches. In the left branch of the i-th residual block, the input tensor x (i-1) After extracting features through the fully connected layer, weight normalization and ReLU activation function are performed, and then weight normalization is performed after the second fully connected layer to obtain the output tensor F(x (i-1) ); in the right branch, input tensor x (i-1) Directly with the output tensor F(x (i-1) ) are added, and then the output of the i-th residual block is obtained through the activation function. Activation represents the sum operation;
[0058] When flowing through the jth residual block, j = 2, 4, 6, ..., 2n, the input of the jth residual block is the output tensor of the j-1th residual block
[0059] When traversing to the last residual block, that is, the 2nth residual block, the output of the 2nth residual block is added together with the input of the 2n-1th residual block and the input of the first residual block to obtain the average value, which is then passed through the Dropout and Reshaping layers and then outputs the estimated value of the state data;
[0060] S4.3, calculate the mean absolute error MAE and the mean absolute percentage error MAPE as the loss function value;
[0061]
[0062]
[0063] Among them, m is the number of training data samples in each batch, z i is the true value of the state data input in the training data set, The estimated value of the state data predicted by the deep residual neural network model;
[0064] S4.4, determine whether the loss function values MAE and MAPE of the k deep residual neural network models simultaneously meet the preset thresholds. If so, the iteration stops and k trained deep residual neural network models are obtained; otherwise, the Adam optimizer is used to optimize the network parameters, and then return to step (4.1) for the next round of training until all k deep residual neural network models converge;
[0065] S5, transfer learning of source topology state estimation model;
[0066] S5.1. Collect small sample data of the new topology, including measurement data and status data, and construct input data x target ;
[0067] S5.2. Input data x target Input into the source topology state estimation model to obtain k state data estimation values Z = (z1, z2, …, z i ,…,z k ), z i Represents the estimated value of the state data output by the i-th deep residual neural network;
[0068] S5.3, k state data estimated values Z=(z1,z2,…,z i ,…,z k ) is input into the Bayesian Ridge Regression Transfer Learner to obtain the weights W of each deep residual neural network model i ;
[0069] S6, estimate the state of the new topology in real time;
[0070] The measurement data of the new topology is collected in real time, and then input into the source topology state estimation model with assigned weights to obtain the state estimation value
[0071] Table 1 compares the voltage amplitude state estimation results under small sample conditions of several different methods, and Table 2 compares the voltage and phase angle state estimation results. Among them, the support vector machine SVM and the long short-term memory neural network LSTM are only trained under small sample conditions. It can be seen that when the data samples are small, it is difficult to obtain satisfactory accuracy requirements by relying solely on a small number of samples for data-driven methods. This also proves the feasibility of the present invention to use the similarity between the source topology historical data and the new topology data for transfer learning. Compared with the method using the linear regression combination model Res-LR, the Bayesian Ridge regression used in the present invention can make full use of limited sample information, and at the same time introduce L2 regularization to improve linear regression, so as to obtain more accurate estimation results. This also means that the present invention can be further used in practical engineering. The test set samples are randomly sampled, and the voltage amplitude and phase angle estimation results are shown as follows: Figure 3 As shown in (a) and (b), it can be seen from the figure that the amplitude and phase angle state estimation values of the method of the present invention are obviously closer to the actual values in the continuous moments, which means that the method of the present invention has a higher estimation accuracy than other methods.
[0072] Table 1. Voltage amplitude performance of different models
[0073] SVM LSTM Res-LR The present invention MAE 0.031 0.011 0.0035 0.0028
[0074] Table 2. Voltage phase angle performance of different models
[0075] SVM LSTM Res-LR The present invention MAE 0.118 0.100 0.158 0.076
[0076] Although the above describes the illustrative specific embodiments of the present invention to facilitate those skilled in the art to understand the present invention, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations using the concept of the present invention are protected.
Claims
1. A method for estimating time-varying topological state of distribution network based on transfer learning, characterized in that: The following steps are involved: (1) Collect historical measurement data of source topology; The known topology of the distribution network is taken as the source topology, and then the measurement data and status data of each node in the source topology at different times t are collected. The measurement data includes: the active power P injected by the node i (t) and reactive power Q i (t), the active power P flowing into some branches ij (t) and reactive power Q ij (t), where t = 1, 2, ..., T, T is the number of sampling moments, i, j represent nodes in the source topology; state data include: voltage V(t) and phase angle (2) Construct a training data set; The measured data {P i (t),Q i (t),P ij (t),Q ij (t)} and status data Normalize the data, and then randomly add 20% error to the normalized data to form a training data set; (3) Construct a source topology state estimation model; k parallel deep residual neural network models are used as source topology state estimation models, where each deep residual neural network model consists of an input layer, a shaping layer, several residual blocks and an output layer connected in series; Assume that there are 2n residual blocks in total, and every two adjacent residual blocks are equivalent to an extended residual block by adding a jump connection externally. The specific connection method is: starting from the lth residual block, the input of the lth residual block is added to the output of the l+1th residual block and the average is taken as the input of the l+2th residual block; the input of the l+2th residual block is added to the output of the l+3th residual block and the average is taken as the input of the l+4th residual block; and so on, the remaining residual blocks are still connected in series, that is, the input of the l+1th residual block is the output of the lth residual block, the output of the 2nth residual block is added to the input of the 2n-1th residual block, and the input of the first residual block is added together to take the average, and then pass through the Dropout and shaping layers to output the estimated value; where l = 1, 3, 5, ..., 2n-1, n is a natural number; (4) Offline training source topology state estimation model (4.1) In the training data set, the measurement data and state data at different times in a batch are input into k deep residual neural network models through the input layer. In each deep residual neural network model, the data features are extracted through the shaping layer and mapped into a high-dimensional space and converted into a tensor form and input into the series of residual blocks; (4.2) In the series of residual blocks, traverse each residual block, where the input of the first residual block is directly input by the shaping layer. When it flows through the i-th residual block, i = 3, 5, ..., 2n-1, the input tensor of the i-2th residual block is x (i-3) , and the output tensor of the i-1th residual block Add and take the mean to get the input tensor of the i-th residual block Average means the mean operation; Input tensor x (i-1) After entering the i-th residual block, it is divided into two branches. In the left branch of the i-th residual block, the input tensor x (i-1) After extracting features through the fully connected layer, weight normalization and ReLU activation function are performed, and then weight normalization is performed after the second fully connected layer to obtain the output tensor F(x (i-1) ); In the right branch, input tensor x (i-1) Directly with the output tensor F(x (i-1) ) are added, and then the output of the i-th residual block is obtained through the activation function. Activation represents the sum operation; When flowing through the jth residual block, j = 2, 4, 6, ..., 2n, the input of the jth residual block is the output tensor of the j-1th residual block When traversing to the last residual block, that is, the 2nth residual block, the output of the 2nth residual block is added together with the input of the 2n-1th residual block and the input of the first residual block to obtain the average value, which is then passed through the Dropout and Reshaping layers and then outputs the estimated value of the state data; (4.3), calculate the mean absolute error MAE and the mean absolute percentage error MAPE as the loss function value; Among them, m is the number of training data samples in each batch, z i is the true value of the state data input in the training data set, The estimated value of the state data predicted by the deep residual neural network model; (4.4) Determine whether the loss function values MAE and MAPE of the k deep residual neural network models simultaneously meet the preset thresholds. If so, the iteration stops and k trained deep residual neural network models are obtained; otherwise, the Adam optimizer is used to optimize the network parameters, and then return to step (4.1) for the next round of training until all k deep residual neural network models converge; (5) Transfer learning of source topology state estimation model; (5.1) Collect small sample data of the new topology, including measurement data and state data, and construct the input data x target ; (5.2), the input data x target Input into the source topology state estimation model to obtain k state data estimation values Z = (z1, z2, …, z i ,…,z k ), z i Represents the estimated value of the state data output by the i-th deep residual neural network; (5.3), the k state data estimates Z = (z1, z2, …, z i ,…,z k ) is input into the Bayesian Ridge Regression Transfer Learner to obtain the weights W of each deep residual neural network model i ; (6) Estimate the state of the new topology in real time; The measurement data of the new topology is collected in real time, and then input into the source topology state estimation model with assigned weights to obtain the state estimation value
