BLAND: A Circuit Simulator Anand Ramalingam and Sreekumar V. Kodakara1 E-mail address: [email protected]

1Please send your comments or questions with subject line prefixed BLAND: in your email. Thanks.

Copyright 2007 Anand Ramalingam and Sreekumar V. Kodakara. Last update September 23, 2007. This work may be freely copied and distributed, either electronically or on paper. It may not be sold for more than the actual cost of reproduction. This work is licensed under a Creative Commons Attribution-NonCommercialShareAlike 3.0 License. For license details, see http://creativecommons.org/licenses/by-nc-sa/3.0/. For the most recent edition of this work, see http://egurukula.org. Credits. The copyright statement is a modification of one used by Prof. Jeff Erickson in his Algorithms cover page, see http://compgeom.cs.uiuc.edu/~jeffe/teaching/algorithms/cover.pdf.

Contents Chapter 1. Introduction 1.1. Analogy to Water Flow 1.2. A Circuit Example

1 1 2

Chapter 2. Syntax for Circuit Description 2.1. SPICE way of representing a Circuit 2.2. Current Source 2.3. Resistor

9 9 10 10

Chapter 3. Systematic Modified Nodal Analysis 3.1. Resistor 3.2. Current Source 3.3. Example 3.4. Exercise 3.5. More on reference node

13 13 14 15 18 18

Bibliography

21

1

CHAPTER 1

Introduction In this project, we will write a program capable of simulating circuits consisting of resistors, current sources and voltage sources. We hope this serves as an introduction to the fascinating field of Computer Aided Design (CAD) also called as Electronic Design Automation (EDA). EDA can be loosely described as an applied algorithms field in a sense that we are applying algorithms to solve problems arising in VLSI circuits. Circuit Simulation is just one small part of CAD, there are lot of other areas in CAD such as testing, placement and routing among others1. Hopefully, atleast a few among you will be inspired to do further research and take up jobs in this ever interesting area. There are are lot of books which focus on circuit simulation and the best books (in descending order) according to our subjective tastes are by Chua-Lin [1], VlachSinghal [2] and Pillage-Rohrer-Visweswariah [3]. 1.1. Analogy to Water Flow The fundamental idea in circuit analysis is the conservation of charge and conservation of energy. We will use the idea of conservation of charge in our simulator since it is more amenable to matrix analysis and thus coding compared to conservation of energy. The idea of charge conservation is similar to conservation of water flow in the pipes that are in our homes. Water analogy can be extensively applied to electronic device operation and it is presented clearly in the excellent notes of Prof. Reid Harrison [4]. Consider the pipes shown in a simplified format in Figure 1.1. Let water flow into the junction from the northern direction at the rate of f n . Let the water flow out in the other directions. If there is no leakage then the rate of water flowing in should equal the amount of water flowing out in the junction. This can be captured mathematically as: fn = fe + fs + fw

(1.1)

− fn + fe + fs + fw = 0

(1.2)

which can be rewritten as:

The Eq. (1.2) can be described as, algebraic sum of water flowing out is zero. The same idea can be applied to electric circuits. Before that we will review the conventions adopted in circuits and water flow analogy will help us understand them better. 1 But CAD does not encompass dreaded Computer Architecture which is the research area

of Sreekumar. 1

2

Revision: 1.11

fn

fw

fe

fs Figure 1.1. Illustrating the conservation of water flow in and out of a junction. Let water flow into the junction from the northern direction at the rate of f n . Let the water flow out in the other directions. The conservation law in the context of water flow can be stated as rate of water flow in should equal rate of water flow out.

