Algorithm Search⌘K

Problemcore

Symbolic circuit analysis

Also called symbolic analysis of analog circuits.

Compute network functions of a linear or linearized circuit as expressions in the symbolic element values, to give designers insight into which parameters matter.

Symbolic circuit analysis is the problem of computing a network function of a linear circuit, for example a voltage gain, as a formula in the frequency variable ss and in the names of some or all element values, not as numbers. Its topic is symbolic circuit analysis, one of the five topics of this sub-area. The input is usually the small-signal circuit of an analog block at its operating point, and the formula tells a designer which elements set a gain, a pole or a zero. The hard part is size: the expanded formula can have a number of terms that grows exponentially with the circuit.

In plain words

A circuit simulator answers with numbers: at this frequency, the gain is this much. A designer often wants to know why. Which transistor sets the gain? Which capacitor sets the bandwidth? A formula in the names of the parts answers these questions, because you can read which names appear and how.

Symbolic analysis produces such a formula. It writes the circuit equations with names in place of numbers and solves them by algebra. The answer is a fraction: a sum of products of names, divided by another sum of products.

For a small circuit the formula is short and useful. For a larger circuit the number of products explodes, and a full formula is too long to read. Exact methods store it in a compact shared form. Approximate methods keep only the products that matter.

Definition

Input. A linear time-invariant circuit with nn nodes besides ground: resistors, capacitors, inductors and the four kinds of controlled sources, for example the small-signal model of an analog circuit. Each element value is a symbol or a number, and the set X={x1,…,xp}X = \{x_1, \ldots, x_p\} holds the symbols. An input port and an output port (an independent source and a node voltage or branch current).

Equations. Modified nodal analysis in the Laplace domain gives a square system

Y(s,X) v=b,Y(s, X) \, v = b,

where each entry of YY is a sum of terms ±x\pm x, ±sx\pm s x or ±x/s\pm x / s, or of numbers times such terms. For a current II that enters node ii, b=Ieib = I e_i. By Cramer's rule, the voltage of node jj gives

H(s,X)=vjI=Cij(s,X)det⁡Y(s,X),H(s, X) = \frac{v_j}{I} = \frac{C_{ij}(s, X)}{\det Y(s, X)},

where Cij=(−1)i+jMijC_{ij} = (-1)^{i+j} M_{ij} is the cofactor and MijM_{ij} the minor of YY without row ii and column jj.

Output. The network function HH as a ratio of two polynomials in ss and XX. In the expanded form, both are written as

N(s,X)=∑ksk∑t∈Tkct∏x∈tx,D(s,X)=∑ksk∑t∈Ukdt∏x∈tx,N(s, X) = \sum_k s^k \sum_{t \in T_k} c_t \prod_{x \in t} x, \qquad D(s, X) = \sum_k s^k \sum_{t \in U_k} d_t \prod_{x \in t} x,

with numeric coefficients ct,dtc_t, d_t, after all cancellations. The size of the output is the number of terms ∑k∣Tk∣+∑k∣Uk∣\sum_k |T_k| + \sum_k |U_k|.

Objective. Exact analysis must return HH exactly, in some agreed form. Approximate analysis must return a shorter H^\hat H whose error is at most a given ε\varepsilon at a given nominal point of the element values, with the error defined on the coefficients of each power of ss or on ∣H(jω)∣|H(j\omega)| over a band.

Variants

  • Fully symbolic or partly symbolic. All element values are symbols, or only some, with numbers for the rest. In the limit, only ss is a symbol, and the output is a numeric rational function of ss, which is the output of AC small-signal analysis in a closed form.
  • Expanded or nested form. The expanded form is a flat sum of products, and the nested form keeps sums inside products, as in (a+b)(c+d)(a + b)(c + d). A nested form can be exponentially shorter, but the reader cannot see the size of each term in it.
  • Exact or approximate. See approximate symbolic analysis.
  • Element-level or entry-level symbols. A symbol for each element value gives the formula a designer wants. A symbol for each entry of YY gives a shorter determinant expansion, but each entry is a sum of element values, and the terms must then be expanded again.
  • Small-signal or large-signal. The problem is defined for linear circuits. A nonlinear circuit is first linearized at an operating point, so the formula is valid only for small signals near that point.

Examples

A two-node amplifier. Node 1 has a conductance G1G_1 to ground, and a current source II drives it. A capacitor CfC_f joins nodes 1 and 2. A transconductance gmg_m draws the current gmv1g_m v_1 out of node 2, and a conductance GLG_L joins node 2 to ground. This is the small-signal model of a common-source stage with a feedback capacitor. The nodal system is

