Notation

Currents will be denoted by letter I, voltages by U, and potentials by V. Lowercase letters denote voltages and currents in the time domain, i.e. i(t) and u(t). Capital letters with uppercase indices denote operating point (DC) voltages and currents, i.e. UCE and IC. When subscripts are numbers we denote the DC voltages and currents with an additional subscript Q (quiescent), i.e. U12Q and I5Q.

When working in frequency domain we will be using sinusoidal voltages with given magnitude and phase expressed in form of a complexor (i.e. complex value representing a sinusoidal signal). Such voltages and currents will be denoted by a capital letter with lowercase indices, i.e. Uce and Ic. A sinusoidal signal of the form

corresponds to complexor

where j is the imaginary unit (i.e. j2=-1). Note that a complexor does not contain information on the frequency of a signal. One can convert a complexor back to time-domain by applying the following formula

Kichoff's laws

Throughout this series of lectures we are going to assume that our circuits are small compared to the wavelength of electromagnetic radiation that corresponds to the highest frequency occurring in our circuit's response. This is a reasonable assumption for a large class of so-called lumped circuits. Under this assumption we can introduce nodes in our circuit. A node is a point where elements are connected to each other.


Fig. 1: Kirchoff's current law. The sum of currents flowing into/from a node must be zero.

A node must remain electrically neutral (i.e. cannot accumulate charge) when currents flows into a node and out from a node. This requirement arises from charge conservation and is formally stated in Kirchoff's current law (KCL). For a node depicted in Fig. 1 KCL can be written as

By convention we use the positive sign for branch currents flowing out from a node, while for branch currents flowing into a node we use the negative sign. It doesn't matter if, say, i1 actually flows into the node. In such case if we solve for i1 we are going to get a negative value which indicates that the current flows in the opposite direction as denoted in the figure.


Fig. 2: Kirchoff's voltage law. Three independent paths in a circuit with 4 nodes.

Among all nodes in a circuit we designate one to be the reference node. In schematic we usually denote this by connecting a ground symbol to that node. The voltage between two arbitrary nodes is referred to as branch voltage. Of course we are not interested in all n(n-1) branch voltages that can be constructed between n nodes. We are interested only in a subset of m branch voltages that comprises the branch voltages of the circuit's elements.

Suppose a circuit comprises n nodes. At this point a question arises: how many KCL equations one must write to formulate the charge conservation law for a circuit? The answer is straightforward - n. But not all of these equations are linearly independent, i.e. some of them can be expressed as linear combinations of others. Actually only n-1 KCL equations are linearly independent. Due to this we omit writing down the KCL equation for the reference node.

If our assumption regarding the size of the circuit compared to the wavelenth of electromagnetic radiation holds then we can assume that the electric field has no curl. Now choose any closed path through the circuit. Adding up branch voltages along a closed path must always result in zero. This requirement is also referred to as the Kirchoff's voltage law (KVL). Take, for instance, the circuit in Fig. 2. We can define 3 closed paths in this circuit. Adding up the branch voltages along any of the paths should result in 0. For the first path (Fig. 2, left) we can write

We denoted branch voltages where we visited the + sign before the - sign as positive, and the remaining branch voltages as negative. Again, when we solve for a particular branch voltage and get a negative result this means that the actual voltage has its + sign where the - sign is drawn in the schematic.

We can construct two more KVL equations for this circuit (cf. Fig. 2, right).

Again, we can ask ourselves the question: how many KVL equations do I need to write? The answer is not as simple as with KCL equations. But if we assume we have m branch voltages then we need to write m-n+1 KVL equations. And not just any KVL equations. The closed paths used for writing down these equations must be independent. This means that no closed path must be a combination of other closed paths. In Fig. 2 (right) there are two closed path. If we assume another closed path that starts at the + sign of uRC, goes over uR1, uR2, uRE, uBE, uBC, and uRC we get the following KVL equation

we can see that this equation is actually the sum of the previous two equations. This is because the closed path that was used for writing down this equation is a linear combination of the closed paths in Fig 2 (right).

Now let us summarize the unknowns and the equations we constructed so far in Table 1.

UnknownsEquations
We have m branch voltages
b branch currents
n-1 KCL equations (for nodes excluding the reference node)
m-n+1 KVL equations (independent loops)
Total m+b unknowns m equations
We still need b equations
Table 1: Summary of unknowns and equations.

