Node voltage prediction method and device for new energy power distribution network
By applying clustering and improved LSTM models in the distribution network, the problems of low voltage prediction accuracy and difficult model training in the prior art are solved, and more efficient and accurate voltage prediction is achieved, reducing operation and maintenance costs.
Patent Information
- Application Number
- CN202411870520.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-11
AI Technical Summary
The existing distribution network node voltage prediction model has low prediction accuracy, and cannot fully consider the complexity of the new energy distribution network, and ignores the correlation characteristics between nodes, resulting in high difficulty in model training and low prediction efficiency.
Using a node voltage prediction method based on long and short-term memory network (LSTM), nodes with similar voltage characteristics are processed by clustering and grouping, training samples are constructed, and the Dropout layer and fully connected layer are combined to optimize the loss function to improve prediction accuracy.
It improves the voltage prediction efficiency and accuracy of large-scale new energy access to the distribution network, reduces operation and maintenance costs, enhances the robustness and stability of the model, and can better adapt to different distribution network environments and data changes.
Smart Images

Figure CN119809038A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electric power technology, and in particular to a node voltage prediction method and device for a new energy distribution network. Background Art
[0002] With the rapid development of new energy technologies, distributed energy sources such as photovoltaics and wind power are being used more and more widely in distribution networks. However, the volatility and intermittency of new energy power generation have brought new challenges to the voltage stability of distribution networks. Therefore, it is urgent to predict the changing trend of node voltages in new energy distribution networks to ensure the safe and stable operation of distribution networks.
[0003] At present, predicting the voltage of distribution network nodes is a very challenging task. The common method is to establish a prediction model for the target distribution network. However, most of the existing prediction models are based on traditional machine learning SVM methods or simple time series prediction models, such as support vector machines and time convolutional network TCN models, which cannot fully consider the complexity of the new energy distribution network, resulting in low prediction accuracy of the model. In addition, the training samples used in the existing voltage prediction models usually ignore the correlation characteristics between nodes, fail to effectively utilize the similarity between electrical nodes, increase the input dimension of the neural network model, make the model training more difficult, and have low training efficiency. It is easy to cause the model to fail to accurately capture the mutual influence between electrical nodes, thereby affecting the prediction accuracy, especially for key nodes. The prediction accuracy is poor. Therefore, how to achieve accurate prediction of distribution network voltage is a technical problem that needs to be solved urgently. Summary of the invention
[0004] In order to solve the deficiencies in the prior art, the present invention provides a node voltage prediction method and device for a new energy distribution network. The present invention can effectively improve the voltage prediction efficiency in large-scale new energy access distribution networks, and further improve the accuracy and reliability of voltage prediction, which is helpful to promote the optimized scheduling and stable operation of smart grids.
[0005] The present invention adopts the following technical solution.
[0006] In a first aspect, the present invention provides a node voltage prediction method for a new energy distribution network, the method comprising the following steps:
[0007] Collect multiple groups of historical voltage data of each electrical node in the target distribution network and meteorological data of the same time scale according to the set time step to construct the original data set;
[0008] Preprocessing the original data set to obtain multiple sets of complete and available data combinations including voltage history data and corresponding meteorological data to form multiple sets of sample sets;
[0009] Based on each group of sample sets, multiple long short-term memory network LSTM prediction models are trained respectively, and the total loss function L v Optimize the parameters of each LSTM prediction model with the minimum as the goal to obtain the final trained LSTM prediction models;
[0010] The voltage historical data within the set time step before the current moment and the meteorological data of the same time scale are preprocessed to obtain multiple data combinations, which are respectively input into the trained corresponding LSTM prediction models to obtain the prediction results of the voltage of each node in the distribution network.
[0011] Optionally, the meteorological data includes wind speed data, irradiance data, temperature data, humidity data and / or atmospheric pressure data.
[0012] Optionally, the preprocessing step includes:
[0013] The collected data are then filled with missing values, corrected for outliers and normalized.
[0014] Optionally, the preprocessing step further includes:
[0015] Clustering and grouping electrical nodes with similar characteristics in the distribution network according to the electrical distances between the electrical nodes, and determining the target cluster to which each electrical node belongs;
[0016] The historical voltage data of each time step corresponding to all electrical nodes in each grouped cluster and the meteorological data of the same time scale are combined to obtain the data combination sets corresponding to each cluster, and they are used as sample sets for training the corresponding LSTM prediction models.
[0017] Optionally, the calculation formula for the electrical distance between the electrical nodes is as follows:
[0018]
[0019] In the formula, l de is the electrical distance between node d and node e, d and e are two different electrical nodes, Z dd is the self-impedance of node d, Z ee is the self-impedance of node e, Z de is the mutual impedance between node d and node e.
[0020] Optionally, the algorithm used for clustering and grouping electrical nodes with similar characteristics in the distribution network is a cohesive hierarchical clustering algorithm.
[0021] Optionally, the structure of the LSTM prediction model includes multiple layers of long short-term memory network LSTM layers; each layer of the long short-term memory network LSTM layer includes multiple LSTM unit structures connected in sequence;
[0022] Each of the LSTM unit structures comprises a control gate, a random dropout layer and a fully connected layer connected in sequence;
[0023] The control gate is obtained by coupling and reorganizing the forget gate, input gate and output gate in the traditional LSTM unit structure.
[0024] Optionally, the control gate is used to extract the time series features of the input samples, and its expression is as follows:
[0025] z′ i =σ(W l ·[h i-1 ,X j′,i ,C′ i-1 ]+b l )
[0026] C′ i = z′ i *C′ i-1 +(1-z′ i )*tanh(z′ i )
[0027]
[0028] In the formula, z′ i Represents the input data X j′,i Some features of are saved to the current cell state, i is the current time step, σ is the sigmoid activation function, h i-1 Represents the input data X of the previous unit structure connected to the current LSTM unit structure for the previous time step j′,i-1 The hidden state output result after time series feature extraction; the input data of the current time step i is expressed as is the data combination of the voltage of the qth electrical node in the jth cluster at the ith time step and the corresponding meteorological data, C′ i-1 is the cell state at the previous time step, W l and b l are weight matrix and bias term respectively; C′ i is the cell state at the current time step, tanh is the hyperbolic tangent function; is the input data X of the current control gate for the i-th time step j′,i The time series features obtained after feature extraction.
[0029] Optionally, the total loss function L v The expression is as follows:
[0030] L v =α·L v1 +β·L v2
[0031]
[0032] Where, L v is the total loss function, L v1 is the amplitude error loss function, L v2 is the weighted amplitude error loss function; q is the number of electrical nodes in the jth cluster, j = 1, 2, 3, …, k; k is the total number of groups obtained by clustering each electrical node; and are the actual value and predicted value of the voltage of the cth electrical node in the jth cluster at the ith time step, is the maximum value of the actual voltage value of the cth electrical node in the jth cluster, c = 1, 2, 3, ..., q; ω c is the weight of the cth electrical node in the jth cluster, α and β are the weights of adjusting L v1 and L v2 Weight hyperparameter of the partial contribution.
[0033] In a second aspect, the present invention provides a node voltage prediction method device for a new energy distribution network, and executes the steps of any one of the methods described in the first aspect of the present invention, the device comprising:
[0034] The acquisition module is used to collect multiple groups of historical voltage data of each electrical node in the target distribution network and meteorological data of the same time scale according to the set time step to construct the original data set;
[0035] A preprocessing module, used for preprocessing the original data set to obtain multiple sets of complete and available data combinations including voltage history data and corresponding meteorological data, forming multiple sets of sample sets;
[0036] The training module is used to train multiple long short-term memory network LSTM prediction models based on each group of sample sets, and use the total loss function L v Optimize the parameters of each LSTM prediction model with the minimum as the goal to obtain the final trained LSTM prediction models;
[0037] The prediction module is used to pre-process the voltage historical data within the set time step before the current moment and the meteorological data of the same time scale to obtain multiple groups of data combinations, and input them into the trained corresponding LSTM prediction models to obtain the prediction results of the voltage of each node in the distribution network.
[0038] Optionally, the meteorological data includes wind speed data, irradiance data, temperature data, humidity data and / or atmospheric pressure data.
[0039] Optionally, the preprocessing module includes:
[0040] The preprocessing unit is used to fill missing values, correct outliers and normalize the collected data.
[0041] Optionally, the preprocessing module further includes:
[0042] A clustering and grouping unit, used to cluster and group electrical nodes with similar characteristics in the distribution network according to the electrical distance between the electrical nodes, and determine the target cluster to which each of the electrical nodes belongs;
[0043] The combination unit is used to combine the historical voltage data of each time step corresponding to all electrical nodes in each grouped cluster and the meteorological data of the same time scale to obtain the data combination set corresponding to each cluster, and use it as the sample set for training each corresponding LSTM prediction model.
[0044] Optionally, the calculation formula for the electrical distance between electrical nodes in the cluster grouping unit is as follows:
[0045]
[0046] In the formula, l de is the electrical distance between node d and node e, d and e are two different electrical nodes, Z dd is the self-impedance of node d, Z ee is the self-impedance of node e, Z de is the mutual impedance between node d and node e.
[0047] Optionally, the algorithm used by the clustering grouping unit to cluster and group electrical nodes with similar characteristics in the distribution network is an agglomerative hierarchical clustering algorithm.
[0048] Optionally, the structure of the LSTM prediction model in the training module includes multiple layers of long short-term memory network LSTM layers; each layer of the long short-term memory network LSTM layer includes multiple LSTM unit structures connected in sequence;
[0049] Each of the LSTM unit structures comprises a control gate, a random dropout layer and a fully connected layer connected in sequence;
[0050] The control gate is obtained by coupling and reorganizing the forget gate, input gate and output gate in the traditional LSTM unit structure.
[0051] Optionally, the control gate is used to extract the time series features of the input samples, and its expression is as follows:
[0052] z′ i =σ(W l ·[h i-1 ,X j′,i ,C′ i-1 ]+b l )
[0053] C′ i = z′ i *C′ i-1 +(1-z′ i )*tanhθ(z′ i )
[0054]
[0055] In the formula, z′ i Represents the input data X j′,i Some features of are saved to the current cell state, i is the current time step, σ is the sigmoid activation function, h i-1 Represents the input data X of the previous unit structure connected to the current LSTM unit structure for the previous time step j′,i-1 The hidden state output result after time series feature extraction; the input data of the current time step i is expressed as is the data combination of the voltage of the qth electrical node in the jth cluster at the ith time step and the corresponding meteorological data, C′ i-1 is the cell state at the previous time step, W l and b l are weight matrix and bias term respectively; C′ i is the cell state at the current time step, tanh is the hyperbolic tangent function; is the input data X of the current control gate for the i-th time step j′,i The time series features obtained after feature extraction.
[0056] Optionally, the total loss function L in the training module v The expression is as follows:
[0057] L v =α·L v1 +β·L v2
[0058]
[0059] Where, L v is the total loss function, L v1 is the amplitude error loss function, L v2is the weighted amplitude error loss function; q is the number of electrical nodes in the jth cluster, j = 1, 2, 3, …, k; k is the total number of groups obtained by clustering each electrical node; and are the actual value and predicted value of the voltage of the cth electrical node in the jth cluster at the ith time step, is the maximum value of the actual voltage value of the cth electrical node in the jth cluster, c = 1, 2, 3, ..., q; ω c is the weight of the cth electrical node in the jth cluster, α and β are the weights of adjusting L v1 and L v2 Weight hyperparameter of the partial contribution.
[0060] In a third aspect, the present invention provides a terminal, including a processor and a storage medium;
[0061] The storage medium is used to store instructions;
[0062] The processor is used to operate according to the instructions to execute the steps of any one of the methods described in the first aspect of the present invention.
[0063] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect of the present invention.
[0064] The beneficial effect of the present invention is that, compared with the prior art,
[0065] 1. The present invention constructs training samples by clustering nodes with similar voltage characteristics, so that the grouped LSTM prediction model can process multiple node data at the same time, learn complex time series characteristics based on historical data, and effectively improve the voltage prediction efficiency in the distribution network when large-scale renewable energy is connected.
[0066] 2. Compared with the traditional LSTM unit structure, the structure of the long short-term memory network LSTM layer in the LSTM prediction model constructed by the present invention has only one control gate, and the forget gate, input gate and output gate in the traditional LSTM unit structure are coupled and reorganized to obtain a new control gate; compared with the traditional LSTM model, the improved LSTM prediction model of the present invention can reduce the number of parameter updates to a greater extent, while reducing the calculation steps of variables, reducing the complexity of the model, and can better capture the variation law of node voltage, thereby improving the accuracy of model prediction and training speed. The automation and accuracy of voltage prediction can effectively reduce the operation and maintenance cost of the distribution network;
[0067] 3. The LSTM prediction model constructed by the present invention combines the Dropout layer and the fully connected layer, so that the model can better capture the long-term dependencies in the time series data, effectively avoid the overfitting problem, and improve the robustness and stability of the model in a complex power grid environment.
[0068] 4. Traditional voltage prediction models usually use mean square error as the loss function. Traditional loss functions cannot effectively handle the errors in voltage amplitudes of different nodes, especially the problem of poor prediction accuracy for key nodes. The present invention adopts an improved electrical node voltage loss function, which combines the amplitude error and the weighted error. It can more comprehensively evaluate the prediction results and guide the optimization of model parameters, thereby improving the accuracy of the prediction.
[0069] 5. The present invention can train a high-precision LSTM prediction model with stronger model generalization ability and feature extraction ability, which can better adapt to different distribution network environments and data changes, improve the accuracy and reliability of voltage prediction of each electrical node in the distribution network, and help promote the optimized scheduling and stable operation of the smart grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 It is a flow chart of a node voltage prediction method for a new energy distribution network in the present invention;
[0071] Figure 2 It is a structural diagram of the traditional LSTM unit structure;
[0072] Figure 3 It is a structural schematic diagram of the improved LSTM unit structure in the present invention;
[0073] Figure 4 is an example diagram of the topological structure of the distribution network in the present invention;
[0074] Figure 5 It is a graph of experimental results of the predicted value (Proposed Predict) and the actual value (True) of the node voltage of the distribution network by the method proposed in the present invention;
[0075] Figure 6 This is a graph showing the experimental results of the comparison of the prediction results of the Proposed Predict of the method proposed in the present invention with the support vector machine SVM Predict and the temporal convolutional network TCN Predict;
[0076] Figure 7 It is a logic block diagram of a node voltage prediction device for a new energy distribution network in the present invention. DETAILED DESCRIPTION
[0077] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in the present invention are only part of the embodiments of the present invention, not all of the embodiments. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.
[0078] Embodiment 1:
[0079] Reference Figure 1 The embodiment of the present invention provides a node voltage prediction method for a new energy distribution network, which specifically includes the following steps:
[0080] Step S1, collecting multiple groups of historical voltage data of each electrical node in the target distribution network and meteorological data of the same time scale according to the set time step, and constructing an original data set;
[0081] Step S2, preprocessing the original data set to obtain multiple sets of complete and available data combinations including voltage history data and corresponding meteorological data to form multiple sets of sample sets;
[0082] Step S3: Based on each sample set, train the constructed multiple long short-term memory network LSTM prediction models respectively, and use the total loss function L v Optimize the parameters of each LSTM prediction model with the minimum as the goal to obtain the final trained LSTM prediction models;
[0083] Step S4: Preprocess the voltage history data within the set time step before the current moment and the meteorological data of the same time scale to obtain multiple data combinations, and input them into the trained corresponding LSTM prediction models to obtain the prediction results of the voltage of each node in the distribution network.
[0084] In this embodiment, the meteorological data includes wind speed data, irradiance data, humidity data, atmospheric pressure data, etc.; a preferred but non-limiting embodiment, since the volatility of wind power and photovoltaic power generation has a greater impact on the node voltage, in this embodiment, historical voltage data, irradiance data and wind speed data are mainly collected: Therefore, the data collected according to the set time step in step 1 can be expressed as: Let the mth electrical node voltage time series be recorded as The irradiance time series of the mth electrical node is recorded as The wind speed time series of the mth electrical node is recorded as in, represents the voltage value of the mth electrical node at the ts time step, represents the irradiance value of the mth electrical node at the ts time step, Represents the wind speed value of the mth electrical node at the ts time step, t represents the current time step, s = 0, 1, 2, ..., S, S + 1 represents the total time step, m = 1, 2, ..., N, N represents the total number of electrical nodes.
[0085] The following takes the collected historical voltage data of the electrical node as an example to further illustrate the preprocessing process in step S2. The preprocessing steps for the historical irradiance data and wind speed data are similar, and will not be repeated here. The details are as follows:
[0086] S2.1. Fill missing values in the voltage data of each electrical node
[0087] The voltage time series Y at the mth electrical node m In If is a missing value, The expression for filling is:
[0088]
[0089] In formula (1), None represents the voltage time series Y of the mth electrical node m The set of all missing values in ;
[0090] S2.2. Correct the abnormal value of the voltage data of each electrical node
[0091] The voltage time series Y at the mth electrical node m In is an abnormal value, then The corrected expression is:
[0092]
[0093] In formula (2), Average means taking arrive The average value, Std means arrive The standard deviation of .
[0094] The present invention ensures the quality of input data by filling missing values and correcting outliers in the collected data, so that the prediction model can be trained based on more accurate data, thereby improving the accuracy and reliability of voltage prediction.
[0095] S2.3. Normalize the voltage data of each electrical node. The expression is:
[0096]
[0097] In formula (3), are the voltage values of the mth electrical node at the ts time step before and after normalization, are the voltage time series Y of the mth electrical node respectively m The maximum and minimum values in .
[0098] The voltage time series of the mth electrical node is recorded as
[0099] S2.4, clustering and grouping electrical nodes with similar characteristics in the distribution network according to the electrical distances between the electrical nodes, and determining the target cluster to which each electrical node belongs;
[0100] Among them, the calculation formula of the electrical distance between each electrical node is as follows:
[0101]
[0102] In the formula, l de is the electrical distance between node d and node e, d and e are two different electrical nodes, Z dd is the self-impedance of node d, Z ee is the self-impedance of node e, Z de is the mutual impedance between node d and node e.
[0103] A preferred but non-limiting embodiment, this embodiment uses a hierarchical clustering algorithm to group electrical nodes with similar voltage characteristics, first calculates the electrical distance between the electrical nodes, and then uses an agglomerative hierarchical clustering algorithm to gradually merge electrical nodes with high similarity according to the electrical distance until they are merged. Those skilled in the art can use algorithms such as K-means clustering and density-based spatial DBSCAN clustering, but in order to obtain better technical effects, the embodiment of the present invention uses an agglomerative hierarchical clustering algorithm to group each electrical node, and the clustering process is as follows:
[0104] Each electrical node is initially regarded as a separate cluster. The electrical distance between clusters is calculated using formula (4). The two clusters with the closest distance are found based on the minimum electrical distance and merged into one cluster. Then the electrical distance between clusters is updated. The electrical distance between clusters is calculated using formula (4) again (if there are two or more electrical nodes in a cluster, the electrical distance between each electrical node in the cluster and other clusters is calculated separately, and the minimum electrical distance is taken). The two clusters with the closest distance are found based on the minimum electrical distance and merged into one cluster. This cycle is repeated until the merger is completed, and finally k clusters are obtained.
[0105] Finally, the historical voltage data of each time step corresponding to all electrical nodes in each grouped cluster and the meteorological data (wind speed data, irradiance data) of the same time scale are combined to obtain the data combination sets corresponding to each cluster, and they are used as sample sets for training the corresponding LSTM prediction models.
[0106] As an embodiment of the present invention, in step S3, the structure of the constructed LSTM prediction model includes multiple layers of long short-term memory network LSTM layers (set to 2 layers in this embodiment); each layer of long short-term memory network LSTM layer includes multiple LSTM unit structures connected in sequence; wherein, the number of LSTM unit structures in each layer of long short-term memory network LSTM layer is the same as the data dimension of the model input, that is, S+1.
[0107] Reference Figure 3 As shown, it is the improved LSTM unit structure of this embodiment, and each LSTM unit structure includes a control gate, a random inactivation Dropout layer and a fully connected layer connected in sequence;
[0108] Among them, the control gate is based on the traditional LSTM unit structure (such as Figure 2 It is obtained by coupling and reorganizing the forget gate, input gate and output gate in the figure.
[0109] Furthermore, the LSTM prediction model constructed in step S3 performs electrical node voltage prediction for each of the k clusters, and records the preprocessed electrical node voltage time series in the jth cluster as The irradiance time series is recorded as The wind speed time series is recorded as Among them, the voltage time series of the qth electrical node in the jth cluster is The irradiance time series of the qth electrical node in the jth cluster is The wind speed time series of the qth electrical node in the jth cluster is q is the total number of electrical nodes in the jth cluster. The improved LSTM control gate is used and the final predicted value of the electrical node voltage is obtained after the random inactivation Dropout layer and the fully connected layer.
[0110] Specifically, each control gate in the LSTM prediction model constructed by the present invention is used to extract the time series characteristics of the input samples at each time step; the specific formula is as follows:
[0111] z′ i =σ(W l ·[h i-1 ,X j′,i, C′ i-1 ]+b l )#(5)
[0112] C′ i = z′ i *C′ i-1 +(1-z′ i )*tanh(z′ i )#(6)
[0113]
[0114] In formulas (5), (6), and (7), z′ i Represents the input data X j′,i Some features of are saved to the current cell state, i is the current time step, σ is the sigmoid activation function, h i-1 Represents the input data X of the previous unit structure connected to the current LSTM unit structure for the previous time step j′,i-1 The hidden state output result after time series feature extraction; the input data of the current time step i is expressed as is the data combination of the voltage of the qth electrical node in the jth cluster at the ith time step and the corresponding meteorological data, C′ i-1 is the cell state at the previous time step, W l and b l are weight matrix and bias term respectively; C′ i is the cell state at the current time step, tanh is the hyperbolic tangent function; is the input data X of the current control gate for the i-th time step j′,i The time series features obtained after feature extraction.
[0115] Furthermore, according to formula (8), each time step of the control gate is output After a random inactivation Dropout layer, to prevent overfitting;
[0116]
[0117] In formula (8), h′ i is the output value after Dropout processing, p is the probability of Dropout, that is, the probability of each neuron being discarded;
[0118] Furthermore, according to formula (9), h′ i After a fully connected layer, the output value h of the voltage of the q electrical nodes in the jth cluster at the i-th time step is obtained i ;
[0119] h i =σ(W y ·h′ i +b y )#(9)
[0120] In formula (9), is the predicted value of the voltage of the q electrical nodes in the jth cluster at the i-th time step, W y , b y are the weights and biases of the fully connected layer respectively;
[0121] As an embodiment of the present invention, the total loss function L in step S3 v The expression is as follows:
[0122]
[0123] L v =α·L v1 +β·L v2 #(12)
[0124] In formulas (10), (11), and (12), L v is the total loss function, L v1 is the amplitude error loss function, L v2 is the weighted amplitude error loss function; q is the number of electrical nodes in the jth cluster, j = 1, 2, 3, …, k; k is the total number of groups obtained by clustering each electrical node; and are the actual value and predicted value of the voltage of the cth electrical node in the jth cluster at the ith time step, is the maximum value of the actual voltage value of the cth electrical node in the jth cluster, c = 1, 2, 3, ..., q; ω c is the weight of the cth electrical node in the jth cluster, α and β are the weights of adjusting L v1 and L v2 Weight hyperparameter of the partial contribution.
[0125] Furthermore, this embodiment trains the constructed LSTM prediction model through back propagation and gradient descent algorithm, and calculates the total loss function L v The network parameters are optimized until the maximum number of iterations or the convergence position of the loss function value is reached, so as to obtain the voltage prediction model of the electrical nodes of the renewable energy distribution network in the future time step, which is used to predict the voltage of the electrical nodes in the actual renewable energy distribution network.
[0126] The effectiveness of the node voltage prediction method for the new energy distribution network provided by the present invention is verified by combining specific examples below.
[0127] Reference Figure 4 , a typical distribution network model is selected, which contains 33 nodes, including multiple renewable energy access points (photovoltaic and wind turbines); the goal is to predict the voltage of each node to evaluate the operating status of the distribution network, especially when wind and solar power generation fluctuate greatly.
[0128] Configuration parameters: The distribution network contains 33 nodes, and the voltage status of each node needs to be predicted; there are multiple new energy access points, and the wind farm and solar power plant are connected to nodes 13, 14, 18, 21 and 33 respectively; the voltage of the node is affected by climate conditions and the output of new energy power generation.
[0129] Data preparation: First, it is necessary to collect a variety of data to provide input for voltage prediction, collect historical voltage, irradiance and wind speed data of each node, and grid topology data: including electrical connection information between nodes, cable parameters, etc.
[0130] Data preprocessing: Obtain the historical voltage data, irradiance data, and wind speed data of each electrical node in the target distribution network, fill in missing values and correct outliers in the historical data, and use the normalization method to process the voltage data of the electrical nodes to eliminate the dimensional impact.
[0131] Cluster analysis: Calculate the electrical distance between electrical nodes to measure the tightness of the electrical connection between nodes. Use agglomerative hierarchical clustering algorithm to gradually merge electrical nodes with high similarity based on electrical distance and group electrical nodes with similar voltage characteristics.
[0132] Construct a prediction model: Each node has historical data of multiple time steps and three features. The data of each time step includes voltage, irradiance, and wind speed. All preprocessed electrical node voltage time series, wind speed time series, and temperature time series in the grouped clusters are input into the improved long short-term memory network, and then pass through the random inactivation layer and the fully connected layer to prevent overfitting.
[0133] Model training: An improved electrical node voltage loss function is used to combine the amplitude error and weighted error to improve the prediction accuracy. The neural network model is trained through back propagation and gradient descent algorithms, and the loss function is calculated to optimize the network parameters until the maximum number of iterations is reached or the loss function value converges to obtain the voltage prediction model of the electrical nodes of the new energy distribution network in the future time step.
[0134] The voltage of 33 nodes is predicted by using the method of the present invention. Figure 5 The prediction results show that the prediction method proposed in the present invention has high accuracy no matter in the case of large voltage fluctuation or in the case of normal voltage.
[0135] In order to better reflect the superiority of the present invention in predicting node voltage in the new energy distribution network, the machine learning algorithms support vector machine (SVM) and time convolution network (TCN) are selected to predict the voltage respectively, and the prediction results are used as comparison; Figure 6It can be seen from the comparison results in that the voltage prediction effect of the present invention is better than that of the support vector machine and the time convolution network.
[0136] The beneficial effect of the present invention is that, compared with the prior art,
[0137] 1. The present invention constructs training samples by clustering nodes with similar voltage characteristics, so that the grouped LSTM prediction model can process multiple node data at the same time, learn complex time series characteristics based on historical data, and effectively improve the voltage prediction efficiency in the distribution network when large-scale renewable energy is connected.
[0138] 2. Compared with the traditional LSTM unit structure, the structure of the long short-term memory network LSTM layer in the LSTM prediction model constructed by the present invention has only one control gate, and the forget gate, input gate and output gate in the traditional LSTM unit structure are coupled and reorganized to obtain a new control gate; compared with the traditional LSTM model, the improved LSTM prediction model of the present invention can reduce the number of parameter updates to a greater extent, while reducing the calculation steps of variables, reducing the complexity of the model, and can better capture the variation law of node voltage, thereby improving the accuracy of model prediction and training speed. The automation and accuracy of voltage prediction can effectively reduce the operation and maintenance cost of the distribution network;
[0139] 3. The LSTM prediction model constructed by the present invention combines the Dropout layer and the fully connected layer, so that the model can better capture the long-term dependencies in the time series data, effectively avoid the overfitting problem, and improve the robustness and stability of the model in a complex power grid environment.
[0140] 4. Traditional voltage prediction models usually use mean square error as the loss function. Traditional loss functions cannot effectively handle the errors in voltage amplitudes of different nodes, especially the problem of poor prediction accuracy for key nodes. The present invention adopts an improved electrical node voltage loss function, which combines the amplitude error and the weighted error. It can more comprehensively evaluate the prediction results and guide the optimization of model parameters, thereby improving the accuracy of the prediction.
[0141] 5. The present invention can train a high-precision LSTM prediction model with stronger model generalization ability and feature extraction ability, which can better adapt to different distribution network environments and data changes, improve the accuracy and reliability of voltage prediction of each electrical node in the distribution network, and help promote the optimized scheduling and stable operation of the smart grid.
[0142] Embodiment 2:
[0143] like Figure 7As shown, the present invention provides a node voltage prediction device for a new energy distribution network, the device is used to implement the steps of the method in the above embodiment 1, and the device specifically includes:
[0144] The acquisition module is used to collect multiple groups of historical voltage data of each electrical node in the target distribution network and meteorological data of the same time scale according to the set time step to construct the original data set;
[0145] A preprocessing module, used to preprocess the original data set to obtain multiple sets of complete and available data combinations containing voltage history data and corresponding meteorological data, forming multiple sets of sample sets;
[0146] The training module is used to train multiple long short-term memory network LSTM prediction models based on each group of sample sets, and use the total loss function L v Optimize the parameters of each LSTM prediction model with the minimum as the goal to obtain the final trained LSTM prediction models;
[0147] The prediction module is used to pre-process the voltage historical data within the set time step before the current moment and the meteorological data of the same time scale to obtain multiple groups of data combinations, and input them into the trained corresponding LSTM prediction models to obtain the prediction results of the voltage of each node in the distribution network.
[0148] In this embodiment, the meteorological data includes wind speed data, irradiance data, temperature data, humidity data and / or atmospheric pressure data.
[0149] Furthermore, the preprocessing module includes:
[0150] The preprocessing unit is used to fill missing values, correct outliers and normalize the collected data.
[0151] A clustering and grouping unit, used to cluster and group electrical nodes with similar characteristics in the distribution network according to the electrical distance between the electrical nodes, and determine the target cluster to which each of the electrical nodes belongs;
[0152] The combination unit is used to combine the historical voltage data of each time step corresponding to all electrical nodes in each grouped cluster and the meteorological data of the same time scale to obtain the data combination set corresponding to each cluster, and use it as the sample set for training each corresponding LSTM prediction model.
[0153] Furthermore, the calculation formula of the electrical distance between each electrical node in the cluster grouping unit is as follows:
[0154]
[0155] In the formula, l deis the electrical distance between node d and node e, d and e are two different electrical nodes, Z dd is the self-impedance of node d, Z ee is the self-impedance of node e, Z de is the mutual impedance between node d and node e.
[0156] In a preferred but non-limiting embodiment, the algorithm used by the clustering and grouping unit to cluster and group electrical nodes with similar characteristics in the distribution network is an agglomerative hierarchical clustering algorithm.
[0157] In this embodiment, the structure of the LSTM prediction model in the training module includes multiple layers of long short-term memory network LSTM layers; each layer of the long short-term memory network LSTM layer includes multiple LSTM unit structures connected in sequence;
[0158] Each of the LSTM unit structures comprises a control gate, a random dropout layer and a fully connected layer connected in sequence;
[0159] The control gate is obtained by coupling and reorganizing the forget gate, input gate and output gate in the traditional LSTM unit structure.
[0160] Furthermore, the control gate is used to extract the timing characteristics of the input samples, and its expression is as follows:
[0161] z′ i =σ(W l ·[h i-1 ,X j′,i ,C′ i-1 ]+b l )
[0162] C′ i = z′ i *C′ i-1 +(1-z′ i )*tanh(z′ i )
[0163]
[0164] In the formula, z′ i Represents the input data X j′,i Some features of are saved to the current cell state, i is the current time step, σ is the sigmoid activation function, h i-1 Represents the input data X of the previous unit structure connected to the current LSTM unit structure for the previous time step j′,i-1 The hidden state output result after time series feature extraction; the input data of the current time step i is expressed as is the data combination of the voltage of the qth electrical node in the jth cluster at the ith time step and the corresponding meteorological data, C′ i-1 is the cell state at the previous time step, W l and b l are weight matrix and bias term respectively; C′ i is the cell state at the current time step, tanh is the hyperbolic tangent function; is the input data X of the current control gate for the i-th time step j′,i The time series features obtained after feature extraction.
[0165] In a preferred but non-limiting embodiment, the total loss function L in the training module is v The expression is as follows:
[0166] L v =α·L v1 +β·L v2
[0167]
[0168] Where, L v is the total loss function, L v1 is the amplitude error loss function, L v2 is the weighted amplitude error loss function; q is the number of electrical nodes in the jth cluster, j = 1, 2, 3, …, k; k is the total number of groups obtained by clustering each electrical node; and are the actual value and predicted value of the voltage of the cth electrical node in the jth cluster at the ith time step, is the maximum value of the actual voltage value of the cth electrical node in the jth cluster, c = 1, 2, 3, ..., q; ω c is the weight of the cth electrical node in the jth cluster, α and β are the weights of adjusting L v1 and L v2 Weight hyperparameter of the partial contribution.
[0169] The node voltage prediction device for the new energy distribution network provided in the embodiment of the present invention and the node voltage prediction method for the new energy distribution network provided in Example 1 are based on the same technical concept, and can produce the beneficial effects as described in Example 1. For the contents not described in detail in this embodiment, please refer to Example 1.
[0170] Embodiment three:
[0171] An embodiment of the present invention provides a terminal, including a processor and a storage medium;
[0172] The storage medium is used to store instructions;
[0173] The processor is used to operate according to the instruction to execute the steps of the method according to any one of the embodiments.
[0174] Embodiment 4:
[0175] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of any method described in Embodiment 1 are implemented.
[0176] The present disclosure may be an apparatus, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0177] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0178] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0179] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0180] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A node voltage prediction method for a new energy distribution network, characterized in that: Methods include: Collect multiple groups of historical voltage data of each electrical node in the target distribution network and meteorological data of the same time scale according to the set time step to construct the original data set; Preprocessing the original data set to obtain multiple sets of complete and available data combinations including voltage history data and corresponding meteorological data to form multiple sets of sample sets; Based on each group of sample sets, multiple long short-term memory network LSTM prediction models are trained respectively, and the total loss function L v Optimize the parameters of each LSTM prediction model with the minimum as the goal to obtain the final trained LSTM prediction models; The voltage historical data within the set time step before the current moment and the meteorological data of the same time scale are preprocessed to obtain multiple data combinations, which are respectively input into the trained corresponding LSTM prediction models to obtain the prediction results of the voltage of each node in the distribution network.
2. The node voltage prediction method for a new energy distribution network according to claim 1 is characterized in that: The meteorological data includes wind speed data, irradiance data, temperature data, humidity data and / or atmospheric pressure data.
3. The node voltage prediction method for a new energy distribution network according to claim 1, characterized in that: The pre-processing steps include: The collected data are then filled with missing values, corrected for outliers and normalized.
4. The node voltage prediction method for a new energy distribution network according to claim 3 is characterized in that: The pre-processing step also includes: Clustering and grouping electrical nodes with similar characteristics in the distribution network according to the electrical distances between the electrical nodes, and determining the target cluster to which each electrical node belongs; The historical voltage data of each time step corresponding to all electrical nodes in each grouped cluster and the meteorological data of the same time scale are combined to obtain the data combination sets corresponding to each cluster, and they are used as sample sets for training the corresponding LSTM prediction models.
5. The node voltage prediction method for a new energy distribution network according to claim 4 is characterized in that: The calculation formula of the electrical distance between the electrical nodes is as follows: In the formula, l de is the electrical distance between node d and node e, d and e are two different electrical nodes, Z dd is the self-impedance of node d, Z ee is the self-impedance of node e, Z de is the mutual impedance between node d and node e.
6. The node voltage prediction method for a new energy distribution network according to claim 4 is characterized in that: The algorithm used for clustering and grouping electrical nodes with similar characteristics in the distribution network is an agglomerative hierarchical clustering algorithm.
7. The node voltage prediction method for a new energy distribution network according to claim 1, characterized in that: The structure of the LSTM prediction model includes multiple layers of long short-term memory network LSTM layers; each layer of long short-term memory network LSTM layer includes multiple LSTM unit structures connected in sequence; Each of the LSTM unit structures comprises a control gate, a random dropout layer and a fully connected layer connected in sequence; The control gate is obtained by coupling and reorganizing the forget gate, input gate and output gate in the traditional LSTM unit structure.
8. The node voltage prediction method for a new energy distribution network according to claim 7, characterized in that: The control gate is used to extract the timing characteristics of the input sample, and its expression is as follows: z i ′ =σ(W l ·[h i-1 ,X j′,i ,C i ′ -1 ]+b l ) C i ′ =z i ′ *C i ′ -1 +(1-z i ′ )*tanh(z i ′ ) In the formula, z i ′ Represents the input data X j′,i Some features of are saved to the current cell state, i is the current time step, σ is the sigmoid activation function, h i-1 Represents the input data X of the previous unit structure connected to the current LSTM unit structure for the previous time step j′,i-1 The hidden state output result after time series feature extraction; the input data of the current time step i is expressed as is the data combination of the voltage of the qth electrical node in the jth cluster at the ith time step and the corresponding meteorological data, C i ′ -1 is the cell state at the previous time step, W l and b l are weight matrix and bias term respectively; C i ′ is the cell state at the current time step, tanh is the hyperbolic tangent function; is the input data X of the current control gate for the i-th time step j′,i The time series features obtained after feature extraction.
9. The node voltage prediction method for a new energy distribution network according to claim 4, characterized in that: The total loss function L v The expression is as follows: L v =α·L v1 +β·L v2 Where, L v is the total loss function, L v1 is the amplitude error loss function, L v2 is the weighted amplitude error loss function; q is the number of electrical nodes in the jth cluster, j = 1, 2, 3, …, k; k is the total number of groups obtained by clustering each electrical node; and are the actual value and predicted value of the voltage of the cth electrical node in the jth cluster at the ith time step, is the maximum value of the actual voltage value of the cth electrical node in the jth cluster, c = 1, 2, 3, ..., q; ω c is the weight of the cth electrical node in the jth cluster, α and β are the weights of adjusting L v1 and L v2 Weight hyperparameter of the partial contribution.
10. A node voltage prediction device for a new energy distribution network, running the node voltage prediction method for a new energy distribution network as claimed in any one of claims 1 to 9, characterized in that: include: The acquisition module is used to collect multiple groups of historical voltage data of each electrical node in the target distribution network and meteorological data of the same time scale according to the set time step to construct the original data set; A preprocessing module, used to preprocess the original data set to obtain multiple sets of complete and available data combinations containing voltage history data and corresponding meteorological data, forming multiple sets of sample sets; The training module is used to train multiple long short-term memory network LSTM prediction models based on each group of sample sets, and use the total loss function L v Optimize the parameters of each LSTM prediction model with the minimum as the goal to obtain the final trained LSTM prediction models; The prediction module is used to pre-process the voltage historical data within the set time step before the current moment and the meteorological data of the same time scale to obtain multiple groups of data combinations, and input them into the trained corresponding LSTM prediction models to obtain the prediction results of the voltage of each node in the distribution network.
11. The node voltage prediction device for a new energy distribution network according to claim 10, characterized in that: The meteorological data includes wind speed data, irradiance data, temperature data, humidity data and / or atmospheric pressure data.
12. The node voltage prediction device for a new energy distribution network according to claim 10, characterized in that: The preprocessing module comprises: The preprocessing unit is used to fill missing values, correct outliers and normalize the collected data.
13. The node voltage prediction device for a new energy distribution network according to claim 12, characterized in that: The preprocessing module also includes: A clustering and grouping unit, used to cluster and group electrical nodes with similar characteristics in the distribution network according to the electrical distance between the electrical nodes, and determine the target cluster to which each of the electrical nodes belongs; The combination unit is used to combine the historical voltage data of each time step corresponding to all electrical nodes in each grouped cluster and the meteorological data of the same time scale to obtain the data combination set corresponding to each cluster, and use it as the sample set for training each corresponding LSTM prediction model.
14. The node voltage prediction device for a new energy distribution network according to claim 13, characterized in that: The calculation formula of the electrical distance between each electrical node in the cluster grouping unit is as follows: In the formula, l de is the electrical distance between node d and node e, d and e are two different electrical nodes, Z dd is the self-impedance of node d, Z ee is the self-impedance of node e, Z de is the mutual impedance between node d and node e.
15. The node voltage prediction device for a new energy distribution network according to claim 14, characterized in that: The algorithm used by the clustering grouping unit to cluster and group electrical nodes with similar characteristics in the distribution network is an agglomerative hierarchical clustering algorithm.
16. The node voltage prediction device for a new energy distribution network according to claim 10, characterized in that: The structure of the LSTM prediction model in the training module includes multiple layers of long short-term memory network LSTM layers; each layer of long short-term memory network LSTM layer includes multiple LSTM unit structures connected in sequence; Each of the LSTM unit structures comprises a control gate, a random dropout layer and a fully connected layer connected in sequence; The control gate is obtained by coupling and reorganizing the forget gate, input gate and output gate in the traditional LSTM unit structure.
17. The node voltage prediction device for a new energy distribution network according to claim 16, characterized in that: The control gate is used to extract the timing characteristics of the input sample, and its expression is as follows: z i ′ =σ(W l ·[h i-1 ,X j′,i ,C i ′ -1 ]+b l ) C i ′ =z i ′ *C i ′ -1 +(1-z i ′ )*tanh(z i ′ ) In the formula, z i ′ Represents the input data X j′,i Some features of are saved to the current cell state, i is the current time step, σ is the sigmoid activation function, h i-1 Represents the input data X of the previous unit structure connected to the current LSTM unit structure for the previous time step j′,i-1 The hidden state output result after time series feature extraction; the input data of the current time step i is expressed as is the data combination of the voltage of the qth electrical node in the jth cluster at the ith time step and the corresponding meteorological data, C i ′ -1 is the cell state at the previous time step, W l and b l are weight matrix and bias term respectively; C i ′ is the cell state at the current time step, tanh is the hyperbolic tangent function; is the input data X of the current control gate for the i-th time step j′,i The time series features obtained after feature extraction.
18. The node voltage prediction device for a new energy distribution network according to claim 13, characterized in that: The total loss function L in the training module v The expression is as follows: L v =α·L v1 +β·L v2 Where, L v is the total loss function, L v1 is the amplitude error loss function, L v2 is the weighted amplitude error loss function; q is the number of electrical nodes in the jth cluster, j = 1, 2, 3, …, k; k is the total number of groups obtained by clustering each electrical node; and are the actual value and predicted value of the voltage of the cth electrical node in the jth cluster at the ith time step, is the maximum value of the actual voltage value of the cth electrical node in the jth cluster, c = 1, 2, 3, ..., q; ω c is the weight of the cth electrical node in the jth cluster, α and β are the weights of adjusting L v1 and L v2 Weight hyperparameter of the partial contribution.
19. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1-9.
20. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Cited By
Power distribution network edge voltage prediction method and system for lightweight deployment of edge devices
CN121710210A