Numerical Method for Calculating the Terms of the Closed System Determinant in Two-Graph Representation of Electronic Circuits Marian Pierzchała1 and Benedykt Rodanski2 Abstract − This paper describes a cancellation-free method for obtaining symbolic transmittances of electronic circuits. The method is numerical and is based on the original modification of the Binet-Cauchy theorem, applied to the closed system determinant in two-graph representation of a circuit. We also introduce a new compact notation of symbolic expressions, called the road map. 1 INTRODUCTION It is a widely held view, that the two-graph tree enumeration technique is the most suitable method for symbolic analysis of large analog circuits that cannot be partitioned hierarchically in an efficient way, such as complex operational amplifiers [1]. This technique operates on two weighted graphs, the voltage graph GV and the current graph GI. Usually, the two graphs are constructed over the so-called ‘closed system’ (or ‘augmented circuit’), i.e., a circuit in which the independent signal source was replaced by a dependent source, controlled by the output variable. This allows us to obtain the desired transmittance by calculating a single determinant [2]. It is well known that the determinant of the Node Admittance Matrix of the closed system is equal to the algebraic sum of the weights of all common spanning trees of GV and GI. The original method works only for networks containing resistors, capacitors, inductors and voltage-controlled current sources (RLC-gm networks). When other elements are present, some preliminary network transformations might be required [2]. Clearly, the original two-graph method requires an algorithm that enumerates common spanning trees. Several tree enumeration algorithms have been reported in literature [2-5]. The two graphs are constructed by inspection of the circuit. The weight of each edge in these graphs is equal to the admittance of the corresponding element in the circuit. The absolute value of a term is equal to the product of the weights of the edges of a common spanning tree. The sign of a term is determined using topological information [5]. 1 Another approach is also possible. If the augmented circuit is described by a hybrid equation, the system determinant is equal to unity plus the algebraic sum of terms that are always products of equal number of admittances and impedances (so the determinant is unitless). This approach was first suggested in [6]. A similar method was later described in [2]. In this paper we describe a method for determining the terms of the closed system determinant of the R,L,C,E,I,DS networks (R,L,C,E,I,DS stand for resistors, inductors, capacitors, independent voltage and current sources and all types of dependent sources). Our technique is numerical and is based on the original modification of the Binet-Cauchy theorem [6]. It requires only a topological procedure for finding out the fundamental loop and the fundamental cut-set matrices. The method operates on the symbols of newly defined matrices ( PB TV and PTCI ) whose elements are the products of impedance and admittance corresponding to each non-zero element of the fundamental loop and the fundamental cut-set matrices. The sign of each determinant term is obtained directly by calculating the value of easily formulated, unimodular determinants. Efficiency is further improved by the fact that for product terms involving only passive elements we calculate only one unimodular determinant. If dependent sources are present in a product term, we must calculate two determinants, one from the loop matrix and the other from the cut-set matrix. The algorithm consists of a generation procedure in which terms are “grown” without duplication by adding elements of the product matrix ( PB TV or PTCI ), one element at a time. Every time an element is added, it is tested whether it causes the appropriate submatrices of the fundamental loop and fundamental cut-set matrices to be singular. If any submatrix is singular, then the most recently added element of the product matrix is removed and another element is examined. Institute of Telecommunication, Teleinformatics and Acoustics, Wrocław University of Technology (WUT), Wrocław, Poland. E-mail: [email protected] 2 Faculty of Engineering, University of Technology, Sydney (UTS), P.O. Box 123, Broadway, NSW 2007, Australia. E-mail: [email protected] In addition, we introduce a new notation of symbolic expressions called the road map. This notation has the advantage that in the process of repetitive evaluation of transfer function for the analysed network we do not have to calculate the whole expression but only to update the terms which are changed. Moreover, the method generates the symbolic network function in a cancellation-free form. 2 SYMBOLIC FORMULAE FOR RLC-gm NETWORKS The networks to be considered here are connected, linear, time-invariant active or passive networks modeled with immittances and voltage-controlled current sources only. (If other types of controlled sources are present, an extension of the two-graph method, proposed in [7], should be used.) It is assumed that any independent current source has been replaced by a dependent current source controlled by the desired output variable, thus forming a closed system. Such network will be represented topologically by a linear graph G consisting of a voltage graph GV and a current graph GI. The hybrid systems of equations for this class of networks for a complete (common) tree T is ⎡ −I ⎢B V Hx= ⎢ T ⎢ 0 ⎢ ⎣ 0 0 −I 0 YC ZT 0 −I 0 0 ⎤ 0 ⎥⎥ Q CI ⎥ ⎥ −I ⎦ ⎡ vT ⎤ ⎢v ⎥ ⎢ C ⎥ =0 ⎢ iT ⎥ ⎢ ⎥ ⎣ iC ⎦ (1) where the first and the last rows consist of tree (T) and cotree (C) element functions and the second and third rows consist of fundamental circuit and fundamental cut-set equations for GV and GI, respectively. The matrices ZT and YC are diagonal, I is an identity matrix of an appropriate order. The associated primitive signal-flow graph F(H) of the hybrid systems of equations (1) is shown in Fig. 1. B TV vC vT Q iT ) ) Y ⎤⎦ ( = det ⎡ I + B TV Z T −Q CI ⎣ (2) C For a given matrix B TV ( QCI ) of order m×n (n×m) let B TV ( I u , J v ) [ Q CI ( J v , I u ) ] be the submatrix of B TV ( Q CI ) consisting of the rows and columns corresponding to the integers in the sets Iu and Jv, respectively, where Iu = {i1, i2, …, iu} and Jv = {j1, j2, …, jv} are subsets of Sm = {1, 2, …, m} and Sn = {1, 2, …, n}. Using a modification of the Binet-Cauchy theorem [6], we have det(H ) = 1 + ∑∑ Z ( I1 ) ( J1 ) Y Ti1 C j1 det[B TV ( I1 , J1 )]det[TCI ( I1 , J1 )] 2 + ∑ ∑ ∏ ( ZT YC ) det[B TV ( I 2 , J 2 )]det[TCI ( I 2 , J 2 )] ik ( I 2 ) ( J 2 ) k =1 jk s + … + ∑ ∑∏ ( ZT YC ) det[B TV ( I s , J s )]det[TCI ( I s , J s )] ( I s ) ( J s ) k =1 ik jk (3) where: s = min(m,n), TCI ( I u , J v ) = ⎡⎣ −Q CI ( J v , I u ) ⎤⎦ t and the summations are taken over all possible subsets Iu, and Jv. Although the formula (2) is obtained topologically, the procedure for its evaluation (3) is purely B TV ( I x , J x ) numerical [all submatrices and TCI ( J x , I x ) are unimodular] and no sign rule is required. The network in this method is described by a closed signal-flow graph, thus the numerator and denominator of the desired transfer function are calculated in a single process. For the analysis of large electronic circuits, the formula (3) should be expressed in another form. Namely, we can group the terms related to non-zero elements of the matrix B TV ( −Q CI ). In order to do this, the new matrices - the product matrices PB TV and PTCI - must be defined first. Definition 1: The product matrices PB TV and PTCI are obtained YC ZT ( det(H ) = det I − B TV Z T Q CI YC I C iC Fig. 1. A primitive signal-flow graph of (1). Thus, from Fig. 1, we can write the expressions for the graph determinant: from matrices B TV and TCI as follows: i) Give the names Y(i) [Z(i)] and Z(j) [Y(j)] to the ith row and jth column of B TV ( TCI ), ii) Substitute symbol bij ← sgn Y(i) Z(j) [tij ← sgn Z(i) Y(j)] for each non-zero element of the matrix B TV ( TCI ), where ‘sgn’ is equal to the sign of this non-zero element. □ From Definition 1, using the matrix TCI , we can obtain a simpler form of (3) n1 2 2 n2 det(H ) =1 + ∑ sgn(i ) ti + ∑ sgn(i ) ∏ ti + … i =1 i =1 ns s i =1 k =1 k =1 k 8 + ∑ sgn(i ) ∏ ti 3 5 4 7 8 1 1 (a) k (4) where: n1 – number of non-zero elements in TCI , n2 – number of representative combinations of two non-zero elements, ns – number of representative combinations of s non-zero elements, s – min(m,n); m,n – number of rows and columns in PTCI , respectively, B TV Y(1) Z(1) Z(2) Z(3) 0 −1 −1 Y(2) Y(3) Y(4) Y(5) −1 −1 0 −1 −1 −1 −1 −1 0 0 −1 −1 −Q CI Y(1) Y(2) Y(3) Y(4) Y(5) Z(1) Z(2) Z(3) −1 −1 −1 0 −1 0 −1 −1 0 0 −1 −1 −1 −1 −1 Using Definition 1 we obtain the product matrices PB TV and PTCI (Table II) TABLE II Y6 Y8 + V6 - Y 5V 6 Z3 Y7 Z4 + V7 - Fig. 2. Example circuit. The linear voltage and current graphs representing the closed system are shown in Fig. 3. 7 (b) Example 1 Z2 5 4 TABLE I elements, sgn(i) = det[B TV ( I l , J l )]det[TCI ( I l , J l )] . Consider a simple circuit shown in Fig. 2. The independent current source I1 has been replaced by the current source controlled by the output variable V7 (I1 = Y1V7), thus forming the closed system. 2 The matrices B TV and −Q CI for these graphs, based on a tree T = {2,3,4}, are shown in Table I. ti – ith non-zero element in PT , tik – kth component of the product of non-zero By representative combination we mean a single combination of non-zero elements in a submatrix PTCI ( I u , J v ) which represents the determinant of this submatrix (in general, we can have a number of such combinations). Formula (4) is associated with the non-zero elements of the fundamental cut-set matrix Q CI . A similar formula can be derived, based on the fundamental loop matrix B TV . As a rule, we choose this matrix which has fewer nonzero elements. 3 Fig. 3. Linear voltage graph GV (a) and current graph GI (b) of the closed system in Fig. 2. I C I1 = Y1V7 6 6 PB TV Y(1) Y(2) Y(3) Y(4) Y(5) PTCI Y(1) Y(2) Y(3) Y(4) Y(5) Z(1) Z(2) Z(3) 0 −b12 −b13 −b21 −b31 0 −b51 −b22 −b32 −b42 −b52 0 0 −b43 −b53 Z(2) Z(3) −t11 −t12 −t13 0 −t31 0 −t51 −t22 −t32 −t42 −t52 0 0 −t43 −t53 Z(1) where: bij = Y(i)Z(j), tij = Y(i)Z(j) and Z(1) = Z2, Z(2) = Z3, Z(3) = Z4, Y(1) = Y1, Y(2) = Y5, Y(3) = Y6, Y(4) = Y7, Y(5) = Y8. Consider now the matrices shown in Table II. Calculating the determinant terms according to (4) we obtain (terms associated with the numerator of the transfer function, T = V7/I1, are marked with bold letters): det(H)=1+(+1)×t12+(+1)×t13+(+1)×t22+(+1)×t31+ (+1)×t32+(+1)×t42+(+1)×t43+(+1)×t51+(+1)×t52+ (+1)×t53+(−1)×t11t22+(+1)×t13t22+(+1)×t13t31+ (+1)×t13t32+(+1)×t22t43+(+1)×t22t53+(+1)×t31t42+ (+1)×t31t43+(+1)×t31t53+(+1)×t32t43+(+1)×t32t53+ (+1)×t42t51+(+1)×t43t51+(+1)×t22t43t51+(+1)×t31t42t53 □ The number of product terms, even in this simple matrix determinant, is large. We need therefore a compact method to represent (and store) the determinants of network functions. Before we introduce one such method, let us describe the algorithm for generating all valid terms in (4). 3 ALGORITHM FOR GENERATING VALID SYMBOL COMBINATIONS In order to implement (4) we need an algorithm to generate all symbol combinations, represented by the product terms ∏t ik . The algorithm is based on the k closely related matrices TCI and PΤCI ; for active circuits the fundamental loop matrix B TV is also needed (in the remainder we assume dealing with an active circuit). A. Basic Algorithm We start by choosing an element of PΤCI that has a corresponding nonzero in B TV . We mark its column and row as ‘used’. It becomes the first (besides the unity) term in (4). Then, we try to extend the length of the term by appending another element of PΤCI (from an ‘unused’ row and column). The new element is accepted if the sign of the extended term, as defined in (4), is ±1. The extension phase continues until the length of the current term reaches s = min(m,n). Then the algorithm switches to the exchange phase. In this phase we try to exchange the last element of the current term with another unused element of PΤCI . When there are no more elements to exchange, the sequence is shortened by removing the last element and the extension phase resumes. The algorithm alternates between extension and exchange, until a single term is generated that cannot be extended nor exchanged. B. Avoiding Spurious Terms The basic algorithm, described so far, may generate spurious terms that correspond to a valid symbol combination already obtained (our experiments suggest that for large circuits, whose B TV and Q CI matrices are very sparse, such spurious terms are rare). To illustrate the possibility of generating unwanted terms, let us consider the matrix PTCI from Table II. It can be easily verified that three different terms: t31t42t53, t31t43t51 and t32t43t51 correspond to the same symbol combination: Y(3)Z(1)Y(4)Z(2)Y(5)Z(3). This is because all three terms come from the same major of PTCI , made of its last three rows. Clearly, we need to consider only one of these terms (the representative combination). To detect such situations, our algorithm calculates the permanent of the TCI submatrix, corresponding to each generated term. (The permanent of a square matrix is an analogue of a determinant where all the signs in the expansion by minors are taken as positive. Therefore, the permanent of a unimodal matrix is equal to the number of nonzero terms in the determinant expansion.) If the permanent is greater than one, we check the list of permanents of this order and either reject the term or accept the term as a representative combination and append its generating minor to the list (validation phase). The pseudocode of our algorithm is presented below. procedure validate_term calculate the permanent of the submatrix corresponding to the term; if (permanent > 1) { if (submatrix already used) reject the term; else { accept the term; record the submatrix as used; } } else accept the term; procedure extension while (length of term < s) and (element available) { extend the term by adding an unused element; if (sign ≠ 0) validate_term; else remove the last element from the term; } procedure exchange sign = 0; while (element available) and (sign = 0) { exchange the last element in the term with the next unused element; if (sign ≠ 0) validate_term; } procedure term_generation term = NULL; do { extension; exchange; } while length of term > 0 C. Relationship to Common Spanning Tree Generation Although our algorithm and the common spanning tree generation algorithm are not related, the final results of both algorithms are related very closely. The result of applying the common tree enumeration algorithm to graphs GV and GI is a sequence of unique tree admittance product terms. Now, choose any common tree and divide every term of the sequence by the admittance product of the chosen tree. The resulting sequence will have identical terms (generally, in different order) as the sequence obtained by our method applied to matrices B TV and −Q CI , based on the same tree. have to calculate the whole determinants but only to update the terms which are affected by the change. Moreover, our method generates the symbolic network functions in a cancellation-free form. To illustrate the method we shall introduce an implicit representation for the product terms in the matrix determinants, called a road map. The det(H) of the circuit in Fig. 2 can be represented by the road map, shown in Fig. 4. In this map each term of the determinant is represented by the road. Each road has the number and its unique label. Formally, a road map is a signed, directed, acyclic graph with paralleledges. The graph contains n vertices and the root, and the end vertices. The number of vertices n is equal to the number of nonzero elements in PTCI or PB TV (we choose the matrix with fewer nonzeros). The road map is represented by a collection of linked lists of destinations (Table III). Each road number is complemented by a symbol: N for the roads related to the numerator and D for the roads related to the denominator of the transfer function. Each road label L represents a symbolic expression La;Lb, defined as follows: 1) If X is a terminal vertex of the road, then La is denoted by E and Lb is equal to the sign of the determinant term (±1), 2) If X is a non-terminal vertex of the road, then La represents the next vertex and Lb is denoted by P. 4 THE ROAD MAP REPRESENTATION OF A DETERMINANT As the number of terms in network determinants grows exponentially with the network size, it is essential that a compact scheme is employed to efficiently store and retrieve the terms. Several methods for compact representation of network determinants have been reported in the literature. One such scheme generates a nested expression, based on the sparse recursive Laplace expansion of determinant with minor storage [8]. More recently a method was proposed that consists of representing the symbolic determinant of a circuit by a graph – called a determinant decision diagram (DDD) – and performing symbolic analysis by graph manipulation [9]. The DDD method offers significant improvement over previously used techniques, utilising fully expanded (as opposed to nested or hierarchical) formulae. In existing methods the process of generation of a symbolic network function is very complicated and one must calculate the entire network function if a single circuit element is changed. In this paper we propose a method of generation of symbolic network functions which is very simple and has the advantage that in the process of the repetitive evaluation of transfer function for the analysed network we do not 2D;L 11D;L 12D;L 3N;L 13D;L 19D;L 1D;L START 1N;L 9D;L t11 10D;L t12 2N;L 3D;L 14D;L 15D;L 5N;L t13 4N;L t22 6N;L 10D;L 4D;L 5D;L 17D;L 9D;L 18D;L 16D;L 12D;L 11D;L 19D;L 13D;L 6D;L 4N;L 5N;L 6N;L 18D;L 3N;L t31 8D;L t32 14D;L 15D;L t42 t43 17D;L 18D;L t51 19D;L 16D;L t53 t52 7D;L Fig. 4. The road map of the determinant of the example circuit in Fig. 2 (without the end vertex). TABLE III Start RN L 1N 1,1;P 2N 1,2;P 3N÷6N 1,3;P 1D÷4D 2,2;P 5D÷9D 3,1;P 10D÷12D 3,2;P 13D÷14D 4,2;P 15D÷16D 4,3;P 17D 5,1;P 18D 5,2;P 1.1 1.2 RN L RN L 1N 2,2;P 2N E;1 5.3 RN L 4D E;1 7D E;1 9D E;1 12D E;1 1.3 2.2 3.1 3.2 RN L RN L RN L RN L 3N E;1 1N E;-1 5N E;1 6N E;1 4N 2,2;P 4N E;1 5D E;1 10D E;1 5N 3,1;P 1D E;1 6D÷7D 4,2;P 11D 4,3;P 6N 3,2;P 2D÷3D 4,3;P 8D 4,3;P 12D 5,3;P 4D 5,3;P 9D 5,3;P 4.3 5.1 4.2 RN L RN L 5.2 RN L RN L 2D E;1 3D E,1 6D E;1 3D 5,1;P 14D E;1 18D E;1 7D 5,3;P 8D E;1 16D E;1 15D E;1 13D E;1 Each road between the start vertex and the terminal vertex represents one term of the determinant det(N) or det(D) and is equal to a product of symbols tmn (bmn) of those labels that are lying along this road. For example, the road 3D has the following labels: (2,2;P→4,3;P→5,1→P;E;1), and the corresponding determinant term is equal to +t22 t43 t51. The above list of destinations (Table III) has the advantage that in the process of repetitive evaluation of transfer function for the analyzed network, we do not have to calculate the whole determinants but only to update the terms which are changed. For example, if we change the value of Y5 (only element t22 will be affected), we must recalculate only the terms related to the following roads: - for the numerator: 1N, 4N, - for the denominator: 1D, 2D, 3D, 4D. With a view to simplicity of calculations, the immitances are best represented in the exponential form: Ya = |Ya|·exp(jφa), Zb = |Zb|·exp(jφb). In this case calculation of both individual symbols tij = YaZb and the product of symbols tij…tkl is very simple. 5 CONCLUSION This paper introduced a new graph-based representation of exact symbolic network functions for analogue networks, called a road map. Although the formulae are topological, the procedures for their generation are purely numerical. For the sake of notational simplicity the road map is represented by a collection of linked lists of destinations. This notation has the advantage that in the process of repetitive evaluation of transfer function for the analyzed network we do not have to calculate the whole expression but only to update the terms which are changed. The method is based on the two-graph representation of electronic circuits and a modification of the Binet-Chauchy theorem. Thus, this method can guarantee that cancellation of terms does not occur. References [1] P. Wambacq, G.G.E. Gielen and W. Sansen, “Symbolic network analysis methods for practical analog integrated circuits: A survey,” IEEE Trans. Circuits & Systems II, vol. 45, pp. 13311341, Oct. 1998. [2] P.-M. Lin, Symbolic Network Analysis. New York. Elsevier, 1991. [3] H.N. Gabow and E.W. Myers, “Finding all spanning trees of directed and undirected graphs,” SIAM J. Comput., vol. 7, no. 3, pp. 280287, Aug. 1978. [4] S.R. Schach, “Efficient algorithm for common spanning tree problem,” Electron. Lett., vol. 19, no. 9, pp. 346-347, Apr. 1983. [5] P. Wambacq et al., “Symbolic analysis of large electronic circuits using a sensitivity-driven enumeration of common spanning trees,” IEEE Trans. Circuits & Systems II, vol. 45, pp. 13421350, Oct. 1998. [6] M. Pierzchała, “Modification of the BinetCauchy theorem,” Applicationes Mathematicae, vol. XVII, no. 1(1980), pp. 131-141 (in Russian). [7] M. Pierzchała and B. Rodanski, “Two-graph stamps for linear controlled sources,” in Proc. SMACD 2004, pp. 41-44, Wrocław, Poland. [8] G. Gielen and W. Sansen, Symbolic Analysis for Automated Design of Analog Integrated Circuits. Boston. Kluwer, 1991. [9] C.-J.R. Shi and X.-D. Tan, “Canonical symbolic analysis of large analog circuits with determinant decision diagrams,” IEEE Trans. on CAD of Integrated Circuits and Systems, vol. 19, no. 1, pp. 1-18, Jan. 2000.
© Copyright 2026 Paperzz