For now do not worry about the missing b equations. We will obtain them later. Let us concentrate on KCL and KVL equations. At this point we are faced with two problems:

  1. How to choose the closed paths for writing down the KVL equations_
  2. There are many branches in a typical circuit resulting in many branch voltages. Can we reduce the number of variables by any means?

To answer these questions let us introduce node potentials. A node potential (or nodal voltage) is defined as the voltage between a node and the reference node. We denote nodal voltages by letter V. The nodal voltage of the reference node is by definition 0. Because we can express any branch voltage as a difference of two nodal voltages we automatically satisfy KVL for any closed path. Think about it! A branch voltage for one branch (between nodes 1 and 2) along a path can be expressed as V1-V2. The next branch (between nodes 2 and 3) can be expressed as V2-V3. When we add up these two branch voltages in a KVL equation the two V2 terms will cancel out. As we finish adding up all the branch voltages along a closed path all nodal voltages will simply cancel out and the KVL equation will be satisfied. This means that if we introduce nodal voltages and express all branch voltages with them we no longer need to write down KVL equations. The summary is given in Table 2.

UnknownsEquations
We have n-1 nodal voltages
m branch voltages
b branch currents
n-1 KCL equations (for nodes excluding the reference node)
KVL equations are satisfied by construction
m branch voltages expressed with nodal voltages
Total n-1+m+b unknowns n-1+m equations
We still need b equations
Table 2: Summary of unknowns and equations after we introduce nodal voltages.

At first sight we just added n-1 unknowns to the system of equations and increased the number of equations that originate from KVL to m. But if we look closely, we can immediately eliminate m branch voltages from the system by substituting the expressions for m branch voltages in the remaining equations. We can always do this in a straightforward manner because every branch voltage is a difference of two nodal voltages (if we consider that the nodal voltage of the reference is 0). So Table 2 should actually look more like Table 3.

UnknownsEquations
We have n-1 nodal voltages
b branch currents
n-1 KCL equations (for nodes excluding the reference node)
KVL equations are satisfied by construction
Total n-1+b unknowns n-1 equations
We still need b equations
Table 3: Summary of unknowns and equations after we introduce nodal voltages and eliminate the branch voltages from the system of equations.

This is, of course, great news. Not only we no longer have to choose m-n+1 independent closed paths in the circuit. We just got rid of m-n+1 equations!


Fig. 3: Nodal voltages and branch currents for the circuit in Fig. 2.

As an exercise let us write down the n-1=4 KCL equations for the circuit in Fig. 3. This gives us n-1=4 equations we later refer to as group A.

Now let us also express m=7 branch voltages with n-1 nodal voltages. These equations will be our "surrogate" for the KVL equations. Note that the nodal voltage of the reference node is 0. This gives us m=7 equations we later refer to as group B.

Unfortunately the KCL and the "surrogate" KVL equations are not enough for solving the circuit. We have m=7 branch voltages, n-1=4 nodal voltages, and b=8 branch currents appearing in KCL and KVL equations. All in all we have m+n-1+b=19 unknowns. On the other hand we have only n-1 KCL equations and m branch voltages expressed with nodal voltages (all in all this is only n-1+m=11 equations). We still need b=8 equations to uniquely determine the solution.

What is missing are the so-called constitutive relations of circuit elements. These relations connect branch currents to branch voltages. We refer to these equations later as group C. Let us write down the simple ones first. Resistors are subject to Ohm's law. This gives us 4 equations for 4 resistors.

The voltage source defines the branch voltage of the branch where it is placed. This results in another equation in group C.

Finally, the transistor gives us 3 equations. We are not going to dig into transistor models so we are expressing the collector and the emitter current simply as two nonlinear functions of uBE and uBC. Due to charge conservation the base current must be equal to the difference between the emitter current and the collector current. This yields a total of 3 additional equations in group C.

The n-1+m+b equations from groups A, B, and C are also referred to as the circuit tableau. The summary of the circuit tableau is given in Table 4.

UnknownsEquations
We have n-1 nodal voltages
m branch voltages
b branch currents
n-1 KCL equations (for nodes excluding the reference node) - group A
m branch voltages expressed with nodal voltages - group B
b constitutive relations of circuit elements - group C
Total n-1+m+b unknowns n-1+m+b equations
Table 4: Summary of unknowns and the equations in the circuit tableau.

We can immediately reduce the number of equations in the circuit tableau if we substitute the equations expressing branch voltages with nodal voltages (group B) into the constitutive relations of elements (group C). This leaves us with n-1+b equations. The set of unknowns is reduced to n-1 nodal voltages and b branch currents (Table 5).

