Computer-Aided Circuit Simulation and Verification Overview

cse245 computer aided circuit simulation n.w
1 / 53
Embed
Share

Explore Computer-Aided Circuit Simulation and Verification in CSE245 with topics like nonlinear differential equations, GPU tools, energy analysis, astrophysics, and more. Dive into circuit simulation methods, linear circuits, nonlinear systems, and frequency domain analysis. Discover applications in power distribution networks, electrostatic discharge, and stress analysis.

  • Circuit Simulation
  • CSE245
  • Nonlinear Equations
  • GPU Tools
  • Energy Analysis

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. CSE245: Computer-Aided Circuit Simulation and Verification Lecture 1: Introduction and Formulation Spring 2023 Chung-Kuan Cheng 1

  2. Overall Outlines of Class CK Cheng, CSE 2130, tel. 858 534-6184, ckcheng+245@ucsd.edu Lectures: 2:00 ~ 3:20pm TTH McGill Hall 2322, Grading: Option I Homework: 60% Project Presentation: 20% Final Report: 20% Option II Subject Review Talk: 25% Project Proposal Discussion: 25% Project Presentation: 30% Final Report: 20% Goal: Concept, theories, and algorithms of nonlinear differential equations (PDK for VLSI designs) New approaches 2

  3. Potential Subjects Tools at hand: GPU, Machine Learning, Deep Learning Matrix Solver Huge condition numbers, huge dimensions Model Order Reduction Accuracy vs complexity Simulation Neural nets Inverse Problem for Simulation X Parameter Modeling Nonlinear system, frequency domain Matrix Exponential Nonlinear problem 3

  4. Motivation: Analysis Energy: Fission, Fusion, Fossil Energy, Efficiency Optimization Astrophysics: Dark energy, Nucleosynthesis Climate: Pollution, Weather Prediction Biology: Microbial life Socioeconomic Modeling: Global scale modeling Nonlinear Systems, ODE, PDE, Heterogeneous Systems, Multiscale Analysis. 4

  5. References 1. Computational Methods in Circuit Simulation, I.N. Hajj, 2016. 2. Circuit Simulation, F.N. Najm, Wiley, 2010. 3. Electronic Circuit and System Simulation Methods, T.L. Pillage, R.A. Rohrer, C. Visweswariah, McGraw-Hill, 1998. 4. Interconnect Analysis and Synthesis, CK Cheng, J. Lillis, S.Lin and N. Chang, John Wiley, 2000. 5. Computer-Aided Analysis of Electronic Circuits, L.O. Chua and P.M. Lin, Prentice Hall, 1975. 6. Numerical Recipes: The Art of Scientific Computing, Third Edition, W.H. Press, S.A. Teukolsky, W.T. Vetterling, and B.P. Flannery, Cambridge University Press, 2007. 5

  6. CSE245: Circuit Simulation 1. Introduction 2. Problem Formulations: basic elements, circuit topology, network regularization 3. Linear Circuits: matrix solvers, explicit and implicit integrations, matrix exponential methods, convergence 4. Nonlinear Systems: Newton-Raphson method, Nesterov methods, homotopy methods 5. Frequency Domain Analysis: S parameters, X parameters 6. Sensitivity Analysis: direct method, adjoint network approach 7. Various Simulation Approaches: FDM, FEM, BEM, FFT, multipole methods, Monte Carlo, random walks 8. Multiple Dimensional Analysis: Tensor decomposition 9. Applications: power distribution networks, electrostatic discharge, thermal dissipation, stress analysis 6

  7. Motivation: Analysis Modeling: Inputs, outputs, system models. Simulation: Time domain, frequency domain, wavelet simulation. Sensitivity Calculation: Optimization Uncertainty Quantification: Derivation with partial information or variations User Interface: Data mining, visualization. 7

  8. Motivation: Circuit Analysis Why Whole Circuit Analysis, Interconnect Dominance What Power, Clock, Interconnect Coupling Where Matrix Solvers, Integration Methods RLC Reduction, Transmission Lines, S Parameters Parallel Processing Thermal, Mechanical, Biological Analysis 8

  9. Circuit Simulation: Overview stimulant generation netlist extraction, modeling Circuit Input and setup Simulator: Solve numerically frequency & time domain simulation user interface: worst cases, eye diagrams, noises Complexity Accuracy Debug Output 9

  10. Circuit Simulation Circuit Input and setup Simulator: dt ( ) dX t = Solve numerically ( ) f X C Output ( ) dX t = = + ( ) ( ) ( ) f X C GX t BU t dt Types of analysis: DC Analysis DC Transfer curves Transient Analysis AC Analysis, Noise, Distortions, Sensitivity = + ( ) ( ) Y DX t FU t 10

  11. Program Structure (a closer look) Models Input and setup Numerical Techniques: Formulation of circuit equations Solution of ordinary differential equations Solution of nonlinear equations Solution of linear equations Output 11

  12. Lecture 1: Formulation Basic Elements KCL/KVL and Topology Sparse Tableau Analysis (IBM) Nodal Analysis, Modified Nodal Analysis (SPICE) *some slides borrowed from Berkeley EE219 Course 12

  13. Basic Elements Two terminal elements Multiple port elements Resistors: i=i(v) or v=v(i), e.g. i=v/R Capacitors: q=q(v) Inductors: ?= ?(i) Sources: 13

  14. Capacitors Forward Euler Approximation ?(?+1)= ??+ ?? = ??+?? ? 14

  15. Capacitors Capacitor is a function of voltage ? = ? ? ? =?? ?? ??=?? ? =?? ? ?? ?? ?? 15

  16. Capacitors Backward Euler Approximation ?(?+1)= ??+ ??+1 = ??+??+1 ? 16

  17. Capacitors Trapezoidal Approximation ??+ ??+1 = ??+?? ? +??+1 ?(?+1)= ??+ 2 ? 17

  18. Capacitors: Charge Conservation Watch out the charge conservation when charnge is a nonlinear function of voltage ?? = ? ? + ? ? + ? = ?? + ?? + ? ? + ? ? = ? 18

  19. Inductors Flux is a function of current ? = ? ? ? =?? ?? ?? ?? Mutual inductance ?12=?12,34??34/?? ??=?? ? ?? ?? ? = ? ? 19

  20. Inductors Forward Euler Integration ? = ??+?? ?(?+1)= ??+?? ? ?? 20

  21. Inductors Backward Euler Integration ?+1 = ??+??+1 ?(?+1)= ??+?? ?? ? 21

  22. Inductors Trapezoidal Integration ? ?+1 ?? ?? +?? ?? 2 = ??+?? 2? +??+1 ?(?+1)= ??+ 2? 22

  23. Basic Elements: Summary For the simulation of two terminal elements, we can convert capacitors and inductors to resistors via Euler or trapezoidal integration. The conversion leaves two variables and one constraint. When the element is nonlinear, we need to watch out the slope of the device and the conservation of the charge or flux. Use examples of nonlinear and time varying capacitors to illustrate the formula of charge conservation. 23

  24. Branch Constitutive Equations Ideal elements Element Branch Eqn Variable parameter Resistor ? = ? ? ?,? Capacitor ? = ? ??/?? ??/??,? Inductor ? = ? ??/?? ?,??/?? Voltage Source ? = ?? ? Current Source ? = ?? ? VCVS ?? = ?? ?? ? VCCS ?? = ?? ?? ? CCVS ?? = ?? ?? ? CCCS ?? = ?? ?? ? 24

  25. Conservation Laws Determined by the topology of the circuit Kirchhoff s Current Law (KCL): The algebraic sum of all the currents flowing out of (or into) any circuit node is zero. No Current Source Cut Kirchhoff s Voltage Law (KVL): Every circuit node has a unique voltage with respect to the reference node. The voltage across a branch vb is equal to the difference between the positive and negative referenced voltages of the nodes on which it is incident No voltage source loop 25

  26. Conservation Laws: Topology A circuit (V, E) can be decomposed into a spanning tree and links. The tree has n-1 (n=|V|) trunks, and m-n+1 (m=|E|) links. A spanning tree that spans the nodes of the circuit. Trunk of the tree: voltages of the trunks are independent. Check the case that the spanning tree does not exist! Link that forms a loop with tree trunks Link: currents of the links are independent. Check the case that the link does not exist! Thus, a circuit can be represented by n-1 trunk voltage and m-n+1 link currents. 26

  27. Formulation of Circuit Equations Unknowns B branch currents (i) N node voltages B branch voltages (v) Equations N+B Conservation Laws B Constitutive Equations 2B+N equations, 2B+N unknowns => unique solution (e) 27

  28. Equation Formulation - KCL R3 2 1 Is5 R1 R4 G2v3 0 Law: State Equation: i 1 A i = 0 i 2 1 1 1 0 0 0 Node 1: Node 2: = i 3 N equations 0 Branches 0 1 1 1 0 i 4 i 5 Kirchhoff s Current Law (KCL) 28

  29. Equation Formulation - KVL R3 2 1 Is5 R1 R4 G2v3 0 Law: State Equation: 1 0 0 v v - AT e = 0 1 1 0 0 v 2 e vi = voltage across branch i ei = voltage at node i 1 = 1 1 1 0 v 3 B equations e 2 0 0 v 4 0 1 0 v 5 Kirchhoff s Voltage Law (KVL) 29

  30. Equation Formulation - BCE R3 2 1 Is5 R1 R4 G2v3 0 Law: State Equation: 1 R Kvv + Kii = is 0 0 0 0 0 v i 1 1 1 0 0 0 0 G 0 v i B equations 2 2 2 1 R + = 0 0 0 0 0 v i 3 3 3 0 v i 1 R 4 4 0 0 0 0 v i si 5 5 5 4 0 0 0 0 0 30

  31. Equation Formulation Node-Branch Incidence Matrix A branches 1 2 3 j B n o d e s 1 2 i (+1, -1, 0) N { +1 if node i is + terminal of branch j -1 if node i is - terminal of branch j 0 if node i is not connected to branch j Aij = 31

  32. Equation Assembly (Stamping Procedures) Different ways of combining Conservation Laws and Branch Constitutive Equations Sparse Table Analysis (STA) Nodal Analysis (NA) Modified Nodal Analysis (MNA) 32

  33. Sparse Tableau Analysis (STA) 1. Write KCL: 2. Write KVL: 3. Write BCE: Ai=0 v - ATe=0 Kii + Kvv=S (N eqns) (B eqns) (B eqns) 0 0 0 A 0 i N+2B eqns N+2B unknowns = T 0 I A 0 v N = # nodes B = # branches K K e S i v Sparse Tableau 33

  34. Sparse Tableau Analysis (STA) Advantages It can be applied to any circuit Eqns can be assembled directly from input data Coefficient Matrix is very sparse Disadvantages Sophisticated programming techniques and data structures are required for time and memory efficiency 34

  35. Nodal Analysis (NA) Use vector e as the only variables. Assume no voltage source 1. Write KCL Ai=0 2. Use BCE to relate branch currents to branch voltages i=f(v) (B equations B unknowns) 3. Use KVL to relate branch voltages to node voltages v=h(e) (B equations N unknowns) (N equations, B unknowns) N eqns N unknowns N = # nodes Yne=ins Nodal Matrix 35

  36. Nodal Analysis - Example R3 2 1 Is5 R1 R4 G2v3 0 1. KCL: 2. BCE: 3. KVL: Ai=0 Kvv + i = is i = is - Kvv A Kvv = A is v = ATe A KvATe = A is Yne = ins 1 R 1 R 1 R + + G G 0 2 2 e Yn = AKvAT Ins = Ais 1 = 1 3 3 1 R 1 R 1 R si e + 5 2 3 3 4 36

  37. Nodal Analysis Example shows how NA may be derived from STA Better Method: Yn may be obtained by direct inspection (stamping procedure) Each element has an associated stamp Ynis the composition of all the elements stamps 37

  38. Nodal Analysis Resistor Stamp Spice input format: Rk N+ N- Rkvalue N+ N+ N- What if a resistor is connected to ground? . Only contributes to the diagonal 1 1 N+ i Rk R R 1 k 1 k N- R R N- k k 1 ( ) + = others i e e i KCL at node N+ + N N s R 1 k ( ) = others i e e i KCL at node N- + N N s R k 38

  39. Nodal Analysis VCCS Stamp Spice input format: Gk N+ N- NC+ NC- Gkvalue NC+ N+ + NC+ NC- N+ G G vc k k Gkvc G G N- k k - NC- N- ( ( ) ) + = others i G e e i KCL at node N+ + k NC NC s = others i G e e i KCL at node N- + k NC NC s 39

  40. Nodal Analysis Current source Stamp Spice input format: Ik N+ N- Ikvalue N+ N+ N- N+ I k = Ik I N- k N- 40

  41. Nodal Analysis (NA) Advantages Yn is often diagonally dominant and symmetric Eqns can be assembled directly from input data Yn has non-zero diagonal entries Yn is sparse (not as sparse as STA) and smaller than STA: NxN compared to (N+2B)x(N+2B) Limitations Conserved quantity must be a function of node variable Cannot handle floating voltage sources, VCVS, CCCS, CCVS. How do we handle the current variable? Hint: No cut of currents 41

  42. Modified Nodal Analysis (MNA) How do we deal with independent voltage sources? Ekl k + - 1 e k l k = l 1 e ikl l 1 1 0 i E kl kl ikl cannot be explicitly expressed in terms of node voltages it has to be added as unknown (new column) ek and el are not independent variables anymore a constraint has to be added (new row) 42

  43. MNA Voltage Source Stamp Spice input format: Vk N+ N- Ekvalue Ek N+ N- ik RHS + - 0 0 0 1 0 0 -1 0 1 -1 N+ N+ N- 0 N- ik E Branch k k 43

  44. Modified Nodal Analysis (MNA) How do we deal with independent voltage sources? Augmented nodal matrix Yn B 0 e In general B= -CT Why? = MS C i Some branch currents Yn B e = MS C D i 44

  45. MNA General rules A branch current is always introduced as an additional variable for a voltage source or an inductor For current sources, resistors, conductors and capacitors, the branch current is introduced only if: Any circuit element depends on that branch current That branch current is requested as output 45

  46. MNA CCCS and CCVS Stamp 46

  47. MNA An example + v3 - ES6 R3 2 3 1 - + Is5 R1 R8 R4 G2v3 - + 0 4 E7v3 Step 1: Write KCL + i + i = i (1) (2) (3) (4) 0 i i i 1 2 3 i + i = 0 i 3 4 = 5 6 + 0 6 8 = 8 i i 7 8 47

  48. MNA An example Step 2: Use branch equations to eliminate as many branch currents as possible 1 R 1 R + + = (1) 0 v G v v 1 2 3 3 1 3 1 R 1 R + = v v i i (2) 3 4 6 5 s 3 4 1 R + = 0 i v (3) 6 8 8 1 R = 0 i v (4) 7 8 8 Step 3: Write down unused branch equations = (b6) (b7) v ES 6 6 = 0 v E v 7 7 3 48

  49. MNA An example Step 4: Use KVL to eliminate branch voltages from previous equations 1 R 1 R (1) + + = ( ) ( ) 0 e G e e e e 1 2 1 2 1 2 1 3 1 R 1 R (2) + = ( ) e e e i i 1 2 2 6 5 s 3 4 1 R (3) + = ( ) 0 i e e 6 3 4 8 (4) 1 R = ( ) 0 i e e 7 3 4 8 (b6) (b7) = ( e ) e e ES 3 2 6 = ( ) 0 E e e 4 7 1 2 49

  50. MNA An example Yn B 0 e = MS C i 1 R 1 R 1 R + + + 0 0 0 0 G G 2 2 1 3 3 0 i s e 1 R 1 R 1 R 1 + 0 0 1 0 e 2 5 3 3 4 0 e 1 R 1 R 3 = 0 0 1 0 0 e 4 8 8 1 R 1 R 6 i ES 0 0 0 1 6 0 i 8 8 7 0 1 1 0 0 0 7 7 0 1 0 0 E E 50

Related


More Related Content