Jacobi-Davidson methods and preconditioning with applications in pole-zero analysis

Similar documents
RANA03-02 January Jacobi-Davidson methods and preconditioning with applications in pole-zero analysis

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department ofmathematics and Computing Science

Jacobi-Davidson methods and preconditioning with applications in pole-zero analysis Rommes, J.; Vorst, van der, H.A.; ter Maten, E.J.W.

Algorithms for Periodic Steady State Analysis on Electric Circuits

The application of preconditioned Jacobi-Davidson methods in pole-zero analysis

QUESTION BANK SUBJECT: NETWORK ANALYSIS (10ES34)

Notes for course EE1.1 Circuit Analysis TOPIC 4 NODAL ANALYSIS

Notes for course EE1.1 Circuit Analysis TOPIC 10 2-PORT CIRCUITS

Identification of Electrical Circuits for Realization of Sparsity Preserving Reduced Order Models

4/27 Friday. I have all the old homework if you need to collect them.

Basic. Theory. ircuit. Charles A. Desoer. Ernest S. Kuh. and. McGraw-Hill Book Company

AN INDEPENDENT LOOPS SEARCH ALGORITHM FOR SOLVING INDUCTIVE PEEC LARGE PROBLEMS

Advanced Computational Methods for VLSI Systems. Lecture 4 RF Circuit Simulation Methods. Zhuo Feng

Stability and Passivity of the Super Node Algorithm for EM Modeling of IC s

BEHAVIORAL MODELING AND TRANSIENT ANALYSIS WITH ANALOG INSYDES

Automatic Formulation of Circuit Equations

Iterative Methods. Splitting Methods

Parallel VLSI CAD Algorithms. Lecture 1 Introduction Zhuo Feng

REUNotes08-CircuitBasics May 28, 2008

ELECTRONICS E # 1 FUNDAMENTALS 2/2/2011

Some of the different forms of a signal, obtained by transformations, are shown in the figure. jwt e z. jwt z e

6. MESH ANALYSIS 6.1 INTRODUCTION

Network Graphs and Tellegen s Theorem

A New Simulation Technique for Periodic Small-Signal Analysis

Domain decomposition on different levels of the Jacobi-Davidson method

Course Notes: Week 1

An Efficient Graph Sparsification Approach to Scalable Harmonic Balance (HB) Analysis of Strongly Nonlinear RF Circuits

Module 2. DC Circuit. Version 2 EE IIT, Kharagpur

Chapter 2. Engr228 Circuit Analysis. Dr Curtis Nelson

Sinusoidal Steady State Analysis (AC Analysis) Part I

First-order transient

Vector and Matrix Norms. Vector and Matrix Norms

Chapter 28. Direct Current Circuits

CHAPTER 5 STEADY-STATE ANALYSIS OF THREE-PHASE SELF-EXCITED INDUCTION GENERATORS

Inductance, Inductors, RL Circuits & RC Circuits, LC, and RLC Circuits

Physics 112. Study Notes for Exam II

Physics 116A Notes Fall 2004

Numerical Methods in Matrix Computations

Linear Solvers. Andrew Hazel

ECE2262 Electric Circuit

THERE are numerous number of products powered by

Electric Current. Note: Current has polarity. EECS 42, Spring 2005 Week 2a 1

Basics of Network Theory (Part-I)

Review of matrices. Let m, n IN. A rectangle of numbers written like A =

Sinusoids and Phasors

Review: control, feedback, etc. Today s topic: state-space models of systems; linearization

Iterative Methods for Solving A x = b

CHAPTER 6 STEADY-STATE ANALYSIS OF SINGLE-PHASE SELF-EXCITED INDUCTION GENERATORS

2005 AP PHYSICS C: ELECTRICITY AND MAGNETISM FREE-RESPONSE QUESTIONS

EE292: Fundamentals of ECE

CHAPTER 2 LOAD FLOW ANALYSIS FOR RADIAL DISTRIBUTION SYSTEM

Kirchhoff's Laws and Circuit Analysis (EC 2)

Differential Equations and Linear Algebra Supplementary Notes. Simon J.A. Malham. Department of Mathematics, Heriot-Watt University

f = 1 T 6 a.c. (Alternating Current) Circuits Most signals of interest in electronics are periodic : they repeat regularly as a function of time.

Switched Mode Power Conversion Prof. L. Umanand Department of Electronics Systems Engineering Indian Institute of Science, Bangalore

Next topics: Solving systems of linear equations

Introduction to Applied Linear Algebra with MATLAB

14.2 QR Factorization with Column Pivoting

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences)

LINEAR ALGEBRA: NUMERICAL METHODS. Version: August 12,

AC Circuit Analysis and Measurement Lab Assignment 8

An Equivalent Circuit Formulation of the Power Flow Problem with Current and Voltage State Variables

Lecture #3. Review: Power

/$ IEEE

11. AC Circuit Power Analysis

Quiescent Steady State (DC) Analysis The Newton-Raphson Method

Matrix Assembly in FEA

Sinusoidal Steady State Analysis (AC Analysis) Part II

Response of Second-Order Systems

CHAPTER 2 DYNAMIC STABILITY MODEL OF THE POWER SYSTEM

Numerical Methods. Elena loli Piccolomini. Civil Engeneering. piccolom. Metodi Numerici M p. 1/??

Solution of Linear Equations

In this lecture, we will consider how to analyse an electrical circuit by applying KVL and KCL. As a result, we can predict the voltages and currents

Chapter 10 Sinusoidal Steady State Analysis Chapter Objectives:

To find the step response of an RC circuit

Contents. Preface... xi. Introduction...

Eindhoven University of Technology MASTER. Factorization of indefinite systems associated with RLC circuits. Rosen Esquivel, P.I.

Factorization of Indefinite Systems Associated with RLC Circuits. Patricio Rosen Wil Schilders, Joost Rommes

Solving linear equations with Gaussian Elimination (I)

Chapter 3. Loop and Cut-set Analysis

ECE 1311: Electric Circuits. Chapter 2: Basic laws


PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

A Software of Generating a Symbolic Circuit Model with Computers for Wireless Power Transmission System

5.7 Cramer's Rule 1. Using Determinants to Solve Systems Assumes the system of two equations in two unknowns

6. Iterative Methods for Linear Systems. The stepwise approach to the solution...

Designing Information Devices and Systems I Spring 2018 Lecture Notes Note 11

3 The non-linear elements

Electromagnetic Induction Faraday s Law Lenz s Law Self-Inductance RL Circuits Energy in a Magnetic Field Mutual Inductance

ET3-7: Modelling II(V) Electrical, Mechanical and Thermal Systems

The output voltage is given by,

NETWORK MATRICES. voltages through the branch impedance matrix and branch admittance matrix: ELOOP = ZLOOP ILOOP ILOOP = YLOOP ELOOP (11)

Basic RL and RC Circuits R-L TRANSIENTS: STORAGE CYCLE. Engineering Collage Electrical Engineering Dep. Dr. Ibrahim Aljubouri

EE 581 Power Systems. Admittance Matrix: Development, Direct and Iterative solutions

Chapter 7 Direct-Current Circuits

APPLIED NUMERICAL LINEAR ALGEBRA

Solving Large Nonlinear Sparse Systems

Gabriel Kron's biography here.

A Review of Linear Algebra

AC&ST AUTOMATIC CONTROL AND SYSTEM THEORY SYSTEMS AND MODELS. Claudio Melchiorri

Transcription:

Nat.Lab. Unclassified Report 2002/817 Date of issue: 05/2002 Jacobi-Davidson methods and preconditioning with applications in pole-zero analysis Master s Thesis Joost Rommes Unclassified Report

2002/817 Unclassified Report Authors address data: Joost Rommes WAY03.73; jrommes@math.uu.nl, jrommes@cs.uu.nl All rights are reserved. Reproduction in whole or in part is prohibited without the written consent of the copyright owner. ii

Unclassified Report 2002/817 Unclassified Report: 2002/817 Title: Author(s): Jacobi-Davidson methods and preconditioning with applications in polezero analysis Master s Thesis Joost Rommes Part of project: Traineeship at Philips Electronic Design and Tools/Analogue Simulation (ED&T/AS) as master s thesis project of the Utrecht University Customer: Keywords: Abstract: Pole-zero analysis, Jacobi-Davidson method, Jacobi-Davidson QR, Jacobi- Davidson QZ, preconditioning, Pstar, Eigenvalue problems, PSS, JDQR, JDQZ, QR, QZ, Arnoldi This report discusses the application of Jacobi-Davidson style methods in electric circuit simulation. Using the generalised eigenvalue problem, which arises from pole-zero analysis, as a starting point, both the JDQR-method and the JDQZ-method are studied. Although the JDQR-method (for the ordinary eigenproblem) and the JDQZ-method (for the generalised eigenproblem) are designed to converge fast to a few selected eigenvalues, they will be used to compute all eigenvalues. With the help of suitable preconditioners for the GMRES process, to solve the correction equation of the Jacobi-Davidson method, the eigenmethods are made more suitable for pole-zero analysis. Numerical experiments show that the Jacobi-Davidson methods can be used for pole-zero analysis. However, in a comparison with the direct QR and QZ methods, the shortages in accuracy for certain implementations of iterative methods become visible. Here preconditioning techniques improve the performance of the Jacobi-Davidson methods. The Arnoldi method is considered as the iterative competitor of the Jacobi- Davidson methods. Besides applications in pole-zero analysis, the Jacobi-Davidson methods are of great use in stability analysis and periodic steady state analysis. An implementation of the iterative Jacobi-Davidson methods in Pstar, respecting the hierarchy, is possible, because no dense, full-dimensional matrix multiplications are involved. A description of the hierarchical algorithm in Pstar is given. This project has been a cooperation between Philips Electronic Design & Tools/Analogue Simulation (ED&T/AS) and the Utrecht University (UU). It has been executed under supervision of Dr. E.J.W. ter Maten (ED&T/AS) and Prof.Dr. H.A. van der Vorst (UU). iii

2002/817 Unclassified Report Conclusions: The most important conclusion is that Jacobi-Davidson style methods are suitable for application in pole-zero analysis under the following assumptions, apart from the dimension of the problem: the eigenspectrum of the generalised eigenproblem must be not too wide or an efficient preconditioner must be available. If one or both of these assumptions are not met, there is no special preference for Jacobi-Davidson style methods above the (restarted) Arnoldi method. On the contrary, with the typical convergence behaviour of Jacobi-Davidson in mind, the Arnoldi method should be chosen in that case. Nevertheless, if both assumptions are met, one can profit from the quadratic convergence of the Jacobi-Davidson style methods, combined with acceptable accuracy. Arguments that Jacobi-Davidson style methods are more robust than the Arnoldi method are in this case not valid, as numerical experiments have shown. Some of these arguments are based on the current Arnoldi implementation in Pstar; some improvements for the Arnoldi implementation in Pstar are proposed. Nevertheless, Jacobi-Davidson style methods are very applicable in stability analysis and periodic steady-state analysis, where only one or a few eigenvalues are needed. For this type of applications, Jacobi-Davidson style methods are preferred over the Arnoldi method. Furthermore, Jacobi- Davidson style methods are suitable for high dimensional problems because the spectrum can be searched part by part. The Arnoldi method does lack this property. Finally, the direct QR and QZ method are superior in accuracy, robustness and efficiency for problems with relatively small dimensions. Even for larger problems, their performance is acceptable. The only disadvantage is that the direct methods do not fit in the hierarchical implementation of Pstar, while the iterative methods do. iv

Contents 1 Introduction 1 2 Basic electric circuit theory 2 2.1 Circuit terminology... 2 2.2 Kirchhoff s laws... 3 2.3 Branch constitutive relations... 3 2.3.1 Resistive components... 3 2.3.2 Reactive components... 5 2.3.3 Controlled components... 6 3 Circuit equations 7 3.1 Incidence matrix... 7 3.2 Nodal analysis... 8 3.2.1 Mathematical formulation... 8 3.2.2 Nodal admittance matrix... 10 3.2.3 Shortcomings... 10 3.3 Modified nodal analysis... 11 3.3.1 Mathematical formulation... 11 3.3.2 Matrix-vector formulation... 14 3.4 Hierarchical approach... 15 3.4.1 Hierarchical circuit equations... 16 3.4.2 Solving using the hierarchy... 19 3.4.3 Solving without using the hierarchy... 20 4 Circuit analysis 21 4.1 Direct current analysis (DC)... 21 4.2 Small signal analysis (AC)... 23 v

2002/817 Unclassified Report 4.3 Transient analysis (TR)... 25 4.4 Pole-zero analysis (PZ)... 26 4.4.1 Transfer function... 26 4.4.2 Physical applications... 27 4.4.3 Numerical strategies... 27 4.5 Stamps for the C and G matrices... 27 5 Terminal currents 29 5.1 The terminal current as unknown on the circuit level... 30 5.2 The terminal current as unknown on the sub-circuit... 31 5.3 Eliminating the terminal current on the circuit level... 32 5.4 Multi-level Newton-Raphson method... 33 6 Pole-zero analysis 35 6.1 Introduction... 35 6.2 Basic theory of pole-zero analysis... 35 6.3 Alternative formulation of the transfer function... 38 6.3.1 Elementary response... 39 6.3.2 Natural frequencies... 40 6.3.3 General response... 40 6.3.4 Eigenvalue formulation... 42 6.3.5 Eigenvalues and eigenvectors of interest... 43 6.3.6 Frequency shift... 44 6.3.7 Time domain impulse response... 44 6.4 Visualisation techniques... 45 6.4.1 Plots of poles and zeroes... 45 6.4.2 Pole-zero Bode plot... 46 6.4.3 Nyquist plot... 47 6.4.4 Resonance example... 48 6.5 Numerical methods for pole-zero analysis... 50 6.5.1 Separate pole and zero computation... 50 6.5.2 Combined pole and zero computation... 52 7 Pole-zero computation in Pstar 53 7.1 Introduction... 53 7.2 The QR method... 55 vi

Unclassified Report 2002/817 7.2.1 Algorithm... 55 7.2.2 Accuracy... 59 7.2.3 Computational notes... 59 7.2.4 Implementation notes... 59 7.3 The Arnoldi method... 60 7.3.1 Algorithm... 60 7.3.2 Accuracy... 62 7.3.3 Computational notes... 63 7.3.4 Implementation notes... 63 7.3.5 Possible improvements... 63 7.3.6 Arnoldi versus the QR method... 64 7.4 A note on condition numbers... 64 7.5 The QZ method... 64 7.5.1 Algorithm... 65 7.5.2 Accuracy... 67 7.5.3 Computational notes... 67 7.5.4 Implementation notes... 67 7.6 Cancellation of poles and zeroes... 67 8 Stability analysis 69 8.1 Introduction... 69 8.2 Complex mapping of the problem... 69 8.3 Efficient maximal eigenvalue computation... 71 8.4 Numerical results... 71 9 Jacobi-Davidson methods 74 9.1 Introduction... 74 9.2 The origin of Jacobi-Davidson methods... 74 9.2.1 Jacobi s method: JOCC... 74 9.2.2 Davidson s method... 75 9.3 The Jacobi-Davidson method... 76 9.3.1 Algorithm... 76 9.3.2 The correction equation... 78 9.4 Jacobi-Davidson QR... 79 9.4.1 Introduction... 79 vii

2002/817 Unclassified Report 9.4.2 Deflation techniques... 79 9.4.3 Preconditioning... 81 9.4.4 JDQR Algorithm... 82 9.4.5 Computational notes... 84 9.5 Jacobi-Davidson QZ... 84 9.5.1 Introduction... 84 9.5.2 JDQZ Theory... 84 9.5.3 Deflation and restarting... 86 9.5.4 Preconditioning... 86 9.5.5 Approximate solution of the deflated correction equation... 88 9.5.6 JDQZ Algorithm... 88 9.5.7 Computational notes... 91 10 Pole-zero analysis and eigenvalue computation: numerical experiments 92 10.1 Introduction... 92 10.2 Problem description... 92 10.3 Preconditioning... 93 10.3.1 Left-, right- and split-preconditioning... 93 10.3.2 Requirements... 94 10.3.3 Diagonal preconditioning... 94 10.3.4 ILUT preconditioning... 95 10.4 Test problems... 96 10.5 Test environment... 96 10.6 The ordinary eigenvalue problem... 97 10.6.1 Strategy... 97 10.6.2 Numerical results... 97 10.6.3 JDQR results for problem pz 28... 111 10.7 The generalised eigenvalue problem... 118 10.7.1 Strategy... 118 10.7.2 Numerical results... 119 10.7.3 JDQZ results for problem pz 28... 126 10.8 Application in PSS analysis... 133 10.9 Numerical conclusions... 133 11 Conclusions and future work 135 viii

Unclassified Report 2002/817 11.1 Conclusions... 135 11.2 Future work... 136 11.3 Acknowledgements... 136 References 138 A Matrix transformations and factorisations 141 A.1 Householder transformations... 141 A.2 Givens transformations... 142 A.3 QR-factorisation... 143 A.4 Schur decomposition... 143 Distribution ix

2002/817 Unclassified Report x

Chapter 1 Introduction Computer aided circuit simulation is used by many electric engineers to obtain characteristics of particular circuits, without the necessity to have a physical prototype of the circuit concerned. There are at least three factors which determine the applicability of an electric circuit simulator: the performance, the accuracy and the robustness. On the one hand, one should be able to run simulations of complicated circuits on a workstation. On the other hand, the results must be both accurate and characteristic. The simulation of an electric circuit starts by forming the system of circuit equations, which is a numerical model of the circuit. As there are several kinds of circuit analysis, several numerical methods are used to solve the system. However, the use of particular numerical methods depends on the way the simulation is implemented, i.e. using plain matrices or using a hierarchical base. Moreover, the performance and robustness of the simulator depends mainly on the numerical methods used. It is clear that the numerical methods should be chosen with all this in mind. This report will focus on numerical methods for one particular kind of circuit analysis, namely polezero analysis. The numerical formulation of a pole-zero analysis is a generalised eigenproblem. Chapter 2 handles elementary electric circuit aspects like the laws of Kirchhoff. Chapter 3 gives some approaches to systematically formulate the circuit equations, while Chapter 4 is dedicated to several kinds of circuit analysis. Chapter 5 serves as an intermezzo and discusses a special case which may arise during hierarchical analysis of certain circuits, namely terminal currents. Chapter 6 describes pole-zero analysis in detail, as well as the mathematical formulation. In Chapter 7, the numerical methods to solve the pole-zero problem currently used in Pstar are discussed. A technique to perform a stability analysis is presented in Chapter 8. Chapter 9 introduces Jacobi- Davidson style methods for the solution of the pole-zero problem. Finally, Chapter 10 presents the numerical results with the Jacobi-Davidson style methods, compared with other eigenvalue methods. Readers who are well informed on the topics arising in electric circuit simulation, such as Modified Nodal Analysis and pole-zero analysis, can skip the first chapters, except Chapter 5, and start with Chapter 7. The first chapters are advised especially for numerical scientists with minimal knowledge of electric circuit simulation. 1

Chapter 2 Basic electric circuit theory 2.1 Circuit terminology Throughout this report, electric circuits will be considered as graphs of two types of elements: nodes and branches. The branches, which are electric components like resistors and voltage sources, connect the nodes, which can be viewed as representatives of voltage potentials. Figure 2.1 shows a simple circuit consisting of 4 nodes and 5 branches. c 1 c 2 1 2 3 + j 1 l 1 r 1 Figure 2.1: A simple RLC-circuit with 4 nodes and 5 branches. 0 The electric properties of some branches, like a voltage source, require a concrete direction due to the difference between their positive and negative end node. A subgraph (sub-circuit) G s of the whole graph (circuit) G is called a loop if G s is connected (i.e. there is a path between any two nodes of the graph) and every node of G s has exactly two branches of G s incident at it[7]. Unless stated otherwise, the symbol i k will denote the current through branch k and the symbol v j will denote the voltage 2

Unclassified Report 2002/817 potential of node j. 2.2 Kirchhoff s laws A direct result of the requirement that there is no accumulation of charge in any loop, is Kirchhoff s Current Law (KCL). This law states that all currents entering a node add up to zero: Kirchhoff s Current Law (KCL): At each node, the sum of all incoming currents is equal to the sum of all outgoing currents: i k = 0. (2.1) k loop Kirchhoff s second law concerns a relationship for the branch voltages: Kirchhoff s Voltage Law (KVL): The sum of all branch voltages along any closed loop in a circuit adds up to zero: v k = 0. (2.2) k loop As the branch voltage v k is equal to the potential difference v + k v k between the two nodes the branch connects, the sum of potential differences along a closed loop must also add up to zero. This is a direct result of the fact that any loop comes back to the same node, i.e. the same voltage potential. Kirchhoff s laws are so called topological laws: they are concerned with the topology of the circuit. With the help of these laws the topological equations can be formed, which only depend on the way the branches are connected. 2.3 Branch constitutive relations The two Kirchhoff laws cover the topology of the circuit, but neglect the electrical properties of branches. The branch constitutive relations (BCR) reflect the electrical properties of branches and together with the two Kirchhoff Laws they form a complete description of the circuit. The branch equations, which result from applying the branch constitutive relations, can contain both branch variables, like the current through a branch, and expressions containing branch variables. In general, a branch equation only contains branch variables of the branch concerned. However, it is possible that branch variables associated with other branches are also included in the branch equation. Branch variables of this type are called controlling variables, making the branch a controlled branch. An example of a controlled branch is a voltage-controlled current source. 2.3.1 Resistive components Resistive components are characterised by algebraic branch equations, i.e. equations of the form: x i = f (t, x), 3

2002/817 Unclassified Report where x i R is the circuit variable concerned, x R n is a vector containing all circuit variables and f : R R n R is a function depending on one or more circuit variables. Throughout this report, the time variable will be t. Hence we exclude so called frequency-domain defined components. Resistor + Figure 2.2: A resistor. The BCR of a resistor (see Figure 2.2), in the linear case, is given by Ohm s law, V = IR, resulting in i R = V R. (2.3) More general, covering both the linear and non-linear resistor, the BCR is given by i R = i(v R ), (2.4) where v R is the potential difference between the two nodes connected by the resistor. Unless stated otherwise, a resistor is considered as a linear resistor with resistance R i and is labelled r i, with i a number. Independent current source Figure 2.3 shows an independent, ideal current source. + + Figure 2.3: An independent current source. A current source (j i ) generates a given current between its two nodes, independent of the voltage across the nodes. This generated source may be a function of time (e.g. periodic sources). The BCR of a current source becomes i I = I (t). (2.5) Note that the voltage across the source can take any value, which will be defined implicitly by the system. 4

Unclassified Report 2002/817 Independent voltage source + + Figure 2.4: An independent voltage source. An independent voltage source (e i ) supplies a given voltage (see Figure 2.4). Again, the voltage may be a function of time, so the BCR becomes v V = V (t). (2.6) Similar to the voltage across a current source, the current through the voltage source can take any value. 2.3.2 Reactive components Components that are modelled by differential equations are called reactive components. Differential branch equations are of the following form: x i = d dt f (t,x). Unless stated otherwise, the notation ẋ will be used for the time derivative dx dt of x. Capacitor An ideal capacitor (see Figure 2.5) is an electrical component which can store an amount of electrical charge (q), without loss. + Figure 2.5: A capacitor. Current through a capacitor results in a growth of the charge: i = q. The relation between the charge and the voltage across the capacitor in the general case is given by q c = q(v c ). Hence, a linear capacitor, with a (constant) capacitance C, has the following BCR: i c = q c =C v c. (2.7) A capacitor c i is in general considered to be a linear capacitor with capacity C i. Non-linear capacitors are used in the compact modelling of transistor devices (for instance modelling the behaviour of substrate coupling). 5

2002/817 Unclassified Report Inductor Where a capacitor is characterised by a relationship between the charge it stores and the voltage across it, an inductor (see Figure 2.6) is characterised by a relationship between the magnetic flux φ L and its current i L. + Figure 2.6: An inductor. Current through an inductor results in the creation of an electromagnetic voltage by self-inductance: v inductance = φ L. The actual voltage across the inductor then reads v L = φ L, with φ L = φ(i L ) in the general case. The BCR for a linear inductor with inductance L is v L = L i L. (2.8) An inductor l i is in general considered to be a linear inductor with inductance L i. 2.3.3 Controlled components Controlled components are circuit components whose BCR contain branch variables which belong to other components. The previously mentioned voltage-controlled current source (see also Figure 2.7) is a simple example of a controlled component. 0 + 1 + 2 Figure 2.7: A voltage-controlled current source. The difference between an independent current source and a purely controlled current source is the fact that its own controlling component has no concrete contribution to the BCR (i.e. i c = 0). However, the generated current is now a function of the voltage across the controlling component, so the BCR becomes i s = I (v c ). (2.9) However, mixed forms like i s = I (v s,v c )are also allowed. In principle, v c may again be controlled by i s. 6

Chapter 3 Circuit equations This chapter describes in detail how the circuit equations corresponding to a circuit can be formulated. The main part of this chapter is based on three different sources[7, 16, 18]. 3.1 Incidence matrix The two Kirchhoff Laws (2.1 and 2.2) can be represented in matrix-vector form. As these laws are topological laws, the matrix-vector form can be obtained by inspecting the topology of the circuit. The matrix is called the incidence matrix, which has the following definition[7]: Incidence matrix: The incidence matrix A R n b of a graph of n nodes and b branches is defined by 1 ifbranch j is incident at node i and node i is the positive node of j, a ij = 1 ifbranch j is incident at node i and node i is the negative node of j, (3.1) 0 ifbranch j is not incident at node i. The incidence matrix has an important property. In the case of no self-loops (i.e. the positive and negative node of a branch are not the same), each column of A exactly contains one 1, one 1 and has all other entries zero. A direct result of this property is the fact that all rows of A add up to zero (i.e. i a ij = 0). Furthermore, as the topology does not change in time, the incidence matrix neither does. The incidence matrix of the example with 4 nodes and 5 branches (figure 2.1) becomes 0 1 2 3 j 1 c 1 c 2 l 1 r 1 1 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0 0 1 0 1. (3.2) It has been stated that all rows of the incidence matrix A add up to zero. A consequence is that the rows of A are not linearly independent, so the rank of A is less than n. In fact, for a realistic circuit, which consists of one piece, it can be proven that the rank of A is n 1[7]. 7

2002/817 Unclassified Report Now let the vector V n R 4 contain the nodal voltages, arranged in the same order as the rows of A and let the vector i b R 5 contain the branch currents, arranged in the same order as the columns of A. Simple algebra shows that Ai b = 0 (3.3) at any time, which is exactly Kirchhoff s Current Law (2.1). In a similar way, it follows that A T v n = v b (3.4) at any time, where v b R 5 contains the branch voltages. It is clear that A T v n v b is another way of writing Kirchhoff s Voltage Law (2.2). These two re-formulations of the KCL and the KVL hold in general for any valid circuit. The elementary nodal analysis and the more extended modified analysis are built upon this incidence matrix, as is described in the following sections. 3.2 Nodal analysis 3.2.1 Mathematical formulation Nodal analysis uses the branch constitutive relations in combination with the KCL and KVL equations to form a system of equations for the n unknown node voltages. These branch constitutive equations, as described in section 2, will have the form i k = d dt q(t,v b) + j(t,v b ), (3.5) where i k is the current through branch k, v b R b contains the branch voltages and q, j : R R b R are functions resulting from the BCR (q represents reactive parts while j represents resistive contributions). In general, the functions q and j will depend only on their own local v b,k, but in the case of controlled components they might consider the whole vector or even more (see section 3.3). If all branch currents i k are put together in the vector i b R b, the corresponding branch equations can be presented in matrix-vector form: i b = d dt q(t,v b) + j(t,v b ), (3.6) with q, j : R R b R b. System (3.6) contains b equations for 2b unknowns, so it cannot be solved in a straightforward manner. This is the part where the rewritten KCL (3.3) and KVL (3.4) come into play, after left-multiplying system (3.6) with the corresponding incidence matrix A: i b = d dt q(t,v b) + j(t,v b ) Ai b = d dt A q(t,v b) + A j(t,v b ) 0 = d dt A q(t,v b) + A j(t,v b ) 0 = d dt A q(t, AT v n ) + A j(t, A T v n ). (3.7) 8