1.1.1. Conventions. In circuits, we assume that the current flows from a higher potential to a lower potential. In circuits, potential means voltage. In terms of water analogy, think of potential as elevation from the sea level. The water in a river flows from a higher elevation (mountains) to a lower elevation (sea). There are interesting implications which one can deduce from the water flow analogy: • The elevation (height) of any structure is usually measured with sea level as reference. Sea level is usually set to 0 m2. In circuits, there is an equivalent to the sea level and this is called ground and whose potential is set to 0 V. We can now state the most important thing to remember in circuits, the voltage we measure is relative to ground. • Water flows when there is a difference in elevation. It always flows from higher elevation to lower elevation. In circuits, the current is assumed to flow from higher voltage to lower voltage3. 1.2. A Circuit Example What is the big picture here? We are trying to demonstrate that circuit analysis can be thought of in more intuitive terms like water flow. Our goal is to build a 2 Let us say that the sea level was set at 1000 m then the absolute height of every structure will be shifted by 1000 m. For example, the height of Mt. Everest will then shift from 8848 m to 9848 m. But note that the relative height of Mt. Everest with respect to sea level is still 8848 m. 3 This current flow is called as conventional current. Consider for example that one end of resistor is at +5 V and other end is −2 V. The conventional current flows from +5 V to −2 V. But the flow of the electrons is actually in the opposite direction. In our example, the electrons flow from −2 V to +5 V. It is little confusing to the beginner but remember this, the flow of electrons is in the opposite direction of conventional flow. Why did this happen? Historical anomaly, I guess. For more details, please refer to wiki article [5]. Also, this is an example which shows that intuition might turn out to be completely out of phase with reality. Always be careful with your intuition. OK enough of this digression, we will deal only with conventional current hereafter.

3

Revision: 1.11

circuit simulator which given a circuit should be able to solve and give us branch currents and nodal voltages. 1

IS 0′

I2

R2

2

I1 R1

I3 R3

0

0′′

Figure 1.2. A simple circuit composed of a current source and resistors. Note that we have labeled nodes as well as the branch currents. To make this discussion more concrete, let us give some values for the source and resistors for the circuit in Figure 1.2. Let IS = 1 A and R1 = R2 = R3 = 1Ω. We need to find out the voltage at nodes 1 and 24. A circuit simulator given the circuit should be able to solve for the voltages at node 1 and 2. Our circuit simulator should be able solve circuits with (hopefully) millions of resistors, capacitors and inductors. It will involve software engineering, linear algebra and most importantly fun. 1.2.1. Conservation of Current. The first step in building the circuit simulator is understanding the principle of conservation of current. We will demonstrate this principle of conservation of current through the circuit shown in Figure 1.2. We have two nodes in the circuit labeled 1 and 2 and a reference node labeled 0. What is a node?5 Definition 1.2.1 (Node). Node can be informally defined as a junction of two or more different circuit components. For example, in the Figure 1.2, at node 2 resistors R2 and R3 meet. The node is equivalent to a junction in pipes carrying water as illustrated in Figure 1.1. Thus one can apply an idea similar to conservation of rate of water flow at nodes. The equivalent to water in electric circuits is charge (Q). The rate of flow of charge is called current (I = dQ dt ). Applying rate of water flow analogy to node 1 in terms of current6, we get: IS = I1 + I2 which can be rewritten as

− IS + I1 + I2 = 0

(1.3)

4 Of course w.r.t reference node 0 which is set to 0 V. 5 The definitions provided in these notes are informal. For formal definitions, please consult

textbooks [1, 6]. 6 The conversation law also applies to charge. But we are more comfortable in working using current (I). Hopefully if this project generates some interest we can work on a simulator exclusively in charge (Q) domain.

4

Revision: 1.11

Hereafter we will just write in the fashion of Eq. (1.3), which means that the algebraic sum of outgoing currents is zero. Similarly, for node 2, we get

− I2 + I3 = 0

(1.4)

Now let us apply our analysis to reference node 0. The nodes marked same as 0. Why?7

0′

and

IS − I1 − I3 = 0

0′′

are

(1.5)

Note that Eq. (1.5) can be obtained by adding Eq. (1.3) and Eq. (1.4) and negating the result. What does this mean? It means that no new information about the circuit is got by applying conservation law at the reference node. We will come back to this point latter in the notes. An important point to note is that conservation of current depends only on the topology of the circuit not on the elements of the circuit. What is meant by topology? Definition 1.2.2 (Topology). Topology of a circuit describes how different circuit elements are connected to each other. To illustrate the fact that conservation of current only depends on topology consider Fig. 1.3 and Fig. 1.4. The circuit elements in both the circuits are connected in the identical manner. In Fig. 1.3, the circuit elements are all resistors while in Fig. 1.4 there is a resistor, a capacitor and an inductor. But for both the circuits, the algebraic sum of currents leaving node 1 is zero, I1 + I2 + I3 = 0

