Electric power system electromagnetic transient simulation calculation acceleration method and related device

In the electromagnetic transient simulation calculation of the power system, resource allocation and reallocation of parallel computing units is solved according to the calculation time of the electrical quantity calculation block, and the problem of unreasonable resource allocation in the prior art is solved and the calculation efficiency is improved.

CN119597484AActive Publication Date: 2025-03-11ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411771389.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-12-14
Filing Date
2024-12-04
Publication Date
2025-03-11
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

The existing electromagnetic transient simulation calculation process of power systems fails to fully consider the resource allocation and sequential arrangement of multiple parallel computing units, making it difficult to achieve rational use of the computing hardware system and to improve computing efficiency.

Method used

By obtaining the parallel calculation unit, the time of each electrical quantity calculation block is calculated, and the parallel calculation unit is placed from large to small according to the calculation time size, and the electrical quantity calculation block is redistributed when necessary to ensure the refined allocation of computing resources.

Benefits of technology

The calculation resources of parallel computing units are allocated in a refined manner, the calculation time error of each parallel computing unit is reduced, and the efficiency of electromagnetic transient simulation calculation of the power system is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597484A_ABST
    Figure CN119597484A_ABST
Patent Text Reader

Abstract

The invention discloses a power system electromagnetic transient simulation calculation acceleration method and a related device, and the method comprises the steps: taking the time averaged to each parallel calculation unit as a boundary, and sequentially putting electrical quantity calculation blocks into each parallel calculation unit according to the calculation time from large to small; then, by taking the average value of the accumulated time differences of the electrical quantity calculation blocks of the parallel computing unit with the maximum accumulated time of the electrical quantity calculation blocks and the parallel computing unit with the minimum accumulated time of the electrical quantity calculation blocks as a condition, if the ratio of the average value of the difference values to the time averaged to each parallel computing unit is smaller than a threshold value, optimization is ended, and if the ratio is not smaller than the threshold value, optimization is ended. And if yes, redistributing the electrical quantity calculation block of the parallel calculation unit with the maximum electrical quantity calculation block accumulation time. The technical problems that the influence of resource allocation and sequence arrangement of multiple parallel computing units on final computing time is not fully considered in the electromagnetic transient simulation computing process of an existing power system, reasonable utilization of a computing hardware system is difficult to achieve, and computing efficiency is difficult to improve are solved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority from application number 202311720269.2 filed on December 14, 2023 Technical Field

[0002] The present invention relates to the technical field of power system simulation, and in particular to a power system electromagnetic transient simulation calculation acceleration method and related devices. Background Art

[0003] Power system simulation calculations rely on the powerful computing power of the computing hardware system in order to accelerate the solution process and realize non-real-time simulation calculations or even real-time simulation calculations. Since the computing hardware system has sufficient computing resources and storage resources, it has obvious advantages over the single computer calculations that were used in the past. However, with the interconnection of regional power grids, the scale of the power system continues to expand, and the widespread use of large-scale new energy and other fast-response power electronic equipment has made the scale and complexity of power system simulation calculations increasingly complex. The data interaction between the various operating sub-units during the calculation process has become more frequent. How to reasonably and efficiently use the computing hardware system for resource acceleration calculations is an issue that needs to be studied urgently.

[0004] The existing power system electromagnetic transient simulation calculation process does not fully consider the impact of resource allocation and sequence arrangement of multiple parallel computing units on the final calculation time, making it difficult to achieve reasonable utilization of the computing hardware system and improve computing efficiency. Summary of the invention

[0005] The present invention provides a method and related device for accelerating the calculation of electromagnetic transient simulation of an electric power system, which is used to solve the technical problem that the existing calculation process of electromagnetic transient simulation of an electric power system does not fully consider the influence of resource allocation and sequence arrangement of multiple parallel computing units on the final calculation time, and it is difficult to achieve reasonable utilization of the computing hardware system and difficult to improve the computing efficiency.

[0006] In view of this, a first aspect of the present invention provides a method for accelerating electromagnetic transient simulation calculation of a power system, comprising the following steps:

[0007] S1. Obtaining the parallel computing unit allocated for electromagnetic transient simulation, at least one parallel computing unit;

[0008] S2. Obtaining a total calculation time based on the calculation time of each electrical quantity calculation block of the electromagnetic transient simulation, and calculating an average time of each parallel calculation unit based on the total calculation time, wherein one electrical quantity calculation block is used to calculate one electrical quantity;

[0009] S3, select the first parallel computing unit as the current parallel computing unit;

[0010] S4, placing the electrical quantity calculation block with the longest calculation time that is not placed in the parallel calculation unit into the current parallel calculation unit;

