Power system simulation parallel computing method, device, equipment and readable storage medium

By reasonably allocating simulation tasks to multi-threaded environments in power system simulation calculation, the problem of long simulation calculation time and low efficiency in the existing technology is solved, and more efficient simulation calculation is achieved.

CN114911579BActive Publication Date: 2025-02-11ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210663418.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-13
Publication Date
2025-02-11
Estimated Expiration
2042-06-13

AI Technical Summary

Technical Problem

The existing power system simulation calculation methods are difficult to reasonably allocate simulation tasks under multi-threaded situations such as multiple CPU cores, multi-CPUs, and multi-computers, resulting in a long simulation calculation time and low efficiency.

Method used

By acquiring the simulation tasks of the target circuit, the calculation time of each simulation task is determined, and according to the time and association relationship of the task, the optimal way to allocate each simulation task to multiple threads is determined to realize parallel computing.

Benefits of technology

By optimizing the allocation method of simulation tasks, the total time spent in the power system simulation calculation is significantly shortened and the simulation efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114911579B_ABST
    Figure CN114911579B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and readable storage medium for parallel calculation of power system simulation. The method includes: obtaining the target circuit to be simulated and calculated corresponding to the current simulation step, and determining the simulation calculation time of each simulation task in the target circuit, determining multiple threads for simulation calculation of the target circuit, and determining multiple allocation methods for allocating each simulation task to each thread for simulation calculation according to the simulation calculation time and correlation of each simulation task. Finally, determine the target allocation method with the shortest total simulation calculation time to complete all simulation tasks, and allocate each simulation task to each thread for simulation calculation according to the target allocation method. The present application can perform simulation calculations on each simulation task in parallel, and can also determine the simulation calculation method with the shortest total simulation calculation time, thereby achieving the technical effect of effectively shortening the time of power system simulation calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of power systems, and more specifically, to a method, device, equipment and readable storage medium for parallel computing of power system simulation. Background Art

[0002] In recent years, power system simulation calculations have increasingly relied on the powerful computing power of computing hardware systems in the hope of accelerating the solution process. Since the existing computing hardware systems have sufficient computing resources and storage resources, they have obvious advantages over the single computer calculations that were used in the past. However, with the interconnection of regional power grids, the scale of power systems continues to expand, making the scale and complexity of power system simulation calculations increasingly complex. However, the existing calculation methods do not fully consider the impact of the allocation and sequence arrangement of each simulation task on the final calculation time in multi-threaded situations such as multi-CPU cores, multi-CPUs, and multi-computers, making it difficult to achieve the theoretical and practical shortest simulation calculation time.

[0003] Therefore, how to reasonably utilize computing hardware system resources to shorten the simulation calculation time of the power system and improve the simulation efficiency is an issue worthy of study. Summary of the invention

[0004] In view of this, the present application provides a method, apparatus, device and readable storage medium for parallel computing of power system simulation, which are used to rationally utilize computing hardware system resources to shorten the simulation calculation time of the power system and improve the simulation efficiency.

[0005] In order to achieve the above objectives, the proposed solution is as follows:

[0006] A parallel computing method for power system simulation, comprising:

[0007] Obtaining a target circuit to be simulated and calculated corresponding to a current simulation step, wherein the target circuit includes a plurality of control elements and a plurality of electrical elements;

[0008] Determine a plurality of simulation tasks corresponding to the target circuit, wherein the plurality of simulation tasks include simulation calculations of each of the control elements, simulation calculations of each of the electrical elements, and matrix inversion calculations corresponding to the simulation calculations of each of the electrical elements;

[0009] Determine the simulation calculation time consumption of each simulation task;

[0010] Determining a plurality of threads for simulation calculation of the target circuit;

[0011] Determine multiple allocation methods for allocating each of the simulation tasks to each of the threads for simulation calculation according to the simulation calculation time consumption of each of the simulation tasks and the correlation between the simulation tasks;

[0012] Among the multiple allocation methods, a target allocation method with the shortest total simulation calculation time for completing all the simulation tasks is determined, and according to the target allocation method, each of the simulation tasks is allocated to each of the threads for simulation calculation.

[0013] Preferably, the association relationship between the simulation tasks includes:

[0014] The parallel relationship of the simulation tasks corresponding to each electrical component in the simulation process, the sequence and parallel relationship of the simulation tasks corresponding to each control component in the simulation process, and the sequence relationship between the simulation tasks corresponding to the matrix inversion calculation and the simulation tasks of all electrical components;