R1

I1 1

I2

(1.6)

R2

I3 R3

Figure 1.3. Illustrating the concept that the current conservation law depends only on topology not on elements. Here the elements are all resistors while in Fig. 1.4 there is a resistor, a capacitor and an inductor connected in identical fashion. But for both the circuits, the algebraic sum of currents leaving node 1 is zero, I1 + I2 + I3 = 0. The elements only determine the magnitude of the current.

Now if circuit elements do not influence the conservation of current law what do they influence? This leads to the next step in circuit simulation, branch current relationship. 7 Hint: How will you connect this circuit in a breadboard? Also, remember the definition of

a node in Definition 1.2.1. Another hint, well answer, are they shorted?

5

Revision: 1.11

R1

I1 1

I2

L2

I3 C3

Figure 1.4. This figure is same as Fig. 1.3 except that instead of resistor R2 , we have an inductor L2 . In place of resistor R3 , we have a capacitor C3 .

1.2.2. Branch Current Relationship. Branch Current Relationship (BCR) for a resistor is nothing but the Ohm’s law. Thus, BCR differentiates one circuit element from another unlike current conservation law. BCR along with conservation of current law is sufficient to do circuit analysis. This way of analyzing circuits is called Modified Nodal Analysis. Next we will review Ohm’s law and apply it to the circuit in Figure 1.2 and solve for voltages in the circuit. Definition 1.2.3 (Ohm’s law). The current through a resistor is directly proportional to the voltage across the resistor and is inversely proportional to the value of resistance. In Figure 1.5, the voltage across the resistor is V1 − V2 8. Thus the current through the resistor is: V − V2 I= 1 R V1

I

R

V2

Figure 1.5. By Ohm’s law, current through the resistor R is: I =

V1 −V2 R

Applying Ohm’s law to Eq. (1.3) and Eq. (1.4) we get9: V V − V2 − IS + 1 + 1 =0 R1 R  2  V V1 − V2 + 3 =0 − R2 R3

(1.8) (1.9)

8 Can we say that the voltage across the resistor is V − V ? Yes we can. Then why do we 2 1 say it is V1 − V2 ? The answer is that in Figure 1.5, we assume that current flows from V1 to V2 . Since current flows from higher potential to lower potential, we are implicitly saying that V1 is at a higher potential than V2 . Since we humans work better with positive numbers, we use V1 − V2 instead of the other way around. 9 Remember the voltage across R is: V = V − V . Since V = 0 V, V = V . Apply the 0 0 R1 R1 1 1 1 same logic to R3 .

6

Revision: 1.11

We can formulate these equations in terms of a matrix. Why? This is because matrix based computations are highly efficient. !    1 1 − R12 V1 I R1 + R2 (1.10) = S 1 1 0 V + − R1 2 R R 2

2

3

GV = I The Eq. (1.10) has the form GV = I, where G is the conductance matrix, I is the current vector and V is the voltage vector10. Only V is an unknown vector and needs to solved for. To make this discussion more concrete, as we have done before let us give some values for the source and resistors for the circuit in Figure 1.2. Let IS = 1 A, R1 = 10Ω, R2 = 20Ω and R3 = 30Ω. Then Eq. (1.10) becomes: 1     1 1 − 20 V1 1 10 + 20 (1.11) = 1 1 1 0 V − 20 + 2 20 30 GV = I

Note that only the voltage vector V is an unknown and needs to solved for. We will use R [7] to illustrate solving problems. R is a statistical software and is free to download at R homepage11. To learn more on R, interested reader is referred to Prof. Ross Ihaka’s lecture notes [8]. We will also use Matlab or its clones such as Octave to illustrate concepts. It is easier to demonstrate a concept using them compared to compiled languages such as C/C++. We do not expect the user to master these languages but also at the same time it should not be difficult to follow the code in these languages. Enough of a digression, here goes the code to solve in R: # initialize G matrix G = matrix(0, nrow = 2, ncol = 2); # initialize I vector I = c(0, 0); # values of the elements R1 = 10; R2 = 20; R3 = 30; Is = 1; # populate G matrix G[1,1] = 1/R1 + 1/R2; G[1,2] = -1/R2; G[2,1] = -1/R2; G[2,2] = 1/R2 + 1/R3; # populate I vector I[1] = Is; # solve for voltages V = solve(G,I); print(V); and the result after execution in R: 10 This can be interpreted as the vector version of Ohm’s law. Note that for a single resistor, Ohm’s law is given by V = IR but we can restate it as, GV = I where G = R1 . 11 http://www.R-project.org