[0011] S5, calculating the cumulative time of the electrical quantity calculation block of the current parallel calculation unit;

[0012] S6. Calculation ,like , then jump to step S7, if , then jump to step S8, where is the average time for each parallel computing unit, The accumulated time of the electrical quantity calculation block of the current parallel calculation unit;

[0013] S7, determine whether there are electrical quantity calculation blocks that have not been put into the parallel calculation unit, if so, put the electrical quantity calculation blocks that have not been put into the parallel calculation unit and have the closest calculation time An electrical quantity calculation block is placed into the current parallel calculation unit, and the process returns to step S5. If not, the process jumps to step S9;

[0014] S8, determine whether there are parallel computing units that have not been placed in the electrical quantity calculation block, if not, jump to step S9, if yes, determine whether the number of parallel computing units that have not been placed in the electrical quantity calculation block is 1, if the number of parallel computing units that have not been placed in the electrical quantity calculation block is 1, then put all the electrical quantity calculation blocks that have not been placed in the parallel computing units into the parallel computing units that have not been placed in the electrical quantity calculation block, jump to step S9, if the number of parallel computing units that have not been placed in the electrical quantity calculation block is not 1, then take the next parallel computing unit as the current parallel computing unit, and return to step S4;

[0015] S9, obtain the parallel computing unit with the largest cumulative time of the electrical quantity calculation block and the parallel computing unit with the smallest cumulative time of the electrical quantity calculation block, and calculate , Calculates the accumulated time of the block for the maximum electrical quantity, For the minimum electrical quantity calculation block cumulative time, if If the value is less than the threshold, the process goes to step S11; otherwise, the process goes to step S10;

[0016] S10, determine whether there is a parallel computing unit with the largest cumulative time in the electrical quantity calculation block with a computing time less than or equal to If the electrical quantity calculation block is, then the parallel calculation unit with the largest cumulative time of the electrical quantity calculation block that satisfies the calculation time less than or equal to The electrical quantity calculation block with the largest calculation time is transferred to the parallel calculation unit with the smallest electrical quantity calculation block cumulative time, and the electrical quantity calculation block cumulative time is updated for the parallel calculation unit to which the electrical quantity calculation block has been transferred, and the process returns to step S9. If not, the process jumps to step S11;

[0017] S11. End optimization.

[0018] Optionally, in step S7, the computation time closest to the parallel computing unit is When an electrical quantity calculation block is placed in the current parallel calculation unit, if it is not placed in the parallel calculation unit, the calculation time is closest to If there is more than one electrical quantity calculation block, the closest The electrical quantity calculation block with the longest calculation time is placed into the current parallel calculation unit.

[0019] Optionally, the threshold is 5%.

[0020] Optionally, step S2 specifically includes:

[0021] Evaluate the calculation time of each electrical quantity in the electromagnetic transient simulation circuit;

[0022] Calculate the total calculation time of all electrical quantities based on the calculation time of each electrical quantity;

[0023] The average time for each parallel computing unit is calculated based on the total computing time of all electrical quantities.

[0024] A second aspect of the present invention provides a power system electromagnetic transient simulation calculation acceleration device, comprising the following modules:

[0025] A first acquisition module is used to acquire the parallel computing unit allocated for electromagnetic transient simulation, and there is at least one parallel computing unit;

[0026] A time calculation module, used for obtaining a total calculation time based on the calculation time of each electrical quantity calculation block of the electromagnetic transient simulation, and calculating an average time of each parallel calculation unit based on the total calculation time, wherein one electrical quantity calculation block is used for calculating one electrical quantity;

[0027] A selection module is used to select the first parallel computing unit as the current parallel computing unit;

[0028] An insert module is used to insert the electrical quantity calculation block with the longest calculation time that is not put into the parallel calculation unit into the current parallel calculation unit;

[0029] The cumulative time calculation module is used to calculate the cumulative time of the electrical quantity calculation block of the current parallel calculation unit;

[0030] Difference calculation module, used to calculate ,like , then jump to the first judgment module, if , then jump to the second judgment module, where is the average time for each parallel computing unit, The accumulated time of the electrical quantity calculation block of the current parallel calculation unit;

[0031] The first judgment module is used to judge whether there are electrical quantity calculation blocks that have not been put into the parallel calculation unit. If so, the calculation time of the blocks that have not been put into the parallel calculation unit is closest to the An electrical quantity calculation block is placed into the current parallel calculation unit, and the cumulative time calculation module is returned. If not, jump to the second acquisition module;