(G1+sCf−sCfgm−sCfGL+sCf)(v1v2)=(I0).\begin{pmatrix} G_1 + s C_f & -s C_f \\ g_m - s C_f & G_L + s C_f \end{pmatrix} \begin{pmatrix} v_1 \\ v_2 \end{pmatrix} = \begin{pmatrix} I \\ 0 \end{pmatrix}.

The product of the diagonal gives G1GLG_1 G_L, sCfG1s C_f G_1, sCfGLs C_f G_L and s2Cf2s^2 C_f^2. The off-diagonal entries give +sCfgm+ s C_f g_m and −s2Cf2- s^2 C_f^2, and the last one cancels s2Cf2s^2 C_f^2. So

H(s)=v2I=−(gm−sCf)G1GL+s Cf(G1+GL+gm).H(s) = \frac{v_2}{I} = \frac{-(g_m - s C_f)}{G_1 G_L + s \, C_f (G_1 + G_L + g_m)}.

The formula shows at a glance what a simulation does not: a zero in the right half plane at s=gm/Cfs = g_m / C_f, and one pole whose time constant grows with gmg_m, which is the Miller effect. With G1=100 μSG_1 = 100\ \mu\mathrm{S}, GL=10 μSG_L = 10\ \mu\mathrm{S}, gm=1 mSg_m = 1\ \mathrm{mS} and Cf=1 pFC_f = 1\ \mathrm{pF}, the low-frequency value is −gm/(G1GL)=−106 Ω-g_m / (G_1 G_L) = -10^6\ \Omega, the pole is at −9.009×105-9.009 \times 10^5 rad/s and the zero is at 10910^9 rad/s.

A ladder. A ladder of nn nodes has an admittance yiy_i from each node ii to ground, and a conductance gig_i between nodes ii and i+1i + 1. A current II enters node 1, and the output is vnv_n. The cofactor is g1g2⋯gn−1g_1 g_2 \cdots g_{n-1}, one term. The determinant, expanded in the element values, has F2nF_{2n} terms, where FkF_k is the kk-th Fibonacci number:

nodes nn 1 2 3 5 10 20
terms of det⁡Y\det Y 1 3 8 55 6,765 102,334,155

For n=2n = 2, det⁡Y=y1y2+y1g1+y2g1\det Y = y_1 y_2 + y_1 g_1 + y_2 g_1. If each yi=Gi+sCiy_i = G_i + s C_i is also expanded, the counts for n=1n = 1 to 5 are 2, 8, 30, 112 and 418.

Known algorithms

  • Determinant expansion. Expand det⁡Y\det Y and CijC_{ij} by Laplace expansion or by elimination. ISAAC (Gielen, Walscharts and Sansen 1989) used this kind of method on a nodal matrix and is exact, apart from its optional pruning. The time is at least the number of terms.
  • Tree enumeration. For a circuit of admittances only, each term of det⁡Y\det Y is a spanning tree of the circuit graph with ground (see the Bounds). Enumerating spanning trees gives the terms with no cancellation. Controlled sources need a pair of graphs, one for currents and one for voltages, and common trees of the two. Exact.
  • Signal-flow graphs. Write the equations as a signal-flow graph and apply Mason's gain formula, which sums over paths and sets of loops that do not touch. Exact, but the loop sums can produce terms that cancel.
  • Determinant decision diagrams (Shi and Tan 2000). Store the determinant and its cofactors as one shared graph, with one path for each term. Exact, and the graph can be exponentially smaller than the list of terms.
  • Approximate symbolic analysis. Prune the circuit or the matrix before the expansion, prune the search during the expansion, or prune the terms after it, under an error bound at a nominal point. The result is short, and its error bound holds only at that point.

Bounds

Lower bound from the output size. An algorithm that writes the expanded form needs time at least the number of terms. For the ladder, this number is F2n=Θ(φ2n)F_{2n} = \Theta(\varphi^{2n}), with φ2=(3+5)/2≈2.618\varphi^2 = (3 + \sqrt 5)/2 \approx 2.618. So the expanded form of an exact answer takes exponential time and space on this family, whatever the method.

Proof that the ladder has F2nF_{2n} terms. The ladder is a circuit of admittances, so YY is the weighted Laplacian matrix of the circuit graph with the ground row and column removed. The circuit graph has the ground and nn nodes, edges yiy_i from ground to each node, and edges gig_i between nodes ii and i+1i + 1. By the weighted matrix-tree theorem, det⁡Y\det Y is the sum, over all spanning trees of this graph, of the product of the weights of the tree's edges. Different trees have different edge sets, so with distinct symbols they give different monomials, each with coefficient +1+1, and nothing cancels. So the number of terms is the number of spanning trees, which is det⁡Y\det Y with every weight equal to 1.

