Power flow calculation method of power system and related equipment

By adopting the LeapNet neural network architecture and physical constrained loss function method in the power system, the problem of slow current calculation speed is solved, fast and accurate current calculation is achieved, and the power grid topology changes are adapted to the grid.

CN119918415APending Publication Date: 2025-05-02XI AN JIAOTONG UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510101328.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

The existing trend calculation methods are slow in computing speed in power systems, making it difficult to meet the needs of rapidly changing grid topology and improving time resolution.

Method used

The LeapNet current prediction neural network architecture is adopted, combined with the loss function of the physical constraints of the power system, and linearly transforms the model output through the projection method to generate the power system current calculation neural network model.

Benefits of technology

It significantly improves the speed of power system trend calculation, ensures the accuracy of calculation results, and adapts to the rapid changes in the power grid topology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119918415A_ABST
    Figure CN119918415A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power system load flow calculation method and related equipment, and the speed of electric power system load flow calculation is remarkably improved by using a neural network model. Compared with a traditional physical simulator, the neural network model can complete a large amount of load flow calculation in a shorter time, which is crucial to power grid operation and risk assessment needing quick response. According to the method, the accuracy similar to that of a traditional algorithm based on Newton-Raphson iteration can be achieved. The addition of the physical constraints ensures that the model output result accords with the physical characteristics and operation rules of the actual power grid, and particularly, the projection method strictly ensures the linear equality hard constraints, so that the model almost does not violate the key physical constraints in the training process, and the reliability of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power system flow calculation, and specifically relates to a power system flow calculation method and related equipment. Background Art

[0002] Power flow calculation is the cornerstone of power system operation analysis and planning management. In order to cope with climate change, renewable energy such as solar and wind power need to be integrated into the power grid on a large scale in the coming years to achieve dual carbon goals. This process introduces complex new operational challenges. Due to the intermittent nature of renewable energy generation, multiple scenarios need to be evaluated in real time to mitigate risks, ensure grid security, and avoid cascading failures. In particular, grid operators need to predict the impact of unexpected power outages on specific transmission lines on the grid under different wind and solar conditions.

[0003] In actual operation at this stage, this risk assessment mainly relies on physical solvers and uses the Newton-Raphson iterative algorithm for power flow calculation. The solver is based on input variables such as power generation, load, and topology of the power grid, as well as physical equations for calculating physical quantities such as voltage, phase angle, active / reactive power, and current. However, factors such as the expansion of the power system scale, the rapid changes in the network topology, the increase in the demand for power flow calculation, and the significant increase in the proportion of uncertain new energy sources have all urgently required system operators to increase the speed of power flow calculation.

[0004] In the current operation of the power system, power system operators need to update the power flow forecast results for the next 24 hours (once every hour) every 15 minutes to assess the potential operating risks of the power grid. In order to cope with the uncertainty brought about by energy transformation, the time resolution of power flow forecasting will be further improved (for example, once every 5 minutes) to explore the best possible disposal strategy for the system's potential unsafe state. Therefore, it is urgent to study power flow calculation methods based on neural networks to improve the speed of power flow calculation while ensuring the accuracy of power flow calculation results, and to adapt to the influence of factors such as rapid changes in network topology. Summary of the invention

[0005] The present invention provides a power system power flow calculation method and related equipment, which solves the problem of low accuracy of current power flow calculation results and slow power flow calculation speed.

[0006] To achieve the above object, the present invention provides the following technical solutions: A method for calculating power flow in a power system, comprising: Obtain the topological structure and flow data of the historical operation of the power system; Build the LeapNet trend prediction neural network architecture; The loss function of the physical constraints of the power system is introduced, and the output of the LeapNet power flow prediction neural network architecture is linearly transformed using the projection method to generate a power system power flow calculation neural network model; The neural network model is trained using the topological structure and power flow data of the historical operation of the power system to obtain a trained neural network model for power system power flow calculation; Use the trained neural network model to perform power system flow calculations and obtain calculation results.

[0007] Preferably, in the topology structure and flow data of the historical operation of the power system, the topology structure data includes the node number, node attributes and connection status of the line, and the node attribute is whether the node is a power generation node or a load node; the flow data includes the active power and voltage amplitude of the power generation node, the active power and reactive power of the load node, and the current, voltage amplitude, active power and reactive power at the starting point and end point of the line when the system is running.

