Power system load flow calculation method and system based on GPU parallel acceleration

Through the methods of sparse matrix storage and GPU parallel acceleration, the problem of low index slice operation efficiency in power system current calculation is solved, and efficient real-time analysis and scheduling of large-scale power grids is realized.

CN120492782APending Publication Date: 2025-08-15XI AN JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510635185.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the prior art, graphics processor GPUs cannot effectively perform index slicing operations in power system trend computing, resulting in low computing efficiency, especially in real-time simulation and scheduling of large-scale power systems.

Method used

The power system flow model is compressed and encoded by the sparse matrix storage method, and the GPU is used to perform parallel acceleration nonlinear flow calculations. The power voltage partial conduction matrix is sliced by sparse matrix multiplication to generate a Jacobian matrix, and a linear equation system is formed by combining the node power mismatch. The GPU linear equation system solver is called for the solution, and iteratively executes until the node power mismatch converges.

Benefits of technology

It significantly improves trend computing performance, reduces computing complexity and time cost, and is suitable for real-time analysis of large-scale power grids, meets the real-time demand of batch trend analysis by the dispatching center, reduces the occupation of GPU threads, and speeds up computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492782A_ABST
    Figure CN120492782A_ABST
Patent Text Reader

Abstract

The invention discloses a power system load flow calculation method and system based on GPU parallel acceleration, and belongs to the field of power systems, and the method comprises the steps: building a power system load flow model, and carrying out the compression coding of the power system load flow model, and obtaining a power system load flow mathematical model; executing parallel acceleration nonlinear load flow calculation by utilizing a GPU, specifically, transmitting an admittance matrix, an initial voltage and a node power parameter to a GPU video memory, and performing parallel calculation on a node power mismatch amount by utilizing the GPU based on a Newton method iteration framework; calculating a power voltage partial derivative matrix based on the admittance matrix, and slicing the power voltage partial derivative matrix through sparse matrix multiplication to generate a Jacobian matrix; combining the Jacobian matrix with the vector of the node power mismatch quantity to form a linear equation set, calling a GPU linear equation set solver to solve the linear equation set to obtain a voltage correction quantity, and updating a node voltage amplitude and a phase angle; and iteratively executing until the node power mismatch amount converges to a preset tolerance, and outputting the voltage phase angle of each node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of power systems, and in particular relates to a method and system for calculating power system flow based on GPU parallel acceleration. Background Art

[0002] Power flow calculation is the cornerstone of modern power system modeling and analysis. With the continuous advancement of energy system electrification, the scale of power systems has significantly expanded from hundreds of nodes to hundreds of thousands of nodes.

[0003] Matrix-based and vectorized parallel power flow calculation methods primarily focus on improving the efficiency of large-scale sparse matrix and iterative algorithms. By leveraging the parallel processing capabilities of modern hardware architectures, these methods can significantly improve the speed and efficiency of power flow calculations. These techniques hold great potential for real-time simulation, scheduling, and planning of large-scale power systems.

[0004] The architecture of central processing units (CPUs) is primarily designed for sequential processing. However, in power flow calculations for large-scale power systems, steps such as solving linear equations or constructing Jacobian matrices often require processing large amounts of data. The sequential processing nature of CPUs leads to lower computational efficiency in these scenarios. In contrast, the architecture of graphics processing units (GPUs) is more suited to parallel data processing. Their large number of processing cores can handle multiple threads simultaneously, allowing GPUs to perform a large number of tasks in parallel. However, despite the advantages of GPUs in parallel computing, inherent limitations of their architecture make them incapable of performing complex operations such as indexing, which are often unavoidable in power flow calculations. Summary of the Invention

[0005] The purpose of the present invention is to overcome the problem that index slicing operations cannot be performed on a GPU, and proposes a power system flow calculation method based on GPU parallel acceleration.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions: A method for calculating power system flow based on GPU parallel acceleration includes the following steps: The power system flow model is established using matrices and vectors, including branch models, busbar models, generator and load models, and power balance equations. The power system flow model is compressed and encoded using a sparse matrix storage method to obtain a mathematical model of the power system flow. Based on the mathematical model of power system flow, GPU is used to perform parallel accelerated nonlinear flow calculations, specifically including: transferring the admittance matrix, initial voltage and node power parameters to the GPU memory, and using the GPU in parallel to calculate the node power mismatch based on the Newton method iterative framework; calculating the power voltage partial derivative matrix based on the admittance matrix, slicing the power voltage partial derivative matrix through sparse matrix multiplication to generate the Jacobian matrix; combining the Jacobian matrix with the vector of the node power mismatch to form a linear equation system, calling the GPU linear equation solver to solve the linear equation system to obtain the voltage correction value, and updating the node voltage amplitude and phase angle; iterating until the node power mismatch converges to the preset tolerance, and outputting the voltage phase angle of each node.