UnknownsEquations
We have n-1 nodal voltages
b branch currents
n-1 KCL equations (for nodes excluding the reference node) - group A
b constitutive relations of circuit elements - group B substituted into group C
Total n-1+b unknowns n-1+b equations
Table 5: Summary of unknowns and equations in the simplified circuit tableau.

A further reduction can be achieved if we substitute the resulting constitutive relations of elements into KCL equations (group A). This is possible if we can express the branch currents explicitly with nodal voltages. For the example in Fig. 3 this is not possible. The problem arises because we cannot express the current flowing through the voltage source with branch voltages. To achieve that we would need to solve the circuit tableau which we are trying to simplify without solving it first.

Let us put the voltage sources aside for a moment and focus on circuits without voltage sources (and some other similarly pesky elements) for which we can actually express branch currents explicitly with nodal voltages. Take for instance the circuit in Fig. 4 with n=4 nodes.


Fig. 4: Nodal equations can be written for circuits where all branch currents can be explicitly expressed with nodal voltages.

Let us first write down the n-1=3 KCL equations.

Now let us express the b=7 branch currents with nodal voltages.

Substituting these branch currents into KCL equations yields the final set of n-1=3 equations with n-1=3 unknowns (v1, v2, and v3).

This method of writing down circuit equations based on KCL and explicitly expressed branch currents is also referred to as nodal analysis. The term originates from the fact that the circuit equations are basically the KCL equations that correspond to non-reference nodes. The equations are also referred to as the nodal equations. Solving them results in nodal voltages. Branch voltages can easily be expressed with nodal voltages. It is also fairly easy to express branch currents. Remember we had to explicitly express them with nodal voltages before substituting them into KCL equations.

The equations describing the circuit in Fig. 4 are linear. This is reflected in the fact that all unknowns in the equations appear in linear terms (i.e. as additive terms with a coefficient and unknown raised to the power of 1). In the remainder of this lecture we limit ourselves to circuits with linear equations that contain independent current sources, linear resistors, and linear voltage-controlled current sources. Linear equations can be written in matrix form which is more concise. For the circuit in Fig. 4 the equations in matrix form are

Rows of the coefficient matrix and the right-hand side (RHS) vector correspond to n-1=3 KCL equations for all nodes except the reference node. Columns of the matrix and rows of the vector of unknowns correspond to n-1 unknowns (i.e. nodal voltages). With nodal analysis we managed to reduce the number of equations and unknowns to n-1. The summary is given in Table 6.

UnknownsEquations
We have n-1 nodal voltages n-1 KCL equations - groups B and C substituted into group A
Total n-1 unknowns n-1 equations
Table 6: Summary of unknowns and equations for the nodal analysis.

If we take a good look at this system of equations written in matrix form we can see that individual circuit elements contribute to the matrix and the RHS according to a pattern which we are going to refer to as element footprint.


Fig. 5: Resistor.

Let us, for instance, take a resistor with resistance R connected between nodes k and l (Fig. 5). Its element footprint consists of 4 entries in the coefficient matrix because, generally, a resistor contributes current to two nodes. Due to this the entries are at the crossings of the k-th and l-th row (corresponding to k-th and l-th KCL equation) with k-th and l-th column (corresponding to nodal voltages of k-th and l-th node). Because the coefficient matrix consists of conductances the entries will be ±R-1.

If one of the pins of the resistor is connected to the reference node the element footprint is reduced to


Fig. 6: Independent current source.

The element footprint of an independent current source affects only the RHS vector. Suppose an independent current source draws current I from node k and pushes it to node l (Fig. 6).

If a current source pushes current into the ground node the KCLl contribution is missing. If it draws current from the ground node the KCLk contribution is missing.


Fig. 7: Voltage-controlled current source.

Finally, suppose we have a voltage controlled current source (VCCS) drawing current from node k and pushing it to node l with controlling voltage obtained as voltage between nodes kc and lc (controlling voltage is vkc-vlc). Let g denote its transconductance (Fig. 7). Such a controlled source contributes to the KCL equations of nodes k and l at columns corresponding to the control voltage (i.e. columns kc and lc). Its element footprint is

If one of the source terminals is connected to the reference node, the corresponding row (either k or l) is removed from the footprint. If one of the nodes defining the controlling voltage is the reference node, the corresponding column (either kc or lc) is removed from the footprint.