A method for calculating equivalent resistance in blocks
By dividing the resistor network into blocks and using LDLT decomposition, the problem of high computational cost for large-scale resistor networks is solved, and efficient equivalent resistance calculation is achieved.
Patent Information
- Application Number
- CN202411605622.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2044-11-12
AI Technical Summary
The calculation of the equivalent resistance of large-scale resistive networks is extremely costly, resulting in low efficiency in circuit simulation.
The resistive network is divided into multiple independent small blocks, and the equivalent resistance is calculated in a distributed or multi-threaded manner. By establishing the admittance matrix, performing LDLT decomposition, constructing the lower triangular matrix and the diagonal matrix, calculating the local numbering and constructing the right-hand term column vector, and finally traversing the nodes to calculate the equivalent resistance.
It improves the efficiency of equivalent resistance calculation for large-scale circuits, reduces computational costs, and is suitable for distributed and multi-threaded environments.
Smart Images

Figure CN119578318B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of analog circuit EDA technology, and in particular to a method for calculating equivalent resistance in blocks. Background Technology
[0002] Equivalent resistance calculation for resistive networks is widely used in EDA (Electronic Design Automation) research areas such as analog circuit simulation, network sparsification, power network voltage drop analysis, and layout circuit extraction. Because post-simulation of circuits needs to consider parasitic parameters of the layout, the scale of circuit simulations has increased dramatically, with circuits containing hundreds of millions or even billions of nodes being common, making the computational cost of circuit simulation enormous. To perform equivalent resistance calculations for circuits of this scale, the circuit needs to be divided into many blocks, and the originally huge computational cost needs to be distributed or multi-threaded. Summary of the Invention
[0003] To address the shortcomings of existing technologies, the present invention aims to provide a method for block-based calculation of equivalent resistance. This method solves the problem of high computational cost in calculating the many-to-one equivalent resistance of large-scale resistor networks and meets the needs of distributed and multi-threaded computation.
[0004] To achieve the above objectives, the present invention provides a method for calculating equivalent resistance in blocks, comprising the following steps:
[0005] Establish the admittance matrix of the resistor network;
[0006] The admittance matrix is divided and sorted to obtain multiple block matrices and node sets;
[0007] Perform LDL on the partitioned admittance matrix T Decomposition yields a lower triangular matrix of the first kind and a diagonal matrix of the first kind.
[0008] For nodes whose equivalent resistance needs to be calculated, they are assigned to the corresponding internal point block matrix and the top-level block matrix according to their numbers in the node set, thus obtaining the set of nodes to be calculated.
[0009] Based on the first type of lower triangular matrix and the first type of diagonal matrix, construct the second type of lower triangular matrix and the second type of diagonal matrix for each of the block matrices;
[0010] Calculate the local indices of all nodes in the set of nodes to be determined, and construct the right-hand column vector;
[0011] Traverse each node in the set of nodes to be determined, and calculate its equivalent resistance based on the second type lower triangular matrix and the second type diagonal matrix in which it is located, as well as the right-hand column vector.
[0012] Furthermore, the step of establishing the admittance matrix of the resistive network further includes: establishing the admittance matrix of the resistive network by nodal analysis, deleting the rows and columns corresponding to the reference points being ground nodes in the admittance matrix to form a non-singular admittance matrix.
[0013] Furthermore, the step of partitioning and sorting the admittance matrix to obtain multiple block matrices and node sets further includes:
[0014] The admittance matrix is divided into a BBD structure using matrix partitioning software to obtain a multi-layered block admittance matrix.
[0015] Information about each block matrix and multiple corresponding node sets is obtained from the admittance matrix of the multi-layer block, wherein the node set is a set of points that do not intersect.
[0016] Furthermore, the second type of lower triangular matrix is represented as:
[0017]
[0018] The second type of diagonal matrix is represented as:
[0019]
[0020] in, This represents a lower triangular matrix of the second kind. Let s represent 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 These correspond to the blocks of the first type of lower triangular matrix, D s ,s∈1,2,…p,D c These correspond to the blocks of the first type of diagonal matrix.
[0022] Furthermore, the local numbering is represented as follows:
[0023]
[0024] in, Indicates the local number of the node, i s Let s be the node's index in the set of nodes to be determined, where s = 1, 2, ..., p, c, p represents the number of blocks, and N is the node's index in the set of nodes to be determined. q ,q=1,2,…p is the dimension of the block matrix corresponding to the node.
[0025] Furthermore, the right-hand term column vector is represented as:
[0026]
[0027] in, Represents the right-hand column vector The kth component, s = 1, 2, ..., p, c represent the local numbers of the nodes. Let be the dimension of the second type of lower triangular matrix.
[0028] Furthermore, the step of traversing each node in the set of nodes to be determined, and calculating its equivalent resistance based on its corresponding lower triangular matrix of the second kind and diagonal matrix of the second kind, as well as the right-hand column vector, further includes:
[0029] The block equivalent resistance R is calculated using the following formula. s :
[0030]
[0031] Among them, X s It is an intermediate matrix. It is X s The transpose of, where This represents the constructed lower triangular matrix of the second kind. yes The inverse matrix, This is the local number of each node, and p represents the number of blocks. This represents the constructed diagonal matrix of the second kind. yes The inverse matrix.
[0032] To achieve the above objectives, the present invention also provides an electronic device, including 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 objectives, the present invention also provides a computer-readable storage medium storing a computer program that 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 this invention has the following advantages compared with the prior art:
[0035] By dividing a large-scale resistor network into independent small blocks and performing equivalent resistance calculations independently in each block, the huge computational cost can be distributed to each thread or machine, thereby improving the efficiency of equivalent resistance calculation for large-scale circuits.
[0036] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. Attached Figure Description
[0037] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0038] Figure 1 This is a flowchart of a method for calculating equivalent resistance in blocks according to an embodiment of the present invention;
[0039] Figure 2 This is a flowchart illustrating the calculation of multiple-to-one equivalent resistance according to an embodiment of the present invention.
[0040] Figure 3 This is a diagram showing the distribution of non-zero elements in the admittance matrix A according to an embodiment of the present invention.
[0041] Figure 4 This is a dimensionality distribution diagram of the bot layer matrix and top layer matrix after block division according to an embodiment of the present invention;
[0042] Figure 5 This is a comparison diagram of the effects of calculating the equivalent resistance without block division and calculating it with block division according to an embodiment of the present invention;
[0043] Figure 6 This is a schematic diagram of an electronic device structure according to an embodiment of the present invention. Detailed Implementation
[0044] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0045] Embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. While some embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the invention. It should be understood that the accompanying drawings and embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the invention.
[0046] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based 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". Definitions of other terms will be given in the description below.
[0047] It should be noted that the concepts of "first" and "second" may be mentioned in this invention only to distinguish different devices, components or parts, and are not used to limit the order of the functions performed by these devices, components or parts or their interdependence.
[0048] It should be noted that the terms "one" and "multiple" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless explicitly stated otherwise in the context, they should be understood as "one or more". "Multiple" should be understood as two or more.
[0049] In embodiments of the present invention, a method for calculating equivalent resistance in blocks is provided, comprising: establishing an admittance matrix of a resistance network; dividing and sorting the admittance matrix to obtain multiple block matrices and node sets; and performing LDL on the divided admittance matrix. T The process involves decomposition to obtain a first-type lower triangular matrix and a first-type diagonal matrix. For nodes whose equivalent resistance needs to be calculated, they are assigned to the corresponding interior block matrix and top-level block matrix based on their indices in the node set, resulting in a set of nodes to be calculated. Based on the first-type lower triangular matrix and the first-type diagonal matrix, a second-type lower triangular matrix and a second-type diagonal matrix are constructed for each block matrix. The local indices of all nodes in the set of nodes to be calculated are calculated, and the right-hand column vector is constructed. Each node in the set of nodes to be calculated is traversed, and its equivalent resistance is calculated based on its corresponding second-type lower triangular matrix, second-type diagonal matrix, and the right-hand column vector.
[0050] Example 1
[0051] Figure 1 The following is a flowchart of a method for calculating equivalent resistance in blocks according to an embodiment of the present invention, which will be referred to below. Figure 1 The method for calculating equivalent resistance in blocks according to the present invention is described in detail.
[0052] In step 101, the admittance matrix is established.
[0053] In embodiments of this invention, for a large-scale resistive network, its admittance matrix is established using Modified Nodal Analysis (MNA). Since it is a resistive network, the sum of the elements in each row of this admittance matrix is equal to 0, therefore the admittance matrix is singular. To ensure the non-singularity of the solution matrix, it is necessary to delete the row and column corresponding to a certain node in this admittance matrix. In many-to-one equivalent resistance calculations, the row and column where the reference point is located can be deleted to form a non-singular matrix. In actual circuit calculations, the row and column corresponding to ground nodes are usually deleted, and the many-to-one equivalent resistance calculation 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 differ, which is not within the scope of this invention. In embodiments of this invention, we refer to the non-singular matrix formed in this way as A, and let its dimension be N.
[0054] It should be noted that for small to medium-sized resistive networks, calculating the equivalent resistance between all nodes and a specific node typically involves either the direct method or the Takahashi algorithm. The basic process of the direct method is as follows:
[0055] Let A be the admittance matrix. Since it is a purely resistive network, A satisfies symmetry, and we can perform LDL on A. T break down.
[0056] Right now
[0057] P T AP = LDL T (1)
[0058] Let A in formula (1) have dimension N, L be a lower triangular matrix with a diagonal of 1, and D be a diagonal matrix. P is a permutation matrix used to sort the rows and columns of A to ensure that matrix L has less padding.
[0059] To calculate the equivalent resistance between the i-th node and the j-th node, an N-dimensional unit vector e needs to be constructed. i and e j A unit vector is a vector whose one component is 1 and all other components are 0. For example: e i It is a vector whose only component is 1 and all other components are 0, that is:
[0060]
[0061] Here e i (k) represents the vector e i The k-th component. Similarly, e can be defined. j .
[0062] Then, vector X is solved 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] The equivalent resistance between the i-th and j-th nodes can be calculated as follows:
[0065] R ij =(X i -X j ) T D -1 (X i -X j (4)
[0066] For large-scale resistor networks, treating the admittance matrix A as a single unit according to the above calculations will lead to efficiency and memory issues. The admittance matrix A must be partitioned into a BBD (bordered block diagonal) structure. Transforming a sparse matrix into a BBD structure can be achieved using partitioning and sorting software, such as Metis.
[0067] The following is the case where matrix A is divided into two layers:
[0068]
[0069] Here A i,j They are all matrix blocks, x i and r i Let i be 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, resulting in the pattern shown in formula (5), which is the BBD form. Dividing the matrix is equivalent to grouping the nodes, that is, dividing the nodes into multiple disjoint sets, I1, I2, ..., I... p and I c Where I1, I2, ..., I p For internal nodes, I c These are the boundary nodes. The resulting admittance matrix is also divided into several blocks, where A... i,i The i = 1, ..., p layer is called the bot layer (bottom layer). c,c For the top layer (top level), A c,i A i,c i = 1, ..., p represents the port layer. The bot layer A... i,i The formation originates from the internal nodes I after matrix partitioning.i The interaction between them, A c,c Originating from boundary point I c The interaction between them, A c,i and A c,i Originating from internal node I i and boundary point I c The interaction between them.
[0070] If A i,i If the size of the matrix i = 1, ..., p is still very large, then A can be further divided according to the BBD method described above. i,i Matrix. This process can continue indefinitely, forming a multi-layered structure. Based on the admittance matrix A, the BBD structure, and 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, sorted, and the partition information is extracted. The admittance matrix A is partitioned and sorted to obtain the partitioned matrix information.
[0072] In the embodiments of the present invention, the admittance matrix A can be divided into a BBD structure using matrix partitioning software (such as Metis). For ease of description in this embodiment, we assume that this matrix is partitioned into a structure similar to formula (5), that is, divided into two layers: a bot layer (bottom layer) and a top layer (top layer), which contains 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: block matrix A of layer bot 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 Let i = 1, ..., p, and the set of boundary nodes be I. c That is, all nodes are divided into sets of points that do not overlap.
[0076] It should be noted that, in addition to dividing it into two layers, it is also possible to divide it into more layers, that is, for A... i,iThe matrix, i = 1, ..., p, is then partitioned using a similar process described above. For example, matrices of millions to tens of millions in size are typically divided into three layers: the bottom layer, the middle layer, and the top layer. Larger matrices, to suit distributed computing, can be divided into four layers, and so on. Those skilled in the art will understand that the equivalent resistance calculation for matrices with more layers can be performed similarly to that for matrices with two layers.
[0077] In step 103, LDL is performed on the admittance matrix. T Decomposition. Since it is a resistive network, its admittance matrix A satisfies symmetry, that is:
[0078] A = A T (6)
[0079] Solving an asymmetric matrix typically requires LU decomposition. Since A satisfies symmetry, LDL can be applied to A. T Decomposition, that is:
[0080] A = LDL T (7)
[0081] Since A has been divided into a top layer and a bottom layer, the resulting lower triangular matrix L of the first kind and the diagonal matrix D of the first kind also need to be written in block form, that is:
[0082]
[0083]
[0084] For the bot layer, the block matrix A of the bot layer is obtained by modifying the admittance matrix A. i,i Perform LDL T Decomposition yields L i D i and P i :
[0085]
[0086] According to LDL T Definition of decomposition, L i It is a lower triangular matrix with a diagonal of 1, D i It is a diagonal matrix, P i These are permutation matrices, all of which have dimension N. i A i,i The dimension of.
[0087] L ci It can be represented as:
[0088]
[0089] L ci It is Nc ×N i Matrix, here N c It is A c,c The dimension of.
[0090] For the top layer, first calculate the Schur complement matrix of the top layer, i.e.
[0091]
[0092] Then, the Schur complement matrix S... c Perform LDL T Decomposition
[0093]
[0094] According to LDL T Definition of decomposition, L c It is a lower triangular matrix with a diagonal of 1, D c It is a diagonal matrix, P c These are permutation matrices, all of which have dimension N. c A c,c The dimension of.
[0095] Thus, through formulas (10)-(13), we can obtain the expressions for all blocks in (8) and (9) from the block expression (5) of the original admittance matrix A. Note that L and D constructed in this way satisfy formula (7), which does not formally contain the P matrix.
[0096] In step 104, the many-to-one equivalent resistance is calculated. Here, "many-to-one" means that there are multiple nodes relative to a certain reference node.
[0097] In embodiments of the present invention, the user needs to provide a set of multiple nodes to be computed, such as:
[0098] Ω={i1,i2,…,i m} (14)
[0099] The number of nodes to be calculated is m. Note that matrix A is formed by removing the reference point.
[0100] Figure 2 This is a flowchart illustrating the calculation of multiple-to-one equivalent resistance according to an embodiment of the present invention. Figure 2 As shown, in step 1041, based on the set I of multiple nodes s For nodes s = 1, 2, ..., p, c, based on their numbers and the information from the admittance matrix partitioning, the nodes to be computed are assigned to the corresponding interior blocks and top-layer blocks in the admittance matrix, forming the set Ω of nodes to be computed. sThat is, dividing the known Ω into multiple disjoint sets.
[0101] Ω=Ω1∪Ω2…∪Ω p ∪Ω c (15)
[0102] Formula (15) satisfies s = 1, 2, ..., p, c.
[0103] In step 1042, construct the second type of lower triangular matrix for each block. Second type diagonal matrix To solve for the set Ω s The equivalent resistance of the middle node is used to construct the second-type lower triangular matrix 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 D corresponds to the blocks of the first type of lower triangular matrix L, respectively. s ,s∈1,2,…p,D c These correspond to the blocks of the first type of diagonal matrix D.
[0106] In step 1043, calculate Ω s Local numbering of each node in Ω. s Each node in the matrix is numbered based on the sorting of all nodes in the original admittance matrix, and we need to utilize... and To perform equivalent resistance calculations, their numbers need to be arranged according to... and The structure is transformed into local numbering. Let Ω s The node number is i s N q Let q = 1, 2, ..., p be the dimension of the block matrix corresponding to the node, then the local index of the node is:
[0107]
[0108] In step 1044, according to Ω s Construct the corresponding right-hand term using the local numbering of each node in Ω. s For each node in the array, after calculating its local number using formula (18), its right-hand column vector can be constructed. The dimension of this vector is related to the corresponding... The dimension is the same, and its components are all 0 except for the one that is 1 at its local index.
[0109] In embodiments of the present invention, Ω is set s A node in the network has a global number of i. s According to formula (18), its value in Ω is obtained. s The local number in is set up The dimension of the matrix is Then construct a vector satisfy
[0110]
[0111] here express The kth component.
[0112] In step 1045, calculate the block equivalent resistance. Iterate through Ω... s Each node in the array is constructed based on 1042. and And the right-hand term constructed by 1044 is used to calculate the block equivalent resistance using the following formula (20).
[0113]
[0114] Here X s It is an intermediate matrix. It is X s The transpose of .
[0115] In the above description, due to each Ω s , and as well as Since they are all independent, the calculation of the equivalent resistance can be distributed to various threads or multiple machines, realizing multi-threaded or distributed calculation of equivalent resistance and greatly improving the efficiency of calculating equivalent resistance in large-scale resistor networks.
[0116] The following specific example further illustrates this point.
[0117] In this example, for a given large-scale resistor network, the resistor network is processed according to the process described in steps 101-104 above:
[0118] Perform step 101 to establish the admittance matrix. The admittance matrix of this resistive network is given by the MNA, and the ground nodes have been removed, therefore this matrix is non-singular. Let this matrix be A, with dimension N = 1288586.
[0119] Step 102 is executed to partition the admittance matrix A and obtain the information of the partitioned matrix. The matrix A is then sorted and partitioned into a BBD structure using the matrix partitioning software Metis, as shown in formula (5). At this point, there are 128 bot layers and 1 top layer, i.e., p = 128. Its non-zero element distribution is as follows: Figure 3 As shown.
[0120] By partitioning, we can obtain p Bot matrices A. i,i A contains p port matrices A, i = 1, ..., p. c,i A contains p port matrices A, i = 1, ..., p. i,c ,i=1,…,p and a top matrix A c,c A matrix, where c = p + 1.
[0121] Simultaneously obtain p internal point sets I i i = 1, ..., p and a set of boundary points I c .
[0122] refer to Figure 4 The figure shows the dimensions of the bot matrix and top matrix after partitioning. As can be seen from the figure, the dimensions of all bot matrices are approximately 10,000, while the top matrix has only about 2,000 dimensions.
[0123] Execute step 103 to perform LDL on the admittance matrix A. T Decomposition. This process is performed according to the standard BBD matrix decomposition method. The final result is the matrix block form shown in formulas (8) and (9) above. 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 There are a total of 3p+2 block matrices. The first kind of diagonal matrix D includes {D} i ,i=1,…,p} and D c There are a total of p+1 block matrices. {L i ,P i D i Each matrix, i = 1, ..., p, is obtained using the above formula (10), {L ci The expression i = 1, ..., p} is obtained using formula (11), while L c D c With P c It is calculated using formulas (12) and (13).
[0124] Perform step 104 to calculate the many-to-one equivalent resistance. Randomly select 1000 nodes, i.e., calculate the equivalent resistance between these 1000 nodes and ground. These nodes form a set as shown in formula (14): Ω={i1,i2,…,i m Here, m = 1000. We choose the ground as the reference node.
[0125] Referring to step 1041, based on the obtained set I of multiple nodes s Let s = 1, 2, ..., p, c. Assign the nodes to be computed to their respective internal node blocks and port blocks based on their numbers and the matrix partitioning. In this example, based on the aforementioned set I of 128 internal nodes... i and a set of 1 port node I c The 1000 nodes in Ω are assigned to various sets according to their numbers, resulting in the set of nodes to be determined, Ω. s ,s=1,…,p and c, forming 128+1=129 subsets. That is, the form of formula (15).
[0126] Referring to step 1041, in order to solve for set Ω s The equivalent resistance of the mid-node is obtained by constructing a lower triangular matrix using formulas (16) and (17). and diagonal array Each bot layer and top layer needs to be constructed, resulting in a total of 128 + 1 = 129 sets. and
[0127] It is important to note the difference between the bot layer and the top layer. and The matrix structures are different for the s-th bot layer. and In addition to including its corresponding LDL T L obtained from decomposition s L cs P s and D s It also includes the LDL corresponding to the top layer. T Decomposition yields L c P c and D c For the top layer, only its corresponding LDL is included. T Decomposition yields L c P c and D c .
[0128] Refer to step 1043 to calculate Ω. sThe local numbering of all nodes. This local numbering is used to construct the right-hand side of the calculation of the equivalent resistance. Since the original large matrix has been divided into smaller blocks, the numbering of the right-hand side must also be changed from the global numbering to the local numbering within each smaller block.
[0129] In this example, formula (18) is used to renumber the 1000 nodes according to the sub-blocks they belong to.
[0130] Referring to step 1044, construct the right-hand term. To calculate the equivalent resistance in each block, the right-hand term column vector needs to be constructed using the local number calculated in step 1043. The dimension of this vector is the triangular matrix corresponding to that block. The dimension of is such that all its components are 0 except for those at their index, which are 1, as described in formula (19). In this example, we need to construct 1000 right-hand terms.
[0131] Referring to step 1045, calculate the block equivalent resistance. In this example, all 1000 nodes are divided into 129 groups. We iterate through each group, using the lower triangular matrix and diagonal matrix obtained earlier for each group, and then iterate through the right-hand side of the nodes to be calculated in each group to perform the calculation.
[0132] For a specific set of nodes Ω s In other words, by using 1042 steps, we can obtain and Traversing Ω s The equivalent resistance is calculated for the right-hand side term corresponding to each node. Let's assume one of the right-hand side terms is... Since the reference point is the ground, formula (20) can be used to calculate first. Then the equivalent resistance can be expressed as:
[0133] It is important to emphasize that the traversal of each group is completely independent, so multithreading and distributed methods can be used to improve computational efficiency.
[0134] To verify the accuracy of this method, we directly calculated the equivalent resistance of 1000 nodes based on the original matrix without block partitioning, and then compared it with the equivalent resistance calculated using the block partitioning method of this method. The error is defined as:
[0135]
[0136] Here, R0 is a vector consisting of 1000 equivalent resistances obtained by calculating the equivalent resistance without block division, and R1 is a vector consisting of 1000 equivalent resistances obtained by the block calculation method of this method.
[0137] refer to Figure 5The results comparing the equivalent resistances calculated by the two methods are presented. Figure 5 Figure (a) shows a comparison of equivalent resistances based on the original numbering. To more clearly illustrate the difference, we reordered the original numbering. The new order ensures that the equivalent resistances calculated using the non-blocking method are arranged from smallest to largest, thus obtaining... Figure 5 (b) This clearly shows that the two match very well. Furthermore, the error in the equivalent resistance obtained using the above formula is 1.7 × 10⁻⁶. -10 This demonstrates the accuracy of the method.
[0138] Example 2
[0139] In embodiments of the present invention, an electronic device is also provided. Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention, such as... 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, which, when read and executed by the processor 601, performs the steps described above in the method embodiment for calculating the equivalent resistance in blocks.
[0141] In embodiments of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to execute the steps of the method embodiment for block calculation of equivalent resistance as described above when running.
[0142] In this embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0143] It will be understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for calculating equivalent resistance in blocks, characterized in that, Includes the following steps: Establish the admittance matrix of the resistor network; The admittance matrix is divided and sorted to obtain multiple block matrices and node sets; Perform LDL on the partitioned admittance matrix T Decomposition yields a first-type lower triangular matrix and a first-type diagonal matrix; the relationship between the first-type lower triangular matrix, the first-type diagonal matrix, and the admittance matrix is: the product of the first-type lower triangular matrix and the first-type diagonal matrix, multiplied by the transpose of the first-type lower triangular matrix, equals the admittance matrix; the first-type lower triangular matrix comprises multiple blocks P. i L i L ci and P c L c The first type of diagonal matrix includes multiple blocks D i and D c Where i = 1, 2…p, p is the number of bottom-level blocks in the partitioned admittance matrix, and P i L i L c D i D c All are LDL performed using the partitioned admittance matrix. T Decomposition yields L i L c It is a lower triangular matrix with a diagonal of 1, D i D c P is a diagonal matrix. i It is a permutation matrix, and the underlying block is a block in which the internal nodes interact after the matrix is divided. c represents the index of the block originating from the action of the boundary node and c = p + 1. For nodes whose equivalent resistance needs to be calculated, they are assigned to the corresponding internal point block matrix and the top-level block matrix according to their numbers in the node set, thus obtaining the set of nodes to be calculated. The interior point block matrix is the block matrix corresponding to the set of internal nodes in the partitioned admittance matrix, and the top-level block matrix is the block matrix corresponding to the set of boundary nodes in the partitioned admittance matrix. Based on the first type of lower triangular matrix and the first type of diagonal matrix, construct the second type of lower triangular matrix and the second type of diagonal matrix for each of the block matrices; The second type of lower triangular matrix is composed of blocks P s L s L cs and P c L c The second type of diagonal matrix is composed of D s and D c Composition, s∈1,2,…p; or The second type of lower triangular matrix is composed of P c L c The second type of diagonal matrix is composed of D c Composition, s = c; Calculate the local indices of all nodes in the set of nodes to be determined, and construct the right-hand column vector; Traverse each node in the set of nodes to be determined, and calculate its equivalent resistance based on the second type lower triangular matrix and the second type diagonal matrix in which it is located, as well as the right-hand column vector.
2. The method for calculating equivalent resistance in blocks according to claim 1, characterized in that, The step of establishing the admittance matrix of the resistive network further includes: The admittance matrix of the resistance network is established using nodal analysis. Delete the rows and columns in the admittance matrix corresponding to the reference point being the ground node to form a non-singular admittance matrix.
3. The method for calculating equivalent resistance in blocks according to claim 1, characterized in that, The step of partitioning and sorting the admittance matrix to obtain multiple block matrices and node sets further includes: The admittance matrix is divided into a BBD structure using matrix partitioning software to obtain a multi-layered block admittance matrix. Information about each block matrix and multiple corresponding node sets is obtained from the admittance matrix of the multi-layer block, wherein the node set is a set of points that do not intersect.
4. The method for calculating equivalent resistance by blocks according to claim 1, characterized in that, The second type of lower triangular matrix is represented as: The second type of diagonal matrix is represented as: in, This represents a lower triangular matrix of the second kind. Let s represent 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 These correspond to the blocks of the first type of lower triangular matrix, D s ,s∈1,2,…p,D c These correspond to the blocks of the first type of diagonal matrix.
5. The method for calculating equivalent resistance in blocks according to claim 1, characterized in that, The local number is represented as: in, Indicates the local number of the node, i s Let s be the node's index in the set of nodes to be determined, where s = 1, 2, ..., p, c, p represents the number of blocks, and N is the node's index in the set of nodes to be determined. q ,q=1,2,…p, where is the dimension of the block matrix corresponding to the node.
6. The method for calculating equivalent resistance in blocks according to claim 5, characterized in that, The right-hand column vector is represented as follows: in, Represents the right-hand column vector The kth component, s = 1, 2, ..., p, c, represents the local numbering of the node. Let be the dimension of the second type of lower triangular matrix.
7. The method for calculating equivalent resistance in 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 based on its lower triangular matrix of the second kind and the diagonal matrix of the second kind, as well as the right-hand column vector, further includes: The block equivalent resistance R is calculated using the following formula. s : Among them, X s It is an intermediate matrix. It is X s The transpose of, where This represents the constructed lower triangular matrix of the second kind. yes The inverse matrix, This is the local ID of each node, and p represents the number of blocks in the partition. This represents the constructed diagonal matrix of the second kind. yes The inverse matrix.
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 configured to execute the computer program stored in the memory to implement the method steps of block calculation of equivalent resistance as described in any one of claims 1-7.
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 block calculation of equivalent resistance as described in any one of claims 1-7.
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