Batch load flow solving method and device based on CPU and GPU hybrid architecture
By adopting a hybrid CPU and GPU architecture method in the power system, parallel trend calculations and adjusting node types are performed, the problem of traditional serial computing inefficient is solved, and the current computing efficiency is significantly improved.
Patent Information
- Application Number
- CN202411982009.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Traditional serial batch flow solution technology based on single-core CPUs significantly increases the computing time when facing large-scale power systems, resulting in low flow computing efficiency.
Using a hybrid CPU and GPU architecture method, multiple trend computing study groups are obtained through the CPU and GPU are used to perform parallel trend computing. For the study where there are overlimited nodes, the CPU adjusts the node type to solve the overlimited problem and updates the calculation results.
Through parallel computing, the overall computing time is significantly shortened, the current computing efficiency is improved, and the node conversion problem is effectively solved, making up for the shortcomings of inefficient CPU processing alone.
Smart Images

Figure CN119987864A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power systems, and in particular to a batch power flow solution method, apparatus, computer equipment, storage medium and computer program product based on a CPU and GPU hybrid architecture. Background Art
[0002] With the development of power systems, the scale of power systems continues to expand and the number of nodes continues to increase. In order to analyze the operating status of each node in the power system, engineers have gradually evolved from performing power flow calculations through manual calculations to solving power flow problems through computers.
[0003] Traditional batch power flow solution solutions are usually based on the serial batch power flow solution technology of the CPU (Central Processing Unit), which relies on the single-core performance of the CPU to solve multiple power flow calculation examples in sequence. After completing the solution of one power flow calculation example, the next power flow calculation example will be solved.
[0004] However, with the increase in power flow calculation examples and the expansion of the scale of power systems, the calculation time of traditional schemes will increase significantly, resulting in low efficiency of power flow calculation. Summary of the invention
[0005] Based on this, it is necessary to provide a batch power flow solving method, device, computer equipment, computer readable storage medium and computer program product based on a CPU and GPU hybrid architecture that can improve the efficiency of power flow calculation in order to solve the above technical problems.
[0006] In a first aspect, the present application provides a batch power flow solution method based on a CPU and GPU hybrid architecture. The method comprises:
[0007] Acquiring multiple power flow calculation example groups based on the CPU, wherein the power flow calculation examples in the same power flow calculation example group correspond to the same power network structure;
[0008] Performing parallel power flow calculation on the plurality of power flow calculation example groups based on the GPU to obtain a first power flow calculation result set, wherein the first power flow calculation result set includes a first power flow calculation result of each power flow calculation example group, and judging in parallel whether there are over-limit power flow calculation examples in the plurality of power flow calculation example groups according to the first power flow calculation result set, wherein the over-limit power flow calculation examples include over-limit nodes;
[0009] When the over-limit power flow calculation example exists in the power flow calculation example group, adjusting the node type of the over-limit node in the over-limit power flow calculation example based on the CPU, performing power flow calculation on the adjusted over-limit power flow calculation example to obtain a second power flow calculation result set, wherein the second power flow calculation result set includes the second power flow calculation results of each adjusted over-limit power flow calculation example;
[0010] The CPU updates the first power flow calculation result set according to the second power flow calculation result set to obtain a target power flow calculation result set, wherein the target power flow calculation result set includes target power flow calculation results of each power flow calculation case group.
[0011] In a second aspect, the present application also provides a batch power flow solving device. The device comprises:
[0012] A data acquisition module, used for acquiring multiple power flow calculation example groups based on the CPU, wherein the power flow calculation examples in the same power flow calculation example group correspond to the same power network structure;
[0013] A parallel power flow calculation module is used to perform parallel power flow calculation on the plurality of power flow calculation example groups based on a GPU to obtain a first power flow calculation result set, wherein the first power flow calculation result set includes a first power flow calculation result of each power flow calculation example group, and according to the first power flow calculation result set, to determine in parallel whether there are any over-limit power flow calculation examples in the plurality of power flow calculation example groups, wherein the over-limit power flow calculation examples include over-limit nodes;
[0014] an over-limit node processing module, configured to adjust the node type of the over-limit node in the over-limit power flow calculation example based on the CPU when the over-limit power flow calculation example exists in the power flow calculation example group, perform power flow calculation on the adjusted over-limit power flow calculation example, and obtain a second power flow calculation result set, wherein the second power flow calculation result set includes the second power flow calculation results of each adjusted over-limit power flow calculation example;
[0015] The result updating module is used to update the first power flow calculation result set according to the second power flow calculation result set based on the CPU to obtain a target power flow calculation result set, wherein the target power flow calculation result set includes the target power flow calculation results of each power flow calculation case group.
[0016] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps in the above batch power flow solution method embodiment are implemented.
[0017] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the above batch power flow solution method embodiment are implemented.
[0018] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps in the above batch power flow solution method embodiment are implemented.
[0019] The batch power flow solution method, device, computer equipment, storage medium and computer program product based on the hybrid architecture of CPU and GPU are different from the traditional single-core CPU serial batch power flow solution technology. This solution introduces a GPU parallel computing mechanism to realize parallel power flow calculation. Specifically, multiple power flow calculation example groups are first obtained based on the CPU. The power network structure corresponding to the power flow calculation examples in each power flow calculation example group is consistent. Therefore, the subsequent GPU can perform parallel batch power flow calculation for each power flow calculation example group more efficiently and quickly, making full use of the powerful parallel computing capability of the GPU to accelerate large-scale power flow calculation, greatly shortening the overall calculation time. In addition, this solution also takes into account that the parallel power flow calculation mechanism may be difficult to handle the node over-limit problem in the power flow calculation. Therefore, when there are over-limit power flow calculation examples in multiple power flow calculation example groups, the node type of the over-limit node in the over-limit power flow calculation example is adjusted by the CPU, and the adjusted over-limit power flow calculation example is used to perform power flow calculation to obtain a second power flow calculation result set, thereby effectively solving the node conversion problem. Finally, the first power flow calculation result set is updated according to the second power flow calculation result set to obtain the target power flow calculation result set. In this way, the high efficiency of GPU parallel batch power flow calculation and the advantage of CPU in processing small-scale tasks that are difficult to parallelize, such as node conversion, can be fully combined. This can effectively make up for the low efficiency of CPU in processing batch power flow solution tasks alone and the difficulty of GPU in effectively processing node type conversion problems caused by exceeding the limit, thereby effectively improving the efficiency of power flow calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 An application environment diagram of a batch power flow solving method based on a CPU and GPU hybrid architecture in one embodiment;
[0021] Figure 2 A schematic diagram of a flow chart of a batch power flow solving method based on a CPU and GPU hybrid architecture in one embodiment;
[0022] Figure 3 It is a flowchart of a batch power flow solving method based on a CPU and GPU hybrid architecture in another embodiment;
[0023] Figure 4 A schematic diagram of a process of adjusting an out-of-limit node based on a CPU and GPU hybrid architecture in one embodiment;
[0024] Figure 5 It is a flowchart of a batch power flow solving method based on a CPU and GPU hybrid architecture in another embodiment;
[0025] Figure 6 A schematic diagram of a flow chart of a batch power flow solving method based on a CPU and GPU hybrid architecture in a detailed embodiment;
[0026] Figure 7 It is a structural block diagram of a batch power flow solving device based on a CPU and GPU hybrid architecture in one embodiment;
[0027] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0029] The batch power flow solution method based on the CPU and GPU hybrid architecture provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.
[0030] Specifically, the staff of the power system may upload multiple power flow calculation example groups to the server 104 through the terminal 102. The power network structure corresponding to the power flow calculation examples in each power flow calculation example group is consistent. The server 104 performs parallel power flow calculation on the multiple power flow calculation example groups to obtain a first power flow calculation result set, which includes the first power flow calculation results of each power flow calculation example group. According to the first power flow calculation result set, it is judged in parallel whether there are over-limit power flow calculation examples in the multiple power flow calculation example groups, and the over-limit power flow calculation examples include over-limit nodes. Further, in the case that there are over-limit power flow calculation examples in the power flow calculation example group, the server 104 adjusts the node type of the over-limit node in the over-limit power flow calculation example, performs power flow calculation on the adjusted over-limit power flow calculation example, and obtains a second power flow calculation result set, which includes the second power flow calculation results of each adjusted over-limit power flow calculation example. Finally, the server 104 updates the first power flow calculation result set according to the second power flow calculation result set to obtain a target power flow calculation result set, and the target power flow calculation result set includes the target power flow calculation results of each power flow calculation example group.
[0031] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0032] In one embodiment, Figure 2 As shown in the figure, a batch power flow solution method based on a hybrid architecture of CPU and GPU is provided. Figure 1 The server 104 in the example is used as an example to illustrate, and the following steps are included:
[0033] S100, obtaining multiple power flow calculation example groups based on a CPU, wherein the power flow calculation examples in each power flow calculation example group correspond to the same power network structure.
[0034] Among them, power system flow calculation is an electrical calculation that studies the steady-state operation of the power system. It mainly solves the voltage amplitude and phase angle of all nodes in the power system based on the given power system network structure (including nodes, branches and their connection methods), the injected power of each node (such as the power generated by the generator, the power consumed by the load) and the voltage amplitude and phase angle of some nodes, and then calculates the power of each branch (including active power and reactive power) and other information.
[0035] When performing power system flow calculation, it is often necessary to consider a variety of different operating conditions or parameter settings. Therefore, there may be several flow calculation examples for a power system. In order to facilitate subsequent parallel flow calculations, the flow calculation examples with the same power network structure can be divided into the same group in advance according to the power network structure corresponding to the flow calculation example. For example, the flow calculation examples in a flow calculation example group may all be for a specific regional power grid (including the same nodes, branch connection conditions, etc.), but they differ in specific operating parameters such as load size and generator output. It should be noted that this process can be completed by the CPU (Graphic Processing Unit) in the server.
[0036] S300, performing parallel power flow calculation on multiple power flow calculation example groups based on a GPU to obtain a first power flow calculation result set, and judging in parallel whether there are over-limit power flow calculation examples in the multiple power flow calculation example groups according to the first power flow calculation result set.
[0037] Among them, the first power flow calculation result set includes the first power flow calculation result of each power flow calculation example group, and the over-limit power flow calculation example includes the over-limit node. In the power system, each node has a specified voltage range, power range, etc. If the voltage amplitude of a node obtained by the power flow calculation exceeds the voltage range, or the power value exceeds the power range, then the node is an over-limit node, and the power flow calculation example where the node is located is an over-limit power flow calculation example. Parallel power flow calculation refers to the use of units with parallel computing capabilities, or running multiple threads in parallel, such as using a GPU to perform power flow calculations on multiple power flow calculation example groups at the same time. The traditional power flow calculation examples are calculated one by one in sequence. Different from the traditional power flow calculation examples, parallel power flow calculation can allow the power flow calculation tasks of multiple power flow calculation example groups to be performed synchronously, greatly improving the efficiency of power flow calculation.
[0038] Exemplarily, assuming that there are three power flow calculation case groups, when parallel power flow calculation is performed, it is equivalent to starting three power flow calculation threads at the same time, performing power flow calculations on these three power flow calculation case groups respectively, and calculating the node voltage, branch power and other related parameters of each power flow calculation case in each power flow calculation case group. The power flow calculation method for each power flow calculation case can be the Newton-Raphson method, the P-Q decomposition method, etc.
[0039] After parallel power flow calculation, the first power flow calculation result corresponding to each power flow calculation case group can be obtained. Each first power flow calculation result contains specific power flow calculation related information such as the voltage amplitude, phase angle and branch power of the nodes in each power flow calculation case in the power flow calculation case group. The first power flow calculation results of different power flow calculation case groups are summarized to form a first power flow calculation result set.
[0040] Furthermore, based on the first power flow calculation result set, a parallel method is also used to determine whether there are over-limit power flow calculation examples in multiple power flow calculation example groups. For example, if the node voltage amplitude of a certain node exceeds the specified upper and lower limits, or the reactive power of the generator node exceeds its allowed output range, the node is considered to be an over-limit node, and the power flow calculation example containing such over-limit nodes is called an over-limit power flow calculation example.
[0041] S500, when there is an over-limit power flow calculation example in the power flow calculation example group, adjusting the node type of the over-limit node in the over-limit power flow calculation example based on the CPU, performing power flow calculation on the adjusted over-limit power flow calculation example, and obtaining a second power flow calculation result set.
[0042] The second power flow calculation result set includes the second power flow calculation results of each adjusted over-limit power flow calculation example.
[0043] Following the above steps, when it is determined that there is an over-limit power flow calculation case in a power flow calculation case group, the node type of the over-limit node in the over-limit power flow calculation case can be adjusted according to the pre-set adjustment rules. For example, if the reactive power of the generator node is over-limit, it can be converted from the original PV node (node type with known active power and voltage amplitude) to a PQ node (node type with known active power and reactive power). If the voltage amplitude of the load node is over-limit, it may be converted from a PQ node to a PV node, etc. At the same time, the over-limit node parameter values (such as voltage amplitude, reactive power value) will be adjusted accordingly to return them to a reasonable range.
[0044] After adjusting the over-limit power flow calculation examples, the power flow calculation is performed again on these adjusted over-limit power flow calculation examples, and a new set of power flow calculation results is obtained. The power flow calculation results of all adjusted over-limit power flow calculation examples are summarized to form a second power flow calculation result set. It should be noted that the above process of performing power flow calculation on the adjusted over-limit power flow calculation examples may be repeated multiple times, because during the power flow calculation process, some over-limit nodes may need to be restored to the state before adjustment, such as restoring the node type, node parameter value, etc., until there are no more over-limit nodes in the power flow calculation example, and the final power flow calculation results are summarized to obtain the second power flow calculation result set.
[0045] S700 , based on the CPU, updating the first power flow calculation result set according to the second power flow calculation result set to obtain a target power flow calculation result set.
[0046] The target power flow calculation result set includes the target power flow calculation results of each power flow calculation case group.
[0047] Following the above steps, after obtaining the first set of power flow calculation results, the CPU updates the first set of power flow calculation results based on the second set of power flow calculation results. Specifically, the results of those power flow calculation example groups in the first set of power flow calculation results that have exceeded the limit and have been adjusted and recalculated are replaced with the corresponding second power flow calculation results in the second set of power flow calculation results to obtain a target set of power flow calculation results. The target power flow calculation result set contains the target power flow calculation results of all power flow calculation example groups, and also includes power flow calculation examples that do not converge during the entire power flow calculation process, over-limit node information, over-limit situations, etc., which reflects the accurate power flow state of the entire power system under the working conditions represented by different example groups after comprehensive consideration of the over-limit situation and adjustment. Therefore, the target power flow calculation result set can be used for subsequent further power system analysis, operation decision-making and other work.
[0048] The batch power flow solution method based on the hybrid architecture of CPU and GPU is different from the traditional single-core CPU serial batch power flow solution technology. This solution introduces a GPU parallel computing mechanism to realize parallel power flow calculation. Specifically, multiple power flow calculation example groups are first obtained based on the CPU. The power network structure corresponding to the power flow calculation examples in each power flow calculation example group is consistent. Therefore, the subsequent GPU can perform parallel batch power flow calculation for each power flow calculation example group more efficiently and quickly, making full use of the powerful parallel computing capability of the GPU to accelerate large-scale power flow calculation, greatly shortening the overall calculation time. In addition, this solution also takes into account that the parallel power flow calculation mechanism may be difficult to handle the node over-limit problem in the power flow calculation. Therefore, when there are over-limit power flow calculation examples in multiple power flow calculation example groups, the node type of the over-limit node in the over-limit power flow calculation example is adjusted by the CPU, and the adjusted over-limit power flow calculation example is used to perform power flow calculation to obtain a second power flow calculation result set, thereby effectively solving the node conversion problem. Finally, the first power flow calculation result set is updated according to the second power flow calculation result set to obtain the target power flow calculation result set. In this way, the high efficiency of GPU parallel batch power flow calculation and the advantage of CPU in processing small-scale tasks that are difficult to parallelize, such as node conversion, can be fully combined. This can effectively make up for the low efficiency of CPU in processing batch power flow solution tasks alone and the difficulty of GPU in effectively processing node type conversion problems caused by exceeding the limit, thereby effectively improving the efficiency of power flow calculation.
[0049] In one embodiment, Figure 3 As shown, the method before S300 also includes:
[0050] S200 , for each power flow calculation example group, selecting a basic power flow calculation example from the power flow calculation example group based on a CPU, and determining a node admittance matrix and a B matrix structure of the power flow calculation example group according to the basic power flow calculation example.
[0051] Based on the GPU, parallel power flow calculation is performed on multiple power flow calculation example groups to obtain a first power flow calculation result set, including: based on the GPU, parallel execution of power flow calculation tasks for each power flow calculation example group is performed to obtain a first power flow calculation result set, and the power flow calculation task of each power flow calculation example group is executed in the following steps: according to the node admittance matrix, the B matrix structure, the preset initial voltage vector of each node in the power flow calculation example group, and the preset node constraint vector of each node, the power flow solution matrix of the power flow calculation example group is determined, and the power flow calculation is performed on the power flow solution matrix to obtain a first power flow calculation result of the power flow calculation example group.
[0052] Among them, the node admittance matrix is used to describe the admittance relationship between nodes in the power network. The order of the matrix is equal to the number of nodes in the electrical network. It can be determined based on the topological structure (nodes) of the power network and the admittance of the branches between nodes, reflecting the electrical connection relationship and admittance characteristics between nodes in the power system network. When using the PQ decomposition method for power flow calculation, the B matrix is needed to decouple the active power and reactive power equations. The B matrix includes two matrices: the B' matrix (related to active power) and the B'' matrix (related to reactive power), thereby simplifying the power flow calculation process.
[0053] Following the above embodiment, in order to accelerate the subsequent batch power flow calculation of multiple power flow calculation example groups, the power flow calculation example groups can be preprocessed. Specifically, when processing multiple power flow calculation example groups, for each power flow calculation example group, a power flow calculation example can be randomly selected as a basic power flow calculation example, and a node admittance matrix and a B matrix structure are generated according to the basic power flow calculation example. For example, according to the selected basic power flow calculation example, the node type, branch connection relationship, branch admittance value and other information of each node in the power flow calculation example group to which the basic power flow calculation example belongs can be determined, and then the structure of the node admittance matrix is determined, including but not limited to the dimension of the node admittance matrix, the position and value of non-zero elements, etc., and the structure of the B matrix is determined in combination with the structure of the node admittance matrix and the node type, including but not limited to the dimension of the B matrix, the position and value of non-zero elements, etc.
[0054] It should be noted that in the above process of determining the node admittance matrix and the B matrix structure, the admittance matrix structure and the column offset and row offset of the B matrix can be recorded in the form of a COO (Coordinate Format) matrix, and the position of each COO matrix in the CSR (Compressed Sparse Row) matrix can be recorded, so that only the non-zero elements in the matrix can be retained, thereby reducing the computational cost of subsequent parallel batch power flow calculations. Furthermore, by using multiple threads to execute power flow calculation tasks simultaneously, for example, by using multiple GPUs to execute power flow calculation tasks simultaneously, parallel power flow calculations can be implemented for multiple power flow calculation case groups, thereby improving computational efficiency.
[0055] Specifically, each thread is responsible for the power flow calculation task of a power flow calculation example group. For each power flow calculation example group, the initial voltage vectors of each node in the power flow calculation example group are batch constructed according to the initial voltage values of the bus and motor in the power grid structure corresponding to each power flow calculation example, including the voltage amplitude and voltage phase angle. Similarly, the node constraint vectors of each node in the power flow calculation example group are batch constructed according to the constraint information of the bus and motor in the power grid structure corresponding to each power flow calculation example, such as the power value range, voltage amplitude range and other constraint information. Finally, the node admittance matrix, B matrix structure, initial voltage vector of each node, and node constraint vector of each node are integrated together to generate a power flow solution matrix of the power flow calculation example group. For example, the COO matrix constructed based on the node admittance matrix and B matrix structure in the above steps, as well as the position of the COO matrix in the CSR matrix, is combined to further generate a CSR matrix numerical vector, such as extracting corresponding non-zero element values from the COO matrix, and generating corresponding CSR matrix numerical vectors according to the requirements of the CSR matrix format to accelerate the generation of the power flow solution matrix of the subsequent power flow calculation example group, and then generating the power flow solution matrix of the power flow calculation example group according to the initial voltage vector, node constraint vector, and CSR matrix numerical vector.
[0056] After determining the power flow solution matrix, the PQ decomposition method can be used to batch solve the power flow solution matrix. Specifically, the unbalanced power calculation and the previous generation back-carrying calculation can be performed on the power flow solution matrix in batches until all power flow calculation examples converge (for example, the difference between the active power value and the reactive power value of each node is less than a preset threshold, that is, the injected power and the outflow power of each node are balanced), or the power flow calculation is stopped when the set maximum number of iterations is reached (at this time, the information of the power flow calculation examples that do not converge needs to be recorded), and the first power flow calculation results of each power flow calculation example group are obtained.
[0057] In this embodiment, by processing the power flow calculation tasks of different power flow calculation case groups simultaneously through multiple threads, the advantages of parallel processing can be well utilized, and multiple power flow calculation case groups can be processed efficiently and comprehensively to obtain the operating status information of the power system under different cases.
[0058] In one embodiment, a power flow calculation is performed on the power flow solution matrix to obtain a first power flow calculation result of the power flow calculation example group, including:
[0059] For each power flow calculation example in the power flow calculation example group, the PQ decomposition method is used to perform power flow calculation on the power flow solution matrix to obtain the voltage vector of each node in the power flow calculation example, and the injection power and outflow power of each node are determined according to the voltage vector of each node. When the difference between the injection power and the outflow power is greater than a preset difference threshold, the voltage vector is corrected according to the difference between the injection power and the outflow power, and the step of determining the injection power and outflow power of each node according to the voltage vector of each node is returned until the preset iteration end condition is met, the iteration is stopped, and the power flow calculation result of the power flow calculation example is obtained, and the power flow calculation results of each power flow calculation example are aggregated to obtain the first power flow calculation result of the power flow calculation example group.
[0060] Specifically, the process of iterative calculation by PQ decomposition method is actually the process of iteratively calculating the voltage vector of each node. Taking the initial voltage vector of each node as the starting point, based on the basic principles of the power system and the node admittance matrix, the injected power (including active injected power and reactive injected power) and outflow power of each node can be determined. For example, for a generator node, its injected power is the active power and reactive power generated by the generator; for a load node, its injected power is the active power and reactive power consumed by the load, and the outflow power is the power flowing to other nodes connected to the node.
[0061] After calculating the injected power and outflow power of each node, their difference needs to be compared. If the difference between the injected power and the outflow power is greater than the preset difference threshold, it means that the power situation corresponding to the current node voltage vector does not meet the power balance state under the stable operation requirements of the power system, and there is a power imbalance in the power system. At this time, it is necessary to correct the voltage vector of each node according to the difference. The voltage vector can be corrected according to the difference between the injected power and the outflow power. For example, for active power imbalance, the B' matrix related to the active power and the power difference can be used to calculate the correction amount of the voltage phase angle, and then the phase angle part of the voltage vector can be corrected. For reactive power imbalance, the B'' matrix and the power difference can be used to calculate the correction amount of the voltage amplitude, and the amplitude part of the voltage vector can be adjusted to obtain an updated voltage vector. After correcting the voltage vector, it is necessary to execute the step of "determining the injection power and outflow power of each node according to the voltage vector of each node" again, recalculate the new injection power and outflow power of each node, and then continue to judge whether the difference between the new injection power and outflow power of each node meets the requirements. This cycle is repeated and iterated continuously until the preset iteration end condition is met, for example, the difference between the injection power and outflow power of all nodes is less than or equal to the preset difference threshold, or the number of iterations reaches the preset maximum number of iterations, and the power flow calculation results of each power flow calculation example are obtained.
[0062] When the iteration end condition is met, the power flow calculation results of each power flow calculation example obtained at this time include information such as the voltage vector, injected power, and outflow power of each node. The power flow calculation results of each example are aggregated to obtain the first power flow calculation result set of the power flow calculation example group.
[0063] In this embodiment, the PQ decomposition method is used to perform power flow calculation, iterative correction, and ultimately obtain power flow calculation results. Through continuous adjustment and calculation, a first power flow calculation result set that is more accurate and more in line with the actual operation of the power system is obtained.
[0064] In one embodiment, Figure 4 As shown, S500 includes:
[0065] S510, when the over-limit node is a generator node and the reactive power value of the generator node exceeds the upper and lower limits, the node type of the generator node is adjusted from a PV node to a PQ node, and the reactive power value of the generator node is adjusted to a preset reactive power value.
[0066] S520, when the over-limit node is a load node and the voltage amplitude of the load node exceeds the upper and lower limits, the node type of the load node is adjusted from a PQ node to a PV node, and the voltage amplitude of the load node is adjusted to a preset voltage amplitude.
[0067] S530, performing power flow calculation on the adjusted over-limit power flow calculation example to determine the adjusted voltage amplitude of the generator node and the adjusted reactive power value of the load node.
[0068] S540, when the generator node exceeds the upper limit and the adjusted voltage amplitude is smaller than the voltage amplitude before adjustment, or when the generator node exceeds the lower limit and the adjusted voltage amplitude is larger than the voltage amplitude before adjustment, restore the node type and voltage amplitude of the generator node to the node type and voltage amplitude before adjustment.
[0069] S550, when the load node exceeds the upper limit and the adjusted reactive power is less than the reactive power before adjustment, or when the load node exceeds the lower limit and the adjusted reactive power is greater than the adjusted reactive power, the node type and reactive power value of the load node are restored to the node type and reactive power value before adjustment.
[0070] Specifically, when the over-limit node is a generator node, and the reactive power value of the generator node exceeds the specified upper and lower limits, the node type of the generator node is adjusted from the original PV node to the PQ node, and the over-limit value (i.e., reactive power value) is modified to a preset reactive power value, which is an in-bounds value and is within the reactive power range of the generator node. Then, the over-limit power flow calculation example after the above adjustment is performed with power flow calculation, and the voltage amplitude of the adjusted generator node can be determined through power flow calculation. If the reactive power value of the generator node originally exceeds the upper limit, and after adjusting the node type and re-calculating the power flow, the adjusted voltage amplitude is less than the voltage amplitude before adjustment, this indicates that the over-limit situation of the node has been resolved, and at this time, the node type and voltage amplitude of the generator node need to be restored to the node type and voltage amplitude before adjustment. Similarly, when the reactive power value of the generator node exceeds the lower limit and the adjusted voltage amplitude is greater than the voltage amplitude before adjustment, it means that the adjusted result makes the voltage amplitude fall back to a reasonable range, so the node type and voltage amplitude of the generator node must also be restored to the state before adjustment.
[0071] If the over-limit node is a load node, and the voltage amplitude of the load node exceeds the specified upper and lower limits, the node type of the load node is adjusted from a PQ node to a PV node. At the same time, the voltage amplitude of the load node is adjusted to a preset voltage amplitude, which is also an in-bounds value and is within the voltage amplitude range of the load node. Similarly, the over-limit power flow calculation example containing the load node after adjustment is calculated. If the load node originally has a voltage amplitude exceeding the upper limit, if the adjusted reactive power is less than the reactive power before adjustment, this indicates that the adjustment has solved the over-limit situation of the node, so it is necessary to restore the node type and reactive power value of the load node to the node type and reactive power value before adjustment. If the load node has a voltage amplitude exceeding the lower limit, and the adjusted reactive power value is greater than the reactive power value before adjustment, the node type and reactive power value of the load node should also be restored to the state before adjustment, so that the power system can be restored to a relatively more stable operating state.
[0072] In this embodiment, when the generator nodes and load nodes in the power system exceed the limit, the generator nodes and load nodes are dynamically adjusted and restored. By reasonably changing the node type and adjusting the node parameters, the power system can maintain a stable, safe and efficient operating state when facing various over-limit situations.
[0073] In one embodiment, S500 includes: performing a flow calculation on an adjusted over-limit flow calculation example to obtain an adjusted flow calculation result set, and when the adjusted flow calculation result set represents that the adjusted flow calculation example includes an over-limit node, returning to the step of adjusting the node type of the over-limit node in the over-limit flow calculation example, until the adjusted over-limit flow calculation example does not include the over-limit node, and determining the adjusted flow calculation result set as the second flow calculation result.
[0074] Continuing with the above embodiment, after adjusting and restoring the over-limit nodes in the over-limit power flow calculation example, the power flow calculation is performed again on these adjusted over-limit power flow calculation examples. The specific process of the power flow calculation has been described in detail above and will not be repeated here. A new set of power flow calculation results is obtained, including the power flow calculation results corresponding to all adjusted over-limit power flow calculation examples. Then, based on the adjusted set of power flow calculation results, further analyze whether each adjusted power flow calculation example still includes out-of-limit nodes. If it still includes out-of-limit nodes, repeat the above steps of adjusting the node type and node parameters of the out-of-limit nodes. If there are still out-of-limit nodes in the adjusted power flow calculation example, it means that this adjustment has not completely solved the out-of-limit problem in the power system, and it is necessary to return to the step of "adjusting the node type of the out-of-limit node in the out-of-limit power flow calculation example", and adjust the node type and modify the node parameters of the newly appeared out-of-limit nodes again. Then, perform power flow calculation on the newly adjusted power flow calculation example, and repeat this cycle, and repeat the adjustment and power flow calculation process until the adjusted power flow calculation example no longer includes out-of-limit nodes. At this time, the adjusted power flow calculation result set obtained can be determined as the second power flow calculation result set.
[0075] In this embodiment, the over-limit power flow calculation example in the power system is repeatedly adjusted and verified to eliminate the over-limit situation in the power system as much as possible, and finally the power flow calculation result that can make the power system operate stably is calculated.
[0076] In one embodiment, Figure 5 As shown, S100 includes:
[0077] S110, obtaining a plurality of power flow calculation examples, and dividing the plurality of power flow calculation examples into different power flow calculation example groups according to the node types of the power flow calculation examples, the number of nodes of each type, and the number of branches.
[0078] Among them, when conducting relevant analysis on power system flow calculation, it is often necessary to consider various operating scenarios of the power system, changes in network structure or parameter settings, etc., so it is necessary to obtain multiple flow calculation examples accordingly. These flow calculation examples each represent a specific power system state, such as different load levels, generator output configurations, and power system conditions under network topology adjustment. Each flow calculation example contains information such as node type, number of nodes, number of branches, etc.
[0079] Specifically, multiple power flow calculation examples are obtained, and the obtained power flow calculation examples are parsed, for example, the node type, number of nodes, number of branches and other information are extracted. Among them, the node type includes but is not limited to the balance node, PV node and PQ node. Since different types of nodes have different known conditions and processing methods in the power flow calculation, the nodes can be rearranged according to the node type so that the order of the rearranged nodes is more in line with the logical process of the power flow calculation. Since the nodes are rearranged, the node numbers and other identifiers of the nodes may change, so it is also necessary to maintain the mapping relationship between the new and old node numbers. For example, it is recorded that the node originally numbered 5 corresponds to the new number 3 after the rearrangement. When it is necessary to find a certain original parameter of the node or write the calculation result back to the original data structure, accurate positioning and operation can be performed based on the mapping relationship. Similarly, the branch connects different nodes. When the node number changes due to the rearrangement, the branch number connected to it also needs to be updated accordingly, and the mapping relationship between the new and old branches needs to be maintained.
[0080] Furthermore, in order to improve the efficiency of subsequent batch power flow calculations, the power flow calculation examples can be grouped according to the node type of the power flow calculation example, the number of nodes of each type, and the number of branches. This is because the node type, the number of nodes of each type, and the number of branches determine the power network structure of the power system, and the power network structure affects the structure of the relevant matrix in the power flow calculation. Therefore, according to the node type of the power flow calculation example, the number of nodes of each type, and the number of branches, multiple power flow calculation examples are divided into different power flow calculation example groups. When constructing matrices for power flow calculation (such as node admittance matrices, B matrices, etc.), the power flow calculation examples in the same power flow calculation example group have the same or similar matrix dimensions, element distribution, and calculation rules followed, which facilitates unified matrix generation and batch power flow calculation operations.
[0081] In this embodiment, through the above-mentioned preprocessing and grouping of multiple power flow calculation examples, subsequent batch power flow calculation work can be carried out efficiently and accurately, so that when processing multiple different power flow calculation examples, the processes such as matrix construction, power flow calculation and result analysis can be carried out in an orderly manner, thereby improving the power flow calculation efficiency.
[0082] In order to make a clearer description of the batch power flow solution method based on the CPU and GPU hybrid architecture provided in this application, the following is combined with the attached Figure 6 and one A detailed embodiment is described, and the detailed embodiment includes the following steps:
[0083] A plurality of power flow calculation examples are obtained, and the plurality of power flow calculation examples are divided into different power flow calculation example groups according to node types of the power flow calculation examples, the number of nodes of each type, and the number of branches.
[0084] For each power flow calculation example group, a basic power flow calculation example is selected from the power flow calculation example group, and the node admittance matrix and B matrix structure of the power flow calculation example group are determined according to the basic power flow calculation example. According to the node admittance matrix, the B matrix structure, the preset initial voltage vector of each node in the power flow calculation example group, and the preset node constraint vector of each node, the power flow solution matrix of the power flow calculation example group is determined.
[0085] For each power flow calculation example in the power flow calculation example group, the PQ decomposition method is used to perform power flow calculation on the power flow solution matrix to obtain the voltage vector of each node in the power flow calculation example.
[0086] The injected power and the outflow power of each node are determined according to the voltage vector of each node. When the difference between the injected power and the outflow power is greater than a preset difference threshold, the voltage vector is corrected according to the difference between the injected power and the outflow power.
[0087] Return to the step of determining the injected power and the outflow power of each node according to the voltage vector of each node, until the preset iteration end condition is met, stop the iteration, obtain the power flow calculation result of the power flow calculation example, aggregate the power flow calculation results of each power flow calculation example, and obtain the first power flow calculation result of the power flow calculation example group.
[0088] It is determined in parallel whether there are over-limit power flow calculation examples in the multiple power flow calculation example groups. If there are over-limit power flow calculation examples in the power flow calculation example groups, the node type of the over-limit node in the over-limit power flow calculation example is adjusted, and power flow calculation is performed on the adjusted over-limit power flow calculation example to obtain an adjusted power flow calculation result set.
[0089] When the adjusted power flow calculation result set indicates that the adjusted power flow calculation example includes an out-of-limit node, return to the step of adjusting the node type of the out-of-limit node in the out-of-limit power flow calculation example until the adjusted out-of-limit power flow calculation example does not include the out-of-limit node.
[0090] The adjusted power flow calculation result set is determined as the second power flow calculation result set, and the first power flow calculation result set is updated according to the second power flow calculation result set to obtain a target power flow calculation result set.
[0091] For example, taking the above-mentioned single-thread processing steps being executed by the CPU and the multi-thread parallel processing steps being executed by the GPU as an example, the batch power flow solving method based on the CPU and GPU hybrid architecture provided in this application can refer to the attached Figure 6Flowchart shown.
[0092] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0093] Based on the same inventive concept, the embodiment of the present application also provides a batch power flow solving device for implementing the batch power flow solving method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more batch power flow solving device embodiments provided below can refer to the limitations of the batch power flow solving method above, and will not be repeated here.
[0094] In one embodiment, Figure 7 As shown, a batch power flow solving device 700 based on a CPU and GPU hybrid architecture is provided, including a data acquisition module 710, a parallel power flow calculation module 720, an over-limit node processing module 730 and a result updating module 740;
[0095] The data acquisition module 710 is used to acquire multiple power flow calculation example groups based on the CPU, and the power network structure corresponding to the power flow calculation examples in each power flow calculation example group is consistent.
[0096] The parallel power flow calculation module 720 is used to perform parallel power flow calculation on multiple power flow calculation example groups based on the GPU to obtain a first power flow calculation result set, which includes the first power flow calculation results of each power flow calculation example group, and based on the first power flow calculation result set, it is judged in parallel whether there are over-limit power flow calculation examples in the multiple power flow calculation example groups, and the over-limit power flow calculation examples include over-limit nodes.
[0097] The out-of-limit node processing module 730 is used to adjust the node type of the out-of-limit node in the out-of-limit flow calculation example based on the CPU when there is an out-of-limit flow calculation example in the flow calculation example group, perform flow calculation on the adjusted out-of-limit flow calculation example, and obtain a second flow calculation result set, the second flow calculation result set including the second flow calculation results of each adjusted out-of-limit flow calculation example.
[0098] The result updating module 740 is used to update the first power flow calculation result set according to the second power flow calculation result set based on the CPU to obtain a target power flow calculation result set, wherein the target power flow calculation result set includes the target power flow calculation results of each power flow calculation case group.
[0099] In one embodiment, the batch power flow solving device 700 is also used to select a basic power flow calculation example from the power flow calculation example group based on the CPU for each power flow calculation example group, and determine the node admittance matrix and B matrix structure of the power flow calculation example group based on the basic power flow calculation example. The parallel power flow calculation module 720 is also used to execute the power flow calculation task for each power flow calculation example group in parallel based on the GPU to obtain a first power flow calculation result set. When the power flow calculation task of each power flow calculation example group is executed, the steps are as follows: according to the node admittance matrix, the B matrix structure, the preset initial voltage vector of each node in the power flow calculation example group, and the preset node constraint vector of each node, determine the power flow solution matrix of the power flow calculation example group, perform power flow calculation on the power flow solution matrix, and obtain the first power flow calculation result of the power flow calculation example group.
[0100] In one embodiment, the parallel power flow calculation module 720 is also used to perform power flow calculation on the power flow solution matrix using the PQ decomposition method for each power flow calculation example in the power flow calculation example group, obtain the voltage vector of each node in the power flow calculation example, determine the injection power and outflow power of each node according to the voltage vector of each node, and when the difference between the injection power and the outflow power is greater than a preset difference threshold, correct the voltage vector according to the difference between the injection power and the outflow power, and execute again the step of determining the injection power and outflow power of each node according to the voltage vector of each node until the preset iteration end condition is met, stop the iteration, obtain the power flow calculation result of the power flow calculation example, aggregate the power flow calculation results of each power flow calculation example, and obtain the first power flow calculation result of the power flow calculation example group.
[0101] In one embodiment, the over-limit node processing module 730 is also used to adjust the node type of the generator node from a PV node to a PQ node, and adjust the reactive power value of the generator node to a preset reactive power value when the over-limit node is a generator node and the reactive power value of the generator node exceeds the upper and lower limits; when the over-limit node is a load node and the voltage amplitude of the load node exceeds the upper and lower limits, adjust the node type of the load node from a PQ node to a PV node, and adjust the voltage amplitude of the load node to a preset voltage amplitude; perform power flow calculation on the adjusted over-limit power flow calculation example, determine the adjusted voltage amplitude of the generator node, and adjust the voltage amplitude of the load node to a preset voltage amplitude; The reactive power value of the load node after adjustment, when the generator node exceeds the upper limit and the adjusted voltage amplitude is less than the voltage amplitude before adjustment, or when the generator node exceeds the lower limit and the adjusted voltage amplitude is greater than the voltage amplitude before adjustment, the node type and voltage amplitude of the generator node are restored to the node type and voltage amplitude before adjustment; when the load node exceeds the upper limit and the adjusted reactive power is less than the reactive power before adjustment, or when the load node exceeds the lower limit and the adjusted reactive power is greater than the adjusted reactive power, the node type and reactive power value of the load node are restored to the node type and reactive power value before adjustment.
[0102] In one embodiment, the over-limit node processing module 730 is used to perform current calculation on the adjusted over-limit current calculation example to obtain an adjusted current calculation result set. When the adjusted current calculation result set represents that the adjusted current calculation example includes an over-limit node, the step of adjusting the node type of the over-limit node in the over-limit current calculation example is returned until the adjusted over-limit current calculation example does not include the over-limit node, and the adjusted current calculation result set is determined as the second current calculation result set.
[0103] In one embodiment, the data acquisition module 710 is further used to acquire multiple power flow calculation examples, and divide the multiple power flow calculation examples into different power flow calculation example groups according to the node types of the power flow calculation examples, the number of nodes of each type, and the number of branches.
[0104] Each module in the batch power flow solving device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0105] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as a power flow calculation example group. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a batch power flow solution method is implemented.
[0106] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0107] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in the above batch power flow solving method embodiment are implemented.
[0108] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above batch power flow solving method embodiment are implemented.
[0109] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above batch power flow solving method embodiment when executed by a processor.
[0110] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0111] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0112] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0113] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A batch power flow solution method based on a CPU and GPU hybrid architecture, characterized in that: The method comprises: Acquiring multiple power flow calculation example groups based on the CPU, wherein the power flow calculation examples in the same power flow calculation example group correspond to the same power network structure; Performing parallel power flow calculation on the plurality of power flow calculation example groups based on the GPU to obtain a first power flow calculation result set, wherein the first power flow calculation result set includes a first power flow calculation result of each power flow calculation example group, and judging in parallel whether there are over-limit power flow calculation examples in the plurality of power flow calculation example groups according to the first power flow calculation result set, wherein the over-limit power flow calculation examples include over-limit nodes; When the over-limit power flow calculation example exists in the power flow calculation example group, adjusting the node type of the over-limit node in the over-limit power flow calculation example based on the CPU, performing power flow calculation on the adjusted over-limit power flow calculation example to obtain a second power flow calculation result set, wherein the second power flow calculation result set includes the second power flow calculation results of each adjusted over-limit power flow calculation example; The CPU updates the first power flow calculation result set according to the second power flow calculation result set to obtain a target power flow calculation result set, wherein the target power flow calculation result set includes target power flow calculation results of each power flow calculation case group.
2. The method according to claim 1, characterized in that Before performing parallel power flow calculation on the plurality of power flow calculation example groups, the method further comprises: For each of the power flow calculation example groups, selecting a basic power flow calculation example from the power flow calculation example group based on the CPU, and determining a node admittance matrix and a B matrix structure of the power flow calculation example group according to the basic power flow calculation example; The performing parallel power flow calculation on the plurality of power flow calculation example groups based on the GPU to obtain a first power flow calculation result set includes: Based on the GPU, the power flow calculation task for each power flow calculation example group is executed in parallel to obtain a first power flow calculation result set. The power flow calculation task for each power flow calculation example group is executed in the following steps: According to the node admittance matrix, the B matrix structure, the preset initial voltage vector of each node in the power flow calculation example group, and the preset node constraint vector of each node, the power flow solution matrix of the power flow calculation example group is determined, and the power flow calculation is performed on the power flow solution matrix to obtain the first power flow calculation result of the power flow calculation example group.
3. The method according to claim 2, characterized in that The performing power flow calculation on the power flow solution matrix to obtain the first power flow calculation result of the power flow calculation example group includes: For each of the power flow calculation examples in the power flow calculation example group, a PQ decomposition method is used to perform power flow calculation on the power flow solution matrix to obtain a voltage vector of each node in the power flow calculation example; According to the voltage vector of each node, the injection power and outflow power of each node are determined; In the case where the difference between the injected power and the outflow power is greater than a preset difference threshold, the voltage vector is corrected according to the difference between the injected power and the outflow power, and the step of determining the injected power and the outflow power of each node according to the voltage vector of each node is returned to until a preset iteration end condition is met, the iteration is stopped, and the power flow calculation result of the power flow calculation example is obtained; The power flow calculation results of each of the power flow calculation examples are aggregated to obtain a first power flow calculation result of the power flow calculation example group.
4. The method according to any one of claims 1 to 3, characterized in that: The step of adjusting the node type of the over-limit node in the over-limit power flow calculation example includes: When the over-limit node is a generator node and the reactive power value of the generator node exceeds the upper and lower limits, the node type of the generator node is adjusted from a PV node to a PQ node, and the reactive power value of the generator node is adjusted to a preset reactive power value; When the over-limit node is a load node and the voltage amplitude of the load node exceeds the upper and lower limits, the node type of the load node is adjusted from a PQ node to a PV node, and the voltage amplitude of the load node is adjusted to a preset voltage amplitude; Performing power flow calculation on the adjusted over-limit power flow calculation example to determine the adjusted voltage amplitude of the generator node and the adjusted reactive power value of the load node; When the generator node exceeds the upper limit and the voltage amplitude after adjustment is less than the voltage amplitude before adjustment, or when the generator node exceeds the lower limit and the voltage amplitude after adjustment is greater than the voltage amplitude before adjustment, restore the node type and voltage amplitude of the generator node to the node type and voltage amplitude before adjustment; When the load node exceeds the upper limit and the adjusted reactive power is less than the reactive power before adjustment, or when the load node exceeds the lower limit and the adjusted reactive power is greater than the adjusted reactive power, the node type and reactive power value of the load node are restored to the node type and reactive power value before adjustment.
5. The method according to claim 4, characterized in that The step of performing power flow calculation on the adjusted over-limit power flow calculation example to obtain a second power flow calculation result set includes: Perform power flow calculation on the adjusted over-limit power flow calculation example to obtain an adjusted power flow calculation result set; In a case where the adjusted power flow calculation result set represents that the adjusted power flow calculation example includes an out-of-limit node, return to the step of adjusting the node type of the out-of-limit node in the out-of-limit power flow calculation example until the adjusted out-of-limit power flow calculation example does not include an out-of-limit node, and determine the adjusted power flow calculation result set as the second power flow calculation result set.
6. The method according to any one of claims 1 to 3, characterized in that: The obtaining of multiple power flow calculation example groups includes: Obtain multiple power flow calculation examples; According to the node types of the power flow calculation examples, the number of nodes of each type, and the number of branches, the plurality of power flow calculation examples are divided into different power flow calculation example groups.
7. A batch power flow solving device based on a CPU and GPU hybrid architecture, characterized in that: The device comprises: A data acquisition module, used for acquiring multiple power flow calculation example groups based on the CPU, wherein the power flow calculation examples in the same power flow calculation example group correspond to the same power network structure; A parallel power flow calculation module is used to perform parallel power flow calculation on the plurality of power flow calculation example groups based on a GPU to obtain a first power flow calculation result set, wherein the first power flow calculation result set includes a first power flow calculation result of each power flow calculation example group, and according to the first power flow calculation result set, to determine in parallel whether there are any over-limit power flow calculation examples in the plurality of power flow calculation example groups, wherein the over-limit power flow calculation examples include over-limit nodes; an over-limit node processing module, configured to adjust the node type of the over-limit node in the over-limit power flow calculation example based on the CPU when the over-limit power flow calculation example exists in the power flow calculation example group, perform power flow calculation on the adjusted over-limit power flow calculation example, and obtain a second power flow calculation result set, wherein the second power flow calculation result set includes the second power flow calculation results of each adjusted over-limit power flow calculation example; The result updating module is used to update the first power flow calculation result set according to the second power flow calculation result set based on the CPU to obtain a target power flow calculation result set, wherein the target power flow calculation result set includes the target power flow calculation results of each power flow calculation case group.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Parallel computing method and system for CFD (Computational Fluid Dynamics)
CN104331271A
Static security analysis double-layer parallel method based on GPU-CUP heterogeneous computing platform
CN105576648A
Parallel static security analysis method for improving post-disaster recovery of power distribution network
CN111478333A
CNN-based GPU parallel power flow out-of-limit discrimination method
CN112670996A