[0008] Preferably, the architecture of the LeapNet power flow prediction neural network architecture includes: ProcessingInput layer: network input processing layer, which receives the original input data and performs linear transformation through the fully connected layer, performs nonlinear processing through the LeakyReLU activation function, and outputs hidden features; ResNetLayer layer: Residual network processing layer, which receives hidden feature input and transforms the features through two series-connected fully connected layers. Each fully connected layer is followed by a ReLU activation function, and a residual connection is introduced to add the input features to the transformed features, and output the merged features. LtauNoAdd layer: feature fusion layer, which receives the one-hot encoding of hidden features and line connection status at the same time, first performs a linear transformation of the hidden features in the fully connected layer, then performs Hadamard multiplication of the transformation result and the one-hot encoding of the line status, and finally performs feature mapping through the fully connected layer; DecoderLayer layer: The decoding layer adopts a multi-layer perceptron structure, takes hidden features as input, performs nonlinear transformation through the ReLU activation function, and outputs the transformed feature representation; UnscalingLayer layer: Denormalization layer, which denormalizes the mapping of the original data in the neural network and the output data from the DecoderLayer layer to the original numerical scale; OutputLayer layer: Output mapping layer, which uses linear transformation to map the dimension of hidden features to the target output dimension.

[0009] Preferably, the input and output of the LeapNet power flow prediction neural network architecture are: enter : Includes the active power and voltage amplitude of the power generation node, the active power and reactive power of the load node; enter : represents the unique hot encoding of the line connection status, with the same dimension as the total number of lines. The line status is 1 when it is connected and 0 when it is disconnected; Output : Current amplitude, active power, and voltage amplitude at the starting and ending ends of the line.

[0010] Preferably, the physical constraints of the power system considered in constructing the power system flow calculation model include: · : The current amplitude is non-negative:

[0011] · :The voltage amplitude is non-negative:

[0012] · : Active power loss is a non-negative number:

[0013] · : Energy losses account for between 0.5% and 4% of total power generation:

[0014] · :Joule's Law:

[0015] · : The current amplitude and active power value on the disconnected transmission line are 0. A collection of all lines in the system The set of lines whose connection status is disconnected are:

[0016] · : Energy conservation, that is, the power injected into a node is equal to the sum of the power of the lines connecting the node. Let and are power generation and load respectively, For the node The set of connected edges, for nodes ,have:

[0017] The set of nodes in the power system is , the set of lines is The total number of nodes is The total number of lines is , , , They represent the line current amplitude, node voltage amplitude and active power respectively, is the total power generation of the system, and Respectively represent the starting and ending ends of the line, and The symbol represents the predicted value of the corresponding physical quantity by the neural network model. Represents a route in a route collection.

[0018] Preferably, the linear constraint projection method used to construct the power system flow calculation model is as follows: For physical constraints , if the line state is disconnected, the current and power of the corresponding line in the model output are set to 0; For physical constraints , the projection method is used to optimize the model accuracy. The method is explained as follows: Assume that the input data The power generation and load of the mid-node are , is the learnable parameter of the neural network, and the neural network output The middle line power part is , then there is an equality constraint ,in, , , , is the identity matrix, , Representation Node It is a line The starting end of , the rest of the elements are 0, Representation Node It is a line The terminal end, the rest of the elements are 0; there is a neural network line power prediction value Analytical solution of orthogonal projection to the feasible region of linear equality constraints for:

[0019] in,

[0020]

[0021]

[0022] Will replace As the line power portion of the model output.

[0023] Preferably, the loss function used to construct the power system flow calculation model is as follows: Physical constraints of power systems , , , , , the situation where the model output violates the physical constraints is added as a penalty term to the loss function to optimize the model prediction accuracy. The penalty terms for each physical constraint are designed as , , , , ,set up is an indicator function, which takes the value 1 when the condition is true, otherwise it is 0; · : Current non-positive ratio:

[0024] · : Voltage non-positive ratio:

[0025] · : Non-positive ratio of power loss:

[0026] · : Energy loss ratio violation degree:

[0027] · : Violation of Joule's law:

[0028] The loss function is designed as ,in, is the mean squared error between the model output and its true label, , , , , It is the non-negative weight of each physical constraint penalty term preset during training.

[0029] A power system flow calculation system, comprising: Data acquisition module: used to obtain the topological structure and flow data of the historical operation of the power system; Network architecture building module: used to build the LeapNet power flow prediction neural network architecture; Model generation module: used to introduce the loss function of the physical constraints of the power system and generate the power system power flow calculation neural network model by linearly transforming the output of the LeapNet power flow prediction neural network architecture using the projection method; Training module: used to train the neural network model using the topological structure and flow data of the historical operation of the power system to obtain a trained neural network model for power system flow calculation; Calculation module: used to use the trained neural network model to perform power system flow calculations and obtain calculation results.

[0030] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of a power system flow calculation method are implemented.

[0031] A computer-readable storage medium stores a computer program, which implements the steps of a power system flow calculation method when executed by a processor.

[0032] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides a method for calculating power system flow, which significantly improves the speed of power system flow calculation by using a neural network model. Compared with traditional physical simulators, neural network models can complete a large number of flow calculations in a shorter time, which is crucial for power grid operations and risk assessments that require rapid response. By introducing physical constraints into the neural network model, the present invention can achieve accuracy similar to that of the traditional Newton-Raphson iterative algorithm. The addition of physical constraints ensures that the output results of the model conform to the physical characteristics and operating laws of the actual power grid. In particular, the projection method strictly guarantees the hard constraints of linear equations, so that the model hardly violates these key physical constraints during the training process, thereby improving the reliability of the model.

[0033] Furthermore, the network structure of LeapNet adopted in the present invention is particularly suitable for power systems with variable topology and can adapt to changes in the grid structure, which is particularly important for modern grids that integrate a large amount of renewable energy. The method of the present invention not only performs well on training data, but also can be well generalized to unseen grid topologies, which is of great significance for the expansion and evolution of the grid. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A flow chart of a method for calculating power system flow in the present invention; Figure 2 This is a diagram of the LeapNet trend prediction neural network architecture of the present invention; Figure 3The present invention is a block diagram of a power system flow calculation system. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0036] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0037] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0038] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.

[0039] like Figure 1 As shown, the present invention provides a method for calculating power system flow, comprising: S101 obtains the topological structure and flow data of the historical operation of the power system; S102 builds the LeapNet trend prediction neural network architecture; S103 introduces the loss function of the physical constraints of the power system, and generates a power system power flow calculation neural network model by linearly transforming the output of the LeapNet power flow prediction neural network architecture using a projection method; S104 uses the topological structure and power flow data of the historical operation of the power system to train the neural network model to obtain a trained power system power flow calculation neural network model; S105 uses the trained neural network model to perform power system flow calculation to obtain calculation results.

[0040] In the topological structure and flow data of the historical operation of the power system, the topological structure data includes the node number, node attributes and connection status of the line. The node attribute is whether the node is a power generation node or a load node; the flow data includes the active power and voltage amplitude of the power generation node, the active power and reactive power of the load node, the current, voltage amplitude, active power and reactive power at the starting point and end point of the line when the system is running.

[0041] The architecture of the LeapNet trend prediction neural network architecture includes: ProcessingInput layer: network input processing layer, which receives the original input data and performs linear transformation through the fully connected layer, performs nonlinear processing through the LeakyReLU activation function, and outputs hidden features; ResNetLayer layer: Residual network processing layer, which receives hidden feature input and transforms the features through two series-connected fully connected layers. Each fully connected layer is followed by a ReLU activation function, and a residual connection is introduced to add the input features to the transformed features, and output the merged features. LtauNoAdd layer: feature fusion layer, which receives the one-hot encoding of hidden features and line connection status at the same time, first performs a linear transformation of the hidden features in the fully connected layer, then performs Hadamard multiplication of the transformation result and the one-hot encoding of the line status, and finally performs feature mapping through the fully connected layer; DecoderLayer layer: The decoding layer adopts a multi-layer perceptron structure, takes hidden features as input, performs nonlinear transformation through the ReLU activation function, and outputs the transformed feature representation; UnscalingLayer layer: Denormalization layer, which denormalizes the mapping of the original data in the neural network and the output data from the DecoderLayer layer to the original numerical scale; OutputLayer layer: Output mapping layer, which uses linear transformation to map the dimension of hidden features to the target output dimension.