Revision: 1.11

7

> source(file = "R/csres.R") [1] 8.333333 5.000000 After solving for the nodal voltages, we get V1 = 8.33 V and V2 = 5 V. Now we can find branch currents and voltage across any element. For example, the voltage across R2 is V1 − V2 = 3.33 V and the branch current through R2 is V − V2 3.33 I R2 = 1 = = 0.167 A R2 20 We hope that the reader has started to believe that the circuits can be analyzed using computer. Next step is how to do this systematically. We will address this next.

CHAPTER 2

Syntax for Circuit Description Before jumping into systematic construction of conductance matrix G and current vector I for a circuit (GV = I) we need a way to describe circuits in plain ASCII text. We will be doing that in this chapter. This is little boring but it is important that you understand notations. Without it you might get the polarities of the answers wrong. What is the big picture here? input

File in SPICE format −−−−→ Our Circuit Simulator in C/C++ The circuit simulator needs the circuit information which is provided by the input file which follows SPICE format. 2.1. SPICE way of representing a Circuit We follow the SPICE way of representing a circuit in a plain ASCII format1. The SPICE way of representing the circuit in Figure 2.1 is given below: 20Ω

1

10Ω

1A

2

30Ω

0

Figure 2.1. An example circuit to demonstrate the SPICE way of representing a circuit.

* SPICE way of describing a circuit in plain ASCII text IS 0 1 1 R1 1 0 10 R2 1 2 20 R3 2 0 30 .END 1 Our goal is to make the input representation of circuit SPICE-compatible. Thus SPICE

should be able to read our input file and simulate. This helps comparing our results with SPICE. 9

10

Revision: 1.11

How to read this SPICE description? If you looked at the circuit and its description and thought every line is a circuit element followed by nodes they are connected to and value of the element then you are on the right track. Before talking about the circuit element first we will talk about the tags in the file: (1) The first line should start with * in any SPICE input file. This is one of the quirks of SPICE. Thus you can start describing your circuit only from the second line. (2) Any line that starts with a * indicates a comment. Another character $ also indicates a comment. Hence when you see * or $ in a line then you can ignore the rest of the line. (3) The last line should obviously be .END in the input file. Anything after .END should be ignored. Now we are ready to tackle how to represent the circuit elements in the file. There are two distinct circuit elements in our example, a resistor and a current source. 2.2. Current Source The syntax for a current source is: I# n1 n2 value (in A) The current source should start with I or i and # indicates that any number(09) or an alphabet (a-z) can follow. Each current source in a circuit should be uniquely identified and it is usually done with a mix of alphabets and numbers. For example, India11 is a legal current source name. In our circuit example, the name of our current source is IS. n2 IS n1 Figure 2.2. Current Source. Note that the arrow points in the direction of node n2 .

The nodes to which the current source is connected are denoted by n1 and n2 . Note that the arrow points to n2 as shown in Figure 2.2. This is very important since if we change the order in which nodes appear, the polarities of voltages and currents we obtain will be reversed. To finish describing the current source we need to give its value and it is in Amperes. Putting all together for the current source in Figure 2.1 we write: IS 0 1 1 2.3. Resistor The resistors have a syntax similar to the current source though there are some differences as noted later:

11

Revision: 1.11

R# n1 n2 value (in Ω) The difference from a current source being that line should start with R or r which is pretty obvious. The not so obvious difference is that in a resistor it does not matter how we list the nodes to which it is connected. To make it clear, for example the 10Ω resistor in Figure 2.1 can be written either as: R1 1 0 10 or we can write as: R1 0 1 10 Why does this changing of nodes in resistor description not make a difference as in current source?2 What will you be coding using the information in the chapter? A parser. What is a parser? A parser is a program which acts as a preprocessor. In our context, it reads every line in the input file and recognizes whether it is a resistor or a current source. Then it directs the program to other modules such as building conductance matrix G. The parser code is probably the only part in our simulator which does not involve matrices!