Unclassified Report 2002/817 The original system (3.6) is now transformed to a system of n equations with n unknowns, the nodal voltages. Note that when the nodal voltages are known, the branch voltages and the currents follow immediately. However, there still is a problem with the transformed system (3.7) and the problem lies in the incidence matrix A. The rows of A are not linearly independent, so the equation of the reformulated KCL (3.3) neither are. In fact, each equation is implied by the other n 1 equations. Knowing that rank(a)= n 1, the solution of this problem is to choose one of the unknown v n,k. Physically, this corresponds with grounding one node, i.e. setting v n,k = v k. As a result, the k-th row of A and the k-th coordinate of v n can be removed, resulting in  and ˆv n. The new system has n 1 equations for n 1 unknowns: 0 = d dt  q(t, ÂT ˆv n + v k Ae k ) +  j(t,  T ˆv n + v k Ae k ), (3.8) with e k R n the k-th unit vector. A commonly used form in circuit simulation for the branch equations and the topological Kirchhoff equations is d q(t,x) + j(t,x) = 0. (3.9) dt By defining x := ˆv n and q(t, x) :=  q(t,  T ˆv n + v k Ae k ), j(t, x) :=  j(t,  T ˆv n + v k Ae k ), the system (3.8) can be written in the form (3.9). A shorter notation can be obtained by defining f : R R n 1 R n 1 R n 1 as f(t, x, ẋ) := d dt q(t,x) + j(t,x) = t q(t,x) + (q(t,x))ẋ + j(t, x), (3.10) x resulting in the most general form f(t, x, ẋ) = 0. (3.11) Reactive branches will give contributions to q, while resistive branches will give contributions to j. Table 3.1 shows the contributions of some elements to j and q. Branch type (BCR) Node j q Current source v + I (t) (I = I (t)) v I (t) Resistor v + 1 R v+ 1 R v (i R = v+ v ) v 1 R R v+ + 1 R v Capacitor v + Cv + Cv (i C = C( v + v )) v Cv + +Cv Table 3.1: Contributions of frequently used branches to the circuit equations. Note that not all types of branches are present in the table. This is because of the fact that not all branches, for example an inductor, can be handled by nodal analysis. Section 3.2.3 will throw light on this issue. 9

2002/817 Unclassified Report 3.2.2 Nodal admittance matrix An alternative formulation of the nodal analysis method is given in [18]. The section will illustrate the method for linear circuits. The system of circuit equations is formulated as YV = I, (3.12) where Y R n n is the nodal admittance matrix, V R n contains the (unknown) node voltages and I R n contains the independent source currents. Each equation of the system reflects the KCL for a node, i.e. that the sum of all currents entering that node is zero. Consequently, the nodal admittance matrix typically contains admittances of branches, which together form the contribution of each branch to the KCL for a node. The formation of Y happens in a straightforward, constructive process, also called stamping. The basic idea is that a branch gives a positive contribution to its positive node and a negative contribution to its negative node 1. These contributions are calculated using the BCRs of Section 2.3; Table 3.2 shows the contributions of several components to the nodal admittance matrix and I. Note that again not all types of branches are present in the table. Branch type (BCR) Node v + v I Current source v + I (t) (I = I (t)) v I (t) Resistor v + 1 R 1 R (i R = v+ v R ) v 1 R Capacitor v + C C (i C = C( v + v )) v C C Table 3.2: Contributions to the nodal admittance matrix and the RHS of frequently used branches. 1 R The stars ( C ) at some places indicate that the value is dependent of the kind of analysis that is performed. Different kinds of analysis will be discussed in Chapter 4, but will be the same for all stars belonging to the same branch. Each row of Y, which reflects the KCL for a unique node, is identified by that node. Of course, these nodes appear in the same order in the vector V. Finally, I contains independent current sources which also contribute to the KCL. 3.2.3 Shortcomings Nodal analysis is a very simple approach, but suffers from a couple of shortcomings. In the first place, there is no satisfying way in which voltage sources can be handled, simply because they do not fit in the form of equation (3.5) as their branch equation is of the form v b = V. In fact, no other unknowns can be introduced besides the nodal voltages, so inductors and capacitors with unknown charge also cannot be handled by nodal analysis. In the second place, current-controlled components neither can be handled, leaving the nodal analysis to be appropriate for only current-defined voltage-controlled components. The next section describes the modified nodal analysis method, which does not suffer from these two facts. 1 This is an arbitrary choice; other choices are possible, provided that they are consequent. 10

Unclassified Report 2002/817 3.3 Modified nodal analysis 3.3.1 Mathematical formulation Besides the nodal voltages, there are other unknown variables which should be solved. It is clear that nodal analysis is not capable of handling particular kinds of components, which introduce other unknown variables. The modified nodal analysis is, as the name reads, in principle the same as nodal analysis, but has a slight modification. In general, the unknown variables of modified nodal analysis are Node voltages Voltage source currents Output currents Controlling source currents. Modified nodal analysis differs from nodal analysis in the fact that it can handle voltage-defined, current-controlled components also, i.e. branches with branch equations like v j = d dt q(t,i j) + j(t,i j ). (3.13) In practice, there are current-defined and voltage-defined branches. For the sake of types of branches, it does not matter whether a branch is current-controlled or voltage-controlled. Therefore, the vector of branch voltages, v b, and the vector of branch currents, i b, are split into two parts, v b = (v T b 1, v T b 2 ) T and i b = (i T b 1, i T b 2 ) T respectively, both of length b = b 1 + b 2. The first part of both vectors, v b1 and i b1 corresponds to current-defined branches, while the second part, v b2 and i b2 corresponds to voltage-defined branches. As a result, the incidence matrix A can also be partitioned into two parts: A = (A 1 A 2 ), with dim(a 1 ) = n b 1 and dim(a 2 ) = n b 2. In this new notation, Kirchhoff s Current Law (3.3) can be reformulated as while Kirchhoff s Voltage Law (3.4) becomes A 1 i b1 + A 2 i b2 = 0, (3.14) A T 1 v n = v b1, A T 2 v n = v b2. (3.15) As stated earlier, there are now two types of branch equations. Again using the vector notation, the branch equations become i b1 = d dt q(t,v b 1,i b2 ) + j(t,v b1,i b2 ), (3.16) v b2 = d dt q(t,v b 1,i b2 ) + j(t,v b1,i b2 ), (3.17) with q, j : R R b 1 R b 2 R b 1 and q, j : R R b 1 R b 2 R b 2. Again, like in section 3.2, using the KCL (3.14) and the KVL (3.15), this equations can be rewritten: A 2 i b2 = d dt A 1 q(t, A T 1 v n,i b2 ) + A 1 j(t, A T 1 v n,i b2 ), (3.18) A T 2 v n = d dt q(t, AT 1 v n,i b2 ) + j(t, A T 1 v n,i b2 ). (3.19) 11