[0007] Furthermore, the branch model is composed of two parallel admittances, one series admittance and two complex voltage ratios, which characterize the electrical parameters of the transformer and the phase shifter.

[0008] Furthermore, the busbar model is connected to all outgoing branches by parallel impedance, and an injection port is introduced to characterize the power injection of the generator or load. The power balance equation is constructed based on Kirchhoff's current law.

[0009] Furthermore, the generator and load model is abstracted as a set of valid operating points on the P / Q plane, which is defined by injecting active power and reactive power.

[0010] Furthermore, the admittance matrix is calculated using a sparse matrix processing method, the node type of the power bus is determined by the input status and working mode of the generator at each node, and the generator power and load at each node are calculated; The node types of the power bus include PQ nodes, PV nodes, and balance nodes; The PQ node has known active power and reactive power; The PV node has known active power and voltage amplitude; The voltage amplitude and voltage phase angle at the balance node are known.

[0011] Furthermore, the calculation of the node power mismatch includes: Calculate the difference between the injected active power and reactive power and the calculated power for the PQ node; Calculate the difference between the injected active power and the calculated power for the PV node.

[0012] Furthermore, the generating of the Jacobian matrix by performing row or column slicing on the power voltage partial derivative matrix by sparse matrix multiplication includes: The partial derivatives of P and Q with respect to voltage amplitude and phase angle in the PQ node are intercepted, and the partial derivative of P with respect to voltage phase angle in the PV node is intercepted. The remaining content in the power voltage partial derivative matrix is discarded, and the Jacobian matrix is formed through splicing operations.

[0013] In a second aspect, the present invention provides a power system flow calculation system based on GPU parallel acceleration, comprising: A power system flow mathematical model module is obtained, which is used to establish a power system flow model using matrices and vectors, including a branch model, a bus model, a generator and load model, and a power balance equation; a sparse matrix storage method is used to compress and encode the power system flow model to obtain a power system flow mathematical model; The GPU nonlinear power flow calculation module is used to use the GPU to perform parallel accelerated nonlinear power flow calculations based on the mathematical model of the power system power flow. Specifically, the module includes: transferring the admittance matrix, initial voltage and node power parameters to the GPU memory, and using the GPU to parallelly calculate the node power mismatch based on the Newton method iterative framework; calculating the power voltage partial derivative matrix based on the admittance matrix, slicing the power voltage partial derivative matrix through sparse matrix multiplication to generate the Jacobian matrix; combining the Jacobian matrix with the vector of the node power mismatch to form a linear equation system, calling the GPU linear equation system solver to solve the linear equation system to obtain the voltage correction value, and updating the node voltage amplitude and phase angle; iterating until the node power mismatch converges to the preset tolerance, and outputting the voltage phase angle of each node.

[0014] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for calculating power system flow based on GPU parallel acceleration is implemented.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, and a method for calculating power system flow based on GPU parallel acceleration when the computer program is executed by a processor.

[0016] Compared with the prior art, the present invention has the following beneficial technical effects: The present invention proposes a method for calculating power system flow based on GPU parallel acceleration, which combines the parallel computing capability of GPU with power system flow calculation, thereby improving the performance of flow calculation. A matrix-vectorized model is adopted, which is easy to derive and program. The thousands of computing cores of the GPU can simultaneously process the calculation tasks of the power mismatch of multiple nodes, compressing the traditional CPU serial calculation time from minutes to seconds, which is particularly suitable for real-time analysis of large-scale power grids. Sparse matrix multiplication is used to slice the sparse structure of the Jacobian matrix to avoid redundant operations on zero elements, improve matrix generation efficiency, and reduce computational complexity. Sparse matrix storage only stores the position and value of non-zero elements, reducing video memory usage and supporting the processing of power grid models with tens of thousands of nodes. The GPU's thread block scheduling mechanism automatically balances the problem of uneven distribution of non-zero elements in sparse matrices, avoiding the performance bottleneck of traditional CPU blocking strategies. During the linear equation solution stage, a GPU-specific solver is called, and mixed-precision calculation is used to accelerate matrix decomposition, reducing the time consumption of a single Newton iteration by more than 80%, making it suitable for online dynamic flow calculation. A single GPU can simultaneously process multiple independent power grid scenarios, meeting the dispatch center's real-time requirements for batch power flow analysis. During the node power mismatch accumulation phase, GPU atomic operations ensure data consistency when multiple threads concurrently update voltage corrections, avoiding the performance penalties of traditional locking mechanisms. This paper addresses the inability to index sparse matrices on GPUs and proposes a novel technology for GPU power flow calculations. This technology not only overcomes the inability to perform indexing and slicing operations on GPUs, but also reduces GPU thread usage and improves computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are for illustrative purposes only and are not intended to limit the scope of the present invention in any way. In addition, the shapes and proportional dimensions of the components in the drawings are only schematic and are used to help understand the present invention, and are not intended to specifically limit the shapes and proportional dimensions of the components of the present invention. In the drawings: Figure 1 This is a flowchart of a method for calculating power system flow based on GPU parallel acceleration according to the present invention.

