A voltage sag source location method based on deep learning considering time-varying topology
By applying deep learning-based 1D convolutional model and transfer learning in the power grid, the accuracy and adaptability of voltage drop source positioning under the time-transformation grid topology are solved, and more efficient voltage drop source positioning is achieved.
Patent Information
- Application Number
- CN202210025828.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-11
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2042-01-11
AI Technical Summary
The existing voltage drop source positioning method fails to effectively consider the topology of the grid, resulting in low positioning accuracy and poor adaptability under the time-transformer grid topology structure, making it difficult to achieve accurate voltage drop source positioning.
Using a deep learning-based method, the 1D convolutional deep learning model combined with transfer learning, timely variable topology structure is taken into account, sample data is generated, preprocessed and marked, and the model is trained to locate the voltage drop source.
The accuracy of voltage drop source positioning during topological changes is improved, the adaptability and generalization performance of the model is enhanced, and more accurate voltage drop source positioning is achieved.
Smart Images

Figure CN114545147B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power quality analysis and relates to a method for locating a voltage sag source based on deep learning when taking into account a time-varying topology. Background Art
[0002] Compared with other power quality issues, voltage sag has a wide range of impacts. In high-end manufacturing industries such as microelectronics, semiconductors, biomedical optoelectronics, and aerospace technology, voltage sags can cause products on the production line to be scrapped and may even cause equipment damage, resulting in huge economic losses.
[0003] Accurately tracing the source of voltage sag is of great significance for dividing responsibilities and accelerating the process of electricity marketization. However, the existing data-driven voltage sag source location methods mostly locate the voltage sag source without considering the change of grid topology, that is, they rarely consider the impact of grid topology changes on the voltage sag source location results, and do not use the grid topology as the input of the voltage sag source location analysis model. However, in the actual grid operation process, the system topology changes from time to time, and it is difficult for the historical database to contain massive historical data of all topologies to make up for the problem of few new topology samples. Therefore, in the face of time-varying grid topology, the electrical characteristic quantities after the voltage sag occurs will change significantly, making it difficult for the existing methods to achieve accurate voltage sag source location.
[0004] In summary, the current data-driven voltage sag source location method still has the following difficult problems to be solved:
[0005] 1. The impact of grid topology changes on the voltage sag source location results is not considered, resulting in the unavailability of the data-driven voltage sag source location method.
[0006] 2. The grid topology changes are not used as input to the data-driven model, resulting in poor adaptability and generalization performance of the model. Summary of the invention
[0007] The purpose of the present invention is to provide a voltage sag source positioning method based on deep learning when taking into account time-varying topology, which solves the problems of existing methods such as unavailable model, poor adaptability, low positioning accuracy and poor algorithm generalization performance when facing time-varying power grid topology.
[0008] The technical solution adopted by the present invention is a method for locating a voltage sag source based on deep learning when taking into account a time-varying topology, which specifically includes the following steps:
[0009] Step 1: Collect bus voltage data under different operating conditions, and use the sample data as sample data corresponding to the basic power grid topology structure;
[0010] Step 2, calculating the voltage root mean square value of the sample data collected in step 1, if the voltage root mean square value drops to 90% to 10% of the rated value, the sample data corresponding to the voltage root mean square value constitutes a set of voltage sag data samples; otherwise, the sample data is removed from the sample data collected in step 1 to obtain the pre-processed monitoring voltage data;
[0011] Step 3: label the data obtained in step 2. The input data of each sample is the three-phase voltage amplitude data of the monitoring node preprocessed in step 2, and the output data is the line sequence of the specific voltage sag source in the distribution network.
[0012] Step 4: randomly divide the sample data annotated in step 3, with 80% as the training sample data set and the remaining 20% as the test sample data set;
[0013] Step 5: Build a 1D convolutional deep learning model as the basic model;
[0014] Step 6: Use the training sample data set in step 4 to train the model built in step 5, use the back propagation algorithm to update the parameters, use the Adam optimizer to train, and use the cross-entropy loss function as the loss function to obtain the optimal neural network parameters of the basic model after training;
[0015] Step 7, using the test sample data set in step 4 to test the model obtained after the training in step 6, if no overfitting occurs, the model is used as the final basic model; otherwise, the test sample data set in step 4 is used again to test the model obtained after the training in step 6 until no overfitting occurs;
[0016] Step 8, compared with the basic power grid topology in step 1, once the basic power grid topology causes one or more branches to change due to a fault during operation, resulting in a change in the power grid topology, the weight values and parameter values of the convolutional layer in the basic model containing the optimal neural network parameters in step 6 are frozen, and the fully connected layer is not frozen;
[0017] Step 9, for the changed power grid topology, generate sample data at this time using the method described in step 1, pre-process the sample data according to the method of step 2, and then label the samples according to the method of step 3;
[0018] Step 10, dividing the sample data in step 9 into a training set and a test set according to the method in step 4;
[0019] Step 11, using the training set in step 10, retrain the remaining unfrozen network parameters in step 8 to obtain the optimal network parameters of the 1D convolutional deep learning model corresponding to the changed power grid topology;
[0020] Step 12, using the test sample data set in step 10 to test the model obtained after the training in step 11, if no overfitting phenomenon occurs, deploy it to the actual power grid, otherwise, re-use the test sample data set in step 10 to test the model obtained after the training in step 11 until no overfitting phenomenon occurs;
[0021] Step 13: Deploy the optimal model obtained after training to the actual power grid, with the input being the new data actually monitored and the output being the voltage sag source location result.
[0022] The present invention is also characterized in that:
[0023] The specific process of step 1 is:
[0024] Taking the IEEE 39-node network model as the basic model, Matlab / Simulink simulation software is used to build the model and generate simulation data. The 34 lines where the voltage sag source may be located are located, and 4 monitoring nodes are selected. By analyzing the voltage amplitudes of the selected 4 monitoring nodes, the lines where the voltage sag source may be located are located, and the voltage amplitudes of the selected nodes are sampled to obtain the voltage amplitude sampling data. The data is normalized as shown in formula (1) to obtain the preprocessed data:
[0025]
[0026] Among them, x * is the normalized data output, x max is the maximum value of the input sample data, x min is the minimum value in the input sample data.
[0027] The specific process of step 3 is:
[0028] Manual sample annotation is performed on the data obtained after processing in step 2. The input data of each sample is the three-phase voltage amplitude data of the four monitoring nodes preprocessed in step 2, and the output data is the line sequence where the specific voltage sag source is located in the distribution network, that is, the 34 lines in the IEEE 39 nodes, represented by numbers 1-34.
[0029] The specific process of step 5 is:
[0030] The 1D convolution-based deep learning model includes convolutional layers, pooling layers, and fully connected layers;
[0031] X = [x1, x2, ..., x t , ..., x s ] TIt is passed to the input layer as the model input, where X is the voltage time series collected by the four monitoring nodes after preprocessing in step 2, s is the length of the time series, and the sequence data is mapped to the convolution layer through a one-dimensional convolution operation:
[0032] a c j =f r (X*W C j +b) (2);
[0033] f r (z) = max(z,0) (3);
[0034] Among them, * represents a one-dimensional convolution operation; a c j Represented by the convolution kernel W C j The jth feature map generated; convolution kernel W C j is a weight matrix; b is the bias; f r (z) is the activation function.
[0035] The specific process of step 6 is:
[0036] The model constructed in step 5 is trained using the training data in step 4, and the back propagation algorithm is used to update the parameters. The Adam optimizer is used for training, and the loss function is the cross-entropy loss function. The input data is the voltage amplitude sample data of the monitoring node after processing in step 2, and the output data is the line number 1 to 34 where the short-circuit fault is located in step 1.
[0037] The beneficial effect of the present invention is that the present invention adopts a combination of 1D convolutional deep learning model and transfer learning to analyze the three-phase monitoring voltages corresponding to a limited number of monitoring nodes collected by the power quality monitoring equipment, and obtains the specific line where the voltage sag source is located in the distribution network. The accuracy of the model in locating the voltage sag source when the topology changes is improved, and the model's adaptability and generalization performance are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 The overall process steps of the voltage sag source location method based on deep learning when taking into account the time-varying topology of the present invention;
[0039] Figure 2 It is an iterative update diagram between the number of generations and the loss value in the model training process of the voltage sag source location method based on deep learning when taking into account the time-varying topology of the present invention;
[0040] Figure 3This is an iterative update diagram between the number of generations and the accuracy rate during the model training process of the voltage sag source locating method based on deep learning when taking into account the time-varying topology of the present invention. DETAILED DESCRIPTION
[0041] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0042] The present invention provides a method for locating voltage sag sources based on deep learning when considering time-varying topology, such as Figure 1 The specific steps are as follows:
[0043] Step 1, select the power grid topology under normal operating conditions as a basic power grid topology. Then use the power quality monitoring equipment already installed in the basic power grid topology or any other device that can monitor the voltage of the power grid nodes to sample the amplitude of the three-phase voltage of the node respectively. When a single-phase short circuit, two-phase short circuit and three-phase short circuit occur in the system, change the system short-circuit capacity, grounding resistance, duration, start and end time, load capacity and line impedance respectively, and collect the bus voltage data under each operating condition as the voltage sample data corresponding to the basic power grid topology;
[0044] The specific process of step 1 is:
[0045] The IEEE 39-node network model is used as the basic model, and the Matlab / simulink simulation software is used to model and generate simulation data, and the 34 lines where the voltage sag source may be located are located. The present invention selects 4 monitoring nodes (bus3, bus8, bus24, bus38). By analyzing the voltage amplitudes of the selected 4 monitoring nodes, the lines where the voltage sag source may be located are located. The voltage amplitudes of the selected nodes are sampled to obtain voltage amplitude sampling data. The data is normalized as shown in formula (1) to obtain preprocessed data.
[0046]
[0047] where x * is the normalized data output, x max is the maximum value of the input sample data, x min is the minimum value in the input sample data.
[0048] Step 2: Calculate the voltage RMS value of the data collected in step 1. If the voltage RMS value drops to 90% to 10% of the rated value, it constitutes a set of voltage sag data samples; otherwise, it is removed from the sample data collected in step 1 to obtain the preprocessed monitoring voltage data.
[0049] Step 3: Sample labeling of the data obtained in step 2. The input data of each sample is the three-phase voltage amplitude data of the monitoring node preprocessed in step 2, and the output data is the line sequence of the specific voltage sag source in the distribution network.
[0050] The specific process of step 3 is:
[0051] Manual sample annotation is performed on the data obtained after processing in step 1 and step 2. The input data of each sample is the three-phase voltage amplitude data of the four monitoring nodes (bus3, bus8, bus24, bus38) preprocessed in step 2, and the output data is the line sequence where the specific voltage sag source is located in the distribution network, that is, the 34 lines in the IEEE 39 nodes, represented by numbers 1-34.
[0052] Step 4: Randomly divide the sample data in step 3, 80% of which is used as the training sample data set, and the remaining 20% is used as the test sample data set.
[0053] Step 5: Build a 1D convolutional deep learning model as the basic model. The 1D convolutional deep learning model is a special neural network used to process the sequence data in step 2. It consists of a convolutional layer, a pooling layer, and a fully connected layer. The convolutional layer can be trained to obtain a set of optimal convolution kernels that minimize the loss function, and the convolution kernels can be used to achieve automatic feature extraction. The pooling layer can extract the most important features from the convolutional layer and perform dimensionality reduction operations on the time dimension. The stacking of convolutional layers and pooling layers forms a deep network structure, which extracts high-level sequence features through layer-by-layer abstraction.
[0054] The specific process of step 5 is:
[0055] The present invention is mainly based on the 1D convolutional deep learning model, which consists of a convolutional layer, a pooling layer and a fully connected layer. The convolutional layer can obtain a set of optimal convolution kernels that meet the minimum loss function through training, and use the convolution kernel to realize automatic feature extraction. The pooling layer can extract the most important features from the convolutional layer and perform dimensionality reduction operations on the time dimension. The stacking of the convolutional layer and the pooling layer forms a deep network structure, and extracts high-level sequence features through layer-by-layer abstraction.
[0056] X = [x1, x2, ..., x t , ..., x s ] T It is passed to the input layer as the model input. Among them, X is the voltage time series collected by the four monitoring nodes (bus3, bus8, bus24, bus38) after preprocessing in step 2, and s is the length of the time series. The sequence data is mapped to the convolution layer through a one-dimensional convolution operation:
[0057] a c j =fr (X*W C j +b) (3)
[0058] f r (z)=max(z,0) (4)
[0059] Among them, * represents a one-dimensional convolution operation; a c j Represented by the convolution kernel W C j The jth feature map generated; convolution kernel W C j is a weight matrix; b is the bias; f r (z) is the activation function, which is used to nonlinearize the data after the convolution operation. The ReLu activation function is used here to accelerate the convergence of the model and enhance the sparse representation of the model.
[0060] The pooling operation is used to capture the most useful information of the sequence features of the convolutional layer to form a pooling layer. The pooling operation is usually the maximum pooling, which can halve the sequence length. When the pooling operation is used for the last time, the global maximum pooling is used to capture the most useful global time series information, and the sequence length is reduced to 1.
[0061] The fully connected layer is consistent with the traditional neural network structure and consists of multiple hidden layers. The fully connected layer further abstracts and combines the global temporal features.
[0062] In the present invention, the number of convolutional layers is 2, the number of convolutional kernels in the first convolutional layer is 512, the number of convolutional kernels in the second convolutional layer is 34, and the number of neurons in the fully connected layer is 64. The learning rate is 0.0001, and there is no additional learning rate decay setting.
[0063] Step 6: Use the training sample data set in step 4 to train the model structure described in step 5, use the back propagation algorithm to update the parameters, use the Adam optimizer for training, and use the cross-entropy loss function as the loss function to obtain the optimal neural network parameters of the basic model after training.
[0064] The specific process of step 6 is:
[0065] The model in step 5 is trained using the training data in step 4, and the back propagation algorithm is used to update the parameters. The Adam optimizer is used for training, and the loss function is the cross-entropy loss function. The input data is the voltage amplitude sample data of the monitoring node after processing in step 2, and the output data is the line number 1 to 34 where the short-circuit fault is located in step 1.
[0066] During the training process of the entire model, it is necessary to change the hyperparameter values to adjust the model and obtain the optimal model. The number of convolutional network layers, the number of neurons, the type of activation function, and the learning rate can be adjusted.
[0067] Step 7: Use the test sample data set in step 4 to test the model obtained after training in step 6. If there is no overfitting phenomenon, it is used as the final basic model. Otherwise, re-use the test sample data set in step 4 to test the model obtained after training in step 6 until there is no overfitting phenomenon.
[0068] Step 8: Compared with the basic grid topology in step 1, once one or more branches of the basic grid topology change due to a fault or other reasons during operation, resulting in a change in the grid topology, the weights and parameter values of the convolutional layer in the basic model containing the optimal neural network parameters in step 6 are frozen, and the fully connected layer is not frozen.
[0069] The specific process of step 8 is:
[0070] Transfer learning is used to migrate the voltage sag source characteristics under the basic topology to the characteristics after the grid topology changes. The parameters of model migration mainly include the number of neural network layers, the number of neurons, and the number of frozen layers.
[0071] Step 9: For the changed power grid topology, the sample data at this time is generated using the method described in step 1, and the sample data is preprocessed according to the method of step 2, and then the sample is further labeled according to the method of step 3.
[0072] Step 10: Divide the sample data in step 9 into training set and test set according to the method in step 4.
[0073] Step 11: Use the training set in step 10 to retrain the remaining unfrozen network parameters in step 8 to obtain the optimal network parameters of the 1D convolutional deep learning model corresponding to the changed power grid topology.
[0074] Step 12: Use the test sample data set in step 10 to test the model obtained after the training in step 11. If there is no overfitting phenomenon, it is deployed in the actual power grid. Otherwise, re-use the test sample data set in step 10 to test the model obtained after the training in step 11 until there is no overfitting phenomenon.
[0075] Step 13: Deploy the optimal model obtained after training to the actual power grid, with the input being the new data actually monitored and the output being the voltage sag source location result.
[0076] The specific process of step 13 is:
[0077] The optimal network parameters of the 1D convolutional deep learning model obtained in step 11 are deployed as the basic model in the actual power grid. Once the power grid topology changes, the basic network is fine-tuned offline using a small amount of new topology historical data. If the accuracy of the fine-tuned model test meets the requirements at this time, the real-time voltage measurement data after the topology change is collected online, and the 4 monitoring nodes (bus3, bus8, bus24, bus38) are input into the fine-tuned model, and the output is the line number 1 to 34 where the specific voltage sag source is located in the power grid.
[0078] The following is an explanation of the accompanying drawings:
[0079] Figure 1 The overall process steps of the present invention are shown, including two stages: offline training and online positioning.
[0080] Figure 2 This is the iterative update diagram between the number of generations and the loss value during the model training process when 0 branches, 1 branch, 3 branches, and 5 branches are disconnected in the IEEE39-node system. As the number of iterations increases, the model loss value gradually decreases.
[0081] Figure 3 This is the iterative update diagram between the number of generations and the accuracy during the model training process when 0 branches, 1 branch, 3 branches, and 5 branches are disconnected in the IEEE39-node system. As the number of iterations increases, the model accuracy improves and reaches 99.3%.
Claims
1. A voltage sag source location method based on deep learning when considering time-varying topology, characterized by: The specific steps include: Step 1: Collect bus voltage data under different operating conditions and use the data as sample data corresponding to the basic power grid topology structure; Step 2, calculating the voltage root mean square value of the sample data collected in step 1. If the voltage root mean square value drops to 90% to 10% of the rated value, the sample data corresponding to the voltage root mean square value constitutes a set of voltage sag data samples; otherwise, the sample data is removed from the sample data collected in step 1 to obtain the preprocessed monitoring voltage data; Step 3: label the data obtained in step 2. The input data of each sample is the three-phase voltage amplitude data of the monitoring node preprocessed in step 2, and the output data is the line sequence of the specific voltage sag source in the distribution network. Step 4: randomly divide the sample data annotated in step 3, with 80% as the training sample data set and the remaining 20% as the test sample data set; Step 5: Build a 1D convolutional deep learning model as the basic model; Step 6: Use the training sample data set in step 4 to train the model built in step 5, use the back propagation algorithm to update the parameters, use the Adam optimizer to train, and use the cross-entropy loss function as the loss function to obtain the optimal neural network parameters of the basic model after training; Step 7, using the test sample data set in step 4 to test the model obtained after the training in step 6, if there is no overfitting phenomenon, the model is used as the final basic model; Otherwise, re-use the test sample data set in step 4 to test the model obtained after training in step 6 until overfitting does not occur; Step 8, compared with the basic power grid topology in step 1, once the basic power grid topology causes one or more branches to change due to a fault during operation, resulting in a change in the power grid topology, the weight values and parameter values of the convolutional layer in the basic model containing the optimal neural network parameters in step 6 are frozen, and the fully connected layer is not frozen; Step 9, for the changed power grid topology, generate sample data at this time using the method described in step 1, pre-process the sample data according to the method of step 2, and then label the samples according to the method of step 3; Step 10, dividing the sample data in step 9 into a training set and a test set according to the method in step 4; Step 11, using the training set in step 10, retrain the remaining unfrozen network parameters in step 8 to obtain the optimal network parameters of the 1D convolutional deep learning model corresponding to the changed power grid topology; Step 12, using the test sample data set in step 10 to test the model obtained after the training in step 11, if no overfitting phenomenon occurs, deploy it to the actual power grid, otherwise, re-use the test sample data set in step 10 to test the model obtained after the training in step 11 until no overfitting phenomenon occurs; Step 13: Deploy the optimal model obtained after training to the actual power grid, with the input being the new data actually monitored and the output being the voltage sag source location result.
2. The method for locating voltage sag sources based on deep learning when taking into account time-varying topology according to claim 1 is characterized in that: The specific process of step 1 is as follows: The IEEE 39-node network model is used as the basic model, and Matlab / simulink simulation software is used to build the model and generate simulation data. The voltage sag source is located on 34 lines, and 4 monitoring nodes are selected. By analyzing the voltage amplitudes of the selected 4 monitoring nodes, the lines where the voltage sag source may be located are located, and the voltage amplitudes of the selected nodes are sampled to obtain the voltage amplitude sampling data. The data is normalized as shown in formula (1) to obtain the preprocessed data: (1); in, is the normalized data output, is the maximum value of the input sample data. is the minimum value in the input sample data.
3. The method for locating voltage sag sources based on deep learning when taking into account time-varying topology according to claim 2, characterized in that: The specific process of step 3 is as follows: Manual sample annotation is performed on the data obtained after processing in step 2. The input data of each sample is the three-phase voltage amplitude data of the four monitoring nodes preprocessed in step 2, and the output data is the line sequence where the specific voltage sag source is located in the distribution network, that is, the 34 lines in the IEEE 39 nodes, represented by numbers 1-34.
4. The method for locating voltage sag sources based on deep learning when taking into account time-varying topology according to claim 3 is characterized in that: The specific process of step 5 is as follows: The 1D convolutional deep learning model includes a convolutional layer, a pooling layer and a fully connected layer; X=[x1, x2, ..., x t , ..., x s ] T It is passed to the input layer as the model input, where X is the voltage time series collected by the four monitoring nodes after preprocessing in step 2, s is the length of the time series, and the sequence data is mapped to the convolution layer through a one-dimensional convolution operation: (2); (3); Among them, * represents a one-dimensional convolution operation; Represented by the convolution kernel The jth feature map generated; convolution kernel is a weight matrix; b is a bias; is the activation function.
5. The method for locating voltage sag sources based on deep learning when taking into account time-varying topology according to claim 4, characterized in that: The specific process of step 6 is as follows: The model constructed in step 5 is trained using the training data in step 4, and the back propagation algorithm is used to update the parameters. The Adam optimizer is used for training, and the loss function is the cross-entropy loss function. The input data is the voltage amplitude sample data of the monitoring node after processing in step 2, and the output data is the line number 1~34 where the short-circuit fault is located in step 1.
Citation Information
Patent Citations
Power system transient stability adaptive evaluation method based on transfer learning
CN110879917A
Hearing-aid brain-computer interface system based on deep transfer learning
CN111273767A