Calculation method for solving time of node voltage equation in electromagnetic transient simulation, and related apparatus
By determining the number of elements in the conductance matrix and the permutation time, and combining LU decomposition with a suitable solution method, the quantitative problem of the calculation performance of nodal voltage equations in electromagnetic transient simulation was solved, and the calculation performance of real-time electromagnetic transient simulation was optimized.
Patent Information
- Application Number
- PCT/CN2025/093420
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-10
- Filing Date
- 2025-05-08
- Publication Date
- 2025-11-13
AI Technical Summary
Existing technologies fail to effectively quantify the computational performance of nodal voltage equations in real-time electromagnetic transient simulations, making it impossible to theoretically compare the performance of different solution methods, thus affecting simulation performance.
By determining the number of non-zero and zero elements in each column of the equivalent conductance matrix, calculating element permutation and solution time, and combining LU decomposition, a suitable solution method is selected to reduce matrix solution time, thus quantifying the computational performance of the nodal voltage equation.
The calculation performance of the node voltage equation was quantified, which improved the computational performance of real-time electromagnetic transient simulation and allowed for the selection of appropriate solution methods to optimize computation time.
Smart Images

Figure CN2025093420_13112025_PF_FP_ABST
Abstract
Description
A method and related apparatus for calculating the solution time of nodal voltage equations in electromagnetic transient simulation.
[0001] This application claims priority to Chinese Patent Application No. 202410575677.1, filed on May 10, 2024, entitled "A method and apparatus for calculating the solution time of nodal voltage equations in electromagnetic transient simulation", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This invention belongs to the field of electromagnetic transient real-time simulation technology, specifically relating to a method and related apparatus for calculating the solution time of nodal voltage equations in electromagnetic transient simulation. Background Technology
[0003] Real-time simulation of power systems is an effective means of understanding the characteristics of power systems, supporting power system research, planning, operation, production, equipment manufacturing, and ensuring the safe and reliable operation of power systems. Solving the nodal voltage equations is a crucial step in electromagnetic transient real-time simulation technology. The equivalent conductance matrix in the nodal voltage equations is usually a sparse matrix. While there are numerous existing solution methods, none have analyzed the computational performance of the matrix, making it impossible to theoretically quantify the performance advantages and disadvantages of different solution methods, nor can the impact of the computational complexity of the nodal voltage equations on simulation performance in electromagnetic transient real-time simulation be quantified.
[0004] Therefore, how to obtain the solution time of the nodal voltage equation in electromagnetic transient simulation is an issue that needs attention. Summary of the Invention
[0005] In view of this, the present invention aims to provide a method and related apparatus for calculating the solution time of nodal voltage equations in electromagnetic transient simulation, calculating the substitution time and solution time of equal conductance matrix elements in real-time electromagnetic transient simulation, quantifying the computational performance of nodal voltage equations, and facilitating real-time electromagnetic transient simulation of power systems.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation, comprising the following steps:
[0008] For the equivalent conductance matrix of the nodal voltage equation in electromagnetic transient simulation, determine the number of non-zero elements and the number of zero elements in each column of the equivalent conductance matrix;
[0009] The element permutation time of the equivalent conductance matrix is calculated based on the number of non-zero elements in each column of the equivalent conductance matrix.
[0010] For the replaced equivalent conductance matrix, calculate the solution time for the equivalent conductance matrix elements and the solution time for the first matrix;
[0011] For the equivalent conductance matrix of the nodal voltage equation in electromagnetic transient simulation, the solution time of the second matrix based on LU decomposition is calculated.
[0012] Based on the solution time of the first matrix and the solution time of the second matrix, the order threshold of the equivalent conductance matrix is determined. The solution method with shorter matrix solution time is selected according to the order of the equivalent conductance matrix, and the corresponding solution time is obtained.
[0013] Furthermore, let k be the number of zero elements in the nth column of the equivalent conductance matrix. n The number of non-zero elements in the nth column is denoted as nk. n The time for element substitution in the equivalent conductance matrix is calculated using the following formula: T a =[n*min((n-1),(n-k1))+(n-1)*min((n-2),(n-k2))+……+2*1]*t a ;
[0014] In the formula, T a The time required to adjust the equivalent conductance matrix into an upper triangular matrix through element substitution is called the equivalent conductance matrix element substitution time; t a The time for replacing a single element.
[0015] Furthermore, the solution time for the equivalent conductance matrix elements is calculated according to the following formula: T e = n*(n+1)*t e / 2;
[0016] In the formula, T e The time required to solve for the elements of the equivalent conductance matrix; t e The time taken to solve a single element is given by , and n is the number of columns of elements.
[0017] Furthermore, the solution time for the first matrix is calculated according to the following formula: T c =T a +T e ;
[0018] In the formula, T c Let T be the time to solve the first matrix. a T is the time for element permutation of the equivalent conductance matrix. e The time required to solve for the elements of the equivalent conductance matrix.
[0019] Furthermore, the solution time for the second matrix is calculated according to the following formula: T LU = n*(n+1)*t e ;
[0020] In the formula, T LU The time t is the time to solve for the second matrix. e The time taken to solve a single element is given by , and n is the number of columns of elements.
[0021] Furthermore, the order threshold of the equivalent conductance matrix is calculated according to the following formula: n k =[min((n-1),(n-k1))+(n-1) / n*min((n-2),(n-k2))+……+2 / n*1]*2t a / t e -1;
[0022] In the formula, n k The order threshold of the equivalent conductance matrix, n is the number of columns, and k is the number of elements. n t represents the number of zero elements in the nth column of the equivalent conductance matrix. a t is the time for permutation of a single element. e The time taken to solve a single element.
[0023] Furthermore, the expression for the equivalent conductance matrix is:
[0024] In the formula, A is the equivalent conductance matrix of the nodal voltage equation in the real-time simulation calculation of electromagnetic transients; g 11 The first conductance in the first row of the equivalent conductance matrix; g 12 The second conductance in the first row of the equivalent conductance matrix; g 1n g represents the nth conductance in the first row of the equivalent conductance matrix. 21 The first conductance in the second row of the equivalent conductance matrix; g 22 The second conductance in the second row of the equivalent conductance matrix; g 2n g represents the nth conductance in the second row of the equivalent conductance matrix. n1 The first conductance in the nth row of the equivalent conductance matrix; g n2 The second conductance in the nth row of the equivalent conductance matrix; g nn It represents the nth conductance in the nth row of the equivalent conductance matrix.
[0025] Secondly, the present invention provides a device for calculating the solution time of nodal voltage equations in electromagnetic transient simulation, comprising:
[0026] The element count calculation module is used to determine the number of non-zero elements and the number of zero elements in each column of the equivalent conductance matrix of the nodal voltage equation in electromagnetic transient simulation.
[0027] The first-time calculation module is used to calculate the element permutation time of the equivalent conductance matrix based on the number of non-zero elements in each column of the equivalent conductance matrix.
[0028] The second time calculation module is used to calculate the solution time of the equivalent conductance matrix elements and the solution time of the first matrix for the permuted equivalent conductance matrix.
[0029] The third time calculation module is used to solve the second matrix solution time based on LU decomposition for the equivalent conductance matrix of the nodal voltage equation in electromagnetic transient simulation.
[0030] The order threshold solution module is used to solve the order threshold of the equivalent conductance matrix based on the solution time of the first matrix and the solution time of the second matrix. It selects the solution method with less matrix solution time based on the order of the equivalent conductance matrix and obtains the corresponding solution time.
[0031] Accordingly, the present invention also provides a computer device, the device including a processor and a memory:
[0032] The memory is used to store computer programs and send the instructions of the computer programs to the processor;
[0033] The processor executes, according to the instructions of the computer program, a method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation, as described in the first aspect.
[0034] Accordingly, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements a method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation as described in the first aspect.
[0035] In summary, this invention provides a method and related apparatus for calculating the solution time of nodal voltage equations in electromagnetic transient simulation. It involves determining the number of non-zero elements and zero elements in each column of the equivalent conductance matrix of the nodal voltage equations in electromagnetic transient simulation; calculating the element permutation time of the equivalent conductance matrix based on the number of non-zero elements in each column; calculating the element solution time and the first matrix solution time for the permuted equivalent conductance matrix; calculating the second matrix solution time based on LU decomposition for the equivalent conductance matrix of the nodal voltage equations in electromagnetic transient simulation; determining the order threshold of the equivalent conductance matrix based on the first and second matrix solution times; and selecting a solution method with shorter matrix solution time based on the order of the equivalent conductance matrix to obtain the corresponding solution time. This invention provides the matrix solution time and the LU decomposition-based solution time for the equivalent conductance matrix of the nodal voltage equation in electromagnetic transient simulation. It can quantify the computational performance of the nodal voltage equation and theoretically quantify the performance advantages and disadvantages of different solution methods. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 is a flowchart of a method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation provided by an embodiment of the present invention;
[0038] Figure 2 is a block diagram of a calculation device for solving the nodal voltage equation in electromagnetic transient simulation provided by an embodiment of the present invention;
[0039] Figure 3 is a block diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0040] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0041] Please refer to Figure 1. This embodiment provides a method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation, including the following steps:
[0042] S1: For the equivalent conductance matrix of the nodal voltage equation in electromagnetic transient simulation, determine the number of non-zero elements and the number of zero elements in each column of the equivalent conductance matrix.
[0043] S2: Based on the number of non-zero elements in each column of the equivalent conductance matrix, solve for the element permutation time of the equivalent conductance matrix;
[0044] S3: For the replaced equivalent conductance matrix, calculate the solution time for the elements of the equivalent conductance matrix and the solution time for the first matrix;
[0045] S4: Solve the second matrix based on LU decomposition for the equivalent conductance matrix of the nodal voltage equation in electromagnetic transient simulation;
[0046] S5: Based on the solution time of the first matrix and the solution time of the second matrix, calculate the order threshold of the equivalent conductance matrix, select the solution method with less matrix solution time based on the order of the equivalent conductance matrix, and obtain the corresponding solution time.
[0047] It should be noted that electromagnetic transient processes mainly refer to the changes in electric and magnetic fields, as well as the corresponding voltage and current, within various components. The primary purpose of electromagnetic transient process simulation is to analyze and calculate the transient overvoltages and overcurrents that may occur after a fault or operation. This allows for the rational design of relevant power equipment based on the obtained transient overvoltages and overcurrents, determining whether existing equipment can operate safely, and studying corresponding limiting and protection measures. Furthermore, electromagnetic transient process analysis is often required for studying the operating principles of new fast relay protection devices, fault detection principles, and electromagnetic interference.
[0048] The equivalent conductance matrix in this embodiment is generated based on Norton's equivalent law to obtain the accompanying circuits of each component (capacitor, inductor) according to the system's connection relationships. The equivalent conductance matrix is a symmetric square matrix, and its order *n* equals the number of nodes in the power network. The diagonal elements represent self-admittance, which is the sum of the admittances of branches directly connected to the nodes. An ideal voltage source is equivalent to a short circuit (Z=0), and an ideal current source is equivalent to an open circuit (Z=∞). Actual power sources are represented by a combination of ideal power sources and impedances. The off-diagonal elements represent mutual admittance, which is the negative of the sum of the admittances of the branches directly connecting two nodes.
[0049] In this embodiment, firstly, for the equivalent conductance matrix of the nodal voltage equation in the electromagnetic transient simulation, the number of non-zero elements and the number of zero elements in each column of the matrix are determined. This yields the element permutation time when the equivalent conductance matrix is transformed into an upper triangular matrix through element permutation. Then, for the permuted equivalent conductance matrix, the element solution time and the first matrix solution time are calculated, where the first matrix solution time is the same as the equivalent conductance matrix solution time. Furthermore, this embodiment also calculates the second matrix solution time based on LU decomposition for the equivalent conductance matrix of the nodal voltage equation in the electromagnetic transient simulation. The order threshold of the equivalent conductance matrix is determined through the two matrix solution times. Based on the order threshold, a suitable solution method for the obtained equivalent conductance matrix can be determined. This solution method corresponds to the solution method for the first matrix solution time or the second matrix solution time, thus obtaining the solution time for the nodal voltage equation in the electromagnetic transient simulation.
[0050] This embodiment provides a method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation. This method provides the matrix solution time and the LU decomposition-based solution time for the equivalent conductance matrix of nodal voltage equations in electromagnetic transient simulation, quantifying the computational performance of nodal voltage equations and theoretically evaluating the performance of different solution methods. Furthermore, this method also provides a method for calculating the order threshold of the equivalent conductance matrix of nodal voltage equations in electromagnetic transient simulation, which can quantify the performance of different solution methods, determine their applicability, and improve the computational performance of real-time electromagnetic transient simulation.
[0051] In a preferred embodiment of the present invention, the equivalent conductance matrix of the nodal voltage equation in the electromagnetic transient simulation is:
[0052] Where A is the equivalent conductance matrix of the nodal voltage equation in the real-time simulation calculation of electromagnetic transients; g 11 The first conductance in the first row of the equivalent conductance matrix; g 12 The second conductance in the first row of the equivalent conductance matrix; g 1n g represents the nth conductance in the first row of the equivalent conductance matrix. 21 The first conductance in the second row of the equivalent conductance matrix; g 22 The second conductance in the second row of the equivalent conductance matrix; g 2n g represents the nth conductance in the second row of the equivalent conductance matrix. n1 The first conductance in the nth row of the equivalent conductance matrix; g n2 The second conductance in the nth row of the equivalent conductance matrix; g nn It represents the nth conductance in the nth row of the equivalent conductance matrix.
[0053] In the equivalent conductance matrix, the number of zero elements in the first column is denoted as k1, and the number of non-zero elements in the first column is denoted as n-k1; the number of zero elements in the second column is denoted as k2, and the number of non-zero elements in the first column is denoted as n-k2; the number of zero elements in the nth column is denoted as k n The number of non-zero elements in the first column is denoted as nk. n .
[0054] In a preferred embodiment of the present invention, the equivalent conductance matrix is adjusted into an upper triangular matrix by element substitution based on the number of non-zero elements in each column of the equivalent conductance matrix.
[0055] Where B is the permuted upper triangular matrix; b 11 b is the first conductance in the first row of the permuted upper triangular matrix; 12 b is the second conductance in the first row of the permuted upper triangular matrix; 1n b is the nth conductance in the first row of the permuted upper triangular matrix; 22 b is the second conductance in the second row of the permuted upper triangular matrix; 2n b is the nth conductance in the second row of the permuted upper triangular matrix; nn Let n be the nth conductance in the nth row of the permuted upper triangular matrix; all elements below the diagonal in the permuted upper triangular matrix are 0.
[0056] The time required to adjust the equivalent conductance matrix into an upper triangular matrix by element substitution is: T a=[n*min((n-1),(n-k1))+(n-1)*min((n-2),(n-k2))+……+2*1]*t a ;
[0057] Among them, T a The time required to adjust the equivalent conductance matrix into an upper triangular matrix through element substitution; t a The time for replacing a single element.
[0058] In a preferred embodiment of the present invention, after adjusting the equivalent conductance matrix to an upper triangular matrix through element substitution, the time for solving the elements of the equivalent conductance matrix after substitution is: T e = (1+2+3+……+n)*t e = n*(n+1)*t e / 2;
[0059] Among them, T e The time required to solve for the elements of the equivalent conductance matrix; t e The time taken to solve a single element.
[0060] In a preferred embodiment of the present invention, the matrix solution time for the replaced equivalent conductance matrix is: T c =T a +T e =[n*min((n-1),(n-k1))+(n-1)*min((n-2),(n-k2))+……+2*1]*t a +n*(n+1)*t e / 2.
[0061] In a preferred embodiment of the present invention, the solution time for the equivalent conductance matrix based on LU decomposition is: T LU =2*(1+2+3+……+n)*te=n*(n+1)*te;
[0062] Among them, T LU The time required to solve the equivalent conductance matrix based on LU decomposition; t e The time taken to solve a single element.
[0063] In a preferred embodiment of the present invention, let T c =T LU The n obtained at this time k This is the order threshold of the equivalent conductance matrix: [n*min((n-1),(n-k1))+(n-1)*min((n-2),(n-k2))+……+2*1]*t a +n*(n+1)*t e / 2 = n*(n+1)*t e ; [n*min((n-1),(n-k1))+(n-1)*min((n-2),(n-k2))+……+2*1]*t a = n*(n+1)*t e / 2;
[0064] That is: n k =[min((n-1),(n-k1))+(n-1) / n*min((n-2),(n-k2))+……+2 / n*1]*2t a / t e -1.
[0065] In this embodiment, a solution method with a shorter solution time is selected based on the relationship between the actual order of the equivalent conductance matrix and the order threshold.
[0066] Based on the same inventive concept, this application also provides a device for calculating the solution time of nodal voltage equations in electromagnetic transient simulation, used to implement the method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation as described above. The solution provided by this system is similar to the solution described in the above method. Therefore, the specific limitations in the embodiments of the device for calculating the solution time of nodal voltage equations in electromagnetic transient simulation provided below can be found in the limitations of the method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation described above, and will not be repeated here.
[0067] Please refer to Figure 2. This embodiment provides a calculation device for the solution time of nodal voltage equations in electromagnetic transient simulation, including:
[0068] The element count calculation module is used to determine the number of non-zero elements and the number of zero elements in each column of the equivalent conductance matrix of the nodal voltage equation in electromagnetic transient simulation.
[0069] The first-time calculation module is used to calculate the element permutation time of the equivalent conductance matrix based on the number of non-zero elements in each column of the equivalent conductance matrix.
[0070] The second time calculation module is used to calculate the solution time of the equivalent conductance matrix elements and the solution time of the first matrix for the replaced equivalent conductance matrix.
[0071] The third time calculation module is used to solve the second matrix solution time based on LU decomposition for the equivalent conductance matrix of the nodal voltage equation in electromagnetic transient simulation.
[0072] The order threshold solution module is used to solve the order threshold of the equivalent conductance matrix based on the solution time of the first matrix and the solution time of the second matrix, and to select a solution method with less matrix solution time based on the order of the equivalent conductance matrix and obtain the corresponding solution time.
[0073] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0074] Referring to Figure 3, this embodiment of the invention also provides a computer device 3, including: a memory 302 and a processor 301, and a computer program 303 stored in the memory 302. When the computer program 303 is executed on the processor 301, it implements the method for calculating the solution time of the nodal voltage equation in electromagnetic transient simulation as described in any of the above methods.
[0075] The computer device 3 can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device 3 may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will understand that Figure 3 is merely an example of the computer device 3 and does not constitute a limitation on the computer device 3. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, etc.
[0076] The processor 301 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0077] In some embodiments, the memory 302 may be an internal storage unit of the computer device 3, such as a hard disk or memory of the computer device 3. In other embodiments, the memory 302 may be an external storage device of the computer device 3, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 3. Further, the memory 302 may include both internal and external storage units of the computer device 3. The memory 302 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 302 can also be used to temporarily store data that has been output or will be output.
[0078] This invention also provides a computer-readable storage medium storing a computer program thereon. When the computer program is run by a processor, it implements a method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation as described in any of the above methods.
[0079] In this embodiment, if the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0080] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0081] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0082] In the embodiments disclosed in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0083] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation, characterized in that, Includes the following steps: For the equivalent conductance matrix of the nodal voltage equation in electromagnetic transient simulation, determine the number of non-zero elements and the number of zero elements in each column of the equivalent conductance matrix; Based on the number of non-zero elements in each column of the equivalent conductance matrix, the element permutation time of the equivalent conductance matrix is calculated. For the replaced equivalent conductance matrix, the solution time for the equivalent conductance matrix elements and the solution time for the first matrix are calculated. For the equivalent conductance matrix of the nodal voltage equation in electromagnetic transient simulation, the solution time of the second matrix based on LU decomposition is calculated. Based on the solution time of the first matrix and the solution time of the second matrix, the order threshold of the equivalent conductance matrix is determined. Based on the order of the equivalent conductance matrix, a solution method with a shorter matrix solution time is selected, and the corresponding solution time is obtained.
2. The method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation according to claim 1, characterized in that, Let k be the number of zero elements in the nth column of the equivalent conductance matrix. n The number of non-zero elements in the nth column is denoted as nk. n The time for permuting the elements of the equivalent conductance matrix is calculated according to the following formula: T a =[n*min((n-1),(n-k1))+(n-1)*min((n-2),(n-k2))+……+2*1]*t a ; In the formula, T a The time required to adjust the equivalent conductance matrix into an upper triangular matrix through element substitution is the time required for the element substitution of the equivalent conductance matrix; t a The time for replacing a single element.
3. The method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation according to claim 1, characterized in that, The solution time for the equivalent conductance matrix elements is calculated according to the following formula: T e = n*(n+1)*t e / 2; In the formula, T e The time required to solve for the elements of the equivalent conductance matrix; t e The time taken to solve a single element is given by , and n is the number of columns of elements.
4. The method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation according to claim 1, characterized in that, The solution time for the first matrix is calculated according to the following formula: T c =T a +T e ; In the formula, T c Let T be the time to solve the first matrix. a T is the time for element permutation of the equivalent conductance matrix. e The time required to solve for the elements of the equivalent conductance matrix is given.
5. The method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation according to claim 1, characterized in that, The solution time for the second matrix is calculated using the following formula: T LU = n*(n+1)*t e ; In the formula, T LU Let t be the time to solve the second matrix. e The time taken to solve a single element is given by , and n is the number of columns of elements.
6. The method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation according to claim 1, characterized in that, The order threshold of the equivalent conductance matrix is calculated according to the following formula: n k =[min((n-1),(n-k1))+(n-1) / n*min((n-2),(n-k2))+……+2 / n*1]*2t a / t e -1; In the formula, n k The order threshold of the equivalent conductance matrix is n, where n is the number of columns and k is k. n t is the number of zero elements in the nth column of the equivalent conductance matrix. a t is the time for permutation of a single element. e The time taken to solve a single element.
7. The method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation according to claim 1, characterized in that, The expression for the equivalent conductance matrix is: In the formula, A is the equivalent conductance matrix of the nodal voltage equation in the real-time simulation calculation of electromagnetic transients; g 11 The first conductance in the first row of the equivalent conductance matrix; g 12 The second conductance in the first row of the equivalent conductance matrix; g 1n g represents the nth conductance in the first row of the equivalent conductance matrix. 21 The first conductance in the second row of the equivalent conductance matrix; g 22 The second conductance in the second row of the equivalent conductance matrix; g 2n g represents the nth conductance in the second row of the equivalent conductance matrix. n1 The first conductance in the nth row of the equivalent conductance matrix; g n2 The second conductance in the nth row of the equivalent conductance matrix; g nn It represents the nth conductance in the nth row of the equivalent conductance matrix.
8. A calculation device for solving the nodal voltage equation in electromagnetic transient simulation, characterized in that, include: The element count calculation module is used to determine the number of non-zero elements and the number of zero elements in each column of the equivalent conductance matrix of the nodal voltage equation in electromagnetic transient simulation. The first-time calculation module is used to calculate the element permutation time of the equivalent conductance matrix based on the number of non-zero elements in each column of the equivalent conductance matrix. The second time calculation module is used to calculate the solution time of the equivalent conductance matrix elements and the solution time of the first matrix for the replaced equivalent conductance matrix. The third time calculation module is used to solve the second matrix solution time based on LU decomposition for the equivalent conductance matrix of the nodal voltage equation in electromagnetic transient simulation. The order threshold solution module is used to solve the order threshold of the equivalent conductance matrix based on the solution time of the first matrix and the solution time of the second matrix, and to select a solution method with less matrix solution time based on the order of the equivalent conductance matrix and obtain the corresponding solution time.
9. A computer device, characterized in that, The device includes a processor and a memory: The memory is used to store computer programs and send the instructions of the computer programs to the processor; The processor executes, according to the instructions of the computer program, a method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements a method for calculating the solution time of nodal voltage equations in electromagnetic transient simulation as described in any one of claims 1-7.
Citation Information
Patent Citations
Electromagnetic transient simulation algorithm based on matrix decomposition method
CN106339566A
Method and device for calculating execution time of column reduced-order model in electromagnetic transient simulation
CN115238465A
Method for calculating node voltage equation solving time in electromagnetic transient simulation and related device
CN118395716A
Electromagnetic transient simulation method for field programmable logic array
US20210049313A1