[0042] The input and output of the LeapNet power flow prediction neural network architecture are: enter : Includes the active power and voltage amplitude of the power generation node, the active power and reactive power of the load node; enter : represents the unique hot encoding of the line connection status, with the same dimension as the total number of lines. The line status is 1 when it is connected and 0 when it is disconnected; Output : Current amplitude, active power, and voltage amplitude at the starting and ending ends of the line.

[0043] The physical constraints of the power system considered in constructing the power system flow calculation model include: · : The current amplitude is non-negative:

[0044] · :The voltage amplitude is non-negative:

[0045] · : Active power loss is a non-negative number:

[0046] · : Energy losses account for between 0.5% and 4% of total power generation:

[0047] · :Joule's Law:

[0048] · : The current amplitude and active power value on the disconnected transmission line are 0. A collection of all lines in the system The set of lines whose connection status is disconnected are:

[0049] · : Energy conservation, that is, the power injected into a node is equal to the sum of the power of the lines connecting the node. Let and are power generation and load respectively, For the node The set of connected edges, for nodes ,have:

[0050] The set of nodes in the power system is , the set of lines is The total number of nodes is The total number of lines is , , , They represent the line current amplitude, node voltage amplitude and active power respectively, is the total power generation of the system, and Respectively represent the starting and ending ends of the line, and The symbol represents the predicted value of the corresponding physical quantity by the neural network model. Represents a route in a route collection.

[0051] The linear constraint projection method used to construct the power system flow calculation model is as follows: For physical constraints , if the line state is disconnected, the current and power of the corresponding line in the model output are set to 0; For physical constraints , the projection method is used to optimize the model accuracy. The method is explained as follows: Assume that the input data The power generation and load of the mid-node are , is the learnable parameter of the neural network, and the neural network output The middle line power part is , then there is an equality constraint ,in, , , , is the identity matrix, , Representation Node It is a line The starting end of , the rest of the elements are 0, Representation Node It is a line The terminal end, the rest of the elements are 0; there is a neural network line power prediction value Analytical solution of orthogonal projection to the feasible region of linear equality constraints for:

[0052] in,

[0053]

[0054]

[0055] Will replace As the line power portion of the model output.

[0056] The loss function used to construct the power system flow calculation model is as follows: Physical constraints of power systems , , , , , the situation where the model output violates the physical constraints is added as a penalty term to the loss function to optimize the model prediction accuracy. The penalty terms for each physical constraint are designed as , , , , ,set up is an indicator function, which takes the value 1 when the condition is true, otherwise it is 0; · : Current non-positive ratio:

[0057] · : Voltage non-positive ratio:

[0058] · : Non-positive ratio of power loss:

[0059] · : Energy loss ratio violation degree:

[0060] · : Violation of Joule's law:

[0061] The loss function is designed as ,in, is the mean squared error between the model output and its true label, , , , , It is the non-negative weight of each physical constraint penalty term preset during training.

[0062] See also Figure 1 Another embodiment of the present invention provides a method for calculating power flow in a power system, comprising the following steps: Step 1, obtain the topological structure data of the power system that needs to be calculated for power flow; the topological structure includes the number of nodes, the attribute information of the nodes and the connection information between the nodes. Collect a large amount of power system operation data, including the production active power and voltage of each node at different times in the same time period, the load active power and reactive power, the current, voltage, and active power at the starting and ending points of the line. First, we need to divide the data set into 4 parts: (1) Training data set: The proposed power flow calculation model should be trained and fitted on this data set. The data set size is 300,000.

[0063] (2) Validation dataset, which can be optionally used to fine-tune the model and analyze convergence behavior. The dataset size is 100,000.

[0064] (3) The test dataset has the same distribution as the training dataset (referring to the number of disconnected lines when topology changes occur) and is only used to evaluate the training model. The dataset size is 100,000.

[0065] (4) An out-of-distribution test dataset, which presents a different topological distribution from the training set (referring to the number of disconnected lines when topological changes occur) and is used to evaluate the generalization ability of the proposed model. The dataset size is 200,000.

[0066] (5) The data in each dataset provided is organized in the form of a dictionary (key, item), and its keyword set is ([' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ']) The keywords have the following meanings: (1) Main input variables: Active power produced ,Voltage , Load active power , reactive power , Represents the state of each transmission line in each state of the current environment. If a line is connected, its corresponding state is True, otherwise it is False.