[0032] The second judgment module is used to judge whether there are parallel computing units that have not been placed in the electrical quantity calculation block. If not, jump to the second acquisition module. If so, judge whether the number of parallel computing units that have not been placed in the electrical quantity calculation block is 1. If the number of parallel computing units that have not been placed in the electrical quantity calculation block is 1, put all the electrical quantity calculation blocks that have not been placed in the parallel computing units into the parallel computing units that have not been placed in the electrical quantity calculation block, jump to the second acquisition module, if the number of parallel computing units that have not been placed in the electrical quantity calculation block is not 1, take the next parallel computing unit as the current parallel computing unit, and return to the placement module;

[0033] The second acquisition module is used to obtain the parallel computing unit with the largest cumulative time of the electrical quantity calculation block and the parallel computing unit with the smallest cumulative time of the electrical quantity calculation block, and calculate , Calculates the accumulated time of the block for the maximum electrical quantity, For the minimum electrical quantity calculation block cumulative time, if If the value is less than the threshold, the process jumps to the end module; otherwise, the process jumps to the third judgment module;

[0034] The third judgment module is used to judge whether there is a parallel computing unit with the largest cumulative time of the electrical quantity calculation block with a calculation time less than or equal to If the electrical quantity calculation block is, then the parallel calculation unit with the largest cumulative time of the electrical quantity calculation block that satisfies the calculation time less than or equal to The electrical quantity calculation block with the largest calculation time is transferred to the parallel calculation unit with the smallest electrical quantity calculation block cumulative time, and the electrical quantity calculation block cumulative time is updated for the parallel calculation unit to which the electrical quantity calculation block has been transferred, and the second acquisition module is returned. If not, the module is jumped to the end module;

[0035] End module, used to end the optimization.

[0036] Optionally, in the first judgment module, the computation time closest to the parallel computing unit is When an electrical quantity calculation block is placed in the current parallel calculation unit, if it is not placed in the parallel calculation unit, the calculation time is closest to If there is more than one electrical quantity calculation block, the closest The electrical quantity calculation block with the longest calculation time is placed into the current parallel calculation unit.

[0037] Optionally, the threshold is 5%.

[0038] Optionally, the time calculation module is specifically used for:

[0039] Configure an electrical quantity calculation block for each electrical quantity;

[0040] Evaluate the computation time of each electrical quantity calculation block for electromagnetic transient simulation;

[0041] Calculate the total calculation time of all electrical quantity calculation blocks according to the calculation time of each electrical quantity calculation block;

[0042] The average time for each parallel computing unit is calculated based on the total computing time of all electrical quantity computing blocks.

[0043] A third aspect of the present invention provides a power system electromagnetic transient simulation computing acceleration device, the device comprising a processor and a memory:

[0044] The memory is used to store program code and transmit the program code to the processor;

[0045] The processor is used to execute the power system electromagnetic transient simulation calculation acceleration method described in any one of the first aspects according to the instructions in the program code.

[0046] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the power system electromagnetic transient simulation calculation acceleration method described in any one of the first aspects.

[0047] It can be seen from the above technical solutions that the power system electromagnetic transient simulation calculation acceleration method provided by the present invention has the following advantages:

[0048] The electric power system electromagnetic transient simulation calculation acceleration method provided by the present invention takes the time averaged to each parallel calculation unit as the boundary, and sequentially places the electric quantity calculation blocks into each parallel calculation unit according to the calculation time size from large to small. After all the electric quantity calculation blocks are allocated to the parallel calculation units, the average of the electric quantity calculation block cumulative time differences between the parallel calculation unit with the largest electric quantity calculation block cumulative time and the parallel calculation unit with the smallest electric quantity calculation block cumulative time is used as a condition. If the ratio of the difference average to the time averaged to each parallel calculation unit is less than a threshold value, the optimization is terminated. If it is not less than the threshold value, the electric quantity calculation block of the parallel calculation unit with the largest electric quantity calculation block cumulative time is reallocated. The electric quantity calculation blocks are further refined in an iterative manner to quickly reach the expected error range, thereby realizing refined allocation of computing resources of the parallel calculation units, reducing the calculation time error of each parallel calculation unit, and solving the technical problems that the existing electric power system electromagnetic transient simulation calculation process does not fully consider the influence of resource allocation and sequence arrangement of multiple parallel calculation units on the final calculation time, and it is difficult to realize reasonable utilization of the computing hardware system and improve computing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 A schematic diagram of a flow chart of a method for accelerating electromagnetic transient simulation calculation of a power system provided in an embodiment of the present invention;

[0051] Figure 2 It is a schematic diagram of the structure of the power system electromagnetic transient simulation calculation acceleration device provided in an embodiment of the present invention;

[0052] Figure 3 It is a schematic diagram of the structure of the power system electromagnetic transient simulation calculation acceleration device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.

[0054] For easier understanding, see Figure 1 The present invention provides an embodiment of a method for accelerating calculation of electromagnetic transient simulation of a power system, comprising:

[0055] Step S1, obtaining the parallel computing unit allocated for electromagnetic transient simulation, wherein there is at least one parallel computing unit.

[0056] It should be noted that the parallel computing unit can be a CPU core or a GPU core. The number of parallel computing units allocated for electromagnetic transient simulation can be denoted as M, where M≥1.

[0057] Step S2, obtaining the total calculation time based on the calculation time of each electrical quantity calculation block of the electromagnetic transient simulation, and calculating the average time of each parallel calculation unit based on the total calculation time, wherein one electrical quantity calculation block is used to calculate one electrical quantity.

[0058] It should be noted that in electromagnetic transient calculation, there are many electrical quantity calculation blocks, and one electrical quantity calculation block is used to calculate one electrical quantity. Each electrical quantity calculation block has its own calculation time. Each electrical quantity calculation block can be arbitrarily assigned to a parallel calculation unit. Since the calculation of each electrical quantity is completely independent, it can be completely parallel. Divide the electrical quantity calculation block as equally as possible into each parallel calculation unit that can be parallelized according to the accumulated time. Assuming there are N electrical quantity calculation blocks, sort them from large to small according to the calculation time. The calculation time of each electrical quantity calculation block is The total calculation time of all electrical quantity calculation blocks is: , the average time for each parallel computing unit is In a specific embodiment, an electrical quantity calculation block is first configured for each electrical quantity, and then the calculation time of each electrical quantity calculation block for electromagnetic transient simulation is evaluated, and the total calculation time of all electrical quantity calculation blocks is calculated according to the calculation time of each electrical quantity calculation block, and finally the average time of each parallel computing unit is calculated according to the total calculation time of all electrical quantity calculation blocks.

[0059] Step S3: Select the first parallel computing unit as the current parallel computing unit.

[0060] It should be noted that a parallel computing unit is first selected and used as the current parallel computing unit.

[0061] Step S4: put the electrical quantity calculation block with the longest calculation time that is not put into the parallel calculation unit into the current parallel calculation unit.

[0062] Step S5: Calculate the accumulated time of the electrical quantity calculation block of the current parallel calculation unit.

[0063] It should be noted that the total number of electrical quantity calculation blocks in the current parallel calculation unit is W, and the cumulative time of the current parallel calculation unit is:

[0064]

[0065] in, is the cumulative time of the previous parallel computing unit, i is the i-th electrical quantity calculation block in the previous parallel computing unit, W is the total number of electrical quantity calculation blocks in the previous parallel computing unit, is the calculation time of the ith electrical quantity calculation block.

[0066] Step S6: Calculation ,like , then jump to step S7, if , then jump to step S8, where is the average time for each parallel computing unit, The accumulated time for the electrical quantity calculation block of the current parallel calculation unit.

[0067] It should be noted that the average calculation time for each parallel computing unit is The accumulated time of the electrical quantity calculation block of the current parallel calculation unit The difference ,if , then the electrical quantity calculation block of the current parallel calculation unit is allowed to continue to be placed in the electrical quantity calculation block, and jump to step S7. , the current parallel computing unit is not allowed to continue to put into the electrical quantity calculation block.

[0068] Step S7: determine whether there are any electrical quantity calculation blocks that have not been put into the parallel calculation unit. If so, the calculation blocks with the closest calculation time will be put into the parallel calculation unit. If an electrical quantity calculation block is placed in the current parallel computing unit, the process returns to step S5. If not, the process jumps to step S9.

[0069] It should be noted that, in step S6, , it is determined whether there are any electrical quantity calculation blocks that have not been put into the parallel calculation unit. If there are any electrical quantity calculation blocks that have not been put into the parallel calculation unit, the calculation blocks with the closest calculation time will be put into the parallel calculation unit. The electric quantity calculation block that is not put into the parallel calculation unit is placed in the current parallel calculation unit, and the process returns to step S5. When an electrical quantity calculation block is placed in the current parallel calculation unit, if it is not placed in the parallel calculation unit, the calculation time is closest to If there is more than one electrical quantity calculation block, the closest The electrical quantity calculation block with the longest calculation time is placed into the current parallel calculation unit. For example, The calculation time is closest to 6, and it is not put into the parallel computing unit. There are two electrical quantity calculation blocks, and the calculation times are 4 and 8 respectively. Then the electrical quantity calculation block with a calculation time of 8 is put into the current parallel calculation unit. If there is no electrical quantity calculation block that has not been placed in the parallel calculation unit, jump directly to step S9.