2 Hint: It is about active devices (current source) and passive devices (resistors). We will show mathematically, latter on in the notes, why the order of nodes does not matter for resistor description.

CHAPTER 3

Systematic Modified Nodal Analysis As discussed in Chapter 1, we use Modified Nodal Analysis (MNA) for circuit simulation. In this chapter we will show how to construct conductance matrix G and current vector I systematically. Then we need to solve GV = I to obtain nodal voltages. Solving GV = I is purely a linear algebra problem and it will be a focus of a separate chapter. The important point to note is, each circuit element is represented in the conductance matrix G or current vector I or both. The systematic way of representing the circuit element is called a stamp. In most of the books this is called a MNA stamp.

3.1. Resistor First we will discuss the MNA stamp of a resistor. We will derive (informally) the stamps by applying MNA at the nodes of a resistor.

n1

I

R

n2

Figure 3.1. MNA stamp for a resistor does not depend on our assumption of the direction of the branch current.

For the resistor shown in Figure 3.1, at node n1 , applying MNA leads to: algebraic sum of other outgoing currents + I = 0   Vn1 − Vn2 =0 algebraic sum of other outgoing currents + R

(3.1)

and at node n2 we can write: algebraic sum of other outgoing currents − I = 0   Vn1 − Vn2 algebraic sum of other outgoing currents − =0 R   Vn2 − Vn1 =0 algebraic sum of other outgoing currents + R 13

(3.2)

14

Revision: 1.11

As we can see from Eq. (3.1) and Eq. (3.2) resistor only affects the conductance matrix G. The MNA stamp for resistor is given by: 

n1  G = ... n2

n1

...

n2

1 R

... ...

− R1

...

1 R

− R1

  

(3.3)

Note that our assumption of the direction of the branch current does not matter. To convince yourself, assume the current flows from node n2 to n1 in the resistor R shown in Figure 3.1. When you apply the principle of current conservation (algebraic sum of outgoing currents is zero) along with Ohm’s law you will end up with the same equations as in Eq. (3.1) and Eq. (3.2)1. When we show how this stamp applies to a circuit everything will fall into place. If you are not a patient person then look at Figure 1.2 and give a closer look at how R2 gets slotted in G matrix in Eq. (1.10). Now compare this to Eq. (3.3). Does something strike you? If yes, great. If not, do not despair we will work through an example to see how this fits. 3.2. Current Source Before we show an example we need to look at the MNA stamp for a current source. This is because a current source along with a resistor will provide us a way to demonstrate a non-trivial fully working circuit. If you are wondering why not a voltage source, there is a reason. Voltage source is a little more complicated to represent compared to current source in our matrix based representation. n2 IS n1 Figure 3.2. Current Source. Note that the arrow points in the direction of node n2 . Unlike resistor, the direction of current matters in a current source.

We will apply MNA to the nodes of the current source as we did to the resistor nodes. For the current source shown in Figure 3.2, at node n1 , applying MNA2 leads to: algebraic sum of other outgoing currents + IS = 0 algebraic sum of other outgoing currents = − IS

(3.4)

1 Doing this exercise is highly recommended. 2 Technically, we are applying only current conservation law. Note current conservation law

along with branch current relationship (Example: Ohm’s law for a resistor) is called Modified Nodal Analysis.

15

Revision: 1.11

and at node n2 we can write: algebraic sum of other outgoing currents − IS = 0 algebraic sum of other outgoing currents = IS

(3.5)

As we can see from Eq. (3.4) and Eq. (3.5) current source, not surprisingly, only affects the current vector I. The MNA stamp for current source is given by:  − IS   I = ... ...  n2 IS n1



(3.6)

3.3. Example Now we have enough expertise to solve any circuit consisting of only resistors and current sources in a systematic fashion. We will show this through an example which by now should be pretty familiar shown in Figure 3.3 and the SPICE way of 20Ω

1

1A

10Ω

2

30Ω

0

Figure 3.3. An example circuit to demonstrate the SPICE way of representing a circuit.