[0015] Determining one of the allocation methods of allocating each simulation task to each thread for simulation calculation according to the simulation calculation time consumption of each simulation task and the correlation between each simulation task includes:

[0016] Allocate the simulation tasks corresponding to the electrical components to the threads according to the simulation calculation time consumption of the simulation tasks corresponding to the electrical components and the parallel relationship of the simulation tasks corresponding to the electrical components during the simulation process;

[0017] Allocate the simulation tasks corresponding to the control elements to the threads according to the simulation calculation time consumption of the simulation tasks corresponding to the control elements and the sequence and parallel relationship of the simulation tasks corresponding to the control elements in the simulation process;

[0018] According to the simulation calculation time consumption of the simulation tasks corresponding to each of the electrical components and the sequence of the simulation tasks corresponding to the matrix inversion calculation and the simulation tasks of all the electrical components, the simulation tasks corresponding to the matrix inversion calculation are allocated to any one of the threads.

[0019] Preferably, the target allocation method of determining the shortest total simulation calculation time for completing all the simulation tasks includes:

[0020] Determine the total simulation calculation time corresponding to each allocation method;

[0021] Compare the total simulation calculation times corresponding to the allocation modes in pairs to obtain the total simulation calculation time with the shortest time consumption;

[0022] The allocation method corresponding to the total simulation calculation time consumption with the shortest time consumption is determined as the target allocation method.

[0023] Preferably, it also includes:

[0024] In all simulation steps of simulation calculation, each simulation task is allocated to each thread for simulation calculation according to the target allocation method.

[0025] A parallel computing device for power system simulation, comprising:

[0026] A circuit acquisition unit, used to acquire a target circuit to be simulated and calculated corresponding to a current simulation step, wherein the target circuit includes a plurality of control elements and a plurality of electrical elements;

[0027] A simulation task determination unit, used to determine a plurality of simulation tasks corresponding to the target circuit, wherein the plurality of simulation tasks include simulation calculations of each of the control elements, simulation calculations of each of the electrical elements, and matrix inversion calculations corresponding to the simulation calculations of each of the electrical elements;

[0028] A time consumption determination unit, used to determine the simulation calculation time consumption of each simulation task;

[0029] A thread determination unit, used for determining a plurality of threads for simulation calculation of the target circuit;

[0030] A task allocation unit, used for determining a plurality of allocation modes of allocating each of the simulation tasks to each of the threads for simulation calculation according to the simulation calculation time consumption of each of the simulation tasks and the correlation relationship between each of the simulation tasks;

[0031] The allocation method determination unit is used to determine the target allocation method with the shortest total simulation calculation time for completing all the simulation tasks among the multiple allocation methods, and allocate each simulation task to each thread for simulation calculation according to the target allocation method.

[0032] Preferably, the association relationship between the simulation tasks includes:

[0033] The parallel relationship of the simulation tasks corresponding to each electrical component in the simulation process, the sequence and parallel relationship of the simulation tasks corresponding to each control component in the simulation process, and the sequence relationship between the simulation tasks corresponding to the matrix inversion calculation and the simulation tasks of all electrical components;

[0034] The task allocation unit comprises:

[0035] A first task allocation subunit is used to allocate the simulation tasks corresponding to the electrical components to the threads according to the simulation calculation time consumption of the simulation tasks corresponding to the electrical components and the parallel relationship between the simulation tasks corresponding to the electrical components during the simulation process;

[0036] A second task allocation subunit is used to allocate the simulation tasks corresponding to the control elements to the threads according to the simulation calculation time consumption of the simulation tasks corresponding to the control elements and the sequence and parallel relationship of the simulation tasks corresponding to the control elements in the simulation process;

[0037] The third task allocation subunit is used to allocate the simulation task corresponding to the matrix inversion calculation to any one of the threads according to the simulation calculation time corresponding to each electrical component and the sequence relationship between the simulation task corresponding to the matrix inversion calculation and the simulation tasks of all electrical components.

[0038] Preferably, the allocation mode determination unit includes:

[0039] A total time consumption determination unit, used to determine the total time consumption of simulation calculation corresponding to each allocation mode;

[0040] A total time consumption comparison unit, used for comparing the total time consumption of the simulation calculations corresponding to the allocation modes in pairs, to obtain the total time consumption of the simulation calculation with the shortest time consumption;

