CN117707770A - Electromagnetic transient simulation parallel computing acceleration method and related device for power system - Google Patents

Electromagnetic transient simulation parallel computing acceleration method and related device for power system Download PDF

Info

Publication number
CN117707770A
CN117707770A CN202311720269.2A CN202311720269A CN117707770A CN 117707770 A CN117707770 A CN 117707770A CN 202311720269 A CN202311720269 A CN 202311720269A CN 117707770 A CN117707770 A CN 117707770A
Authority
CN
China
Prior art keywords
time
calculation
parallel
parallel computing
computing unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311720269.2A
Other languages
Chinese (zh)
Inventor
郭琦
卢远宏
李书勇
张�杰
郭海平
郭天宇
黄立滨
涂亮
张竞月
罗辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CSG Electric Power Research Institute
Original Assignee
CSG Electric Power Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CSG Electric Power Research Institute filed Critical CSG Electric Power Research Institute
Priority to CN202311720269.2A priority Critical patent/CN117707770A/en
Publication of CN117707770A publication Critical patent/CN117707770A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation

Landscapes

  • Supply And Distribution Of Alternating Current (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses an electromagnetic transient simulation parallel computing acceleration method and a related device of an electric power system, wherein the time from average to each parallel computing unit is taken as a limit, the computing time of an electric quantity computing block is sequentially put into each parallel computing unit from big to small, after all the electric quantity computing blocks are distributed, the parallel computing unit with the largest accumulating time and the parallel computing unit with the smallest accumulating time are subjected to the condition that the accumulating time average value is not smaller than a threshold value, if the accumulating time average value is not smaller than the threshold value, the electric quantity computing block in the parallel computing unit with the largest accumulating time is moved into the parallel computing unit with the smallest accumulating time. The method solves the technical problems that the prior electromagnetic transient simulation calculation process of the power system does not fully consider the influence of the resource allocation and the sequence arrangement of a plurality of parallel calculation units on the final calculation time, the reasonable utilization of a calculation hardware system is difficult to realize, and the calculation efficiency is difficult to improve.

Description

Electromagnetic transient simulation parallel computing acceleration method and related device for power system
Technical Field
The invention relates to the technical field of power system simulation, in particular to a parallel computing acceleration method and a related device for electromagnetic transient simulation of a power system.
Background
The simulation calculation of the electric power system depends on the strong calculation power of the calculation hardware system to expect to accelerate the solving process, and the non-real-time simulation calculation and even the real-time simulation calculation are realized. Because the computing hardware system has sufficient computing resources and memory resources, the computing hardware system has obvious advantages over the single computer computing which is adopted in the past. However, with the interconnection of regional power grids, the scale of the power system is continuously enlarged, and in addition, the rapid response power electronic equipment such as large-scale new energy is widely used, so that the scale and the operation complexity of the simulation calculation of the power system are increasingly complex, the data interaction among all operation subunits in the calculation process is more frequent, and how to reasonably and efficiently utilize a calculation hardware system to perform resource acceleration calculation is a problem to be researched.
The existing electromagnetic transient simulation calculation process of the power system does not fully consider the influence of resource allocation and sequence arrangement of multiple parallel calculation units on the final calculation time, so that reasonable utilization of a calculation hardware system is difficult to realize, and the calculation efficiency is difficult to improve.
Disclosure of Invention
The invention provides an electromagnetic transient simulation parallel computing acceleration method and a related device for an electric power system, which are used for solving the technical problems that the resource allocation and the sequential arrangement of a plurality of parallel computing units do not fully consider the influence on the final computing time in the existing electromagnetic transient simulation computing process of the electric power system, the reasonable utilization of a computing hardware system is difficult to realize, and the computing efficiency is difficult to improve.
In view of the above, the first aspect of the present invention provides an electromagnetic transient simulation parallel computing acceleration method for an electric power system, comprising the following steps:
s1, acquiring all parallel computing units distributed by electromagnetic transient simulation;
s2, evaluating the calculation time and the average time of each electric quantity of the electromagnetic transient simulation circuit to each parallel calculation unit, wherein the calculation of each electric quantity is configured with an electric quantity calculation block;
s3, starting from the 1 st parallel computing unit, placing an electric quantity computing block with the largest computing time which is not placed in the parallel computing unit into the current parallel computing unit;
s4, calculating the accumulated time of the current parallel computing unit;
s5, comparing the accumulated time of the current parallel computing unit with the time of averaging to each parallel computing unit, judging whether an electric quantity computing block which is not put into the parallel computing unit exists currently or not if the accumulated time of the current parallel computing unit is smaller than the time of averaging to each parallel computing unit, if yes, putting the electric quantity computing block which is not put into the parallel computing unit and has the absolute value of the computing time smaller than and closest to the time of averaging to each parallel computing unit into the current parallel computing unit, returning to the step S4, otherwise, jumping to the step S7, and if the accumulated time of the current parallel computing unit is not smaller than the time of averaging to each parallel computing unit, jumping to the step S6;
s6, if the accumulated time of the current parallel computing unit is equal to the time of averaging to each parallel computing unit, judging whether an electrical quantity computing block which is not put into the parallel computing unit exists at present, if so, putting the electrical quantity computing block which is not put into the parallel computing unit and has the largest computing time into the next parallel computing unit, returning to the step S4, if the accumulated time of the current parallel computing unit is greater than the time of averaging to each parallel computing unit, taking out the electrical quantity computing block put into the current parallel computing unit, and putting the taken out electrical quantity computing block into the next parallel computing unit again, and returning to the step S4;
s7, acquiring a parallel computing unit with the largest accumulated time and a parallel computing unit with the smallest accumulated time, calculating an accumulated time average value of the parallel computing unit with the largest accumulated time and the parallel computing unit with the smallest accumulated time, if the ratio of the accumulated time average value to the time average to each parallel computing unit is smaller than a threshold value, finishing optimization, otherwise, jumping to the step S8;
s8, finding out an electric quantity calculation block with the electric quantity calculation time smaller than the accumulated time average value from all electric quantity calculation blocks, and performing descending order sorting to obtain a sorting sequence;
s9, configuring a 1 st electric quantity calculation block of the sequencing sequence as a current electric quantity calculation block;
s10, judging whether the current electric quantity calculation block is in a parallel calculation unit with the largest accumulated time, if so, moving the current electric quantity calculation block into the parallel calculation unit with the smallest accumulated time, returning to the step S7, otherwise, jumping to the step S11;
s11, configuring the next electric quantity calculation block of the sequencing sequence as a current electric quantity calculation block, and returning to the step S10.
Optionally, in step S7, the threshold is 5%.
Optionally, step S2 specifically includes:
evaluating the calculation time of each electric quantity of the electromagnetic transient simulation circuit;
calculating the total calculation time of all the electric quantities according to the calculation time of each electric quantity;
the time from the average to each parallel computing unit is calculated based on the total calculated time of all the electrical quantities.
Optionally, in step S4, the calculation formula of the accumulated time of the current parallel computing unit is:
wherein t is l For the accumulated time of the front parallel computing unit, i is the ith electric quantity computing block in the front parallel computing unit, W is the total electric quantity computing block quantity in the front parallel computing unit, t pi The calculation time of the block is calculated for the i-th electrical quantity.
The invention provides an electromagnetic transient simulation parallel computing accelerating device of an electric power system, which comprises the following modules:
the first acquisition module is used for acquiring all parallel computing units distributed by electromagnetic transient simulation;
the time calculation module is used for evaluating the calculation time of each electric quantity of the electromagnetic transient simulation circuit and the time from the average to each parallel calculation unit, wherein the calculation of each electric quantity is configured with an electric quantity calculation block;
the input module is used for inputting the electrical quantity calculation block with the largest calculation time which is not input into the parallel calculation unit into the current parallel calculation unit from the 1 st parallel calculation unit;
the accumulated time calculating module is used for calculating the accumulated time of the current parallel calculating unit;
the comparison module is used for comparing the accumulated time of the current parallel computing unit with the time of averaging to each parallel computing unit, judging whether an electric quantity computing block which is not put into the parallel computing unit exists currently or not if the accumulated time of the current parallel computing unit is smaller than the time of averaging to each parallel computing unit, if yes, putting the electric quantity computing block which is not put into the parallel computing unit and has the absolute value of the calculated time smaller than and closest to the time of averaging to each parallel computing unit into the current parallel computing unit, returning to the execution accumulated time computing module, otherwise, skipping to the execution of the second acquisition module, and if the accumulated time of the current parallel computing unit is not smaller than the time of averaging to each parallel computing unit, skipping to the first judgment module;
the first judging module is used for judging whether the electric quantity calculation blocks which are not put into the parallel calculation units exist at present if the accumulated time of the current parallel calculation units is equal to the time of averaging to each parallel calculation unit, if so, putting the electric quantity calculation block with the largest calculation time which is not put into the parallel calculation unit into the next parallel calculation unit, returning to execute the accumulated time calculation module, if the accumulated time of the current parallel calculation unit is greater than the time of averaging to each parallel calculation unit, taking out the electric quantity calculation block put into the current parallel calculation unit, putting the taken out electric quantity calculation block into the next parallel calculation unit again, and returning to execute the accumulated time calculation module;
the second acquisition module is used for acquiring a parallel computing unit with the largest accumulated time and a parallel computing unit with the smallest accumulated time, calculating the accumulated time average value of the parallel computing unit with the largest accumulated time and the parallel computing unit with the smallest accumulated time, if the ratio of the accumulated time average value to the time average to each parallel computing unit is smaller than a threshold value, finishing optimization, otherwise, jumping to the execution ordering module;
the sequencing module is used for finding out an electric quantity calculation block with the electric quantity calculation time smaller than the accumulated time average value from all the electric quantity calculation blocks and sequencing the electric quantity calculation blocks in a descending order to obtain a sequencing sequence;
the first configuration module is used for configuring the 1 st electric quantity calculation block of the sequencing sequence as a current electric quantity calculation block;
the second judging module is used for judging whether the current electric quantity calculating block is in the parallel calculating unit with the largest accumulated time, if so, moving the current electric quantity calculating block into the parallel calculating unit with the smallest accumulated time, returning to execute the second acquiring module, and if not, jumping to execute the second configuration module;
the second configuration module is used for configuring the next electric quantity calculation block of the sequencing sequence as the current electric quantity calculation block, and returning to execute the second judgment module.
Optionally, in the second acquisition module, the threshold is 5%.
Optionally, the time calculation module is specifically configured to:
evaluating the calculation time of each electric quantity of the electromagnetic transient simulation circuit;
calculating the total calculation time of all the electric quantities according to the calculation time of each electric quantity;
the time from the average to each parallel computing unit is calculated based on the total calculated time of all the electrical quantities.
Optionally, in the cumulative time calculation module, a calculation formula of the cumulative time of the current parallel calculation unit is:
wherein t is l For the accumulated time of the front parallel computing unit, i is the ith electric quantity computing block in the front parallel computing unit, W is the total electric quantity computing block quantity in the front parallel computing unit, t pi The calculation time of the block is calculated for the i-th electrical quantity.
A third aspect of the present invention provides an electromagnetic transient simulation parallel computing acceleration apparatus for an electrical power system, the apparatus comprising a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute the electromagnetic transient simulation parallel computing acceleration method of the electric power system according to any one of the first aspects according to instructions in the program code.
A fourth aspect of the present invention provides a computer-readable storage medium storing program code for executing the electromagnetic transient simulation parallel computing acceleration method of the electric power system according to any one of the first aspects.
From the above technical scheme, the electromagnetic transient simulation parallel computing acceleration method of the power system provided by the invention has the following advantages:
the electromagnetic transient simulation parallel computing acceleration method of the power system takes the time from average to each parallel computing unit as a limit, the calculation time of the electric quantity calculation block is sequentially put into each parallel calculation unit from big to small, after all the electric quantity calculation blocks are distributed to the parallel calculation units, the parallel calculation unit with the largest accumulated time and the parallel calculation unit with the smallest accumulated time are conditioned, if the ratio of the accumulated time average value to the time averaged to each parallel calculation unit is smaller than a threshold value, the optimization is finished, if the calculation time is not smaller than the threshold value, the electric quantity calculation block with calculation time smaller than the accumulated time average value is redistributed, the electric quantity calculation blocks with the electric quantity calculation time smaller than the accumulated time average value are found in all the electric quantity calculation blocks and are ordered in descending order, if the current electric quantity calculation block is in the parallel calculation unit with the largest accumulated time, the current electric quantity calculation block is moved to the parallel calculation unit with the smallest accumulated time, if the current electric quantity calculation block is not in the parallel calculation unit with the largest accumulated time, the next electric quantity calculation block is configured as the current electric quantity calculation block, so that the ratio of the accumulated time average value to the time from average to each parallel calculation unit is ensured to be smaller than a threshold value, the calculation resource fine distribution of the parallel calculation units is realized, the calculation time error of each parallel calculation unit is reduced, and the technical problems that the influence of the resource distribution and the sequence arrangement of multiple parallel calculation units on the final calculation time is not fully considered in the electromagnetic transient simulation calculation process of the traditional electric power system, the reasonable utilization of a calculation hardware system is difficult to realize and the calculation efficiency is difficult to improve are solved.
Drawings
For a clearer description of embodiments of the invention or of solutions according to the prior art, the figures which are used in the description of the embodiments or of the prior art will be briefly described, it being obvious that the figures in the description below are only some embodiments of the invention, from which, without the aid of inventive efforts, other relevant figures can be obtained for a person skilled in the art.
Fig. 1 is a schematic flow chart of an acceleration method for electromagnetic transient simulation parallel computation of a power system according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an electromagnetic transient simulation parallel computing acceleration device of a power system according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electromagnetic transient simulation parallel computing acceleration device for an electric power system according to an embodiment of the present invention.
Detailed Description
In order to make the present invention better understood by those skilled in the art, the following description will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
For easy understanding, referring to fig. 1, the present invention provides an embodiment of an electromagnetic transient simulation parallel computing acceleration method for an electric power system, including:
and S1, acquiring all parallel computing units distributed by electromagnetic transient simulation.
Note that the parallel computing unit may be a CPU (Central Processing Unit) core or a GPU (Graphics ProcessingUnit) core. The number of parallel computing units allocated for electromagnetic transient simulation may be denoted as M.
And S2, evaluating the calculation time and the average time of each electric quantity of the electromagnetic transient simulation circuit to each parallel calculation unit, wherein the calculation of each electric quantity is configured with an electric quantity calculation block.
In the electromagnetic transient calculation, there are many electric quantity calculation blocks, each of which has its own calculation time, and each of which can be arbitrarily allocated to the parallel calculation unit. Because the calculation of each electric quantity is completely independent and can be completely parallel, in the electromagnetic transient simulation, the electric quantity calculation block is divided into parallel meters which can be parallel as far as possible according to the accumulated time after the electric quantity is calculated firstly and then the matrix is calculatedIn the computing unit. Assuming that N electric quantity calculating blocks are arranged, sequencing the N electric quantity calculating blocks according to the calculation time from big to small, wherein the calculation time of each electric quantity calculating block is t pi . The total calculation time of all the electric quantity calculation blocks is as follows:average time to each parallel computing unit is
And S3, starting from the 1 st parallel computing unit, placing the electrical quantity computing block with the largest computing time which is not placed in the parallel computing unit into the current parallel computing unit.
Starting from the 1 st parallel computing unit, the electrical computing block with the largest computing time, which is not placed in the parallel computing unit, is placed in the current parallel computing unit.
And S4, calculating the accumulated time of the current parallel computing unit.
The total electric quantity calculation block number in the current parallel calculation unit is W, and the accumulated time of the current parallel calculation unit is:
wherein t is l For the accumulated time of the front parallel computing unit, i is the ith electric quantity computing block in the front parallel computing unit, W is the total electric quantity computing block quantity in the front parallel computing unit, t pi The calculation time of the block is calculated for the i-th electrical quantity.
And S5, comparing the accumulated time of the current parallel computing unit with the time of averaging to each parallel computing unit, judging whether an electric quantity computing block which is not put into the parallel computing unit exists currently or not if the accumulated time of the current parallel computing unit is smaller than the time of averaging to each parallel computing unit, if yes, putting the electric quantity computing block which is not put into the parallel computing unit and has the absolute value of the calculated time smaller than and closest to the time of averaging to each parallel computing unit into the current parallel computing unit, returning to the step S4, otherwise, jumping to the step S7, and if the accumulated time of the current parallel computing unit is not smaller than the time of averaging to each parallel computing unit, jumping to the step S6.
It should be noted that the accumulated time t of the current parallel computing unit l And time t averaged to each parallel computing unit ave In contrast, if t l <t ave If so, the electric quantity computing block with the absolute value of the computing time which is not put in the parallel computing unit being smaller than and closest to the time which is averaged to each parallel computing unit is put in the current parallel computing unit, and the step S4 is returned, and if the electric quantity computing block which is not put in the parallel computing unit is not available, the step S7 is skipped. If t l ≧t ave Then the process goes to step S6.
Step S6, if the accumulated time of the current parallel computing unit is equal to the time of averaging to each parallel computing unit, judging whether an electrical quantity computing block which is not put into the parallel computing unit currently exists, if yes, putting the electrical quantity computing block which is not put into the parallel computing unit and has the largest computing time into the next parallel computing unit, returning to the step S4, if the accumulated time of the current parallel computing unit is longer than the time of averaging to each parallel computing unit, taking out the electrical quantity computing block which is put into the current parallel computing unit, and putting the taken out electrical quantity computing block into the next parallel computing unit again, and returning to the step S4.
If t l =t ave And judging whether the electric quantity calculation block which is not put into the parallel calculation unit is present or not if the calculation resource of the current parallel calculation unit is just used up, if so, putting the electric quantity calculation block which is not put into the parallel calculation unit and has the largest calculation time into the next parallel calculation unit, and returning to the step S4. If t l >t ave It is indicated that the computational resources of the current parallel computing unit are insufficient,and taking out the electrical quantity calculation block put into the current parallel calculation unit, putting the taken-out electrical quantity calculation block into the next parallel calculation unit again, and returning to the step S4.
Step S7, acquiring a parallel computing unit with the largest accumulated time and a parallel computing unit with the smallest accumulated time, calculating an accumulated time average value of the parallel computing unit with the largest accumulated time and the parallel computing unit with the smallest accumulated time, if the ratio of the accumulated time average value to the time average to each parallel computing unit is smaller than a threshold value, finishing optimization, otherwise, jumping to step S8.
After all the electric quantity calculation blocks have been allocated to the corresponding parallel calculation units, the parallel calculation unit with the largest accumulated time and the parallel calculation unit with the smallest accumulated time are found, and the accumulated time average value of the parallel calculation unit with the largest accumulated time and the parallel calculation unit with the smallest accumulated time is calculatedWherein delta t To accumulate the time average value, t max Calculation time of parallel calculation unit with maximum accumulated time, t min The calculation time of the parallel calculation unit with the smallest accumulated time. If-> The optimization is ended, otherwise, the process goes to step S8. Preferably, the threshold is 5%.
And S8, finding out an electric quantity calculation block with the electric quantity calculation time smaller than the accumulated time average value from all the electric quantity calculation blocks, and carrying out descending order sorting to obtain a sorting sequence.
It should be noted that, the electric quantity calculation blocks with the electric quantity calculation time smaller than the accumulated time average value are found in all the electric quantity calculation blocks, and the electric quantity calculation blocks are sorted in descending order to obtain a sorting sequence Ps.
Step S9, calculating the 1 st electric quantity of the sequencing sequence PsConfigured as a current electric quantity calculation block P δ
Step S10, judging the current electric quantity calculation block P δ Whether in the parallel computing unit with the largest accumulated time, if so, the current electric quantity computing block P δ And (3) moving to a parallel computing unit with the minimum accumulated time, returning to the step S7, otherwise, jumping to the step S11.
Step S11, configuring the next electric quantity calculation block of the ordered sequence Ps as a current electric quantity calculation block P δ The process returns to step S10.
The electromagnetic transient simulation parallel computing acceleration method of the power system takes the time from average to each parallel computing unit as a limit, the calculation time of the electric quantity calculation block is sequentially put into each parallel calculation unit from big to small, after all the electric quantity calculation blocks are distributed to the parallel calculation units, the parallel calculation unit with the largest accumulated time and the parallel calculation unit with the smallest accumulated time are conditioned, if the ratio of the accumulated time average value to the time averaged to each parallel calculation unit is smaller than a threshold value, the optimization is finished, if the calculation time is not smaller than the threshold value, the electric quantity calculation block with calculation time smaller than the accumulated time average value is redistributed, the electric quantity calculation blocks with the electric quantity calculation time smaller than the accumulated time average value are found in all the electric quantity calculation blocks and are ordered in descending order, if the current electric quantity calculation block is in the parallel calculation unit with the largest accumulated time, the current electric quantity calculation block is moved to the parallel calculation unit with the smallest accumulated time, if the current electric quantity calculation block is not in the parallel calculation unit with the largest accumulated time, the next electric quantity calculation block is configured as the current electric quantity calculation block, so that the ratio of the accumulated time average value to the time from average to each parallel calculation unit is ensured to be smaller than a threshold value, the calculation resource fine distribution of the parallel calculation units is realized, the calculation time error of each parallel calculation unit is reduced, and the technical problems that the influence of the resource distribution and the sequence arrangement of multiple parallel calculation units on the final calculation time is not fully considered in the electromagnetic transient simulation calculation process of the traditional electric power system, the reasonable utilization of a calculation hardware system is difficult to realize and the calculation efficiency is difficult to improve are solved.
For ease of understanding, referring to fig. 2, an embodiment of an electromagnetic transient simulation parallel computing acceleration device for an electric power system is provided in the present invention, including the following modules:
the first acquisition module is used for acquiring the number of parallel computing units distributed by electromagnetic transient simulation;
the time calculation module is used for evaluating the calculation time of each electric quantity of the electromagnetic transient simulation circuit and the time from the average to each parallel calculation unit, wherein the calculation of each electric quantity is configured with an electric quantity calculation block;
the input module is used for inputting the electrical quantity calculation block with the largest calculation time which is not input into the parallel calculation unit into the current parallel calculation unit from the 1 st parallel calculation unit;
the accumulated time calculating module is used for calculating the accumulated time of the current parallel calculating unit;
the comparison module is used for comparing the accumulated time of the current parallel computing unit with the time of averaging to each parallel computing unit, judging whether an electric quantity computing block which is not put into the parallel computing unit exists currently or not if the accumulated time of the current parallel computing unit is smaller than the time of averaging to each parallel computing unit, if yes, putting the electric quantity computing block which is not put into the parallel computing unit and has the absolute value of the calculated time smaller than and closest to the time of averaging to each parallel computing unit into the current parallel computing unit, returning to the execution accumulated time computing module, otherwise, skipping to the execution of the second acquisition module, and if the accumulated time of the current parallel computing unit is not smaller than the time of averaging to each parallel computing unit, skipping to the first judgment module;
the first judging module is used for judging whether the electric quantity calculation blocks which are not put into the parallel calculation units exist at present if the accumulated time of the current parallel calculation units is equal to the time of averaging to each parallel calculation unit, if so, putting the electric quantity calculation block with the largest calculation time which is not put into the parallel calculation unit into the next parallel calculation unit, returning to execute the accumulated time calculation module, if the accumulated time of the current parallel calculation unit is greater than the time of averaging to each parallel calculation unit, taking out the electric quantity calculation block put into the current parallel calculation unit, putting the taken out electric quantity calculation block into the next parallel calculation unit again, and returning to execute the accumulated time calculation module;
the second acquisition module is used for acquiring a parallel computing unit with the largest accumulated time and a parallel computing unit with the smallest accumulated time, calculating the accumulated time average value of the parallel computing unit with the largest accumulated time and the parallel computing unit with the smallest accumulated time, if the ratio of the accumulated time average value to the time average to each parallel computing unit is smaller than a threshold value, finishing optimization, otherwise, jumping to the execution ordering module;
the sequencing module is used for finding out an electric quantity calculation block with the electric quantity calculation time smaller than the accumulated time average value from all the electric quantity calculation blocks and sequencing the electric quantity calculation blocks in a descending order to obtain a sequencing sequence;
the first configuration module is used for configuring the 1 st electric quantity calculation block of the sequencing sequence as a current electric quantity calculation block;
the second judging module is used for judging whether the current electric quantity calculating block is in the parallel calculating unit with the largest accumulated time, if so, moving the current electric quantity calculating block into the parallel calculating unit with the smallest accumulated time, returning to execute the second acquiring module, and if not, jumping to execute the second configuration module;
the second configuration module is used for configuring the next electric quantity calculation block of the sequencing sequence as the current electric quantity calculation block, and returning to execute the second judgment module.
In the second acquisition module, the threshold is 5%.
The time calculation module is specifically used for:
evaluating the calculation time of each electric quantity of the electromagnetic transient simulation circuit;
calculating the total calculation time of all the electric quantities according to the calculation time of each electric quantity;
the time from the average to each parallel computing unit is calculated based on the total calculated time of all the electrical quantities.
In the accumulated time calculating module, the calculation formula of the accumulated time of the current parallel calculating unit is as follows:
wherein t is l For the accumulated time of the front parallel computing unit, i is the ith electric quantity computing block in the front parallel computing unit, W is the total electric quantity computing block quantity in the front parallel computing unit, t pi The calculation time of the block is calculated for the i-th electrical quantity.
For ease of understanding, referring to fig. 3, an embodiment of an electromagnetic transient simulation parallel computing acceleration apparatus for an electric power system is provided in the present invention, the apparatus includes a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is used for executing the electromagnetic transient simulation parallel computing acceleration method of the power system provided by the invention according to the instructions in the program codes.
Embodiments of a computer readable storage medium for storing program code for performing the power system electromagnetic transient simulation parallel computing acceleration method provided in the present invention are provided in the present invention.
The electromagnetic transient simulation parallel computing acceleration device, equipment and computer readable storage medium of the power system provided by the invention are used for executing the electromagnetic transient simulation parallel computing acceleration method of the power system provided by the invention, and the principle and the obtained technical effects are the same as those of the electromagnetic transient simulation parallel computing acceleration method of the power system provided by the invention, and are not repeated here.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. The electromagnetic transient simulation parallel computing acceleration method for the power system is characterized by comprising the following steps of:
s1, acquiring all parallel computing units distributed by electromagnetic transient simulation;
s2, evaluating the calculation time and the average time of each electric quantity of the electromagnetic transient simulation circuit to each parallel calculation unit, wherein the calculation of each electric quantity is configured with an electric quantity calculation block;
s3, starting from the 1 st parallel computing unit, placing an electric quantity computing block with the largest computing time which is not placed in the parallel computing unit into the current parallel computing unit;
s4, calculating the accumulated time of the current parallel computing unit;
s5, comparing the accumulated time of the current parallel computing unit with the time of averaging to each parallel computing unit, judging whether an electric quantity computing block which is not put into the parallel computing unit exists currently or not if the accumulated time of the current parallel computing unit is smaller than the time of averaging to each parallel computing unit, if yes, putting the electric quantity computing block which is not put into the parallel computing unit and has the absolute value of the computing time smaller than and closest to the time of averaging to each parallel computing unit into the current parallel computing unit, returning to the step S4, otherwise, jumping to the step S7, and if the accumulated time of the current parallel computing unit is not smaller than the time of averaging to each parallel computing unit, jumping to the step S6;
s6, if the accumulated time of the current parallel computing unit is equal to the time of averaging to each parallel computing unit, judging whether an electrical quantity computing block which is not put into the parallel computing unit exists at present, if so, putting the electrical quantity computing block which is not put into the parallel computing unit and has the largest computing time into the next parallel computing unit, returning to the step S4, if the accumulated time of the current parallel computing unit is greater than the time of averaging to each parallel computing unit, taking out the electrical quantity computing block put into the current parallel computing unit, and putting the taken out electrical quantity computing block into the next parallel computing unit again, and returning to the step S4;
s7, acquiring a parallel computing unit with the largest accumulated time and a parallel computing unit with the smallest accumulated time, calculating an accumulated time average value of the parallel computing unit with the largest accumulated time and the parallel computing unit with the smallest accumulated time, if the ratio of the accumulated time average value to the time average to each parallel computing unit is smaller than a threshold value, finishing optimization, otherwise, jumping to the step S8;
s8, finding out an electric quantity calculation block with the electric quantity calculation time smaller than the accumulated time average value from all electric quantity calculation blocks, and performing descending order sorting to obtain a sorting sequence;
s9, configuring a 1 st electric quantity calculation block of the sequencing sequence as a current electric quantity calculation block;
s10, judging whether the current electric quantity calculation block is in a parallel calculation unit with the largest accumulated time, if so, moving the current electric quantity calculation block into the parallel calculation unit with the smallest accumulated time, returning to the step S7, otherwise, jumping to the step S11;
s11, configuring the next electric quantity calculation block of the sequencing sequence as a current electric quantity calculation block, and returning to the step S10.
2. The method according to claim 1, wherein in step S7, the threshold is 5%.
3. The method for accelerating electromagnetic transient simulation parallel computation of a power system according to claim 1, wherein the step S2 specifically comprises:
evaluating the calculation time of each electric quantity of the electromagnetic transient simulation circuit;
calculating the total calculation time of all the electric quantities according to the calculation time of each electric quantity;
the time from the average to each parallel computing unit is calculated based on the total calculated time of all the electrical quantities.
4. The method for accelerating electromagnetic transient simulation parallel computation of a power system according to claim 1, wherein in step S4, a calculation formula of an accumulated time of a current parallel computing unit is:
wherein t is l For the accumulated time of the front parallel computing unit, i is the ith electric quantity computing block in the front parallel computing unit, W is the total electric quantity computing block quantity in the front parallel computing unit, t pi The calculation time of the block is calculated for the i-th electrical quantity.
5. The electromagnetic transient simulation parallel computing accelerating device of the power system is characterized by comprising the following modules:
the first acquisition module is used for acquiring all parallel computing units distributed by electromagnetic transient simulation;
the time calculation module is used for evaluating the calculation time of each electric quantity of the electromagnetic transient simulation circuit and the time from the average to each parallel calculation unit, wherein the calculation of each electric quantity is configured with an electric quantity calculation block;
the input module is used for inputting the electrical quantity calculation block with the largest calculation time which is not input into the parallel calculation unit into the current parallel calculation unit from the 1 st parallel calculation unit;
the accumulated time calculating module is used for calculating the accumulated time of the current parallel calculating unit;
the comparison module is used for comparing the accumulated time of the current parallel computing unit with the time of averaging to each parallel computing unit, judging whether an electric quantity computing block which is not put into the parallel computing unit exists currently or not if the accumulated time of the current parallel computing unit is smaller than the time of averaging to each parallel computing unit, if yes, putting the electric quantity computing block which is not put into the parallel computing unit and has the absolute value of the calculated time smaller than and closest to the time of averaging to each parallel computing unit into the current parallel computing unit, returning to the execution accumulated time computing module, otherwise, skipping to the execution of the second acquisition module, and if the accumulated time of the current parallel computing unit is not smaller than the time of averaging to each parallel computing unit, skipping to the first judgment module;
the first judging module is used for judging whether the electric quantity calculation blocks which are not put into the parallel calculation units exist at present if the accumulated time of the current parallel calculation units is equal to the time of averaging to each parallel calculation unit, if so, putting the electric quantity calculation block with the largest calculation time which is not put into the parallel calculation unit into the next parallel calculation unit, returning to execute the accumulated time calculation module, if the accumulated time of the current parallel calculation unit is greater than the time of averaging to each parallel calculation unit, taking out the electric quantity calculation block put into the current parallel calculation unit, putting the taken out electric quantity calculation block into the next parallel calculation unit again, and returning to execute the accumulated time calculation module;
the second acquisition module is used for acquiring a parallel computing unit with the largest accumulated time and a parallel computing unit with the smallest accumulated time, calculating the accumulated time average value of the parallel computing unit with the largest accumulated time and the parallel computing unit with the smallest accumulated time, if the ratio of the accumulated time average value to the time average to each parallel computing unit is smaller than a threshold value, finishing optimization, otherwise, jumping to the execution ordering module;
the sequencing module is used for finding out an electric quantity calculation block with the electric quantity calculation time smaller than the accumulated time average value from all the electric quantity calculation blocks and sequencing the electric quantity calculation blocks in a descending order to obtain a sequencing sequence;
the first configuration module is used for configuring the 1 st electric quantity calculation block of the sequencing sequence as a current electric quantity calculation block;
the second judging module is used for judging whether the current electric quantity calculating block is in the parallel calculating unit with the largest accumulated time, if so, moving the current electric quantity calculating block into the parallel calculating unit with the smallest accumulated time, returning to execute the second acquiring module, and if not, jumping to execute the second configuration module;
the second configuration module is used for configuring the next electric quantity calculation block of the sequencing sequence as the current electric quantity calculation block, and returning to execute the second judgment module.
6. The electromagnetic transient simulation parallel computing acceleration apparatus of claim 5, wherein the threshold is 5% in the second acquisition module.
7. The electromagnetic transient simulation parallel computing acceleration apparatus of claim 5, wherein the time computing module is specifically configured to:
evaluating the calculation time of each electric quantity of the electromagnetic transient simulation circuit;
calculating the total calculation time of all the electric quantities according to the calculation time of each electric quantity;
the time from the average to each parallel computing unit is calculated based on the total calculated time of all the electrical quantities.
8. The electromagnetic transient simulation parallel computing acceleration apparatus of claim 5, wherein in the accumulated time computing module, a computing formula of the accumulated time of the current parallel computing unit is:
wherein t is l For the accumulated time of the front parallel computing unit, i is the ith electric quantity computing block in the front parallel computing unit, W is the total electric quantity computing block quantity in the front parallel computing unit, t pi The calculation time of the block is calculated for the i-th electrical quantity.
9. An electromagnetic transient simulation parallel computing acceleration device for an electric power system, the device comprising a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute the electromagnetic transient simulation parallel computing acceleration method of the power system according to any one of claims 1-4 according to instructions in the program code.
10. A computer readable storage medium for storing program code for performing the power system electromagnetic transient simulation parallel computing acceleration method of any one of claims 1-4.
CN202311720269.2A 2023-12-14 2023-12-14 Electromagnetic transient simulation parallel computing acceleration method and related device for power system Pending CN117707770A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311720269.2A CN117707770A (en) 2023-12-14 2023-12-14 Electromagnetic transient simulation parallel computing acceleration method and related device for power system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311720269.2A CN117707770A (en) 2023-12-14 2023-12-14 Electromagnetic transient simulation parallel computing acceleration method and related device for power system

Publications (1)

Publication Number Publication Date
CN117707770A true CN117707770A (en) 2024-03-15

Family

ID=90158375

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311720269.2A Pending CN117707770A (en) 2023-12-14 2023-12-14 Electromagnetic transient simulation parallel computing acceleration method and related device for power system

Country Status (1)

Country Link
CN (1) CN117707770A (en)

Similar Documents

Publication Publication Date Title
EP3451811B1 (en) Production plan generation device, production plan generation method, and production plan generation program
CN106339351B (en) A kind of SGD algorithm optimization system and method
CN109918182A (en) More GPU task dispatching methods under virtualization technology
CN113822173A (en) Pedestrian attribute recognition training acceleration method based on node merging and path prediction
CN116126346A (en) Code compiling method and device of AI model, computer equipment and storage medium
CN113568759B (en) Cloud computing-based big data processing method and system
CN115619005A (en) Intelligent power utilization network resource optimal configuration method and system
CN111860867A (en) Model training method and system for hybrid heterogeneous system and related device
CN113094899A (en) Random power flow calculation method and device, electronic equipment and storage medium
CN117707770A (en) Electromagnetic transient simulation parallel computing acceleration method and related device for power system
CN107886174B (en) Generator set maintenance arrangement method and device
CN105260165B (en) The dynamic control method of speculative threads number in thread-level hypothetical system based on SMT
CN113128696A (en) Distributed machine learning communication optimization method and device, server and terminal equipment
CN116303219A (en) Grid file acquisition method and device and electronic equipment
CN115456188B (en) Quantum computing task optimization processing method and device and quantum computer
CN103514042B (en) A kind of Dual-adjustment merge-sorting tuning method and device
CN116227599A (en) Inference model optimization method and device, electronic equipment and storage medium
CN115358314A (en) Method, device and equipment for training wind power prediction model and predicting power
CN110969565A (en) Image processing method and device
CN117707769A (en) Simulation calculation acceleration method and related device based on grouping sorting
CN113791863B (en) Virtual container-based power Internet of things proxy resource scheduling method and related equipment
CN110309982A (en) Methods of electric load forecasting, device and equipment based on matrix decomposition
CN110442619A (en) Search result ordering method, device, electronic equipment and storage medium
CN116841717B (en) Method and system for generating sequencing in real time according to task emergency degree
CN114167223B (en) Power supply abnormity detection method and device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination