# Circuit Theory/Mesh Analysis

!Non-trivial meshes of the planar circuit labeled 1, 2, and
3.{width="300"}

Mesh analysis is done in the phasor domain.

The mesh analysis method reduces the number of equations and unknowns
one is finding in a circuit.

Kirchhoff\'s method finds all currents and voltages. Mesh analysis only
finds mesh (loop) currents.

Mesh analysis starts with the normal Kirchhoff loop equations:

$$\Delta_{k=1}^n {V}_k = 0$$

and solves terminal equations so that voltage is a function of current,
and then substitutes into the loop voltage equation:

$$v = \Delta I * R$$

$$v = \frac{\Delta I}{C * j\omega} = \frac{\Delta I}{sC}$$

$$v = \Delta I * j\omega L = \Delta I * sL$$

What is $\Delta I$? It is the difference (or addition) of possibly two
mesh currents following through a device. It can be just one current if
the device is not part of two meshes. Devices that are part of two
meshes need the mesh currents added or subtracted (depending on
direction).

$$\Delta I = I_{meshA} - I_{meshB}$$

At first glance mesh analysis may seem trivial, but there are subtle
differences to Kirchhoff\'s exposed when doing the problems:

Mesh currents can be in the same direction or different directions
through the same device. They are not Kirchhoff\'s currents through
individual devices. Without careful labeling of the mesh current
directions on the planar circuit diagram, it is impossible to keep
directions straight.

-   Mesh currents are positive if they are in the same direction of the
    particular Kirchhoff loop equation being written, negative if they
    would cause a negative voltage.
-   Mesh currents are typically CW and dictate the loop equation
    direction.
-   Has to be done in the phasor domain so impedances between nodes can
    be computed.
-   Can have too few equations requiring finding additional equations
    from \"Super Meshes\".
-   Some problems can not be solved. Recognizing these is not trivial.

## Mesh currents

!Figure 2: Circuit with mesh currents labeled as i~1~, i~2~, and i~3~.
The arrows show the direction of the mesh
current.{width="300"}
Mesh analysis works by arbitrarily assigning mesh currents in the
non-trivial loops/meshes. Figure 1 labels the essential meshes with one,
two, and three.

A mesh current may not correspond to any physically flowing current, but
the physical currents are easily found from them. It is usual practice
to have all the mesh currents loop in the same direction.

## Example

center\|framed\|Circuit diagram for use with the Mesh Current example
problem.

The circuit has 2 loops indicated on the diagram. Using KVL we get:

-   **Loop1:** $0=9-1000I_1-3000(I_1-I_2)$
-   **Loop2:** $0=3000(I_1-I_2)-2000I_2-2000I_2$

Simplifying we get the simultaneous equations:

$$0=9-4000I_1+3000I_2$$

$$0=0+3000I_1-7000I_2$$

Solving to get:

$$I_1=3.32mA$$

$$I_2=1.42mA$$

## Setting up the equations

Each mesh produces one equation. These equations are the sum of the
voltage drops in a complete loop of the mesh current.For problems more
general than those including current and voltage sources, the voltage
drops will be the impedance of the electronic component multiplied by
the mesh current in that loop.

If a voltage source is present within the mesh loop, the voltage at the
source is either added or subtracted depending on if it is a voltage
drop or a voltage rise in the direction of the mesh current. For a
current source that is not contained between two meshes, the mesh
current will take the positive or negative value of the current source
depending on if the mesh current is in the same or opposite direction of
the current source.The following is the same circuit from above with the
equations needed to solve for all the currents in the circuit.

$\begin{cases}
\text{Mesh 1: } I_1 = I_s\\
\text{Mesh 2: } -V_s + R_1(I_2-I_1) + \frac{1}{sc}(I_2-I_3)=0\\
\text{Mesh 3: } \frac{1}{sc}(I_3-I_2) + R_2(I_3-I_1) + LsI_3=0\\
\end{cases} \,$\

### Supermesh

!Figure 3: Circuit with a supermesh. Supermesh occurs because the
current source is in between the essential
meshes.{width="300"}
A supermesh occurs when a current source is contained between two
essential meshes. The circuit is first treated as if the current source
is not there. This leads to one equation that incorporates two mesh
currents. Once this equation is formed, an equation is needed that
relates the two mesh currents with the current source. This will be an
equation where the current source is equal to one of the mesh currents
minus the other. The following is a simple example of dealing with a
supermesh.

$\begin{cases}
\text{Mesh 1, 2: } -V_s + R_1I_1 + R_2I_2 = 0\\
\text{Current source: } I_s = I_2 - I_1
\end{cases} \,$

