# Circuit Theory/Phasors/Examples

The steps have changed due to the introduction of phasors and differential equations.
* Label currents and voltages
* Count knowns and unknowns
* Write terminal equations
* Write loop equations
* Write junction equations
* Solve equations:
** Phasors: Time domain -> phasor domain -> Time Domain
** Laplace: Time domain -> s domain ->Time Domain
** Symbolic & Numeric for both
* Simulate (circuitlab everycircuit circuit falstad animations)
* Voltage/Current Check
* Power Computations
* Build Intuition
All these problems assume steady state. Later this will be called the "particular" solution to a first-order linear differential equation. Click on the equations to see where they came from. Matlab and Mupad files are included for every calculation. Clicking on the homogeneous equations will jump forward in the course.
| Calculus | diff eq | Constants | Power Factor | LR Solution |
| ${\textstyle d \over dt}$ | $\textstyle \surd$ | A, C found after homogeneous | .93 | $V_{s}(t)=120{\sqrt {2}}cos(377t+120^{\circ })$ $V_{s}(t)=R*i(t)+L*{d \over dt}i(t)$ $i_{S_{P}}(t)=15.9cos(377t+1.73)$ $i_{S_{H}}(t)=2.5781*e^{-{\frac {t}{0.001}}}$ |
| ${\textstyle d \over dt}$ | | none | .93 | $I_{s}(t)=120{\sqrt {2}}cos(377t+120^{\circ })$ $V_{s}(t)=R*i(t)+L*{d \over dt}i(t)$ $V_{s}=1814cos(377t+2.45)$ already solved ... no differential equation! |
| ${\textstyle \int }$ | | $\textstyle \surd$ | .37 | $V_{s}(t)=120{\sqrt {2}}cos(377t+120^{\circ })$ ${dI_{s}(t) \over dt}={\frac {1}{R}}{dV_{s} \over dt}+{\frac {V_{s}}{L}}$ $i_{s}(t)=48.1cos(377t+0.844)$ already solved ... no differential equation! |
| ${\textstyle \int }$ | $\textstyle \surd$ | A, C found after homogeneous | .37 | $I_{s}(t)=120{\sqrt {2}}cos(377t+120^{\circ })$ ${dI_{s}(t) \over dt}={\frac {1}{R}}{dV_{s} \over dt}+{\frac {V_{s}}{L}}$ $V_{S_{P}}(t)=599\cos(377t+3.30)$ $V_{S_{H}}(t)=-258*e^{\frac {-t}{0.0001}}$ |
Capacitor problems require a change in symbols. Swap current and voltage sources, swap parallel and series, and replace inductor with capacitors and the math is the same. ICE instead of ELI .. for both the terminal relations and phase check.
More complicated problems involve multiple reactive components rather than just one. This could lead into doing the above math within the context of solving multiple differential equations simultaneously ... which is easy to do with phasors.
       2 resistor, capacitor, inductor, voltage source
       3R, 2C, 3L, current and voltage source
Here is a summary of what was learned about matLab.
* Internally, matLab keeps complex numbers in rectangular form.
* The angle command converts complex numbers into an angle less than $\pi$, adding a negative sign if in the 3rd or 4th quadrant.
* Adding angles in the time domain requires mentally picturing phasors to figure out what is going on. The goal is to add numbers together no matter what. This may result in answers greater than $\pi$ or $2\pi$ which will require some conversion back to a positive or negative number smaller than $\pi$.
* The laplace transform just converts the real into a cos term and the imaginary into a sin term with random + and - signs.
Mupad seems to reduce the number of mistakes, but it is frustrating. So here are some tips:
* Don't have to Mupad subscript command. Mupad distinguishes i1 from i and I1 from I
* Mupad uses "I" for ${\sqrt {}-1)$ rather than matLab's "i"
* Mupad uses "PI" for π rather than matLab's "pi"
* Mupad thinks "j" is a variable, not ${\sqrt {}-1)$
* When Mupad says "fail" with linsolve, most of the time the number of equations does not match the number of unknowns
* When Mupad says "proc" and doesn't solve anything, remove the equal sign so "linsolve=([equations],[unknowns])" reads "linsolve([equations],[unknowns])"
* When Mupad doesn't give numeric answers after entering "numeric::linsolve", look through all of the output for strange symbols you didn't type. Remember that Mupad often changes the font, the capitalization of what you typed when rendering the output.
* The numeric answers from Mupad can be put in the clip board .. treat all the blue output as one line .. drag the mouse across the screen rather than trying to start at the top right and drag to the bottom left, or starting at the top and dragging down.
* So far, can not get numeric answers in polar from within mupad. The mupad abs and arg functions return symbolic answers, but don't see to work on symbols representing variables (with known values), only symbols representing numbers. Use matlab instead.
* In matlab, angle and arg are the same function.