A voltage tracing method based on data-driven power flow
By constructing a fully connected neural network model based on deep learning, the problems of long flow calculation time and low voltage traceability efficiency in the power system are solved, and fast and accurate voltage traceability and trend calculation are achieved, which improves the operating stability and power quality of the power system.
Patent Information
- Application Number
- CN202510148581.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-11
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-02-11
AI Technical Summary
The current calculation time in existing power systems is long, the voltage traceability efficiency is low and unstable, making it difficult to adapt to the complex operation needs of large-scale power systems.
Using a fully connected neural network model based on data-driven and deep learning, a power system trend model is built, the voltage trend is quickly calculated through training the model, and voltage traceability is achieved using the sensitivity matrix.
While ensuring the calculation accuracy, the speed and efficiency of the power system current calculation is significantly improved, rapid voltage traceability is achieved, and the power quality and voltage stability of the power system are improved.
Smart Images

Figure CN119627938B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power system analysis, and in particular relates to a voltage tracing method based on data-driven power flow. Background Art
[0002] The development of new energy is advancing by leaps and bounds. New energy such as wind power and photovoltaics have replaced traditional fossil energy and become a key link in achieving the dual carbon goals and building a new power system. However, with the rapid growth of renewable energy with strong randomness, the number of sources of uncertainty in the power system has increased greatly. This phenomenon has increased the operating pressure of the power system, making the power grid operation state complex and changeable, threatening the reliable and economic operation of the power grid, and posing new challenges to voltage stability. Through power flow calculation, the voltage fluctuation in the power system can be traced to the source, and the nodes that cause the unstable voltage of the power grid can be determined to improve the power supply quality of the power grid.
[0003] At present, the most commonly used power flow calculation method in power systems is the Newton-Raphson method. The number of iterations is basically independent of the network scale and has good convergence reliability, but each iterative calculation process requires the re-formation and calculation of the modified equation set, resulting in a long overall calculation time. Data-driven methods can increase the calculation speed, but generally only have a single hidden layer structure, making it difficult to extract high-dimensional complex nonlinear features, and are only suitable for small-scale systems. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a voltage tracing method based on data-driven power flow, which constructs a fully connected neural network model based on data-driven and deep learning algorithms to realize voltage power flow calculation and tracing, solving the problems of long power system power flow calculation time, low voltage tracing efficiency and instability.
[0005] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a voltage tracing method based on data-driven power flow, comprising the following steps:
[0006] S1: A fully connected neural network is constructed based on data-driven and deep learning, and the pre-processed historical power system node data is used for training to obtain the power system flow model;
[0007] S2: Input the measured power system node power into the power system power flow model to obtain the node voltage;
[0008] S3: After the measured power changes of the power system nodes, the power changes are input into the power system power flow model to obtain the voltage of the nodes after the power conversion;
[0009] S4: Calculate the node sensitivity matrix based on the node voltage in S2, and calculate the node voltage change rate based on the node voltage in S2 and the node voltage after power conversion in S3;
[0010] S5: Determine whether the voltage change rate is greater than the set threshold. If so, find the voltage limit node and enter S6. Otherwise, the power system is normal and the process ends.
[0011] S6: Based on the node sensitivity matrix, calculate the influence matrix of all nodes in the power system on the voltage-exceeding node, find the node with the greatest influence on the voltage-exceeding node, and complete the voltage tracing.
[0012] The beneficial effects of the present invention are as follows: by constructing a power system flow model, the present invention can quickly realize system flow calculation while ensuring calculation accuracy, and use the flow calculation results to construct a system sensitivity matrix to realize voltage over-limit judgment and voltage tracing, effectively improving the accuracy and speed of power system flow calculation, and at the same time quickly finding the nodes that have the greatest impact on system nodes, realizing voltage tracing, providing a basis for power system maintenance, facilitating technical personnel to formulate power system maintenance strategies, improve the power quality of the power system, and ensure the voltage stability of the power system.
[0013] Further: The expression of the power system flow model is as follows:
[0014]
[0015]
[0016] in, is the output of the power system flow model, is the output of the last hidden layer, For the The feed-forward transfer function of the hidden layer, is the node power, For the The feed-forward transfer function of the hidden layer, For the The input of the hidden layer, is the number of hidden layers, are the parameters of the power system flow model, For the The hidden layer and the The weight matrix between the layers and hidden layers, For the The hidden layer and the The offset vector between the hidden layers, is the activation function.
[0017] The beneficial effects of the above further scheme are: by establishing a power system flow model through a fully connected network, the voltage flow calculation data can be effectively processed, and data with different dimensions can be quickly processed, thereby improving the accuracy and speed of the flow calculation.
[0018] Further: the learning algorithm of the power system flow model is a small batch gradient descent method, and the parameters of the power system flow model are updated by the small batch gradient descent method. The calculation expression is as follows:
[0019]
[0020]
[0021] in, is the current gradient vector, is the number of samples, is the learning rate, is the loss function Relative to the current power system flow model parameters The gradient of is the power system flow model parameter The loss function of .
[0022] The beneficial effects of the above further scheme are: through the small batch gradient descent method, the overall sample of the power flow calculation can be decomposed into several small batch samples, and each batch can be trained in turn to update the parameters, thereby reducing the calculation time of the power system power flow model training, improving the data processing speed and improving the local minimum problem, and avoiding the problem of large training samples and slow training required for the power system power flow model.
[0023] Further: the activation function is a ReLU function, wherein the last layer of ReLU function is changed to a linear function, and the gradient calculation expression of the activation function is as follows:
[0024]
[0025]
[0026]
[0027]
[0028] in, For the The gradient of the weights of the hidden layer, For the The error term of the hidden layer, is the transpose symbol, For the The output of the hidden layer, For the The number of neurons in the hidden layer, For the The error term of the hidden layer, For the The weights of the hidden layers, is the Hadamard product, is the error term of the output layer, is the output of the power system flow model, is the actual value, is the last layer of ReLU function, It is the input of the ReLU function of the last layer.
[0029] The beneficial effect of the above further scheme is: using the ReLU function as the activation function, wherein the last layer of ReLU function is changed to a linear function, can improve the generalization ability of the power flow calculation model and enable it to capture a wider range of outputs.
[0030] Further: the calculation expression of the sensitivity matrix of the node is as follows:
[0031]
[0032]
[0033] in, For the The active power change of each node affects the The sensitivity of the node voltage, For the The reactive power change of each node affects the The sensitivity of the node voltage, For the The change in node voltage is is the active power change value of the system power, is the reactive power change value of the system power.
[0034] The beneficial effect of the above further solution is that by calculating the sensitivity matrix, it is possible to identify which node's power change has the greatest impact on the voltage.
[0035] Furthermore: the calculation expression of the voltage change rate is as follows:
[0036]
[0037] in, is the voltage change rate, After power conversion The voltage of the node, For the The voltage of a node.
[0038] The beneficial effect of the above further solution is that by calculating the voltage change rate, the voltage over-limit is displayed in a mathematical way, which makes it easier for technicians to identify the voltage over-limit point.
[0039] Further: The calculation expression of the influence matrix is as follows:
[0040]
[0041]
[0042] in, For the The influence of active power change of each node on the voltage exceeding the limit node, For the The influence of reactive power change of each node on the voltage exceeding the limit node, is the voltage exceeding the limit node, For the nodes, For the The sensitivity of active power change of each node to the voltage exceeding the limit node, For the The sensitivity of reactive power change of each node to the voltage exceeding the limit node, For the Active power change value of each node, For the The reactive power change value of each node.
[0043] The beneficial effect of the above further scheme is that by calculating the influence matrix, technicians can more intuitively know which node power change has the greatest impact on the node voltage, thereby quickly finding the power-exceeding node and ensuring the stability of the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 The figure is a flow chart of a voltage tracing method based on data-driven power flow. DETAILED DESCRIPTION
[0045] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0046] Example 1
[0047] like Figure 1As shown, a flow chart of a voltage tracing method based on data-driven power flow includes the following steps:
[0048] S1: A fully connected neural network is constructed based on data-driven and deep learning, and the pre-processed historical power system node data is used for training to obtain the power system flow model;
[0049] S2: Input the measured power system node power into the power system power flow model to obtain the node voltage;
[0050] S3: After the measured power changes of the power system nodes, the power changes are input into the power system power flow model to obtain the voltage of the nodes after the power conversion;
[0051] S4: Calculate the node sensitivity matrix based on the node voltage in S2, and calculate the node voltage change rate based on the node voltage in S2 and the node voltage after power conversion in S3;
[0052] S5: Determine whether the voltage change rate is greater than the set threshold. If so, find the voltage limit node and enter S6. Otherwise, the power system is normal and the process ends.
[0053] S6: Based on the node sensitivity matrix, calculate the influence matrix of all nodes in the power system on the voltage-exceeding node, find the node with the greatest influence on the voltage-exceeding node, and complete the voltage tracing.
[0054] In S1, the historical power system node data includes the voltage amplitude, voltage phase angle, active power, reactive power and other data of the node. These data have different dimensions and have large differences in numerical values. Large differences in numerical values will affect the training efficiency of the power system flow model. It is necessary to normalize the input data of the power system flow model to effectively improve the learning efficiency of the neural network, avoid numerical problems, and reduce the adverse effects of abnormal samples. The specific preprocessing method is the z-score normalization method, and its calculation expression is as follows:
[0055]
[0056] in, For pre-processed historical power system node data, is the historical power system node data, is the sample mean of historical power system node data, is the sample standard deviation of historical power system node data.
[0057] The power system flow model is constructed based on a fully connected neural network. By giving the input data node power, the model output data is the voltage amplitude and phase angle. The neural network model can quickly obtain the voltage corresponding to the node under different input conditions, saving time and cost. The expression of the power system flow model is as follows:
[0058]
[0059]
[0060] in, is the output of the power system flow model, is the output of the last hidden layer, For the The feed-forward transfer function of the hidden layer, is the node power, For the The feed-forward transfer function of the hidden layer, For the The input of the hidden layer, is the number of hidden layers, are the parameters of the power system flow model, For the The hidden layer and the The weight matrix between the layers and hidden layers, For the The hidden layer and the The offset vector between the hidden layers, is the activation function.
[0061] The learning algorithm of the power system flow model is the small batch gradient descent method. The parameters of the power system flow model are updated by the small batch gradient descent method. The calculation expression is as follows:
[0062]
[0063]
[0064] in, is the current gradient vector, is the number of samples, is the learning rate, is the loss function Relative to the current power system flow model parameters The gradient of is the power system flow model parameter The loss function of
[0065] In one embodiment of the present invention, a small batch gradient descent method is used to decompose the overall calculation sample into several batches, and each batch is trained in turn to update the parameters, which can reduce the computational cost of the power system flow model training, improve the data processing speed and improve the local minimum problem, and effectively avoid the problem of large training sample size and slow training required for the neural network flow calculation model. At the same time, the gradient descent method and the stochastic gradient descent method can be used to cope with different data sample sizes, and the Adam optimizer can be used to optimize the power system flow model. The learning rate is adaptively adjusted during the optimization process without manual setting, which improves the convergence speed and alleviates problems such as falling into local minima.
[0066] The loss function of the power system flow model is the MSE mean square error loss function, which can intuitively reflect the fitting effect of the model. At the same time, by minimizing the MSE, it can guide the update of the power system flow model parameters and help the model gradually learn better prediction capabilities. Its calculation expression is as follows:
[0067]
[0068] in, is the loss value, is the true value, This is the value output by the power system flow model.
[0069] The activation function of the power system flow model is the ReLU function, where the last layer of ReLU function is changed to a linear function, so that the power system flow model can capture a wider output. The gradient calculation expression of the activation function is as follows:
[0070]
[0071]
[0072]
[0073]
[0074] in, For the The gradient of the weights of the hidden layer, For the The error term of the hidden layer, is the transpose symbol, For the The output of the hidden layer, For the The number of neurons in the hidden layer, For the The error term of the hidden layer, For the The weights of the hidden layers, is the Hadamard product, is the error term of the output layer, is the output of the power system flow model, is the actual value, is the last layer of ReLU function, It is the input of the ReLU function of the last layer.
[0075] In S4, the node sensitivity matrix is calculated according to the node voltage. The calculation expression of the node sensitivity matrix is as follows:
[0076]
[0077]
[0078] in, For the The active power change of each node affects the The sensitivity of the node voltage, For the The reactive power change of each node affects the The sensitivity of the node voltage, For the The change in node voltage is is the active power change value of the system power, is the reactive power change value of the system power; a positive sensitivity value means that an increase in node power will lead to The increase of node voltage will lead to the increase of node power. By analyzing the sensitivity matrix, it is possible to identify which nodes’ power changes have the greatest impact on the voltage.
[0079] In S4, the voltage change rate of the node is calculated based on the voltage of the node and the voltage of the node after power conversion. The calculation expression of the voltage change rate is as follows:
[0080]
[0081] in, is the voltage change rate, After power conversion The voltage of the node, For the By calculating the voltage change rate, the voltage limit is displayed in a mathematical way, which makes it easier for technicians to identify the voltage limit point.
[0082] The threshold value set in S5 can be set to 0.05. When the calculated voltage change rate is greater than 0.05, the node corresponding to the voltage change rate is identified as a voltage-exceeding node, and the voltage is traced through the sensitivity matrix of the node.
[0083] The calculation expression of the influence matrix in S6 is as follows:
[0084]
[0085]
[0086] in, For the The influence of active power change of each node on the voltage exceeding the limit node, For the The influence of reactive power change of each node on the voltage exceeding the limit node, is the voltage exceeding the limit node, For the nodes, For the The sensitivity of active power change of each node to the voltage exceeding the limit node, For the The sensitivity of reactive power change of each node to the voltage exceeding the limit node, For the Active power change value of each node, For the The reactive power change value of each node; by calculating the influence matrix, technicians can more intuitively know which node power change has the greatest impact on the node voltage.
[0087] The beneficial effects of the present invention are as follows: by constructing a power system flow model, the present invention can quickly realize system flow calculation while ensuring calculation accuracy, and use the flow calculation results to construct a system sensitivity matrix to realize voltage over-limit judgment and voltage tracing, effectively improving the accuracy and speed of power system flow calculation, and at the same time quickly finding the nodes that have the greatest impact on system nodes, realizing voltage tracing, providing a basis for power system maintenance, facilitating technical personnel to formulate power system maintenance strategies, improve the power quality of the power system, and ensure the voltage stability of the power system.
[0088] Example 2
[0089] Now, a voltage tracing method based on data-driven power flow of the present invention is applied to perform voltage tracing on an actual system. An IEEE 5-node system is used as an actual system. In the IEEE 5-node system, node 1 is a balancing node, node 2 is a PV node, nodes 3, 4 and 5 are all PQ nodes, and the voltage amplitudes of nodes 1 and 2 remain unchanged. Now, node 3, node 4 and node 5 are analyzed:
[0090] In this embodiment, the hyperparameters of the power system flow model are set as follows: the learning rate is set to 0.0012, the number of training steps is set to 20, the loss function is set to MSE, the batch size is set to 64, and the optimization algorithm is set to Adam optimizer; the computer hardware configuration used is as follows: the CPU is 12th Gen intel(R) Core(TM) i5-12400F, the memory is 16 GB, the PyTorch deep learning framework is used for neural network training and verification, the version is PyTorch-2.2.1, and the programming language is Python 3.11.8.
[0091] The power of each node in the IEEE 5-node system is set to 0, and the voltages of nodes 3, 4, and 5 are obtained respectively through the established power flow calculation model. Through the calculation expression of the sensitivity matrix, the sensitivity matrix of nodes 3, 4, and 5 in this embodiment is obtained as follows:
[0092]
[0093]
[0094] in, is the sensitivity of the active power change of node 3 to the voltage of node 3, is the sensitivity of the active power change of node 4 to the voltage of node 3, is the sensitivity of the active power change of node 5 to the voltage of node 3, is the sensitivity of the active power change of node 3 to the voltage of node 4, is the sensitivity of the active power change of node 4 to the voltage of node 4, is the sensitivity of the active power change of node 5 to the voltage of node 4, is the sensitivity of the active power change at node 3 to the voltage at node 5, is the sensitivity of the active power change of node 4 to the voltage of node 5, is the sensitivity of the active power change of node 5 to the voltage of node 5; is the sensitivity of node 3 reactive power change to node 3 voltage, is the sensitivity of the reactive power change of node 4 to the voltage of node 3, is the sensitivity of the reactive power change of node 5 to the voltage of node 3, is the sensitivity of the reactive power change at node 3 to the voltage at node 4, is the sensitivity of node 4 reactive power change to node 4 voltage, is the sensitivity of the reactive power change of node 5 to the voltage of node 4, is the sensitivity of the reactive power change at node 3 to the voltage at node 5, is the sensitivity of the reactive power change of node 4 to the voltage of node 5, is the sensitivity of the reactive power change of node 5 to the voltage of node 5;
[0095] The power of the IEEE 5-node system is changed to:
[0096]
[0097]
[0098] After the power system flow model is passed, the node voltage after the system power changes is obtained:
[0099]
[0100] The threshold is set to 0.05. From the above formula, it can be seen that the voltage change rate of 1.0553 relative to 1 is calculated to be 0.0553, which is greater than the set threshold. The node 3 corresponding to the voltage is identified as a voltage-over-limit node.
[0101] Using the sensitivity matrix, we calculate The influence matrix of nodes on node 3 voltage is:
[0102]
[0103]
[0104] in, is the influence of the active power change of node 3 on the voltage of node 3, is the influence of the active power change of node 4 on the voltage of node 3, is the influence of the active power change of node 5 on the voltage of node 3, is the influence of the reactive power change of node 3 on the voltage of node 3, is the influence of the reactive power change of node 4 on the voltage of node 3, is the influence of the reactive power change of node 5 on the voltage of node 3;
[0105] It can be seen that the voltage over-limit of node 3 is affected by multiple nodes, mainly affected by the power fluctuations of node 3 and node 5. In the influence matrix of node 3, the influence degree corresponding to node 3 is , , are greater than the influence of node 5 , , indicating that the voltage of node 3 is most affected by its own power change, and node 5 will have a certain impact.
[0106] Through the present invention, the specific impact of power changes at each node on the over-limit node can be identified, voltage over-limit judgment and voltage tracing can be realized, the accuracy and speed of power system flow calculation can be effectively improved, and the nodes with the greatest impact on system nodes can be quickly found, which provides a basis for the maintenance of the power system, facilitates technical personnel to formulate power system maintenance strategies, improves the power quality of the power system, and ensures the voltage stability of the power system.
Claims
1. A voltage tracing method based on data-driven power flow, characterized in that: The following steps are involved: S1: A fully connected neural network is constructed based on data-driven and deep learning, and the pre-processed historical power system node data is used for training to obtain the power system flow model; S2: Input the measured power system node power into the power system power flow model to obtain the node voltage; S3: After the measured power changes of the power system nodes, the power changes are input into the power system power flow model to obtain the voltage of the nodes after the power conversion; S4: Calculate the node sensitivity matrix based on the node voltage in S2, and calculate the node voltage change rate based on the node voltage in S2 and the node voltage after power conversion in S3; S5: Determine whether the voltage change rate is greater than the set threshold. If so, find the voltage limit node and enter S6. Otherwise, the power system is normal and the process ends. S6: Based on the node sensitivity matrix, calculate the influence matrix of all nodes in the power system on the voltage-exceeding node, find the node with the greatest influence on the voltage-exceeding node, and complete the voltage tracing.
2. The voltage tracing method based on data-driven power flow according to claim 1, characterized in that: The expression of the power system flow model is as follows: in, is the output of the power system flow model, is the output of the last hidden layer, For the The feed-forward transfer function of the hidden layer, is the node power, For the The feed-forward transfer function of the hidden layer, For the The input of the hidden layer, is the number of hidden layers, are the parameters of the power system flow model, For the The hidden layer and the The weight matrix between the layers and hidden layers, For the The hidden layer and the The offset vector between the hidden layers, is the activation function.
3. The voltage tracing method based on data-driven power flow according to claim 2 is characterized in that: The learning algorithm of the power system flow model is the small batch gradient descent method. The parameters of the power system flow model are updated by the small batch gradient descent method. The calculation expression is as follows: in, is the current gradient vector, is the number of samples, is the learning rate, is the loss function Relative to the current power system flow model parameters The gradient of is the power system flow model parameter The loss function of .
4. The voltage tracing method based on data-driven power flow according to claim 2, characterized in that: The activation function is a ReLU function, where the last layer of ReLU function is changed to a linear function, and the gradient calculation expression of the activation function is as follows: in, For the The gradient of the weights of the hidden layer, For the The error term of the hidden layer, is the transpose symbol, For the The output of the hidden layer, For the The number of neurons in the hidden layer, For the The error term of the hidden layer, For the The weights of the hidden layers, is the Hadamard product, is the error term of the output layer, is the output of the power system flow model, is the actual value, is the last layer of ReLU function, It is the input of the ReLU function of the last layer.
5. The voltage tracing method based on data-driven power flow according to claim 1, characterized in that: The calculation expression of the sensitivity matrix of the node is as follows: in, For the The active power change of each node affects the The sensitivity of the node voltage, For the The reactive power change of each node affects the The sensitivity of the node voltage, For the The change in node voltage is is the active power change value of the system power, is the reactive power change value of the system power.
6. The voltage tracing method based on data-driven power flow according to claim 1, characterized in that: The calculation expression of the voltage change rate is as follows: in, is the voltage change rate, After power conversion The voltage of the node, For the The voltage of a node.
7. The voltage tracing method based on data-driven power flow according to claim 1, characterized in that: The calculation expression of the influence matrix is as follows: in, For the The influence of active power change of each node on the voltage exceeding the limit node, For the The influence of reactive power change of each node on the voltage exceeding the limit node, is the voltage exceeding the limit node, For the nodes, For the The sensitivity of active power change of each node to the voltage exceeding the limit node, For the The sensitivity of reactive power change of each node to the voltage exceeding the limit node, For the Active power change value of each node, For the The reactive power change value of each node.
Citation Information
Patent Citations
Distributed photovoltaic voltage control method based on graph convolutional neural network
CN116667369A
Residual network-based voltage sensitivity calculation method, apparatus and device, and medium
CN118708979A