[0041] The target allocation method determination unit is used to determine the allocation method corresponding to the total simulation calculation time with the shortest time consumption as the target allocation method.

[0042] Preferably, it also includes:

[0043] The target allocation method application unit is used to allocate each of the simulation tasks to each of the threads for simulation calculation according to the target allocation method in all simulation steps of the simulation calculation.

[0044] A parallel computing device for power system simulation, comprising a memory and a processor;

[0045] The memory is used to store programs;

[0046] The processor is used to execute the program to implement each step of the above-mentioned power system simulation parallel computing method.

[0047] A readable storage medium stores a computer program, which, when executed by a processor, implements each step of the above-mentioned power system simulation parallel computing method.

[0048] It can be seen from the above scheme that the power system simulation parallel calculation method provided by the present application can first obtain the target circuit to be simulated and calculated at the current simulation step length, and the target circuit includes multiple control elements and multiple electrical elements, so that multiple simulation tasks corresponding to the target circuit can be determined, wherein the simulation calculation of each control element is used as a simulation task, the simulation calculation of each electrical element is also used as a simulation task, and the matrix inversion calculation corresponding to the simulation calculation of each electrical element can be used as a simulation task; then the simulation calculation time of each simulation task can be determined, and then multiple threads for the simulation calculation of the target circuit can be determined from the computer hardware resources, and then the multiple allocation methods of each simulation task to each thread for simulation calculation can be determined according to the simulation calculation time of each simulation task and the correlation between each simulation task. Obviously, allocating each simulation task to each thread for simulation calculation can realize parallel simulation calculation, which is shorter and more efficient than serial simulation. Finally, among multiple allocation methods, the target allocation method with the shortest total simulation calculation time to complete all simulation tasks is determined, and each simulation task is allocated to each thread for simulation calculation according to the target allocation method.

[0049] It can be seen that the method of the present application can not only perform the simulation calculations of various simulation tasks in parallel, but also determine the simulation calculation method with the shortest total simulation calculation time, and use it as the simulation calculation method for the current simulation step, which can effectively achieve the technical effect of shortening the time of power system simulation calculation. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0051] Figure 1 A schematic diagram of a flow chart of a parallel computing method for power system simulation provided in an embodiment of the present application;

[0052] Figure 2 A schematic diagram of the structure of a target circuit to be simulated disclosed in an embodiment of the present application;

[0053] Figure 3 A schematic diagram of a simulation calculation relationship of a target circuit disclosed in an embodiment of the present application;

[0054] Figure 4a -b is a schematic diagram of two simulation task allocation methods disclosed in the embodiments of the present application;

[0055] Figure 5A schematic diagram of the structure of a parallel computing device for simulating a power system disclosed in an embodiment of the present application;

[0056] Figure 6 A hardware structure block diagram of a power system simulation parallel computing device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0058] Next, the parallel computing method for power system simulation of this application is introduced in detail. Please refer to Figure 1 , Figure 1 The following is a flow chart of a parallel computing method for power system simulation provided in an embodiment of the present application, the method comprising:

[0059] Step S100: obtaining a target circuit to be simulated and calculated corresponding to the current simulation step.

[0060] Specifically, the simulation duration of each simulation step can be arbitrarily set by the user, such as tens of microseconds or hundreds of microseconds, and the acquired target circuit needs to complete at least one simulation calculation at the current simulation step.

[0061] The target circuit is a circuit that needs to be simulated and calculated, which may be a partial circuit in a regional power grid or another manually specified circuit. The target circuit may include multiple control elements and multiple electrical elements.

[0062] For an intuitive introduction to the simulation circuit, please refer to Figure 2 , the figure shows an optional target circuit to be simulated.

[0063] The various control elements of the target circuit can be expressed as Figure 2 The control1~control4 in the target circuit can be referred to as C1~C4 respectively; and the controlled voltage source DC, the resistor R, the capacitor C, and the inductor L are the electrical components in the target circuit, which can be referred to as P1~P4 respectively. The simulation of the target circuit by the current simulation step can be based on the connection relationship of the target circuit, and the simulation calculations of the control components C1~C4 and the electrical components P1~P4 are performed in a certain order.

[0064] Step S110: determining a plurality of simulation tasks corresponding to the target circuit.