[0067] (2) Output variable: current at the starting point of the transmission line , the current at the end of the transmission line , Active power at the starting point of the transmission line , Active power at the end of the transmission line , the voltage at the starting point of the transmission line , the voltage at the end of the transmission line .

[0068] (3) Optional input variables: admittance matrix .

[0069] Step 2: Use PyTorch to rebuild the basic power system neural network prediction model based on the LeapNet neural network architecture. It includes the ProcessingInput input layer, ResNetLayer residual network layer, LtauNoAdd layer, DecoderLayer layer, UnscalingLayer denormalization layer and OutputLayer output layer. Use PyTorch to build a basic neural network power system flow prediction model, and its specific structure is as follows: ProcessingInput layer, network input processing layer, receives raw input data It is then linearly transformed through the fully connected layer, and then nonlinearly processed by the LeakyReLU activation function to output hidden features:

[0070] ResNetLayer layer, residual network processing layer, receives hidden feature input from ProcessingInput layer or ResNetLayer layer , feature transformation is performed through two series-connected fully connected layers, each fully connected layer is followed by a ReLU activation function, and a residual connection is introduced to add the input features to the transformed features, and the merged features are output:

[0071]

[0072] LtauNoAdd layer, feature fusion layer, receives the hidden features from ResNetLayer layer and the unique hot encoding of the line connection status First, the hidden features are linearly transformed by the fully connected layer, and then the transformed results are Hadamard multiplied with the line state one-hot encoding, and finally feature mapping is performed through the fully connected layer:

[0073] DecoderLayer layer, decoding layer, uses a multi-layer perceptron structure to hide features As input, it is transformed nonlinearly through the ReLU activation function, and the transformed feature representation is output:

[0074] UnscalingLayer layer, anti-normalization layer, maps the original data in the neural network And the output data from the DecoderLayer layer Denormalize to the original numerical scale:

[0075]

[0076] in, and They are and The denormalized result. , , and They are and The mean and standard deviation of .

[0077] OutputLayer layer, output mapping layer, uses linear transformation to transform hidden features The dimensions of are mapped to the target output dimensions:

[0078] The neural network structure is as follows Figure 2 shown.

[0079] Step 3, design the loss function of the neural network model, add nonlinear physical constraints to the loss function of the model for training, and use the projection method to ensure that the model output can strictly meet the linear physical constraints. The neural network loss function consists of MSE and the penalty term of the physical constraint. The specific implementation method is as follows: (1) Regarding physical constraints If the line state is disconnected, the current and power of the corresponding line in the model output are set to 0.

[0080] (2) Regarding physical constraints , a projection method that strictly guarantees the satisfaction of linear equality constraints is used to optimize the model accuracy. The method is explained as follows: Assume that the input data The power generation and load of the mid-node are , is the learnable parameter of the neural network, and the neural network output The middle line power part is , then there is an equality constraint ,in, , , , is the identity matrix, , Representation Node It is a line The starting end of , the rest of the elements are 0, Representation Node It is a line The terminal end of , and the rest of the elements are 0. There is a neural network line power prediction value Analytical solution of orthogonal projection to the feasible region of linear equality constraints for:

[0081] in,

[0082]

[0083]

[0084] Will replace As the line power portion of the model output.

[0085] (3) Physical constraints of power systems , , , , , the violation of physical constraints by the model output is added as a penalty term to the loss function to optimize the model prediction accuracy. The penalty terms for each physical constraint are designed as , , , , ,set up is an indicator function, which takes the value 1 if the condition is true, otherwise it is 0.

[0086] · : Current non-positive ratio:

[0087] · : Voltage non-positive ratio:

[0088] · : Non-positive ratio of power loss:

[0089] · : Energy loss ratio violation degree:

[0090] · : Violation of Joule's law:

[0091] The loss function is designed as .in, is the mean squared error between the model output and its true label, , , , , It is the non-negative weight of each physical constraint penalty term preset during training.

[0092] Step 4: Use the power system operation data collected in step 1 to train the neural network. The specific implementation method is as follows: S401, instantiate the neural network model and start training the model on the training data set while verifying the model effect on the verification data set to obtain the convergence effect of the loss function or the model fitting effect.