[0070] Step S8, determine whether there are parallel computing units that have not been placed in the electrical quantity calculation block. If not, jump to step S9. If yes, determine whether the number of parallel computing units that have not been placed in the electrical quantity calculation block is 1. If the number of parallel computing units that have not been placed in the electrical quantity calculation block is 1, then put all the electrical quantity calculation blocks that have not been placed in the parallel computing units into the parallel computing units that have not been placed in the electrical quantity calculation block, and jump to step S9. If the number of parallel computing units that have not been placed in the electrical quantity calculation block is not 1, then use the next parallel computing unit as the current parallel computing unit and return to step S4.

[0071] It should be noted that, in step S6, , determine whether there are parallel computing units that have not been placed in the electrical quantity calculation block. If there are parallel computing units that have not been placed in the electrical quantity calculation block, determine whether the number of parallel computing units that have not been placed in the electrical quantity calculation block is 1. If the number of parallel computing units that have not been placed in the electrical quantity calculation block is 1, then all the electrical quantity calculation blocks that have not been placed in the parallel computing units are placed in the parallel computing units that have not been placed in the electrical quantity calculation block, and jump to step S9. If the number of parallel computing units that have not been placed in the electrical quantity calculation block is not 1, use the next parallel computing unit as the current parallel computing unit and return to step S4. That is, after the first M-1 parallel computing units are processed, all electrical quantity calculation blocks that have not been placed in the parallel computing units are placed in the Mth parallel computing unit. If in step S6, When there are no parallel computing units that have not been put into the electrical quantity calculation block, it directly jumps to step S9.

[0072] Step S9: Obtain the parallel computing unit with the largest accumulated time of the electrical quantity calculation block and the parallel computing unit with the smallest accumulated time of the electrical quantity calculation block, and calculate , Calculates the accumulated time of the block for the maximum electrical quantity, For the minimum electrical quantity calculation block cumulative time, if If it is less than the threshold, jump to step S11; otherwise, jump to step S10.

[0073] It should be noted that the accumulated time of the electrical quantity calculation blocks in all parallel calculation units is checked to find the parallel calculation unit with the largest accumulated time of the electrical quantity calculation block and the parallel calculation unit with the smallest accumulated time of the electrical quantity calculation block. The accumulated time of the electrical quantity calculation block of the parallel calculation unit with the largest accumulated time of the electrical quantity calculation block is recorded as The electrical quantity calculation block cumulative time of the parallel computing unit with the smallest electrical quantity calculation block cumulative time is recorded as , calculate the mean of the difference between the two , .if If the value is less than the threshold, the process jumps to step S12, otherwise, the process jumps to step S10. In one embodiment, the threshold is set to 5%.

[0074] Step S10: Determine whether there is a parallel computing unit with the largest accumulated time in the electrical quantity calculation block with a computing time less than or equal to If the electrical quantity calculation block is, then the parallel calculation unit with the largest cumulative time of the electrical quantity calculation block that satisfies the calculation time less than or equal to The electrical quantity calculation block with the longest calculation time is transferred to the parallel calculation unit with the smallest electrical quantity calculation block cumulative time, and the electrical quantity calculation block cumulative time of the parallel calculation unit to which the electrical quantity calculation block has been transferred is updated, and the process returns to step S9. If not, the process jumps to step S11.

[0075] It should be noted that If the value is not less than the threshold, it means that there is room for further refinement of the allocation. At this time, it is determined whether there is a parallel computing unit with the largest cumulative time of the electrical quantity calculation block whose computing time is less than or equal to the mean of the difference. If the electrical quantity calculation block is, then the parallel calculation unit with the largest cumulative time of the electrical quantity calculation block that satisfies the calculation time less than or equal to The electrical quantity calculation block with the largest calculation time is transferred to the parallel calculation unit with the smallest electrical quantity calculation block cumulative time, and the electrical quantity calculation block cumulative time of the two parallel calculation units that have transferred the electrical quantity calculation blocks is recalculated and updated, and the process returns to step S9. If there is no parallel calculation unit with the largest electrical quantity calculation block cumulative time that has a calculation time less than or equal to the difference mean, If the electrical quantity calculation block is not found, the optimization process will jump to step S11 to end the optimization.

[0076] Step S11, end the optimization.

[0077] The electric power system electromagnetic transient simulation calculation acceleration method provided by the present invention takes the time averaged to each parallel calculation unit as the boundary, and sequentially places the electric quantity calculation blocks into each parallel calculation unit according to the calculation time size from large to small. After all the electric quantity calculation blocks are allocated to the parallel calculation units, the average of the electric quantity calculation block cumulative time differences between the parallel calculation unit with the largest electric quantity calculation block cumulative time and the parallel calculation unit with the smallest electric quantity calculation block cumulative time is used as a condition. If the ratio of the difference average to the time averaged to each parallel calculation unit is less than a threshold value, the optimization is terminated. If it is not less than the threshold value, the electric quantity calculation block of the parallel calculation unit with the largest electric quantity calculation block cumulative time is reallocated. The electric quantity calculation blocks are further refined in an iterative manner to quickly reach the expected error range, thereby realizing refined allocation of computing resources of the parallel calculation units, reducing the calculation time error of each parallel calculation unit, and solving the technical problems that the existing electric power system electromagnetic transient simulation calculation process does not fully consider the influence of resource allocation and sequence arrangement of multiple parallel calculation units on the final calculation time, and it is difficult to realize reasonable utilization of the computing hardware system and improve computing efficiency.