representing the circuit in Figure 3.3 is given below3: * SPICE way of describing a circuit in plain ASCII text R2 1 2 20 R1 1 0 10 R3 2 0 30 IS 0 1 1 .END Now we will build the matrices systematically by reading the SPICE description of the circuit. First we need to find the number of nodes in the circuit other than the reference node. In our example, there are 2 nodes. Thus the size of G matrix is 2 × 2. Note that the G matrix is a square matrix. The size of I vector is 2 × 1. 3 An attentive reader would see that SPICE description is not in the same order as in Chapter 2. We have intentionally scrambled the way it is just to demonstrate that the order in which the circuit elements are listed does not matter to our systematic construction.

16

Revision: 1.11

(1) Initialize both G matrix and I vector to zero. 1 2 1 G= 2

I=

0 0 0 0

1

0

2

0

!

!

(2) Skip the first line in the SPICE description. Recall that the first line in SPICE is required to be a comment. Now read the next line in the SPICE description R2 1 2 20 and apply the MNA stamp in Eq. (3.3). The MNA stamp can be written in C as: G[n1][n1] += 1/R; G[n1][n2] -= 1/R; G[n2][n1] -= 1/R; G[n2][n2] += 1/R; 1 G=

1

0+

2

0−

1 I= 2

2 1 20 1 20

0− 0+

0 0

1 20 1 20

!

!

