Download presentation
Presentation is loading. Please wait.
Published byDale Bruce Modified over 8 years ago
1
CSE245: Computer-Aided Circuit Simulation and Verification Lecture 1: Introduction and Formulation Spring 2008 Chung-Kuan Cheng
2
Administration CK Cheng, CSE 2130, tel. 534-6184, ckcheng@ucsd.educkcheng@ucsd.edu Lectures: 12:30 ~ 1:50pm TTH WLH2205 Textbooks –Electronic Circuit and System Simulation Methods T.L. Pillage, R.A. Rohrer, C. Visweswariah, McGraw-Hill –Interconnect Analysis and Synthesis CK Cheng, J. Lillis, S. Lin, N. Chang, John Wiley & Sons Grading –Homework and Projects: 60% –Project Presentation: 20% –Final Report: 20%
3
CSE245: Course Outline Formulation (2-3 lectures) –RLC Linear, Nonlinear Components,Transistors, Diodes –Incident Matrix –Nodal Analysis, Modified Nodal Analysis –K Matrix Linear System (3-4 lectures) –S domain analysis, Impulse Response –Taylor’s expansion –Moments, Passivity, Stability, Realizability –Symbolic analysis, Y-Delta, BDD analysis Matrix Solver (3-4 lectures) –LU, KLU, reordering –Mutigrid, PCG, GMRES
4
CSE245: Course Outline (Cont’) Integration (3-4 lectures) –Forward Euler, Backward Euler, Trapezoidal Rule –Explicit and Implicit Method, Prediction and Correction –Equivalent Circuit –Errors: Local error, Local Truncation Error, Global Error –A-Stable –Alternating Direction Implicit Method Nonlinear System (2-3 lectures) –Newton Raphson, Line Search Transmission Line, S-Parameter (2-3 lectures) –FDTD: equivalent circuit, convolution –Frequency dependent components Sensitivity Mechanical, Thermal, Bio Analysis
5
Motivation 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
6
Circuit Simulation Simulator: Solve numerically Input and setup Circuit Output Types of analysis: –DC Analysis –DC Transfer curves –Transient Analysis –AC Analysis, Noise, Distortions, Sensitivity
7
Program Structure (a closer look) Numerical Techniques: – Formulation of circuit equations – Solution of ordinary differential equations – Solution of nonlinear equations – Solution of linear equations Input and setup Models Output
8
Lecture 1: Formulation Derive from KCL/KVL Sparse Tableau Analysis (IBM) Nodal Analysis, Modified Nodal Analysis (SPICE) *some slides borrowed from Berkeley EE219 Course
9
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 v b is equal to the difference between the positive and negative referenced voltages of the nodes on which it is incident –No voltage source loop
10
Branch Constitutive Equations (BCE) Ideal elements ElementBranch EqnVariable parameter Resistorv = R·i- Capacitori = C·dv/dt- Inductorv = L·di/dt- Voltage Sourcev = v s i = ? Current Sourcei = i s v = ? VCVSv s = A V · v c i = ? VCCSi s = G T · v c v = ? CCVSv s = R T · i c i = ? CCCSi s = A I · i c v = ?
11
Formulation of Circuit Equations Unknowns –B branch currents(i) –N node voltages(e) –B branch voltages(v) Equations –N+B Conservation Laws –B Constitutive Equations 2B+N equations, 2B+N unknowns => unique solution
12
Equation Formulation - KCL 0 1 2 R1R1 G2v3G2v3 R3R3 R4R4 I s5 A i = 0 Kirchhoff’s Current Law (KCL) N equations Law:State Equation: Node 1: Node 2: Branches
13
Equation Formulation - KVL 0 1 2 R1R1 G2v3G2v3 R3R3 R4R4 I s5 v - A T e = 0 Kirchhoff’s Voltage Law (KVL) B equations Law:State Equation: v i = voltage across branch i e i = voltage at node i
14
Equation Formulation - BCE 0 1 2 R1R1 G2v3G2v3 R3R3 R4R4 I s5 K v v + K i i = i s B equations Law: State Equation:
15
Equation Formulation Node-Branch Incidence Matrix A 1 2 3 j B 12iN12iN branches nodesnodes (+1, -1, 0) { A ij = +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
16
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)
17
Sparse Tableau Analysis (STA) 1.Write KCL: Ai=0 (N eqns) 2.Write KVL:v - A T e=0 (B eqns) 3.Write BCE:K i i + K v v=S(B eqns) N+2B eqns N+2B unknowns N = # nodes B = # branches Sparse Tableau
18
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
19
Nodal Analysis (NA) 1.Write KCL Ai=0 (N equations, B unknowns) 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) Y n e=i ns N eqns N unknowns N = # nodes Nodal Matrix
20
Nodal Analysis - Example R3R3 0 1 2 R1R1 G2v3G2v3 R4R4 I s5 1.KCL:Ai=0 2.BCE:K v v + i = i s i = i s - K v v A K v v = A i s 3.KVL:v = A T e A K v A T e = A i s Y n e = i ns Y n = AK v A T I ns = Ai s
21
Nodal Analysis Example shows how NA may be derived from STA Better Method: Y n may be obtained by direct inspection (stamping procedure) –Each element has an associated stamp –Y n is the composition of all the elements’ stamps
22
Spice input format: R k N+ N- R k value Nodal Analysis – Resistor “Stamp” N+ N- N+ N- N+ N- i RkRk KCL at node N+ KCL at node N- What if a resistor is connected to ground? …. Only contributes to the diagonal
23
Spice input format: G k N+ N- NC+ NC- G k value Nodal Analysis – VCCS “Stamp” NC+ NC- N+ N- N+ N- GkvcGkvc NC+ NC- +vc-+vc- KCL at node N+ KCL at node N-
24
Spice input format: I k N+ N- I k value Nodal Analysis – Current source “Stamp” N+ N- N+ N- N+ N- IkIk
25
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
26
Modified Nodal Analysis (MNA) i kl cannot be explicitly expressed in terms of node voltages it has to be added as unknown (new column) e k and e l are not independent variables anymore a constraint has to be added (new row) How do we deal with independent voltage sources? i kl k l +- E kl klkl
27
MNA – Voltage Source “Stamp” N+ ikik N- +- EkEk Spice input format: V k N+ N- E k value 001 00 1 0 N+ N- Branch k N+ N- i k RHS
28
Modified Nodal Analysis (MNA) How do we deal with independent voltage sources? Augmented nodal matrix Some branch currents In general:
29
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
30
MNA – CCCS and CCVS “Stamp”
31
MNA – An example Step 1: Write KCL 0 1 2 G2v3G2v3 R4R4 I s5 R1R1 E S6 -+ R8R8 3 E7v3E7v3 -+ 4 + v 3 - R3R3 (1) (2) (3) (4)
32
MNA – An example Step 2: Use branch equations to eliminate as many branch currents as possible Step 3: Write down unused branch equations (1) (2) (3) (4) (b6) (b7)
33
MNA – An example Step 4: Use KVL to eliminate branch voltages from previous equations (1) (2) (3) (4) (b6) (b7)
34
MNA – An example
35
Modified Nodal Analysis (MNA) Advantages MNA can be applied to any circuit Eqns can be assembled directly from input data MNA matrix is close to Y n Limitations Sometimes we have zeros on the main diagonal
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.