[0018] Figure 2 This is a structural diagram of a power system flow calculation system based on GPU parallel acceleration in the present invention.

[0019] Figure 3 This is an electronic device diagram of a method for calculating power system flow based on GPU parallel acceleration according to the present invention.

[0020] Figure 4 This is the busbar model of the power system flow model adopted in the present invention.

[0021] Figure 5This is the branch model of the power system flow model adopted by the present invention.

[0022] Figure 6 This is a schematic diagram of the basic principle of implementing slicing operations by applying sparse matrix multiplication on the GPU of the present invention.

[0023] Figure 7 This is a flowchart of the GPU-accelerated nonlinear power flow calculation method of the present invention. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the solutions of the present invention, 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 embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0025] Example 1 See also Figure 1 , a power system flow calculation method based on GPU parallel acceleration, including the following steps: The power system flow model is constructed using matrices and vectors, including branch models, busbar models, generator and load models, and power balance equations. A sparse matrix storage method is used to compress and encode the power system flow model, resulting in a mathematical model of the power system flow. The branch model consists of two shunt admittances, one series admittance, and two complex voltage ratios, representing the electrical parameters of the transformer and phase shifter. The busbar model is connected to all outgoing branches by shunt impedances, and injection ports are introduced to represent power injection from the generator or load. The power balance equation is constructed based on Kirchhoff's current law. The generator and load models are abstracted as a set of valid operating points on the P / Q plane, defined by the injection of active and reactive power.

[0026] Based on the mathematical model of power system flow, GPU is used to perform parallel accelerated nonlinear flow calculations, specifically including: transferring the admittance matrix, initial voltage and node power parameters to the GPU memory, and using the GPU in parallel to calculate the node power mismatch based on the Newton method iterative framework; calculating the power voltage partial derivative matrix based on the admittance matrix, slicing the power voltage partial derivative matrix through sparse matrix multiplication to generate the Jacobian matrix; combining the Jacobian matrix with the vector of the node power mismatch to form a linear equation system, calling the GPU linear equation solver to solve the linear equation system to obtain the voltage correction value, and updating the node voltage amplitude and phase angle; iterating until the node power mismatch converges to the preset tolerance, and outputting the voltage phase angle of each node.

[0027] The admittance matrix is calculated using sparse matrix processing. The node type of the power bus is determined by the generator input status and operating mode at each node, and the generator power and load at each node are calculated. Power bus node types include PQ nodes, PV nodes, and balancing nodes. PQ nodes have known active and reactive power; PV nodes have known active power and voltage amplitude; and balancing nodes have known voltage amplitude and voltage phase angle. Node power mismatch calculations include calculating the difference between the injected active and reactive power and the calculated power for PQ nodes; and calculating the difference between the injected active power and the calculated power for PV nodes. Sparse matrix multiplication is used to generate the Jacobian matrix by slicing the power and voltage partial derivative matrices by row or column. This involves truncating the partial derivatives of P and Q with respect to voltage amplitude and phase angle, respectively, for PQ nodes, truncating the partial derivative of P with respect to voltage phase angle, discarding the remaining content within the power and voltage partial derivative matrices, and forming the Jacobian matrix through concatenation.

[0028] Combined with the GPU's ECC memory error correction capabilities, this reduces the risk of iteration divergence caused by hardware errors and improves convergence stability in complex power grids. A single server equipped with multiple GPUs can replace traditional small computing clusters, reducing IT infrastructure investment for power companies. Support for multi-GPU collaborative computing allows for direct scaling of computing power by increasing the number of GPUs in the future, adapting to the continued growth of smart grid nodes.