(3) The next line in our SPICE description is R1 1 0 10 When one of the node turns out to be a reference node then it simplifies things. Assuming without any loss of generality that the non-reference node is n1 and the reference node is n2, the MNA stamp can be written in C as: G[n1][n1] += 1/R; Basically this translates as drop any code involving the reference node.(Here the reference node is n2). How will you code this? Here goes the pseudocode: if(both nodes are non-reference nodes) { G[n1][n1] += 1/R; G[n1][n2] -= 1/R; G[n2][n1] -= 1/R; G[n2][n2] += 1/R; } else if (only one node is a non-reference node) { // assuming n1 is the non-reference node G[n1][n1] += 1/R;

17

Revision: 1.11

// what happens when n2 is the non-reference node ? } else { // both nodes are reference nodes error; } Now back to our example. 1 G=

1

1 20

+

2 1 10

1 − 20 1 20

1 − 20

2

I=

1

0

2

0

!

!

(4) The next line in our SPICE description is R3 2 0 30 This is the same as the previous step. 1 G=

1 2

1 20

+

2 1 10

1 − 20 1 20

1 − 20

1 I= 2

0 0

+

1 30

!

!

(5) The next line in our SPICE description is IS 0 1 1 The MNA stamp for current source can be written in C as: I[n1] -= IS; I[n2] += IS; Note that by IS we mean the value of the current source and here it is 1 A. As we discussed earlier, if we see a reference node then drop any line using the reference node. 1 G=

1 2

1 20

+

2 1 10

1 − 20

1 − 20

I=

1 20

1

1

2

0

!

+

1 30

!

(3.7)

(3.8)

Compare the G matrix and I vector to Eq. (1.11). Are they the same? (6) The next line in our SPICE description is .END

18

Revision: 1.11

We are done. We have systematically constructed a circuit consisting of resistors and current sources. It does not matter how many number of resistors or current sources we have, as long as the circuit consists of resistors and current sources alone we can build G matrix and I vector systematically and solve for the unknown voltages. We hope this is real simple and lots of fun. 3.4. Exercise We have come to a point where we can start to write code. We would suggest C++ to code and extensively use its Standard Template Library (STL). There are many books around our personal favorite is the book by Koenig and Moo [9]. This is what you have to code: (1) Read the input SPICE description of a circuit which we will refer to as netlist. (2) Systematically build G matrix and I vector after reading every line in the netlist. (3) Find the unknown nodal voltages V by solving GV = I. Right now we can do this step by calling Matlab or Octave from our C++ code. Later on, we will build our own solver. (4) Best of luck! 3.5. More on reference node We had promised earlier in Chapter 1 that we will talk about the reference node in terms of matrices. Here we keep up that promise to certain extent. Assume that the reference node is not a reference node for now. Let us see what happens to the MNA formulation for the circuit in Figure 3.34. 0 0



1 10

+

1 30

 1 G = 1  − 10 1 2 − 30

1

2

1 − 10

1 − 30

1 10

+

1 20

1 − 20

  0 −1   I = 1 1  2 0

1 − 20 1 20

+

1 30

   

(3.9)

(3.10)

Now is G a non-singular matrix? To find if a matrix is singular the simplest way is test the determinant. If the determinant is zero then it is singular. There is a more elegant way is, to test if the rows (columns) are independent. An interested reader can refer to Prof. Gilbert Strang’s book on Linear Algebra [10]. The best part is his lecture videos are available online5. Basically singularity means we have redundant information and by throwing out the redundant information we will be able to solve the system of equations in an unique way. 4 Just apply MNA stamp to every circuit element in the SPICE description disregarding the reference node. 5 http://web.mit.edu/18.06/www/Video/video-fall-99-new.html

Revision: 1.11

19

Here are the interesting questions to ponder over: (1) If the matrix G is singular matrix then can we solve for GV = I? How will you make this system of equations solveable?6 (2) How to get from Eq. (3.9) to Eq. (3.7)? In other words, what happens when 0 is set as a reference node? (3) What happens when node 2 is set as the reference node? What are the nodal voltages at the nodes 0 and 1? Does the branch currents change when the reference node changes from 0 to 1?

6 One way to think about singularity is the rank of a matrix. To make it solveable, we have to make the G matrix non-singular. Hint: We need to eliminate some rows or columns. This can be done by making one of the nodes a reference.

Bibliography [1] Leon O. Chua and Pen-Min Lin. Computer-Aided Analysis of Electronic Circuits: Algorithms and Computational Techniques. Prentice Hall Professional Technical Reference, Eaglewood Cliffs, NJ, USA, 1975. [2] Jiˇr´ı Vlach and Kishore Singhal. Computer Methods for Circuit Analysis and Design. Van Nostrand Reinhold, New York, NY, USA, 1993. [3] Lawrence T. Pillage, Ronald A. Rohrer, and Chandramouli Visweswariah. Electronic Circuit & System Simulation Methods. McGraw-Hill Professional, 1994. [4] Reid Harrison. Introduction to MOSFET Operation. The University of Utah, Spring 2007 [Online; accessed 12-June-2007]. http://www.ece.utah.edu/~harrison/ece5720/Intro.pdf. [5] Wikipedia. Electric current — Wikipedia, the free encyclopedia. [Online; accessed 12-June2007]. http://en.wikipedia.org/wiki/Electric_current. [6] Ernst Adolph Guillemin. Introductory Circuit Theory. John Wiley & Sons, New York, USA, 1953. [7] R Development Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria, 2006. http://www.R-project.org. [8] Ross Ihaka. Statistics 120 - Information Visualisation. The University of Auckland [Online; accessed 05-July-2007]. http://www.stat.auckland.ac.nz/~ihaka/120/. [9] Andrew Koenig and Barbara E. Moo. Accelerated C++: practical programming by example. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2000. http://www.acceleratedcpp.com/. [10] Gilbert Strang. Introduction to Linear Algebra. Wellesley-Cambridge Press, 1998.

21

BLAND: A Circuit Simulator Anand Ramalingam and ...

The Eq. (1.2) can be described as, algebraic sum of water flowing out is zero. The same idea can be applied to electric ... For more details, please refer to wiki article [5]. Also, this is an example which shows that ... It will involve software engineering, linear algebra and most importantly fun. 1.2.1. Conservation of Current.

198KB Sizes 1 Downloads 220 Views

Recommend Documents

Implementation of a Symbolic Circuit Simulator for ... - Semantic Scholar
as a simulator for large network analysis due to their complexity and ..... pairs have different topologies, they lead to two identical sub-GRDDs. We call such ...

Sidelinesoft NL5 Circuit Simulator v2.0.1 Incl Keygen-CRD [TorDi ...
Click the setup file if prompted and the online launcher will automatically .... Displaying Sidelinesoft NL5 Circuit Simulator v2.0.1 Incl Keygen-CRD [TorDi .pdf.

Anand Balakrishnan - GitHub
Relevent Coursework Algorithm Analysis and Design, Operating Systems, Microprocessors, Real-time and Embedded Systems,. Data Structures, Signals and ...

ERate BLAND Broadband.pdf
ERate BLAND Broadband.pdf. ERate BLAND Broadband.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying ERate BLAND Broadband.pdf.

Prof. Anand Kumar.pdf
students about various aspects of power, culture, poverty, society, media and social change,. including globalization. His current research work includes political ...

triprobit and the GHK simulator: a short note
triprobit and the GHK simulator: a short note. Antoine Terracol∗. 1 The trivariate probit. Consider three binary variables y1, y2 and y3, the trivariate probit model supposes that: y1 = { 1 if Xβ + ε1 > 0. 0 otherwise y2 = { 1 if Zγ + ε2 > 0. 0

A Site-Specific MIMO Channel Simulator for Hilly and Mountainous ...
A Site-Specific MIMO Channel Simulator for Hilly and Mountainous Environments.pdf. A Site-Specific MIMO Channel Simulator for Hilly and Mountainous ...

Sandra Bland Wrongful Death Lawsuit.pdf
Count V - Texas Department of Public Safety – Vicarious Liability for Brian Encinia's Willful. and Wanton Conduct – Survival. Case 4:15-cv-02232 Document 1 ...

R. Sai Anand
M.Eng. IISc Bangalore born on 26. May 1976, in India the title ... The Chairman of the Department of. Information Technology and Electrical Engineering. Prof.

bland diet food list pdf
Page 1 of 1. File: Bland diet food list pdf. Download now. Click here if your download doesn't start automatically. Page 1 of 1. bland diet food list pdf. bland diet ...

Goat simulator 2
The punisher:warzone.This day and age.15407900600 ... Photoshop cc 64 bit 2015.Beginning android app pdf. ... Pdf dwg converter.Neon joe 720p.Crossing ...

A Circuit Representation Technique for Automated Circuit Design
automated design, analog circuit synthesis, genetic algorithms, circuit .... engineering workstations (1996 Sun Ultra), we present evolved circuit solutions to four.

October 20, 2015 ANAND ARYA AND ANR - indianemployees.com
Oct 20, 2015 - on an area situated next to Nizamuddin Bridge and Behind I.P. Power .... It is explained that in view of the orders passed by the National Green.

Xcelium Parallel Simulator - Cadence
views. Shown here: Context-aware activity for finite state machine analysis. .... are big misses that can escape IP and subsystem .... External Data ... Plan. Figure 6: The vManager platform's advanced verification methodology control cycle ...

Output buffer circuit and integrated semiconductor circuit device with ...
May 16, 2007 - main driver has at least a pair of a ?rst p-channel MOS transistor and a ?rst n-channel MOS transistor for driving a load according to the data, ...

(www.entrance-exam.net)-Institute of Rural Management Anand ...
11. The Ministerial Conference of the world Trade. Organization was held at Cancun, Cancun is located in ____. (1) Uruguay (2) Venezuela (3) Mexico. (4) Honduras (5) Bahrain. Page 3 of 14. Main menu. Displaying (www.entrance-exam.net)-Institute of Ru

untouchable mulk raj anand pdf
Page 1. Whoops! There was a problem loading more pages. untouchable mulk raj anand pdf. untouchable mulk raj anand pdf. Open. Extract. Open with. Sign In.

Cheap Home Security Led Tv Simulator Anti Thief Tv Simulator ...
Cheap Home Security Led Tv Simulator Anti Thief Tv S ... Security Device Free Shipping & Wholesale Price.pdf. Cheap Home Security Led Tv Simulator Anti ...

retromezcla: a dynamic stirred tank reactor simulator
Dr. Jorge A. Velásquez. Dept. of Chemical Engineering. Universidad Pontificia Bolivariana. Circular 1ª #70 - 01. Medellín, Antioquia. Colombia [email protected]. Tel. (574)-4159020 Ext. 9598. Retromezcla, page 1. Page 2. ABSTRACT. Retromezc

anand kumar digital electronics pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. anand kumar digital electronics pdf. anand kumar digital electronics pdf. Open. Extract. Open with. Sign In.

a simulator for differential msk direct sequence spread ...
Spectrum) system which operates in a multipath AWGN (Additive White Gaus- sian Noise) ... 1. System Model. A simplified diagram of the system model is shown in Fig. 1. There are two general operation modes of the simulator: (a) end-to-end simulation

HSM and Thales Basics using the Thales Simulator -
A key encrypted under ZMK and exchanged via online messages. The ZPK will .... From a sim perspective its stored in the file called LMKSTORAGE.TXT in the ...