Circuit Theory/Simultaneous Equations/Example 4

From Wikibooks, open books for an open world
Jump to: navigation, search
example 4 circuit

Find everything. Solve with the source represented by the symbol 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[edit]

symbols have been added

Looks like V_s and a resistor are in series, and right most two resistors are in series, so they share the same currents.

Loops[edit]

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[edit]

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 J_1 and J_2.

Count Eq[edit]

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 R and V_s to represent these "knowns."

R = 100 ohms
V_s = 1 volt
V_1 = ? volt
V_2 = ? volt
V_3 = ? volt
V_4 = ? volt
V_5 = ? volt
V_6 = ? volt
i_1 = ? amp
i_2 = ? amps
i_3 = ? amps
i_4 = ? amps
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[edit]

v_1 = i_1 * R
v_2 = i_2 * 2R
v_3 = i_3 * R
v_4 = i_4 * 2R
v_5 = i_5 * R
v_6 = i_5 * 2R

Loop Eq[edit]

L_1: v_1 + v_2 - V_s = 0
L_2: v_3 + v_4 - V_2 = 0
L_3: v_5 + v_6 - V_4 = 0

Junction Eq[edit]

J_1:  i_1 - i_2 - i_3 =0
J_2:  i_3 - i_4 - i_5 =0

Solve the Equations[edit]

Algebra[edit]

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

Differential Equations[edit]

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[edit]

Wolfram Alpha[edit]

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

MuPad[edit]
MathWorks MuPAD solution .. click here for the text to cut and paste .. MuPad Solution contains variable solution, symbolic solution

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[edit]

Matlab solution .. click here to cut and paste

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:

v_1 = i_1 * 100
v_2 = i_2 * 200
v_3 = i_3 * 100
v_4 = i_4 * 200
v_5 = i_5 * 100
v_6 = i_5 * 200
v_1 + v_2 - 1 = 0
v_3 + v_4 - v_2 = 0
v_5 + v_6 - v_4 = 0
i_1 - i_2 - i_3 =0
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.

\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[edit]

Simulation matches.

Power Check

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

(0.001395)*0.2791 + (0.0009302)*.0930 + (0.0009302)*0.1860 +(-.004884)*1 = 0

Adding up the resistive terms get 0.004884 -.004884 = 0

The current through the voltage supply is -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 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[edit]

  • At this point MuPAD and MatLab are taking just about the same amount of time to use.
  • MuPAD attaches symbols to the answers .. creates a better context to interpret the answers
  • MatLab (linear algebra) creates patterns in the input that help check for mistakes
  • Confidence is building that the two ways are enough different, that when the answers match can assume have not made any mistakes
  • The single 1 in the = column is enough to trigger all the currents and voltages in the solution. The one comes from a source. Multiple numbers in this column probably mean there are multiple sources.
  • This circuit looks like course or most significant is on the left, and least significant (smallest) is on the right. Is almost a kind of display system.
  • The simulation does this math also, but it uses a drawing as it's input, then follows the steps above. Even still, confidence in the simulation tool is building.