With weights 1, YY is tridiagonal with −1-1 off the diagonal. For n=1n = 1 it is (1)(1), with determinant 1=F21 = F_2. For n≥2n \ge 2 its diagonal is (2,3,…,3,2)(2, 3, \ldots, 3, 2). Let PkP_k be the determinant of the k×kk \times k tridiagonal matrix with diagonal (2,3,…,3)(2, 3, \ldots, 3) and −1-1 off the diagonal. Expansion along the last row gives Pk=3Pk−1−Pk−2P_k = 3 P_{k-1} - P_{k-2} for k≥2k \ge 2, with P0=1=F1P_0 = 1 = F_1 and P1=2=F3P_1 = 2 = F_3. The Fibonacci numbers satisfy Fm+2=Fm+1+Fm=2Fm+Fm−1=3Fm−Fm−2F_{m+2} = F_{m+1} + F_m = 2F_m + F_{m-1} = 3 F_m - F_{m-2}, so Pk=F2k+1P_k = F_{2k+1} by induction. Expansion of YY along its last row gives det⁡Y=2Pn−1−Pn−2=2F2n−1−F2n−3=F2n−1+F2n−2=F2n\det Y = 2 P_{n-1} - P_{n-2} = 2F_{2n-1} - F_{2n-3} = F_{2n-1} + F_{2n-2} = F_{2n}. □\square

What is polynomial. The number of terms of an admittance-only circuit is a determinant with weights 1, so it can be counted in polynomial time by Gaussian elimination, without listing the terms. The value of HH at given numbers takes O(n3)O(n^3) arithmetic operations. A nested form exists with polynomial size: the steps of Gaussian elimination on the symbolic matrix, kept as a sequence of O(n3)O(n^3) expressions, compute det⁡Y\det Y wherever no pivot is zero. A determinant decision diagram is also exact, but its size depends on the matrix and the order of its entries, and it is exponential for a dense matrix.

Reductions

  • To determinants. By Cramer's rule, a network function is a ratio of a cofactor and the determinant of the MNA matrix. Each is the determinant of a square matrix with polynomial entries. So exact symbolic analysis reduces to the symbolic determinant of a sparse matrix.
  • To spanning trees. For a circuit of admittances, the determinant is the weighted spanning tree polynomial of the circuit graph, by the matrix-tree theorem. So exact analysis of such a circuit reduces to the enumeration of spanning trees.
  • From numeric AC analysis. Numeric AC analysis at one frequency is the special case with no symbols, solved by sparse LU in place of expansion.

Applications

  • Insight in design. The formula shows which elements set the gain, the poles, the zeros and the rejection ratios of an amplifier, and how.
  • Equations for sizing. Approximate symbolic formulas give fast models of the performance of a topology, which an analog circuit sizing tool can evaluate many times.
  • Repeated evaluation. A compiled exact formula or a determinant decision diagram evaluates the response for many values of the elements, for example in a Monte Carlo loop or a sensitivity analysis, without a new LU factorization each time.
  • Teaching and checking. A short formula checks a hand analysis, and a hand analysis checks a simulator.

References

  1. G. Gielen, H. Walscharts and W. Sansen, ISAAC, a symbolic simulator for analog integrated circuits, IEEE Journal of Solid-State Circuits 24(6), 1587 to 1597, December 1989, the program ISAAC, its symbolic network functions in s and the element values, and the pruning of small terms
  2. Georges Gielen and Willy Sansen, Symbolic Analysis for Automated Design of Analog Integrated Circuits, Kluwer Academic Publishers, 1991, the chapters on the formulation of the circuit equations, the symbolic solution methods and the expanded and nested forms
  3. P. Wambacq, G. Gielen and W. Sansen, Symbolic network analysis methods for practical analog integrated circuits, a survey, IEEE Transactions on Circuits and Systems II 45(10), 1331 to 1341, October 1998, the classes of exact methods (determinant, tree enumeration, signal-flow graph) and the growth of the number of terms
  4. C.-J. R. Shi and X.-D. Tan, Canonical symbolic analysis of large analog circuits with determinant decision diagrams, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 19(1), 1 to 18, January 2000, exact analysis of large circuits through a shared graph of the determinant

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a known algorithm
  • a contract.yaml