2002/817 Unclassified Report However, the same problem as with nodal analysis arises: the system is undetermined. By grounding node k and proceeding the same way as in section 3.2, the following determined system can be obtained: Â 2 i b2 = d dt A 1 q(t, Â T 1 ˆv n + v k A T 1 e k,i b2 ) + Â 1 j(t, Â T 1 ˆv n + v k A T 1 e k,i b2 ), Â2 T ˆv n + v k A2 T e k = d dt q(t, ÂT 1 vv ˆ n + v k A 1 e k,i b2 ) + j(t, Â1 T vv ˆ n + v k A 1 e k,i b2 ). (3.20) This system has n 1 + b 2 equations for n 1 + b 2 unknown variables. The unknown variables are ˆv n and i b2. Finally, by taking these unknown variables as the circuit variables, this system too can be written in the general form of (3.9). Table 3.3 is an addition to Table 3.1. It covers all other branches, which could not be handled by the nodal analysis method. Branch type (BCR) Node j q Voltage source v + i V (V = V (t)) v i V i V v + v V V-def resistor v + i R (v = V (i R )) v i R i R v + v V (i R ) Capacitor v + q C (v + v ) (i C = q C (v + v )) v q C (q C unknown) q C q C Q C Inductor v + i L (v L = φ L (i L )) v i L i L v + v φ L (φ L unknown) φ L φ L L (i L ) Table 3.3: Contributions of frequently used branches to the circuit equations for modified nodal analysis. For both the capacitor and the inductor, it is sometimes the case that the charge q C and the flux φ L, respectively, are treated as unknowns. This results in an extra equation for the unknown charge and flux, where it is assumed that there is a nonlinear relation between the charge and voltage ( Q C )and the flux and current ( L ) respectively. Example Figure 3.1 shows a simple RL-circuit. The resistor is a current-defined branch, while the inductor and the voltage source are both voltage-defined branches. This leads to the following partition of v b and 12

Unclassified Report 2002/817 1 r 1 2 e 1 l 1 + 0 Figure 3.1: A simple RL-circuit. i b : v b1 = ( v R ), vb2 = i b1 = ( i R ), vi2 = ( vl v E ( il i E ), ), with v R = v 1 v 2,v L = v 2 v 0 and v E = v 1 v 0. The incidence matrix A is split accordingly in two parts A 1 and A 2 : The functions q, j, q and j become q(t, ( v R ), ( i L q(t, ( v R ), ( i L i E i E ) ) = r 1 1 1 A 1 = 2 0, 0 1 l 1 e 1 1 1 0 A 2 = 2 1 1. 0 0 1 ) ) = ( 0 ), j( ( v R ), ( i L i E ( ) LiL, j( ( ( ) il v 0 R, i E ) ) = ( 1 R v ) R ) ) = ( 0 V(t) ) 13

2002/817 Unclassified Report These equations can be substituted in equations (3.18) and(3.19), yielding 1 i L R (v 1 v 2 ) i E i L = 0, i E 1 R (v 1 v 2 ) ( ) v2 v 0 = d ( ) ( ) LiL 0 +. v 1 v 0 dt 0 V(t) Because the system is again undetermined, node 0 will be grounded (v 0 following determined system: = 0). The result is the ( ) ( i 1 L = R (v ) 1 v 2 ), i E i L 0 ( ) v2 = d ( ) ( ) LiL 0 +, dt 0 V(t) v 1 which is of the form of equation (3.20). Finally, this result can be rewritten to the general form by defining v 1 x = v 2 i L, j(t, x) = i E d q(t,x) + j(t,x) = 0 dt v 1 V (t) 0 i L 1 R (v 1 v 2 ) i l i E 0, q(t, x) = v 2 Li L 0. (3.21) 0 3.3.2 Matrix-vector formulation Similar to nodal analysis, modified nodal analysis can also be presented in an equivalent matrix-vector form[18]. This time, the system of linear circuit equations has the following form: [ YR B C D ][ V I ] = [ J F ]. (3.22) In this system, Y R is the nodal admittance matrix containing only contributions of branches whose currents are no output currents. Matrix B handles the contributions of output and/or controlling currents to the KCL, C contains the contributions of voltage-defined branches to the KVL and D contains contributions of current controlled branches and/or branches with output currents to the BCR. Furthermore, V contains the node voltages, I contains the output and/or controlling currents, J contains the independent source currents and F contains the independent source voltages and/or output currents. Table 3.4 shows the stamps for the branches which are not covered by nodal analysis. 14

Unclassified Report 2002/817 Branch type (BCR) Variable Variable RHS Voltage source v + v i V (V = V (t)) v + 1 v -1 i V 1-1 V V-def resistor v + v i R (V = V (i R )) v + 1 v -1 i R 1-1 V Capacitor v + v (i C = q C (v + v )) v + C C v C C Inductor v + v i L (v L = φ L (i L )) v + 1 v 1 i L 1 1 L Table 3.4: Stamps for modified nodal analysis. The following example shows how to create this system of equations. Example The RL-circuit of figure 3.1 can represented in matrix-vector form by applying the stamps of tables 3.2 and 3.4: 1 v 1 : 1 0 0 1 v R R 1 0 v 2 : 1 1 0 1 0 R R v 2 0 v 0 : 0 0 0 1 1 v 0 = 0. (3.23) i L : 0 1 1 L 0 i L 0 i S : 1 0 1 0 0 i S V(t) To make the system determined, node 0 is grounded. As a result, the equation corresponding to v 0 must be deleted together with v 0 and the corresponding column. The resulting system is v 1 : v 2 : i L : i S : 1 1 0 1 v R R 1 1 1 1 0 R R v 2 0 1 L 0 i L = 1 0 0 0 i S 0 0 0 V(t). (3.24) 3.4 Hierarchical approach The examples of circuits discussed so far are all examples of circuits existing of elementary subcircuits: branches, which cannot be subdivided into other sub-circuits. In practice, one wants to study large scale circuits. These large scale circuits usually are built on a modular design: the circuits 15