[0093] S402, test the final effect of the model on the test data set and the out-of-distribution test data set to evaluate the accuracy and calculation speed of the current model. The violation rates are shown in Table 1. Physical constraints The violation rates are shown in Table 2.

[0094] Table 1 Physical constraints before and after applying the projection method Violation rate

[0095] Table 2 Physical constraints before and after applying the projection method Violation rate

[0096] Step 5, use the neural network power system flow prediction model to calculate the power system flow and obtain the flow calculation results. Table 3 compares the accuracy of the flow calculation results using the fully connected neural network, LeapNet neural network and this method. Table 4 compares the accuracy of the calculation results on the unseen power grid topology structure such as the unexpected power grid disconnection.

[0097] Table 3 Accuracy of power flow calculation results

[0098] Table 4 Accuracy of power flow calculation results in unseen topology scenarios

[0099] After applying the method of the present invention, the neural network prediction results are and The violation rate is significantly reduced, and the accuracy of power flow calculation results is improved to a certain extent. It is believed that the scheme meets the design requirements.

[0100] like Figure 3As shown, the present invention also provides a power system flow calculation system, comprising: Data acquisition module: used to obtain the topological structure and flow data of the historical operation of the power system; Network architecture building module: used to build the LeapNet power flow prediction neural network architecture; Model generation module: used to introduce the loss function of the physical constraints of the power system and generate the power system power flow calculation neural network model by linearly transforming the output of the LeapNet power flow prediction neural network architecture using the projection method; Training module: used to train the neural network model using the topological structure and flow data of the historical operation of the power system to obtain a trained neural network model for power system flow calculation; Calculation module: used to use the trained neural network model to perform power system flow calculations and obtain calculation results.

[0101] A terminal device is provided in one embodiment of the present invention. The terminal device of this embodiment includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0102] The computer program may be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to accomplish the present invention.

[0103] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0104] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0105] The memory may be used to store the computer programs and / or modules, and the processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory.

[0106] If the module / unit integrated in the terminal device 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 present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0107] Although the embodiments of the present invention are described above in conjunction with the accompanying drawings, the present invention is not limited to the above-mentioned specific embodiments and application fields, and the above-mentioned specific embodiments are only illustrative and instructive, rather than restrictive. Under the guidance of the specification, a person skilled in the art can also make many forms without departing from the scope of protection of the claims of the present invention, all of which belong to the scope of protection of the present invention.

Claims

1. A method for calculating power system flow, characterized in that: include: Obtain the topological structure and flow data of the historical operation of the power system; Build the LeapNet trend prediction neural network architecture; The loss function of the physical constraints of the power system is introduced, and the output of the LeapNet power flow prediction neural network architecture is linearly transformed using the projection method to generate a power system power flow calculation neural network model; The neural network model is trained using the topological structure and power flow data of the historical operation of the power system to obtain a trained neural network model for power system power flow calculation; Use the trained neural network model to perform power system flow calculations and obtain calculation results.

2. A method for calculating power flow in a power system according to claim 1, characterized in that: In the topological structure and flow data of the historical operation of the power system, the topological structure data includes the node number, node attributes and connection status of the line. The node attribute is whether the node is a power generation node or a load node; the flow data includes the active power and voltage amplitude of the power generation node, the active power and reactive power of the load node, the current, voltage amplitude, active power and reactive power at the starting point and end point of the line when the system is running.

3. A method for calculating power flow in a power system according to claim 1, characterized in that: The architecture of the LeapNet trend prediction neural network architecture includes: ProcessingInput layer: network input processing layer, which receives the original input data and performs linear transformation through the fully connected layer, performs nonlinear processing through the LeakyReLU activation function, and outputs hidden features; ResNetLayer layer: Residual network processing layer, which receives hidden feature input and transforms the features through two series-connected fully connected layers. Each fully connected layer is followed by a ReLU activation function, and a residual connection is introduced to add the input features to the transformed features, and output the merged features. LtauNoAdd layer: feature fusion layer, which receives the one-hot encoding of hidden features and line connection status at the same time, first performs a linear transformation of the hidden features in the fully connected layer, then performs Hadamard multiplication of the transformation result and the one-hot encoding of the line status, and finally performs feature mapping through the fully connected layer; DecoderLayer layer: The decoding layer adopts a multi-layer perceptron structure, takes hidden features as input, performs nonlinear transformation through the ReLU activation function, and outputs the transformed feature representation; UnscalingLayer layer: Denormalization layer, which denormalizes the mapping of the original data in the neural network and the output data from the DecoderLayer layer to the original numerical scale; OutputLayer layer: Output mapping layer, which uses linear transformation to map the dimension of hidden features to the target output dimension.

