# Circuit Theory/Simultaneous Equations/Example 4

example 4 circuit

Find everything. Solve with the source represented by the symbol ${\displaystyle V_{s}}$ and with the 100 ohm resistors represented by the symbol R and the 200 ohm resistors represented by the symbol 2R. Then solve numerically.

### Label

Looks like ${\displaystyle V_{s}}$ and a resistor are in series, and right most two resistors are in series, so they share the same currents.

### Loops

loops and the + - added

There are three loops. Remember that the + and - right now are not guessing the polarity of the answer, but are capturing the layout of the circuit.

There are no trivial loops (components in parallel).

### Junctions

junctions identified and current directions chosen that are consistent with the + - polarities

There are two trivial junctions where series components share the same current. There are three non-trivial junctions which result in two junctions that can be used. The two choose to be used were at the top and labeled ${\displaystyle J_{1}}$ and ${\displaystyle J_{2}}$.

### Count Eq

We are being told that the resistor and voltage source have values, but to work towards a symbolic solution. But rather than the resistors all being a separate symbol, they are all have a value of R or 2R. So in terms of symbolic solutions, the goal is to use ${\displaystyle R}$ and ${\displaystyle V_{s}}$ to represent these "knowns."

${\displaystyle R=100ohms}$
${\displaystyle V_{s}=1volt}$
${\displaystyle V_{1}=?volt}$
${\displaystyle V_{2}=?volt}$
${\displaystyle V_{3}=?volt}$
${\displaystyle V_{4}=?volt}$
${\displaystyle V_{5}=?volt}$
${\displaystyle V_{6}=?volt}$
${\displaystyle i_{1}=?amp}$
${\displaystyle i_{2}=?amps}$
${\displaystyle i_{3}=?amps}$
${\displaystyle i_{4}=?amps}$
${\displaystyle i_{5}=?amp}$

There are 11 unknowns. There are 6 equations from the resistors, 3 from the loops and 2 from the junctions. So the problem can be solved explicitly.

### Terminal Eq

${\displaystyle v_{1}=i_{1}*R}$
${\displaystyle v_{2}=i_{2}*2R}$
${\displaystyle v_{3}=i_{3}*R}$
${\displaystyle v_{4}=i_{4}*2R}$
${\displaystyle v_{5}=i_{5}*R}$
${\displaystyle v_{6}=i_{5}*2R}$

### Loop Eq

${\displaystyle L_{1}:v_{1}+v_{2}-V_{s}=0}$
${\displaystyle L_{2}:v_{3}+v_{4}-V_{2}=0}$
${\displaystyle L_{3}:v_{5}+v_{6}-V_{4}=0}$

### Junction Eq

${\displaystyle J_{1}:i_{1}-i_{2}-i_{3}=0}$
${\displaystyle J_{2}:i_{3}-i_{4}-i_{5}=0}$

### Solve the Equations

#### Algebra

The algebra solution is massive, messy, hard to check and doesn't inspire anyone. Not going to attempt it.

#### Differential Equations

There are none in this problem, but three quarters of this course is going over circuits this complex with capacitors and inductors instead of resistors and looking at the differential equations.

#### Symbolic Computations

##### Wolfram Alpha

Wolfram Alpha doesn't work with more than 6 or 7 equations no matter what their form.

MuPAD scaled up to 11 unknowns great. Cutting and pasting made the code typed (click on the link in the caption) much easier than it looks.

#### Numeric Solution

The goal is to do things at least two different ways, just to check work. Since not doing algebra, must create 11 by 11 matrix.

Steps to set up the solution:

• Substitute known values into the equations:

${\displaystyle v_{1}=i_{1}*100}$
${\displaystyle v_{2}=i_{2}*200}$
${\displaystyle v_{3}=i_{3}*100}$
${\displaystyle v_{4}=i_{4}*200}$
${\displaystyle v_{5}=i_{5}*100}$
${\displaystyle v_{6}=i_{5}*200}$
${\displaystyle v_{1}+v_{2}-1=0}$
${\displaystyle v_{3}+v_{4}-v_{2}=0}$
${\displaystyle v_{5}+v_{6}-v_{4}=0}$
${\displaystyle i_{1}-i_{2}-i_{3}=0}$
${\displaystyle i_{3}-i_{4}-i_{5}=0}$

• Organize the equations so that unknowns are in columns, numbers to the right of the equal sign:

Skipping this section, going straight to the matrix. Typing 8 or 9 + 0 over and over again is silly.

• Create two matrices, one square and the other a column with the numbers that are on the right of the equal sign

The pattern has been established, the matrices are huge, repeating them over and over to show the matrix math is not necessary. Just writing the big matrix and going straight to MatLab.

${\displaystyle {\begin{array}{|c|c|c|c|c|c|c|c|c|c|c||c|}i_{1}&i_{2}&i_{3}&i_{4}&i_{5}&v_{1}&v_{2}&v_{3}&v_{4}&v_{5}&v_{6}&=\\\hline 100&0&0&0&0&-1&0&0&0&0&0&0\\0&200&0&0&0&0&-1&0&0&0&0&0\\0&0&100&0&0&0&0&-1&0&0&0&0\\0&0&0&200&0&0&0&0&-1&0&0&0\\0&0&0&0&100&0&0&0&0&-1&0&0\\0&0&0&0&200&0&0&0&0&0&-1&0\\0&0&0&0&0&1&1&0&0&0&0&1\\0&0&0&0&0&0&-1&1&1&0&0&0\\0&0&0&0&0&0&0&0&-1&1&1&0\\1&-1&-1&0&0&0&0&0&0&0&0&0\\0&0&1&-1&-1&0&0&0&0&0&0&0\\\end{array}}}$

### Simulate

Power Check

• ${\displaystyle P=i*v}$
• ${\displaystyle P_{source}+P_{R1}+P_{R2}+P_{R3}+P_{R4}+P_{R5}+P_{R6}+P_{Vs}=0}$
• ${\displaystyle (0.004884)*0.4884+(0.002558)*0.5116+(0.002326)*0.2326+}$

${\displaystyle (0.001395)*0.2791+(0.0009302)*.0930+(0.0009302)*0.1860+(-.004884)*1=0}$

Adding up the resistive terms get ${\displaystyle 0.004884-.004884=0}$

The current through the voltage supply is ${\displaystyle -i_{1}=-0.004884}$. It is negative because it was drawn out of the positive terminal and the computed value was 0.004884. This made the current positive in the ${\displaystyle r_{1}}$ terminal equation, but it is negative with respect to the power supply because of the drawing.

Negative power means is that the power supply was dumping energy into the circuit. Positive power means that energy is leaving the circuit. All of the resistive power was positive. The resistors are where power is leaving the circuit.

### Build Intuition

• At this point MuPAD and MatLab are taking just about the same amount of time to use.