2002/817 Unclassified Report c 1 c 2 1 2 2 3 j 1 Subm1 l 1 r 1 + 0 0 Figure 3.2: A hierarchical circuit, with on the left side the supercircuit and on the right side the sub-circuit Subm 1. consist of several sub-circuits, which also consist of several sub-sub-circuits. The main purpose of this modular design is to encapsulate certain characteristics which are not of interest and to hide the actual design of sub-circuits. This simplifies the design of big, complicated circuits, and stimulates re-usability to decrease the throughput time of a design phase. However, modular design also has consequences for the way the system of circuit equations, arising from the circuit, can be solved. The previous examples all used a so called plain strategy: the whole circuit is described using one matrix. Spice, Specter and Titan are examples of simulators which use the plain strategy. Modular design introduces another, alternative, approach: a hierarchical strategy. Since the circuit consists of sub-circuits, it is natural to view those sub-circuits as sub-problems of the original problem. This section will describe how this hierarchical approach works. Example circuit simulators which use the hierarchical approach are Pstar and Brazil. 3.4.1 Hierarchical circuit equations Figure 3.2 shows an example of a hierarchical circuit, which is in fact the hierarchical variant of the circuit in figure 2.1. Although the sub-model in Figure 3.2 contains a loop, in general a sub-model does not have to contain a loop. The highest level of a circuit, i.e. the circuit which is not the subcircuit of another circuit, is called circuit level. In general, a sub-circuit consists of two kinds of variables: internal variables and terminal variables. Internal variables are variables which are of no direct meaning to higher level circuits. In figure 3.2, node v 3 is an example of an internal variable of sub-circuit Subm 1. Terminal variables however, are variables which are needed in BCRs of higher level circuits. Node v 2 is a typical terminal variable of sub-circuit Subm 1, for it is needed on both the sub-circuit and the circuit level. It is important to note that a sub-circuit only communicates to his parent circuit in the hierarchy 16

Unclassified Report 2002/817 through its terminal unknown. Within this parent circuit, such an unknown may again appear as terminal unknown or as an internal unknown. Sub-circuits are processed as if they were normal circuits, so the circuit equations for sub-circuit j with n j variables stored in x ( j) R n j read f ( j) (t, x ( j), ẋ ( j) ) := d dt q(j) (t,x (j) ) + j (j) (t,x (j) ) = 0, (3.25) with q ( j), j ( j) : R R n j R n j. In matrix-vector notation, an equivalent system can be obtained, for example, for sub-circuit Subm 1 in Figure 3.2: v 0 q (1) ( v 2 i L ) = v 3 0 C 2 (v 2 v 3 ) Li L C 2 (v 2 v 3 ), j(1) ( v 0 v 2 i L v 3 i L 1 R (v 3 v 0 ) ) = i L v 2 v 0 1 R (v 3 v 0 ). (3.26) Note that there is no need yet to ground a node. Furthermore, the current through the inductor, i L, has also become a terminal variable, as it is needed on the circuit level. In general, when there is a complete connected list of branches from terminal a to terminal b, each i x which is treated as unknown becomes a terminal variable. The super circuit is treated in the same way; here the sub-circuit is viewed to as a black-box, whose contributions appear later: q Super v 0 0 ( v 1 ) = C 1 (v 1 v 2 ), j Super v 0 I ( v 1 ) = I. (3.27) v 2 C 1 (v 1 v 2 ) v 2 0 Before verifying that this hierarchical formulation indeed is equivalent to the plain matrix formulation, some logistical questions must be answered. It is useful to divide the variables into two groups, namely the internal variables and the terminal variables. In Pstar 2 the vector of unknown variables x ( j) R n j is divided such that y ( j) R m j contains the m j terminal variables and z ( j) R k j contains the k j internal variables: ( ) y x ( j) ( j) =. (3.28) At the circuit level, the internal variables of the circuit level are completed with the terminal variables of all sub-circuits, resulting in the vector x at the circuit level: x = z ( j) y z (1). z (n), (3.29) where all the terminal variables of the sub-circuits are collected in y (without loss of generality, only the case in which there are two levels in the hierarchy is discussed). The choice to store the internal variables at higher indices than the terminal variables is an arbitrary choice. The consequences of this choice for the way the system can be solved, will be discussed later. 2 Pstar is an analogue circuit simulator used by Philips. 17

