## Nodal Analysis

### From Syncleus Wiki

##### Unchecked

Nodal Analysis is a technique for circuit analysis where each node (A point where two or more components are connected) is interpreted individually. This analysis can be used to determine the voltage, or any other variable, at any point in the circuit, sometimes as a function of time. It is based on the fact that at any node all the current that enters the node will be equal to all the current leaving that same node. By doing this we are able to reduce each node to an equation, and then, the entire circuit to a set of simultaneous equations.

You should keep a copy of this cheat sheet on hand as you work through these problems. you'll find it makes your life much easier.

## Identifying nodes

First you need to learn how to identify nodes in a circuit. A node is simply the junction where two or more components are connected by wire. The following diagram shows a circuit where the nodes are circled in red:

As you can see the circuit has 4 nodes.

## Analyzing A Node

The next step is to represent each node in your circuit as an equation. If you are doing an analysis in the time domain then this is usually represented as voltage as a function of time Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): V(t) . This can also be done in the frequency domain using Phasors. For this example we will work in the time domain. Let's use the same circuit as the one above:

First we need to assign arbitrary directions for the current flow in and out of each component on the circuit. It doesn't need to match the direction the actual current flows because if we reverse it then the values we get for the current through that component will just come out to be negative. What is important is that if current goes in one side of a component it goes out the other side. Other than that it's completely arbitrary. So lets pick some random directions for the current flow in our diagram:

You probably also noticed the ground point. This is also arbitrary, you can pick any node in the circuit as your ground. Mathematically you represent whatever node you pick as ground to be 0 volts. Depending on which point you pick as ground it will effect the voltage values you get for the other nodes, but they will all be the same relative to each other.

Lets assume ${1}$

varies with time. Therefore it will be represented as a mathematical function: ${1}$


. Now lets look at each node individually and represent them as mathematical functions. In addition let's assign a variable to each node representing that node's voltage.

First let's look at the upper left node labeled ${1}$ , the one connecting ${1}$ , ${1}$ , and ${1}$ . It has three paths for current to flow in/out from each of the three components. We know these three currents will add up to zero because all the current coming into the node (positive values) must equal all the current exiting the node (negative values). With this knowledge we can represent the node mathematically.

The current coming in from ${1}$

is easy, since this is a current source that varies with time it is simply ${1}$


.

We then need to consider the current coming into the node from ${1}$ . Since we know Ohm's Law which states Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): I=V/R

we can represent the current flowing through ${1}$
in these terms. Since ${4}$
is our ground point it will always have a voltage of 0. Therefore the current flowing through ${1}$
is simply:


$\frac {0-V_{{1}}(t)}{R_{{1}}}$ .

Now the current through ${1}$

is a bit more tricky since we need to use differential equations to model a capacitor in the time domain. By looking at our cheat sheet we can find the differential equation representing the current flowing through a capacitor as:


$\frac {\,dv}{\,dt}$

Therefore we represent the current through ${1}$

as:


${1}}{\frac {\,d}{\,dt}}(V_{{1}}(t)-V_{{2}$

Remembering that the sum of these three currents will equal zero we come up with the equation:
${1}}(t)+{\frac {0-V_{{1}}(t)}{R_{{1}}}}-C_{{1}}{\frac {\,d}{\,dt}}(V_{{1}}(t)-V_{{2}$

The final step is to get this into a function representing the node's voltage as a function of time, in other words ${1}$ . To do this we just use some calculus and differential math to solve for ${1}$

in the above equation. Teaching calculus is outside the scope of this document so we will leave it to the reader to solve for ${1}$


. Once we solve for ${1}$

we get the following:


${1}}(t)={\frac {(\int \limits _{0}^{t}(e^{{-{\frac {t}{C_{{1}}R_{{1}}}}}}(I_{{1}}(t)+C_{{1}}({\frac {\,d}{\,dt}}V_{{2}}(t))))\,dt)e^{{{\frac {t}{C_{{1}}R_{{1}}}}}}}{C_{{1}}}$

We now know the voltage of this node (${1}$ ) as a function of time. The only problem is that this function also seems to depend on the voltage functions for the other 3 nodes. That's why the next step is to obtain the voltage as a function of time for the other 3 nodes in the same way we did for this node. Once we do that we will have 4 simultaneous equations and we will have what we need to solve for any variable we want.

Lets quickly go through and perform nodal analysis on the other 3 nodes starting with node ${2}$

${1}}{\frac {\,d}{\,dt}}(V_{{1}}(t)-V_{{2}}(t))+{\frac {V_{{3}}(t)-V_{{2}}(t)}{R_{{2}}}$

Solve for ${2}$

to get:


${2}}(t)={\frac {(\int \limits _{0}^{t}(e^{{{\frac {t}{C_{{1}}R_{{2}}}}}}(C_{{1}}R_{{2}}({\frac {\,d}{\,dt}}V_{{1}}(t))+V_{{3}}(t)))\,dt)e^{{-{\frac {t}{C_{{1}}R_{{2}}}}}}}{C_{{1}}R_{{2}}}$

The last two nodes will be much simpler since they dont connect to the capacitor, therefore we dont need to deal with differential equations. For ${3}$

we get:


$\frac {V_{{3}}(t)-V_{{2}}(t)}{R_{{2}}}}+{\frac {0-V_{{3}}(t)}{R_{{3}}}$

Solve for ${3}$

and you get:


${3}}(t)={\frac {R_{{3}}V_{{2}}(t)}{R_{{3}}+R_{{2}}}$

For node ${4}$

we already know its value is 0 so we can skip this node all together.


We now have 3 simultaneous equations, one for each node of the circuit (except ground). In the next section we will use them to solve for the voltage at any point as a function of time.

## Bringing it all together

The rest of the process should be pretty apparent right now if you're familiar with solving for simultaneous equations. Since this isn't meant to be a math tutorial we won't go into the details on how to solve simultaneous equations.

There are basically two approaches to simultaneous equations. Either substitution, which is more tedious but doesn't require any advanced math, or linear algebra matrices. Generally if you aren't familiar with linear algebra and are doing it by hand you're gonna want to use substitution, which is the same as the process in basic algebra. However if you are familiar with linear algebra and plan to use a calculator to get your answer then matrices are much easier to work with.

The first step is to assign some values to our components (normally this is done for you of course):
${1}}={\frac {1}{100000}$
${1}$
${2}$
${3}$

Similarly we need to define the function governing the current source. We will use a simple sinusoidal current source:
${1}$

Since the scope of this tutorial doesnt include calculus we will show the quick way to do this in maple. To solve for multiple simultaneous equtions in maple simply use the dsolve command like this:
dsolve({<equation 1>,<equation 2>,...<equation n>},[<unknown 1>, <unknown 2>,...<unknown n>])

Maple will now produce the three indepent functions for the 4 nodes. When we plug the values for the components in and solve for the various nodes simultaniously we get the following equations:
${1}}(t)=100sin(t)-{\frac {100}{111}}e^{{-{\frac {1000}{111}}t}}(\int \limits _{0}^{t}(cos(t)e^{{{\frac {1000}{111}}t}$
${2}}(t)={\frac {11000}{111}}e^{{-{\frac {1000}{111}}t}}(\int \limits _{0}^{t}(cos(t)e^{{{\frac {1000}{111}}t}$
${3}}(t)={\frac {10000}{111}}e^{{-{\frac {1000}{111}}t}}(\int \limits _{0}^{t}(cos(t)e^{{{\frac {1000}{111}}t}$

Thats all there is to analyzing a circuit in the time domain!