[0078] For easier understanding, see Figure 2 The present invention provides an embodiment of a power system electromagnetic transient simulation calculation acceleration device, comprising the following modules:

[0079] A first acquisition module is used to acquire the parallel computing unit allocated for electromagnetic transient simulation, and there is at least one parallel computing unit;

[0080] A time calculation module, used for obtaining a total calculation time based on the calculation time of each electrical quantity calculation block of the electromagnetic transient simulation, and calculating an average time of each parallel calculation unit based on the total calculation time, wherein one electrical quantity calculation block is used for calculating one electrical quantity;

[0081] A selection module is used to select the first parallel computing unit as the current parallel computing unit;

[0082] An insert module is used to insert the electrical quantity calculation block with the longest calculation time that is not put into the parallel calculation unit into the current parallel calculation unit;

[0083] The cumulative time calculation module is used to calculate the cumulative time of the electrical quantity calculation block of the current parallel calculation unit;

[0084] Difference calculation module, used to calculate ,like , then jump to the first judgment module, if , then jump to the second judgment module, where is the average time for each parallel computing unit, The accumulated time of the electrical quantity calculation block of the current parallel calculation unit;

[0085] The first judgment module is used to judge whether there are electrical quantity calculation blocks that have not been put into the parallel calculation unit. If so, the calculation time of the blocks that have not been put into the parallel calculation unit is closest to the An electrical quantity calculation block is placed into the current parallel calculation unit, and the cumulative time calculation module is returned. If not, jump to the second acquisition module;

[0086] The second judgment module is used to judge whether there are parallel computing units that have not been placed in the electrical quantity calculation block. If not, jump to the second acquisition module. If so, judge whether the number of parallel computing units that have not been placed in the electrical quantity calculation block is 1. If the number of parallel computing units that have not been placed in the electrical quantity calculation block is 1, put all the electrical quantity calculation blocks that have not been placed in the parallel computing units into the parallel computing units that have not been placed in the electrical quantity calculation block, jump to the second acquisition module, if the number of parallel computing units that have not been placed in the electrical quantity calculation block is not 1, take the next parallel computing unit as the current parallel computing unit, and return to the placement module;

[0087] The second acquisition module is used to obtain the parallel computing unit with the largest cumulative time of the electrical quantity calculation block and the parallel computing unit with the smallest cumulative time of the electrical quantity calculation block, and calculate , Calculates the accumulated time of the block for the maximum electrical quantity, For the minimum electrical quantity calculation block cumulative time, if If the value is less than the threshold, the process jumps to the end module; otherwise, the process jumps to the third judgment module;

[0088] The third judgment module is used to judge whether there is a parallel computing unit with the largest cumulative time of the electrical quantity calculation block with a calculation time less than or equal to If the electrical quantity calculation block is, then the parallel calculation unit with the largest cumulative time of the electrical quantity calculation block that satisfies the calculation time less than or equal to The electrical quantity calculation block with the largest calculation time is transferred to the parallel calculation unit with the smallest electrical quantity calculation block cumulative time, the electrical quantity calculation block cumulative time of the parallel calculation unit to which the electrical quantity calculation block has been transferred is updated, and the process jumps to the second acquisition module. If not, the process jumps to the end module;

[0089] End module, used to end the optimization.

[0090] In one embodiment, in the first judgment module, the computation time closest to the parallel computing unit is When an electrical quantity calculation block is placed in the current parallel calculation unit, if it is not placed in the parallel calculation unit, the calculation time is closest to If there is more than one electrical quantity calculation block, the closest The electrical quantity calculation block with the longest calculation time is placed into the current parallel calculation unit.

[0091] In one embodiment, the threshold is 5%.

[0092] In one embodiment, the time calculation module is specifically used for:

[0093] Configure an electrical quantity calculation block for each electrical quantity;

[0094] Evaluate the computation time of each electrical quantity calculation block for electromagnetic transient simulation;

[0095] Calculate the total calculation time of all electrical quantity calculation blocks according to the calculation time of each electrical quantity calculation block;