[0065] Specifically, the simulation calculation of each control element can be used as a simulation task, the simulation calculation of each electrical element can also be used as a simulation task, and the matrix inversion calculation corresponding to the simulation calculation of each electrical element can be used as a simulation task. Therefore, multiple simulation tasks can include the simulation calculation of each control element, the simulation calculation of each electrical element and the matrix inversion calculation.

[0066] The matrix inversion calculation introduced above can be an N*N matrix inversion calculation whose dimension is the number of electrical components. Figure 2 For example, a target circuit includes 4 electrical components, and the matrix inversion calculation of the target circuit can be the inversion calculation of a 4*4 matrix. In addition, the matrix inversion calculation can be performed only once per simulation step, and the corresponding simulation calculation time is generally positively correlated with the matrix dimension N.

[0067] Step S120: Determine the simulation calculation time consumption of each simulation task.

[0068] Specifically, each simulation task takes a certain amount of time in simulation calculation, and the specific duration varies according to the characteristics of each component and the connection relationship of the target circuit.

[0069] The simulation calculation of the electrical components introduced above can be the solution calculation time of the historical current of each electrical component.

[0070] In addition, the above-mentioned control elements and electrical elements are the computing subjects of the target circuit simulation calculation. According to the pre-set communication relationship, communication may occur after the calculation of any two computing subjects is completed. The amount of communication data depends on the actual situation, and the communication time is generally much shorter than the simulation calculation time.

[0071] Step S130: determining a plurality of threads for simulation calculation of the target circuit.

[0072] Specifically, in actual simulation calculation, there are multiple CPU cores, multiple CPUs, and multiple computer resources available for simulation, so multiple threads of hardware resources for target circuit simulation calculation can be determined.

[0073] The above-mentioned threads may be threads of a manually specified number, or may be idle and actually available threads. The number of threads depends on the specific situation.

[0074] In an optional implementation, the number of threads can be the same as the maximum value of the number of electrical components and the number of control components that can be processed in parallel, that is, the number of threads can be guaranteed to meet the maximum number of parallel simulation calculations of electrical components or control components.

[0075] Step S140: determining a plurality of allocation modes of allocating each of the simulation tasks to each of the threads for simulation calculation according to the simulation calculation time consumption of each of the simulation tasks and the correlation between the simulation tasks.

[0076] Specifically, each simulation task may be allocated to each thread for simulation according to the simulation calculation time consumption of each simulation task, and the simulation sequence relationship of the allocated simulation tasks may satisfy the association relationship between each simulation task.

[0077] Step S150: Determine, among the multiple allocation methods, a target allocation method that has the shortest total simulation calculation time required to complete all the simulation tasks.

[0078] Specifically, there can be multiple threads and simulation tasks, so there will be multiple ways to allocate each simulation task to each thread. Therefore, the allocation method with the shortest total simulation calculation time among the multiple allocation methods can be used as the target allocation method, and based on the target allocation method, each simulation task can be allocated to each thread for simulation calculation.

[0079] In addition, the embodiment of the present application can also allocate each of the simulation tasks to each of the threads for simulation calculation according to the target allocation method in all simulation steps of the simulation calculation.

[0080] It can be seen from the above scheme that the present application first determines the simulation calculation time of each control element and electrical element of the target circuit and the time of the matrix inversion calculation corresponding to each electrical element, and then determines the simulation task allocation method with the shortest total simulation calculation time as the target allocation method based on the multiple threads used for simulation calculation. Obviously, the present application performs simulation calculation in the simulation task allocation method with the shortest total time consumption, which can greatly shorten the simulation time compared to other simulation calculation methods that arbitrarily allocate simulation tasks, and effectively improves the simulation efficiency of the power system under multi-core hardware resources.

[0081] In some embodiments of the present application, the above-mentioned step S140 is introduced, and according to the simulation calculation time of each of the simulation tasks and the relationship between each of the simulation tasks, a process of determining multiple allocation methods of allocating each of the simulation tasks to each of the threads for simulation calculation is performed. The relationship between the various simulation tasks introduced above can be referred to the following description.

[0082] Specifically, the association relationship between each simulation task may include: the parallel relationship of the simulation tasks corresponding to each electrical component in the simulation process, the sequence relationship and parallel relationship of the simulation tasks corresponding to each control component in the simulation process, and the sequence relationship between the simulation task corresponding to the matrix inversion calculation and the simulation tasks of all electrical components.

[0083] Among them, the simulation tasks corresponding to various electrical components can be processed simultaneously in different threads, or can be processed successively in the same thread. The specific processing sequence relationship can be determined according to actual conditions.

[0084] Because the matrix inversion calculation can be performed only once in each simulation step, the simulation task corresponding to the matrix inversion calculation and the simulation tasks of all electrical components can be in the order of: first complete the simulation tasks corresponding to all electrical components, and then process the simulation tasks corresponding to the matrix inversion calculation.

[0085] In addition, the connection relationships between the control elements in different target circuits are different. The simulation calculation sequence of the control elements of each target circuit can be determined by the circuit connection relationship, and the parallel relationship obtained by simulation calculation can conform to the logical relationship of the circuit connection relationship.

[0086] Next, we will use specific examples to introduce the order and parallel relationship of the simulation tasks corresponding to each control element. For details, please refer to Figure 3 , Figure 3 for Figure 2 A schematic diagram showing the simulation calculation relationship of the target circuit.

[0087] Among them, P1~P4 correspond to Figure 2 Each electrical component in, R is the matrix inversion calculation of each electrical component.

[0088] C1~C4 corresponds to Figure 2 In the control elements of control1~control4, it can be known from the connection relationship of the target circuit that the control element C2 must wait for C1 before starting the simulation, and C4 must wait for C2 and C3 before starting the simulation. Therefore, the following can be obtained: Figure 3 The simulation calculation order and parallel relationship of the two branch lines shown are: C1-C2-C4, C3-C4.

[0089] Then, the process of determining one of the allocation modes of allocating each simulation task to each thread for simulation calculation according to the simulation calculation time consumption of each simulation task and the correlation relationship between each simulation task in step S140 described above may include:

[0090] S1. Allocate the simulation tasks corresponding to the electrical components to the threads according to the simulation calculation time consumption of the simulation tasks corresponding to the electrical components and the parallel relationship of the simulation tasks corresponding to the electrical components during the simulation process.

[0091] S2. Allocate the simulation tasks corresponding to the control elements to the threads according to the simulation calculation time consumption of the simulation tasks corresponding to the control elements, and the sequence and parallel relationship of the simulation tasks corresponding to the control elements in the simulation process.

[0092] S3. Allocate the simulation task corresponding to the matrix inversion calculation to any one of the threads according to the simulation calculation time consumption of the simulation task corresponding to each of the electrical components and the sequence relationship between the simulation task corresponding to the matrix inversion calculation and the simulation tasks of all the electrical components.

[0093] It can be seen from the above scheme that listing the association relationships among various simulation tasks makes it easier to allocate each simulation task to each thread for processing according to the association relationships.

[0094] In some embodiments of the present application, the above-mentioned step S150 is introduced: a process of determining a target allocation method with the shortest total simulation calculation time for completing all the simulation tasks among multiple allocation methods. Next, this process will be further explained.

[0095] Specifically, the process may include the following steps:

[0096] S1. Determine all allocation methods for allocating each of the simulation tasks to each of the threads.

[0097] Specifically, the simulation tasks include simulation calculations of electrical components, matrix calculations of electrical components, and simulation calculations of control components. The matrix calculations can be performed after the simulation calculations of each electrical component are completed, and the simulation calculations of the control components need to be divided into several parallel branches according to the connection relationship of the target circuit. Based on the above simulation sequence and logic, all allocation methods of the simulation tasks in each thread are determined.

[0098] Next, we will introduce the above allocation method with a specific example. Figure 3 Taking the schematic diagram of the simulation calculation relationship shown as an example, two optional simulation task allocation methods of the target circuit are introduced.

[0099] refer to Figure 4a -b, which shows two optional simulation task allocation methods for the target circuit. It can be seen that Figure 4a The order of each simulation task is fully considered. Figure 4b The allocation method shown has a shorter simulation end time and a relatively higher simulation efficiency.

[0100] S2. Determine the total simulation calculation time corresponding to each of the allocation methods, compare the total simulation calculation time corresponding to the allocation methods in pairs, obtain the shortest simulation calculation total time, and determine the allocation method corresponding to the shortest simulation calculation total time as the target allocation method.

[0101] Specifically, all allocation methods can be traversed to determine the total simulation calculation time corresponding to each allocation method, and the allocation method with the shortest total simulation calculation time can be used as the target allocation method. The simulation method under the target allocation method can be used as the target simulation calculation method for the current simulation step.

[0102] Next, the above process of traversing various allocation methods will be introduced with specific examples.

[0103] Specifically, suppose there are N T threads, N P Electrical component calculation simulation tasks, N C control element calculation simulation task, 1 matrix calculation simulation task, t P Calculate the time for electrical components, t c It takes time to branch the control element.

[0104] In N T ≥N P +N C When the total time consumed is the shortest time = max(min(t P )+t R ,min(t c )), that is, take the maximum value of the shortest simulation calculation time of each electrical component and the shortest simulation calculation time of each control component branch line.

[0105] In N T <N P +N C When, there are a total of (N P +N C +1)! There are N permutations to be put into T In threads, there are In this way, it is necessary to traverse all the methods, remove the allocation methods that do not conform to the simulation calculation association relationship, and obtain the method with the shortest total calculation time. The shortest total time ≥ max(min(various t P )+t R ,min(various t c )), that is, greater than or equal to the maximum value of the sum of the shortest simulation calculation time of each electrical component and the matrix calculation time, and the shortest simulation calculation time of each control component simulation calculation branch line.

[0106] It can be seen from the above scheme that according to the above time analysis, the allocation method with the shortest time and the target simulation calculation method can be obtained by traversing all allocation methods in sequence, thereby achieving optimized acceleration of simulation calculation.

[0107] The power system simulation parallel computing device provided in an embodiment of the present application is described below. The power system simulation parallel computing device described below and the power system simulation parallel computing method described above can be referenced to each other.

[0108] First, combine Figure 5 The parallel computing device for power system simulation is introduced, such as Figure 5 As shown, the power system simulation parallel computing device may include:

[0109] A circuit acquisition unit 100 is used to acquire a target circuit to be simulated and calculated corresponding to a current simulation step, wherein the target circuit includes a plurality of control elements and a plurality of electrical elements;

[0110] A simulation task determination unit 110 is used to determine a plurality of simulation tasks corresponding to the target circuit, wherein the plurality of simulation tasks include simulation calculations of each of the control elements, simulation calculations of each of the electrical elements, and matrix inversion calculations corresponding to the simulation calculations of each of the electrical elements;

[0111] A time consumption determination unit 120, used to determine the simulation calculation time consumption of each simulation task;

[0112] A thread determination unit 130, configured to determine a plurality of threads for simulation calculation of the target circuit;

[0113] The task allocation unit 140 is used to determine multiple allocation modes of allocating each of the simulation tasks to each of the threads for simulation calculation according to the simulation calculation time consumption of each of the simulation tasks and the correlation relationship between each of the simulation tasks;

[0114] The allocation method determination unit 150 is used to determine a target allocation method that has the shortest total simulation calculation time for completing all the simulation tasks among the multiple allocation methods, and allocate each of the simulation tasks to each of the threads for simulation calculation according to the target allocation method.

[0115] Optionally, the association relationship between the simulation tasks includes:

[0116] The parallel relationship of the simulation tasks corresponding to each electrical component in the simulation process, the sequence and parallel relationship of the simulation tasks corresponding to each control component in the simulation process, and the sequence relationship between the simulation tasks corresponding to the matrix inversion calculation and the simulation tasks of all electrical components;

[0117] The task allocation unit comprises:

[0118] A first task allocation subunit is used to allocate the simulation tasks corresponding to the electrical components to the threads according to the simulation calculation time consumption of the simulation tasks corresponding to the electrical components and the parallel relationship between the simulation tasks corresponding to the electrical components during the simulation process;

[0119] A second task allocation subunit is used to allocate the simulation tasks corresponding to the control elements to the threads according to the simulation calculation time consumption of the simulation tasks corresponding to the control elements and the sequence and parallel relationship of the simulation tasks corresponding to the control elements in the simulation process;

[0120] The third task allocation subunit is used to allocate the simulation task corresponding to the matrix inversion calculation to any one of the threads according to the simulation calculation time corresponding to each electrical component and the sequence relationship between the simulation task corresponding to the matrix inversion calculation and the simulation tasks of all electrical components.

[0121] Optionally, the allocation mode determination unit includes:

[0122] A total time consumption determination unit, used to determine the total time consumption of simulation calculation corresponding to each allocation mode;

[0123] A total time consumption comparison unit, used for comparing the total time consumption of the simulation calculations corresponding to the allocation modes in pairs, to obtain the total time consumption of the simulation calculation with the shortest time consumption;

[0124] The target allocation method determination unit is used to determine the allocation method corresponding to the total simulation calculation time with the shortest time consumption as the target allocation method.

