Method for calculating equivalent resistance in blocks
By dividing the admission matrix of large-scale resistor networks and LDLT decomposition, and calculating their equivalent resistance, the cost of large-scale resistor network calculation is solved, and efficient distributed and multi-threaded computing is achieved.
Patent Information
- Application Number
- CN202411605622.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-12
AI Technical Summary
The calculation of many-to-one equivalent resistors in large-scale resistor networks is expensive and it is difficult to effectively share the calculation load in the prior art.
By establishing the admission matrix of the resistor network, dividing and sorting it, LDLT decomposition, constructing a block matrix and node set, calculating the local number and right-end item vectors, and finally traversing the nodes to calculate their equivalent resistance.
The large-scale resistor network is divided into independent small pieces, and the equivalent resistance calculation is performed independently, and the calculation cost is allocated to each thread or machine, which significantly improves the equivalent resistance calculation efficiency of large-scale circuits.
Smart Images

Figure CN119578318A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of analog circuit EDA, and in particular to a method for calculating equivalent resistance in blocks. Background Art
[0002] The equivalent resistance calculation of resistor networks is widely used in research fields such as analog circuit simulation, graph sparsification, power network voltage drop analysis, and layout circuit extraction in EDA (electronic design automation). Since the circuit post-simulation needs to consider the parasitic parameters of the layout, the scale of circuit simulation has increased dramatically. Circuits containing hundreds of millions or even billions of nodes are common, which makes the computational cost of circuit simulation huge. To calculate the equivalent resistance of a circuit of this scale, the circuit needs to be divided into many blocks, and the originally huge computational cost can be shared through distributed or multi-threaded methods. Summary of the invention
[0003] In order to address the defects of the prior art, the purpose of the present invention is to provide a method for calculating equivalent resistance in blocks, which solves the problem of high cost of many-to-one equivalent resistance calculation of large-scale resistance networks and meets the needs of distributed and multi-threaded computing.
[0004] In order to achieve the above object, the method for calculating equivalent resistance by blocks provided by the present invention comprises the following steps:
[0005] Build the admittance matrix of the resistor network;
[0006] Partitioning and sorting the admittance matrix to obtain a plurality of block matrices and node sets;
[0007] Perform LDL on the partitioned admittance matrix T Decompose to obtain a lower triangular matrix of the first kind and a diagonal matrix of the first kind;
[0008] For nodes that need to calculate equivalent resistance, according to their numbers in the node set, they are allocated to the corresponding interior point block matrix and the top-level block matrix to obtain a node set to be calculated;
[0009] According to the first-type lower triangular matrix and the first-type diagonal matrix, construct a second-type lower triangular matrix and a second-type diagonal matrix of each of the block matrices;
[0010] Calculate the local numbers of all nodes in the node set to be found, and construct a right-hand column vector;
[0011] Each node in the set of nodes to be determined is traversed, and its equivalent resistance is calculated according to the second lower triangular matrix and the second diagonal matrix in which the node is located, and the right end column vector.
[0012] Furthermore, the step of establishing the admittance matrix of the resistor network further includes: establishing the admittance matrix of the resistor network by a node analysis method, deleting rows and columns corresponding to ground nodes in the admittance matrix, and forming a non-singular admittance matrix.
[0013] Furthermore, the step of dividing and sorting the admittance matrix to obtain a plurality of block matrices and node sets further includes:
[0014] Dividing the admittance matrix into a BBD structure by matrix partitioning software to obtain a multi-layer block admittance matrix;
[0015] From the multi-layer block admittance matrix, information of each block matrix and a plurality of corresponding node sets is obtained, wherein the node sets are mutually non-intersecting point sets.
[0016] Furthermore, the second type of lower triangular matrix is expressed as:
[0017]
[0018] The second type of diagonal matrix is expressed as:
[0019]
[0020] in, represents a lower triangular matrix of the second kind, represents a diagonal matrix of the second kind, s∈1,2,…p,c;
[0021] P s L s ,L cs ,s∈1,2,…p,P c L c Corresponding to the blocks of the first type lower triangular matrix, D s ,s∈1,2,…p,D c They correspond to the blocks of the first kind of diagonal matrix respectively.
[0022] Further, the local number is expressed as:
[0023]
[0024] in, Represents the local number of the node, i s is the number of the node in the set of nodes to be requested, where s = 1, 2, ... p, c, p represents the number of blocks, N q ,q=1,2,…p is the dimension of the block matrix corresponding to the node.
[0025] Further, the right-hand column vector is expressed as:
[0026]
[0027] in, Represents the right-hand column vector The kth component of s=1,2,…p,c represents the local number of the node, is the dimension of the second type lower triangular matrix.
[0028] Furthermore, the step of traversing each node in the set of nodes to be determined and calculating its equivalent resistance according to the second lower triangular matrix and the second diagonal matrix in which the node is located and the right end column vector further includes:
[0029] Use the following formula to calculate the block equivalent resistance R s :
[0030]
[0031] Among them, X s is an intermediate matrix, Yes X s The transpose of represents the constructed lower triangular matrix of the second kind, yes The inverse matrix of is the local number of each node, p represents the number of blocks, represents the constructed diagonal matrix of the second kind, yes The inverse matrix of .
[0032] To achieve the above objectives, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to execute the computer program stored in the memory to implement the method for calculating equivalent resistance in blocks as described above.
[0033] To achieve the above object, the present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the method for calculating equivalent resistance in blocks as described above.
[0034] The method for calculating equivalent resistance by blocks provided by the present invention has the following beneficial effects compared with the prior art:
[0035] The large-scale resistance network is divided into independent small blocks, and the equivalent resistance calculation is performed independently in each small block, so that the huge calculation cost can be distributed to each thread or each machine, thereby improving the efficiency of equivalent resistance calculation of large-scale circuits.
[0036] Other features and advantages of the present invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0038] Figure 1 A flow chart of a method for calculating equivalent resistance by blocks according to an embodiment of the present invention;
[0039] Figure 2 A flowchart of many-to-one equivalent resistance calculation according to an embodiment of the present invention;
[0040] Figure 3 is a non-zero element distribution diagram of the admittance matrix A according to an embodiment of the present invention;
[0041] Figure 4 A dimension distribution diagram of a bot layer matrix and a top layer matrix after block division according to an embodiment of the present invention;
[0042] Figure 5 A comparison diagram of effects of non-block calculation and block calculation of equivalent resistance according to an embodiment of the present invention;
[0043] Figure 6 FIG. 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0045] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.
[0046] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0047] It should be noted that the concepts of “first”, “second”, etc. may be mentioned in the present invention only to distinguish different devices, components or parts, and are not used to limit the order or interdependence of the functions performed by these devices, components or parts.
[0048] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more". "Plurality" should be understood as two or more.
[0049] In an embodiment of the present invention, a method for calculating equivalent resistance in blocks is provided, comprising: establishing an admittance matrix of a resistor network; dividing and sorting the admittance matrix to obtain a plurality of block matrices and node sets; performing LDL on the divided admittance matrix; T Decompose to obtain a first-class lower triangular matrix and a first-class diagonal matrix; for nodes that need to calculate equivalent resistance, assign them to corresponding inner point block matrices and top-level block matrices according to their numbers in the node set to obtain a node set to be calculated; construct a second-class lower triangular matrix and a second-class diagonal matrix for each of the block matrices according to the first-class lower triangular matrix and the first-class diagonal matrix; calculate the local numbers of all nodes in the node set to be calculated, and construct a right-hand column vector; traverse each node in the node set to be calculated, and calculate its equivalent resistance according to its second-class lower triangular matrix and second-class diagonal matrix, as well as the right-hand column vector.
[0050] Example 1
[0051] Figure 1 This is a flow chart of a method for calculating equivalent resistance by block according to an embodiment of the present invention. Figure 1 The method for calculating equivalent resistance by blocks of the present invention is described in detail.
[0052] In step 101, an admittance matrix is established.
[0053] In an embodiment of the present invention, for a large-scale resistor network, its admittance matrix is established by a modified nodal analysis method (Modified Nodal Analysis, MNA). Since it is a resistor network, the sum of the elements in each row of the admittance matrix is equal to 0, so the admittance matrix is singular. In order to ensure the non-singularity of the matrix solution, it is necessary to delete the rows and columns corresponding to a node of the admittance matrix. In the many-to-one equivalent resistance calculation, the rows and columns where the reference point is located can be deleted to form a non-singular matrix. In actual circuit calculations, the rows and columns corresponding to the ground node are usually deleted, and the many-to-one calculation of equivalent resistance is also performed relative to the case where the reference point is ground. If the rows and columns corresponding to the reference point and the deleted point are different, the calculation formula will be different and is not within the scope of protection of the present invention. In an embodiment of the present invention, we call the non-singular matrix formed in this way A, and assume its dimension is N.
[0054] It should be noted that for small and medium-sized resistor networks, if the equivalent resistance between all nodes and a certain node is calculated, the direct method or Takahashi algorithm is usually used. As for the direct method, its basic process is as follows:
[0055] Assume A is the admittance matrix. Since it is a pure resistance network, A satisfies the symmetry. We can do LDL on A. T break down.
[0056] Right now
[0057] P T AP=LDL T (1)
[0058] Assume that the dimension of A in formula (1) is N, L is a lower triangular matrix with diagonal 1, and D is a diagonal matrix. P is a permutation matrix used to sort the rows and columns of A to ensure that the L matrix has less padding.
[0059] In order to calculate the equivalent resistance between the i-th node and the j-th node, it is necessary to construct an N-dimensional unit vector e i and e j A unit vector is a vector with one component equal to 1 and the rest equal to 0. For example: e i is a vector whose components are 0 except the i-th component which is 1, that is:
[0060]
[0061] Here i (k) represents the vector e i The kth component of . Similarly, we can define e j .
[0062] Then solve for the vector X by back substitution i and X j :
[0063] X i =L -1 P T e i ,X j =L -1 P T e j (3)
[0064] Then the equivalent resistance between the i-th and j-th nodes can be calculated as:
[0065] R ij =(X i -X j ) T D -1 (X i -X j ) (4)
[0066] For large-scale resistor networks, if the admittance matrix A is treated as a whole according to the above calculation, efficiency and memory problems will be encountered. The admittance matrix A must be divided into a BBD (bordered block diagonal) structure. Converting a sparse matrix into a BBD structure can be achieved through partitioning and sorting software, such as metis.
[0067] The following is the case where the matrix A is divided into two layers:
[0068]
[0069] Here A i,j are all matrix blocks, x i and r i is a column vector, i = 1, ..., p, where p represents the number of blocks. Through the above processing, the original large matrix is divided into many small blocks and sorted, and the style shown in formula (5) can be formed, that is, the BBD form. The division of the matrix is equivalent to grouping the nodes, that is, dividing the nodes into multiple non-overlapping sets, I 1 , I 2 ,…,I p and I c , where I 1 , I 2 ,…,I p is an internal node, I c is the boundary node. The resulting admittance matrix is also divided into several blocks accordingly, where A i,i ,i=1,…,p is called the bot layer (bottom layer), A c,c is the top layer, A c,i ,A i,ci=1,…,p is the port layer. bot layer A i,i The formation comes from the internal nodes I after the matrix is divided i The interaction between c,c From the boundary point I c The interaction between c,i and A c,i From internal node I i and boundary point I c The interaction between them.
[0070] If A i,i , i=1,…,p and other matrices are still very large, then A can be further divided according to the above BBD method i,i This process can continue to form a multilayer structure. Based on the BBD structure of the admittance matrix A, the corresponding LDL T The decomposition and subsequent calculation of equivalent resistance also need to be adjusted accordingly based on the BBD division of A.
[0071] In step 102, the admittance matrix is partitioned and sorted and the partition information is extracted. The admittance matrix A is partitioned and sorted to obtain the matrix information after the partition.
[0072] In the embodiment of the present invention, the admittance matrix A can be divided into a BBD structure by matrix division software (such as metis). In this embodiment, for the convenience of description, we assume that the matrix is divided into a structure similar to formula (5), that is, divided into two layers: bot layer (bottom layer) and top layer (top layer), including p bot layers and one top layer.
[0073] By partitioning and sorting, the admittance matrix A becomes the block form of formula (5), thereby obtaining the following information:
[0074] (1) Block matrix of each layer: bot layer block matrix A i,i ,i=1,…,p; port layer block matrix A c,i ,A i,c ,i=1,…,p; top layer block matrix A c,c .
[0075] (2) Node set: internal node set I i ,i=1,…,p, boundary node set I c , that is, all nodes are divided into mutually disjoint point sets.
[0076] It should be noted that in addition to being divided into two layers, more layers can also be divided, that is, i,i, i=1,…,p and then perform the division similar to the above process. For example, in the matrix scale of millions to tens of millions, three layers are usually divided: bottom layer, middle layer and top layer. In order to be suitable for distributed computing, a larger-scale matrix can be divided into four layers, etc. Those skilled in the art can understand that the equivalent resistance calculation of a matrix divided into more layers can refer to the two-layer division for similar calculation.
[0077] In step 103, LDL is performed on the admittance matrix. T Decomposition. Since it is a resistor network, its admittance matrix A satisfies the symmetry, that is:
[0078] A=A T (6)
[0079] Usually, solving an asymmetric matrix requires LU decomposition. Since A satisfies the symmetry, LDL can be performed on A T Decompose, that is:
[0080] A=LDL T (7)
[0081] Since A has been divided into the top and bottom layers, the first-class lower triangular matrix L and the first-class diagonal matrix D obtained by the division also need to be written in block form, namely:
[0082]
[0083]
[0084] Among them, for the bot layer, the block matrix A of the bot layer of the admittance matrix A is i,i LDL T Decompose to get L i ,D i and P i :
[0085]
[0086] According to LDL T Definition of decomposition, L i is a lower triangular matrix with 1s on the diagonal, D i is a diagonal matrix, P i are permutation matrices, and the dimensions of these matrices are all N i , that is, A i,i The dimension of .
[0087] L ci It can be expressed as:
[0088]
[0089] L ci YesNc ×N i Matrix, here N c Yes A c,c The dimension of .
[0090] For the top layer, first calculate the Schur complement matrix of the top layer, that is
[0091]
[0092] Then the Schur complement matrix S c LDL T Decomposed
[0093]
[0094] According to LDL T Definition of decomposition, L c is a lower triangular matrix with 1s on the diagonal, D c is a diagonal matrix, P c are permutation matrices, and the dimensions of these matrices are all N c , that is, A c,c The dimension of .
[0095] Thus, through formulas (10)-(13), we can obtain the expressions of all blocks in (8) and (9) through the block expression (5) of the original admittance matrix A. Note that the L and D constructed in this way satisfy formula (7), which formally does not contain the P matrix.
[0096] In step 104, many-to-one equivalent resistance is calculated, where "many-to-one" means that there are multiple nodes relative to a certain reference node.
[0097] In the embodiment of the present invention, the user needs to provide a set of multiple nodes to be calculated, such as:
[0098] Ω={i 1 ,i 2 ,…,i m} (14)
[0099] The number of nodes to be calculated is m. Note that the matrix A is formed by deleting the reference point.
[0100] Figure 2 FIG. 1 is a flowchart of calculating a multi-to-one equivalent resistance according to an embodiment of the present invention. Figure 2 As shown, in step 1041, according to a set I of multiple nodes s,s=1,2,…,p,c, for the nodes to be calculated, according to their numbers and the information of the admittance matrix partition, the nodes to be calculated are assigned to the corresponding internal point blocks and top layer blocks in the admittance matrix to form the node set Ω to be calculated s That is, divide the known Ω into multiple non-intersecting sets
[0101] Ω=Ω 1 ∪Ω 2 …∪Ω p ∪Ω c (15)
[0102] Formula (15) satisfies s=1,2,…,p,c.
[0103] In step 1042, a second lower triangular matrix of each block is constructed. and a diagonal matrix of the second kind In order to solve the set Ω s The equivalent resistance of the mid-node is used to construct the lower triangular matrix of the second kind for each block in the admittance matrix. and
[0104]
[0105] Among them, P s L s ,L cs ,s∈1,2,…p,P c L c Corresponding to the blocks of the first type lower triangular matrix L, D s ,s∈1,2,…p,D c They correspond to the blocks of the first type diagonal matrix D respectively.
[0106] In step 1043, Ω is calculated. s The local number of each node in Ω s Each node in the matrix has a node number based on the order of all nodes in the original admittance matrix. and To calculate the equivalent resistance, you need to number it according to and The structure is converted into a local number. Let Ω s The number of a node in is i s , N q ,q=1,2,…p is the dimension of the block matrix corresponding to the node, then the local number of the node is:
[0107]
[0108] In step 1044, according to Ωs The local number of each node in constructs the corresponding right-hand side term. s For each node in , after calculating its local number using formula (18), its right-hand column vector can be constructed. The dimension of this vector is the same as the corresponding The dimensions of are the same, and all components are 0 except for the local numbered ones.
[0109] In the embodiment of the present invention, it is assumed that Ω s A node in the global number is i s According to formula (18), we can get its value in Ω s The local number in set up The matrix dimension of Then construct a Vector satisfy
[0110]
[0111] here express The kth component of .
[0112] In step 1045, the block equivalent resistance is calculated. s Each node in is constructed according to 1042 and And the right-hand side term constructed by 1044 is used to calculate the block equivalent resistance using the following formula (20).
[0113]
[0114] HereX s is an intermediate matrix, Yes X s The transpose of .
[0115] In the above description, since each Ω s , and as well as They are all independent, so the calculation of the corresponding equivalent resistance can be distributed to each thread or multiple machines, realizing multi-threaded or distributed equivalent resistance calculation, which greatly improves the efficiency of calculating equivalent resistance in large-scale resistance networks.
[0116] The following is further explained through a specific example.
[0117] In this example, for a given large-scale resistor network, the resistor network is processed according to the above steps 101-104:
[0118] Execute step 101 to establish an admittance matrix. The admittance matrix of the resistor network is given according to MNA, and the ground node is deleted, so the matrix is non-singular. Let the matrix be A, and its dimension N=1288586.
[0119] Execute step 102 to partition the admittance matrix A and obtain the matrix information after partitioning. Use the matrix partitioning software metis to sort and partition the matrix A into a BBD structure, as shown in formula (5). At this time, there are 128 bot layers and 1 top layer, that is, p = 128. Its non-zero element distribution is as follows Figure 3 shown.
[0120] By partitioning we can obtain p bot matrices A i,i ,i=1,…,p,p port matrices A c,i ,i=1,…,p,p port matrices A i,c ,i=1,…,p and 1 top matrix A c,c Matrix, where c=p+1.
[0121] At the same time, we get p internal point sets I i ,i=1,…,p and a set of boundary points I c .
[0122] refer to Figure 4 , the dimensions of the bot matrix and the top matrix after partitioning are given. From the figure, we can see that the dimensions of all bot matrices are roughly around 10,000, while the top matrix is only more than 2,000.
[0123] Execute step 103 to perform LDL on the admittance matrix A. T Decomposition. This process is carried out in the standard BBD structure matrix decomposition method. Finally, the matrix block forms in the above formulas (8) and (9) are obtained. The first type of lower triangular matrix L includes, {L i ,i=1,…,p},{L ci ,i=1,…,p},{P i ,i=1,…,p} and L c With P c , a total of 3p+2 block matrices. The first type of diagonal matrix D, including, {D i ,i=1,…,p} and D c , a total of p+1 block matrices. i ,P i ,D i , i=1,…,p} Each matrix is obtained by using the above formula (10), {L ci , i=1,…,p} is obtained by using formula (11), and L c , Dc With P c It is calculated using formulas (12) and (13).
[0124] Execute step 104 to calculate the many-to-one equivalent resistance. Randomly select 1000 nodes, that is, calculate the equivalent resistance between these 1000 nodes and the ground. These nodes form a set as shown in formula (14): Ω = {i 1 ,i 2 ,…,i m}, where m = 1000. We choose the reference node to be the ground.
[0125] Referring to step 1041, according to the set I of the plurality of nodes obtained s ,s=1,2,…,p,c, assign the nodes to be calculated to their respective interior point blocks and port blocks according to their numbers and matrix partitioning. In this example, according to the aforementioned 128 internal node sets I i and 1 port node set I c , divide the 1000 nodes in Ω into different sets according to their numbers, and get the node set Ω to be found s ,s=1,…,p and c form 128+1=129 subsets, which is the form of formula (15).
[0126] Referring to step 1041, in order to solve the set Ω s The equivalent resistance of the mid-node is constructed by using equations (16) and (17) and diagonal matrix Each bot layer and top layer needs to be constructed, so a total of 128+1=129 sets need to be constructed and
[0127] It should be noted that for the bot layer and the top layer and The matrix structure is different. For the sth bot layer, and In addition to its corresponding LDL T The decomposed L s , L cs , P s and D s , including the LDL corresponding to the top layer T Decompose to get L c , P c and D c For the top layer, only its corresponding LDL is included T Decompose to get L c , P c and Dc .
[0128] Referring to step 1043, Ω is calculated. s The local number of all nodes. This local number is used to construct the right-hand side term for calculating the equivalent resistance. Since the original large matrix has been divided into small blocks, the number of the right-hand side term must also be converted from the global number to the local number within each small block.
[0129] In this example, the numbers of the 1000 nodes need to be renumbered according to the small blocks they are in using formula (18).
[0130] Refer to step 1044 to construct the right-hand side term. In order to calculate the equivalent resistance in each block, it is necessary to use the local number calculated in step 1043 to construct the right-hand side term column vector, the dimension of which is the triangular matrix corresponding to the block The dimension of is, except for the components where they are numbered as 1, the rest are all 0, as described by formula (19). In this example, we need to construct 1000 right-hand side terms.
[0131] Referring to step 1045, the block equivalent resistance is calculated. In this example, all 1000 nodes are divided into 129 groups. We traverse each group, use the lower triangular matrix and diagonal matrix corresponding to each group obtained above, and then traverse the right-hand side items corresponding to the nodes to be calculated in each group for calculation.
[0132] For a specific set of nodes Ω s For example, using step 1042, we get and Traversing Ω s The equivalent resistance is calculated for each node on the right side. Here we assume that one of the right side terms is Since the reference point is the ground, we can use formula (20) to calculate Then the equivalent resistance can be expressed as
[0133] It should be emphasized that the traversal of each group is completely independent, so multi-threading and distributed methods can be used to improve computing efficiency.
[0134] In order to verify the accuracy of this method, we use the direct method to calculate the equivalent resistance of 1000 nodes based on the original matrix without block division, and then compare it with the equivalent resistance calculated by this method using the block division method. The error is defined as:
[0135]
[0136] Here R 0 is a vector of 1000 equivalent resistors obtained by calculating equivalent resistance without dividing them into blocks.1 It is a vector composed of 1000 equivalent resistors obtained by the block calculation method of this method.
[0137] refer to Figure 5 , and the comparison results of the equivalent resistance calculated by the two are given. Figure 5 (a) is an equivalent resistance comparison chart given according to the original numbering. In order to see the difference between the two more clearly, we reorder the original numbers. The new order ensures that the equivalent resistance calculated by the non-blocking method is arranged from small to large. Figure 5 (b). It can be clearly seen that the two agree well. Moreover, the error of the equivalent resistance obtained by the above formula is 1.7×10 -10 , which shows the accuracy of this method.
[0138] Example 2
[0139] In an embodiment of the present invention, an electronic device is also provided. Figure 6 Schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Figure 6 As shown, the electronic device of the present invention includes a processor 601 and a memory 602, wherein:
[0140] The memory 602 stores a computer program. When the computer program is read and executed by the processor 601 , the computer program executes the steps in the above-mentioned method embodiment for calculating equivalent resistance by blocks.
[0141] In an embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the steps in the above-mentioned method embodiment for calculating equivalent resistance in blocks when running.
[0142] In this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0143] Those skilled in the art can understand that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention is described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions recorded in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for calculating equivalent resistance in blocks, characterized in that: The following steps are involved: Build the admittance matrix of the resistor network; Partitioning and sorting the admittance matrix to obtain a plurality of block matrices and node sets; Perform LDL on the partitioned admittance matrix T Decompose to obtain a lower triangular matrix of the first kind and a diagonal matrix of the first kind; For nodes that need to calculate equivalent resistance, according to their numbers in the node set, they are allocated to the corresponding interior point block matrix and the top-level block matrix to obtain a node set to be calculated; According to the first-type lower triangular matrix and the first-type diagonal matrix, construct a second-type lower triangular matrix and a second-type diagonal matrix of each of the block matrices; Calculate the local numbers of all nodes in the node set to be found, and construct a right-hand column vector; Each node in the set of nodes to be determined is traversed, and its equivalent resistance is calculated according to the second lower triangular matrix and the second diagonal matrix in which the node is located, and the right end column vector.
2. The method for calculating equivalent resistance by blocks according to claim 1, characterized in that: The step of establishing the admittance matrix of the resistor network further comprises: Establish the admittance matrix of the resistor network by using the nodal analysis method; The rows and columns corresponding to the ground node in the admittance matrix are deleted to form a non-singular admittance matrix.
3. The method for calculating equivalent resistance by blocks according to claim 1, characterized in that: The step of dividing and sorting the admittance matrix to obtain a plurality of block matrices and node sets further comprises: Dividing the admittance matrix into a BBD structure by matrix partitioning software to obtain a multi-layer block admittance matrix; From the multi-layer block admittance matrix, information of each block matrix and a plurality of corresponding node sets is obtained, wherein the node sets are mutually non-intersecting point sets.
4. The method for calculating equivalent resistance by blocks according to claim 1, characterized in that: The second type of lower triangular matrix is expressed as: The second type of diagonal matrix is expressed as: in, represents a lower triangular matrix of the second kind, represents a diagonal matrix of the second kind, s∈1,2,…p,c; P s L s , L cs ,s∈1,2,…p,P c L c Corresponding to the blocks of the first type lower triangular matrix, D s ,s∈1,2,…p,D c They correspond to blocks of the first kind of diagonal matrix respectively.
5. The method for calculating equivalent resistance by blocks according to claim 1, characterized in that: The local numbering is represented as: in, Represents the local number of the node, i s is the number of the node in the set of nodes to be requested, where s = 1, 2, ... p, c, p represents the number of blocks, N q , q=1, 2, ...p is the dimension of the block matrix corresponding to the node.
6. The method for calculating equivalent resistance by blocks according to claim 5, characterized in that: The right-hand column vector is expressed as: in, Represents the right-hand column vector The kth component of represents the local number of the node, is the dimension of the second type lower triangular matrix.
7. The method for calculating equivalent resistance by blocks according to claim 1, characterized in that: The step of traversing each node in the set of nodes to be determined and calculating its equivalent resistance according to the second lower triangular matrix and the second diagonal matrix and the right end column vector in which the node is located further includes: Use the following formula to calculate the block equivalent resistance R s : Among them, X s is an intermediate matrix, Yes X s The transpose of represents the constructed lower triangular matrix of the second kind, yes The inverse matrix of is the local number of each node, p represents the number of divided blocks, represents the constructed diagonal matrix of the second kind, yes The inverse matrix of .
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor is used to execute the computer program stored in the memory to implement the above-mentioned method steps for calculating equivalent resistance in blocks.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which is loaded and executed by a processor to implement the method steps of calculating equivalent resistance in blocks as described above.
Citation Information
Patent Citations
Method for calculating equivalent resistance between nodes in resistance network
CN117391031A
Method and apparatus for determining the performance of nets of an integrated circuit design on a semiconductor design automation system
US5469366A