2002/817 Unclassified Report The variables in equation (3.26) are already ordered in the right way. On the circuit level, the vector of unknowns becomes v 0 v 1 x = v 2, i L v 3 where node v 0 is chosen to position the first index, for it will be grounded. In fact, node v 0 acts as a terminal variable on the circuit level. The terminal variables are in a particular way connected to or associated with variables on a higher level, and possible also connected with variables in another subcircuit. These terminal variables can have other names in sub-circuits, so there should be a mapping from the variables visible on the circuit level to the terminal variables of the sub-circuits. This mapping is called B j for sub-circuit j, with B j R n m j defined as B j (i, k) = { 1 if node k of sub-circuit j is connected with node i of the super-circuit. 0 if node k of sub-circuit j is not connected with node i of the super-circuit. (3.30) So B T j x results in the terminal variables of sub-circuit j in terms of super-circuit variables, i.e. y( j), while B j y ( j) converts the terminal variables of sub-circuit j to their associated variables at the supercircuit. With these mappings B j, the complete set of circuit equations at the circuit-level becomes N f(t, x, ẋ) = B j f ( j) (t, B T j x( j), BJ T ẋ( j) ) j=1 N N = B j q ( j) (t, B T j x( j) ) + B j j ( j) (t, B T j x( j) ) j=1 j=1 = 0 (3.31) for a circuit consisting of N sub-circuits. Proceeding with the example, mapping B 1 becomes v 0 v 1 v 2 i L v 3 v 0 v 2 i L 1 0 0 0 0 0 0 1 0 0 0 1. 0 0 0 18

Unclassified Report 2002/817 Using mapping B 1, the complete system for the circuit level can be constructed: v 0 v 0 v 1 f(t, x, ẋ) = q( v 2 i L ) + j( v 1 v 2 i L ) v 3 v 3 0 i L 1 R (v 3 v 0 ) I C 1 (v 1 v 2 ) I = C 1 (v1 v 2 ) + C 2 (v 2 v 3 ) + i L Li L v 2 v 0 1 C 2 (v 2 v 3 ) R (v 3 v 0 ) = 0. Considering the matrix-vector notation, the plain matrix representation can be obtained from the subcircuits in the following way: A = x = b = N B j A j B T j, (3.32) j=1 N B j x j, (3.33) j=1 N B j b j, (3.34) j=1 with A j, x j and b j corresponding to sub-circuit j. 3.4.2 Solving using the hierarchy It is possible to construct a plain matrix out of all the sub-matrices from the sub-circuits, but this is highly inefficient. Even if a sparse storage method is used, memory usage will grow and performance will decrease (however, in [5] sparse pivoting promises good results). Besides that, the whole process of constructing the matrix is unnecessary. Instead, a bottom up strategy is used, following the hierarchy of the circuit. In fact, Gaussian Elimination, necessary for the UL-decomposition, explained in the next paragraph, can be done within the memory allocated for the matrices of the sub-circuits. First, for all sub-circuits on the lowest level, an UL-decomposition is performed on the part of the matrix concerning the internal variables, part A 22 R k j k j in equation (3.35). ( ) A12 A A = 12 (3.35) A 21 A 22 After that, the columns of the first m j rows, corresponding to the k j internal variables (part A 12 R m j k j ), are also eliminated to zero. Next, the part associated with the terminal variables, part A 11 R m j m j can be added to the corresponding part of the matrix of the higher level. Corresponding actions are done with the right-hand side b. Proceeding in this way until the circuit level is reached, the result is a matrix which is completely UL-decomposed and a right-hand side that contains U 1 b. Finally, 19

2002/817 Unclassified Report to solve the system, one grounds one node on the circuit-level and solves the terminal variables, followed by a top-down traversal of the sub-circuits to substitute the terminal values and solve the internal values. This way of performing Gaussian Elimination is optimal from a memory point of view, but is may not be from a stability point of view when compared to a complete flat matrix approach. 3.4.3 Solving without using the hierarchy Sometimes it is preferred to solve the system of equations in a non-hierarchical way. Typical examples are analysis methods which require iterative methods with pre-conditioning which do not work within the hierarchy. So the system will be handled as if it were a plain system and consequently, the decomposing of the sub-matrices is postponed until the circuit level. However, it is assembled first in a hierarchical way, and it is no option to create a plain matrix directly, due to efficiency reasons. An alternative way to use iterative methods with pre-conditioning is to modify the pre-conditioners such that they fit into the hierarchical datastructure while maintaining as many of the properties they were constructed for. 20

Chapter 4 Circuit analysis The most important result of the previous chapter is the observation that the contributions of all circuit elements together form a system of first order, nonlinear, ordinary differential-algebraic equations: f(t, x, ẋ) d q(t,x) + j(t,x) = 0. (4.1) dt A differential-algebraic equation (DAE) contains both differential equations (due to for instance a capacitor) and algebraic equations (due to for instance a resistor). The fact that a system of differentialalgebraic equations is concerned, has consequences for the way the system is solved. The following sections discuss several kinds of analysis and the way to solve the resulting systems. 4.1 Direct current analysis (DC) Direct current analysis, often referred to as DC analysis, concerns the steady-state solution (or DC equilibrium) of a circuit. In the steady-state, all currents are direct currents, i.e. time-independent currents. Although all sources of excitation are constants, circuits which behave as oscillators will have a periodic steady-state solution instead, which is still time-varying. However, assuming that a time-independent steady-state (x DC ), which is described by exists, equation (4.1) can be reduced to ẋ DC = 0, (4.2) f(t, x, 0) = f DC (x,0) = 0. (4.3) Furthermore, in this steady-state situation, all time-derivatives are zero: f DC (x,ẋ) t q DC(x) + x q DC(x)ẋ + j DC (x) = j DC (x). (4.4) Hence, a capacitor acts in a DC analysis as an open circuit, while an inductor acts as a short circuit. An open circuit leads to a singular matrix G; therefore, Pstar bypasses each capacitor with a small resistor during DC analysis. 21

2002/817 Unclassified Report To perform a DC analysis, the (in general non-linear) system to solve is f DC (x,0), whichis j DC (x) = 0. (4.5) The solution x DC of (4.5), also called DC-operating point, represents the circuit variables in the DC steady-state. Equation (4.5) in general is a nonlinear algebraic equation. If a linear circuit is concerned, equation (4.5) of course is a linear algebraic equation. In that case, the corresponding system of linear equations can be solved by a linear solver. Pstar uses a UL-decomposition to solve the linear system. UL-decomposition is a variant of the well-known LU decomposition. The difference is that UL-decomposition decomposes a matrix A into A = UL with U an upper-triangular matrix and L a lower-triangular matrix. The nonlinear case is more difficult, for the equations can be strongly nonlinear. In practice, the Newton method is usually used, as it is sufficient to find the roots of equation (4.5). Globally, the Newton method works as follows. The function j(x) can be expanded in a Taylor series about x i : where Dj(x) is the Jacobian matrix for j: j(x) = j(x i ) + Dj(x i )(x x i ) + O( x x i 2 2 ), (4.6) The Newton method now tries to solve (Dj(x)) ik = j(x) i x k. (4.7) j(x i ) + Dj(x i )(x x i ) = 0, (4.8) which suggests to choose x = x i+1 and perform the following iteration, starting with x 0 : Dj(x i )x i+1 = Dj(x i )x i j(x i ). (4.9) At each step of the iteration, a linear system must be solved by for instance UL-decomposition. The stop criterion is based on a maximum number of iterations, a tolerance value for the norm of j(x i ) and a tolerance value for the difference between x i+1 and x i. For non-singular Jacobian matrices, the Newton method can be proved to converge quadratically[30]. If the Jacobian matrices are singular, the Newton method converges linearly at best. It is not difficult to combine the Newton method with the hierarchical solver. Schematically, the system on the circuit-level is ( )( ) ( ) D11 D 12 yi+1 ti =, (4.10) D 21 D 22 z i+1 b i ( ) ti where is the right-hand side of equation (4.9), the upper part corresponds to the equations for b i the terminal variables and the lower part corresponds to those for the non-terminal variables. Note that this is not the usual way to arrange the system, but that it is only used for notational convenience. In equation (4.9, many coordinates at the right-hand side may be zero due to an abundance of linear elements. The system on the sub-circuit is ( )( ) ( ) D (1) 11 D (1) 12 y (1) D (1) 21 D (1) i+1 t (1) 22 z (1) = i i+1 b (1), (4.11) i 22

Unclassified Report 2002/817 where in this case also, the upper part corresponds to the terminal variables and the lower part corresponds to the internal variables. As described in section 3.4,anUL-decomposition is made for D (1) 22, D(1) 12 is eliminated to zero and the right-hand side t (1) i and D (1) 11 are updated accordingly to t (1) i and D (1) 11.Next, D (1) 11 is added to D 11 and t (1) i is added to t i on the circuit-level: ( D11 + D (1) 11 D 12 D 21 D 22 )( yi+1 z i+1 ) = ( ti + t (1) ) i. (4.12) b i Note that it is assumed here that y i+1 only contains all terminal variables that are also present in y (1) i+1. In general this will not be the case, so some extra bookkeeping should be done. Next, a node is chosen to be grounded, the internal variables are solved together with the terminal variables, which are passed to the sub-circuit, as described in section 3.4. Parts of circuits which are only connected by capacitors are called floating areas. It has been remarked that capacitors are bypassed by small resistors during DC analysis. In fact, the contribution of a capacitor becomes ρc,wherecis the sub-matrix containing the original contribution of the capacitor and ρ is a scaling factor such that ρc represents an equivalent resistor. 4.2 Small signal analysis (AC) Small signal analysis, sometimes referred to as alternating current analysis (AC analysis), studies perturbation of the DC solution due to a small time-varying sine-wave excitation. Therefore, it is best suited to linear circuits or nonlinear circuits behaving in a linear way with respect to the small excitation. Because many interesting circuits operate this way, small signal analysis is of great value in practice. Small signal analysis starts with the steady-state solution x(t) = x DC of a time-independent system f DC (x,ẋ) = q(x)ẋ + j(x) = 0, (4.13) x i.e. x(t) = x DC is the solution of f DC (x,0) = 0. (4.14) Hence AC analysis starts with finding x DC. Although it is not guaranteed that such a solution exists, this is assumed for the rest of this section. The small signal analysis problem now is formally defined by the system, which results from adding an independent small sine-wave excitation e(t) to system (4.13): f AC (x, ẋ) = f DC (x,ẋ) = d q(x) + j(x) dt = e(t), (4.15) where x AC (t) = x DC + x(t) and e(t) is independent of x. The next step is to expand the functions q and j in a Taylor series about the steady-state solution (or operating point) x DC. If the excitation e(t) 23