[0029] Example 2 See also Figure 2 , a power system flow calculation system based on GPU parallel acceleration, including: A power system flow mathematical model module is obtained, which is used to establish a power system flow model using matrices and vectors, including a branch model, a bus model, a generator and load model, and a power balance equation; a sparse matrix storage method is used to compress and encode the power system flow model to obtain a power system flow mathematical model; The GPU nonlinear power flow calculation module is used to use the GPU to perform parallel accelerated nonlinear power flow calculations based on the mathematical model of the power system power flow. Specifically, the module includes: transferring the admittance matrix, initial voltage and node power parameters to the GPU memory, and using the GPU to parallelly calculate the node power mismatch based on the Newton method iterative framework; calculating the power voltage partial derivative matrix based on the admittance matrix, slicing the power voltage partial derivative matrix through sparse matrix multiplication to generate the Jacobian matrix; combining the Jacobian matrix with the vector of the node power mismatch to form a linear equation system, calling the GPU linear equation system solver to solve the linear equation system to obtain the voltage correction value, and updating the node voltage amplitude and phase angle; iterating until the node power mismatch converges to the preset tolerance, and outputting the voltage phase angle of each node.

[0030] Example 3 See also Figure 3, an electronic device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the computer program, the method for calculating power system flow based on GPU parallel acceleration is implemented. The method includes using matrices and vectors to establish a power system flow model, including a branch model, a bus model, a generator and load model, and a power balance equation; using a sparse matrix storage method to compress and encode the power system flow model to obtain a power system flow mathematical model; based on the power system flow mathematical model, using a GPU to perform parallel accelerated nonlinear flow calculation, specifically including: transferring the admittance matrix, initial voltage and node power parameters to the GPU video memory, and using the GPU in parallel to calculate the node power mismatch based on the Newton method iterative framework; calculating the power voltage partial derivative matrix based on the admittance matrix, slicing the power voltage partial derivative matrix through sparse matrix multiplication to generate a Jacobian matrix; combining the Jacobian matrix with the vector of the node power mismatch to form a linear equation group, calling the GPU linear equation group solver to solve the linear equation group to obtain the voltage correction value, and updating the node voltage amplitude and phase angle; iterative execution until the node power mismatch converges to a preset tolerance, and outputting the voltage phase angle of each node.

[0031] Example 4 A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, a method for calculating power system flow based on GPU parallel acceleration is described. The method includes using matrices and vectors to establish a power system flow model, including a branch model, a bus model, a generator and load model, and a power balance equation; using a sparse matrix storage method to compress and encode the power system flow model to obtain a power system flow mathematical model; and using a GPU to perform parallel accelerated nonlinear power flow calculation based on the power system flow mathematical model. The method specifically includes: transferring an admittance matrix, initial voltage, and node power parameters to GPU memory; using the GPU in parallel to calculate node power mismatch based on a Newton method iterative framework; calculating a power voltage partial derivative matrix based on the admittance matrix, slicing the power voltage partial derivative matrix through sparse matrix multiplication to generate a Jacobian matrix; combining the Jacobian matrix with a vector of the node power mismatch to form a linear equation system; calling a GPU linear equation system solver to solve the linear equation system to obtain a voltage correction value, and updating the node voltage amplitude and phase angle; iteratively executing until the node power mismatch converges to a preset tolerance, and outputting the voltage phase angle of each node.

[0032] Example 5 1) The power system flow adopts a matrix-vector model because it is convenient for derivation and programming operations for large-scale power systems.

[0033] The established power system flow model specifically includes: 1.1) Power system branch model: The power system branch model mainly consists of two parallel admittances, one series admittance, and two complex voltage ratios. These two complex voltage ratios represent the transformer and phase shifter in the branch. Figure 5 shown.

[0034] 1.2) Power system busbar model: The power system busbar model consists of a parallel impedance connected to all outgoing branches and an injection port. Figure 4 shown.

[0035] 1.3) Power System Generator and Load Model: To simplify notation, generators, flexible loads, and static loads are conceptually equivalent in power flow calculations. They represent a set of valid operating points on the P / Q plane, and their power output relationships are quantified by a real-valued function defined on the P / Q plane. Therefore, these entities are abstracted as "injected power," which can be a certain amount of active power and reactive power.

[0036] 1.4) Power Balance Equation: Energy conservation based on Kirchhoff's current law balances the power injected into a node with the power flowing into the branch. This relationship is expressed by the power balance equation.

[0037]

[0038] 2) Sparse matrix storage technology: The expansion of power systems has led to a growing scale of power flow calculations. However, in real power systems, each busbar is connected to an average of three to four branches, making the matrix used for power flow calculations highly sparse. Introducing sparse matrix storage technology into power system power flow calculations can significantly improve computational efficiency.

[0039] 3) Based on the mathematical model, GPU and other hardware with great advantages in parallel computing are used to accelerate the power flow calculation process. The acceleration process mainly includes the solution process of the nonlinear equations based on the Newton method. The nonlinear power flow calculation process under the Newton framework is shown in the flow chart. Figure 1 .

[0040] The principle of GPU accelerated parallel computing is as follows: 3.1) GPUs contain hundreds to thousands of small processing cores (called CUDA cores or stream processors) that can handle multiple threads simultaneously. In parallel computing, GPUs can divide data into many small tasks, with each core responsible for one task, thus enabling massively parallel computing.

[0041] 3.2) The GPU architecture follows the Single Instruction, Multiple Data (SIMD) model, allowing multiple cores to perform the same operation on different data at the same time. For example, in matrix operations, the GPU can perform operations such as addition and multiplication on multiple elements of the matrix simultaneously, significantly increasing the calculation speed.

[0042] 3.3) GPUs manage large numbers of threads by grouping them. Threads are divided into multiple "thread blocks," which in turn form a "grid." Each thread block is assigned to a compute unit on the GPU, with hardware responsible for synchronization and scheduling, enabling efficient parallel computing.

[0043] 3.4) spGEMM (sparse matrix multiplication) technology is combined with slicing operations in the GPU power flow framework. As shown in the flowchart, power flow calculations for a power system require calculating the power and voltage partial derivative matrices. These partial derivative matrices are then sliced based on the node type to obtain the Jacobian matrix. Due to the mismatch between the GPU architecture and sparse matrix indexing, GPU indexing is typically not possible on the GPU. Continuously converting between sparse and dense matrices on the GPU also consumes considerable time and resources. Therefore, using spGEMM technology to replace matrix indexing operations with sparse matrix multiplication can achieve further acceleration.

[0044] Figure 6 This explains the basic principles of spGEMM technology. The black portion in the figure represents the desired slice. Multiplying the original matrix A by matrix R on the left cuts the rows, retaining only the contents of the second and third rows. Multiplying the original matrix A by matrix Q on the right cuts the columns, retaining only the contents of the first three columns, thus obtaining the new matrix slice B.

[0045] like Figure 7 This paper describes the implementation of this method for power system flow calculations based on the Newton method. Before calculating power system flow, the system's admittance matrix must be calculated. This involves the use of sparse matrix processing techniques. The node type of the power bus is determined by the generator's input status and operating mode at each node. These include PQ nodes (with known active and reactive power), PV nodes (with known active power and voltage amplitude), and balancing nodes (with known voltage amplitude and voltage phase angle). Furthermore, the generator power and load at each node must be calculated.

[0046] Then, the known quantities such as the initial voltage and admittance matrix can be stored in the GPU, and the mismatch of each node can be calculated on the GPU. For PQ nodes, the difference between its injected active power and reactive power and the calculated power needs to be calculated. For PV nodes, the difference between its injected active power and the calculated power needs to be calculated. The calculation formula is as follows:

[0047]

[0048] in and are the mutual conductance and mutual susceptance of nodes i and j, respectively, and are the voltage amplitudes at nodes i and j, respectively, and represents the load of node i, and are the active power and reactive power injected into the generator respectively.

[0049] After determining the mismatch, the power-voltage partial derivative matrix must be calculated to convert the nonlinear equations into linear equations. The matrix is then sliced using the spGEMM technique based on the node type. The partial derivatives of P and Q with respect to voltage amplitude and phase angle, respectively, at the PQ node, and the partial derivative of P with respect to voltage phase angle at the PV node, are sliced. The remaining content in the partial derivative matrix is discarded. The resulting Jacobian matrix is formed through concatenation, as shown below:

[0050] The Jacobian matrix and the mismatch vector form a linear equation system as follows:

[0051] After the correction value is obtained by using a linear equation solver such as the conjugate gradient method, the voltage amplitude and phase angle of the PQ node are corrected, and the phase angle of the PV node is corrected.

[0052]

[0053]

[0054]

[0055] After multiple iterations, the voltage phase angle of each node is output when the infinite norm of the mismatch is less than the allowable error, and the voltage phase angle calculation results of each node are transferred to the CPU.