[0125] Optionally, also include:

[0126] The target allocation method application unit is used to allocate each of the simulation tasks to each of the threads for simulation calculation according to the target allocation method in all simulation steps of the simulation calculation.

[0127] The power system simulation parallel computing device provided in the embodiment of the present application can be applied to power system simulation parallel computing equipment. Figure 6 The hardware structure diagram of the parallel computing device for power system simulation is shown in FIG. Figure 6 ,The hardware structure of the power system simulation parallel computing device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;

[0128] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;

[0129] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;

[0130] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;

[0131] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:

[0132] Obtaining a target circuit to be simulated and calculated corresponding to a current simulation step, wherein the target circuit includes a plurality of control elements and a plurality of electrical elements;

[0133] Determine a plurality of simulation tasks corresponding to the target circuit, wherein the plurality of simulation tasks include simulation calculations of each of the control elements, simulation calculations of each of the electrical elements, and matrix inversion calculations corresponding to the simulation calculations of each of the electrical elements;

[0134] Determine the simulation calculation time consumption of each simulation task;

[0135] Determining a plurality of threads for simulation calculation of the target circuit;

[0136] Determine multiple allocation methods for allocating each of the simulation tasks to each of the threads for simulation calculation according to the simulation calculation time consumption of each of the simulation tasks and the correlation between the simulation tasks;

[0137] Among the multiple allocation methods, a target allocation method with the shortest total simulation calculation time for completing all the simulation tasks is determined, and according to the target allocation method, each of the simulation tasks is allocated to each of the threads for simulation calculation.

[0138] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0139] The embodiment of the present application further provides a storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:

[0140] Obtaining a target circuit to be simulated and calculated corresponding to a current simulation step, wherein the target circuit includes a plurality of control elements and a plurality of electrical elements;

[0141] Determine a plurality of simulation tasks corresponding to the target circuit, wherein the plurality of simulation tasks include simulation calculations of each of the control elements, simulation calculations of each of the electrical elements, and matrix inversion calculations corresponding to the simulation calculations of each of the electrical elements;

[0142] Determine the simulation calculation time consumption of each simulation task;

[0143] Determining a plurality of threads for simulation calculation of the target circuit;

[0144] Determine multiple allocation methods for allocating each of the simulation tasks to each of the threads for simulation calculation according to the simulation calculation time consumption of each of the simulation tasks and the correlation between the simulation tasks;

[0145] Among the multiple allocation methods, a target allocation method with the shortest total simulation calculation time for completing all the simulation tasks is determined, and according to the target allocation method, each of the simulation tasks is allocated to each of the threads for simulation calculation.

[0146] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0147] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0148] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0149] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A parallel computing method for power system simulation, characterized in that: include: Obtaining a target circuit to be simulated and calculated corresponding to a current simulation step, wherein the target circuit includes a plurality of control elements and a plurality of electrical elements; Determine a plurality of simulation tasks corresponding to the target circuit, wherein the plurality of simulation tasks include simulation calculations of each of the control elements, simulation calculations of each of the electrical elements, and matrix inversion calculations corresponding to the simulation calculations of each of the electrical elements; Determine the simulation calculation time consumption of each simulation task; Determining a plurality of threads for simulation calculation of the target circuit; Determine multiple allocation methods for allocating each of the simulation tasks to each of the threads for simulation calculation according to the simulation calculation time consumption of each of the simulation tasks and the correlation between the simulation tasks; Among the multiple allocation methods, a target allocation method with the shortest total simulation calculation time for completing all the simulation tasks is determined, and according to the target allocation method, each of the simulation tasks is allocated to each of the threads for simulation calculation.

2. The method according to claim 1, characterized in that The association relationship between the simulation tasks includes: The parallel relationship of the simulation tasks corresponding to each electrical component in the simulation process, the sequence and parallel relationship of the simulation tasks corresponding to each control component in the simulation process, and the sequence relationship between the simulation tasks corresponding to the matrix inversion calculation and the simulation tasks of all electrical components; Determining one of the allocation methods of allocating each simulation task to each thread for simulation calculation according to the simulation calculation time consumption of each simulation task and the correlation between each simulation task includes: Allocate the simulation tasks corresponding to the electrical components to the threads according to the simulation calculation time consumption of the simulation tasks corresponding to the electrical components and the parallel relationship of the simulation tasks corresponding to the electrical components during the simulation process; Allocate the simulation tasks corresponding to the control elements to the threads according to the simulation calculation time consumption of the simulation tasks corresponding to the control elements and the sequence and parallel relationship of the simulation tasks corresponding to the control elements in the simulation process; According to the simulation calculation time consumption of the simulation tasks corresponding to each of the electrical components and the sequence of the simulation tasks corresponding to the matrix inversion calculation and the simulation tasks of all the electrical components, the simulation tasks corresponding to the matrix inversion calculation are allocated to any one of the threads.

