A method and related device for accelerating calculation of electromagnetic transient simulation of power system

By optimizing the allocation method of electrical quantity calculation blocks, the problem of unreasonable resource allocation in power system electromagnetic transient simulation calculations is solved, and the calculation efficiency and hardware system utilization are improved.

CN119597484BActive Publication Date: 2025-10-03ELECTRIC 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
Patents(China)
Current Assignee / Owner
Priority Date
2023-12-14
Filing Date
2024-12-04
Publication Date
2025-10-03
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

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

Method used

By obtaining parallel computing units, optimizing the allocation based on the calculation time of the electrical quantity calculation block, and using an iterative method to allocate resources, it is ensured that the calculation time error of each parallel computing unit is within the expected range, thus achieving refined resource allocation.

Benefits of technology

The efficiency of electromagnetic transient simulation calculation of power system is improved, the calculation time error of parallel computing units is reduced, and the rational utilization of computing hardware system is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597484B_ABST
    Figure CN119597484B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and related device for accelerating the calculation of electromagnetic transient simulation of power systems. The method uses the time averaged to each parallel computing unit as a limit, sequentially placing electrical quantity calculation blocks into each parallel computing unit in descending order of calculation time. The method then uses the average difference in the cumulative time of the electrical quantity calculation blocks of the parallel computing unit with the largest cumulative electrical quantity calculation block time and the parallel computing unit with the smallest cumulative electrical quantity calculation block time as a condition. If the ratio of the average difference to the time averaged to each parallel computing unit is less than a threshold, the optimization is terminated. If it is not less than the threshold, the electrical quantity calculation blocks of the parallel computing unit with the largest cumulative electrical quantity calculation block time are reallocated. The method solves the technical problem that the existing calculation process for electromagnetic transient simulation of power systems does not fully consider the impact of the resource allocation and sequential arrangement of multiple parallel computing units on the final calculation time, making it difficult to achieve reasonable utilization of the computing hardware system and difficult to improve computing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority from application number 202311720269.2, filed 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 relies on the powerful computing power of computing hardware systems to accelerate the solution process, enabling non-real-time and even real-time simulations. Because computing hardware systems have ample computing and storage resources, they offer significant advantages over the single computer calculations typically used in the past. However, with the interconnection of regional power grids, the scale of power systems continues to expand, coupled with the widespread use of fast-response power electronic equipment such as large-scale renewable energy, the scale and computational complexity of power system simulations are becoming increasingly complex. Data interaction between various computational subunits is becoming increasingly frequent during the computational process. Therefore, how to rationally and efficiently utilize computing hardware systems to accelerate computational resources is an issue that requires urgent research.