[0056] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, read-only optical disks, optical storage devices, etc.) containing computer-usable program code.

[0057] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0058] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0059] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the specific implementations of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for calculating power system flow based on GPU parallel acceleration, characterized in that: The following steps are involved: Use matrices and vectors to establish power system flow models, including branch models, bus models, generator and load models, and power balance equations; The power system flow model is compressed and encoded using a sparse matrix storage method to obtain a power system flow mathematical model. Based on the mathematical model of power system flow, GPUs are used to perform parallel accelerated nonlinear power flow calculations. Specifically, the admittance matrix, initial voltage, and node power parameters are transferred to the GPU memory. Based on the Newton method iterative framework, the node power mismatch is calculated in parallel using the GPU. The power and voltage partial derivative matrix is calculated based on the admittance matrix, and the power and voltage partial derivative matrix is sliced through sparse matrix multiplication to generate a Jacobian matrix. The Jacobian matrix is combined with the vector of the node power mismatch to form a linear equation system. The GPU linear equation system solver is called to solve the linear equation system to obtain the voltage correction value and update the node voltage amplitude and phase angle. The iterative execution is carried out until the node power mismatch converges to the preset tolerance, and the voltage phase angle of each node is output.

2. The method for calculating power system flow based on GPU parallel acceleration according to claim 1, characterized in that: The branch model consists of two parallel admittances, one series admittance and two complex voltage ratios, and represents the electrical parameters of the transformer and the phase shifter.

3. The method for calculating power system flow based on GPU parallel acceleration according to claim 1, characterized in that: The busbar model is connected to all outgoing branches by parallel impedance, and an injection port is introduced to characterize the power injection of the generator or load. The power balance equation is constructed based on Kirchhoff's current law.

4. The method for calculating power system flow based on GPU parallel acceleration according to claim 1, characterized in that: The generator and load model is abstracted as a set of valid operating points on the P / Q plane, which is defined by injecting active power and reactive power.

5. The method for calculating power system flow based on GPU parallel acceleration according to claim 1, characterized in that: The admittance matrix is calculated using a sparse matrix processing method, and the node type of the power bus is determined by the input status and working mode of the generator at each node, and the generator power and load of each node are calculated; The node types of the power bus include PQ nodes, PV nodes, and balance nodes; The PQ node has known active power and reactive power; The PV node has known active power and voltage amplitude; The voltage amplitude and voltage phase angle at the balance node are known.

6. The method for calculating power system flow based on GPU parallel acceleration according to claim 5, characterized in that: The calculation of the node power mismatch includes: Calculate the difference between the injected active power and reactive power and the calculated power for the PQ node; Calculate the difference between the injected active power and the calculated power for the PV node.

7. The method for calculating power system flow based on GPU parallel acceleration according to claim 6, characterized in that: The method of performing row or column slicing on the power voltage partial derivative matrix by sparse matrix multiplication to generate a Jacobian matrix includes: The partial derivatives of P and Q with respect to voltage amplitude and phase angle in the PQ node are intercepted, and the partial derivative of P with respect to voltage phase angle in the PV node is intercepted. The remaining content in the power voltage partial derivative matrix is discarded, and the Jacobian matrix is formed through splicing operations.

8. A power system flow calculation system based on GPU parallel acceleration, characterized in that: include: Obtain a power system flow mathematical model module for establishing a power system flow model using matrices and vectors, including branch models, busbar models, generator and load models, and power balance equations; The power system flow model is compressed and encoded using a sparse matrix storage method to obtain a power system flow mathematical model. The GPU nonlinear power flow calculation module is used to perform parallel accelerated nonlinear power flow calculations using the GPU based on the power system power flow mathematical model. Specifically, it transfers the admittance matrix, initial voltage, and node power parameters to the GPU memory and uses the GPU to calculate the node power mismatch in parallel based on the Newton method iterative framework. The power and voltage partial derivative matrix is calculated based on the admittance matrix, and the power and voltage partial derivative matrix is sliced through sparse matrix multiplication to generate a Jacobian matrix. The Jacobian matrix is combined with the vector of the node power mismatch to form a linear equation system. The GPU linear equation system solver is called to solve the linear equation system to obtain the voltage correction value and update the node voltage amplitude and phase angle. The iterative execution is carried out until the node power mismatch converges to the preset tolerance, and the voltage phase angle of each node is output.

9. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for calculating power system flow based on GPU parallel acceleration as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the power system flow calculation method based on GPU parallel acceleration described in any one of claims 1 to 7.