3. The method according to claim 1, characterized in that The target allocation method of determining the shortest total simulation calculation time for completing all the simulation tasks includes: Determine the total simulation calculation time corresponding to each allocation method; Compare the total simulation calculation times corresponding to the allocation modes in pairs to obtain the total simulation calculation time with the shortest time consumption; The allocation method corresponding to the total simulation calculation time consumption with the shortest time consumption is determined as the target allocation method.

4. The method according to any one of claims 1 to 3, characterized in that: Also includes: In all simulation steps of simulation calculation, each simulation task is allocated to each thread for simulation calculation according to the target allocation method.

5. A parallel computing device for power system simulation, characterized in that: include: A circuit acquisition unit, used to acquire a target circuit to be simulated and calculated corresponding to a current simulation step, wherein the target circuit includes a plurality of control elements and a plurality of electrical elements; A simulation task determination unit, used to determine a plurality of simulation tasks corresponding to the target circuit, wherein the plurality of simulation tasks include simulation calculations of each of the control elements, simulation calculations of each of the electrical elements, and matrix inversion calculations corresponding to the simulation calculations of each of the electrical elements; A time consumption determination unit, used to determine the simulation calculation time consumption of each simulation task; A thread determination unit, used for determining a plurality of threads for simulation calculation of the target circuit; A task allocation unit, used for determining a plurality of allocation modes of allocating each of the simulation tasks to each of the threads for simulation calculation according to the simulation calculation time consumption of each of the simulation tasks and the correlation relationship between each of the simulation tasks; The allocation method determination unit is used to determine the target allocation method with the shortest total simulation calculation time for completing all the simulation tasks among the multiple allocation methods, and allocate each simulation task to each thread for simulation calculation according to the target allocation method.

6. The device according to claim 5, characterized in that The association relationship between the simulation tasks includes: The parallel relationship of the simulation tasks corresponding to each electrical component in the simulation process, the sequence and parallel relationship of the simulation tasks corresponding to each control component in the simulation process, and the sequence relationship between the simulation tasks corresponding to the matrix inversion calculation and the simulation tasks of all electrical components; The task allocation unit comprises: A first task allocation subunit is used to allocate the simulation tasks corresponding to the electrical components to the threads according to the simulation calculation time consumption of the simulation tasks corresponding to the electrical components and the parallel relationship between the simulation tasks corresponding to the electrical components during the simulation process; A second task allocation subunit is used to allocate the simulation tasks corresponding to the control elements to the threads according to the simulation calculation time consumption of the simulation tasks corresponding to the control elements and the sequence and parallel relationship of the simulation tasks corresponding to the control elements in the simulation process; The third task allocation subunit is used to allocate the simulation task corresponding to the matrix inversion calculation to any one of the threads according to the simulation calculation time corresponding to each electrical component and the sequence relationship between the simulation task corresponding to the matrix inversion calculation and the simulation tasks of all electrical components.

7. The device according to claim 5, characterized in that The allocation mode determination unit includes: A total time consumption determination unit, used to determine the total time consumption of simulation calculation corresponding to each allocation mode; A total time consumption comparison unit, used for comparing the total time consumption of the simulation calculations corresponding to the allocation modes in pairs, to obtain the total time consumption of the simulation calculation with the shortest time consumption; The target allocation method determination unit is used to determine the allocation method corresponding to the total simulation calculation time with the shortest time consumption as the target allocation method.

8. The device according to any one of claims 5 to 7, characterized in that: Also includes: The target allocation method application unit is used to allocate each of the simulation tasks to each of the threads for simulation calculation according to the target allocation method in all simulation steps of the simulation calculation.

9. A parallel computing device for power system simulation, characterized in that: including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the parallel computing method for power system simulation as claimed in any one of claims 1 to 4.

10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the parallel computing method for power system simulation according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Power system simulation optimization calculation method, device and equipment and readable storage medium

    CN114896029A