Model and Data-Driven Power Flow Calculation Method for Power Systems
By establishing a simplified linear flow model and using deep neural network fitting errors to build a composite model of the power system, the problem of rapid and accurate solution in the power system flow calculation is solved, and efficient and accurate flow calculation is achieved.
Patent Information
- Application Number
- CN202211018732.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-24
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-08-24
AI Technical Summary
The prior art is difficult to quickly and accurately solve in power system trend calculation. The linear trend model approximation method introduces errors, and the data-driven method loses the interpretability of the trend model.
采用基于模型与数据驱动的方法,建立简化的线性潮流模型,并利用深度神经网络拟合线性潮流简化所带来的误差,构建电力系统复合模型,通过训练和重复训练降低非线性误差。
It realizes the rapid solution to the line trend of power systems, ensures the accuracy of the results, has fast calculation speed, high efficiency and small errors.
Smart Images

Figure CN115393122B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power, and more particularly, to a power flow calculation method for a power system based on model and data-driven. Background Art
[0002] In recent years, renewable energy has developed rapidly worldwide, forming a new power system with large-scale access of renewable energy. Considering that the uncertainty of the new power system has increased significantly, it has had a major impact on power system analysis. Power flow calculation is of great significance for the safe operation and optimal dispatching of power systems. However, the power flow model is essentially a set of nonlinear equations, which poses a challenge to the rapid solution of power system power flow.
[0003] Therefore, many linear power flow models have been proposed, using different approximation methods. However, these approximations all introduce certain errors more or less, which will have a certain impact on power system analysis. With the development of machine learning technology, many scholars have focused on using data-driven methods to fit power flow relationships. However, this method only considers the input and output data of the power system, losing the interpretability of the power flow model. Summary of the Invention
[0004] The purpose of the present invention is to solve the problems of the prior art, and provide a power flow calculation method for a power system based on model and data-driven, establish a simplified linear power flow model, use a deep neural network to fit the error caused by the linear power flow simplification, realize the rapid solution of the line power flow of the power system, and ensure the accuracy of the line power flow result at the same time.
[0005] In order to achieve the above purpose, the technical solutions adopted by the present invention are as follows:
[0006] A power flow calculation method for a power system based on model and data-driven, comprising the following steps:
[0007] S1. Obtain the data and information required for the line power flow calculation of the power system;
[0008] S2. Generate multiple power system operation scenarios according to the data and information of the power system, and divide them into a training set, a validation set and a test set;
[0009] S3. Construct a power system composite model including a linear power flow model and a deep neural network, use the training set to train the power system composite model, the linear power flow model calculates the linear power flow of the power system, and compare the linear power flow with the actual power flow of the power system to obtain a power flow difference;
[0010] S4. Input the linear power flow into the deep neural network. The deep neural network fits the linear power flow and the power flow difference to obtain the non - linear error, and retrains the composite power system model until the non - linear error tends to be stable, thus obtaining the trained composite power system model;
[0011] S5. Input the test set into the composite power system model. The linear power flow model outputs the linear power flow, and the deep neural network outputs the non - linear error. According to the linear power flow and the non - linear error, obtain the line power flow of the power system.
[0012] Preferably, the composite power system model is expressed as:
[0013]
[0014] where F represents the line power flow of the power system, X represents the input variable information, represents the linear power flow model, and Δf represents the non - linear error.
[0015] Preferably, the linear power flow model includes the linear node balance equation and the linear power flow equation. The linear node balance equation describes the relationship between the nodal active power and the nodal reactive power and the nodal voltage respectively, and the linear power flow equation describes the relationship between the nodal voltage and the line power flow.
[0016] Preferably, the linear node balance equation is expressed as:
[0017]
[0018] where P represents the injected active power of the node, Q represents the injected reactive power of the node, G represents the nodal conductance matrix, B represents the nodal susceptance matrix, B′ represents the nodal conductance matrix ignoring the shunt susceptance, θ represents the nodal voltage phase angle matrix, and V represents the nodal voltage magnitude matrix.
[0019] Preferably, the linear power flow equation is expressed as:
[0020]
[0021] where P ij represents the active power flow of line i - j, Q ij represents the reactive power flow of line i - j, g ij represents the conductance of line i - j, b ij represents the susceptance of line i - j, V i represents the voltage magnitude of node i, V j represents the voltage magnitude of node j, θ i represents the voltage phase angle of node i, θ j represents the voltage phase angle of node j.
[0022] Preferably, the non - linear error is expressed as:
[0023]
[0024] wherein, g represents an error function model fitted based on a deep neural network.
[0025] Preferably, the deep neural network includes two hidden layers, each hidden layer contains 10 neurons, and the activation function of the hidden layer adopts the sigmoid function.
[0026] An electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the model - and data - driven power system power flow calculation method according to any one of the above.
[0027] A computer - readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps of the model - and data - driven power system power flow calculation method according to any one of the above.
[0028] Compared with the prior art, the present invention establishes a simplified linear power flow model and uses a deep neural network to fit the error caused by the simplification of the linear power flow, which is applicable to application scenarios that require rapid solution of the line power flow of a power system. The calculation method has fast operation speed, high efficiency, and small error. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a schematic flow chart of the model - and data - driven power system power flow calculation method.
[0030] Figure 2 is a schematic structural diagram of a deep neural network.
[0031] Figure 3 is a schematic structural diagram of a power system.
[0032] Figure 4 is a schematic diagram of the error of the active power flow calculation result of a power system.
[0033] Figure 5 is a schematic diagram of the error of the reactive power flow calculation result of a power system. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0034] The following further describes the model - and data - driven power system power flow calculation method of the present invention with reference to the drawings and specific embodiments.
[0035] Please refer to Figure 1 , the model - and data - driven power system power flow calculation method provided by the present invention includes the following steps:
[0036] S1. Obtain the data and information required for the line power flow calculation of the power system.
[0037] S2. Generate multiple power system operation scenarios based on the data and information of the power system, and divide them into a training set, a validation set, and a test set.
[0038] S3. Construct a power system composite model including a linear power flow model and a deep neural network, and use the training set to train the power system composite model. The linear power flow model calculates the linear power flow of the power system, and compares the linear power flow with the actual power flow of the power system to obtain the power flow difference.
[0039] S4. Input the linear power flow into the deep neural network. The deep neural network fits the linear power flow and the power flow difference to obtain the non - linear error, and repeatedly trains the power system composite model until the non - linear error tends to be stable, and obtain the trained power system composite model.
[0040] S5. Input the test set into the power system composite model. The linear power flow model outputs the linear power flow, and the deep neural network outputs the non - linear error. According to the linear power flow and the non - linear error, obtain the line power flow of the power system.
[0041] In this embodiment, the power system composite model constructed including a linear power flow model and a deep neural network is expressed as:
[0042]
[0043] Among them, F represents the line power flow of the power system, X represents the input variable information, represents the linear power flow model, and Δf represents the non - linear error.
[0044] Linear power flow model Includes a linear nodal power balance equation and a linear power flow equation. The linear nodal power balance equation describes the relationship between the nodal active power and the nodal reactive power and the nodal voltage respectively, and the linear power flow equation describes the relationship between the nodal voltage and the line power flow.
[0045] The linear nodal power balance equation is expressed as:
[0046]
[0047] Among them, P represents the nodal injected active power, Q represents the nodal injected reactive power, G represents the nodal conductance matrix, B represents the nodal susceptance matrix, B′ represents the nodal conductance matrix ignoring the shunt susceptance, θ represents the nodal voltage phase angle matrix, and V represents the nodal voltage magnitude matrix.
[0048] The linear power flow equation is expressed as:
[0049]
[0050] Among them, P ij represents the active power flow of line i-j, Q ij represents the reactive power flow of line i-j, g ij represents the conductance of line i-j, b ij represents the susceptance of line i-j, V i represents the voltage magnitude of node i, V j represents the voltage magnitude of node j, θ i represents the voltage phase angle of node i, θ j represents the voltage phase angle of node j.
[0051] Please refer to Figure 2 , use a deep neural network to fit the linear power flow and power flow difference to obtain the non-linear error. The deep neural network includes two hidden layers, each hidden layer contains 10 neurons, and the activation function of the hidden layer uses the sigmoid function. The non-linear error is expressed as:
[0052]
[0053] Among them, g represents the error function model fitted based on the deep neural network.
[0054] Specifically, taking the Figure 3 shown IEEE 30-bus power system as an example, use the power flow calculation method based on model and data-driven of the present invention for calculation. This power system includes 6 new energy units and 41 transmission lines, and the power base value is 100 MVA. Among them, the detailed data of the balancing unit and other PV node units are shown in Table 1 and Table 2 respectively.
[0055] Table 1. Detailed data of the main network in the IEEE 30-bus power system
[0056]
[0057] Table 2. Detailed data of CHP units in the integrated electricity-gas-heat energy system
[0058]
[0059]
[0060] According to the data and information of the power system provided in Table 1 and Table 2, considering the uncertainties of generator output and load, assuming that the generator output, active load, and reactive load follow a normal distribution with the data provided by the IEEE 30-bus power system as the mean and 0.1 as the standard deviation, 1000 operation scenarios of the power system are generated using the MATLAB programming software. Among the 1000 generated operation scenarios of the power system, 700 operation scenarios of the power system are divided into the training set, 150 operation scenarios of the power system are divided into the validation set, and 150 operation scenarios of the power system are divided into the test set.
[0061] When training the power system composite model using the training set, the linearized power flow model is used for the linear nodal balance equation and the linear power flow equation to calculate the linear power flow of the power system under each operation scenario. The Newton-Raphson method is used to calculate the actual power flow of the power system under each operation scenario in the training set, and the power flow difference between the linear power flow and the actual power flow is compared. In this embodiment, the power flow result of the power system calculated using the Newton-Raphson method is the actual power flow of the power system.
[0062] The linear power flow is input into the deep neural network of the power system composite model, and the deep neural network is used to fit the linear power flow and the power flow difference to obtain the non-linear error. The power system composite model is repeatedly trained using the training set until the non-linear error tends to be stable, and the trained power system composite model is obtained.
[0063] The test set is input into the power system composite model. The linear power flow model outputs the linear power flow of the power system, and the deep neural network outputs the non-linear error. According to the linear power flow and the non-linear error of the power system, the line power flow of the power system is obtained.
[0064] The Newton-Raphson method is used to calculate the actual power flow of the power system under each operation scenario in the test set. The line power flow output by the power system composite model is compared with the actual power flow. The calculation results of the active power flow and the reactive power flow of the IEEE 30-bus power system have errors as shown in Figure 4 and Figure 5 respectively. It can be seen that the power flow error is at the order of magnitude of 10 to the power of -3, and the error is very small.
[0065] The total operation time of the 150 operation scenarios in the test set is shown in Table 3. It can be seen that the calculation speed of the power flow calculation method of the power flow model based on model and data-driven of the present invention is greatly improved compared with the Newton-Raphson method.
[0066] Table 3. Comparison of total operation time of test scenarios
[0067] Method type Time (seconds) Newton-Raphson method 1.88 Model and data-driven method 0.18
[0068] In summary, the present invention establishes a simplified linear power flow model and uses a deep neural network to fit the error caused by the simplification of the linear power flow. It is applicable to the application scenarios that require rapid solution of the line power flow of the power system. The calculation method has fast operation speed, high efficiency and small error. While ensuring the calculation accuracy, it can achieve rapid solution of the power flow and greatly reduce the calculation time.
[0069] The present invention also discloses an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the power system power flow calculation method based on model and data driving as described in any one of the above, and has the corresponding functions and beneficial effects of the power system power flow calculation method based on model and data driving.
[0070] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the power system power flow calculation method based on model and data driving as described in any one of the above, and has the corresponding functions and beneficial effects of the power system power flow calculation method based on model and data driving.
[0071] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of the present invention. The foregoing storage medium includes: USB flash drive, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes.
[0072] More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection part (electronic device) having one or more wirings, a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber device, and portable compact disc read-only memory (CDROM). In addition, the computer-readable medium can even be paper or other suitable media on which a program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation or, if necessary, other appropriate processing, and then stored in a computer memory.
[0073] The above description is a detailed description of the preferred and feasible embodiments of the present invention. However, the embodiments are not intended to limit the scope of the patent application of the present invention. Any equivalent changes or modifications made under the technical spirit disclosed by the present invention shall fall within the scope of the patent covered by the present invention.
Claims
1. A power system power flow calculation method based on model and data-driven, characterized in that, it includes the following steps: S1. Obtain the data and information required for the line power flow calculation of the power system; S2. Generate multiple power system operation scenarios according to the data and information of the power system, and divide them into a training set, a validation set and a test set; S3. Construct a power system composite model including a linear power flow model and a deep neural network, use the training set to train the power system composite model, the linear power flow model calculates the linear power flow of the power system, and compare the linear power flow with the actual power flow of the power system to obtain a power flow difference; S4. Input the linear power flow into the deep neural network, the deep neural network fits the linear power flow and the power flow difference to obtain a non-linear error, and repeat the training of the power system composite model until the non-linear error tends to be stable, and obtain a trained power system composite model; S5. Input the test set into the power system composite model, the linear power flow model outputs the linear power flow, the deep neural network outputs the non-linear error, and according to the linear power flow and the non-linear error, obtain the line power flow of the power system; The power system composite model is expressed as: Among them, F represents the line power flow of the power system, and X represents the input variable information. represents the linear power flow model, and Δf represents the non-linear error. Linear power flow model It includes linear node balance equations and linear power flow equations. The linear node balance equations describe the relationships between the active power and reactive power of nodes and the node voltages respectively, and the linear power flow equations describe the relationships between the node voltages and the line power flows.
2. The power system power flow calculation method based on model and data-driven according to claim 1, characterized in that, The linear node balance equation is expressed as: Where, P represents the active power injected at the node, Q represents the reactive power injected at the node, G represents the node conductance matrix, B represents the node susceptance matrix, B′ represents the node conductance matrix ignoring the shunt susceptance, θ represents the node voltage phase angle matrix, and V represents the node voltage amplitude matrix.
3. The power system power flow calculation method based on model and data-driven according to claim 1, characterized in that, The linear power flow equation is expressed as: Among them, P ij represents the active power flow of line i-j, Q ij represents the reactive power flow of line i-j, g ij represents the conductance of line i-j, b ij represents the susceptance of line i-j, V i represents the voltage magnitude of node i, V j represents the voltage magnitude of node j, θ i represents the voltage phase angle of node i, θ j represents the voltage phase angle of node j.
4. The power system power flow calculation method based on model and data-driven according to claim 1, characterized in that, The non-linear error is expressed as: Where, g represents the error function model fitted based on the deep neural network.
5. The power system power flow calculation method based on model and data-driven according to claim 1, characterized in that, The deep neural network includes two hidden layers, each hidden layer contains 10 neurons, and the activation function of the hidden layer adopts the sigmoid function.
6. An electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the power system power flow calculation method based on model and data-driven according to any one of claims 1 to 5.
7. A computer-readable storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by the processor, it implements the steps of the power system power flow calculation method based on model and data-driven according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method for improving expansibility of deep neural network power flow model
CN110829434A
Model-driven graph convolutional neural network load flow calculation method
CN114861874A