[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 power system, which is used to solve the technical problems that 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 difficult to improve computing efficiency.

[0006] In view of this, a first aspect of the present invention provides a method for accelerating electromagnetic transient simulation calculations in 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 computing 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. Calculate 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 per 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 are not put into the parallel calculation unit, if so, calculate the blocks with the closest calculation time. An electrical quantity calculation block is placed into the current parallel computing unit, and the process returns to step S5. If not, the process jumps to step S9.

[0014] S8. Determine whether there are any parallel computing units that have not been placed in the electrical quantity calculation block. If not, jump to step S9. If so, 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, place 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, use 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 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 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 shortest 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.

[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 calculation time for each parallel computing unit is calculated based on the total calculation 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 a parallel computing unit allocated for electromagnetic transient simulation, and there is at least one parallel computing unit;

[0026] a time calculation module, configured to obtain a total calculation time based on the calculation time of each electrical quantity calculation block of the electromagnetic transient simulation, and calculate 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;

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

[0028] The placing module is used to place the electrical quantity calculation block with the longest calculation time that has not been placed in 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 per 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] a second determination module, configured to determine whether there are any parallel computing units that have not been placed in the electrical quantity calculation block; if not, jump to the second acquisition module; if so, 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, place all electrical quantity calculation blocks that have not been placed in the parallel computing unit into the parallel computing unit that has 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, use 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 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 shortest 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 the second acquisition module. If not, the process jumps 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 not put into the parallel computing unit. 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 to:

[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 based on 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 calculation 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, which 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] From the above technical solutions, it can be seen that the power system electromagnetic transient simulation calculation acceleration method provided by the present invention has the following advantages:

[0048] The power system electromagnetic transient simulation calculation acceleration method provided by the present invention uses the time averaged to each parallel computing unit as a limit, and places the electrical quantity calculation blocks into each parallel computing unit in order from large to small according to the calculation time of the electrical quantity calculation blocks. After all the electrical quantity calculation blocks are allocated to the parallel computing units, the average of the difference in the electrical quantity calculation block cumulative time of the parallel computing unit with the largest electrical quantity calculation block cumulative time and the parallel computing unit with the smallest electrical quantity calculation block cumulative time is used as a condition. If the ratio of the average of the difference to the time averaged to each parallel computing unit is less than a threshold, the optimization is terminated. If it is not less than the threshold, the electrical quantity calculation block of the parallel computing unit with the largest electrical quantity calculation block cumulative time is reallocated. The electrical 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 computing units and reducing the calculation time error of each parallel computing unit. This solves the technical problem that the existing power system electromagnetic transient simulation calculation process does not fully consider the impact of resource allocation and sequential arrangement of multiple parallel computing units on the final calculation time, making it difficult to achieve reasonable utilization of the computing hardware system and difficult to 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 following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 any creative work.

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

[0051] Figure 2 This 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 This 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 solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of 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 making creative efforts shall fall 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: Obtain the parallel computing unit allocated for electromagnetic transient simulation, 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 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 computing 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 calculations, 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 cumulative 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. The total calculation time of all electrical quantity calculation blocks is calculated based on the calculation time of each electrical quantity calculation block. Finally, the average time of each parallel computing unit is calculated based on 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: Place 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.

[0062] Step S5: Calculate the cumulative time of the electrical quantity calculation block of the current parallel computing 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 i-th electrical quantity calculation block.

[0066] Step S6: Calculate ,like , then jump to step S7, if , then jump to step S8, where is the average time per parallel computing unit, Accumulates the 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 computing 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 place electrical quantity calculation blocks.

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

[0069] It should be noted that, in step S6, When the calculation time is closest to the current electrical quantity calculation block, it is determined whether there are electrical quantity calculation blocks that have not been put into the parallel calculation unit. If there are electrical quantity calculation blocks that have not been put into the parallel calculation unit, the electrical quantity calculation blocks that have not been put into the parallel calculation unit will be calculated The electric quantity calculation block is put into 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, 6, and the calculation time is closest to that of the parallel computing unit. There are two electrical quantity calculation blocks with calculation times of 4 and 8 respectively. Then the electrical quantity calculation block with calculation time of 8 is placed in the current parallel calculation unit. If there is no electrical quantity calculation block that has not been placed in the parallel computing 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 so, 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, 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, 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 the 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 is no parallel computing unit that has not been put into the electrical quantity calculation block, it jumps directly to step S9.

[0072] Step 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.

[0073] It should be noted that the cumulative time of the electrical quantity calculation blocks in all parallel calculation units is checked, and the parallel calculation unit with the largest cumulative time of the electrical quantity calculation block and the parallel calculation unit with the smallest cumulative time of the electrical quantity calculation block are found. The cumulative time of the electrical quantity calculation block of the parallel calculation unit with the largest cumulative 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 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 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 shortest 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 it is not less than the threshold, it means 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 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 mean of the difference, If the electrical quantity calculation block is not found, the process jumps to step S11 to end the optimization.

[0076] Step S11, end optimization.

[0077] The power system electromagnetic transient simulation calculation acceleration method provided by the present invention uses the time averaged to each parallel computing unit as a limit, and places the electrical quantity calculation blocks into each parallel computing unit in order from large to small according to the calculation time of the electrical quantity calculation blocks. After all the electrical quantity calculation blocks are allocated to the parallel computing units, the average of the difference in the electrical quantity calculation block cumulative time of the parallel computing unit with the largest electrical quantity calculation block cumulative time and the parallel computing unit with the smallest electrical quantity calculation block cumulative time is used as a condition. If the ratio of the average of the difference to the time averaged to each parallel computing unit is less than a threshold, the optimization is terminated. If it is not less than the threshold, the electrical quantity calculation block of the parallel computing unit with the largest electrical quantity calculation block cumulative time is reallocated. The electrical 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 computing units and reducing the calculation time error of each parallel computing unit. This solves the technical problem that the existing power system electromagnetic transient simulation calculation process does not fully consider the impact of resource allocation and sequential arrangement of multiple parallel computing units on the final calculation time, making it difficult to achieve reasonable utilization of the computing hardware system and difficult to 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, including the following modules:

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

[0080] a time calculation module, configured to obtain a total calculation time based on the calculation time of each electrical quantity calculation block of the electromagnetic transient simulation, and calculate 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;

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

[0082] The placing module is used to place the electrical quantity calculation block with the longest calculation time that has not been placed in 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 per 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] a second determination module, configured to determine whether there are any parallel computing units that have not been placed in the electrical quantity calculation block; if not, jump to the second acquisition module; if so, 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, place all electrical quantity calculation blocks that have not been placed in the parallel computing unit into the parallel computing unit that has 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, use 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 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 configured to:

[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 based on 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 calculation acceleration device, the device including 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 by 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 code, and the program code is used to execute the power system electromagnetic transient simulation calculation acceleration method provided by 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 above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can 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 computing 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. Calculate 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 per 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 are not put into the parallel calculation unit, if so, calculate the blocks with the closest calculation time. An electrical quantity calculation block is placed into the current parallel computing unit, and the process returns to step S5. If not, the process jumps to step S9. S8. Determine whether there are any parallel computing units that have not been placed in the electrical quantity calculation block. If not, jump to step S9. If so, 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, place 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, use 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 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 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 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. 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 electromagnetic transient simulation calculation of a power system according to claim 1, characterized in that: Threshold 5%.

4. The method for accelerating electromagnetic transient simulation calculation of a 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 based on 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 a parallel computing unit allocated for electromagnetic transient simulation, and there is at least one parallel computing unit; a time calculation module, configured to obtain a total calculation time based on the calculation time of each electrical quantity calculation block of the electromagnetic transient simulation, and calculate 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; A selection module is used to select the first parallel computing unit as the current parallel computing unit; The placing module is used to place the electrical quantity calculation block with the longest calculation time that has not been placed in 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 per 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; a second determination module, configured to determine whether there are any parallel computing units that have not been placed in the electrical quantity calculation block; if not, jump to the second acquisition module; if so, 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, place all electrical quantity calculation blocks that have not been placed in the parallel computing unit into the parallel computing unit that has 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, use 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 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 calculation 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.

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 based on 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. A power system electromagnetic transient simulation calculation acceleration device, characterized in that: The device includes 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 according to 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 according to any one of claims 1 to 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