[0096] The average time for each parallel computing unit is calculated based on the total computing time of all electrical quantity computing blocks.

[0097] For easier understanding, see Figure 3 The present invention provides an embodiment of a power system electromagnetic transient simulation computing acceleration device, the device comprising a processor and a memory:

[0098] The memory is used to store program code and transmit the program code to the processor;

[0099] The processor is used to execute the power system electromagnetic transient simulation calculation acceleration method provided in the present invention according to the instructions in the program code.

[0100] The present invention provides an embodiment of a computer-readable storage medium, wherein the computer-readable storage medium is used to store program codes, and the program codes are used to execute the power system electromagnetic transient simulation calculation acceleration method provided in the present invention.

[0101] The power system electromagnetic transient simulation calculation acceleration device, equipment and computer-readable storage medium provided in the present invention are used to execute the power system electromagnetic transient simulation calculation acceleration method provided in the present invention. The principles and technical effects achieved are the same as those of the power system electromagnetic transient simulation calculation acceleration method provided in the present invention, and will not be repeated here.

[0102] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for accelerating electromagnetic transient simulation calculation of a power system, characterized in that: The following steps are involved: S1. Obtaining the parallel computing unit allocated for electromagnetic transient simulation, at least one parallel computing unit; S2. Obtaining a total calculation time based on the calculation time of each electrical quantity calculation block of the electromagnetic transient simulation, and calculating an average time of each parallel calculation unit based on the total calculation time, wherein one electrical quantity calculation block is used to calculate one electrical quantity; S3, select the first parallel computing unit as the current parallel computing unit; S4, placing the electrical quantity calculation block with the longest calculation time that is not placed in the parallel calculation unit into the current parallel calculation unit; S5, calculating the cumulative time of the electrical quantity calculation block of the current parallel calculation unit; S6. Calculation ,like , then jump to step S7, if , then jump to step S8, where is the average time for each parallel computing unit, The accumulated time of the electrical quantity calculation block of the current parallel calculation unit; S7, determine whether there are electrical quantity calculation blocks that have not been put into the parallel calculation unit, if so, put the electrical quantity calculation blocks that have not been put into the parallel calculation unit and have the closest calculation time An electrical quantity calculation block is placed into the current parallel calculation unit, and the process returns to step S5. If not, the process jumps to step S9; S8, determine whether there are parallel computing units that have not been placed in the electrical quantity calculation block, if not, jump to step S9, if yes, determine whether the number of parallel computing units that have not been placed in the electrical quantity calculation block is 1, if the number of parallel computing units that have not been placed in the electrical quantity calculation block is 1, then put all the electrical quantity calculation blocks that have not been placed in the parallel computing units into the parallel computing units that have not been placed in the electrical quantity calculation block, jump to step S9, if the number of parallel computing units that have not been placed in the electrical quantity calculation block is not 1, then take the next parallel computing unit as the current parallel computing unit, and return to step S4; S9, obtain the parallel computing unit with the largest cumulative time of the electrical quantity calculation block and the parallel computing unit with the smallest cumulative time of the electrical quantity calculation block, and calculate , Calculates the accumulated time of the block for the maximum electrical quantity, For the minimum electrical quantity calculation block cumulative time, if If the value is less than the threshold, the process goes to step S11; otherwise, the process goes to step S10; S10, determine whether there is a parallel computing unit with the largest cumulative time in the electrical quantity calculation block with a computing time less than or equal to If the electrical quantity calculation block is, then the parallel calculation unit with the largest cumulative time of the electrical quantity calculation block that satisfies the calculation time less than or equal to The electrical quantity calculation block with the largest calculation time is transferred to the parallel calculation unit with the smallest electrical quantity calculation block cumulative time, and the electrical quantity calculation block cumulative time is updated for the parallel calculation unit to which the electrical quantity calculation block has been transferred, and the process returns to step S9. If not, the process jumps to step S11; S11. End optimization.

2. The method for accelerating calculation of electromagnetic transient simulation of power system according to claim 1, characterized in that: In step S7, the computation time closest to the When an electrical quantity calculation block is placed in the current parallel calculation unit, if it is not placed in the parallel calculation unit, the calculation time is closest to If there is more than one electrical quantity calculation block, the closest The electrical quantity calculation block with the longest calculation time is placed into the current parallel calculation unit.

3. The method for accelerating calculation of electromagnetic transient simulation of power system according to claim 1, characterized in that: Threshold 5%.

4. The method for accelerating calculation of electromagnetic transient simulation of power system according to claim 1, characterized in that: Step S2 specifically includes: Configure an electrical quantity calculation block for each electrical quantity; Evaluate the computation time of each electrical quantity calculation block for electromagnetic transient simulation; Calculate the total calculation time of all electrical quantity calculation blocks according to the calculation time of each electrical quantity calculation block; The average time for each parallel computing unit is calculated based on the total computing time of all electrical quantity computing blocks.

5. A power system electromagnetic transient simulation calculation acceleration device, characterized in that: Includes the following modules: A first acquisition module is used to acquire the parallel computing unit allocated for electromagnetic transient simulation, and there is at least one parallel computing unit; A time calculation module, used for obtaining a total calculation time based on the calculation time of each electrical quantity calculation block of the electromagnetic transient simulation, and calculating an average time of each parallel calculation unit based on the total calculation time, wherein one electrical quantity calculation block is used for calculating one electrical quantity; A selection module is used to select the first parallel computing unit as the current parallel computing unit; An insert module is used to insert the electrical quantity calculation block with the longest calculation time that is not put into the parallel calculation unit into the current parallel calculation unit; The cumulative time calculation module is used to calculate the cumulative time of the electrical quantity calculation block of the current parallel calculation unit; Difference calculation module, used to calculate ,like , then jump to the first judgment module, if , then jump to the second judgment module, where is the average time for each parallel computing unit, The accumulated time of the electrical quantity calculation block of the current parallel calculation unit; The first judgment module is used to judge whether there are electrical quantity calculation blocks that have not been put into the parallel calculation unit. If so, the calculation time of the blocks that have not been put into the parallel calculation unit is closest to the An electrical quantity calculation block is placed into the current parallel calculation unit, and the cumulative time calculation module is returned. If not, jump to the second acquisition module; The second judgment module is used to judge whether there are parallel computing units that have not been placed in the electrical quantity calculation block. If not, jump to the second acquisition module. If so, judge whether the number of parallel computing units that have not been placed in the electrical quantity calculation block is 1. If the number of parallel computing units that have not been placed in the electrical quantity calculation block is 1, put all the electrical quantity calculation blocks that have not been placed in the parallel computing units into the parallel computing units that have not been placed in the electrical quantity calculation block, jump to the second acquisition module, if the number of parallel computing units that have not been placed in the electrical quantity calculation block is not 1, take the next parallel computing unit as the current parallel computing unit, and return to the placement module; The second acquisition module is used to obtain the parallel computing unit with the largest cumulative time of the electrical quantity calculation block and the parallel computing unit with the smallest cumulative time of the electrical quantity calculation block, and calculate , Calculates the accumulated time of the block for the maximum electrical quantity, For the minimum electrical quantity calculation block cumulative time, if If the value is less than the threshold, the process jumps to the end module; otherwise, the process jumps to the third judgment module; The third judgment module is used to judge whether there is a parallel computing unit with the largest cumulative time of the electrical quantity calculation block with a calculation time less than or equal to If the electrical quantity calculation block is, then the parallel calculation unit with the largest cumulative time of the electrical quantity calculation block that satisfies the calculation time less than or equal to The electrical quantity calculation block with the largest calculation time is transferred to the parallel calculation unit with the smallest electrical quantity calculation block cumulative time, the electrical quantity calculation block cumulative time of the parallel calculation unit to which the electrical quantity calculation block has been transferred is updated, and the process jumps to the second acquisition module. If not, the process jumps to the end module; End module, used to end the optimization.

6. The power system electromagnetic transient simulation calculation acceleration device according to claim 5, characterized in that: In the first judgment module, the computation time closest to the When an electrical quantity calculation block is placed in the current parallel calculation unit, if it is not placed in the parallel calculation unit, the calculation time is closest to If there is more than one electrical quantity calculation block, the closest The electrical quantity calculation block with the longest calculation time is placed into the current parallel calculation unit.

7. The power system electromagnetic transient simulation calculation acceleration device according to claim 5, characterized in that: Threshold 5%.

8. The power system electromagnetic transient simulation calculation acceleration device according to claim 5, characterized in that: The time calculation module is specifically used for: Configure an electrical quantity calculation block for each electrical quantity; Evaluate the computation time of each electrical quantity calculation block for electromagnetic transient simulation; Calculate the total calculation time of all electrical quantity calculation blocks according to the calculation time of each electrical quantity calculation block; The average time for each parallel computing unit is calculated based on the total computing time of all electrical quantity computing blocks.

9. An electric power system electromagnetic transient simulation computing acceleration device, characterized in that: The device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the power system electromagnetic transient simulation calculation acceleration method described in any one of claims 1-4 according to the instructions in the program code.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program code, and the program code is used to execute the power system electromagnetic transient simulation calculation acceleration method described in any one of claims 1-4.

Citation Information

Patent Citations

  • Method and device for allocation of code file statistics task

    CN103309747A

  • Distributed computing system task allocation method and related equipment

    CN110688204A