4. A method for calculating power flow in a power system according to claim 1, characterized in that: The input and output of the LeapNet power flow prediction neural network architecture are: enter : Includes the active power and voltage amplitude of the power generation node, the active power and reactive power of the load node; enter : represents the unique hot encoding of the line connection status, with the same dimension as the total number of lines. The line status is 1 when it is connected and 0 when it is disconnected; Output : Current amplitude, active power, and voltage amplitude at the starting and ending ends of the line.

5. A method for calculating power flow in a power system according to claim 1, characterized in that: The physical constraints of the power system considered in constructing the power system flow calculation model include: · : The current amplitude is non-negative: · :The voltage amplitude is non-negative: · : Active power loss is a non-negative number: · : Energy losses range from 0.5% to 4% of total electricity generation: · :Joule's Law: · : The current amplitude and active power value on the disconnected transmission line are 0. A collection of all lines in the system The set of lines whose connection status is disconnected are: · : Energy conservation, that is, the power injected into a node is equal to the sum of the power of the lines connecting the node. Let and are power generation and load respectively, For the node The set of connected edges, for nodes ,have: The set of nodes in the power system is , the set of lines is The total number of nodes is The total number of lines is , , , They represent the line current amplitude, node voltage amplitude and active power respectively, is the total power generation of the system, and Respectively represent the starting and ending ends of the line. The symbol represents the predicted value of the corresponding physical quantity by the neural network model. Represents a route in a route collection.

6. A method for calculating power flow in a power system according to claim 5, characterized in that: The linear constraint projection method used to construct the power system flow calculation model is as follows: For physical constraints , if the line state is disconnected, the current and power of the corresponding line in the model output are set to 0; For physical constraints , the projection method is used to optimize the model accuracy. The method is explained as follows: Assume that the input data The power generation and load of the mid-node are , is the learnable parameter of the neural network, and the neural network output The middle line power part is , then there is an equality constraint ,in, , , , is the identity matrix, , Representation Node It is a line The starting end of , the rest of the elements are 0, Representation Node It is a line The terminal end, the rest of the elements are 0; there is a neural network line power prediction value Analytical solution of orthogonal projection to the feasible region of linear equality constraints for: in, Will replace As the line power portion of the model output.

7. A method for calculating power flow in a power system according to claim 6, characterized in that: The loss function used to construct the power system flow calculation model is as follows: Physical constraints of power systems , , , , , the situation where the model output violates the physical constraints is added as a penalty term to the loss function to optimize the model prediction accuracy. The penalty terms for each physical constraint are designed as , , , , ,set up is an indicator function, which takes the value 1 when the condition is true, otherwise it is 0; · : Current non-positive ratio: · : Voltage non-positive ratio: · : Power loss non-positive ratio: · : Energy loss ratio violation degree: · : Degree of violation of Joule's law: The loss function is designed as ,in, is the mean squared error between the model output and its true label, , , , , It is the non-negative weight of each physical constraint penalty term preset during training.

8. A power system flow calculation system, characterized in that: include: Data acquisition module: used to obtain the topological structure and flow data of the historical operation of the power system; Network architecture building module: used to build the LeapNet power flow prediction neural network architecture; Model generation module: used to introduce the loss function of the physical constraints of the power system and generate the power system power flow calculation neural network model by linearly transforming the output of the LeapNet power flow prediction neural network architecture using the projection method; Training module: used to train the neural network model using the topological structure and flow data of the historical operation of the power system to obtain a trained neural network model for power system flow calculation; Calculation module: used to use the trained neural network model to perform power system flow calculations and obtain calculation results.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the power system power flow calculation method as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of a method for calculating power flow in a power system as claimed in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Reactance perception graph kernel-driven space-time learning and lightweight DC optimal power flow projection scheduling method

    CN120955674A

  • A reactive power aware kernel-driven spatiotemporal learning and lightweight direct current optimal power flow projection scheduling method

    CN120955674B

  • Load flow calculation model and method based on trajectory joint optimization and physical information

    CN121118640A