# Circuit Theory/Phasors/Examples/Example 10

Given that the current source is defined by $I_{s}(t)=120{\sqrt {2}}cos(377t+120^{\circ })$, find all other voltages and currents and check power.

### Label Loops Junctions

In a parallel circuit, all devices have the exact same voltage across them.

## Knowns, Unknowns and Equations

    Knowns: $I_{s},R,L$
    Unknowns: $V_{s},i_{R},i_{L}$
    Equations: $V_{s}(t)=R*i_{R}(t),V_{s}=L*{d \over dt}i_{L}(t),i_{R}(t)+i_{L}(t)-I_{s}(t)=0$

## Phasor Symbolic
### time domain

Evaluate the terminal relations in this order:
    $i_{R}(t)={\frac {V_{s}}{R}}$
    $i_{L}(t)=\int {\frac {V_{s}}{L}}dt$
Substitute into this equation:
    $I_{s}(t)=i_{R}(t)+i_{L}(t)$
    $I_{s}(t)={\frac {V_{s}}{R}}+\int {\frac {V_{s}}{L}}dt$
Need to formulate as a differential equation (to keep mathematicians happy) so differentiate all sides (don't let them see you doing this):
    ${dI_{s}(t) \over dt}={\frac {1}{R}}{dV_{s} \over dt}+{\frac {V_{s}}{L}}$
So have a differential equation that can be solved for $V_{s}$.

### Phasor domain

now transform both operations into the phasor domain ..
    ${I_{s}}(t)\rightarrow \mathbb {I} _{s}\rightarrow I_{m}\angle \phi$
    $V_{s}(t)\rightarrow \mathbb {V} _{s}$
    $\int V_{s}(t)dt\rightarrow {\frac {1}{j\omega }}\mathbb {V} _{s}$
So:
    $\mathbb {I} _{s}={\frac {\mathbb {V} _{s}}{R}}+{\frac {\mathbb {V} _{s}}{j\omega L}}$ or $j\omega \mathbb {I} _{s}=j\omega {\frac {\mathbb {V} _{s}}{R}}+{\frac {\mathbb {V} _{s}}{L}}$
Solving for $\mathbb {V} _{s}$
    $\mathbb {V} _{s}={\frac {\mathbb {I} _{s}j\omega LR}{R+j\omega L}}$
Putting in Rectangular form:
    $\mathbb {V} _{s}=\mathbb {I} _{s}*{\frac {\omega ^{2}L^{2}R+j\omega LR^{2}}{R^{2}+\omega ^{2}L^{2}}}$
Putting in Polar form:
    $\mathbb {V} _{s}=\mathbb {I} _{s}{\frac {\sqrt {(\omega ^{2}L^{2}R)^{2}+(\omega LR^{2})^{2}}}{R^{2}+\omega ^{2}L^{2}}}\angle \arctan({\frac {R}{\omega L}})$

### back to time domain

    $V_{s}(t)=I_{m}{\frac {\sqrt {(\omega ^{2}L^{2}R)^{2}+(\omega LR^{2})^{2}}}{R^{2}+\omega ^{2}L^{2}}}\cos(\phi +\arctan({\frac {R}{\omega L}}))$
    There will be an integration constant, but it is impossible to calculate now.
    This is from a differential equation.
    Will calculate the integration constant after adding the homogeneous solution to the above particular solution.

## Phasor Numeric
### time domain

Evaluate the terminal relations in this order:
    $i_{R}(t)={\frac {V_{s}}{10}}$
    $i_{L}(t)=\int {\frac {V_{s}}{.01}}dt$
Substitute into this equation:
    $I_{s}(t)=i_{R}(t)+i_{L}(t)$
So have a differential equation that can be solved for $V_{s}$:
    $I_{s}(t)={\frac {V_{s}}{10}}+\int {\frac {V_{s}}{.01}}dt$

### Phasor domain

    Choosing to do calculation in time domain

### back to time domain

    $V_{s}(t)=120*{\sqrt {2}}{\frac {\sqrt {(377^{2}*.01^{2}*10)^{2}+(377*.01*10^{2})^{2}}}{10^{2}+377^{2}*.01^{2}}}\cos(377t+{\frac {2*\pi }{3}}+\arctan({\frac {10}{377*.01}}))$
    $V_{s}(t)=599\cos(377t+3.30)$
    $i_{R}(t)=59.9\cos(377t+3.30)$
    $i_{L}(t)=159\sin(377t+3.30)=159\cos(377t+1.74)$

## Laplace Symbolic
### time domain

Evaluate the terminal relations in this order:
    $i_{R}(t)={\frac {V_{s}}{R}}$
    $i_{L}(t)=\int {\frac {V_{s}}{L}}dt$
Substitute into this equation:
    $I_{s}(t)=i_{R}(t)+i_{L}(t)$
So have a differential equation that can be solved for $V_{s}$:
    $I_{s}(t)={\frac {V_{s}}{R}}+\int {\frac {V_{s}}{L}}dt$

### laplace domain

now transform both into the laplace domain ..
    ${I_{s}}(t)\rightarrow {\mathcal {L}}\left\{{I_{s}}(t)\right\}$
    $V_{s}(t)\rightarrow {\mathcal {L}}\left\{V_{s}(t)\right\}$
    $\int V_{s}(t)dt\rightarrow {\frac {1}{s}}{\mathcal {L}}\left\{V_{s}(t)\right\}\$
So:
    ${\mathcal {L}}\left\{{I_{s}}(t)\right\}={\frac {{\mathcal {L}}\left\{V_{s}(t)\right\}}{R}}+{\frac {{\mathcal {L}}\left\{V_{s}(t)\right\}}{sL}}$
Solving for ${\mathcal {L}}\left\{V_{s}(t)\right\}$
    ${\mathcal {L}}\left\{V_{s}(t)\right\}=$${\frac {{{\mathcal {L}}\left\{{I_{s}}(t)\right\}}LsR}{R+sL}}$
At this point the Laplace symbolic solution has to stop. The next steps depend upon the form of ${{\mathcal {L}}\left\{{I_{s}}(t)\right\}}$.

### back to time domain

This can not be done without ${{\mathcal {L}}\left\{{I_{s}}(t)\right\}}$. The form of the function ${{\mathcal {L}}\left\{{I_{s}}(t)\right\}}$ determines the inverse mapping.

## Laplace Numeric
### Time Domain

    $I_{s}(t)=120{\sqrt {2}}cos(377t+2.09)$
    $R=10$
    $L=.01$

### Laplace Domain

    ${I_{s}}(t)\rightarrow {\mathcal {L}}\left\{{I_{s}}(t)\right\}={\mathcal {L}}\left\{120{\sqrt {2}}cos(377t+120^{\circ })\right\}=-{\frac {(170.0*(0.5*s+326.0))}{(s^{2}+142129)}}$
    ${\mathcal {L}}\left\{V_{s}(t)\right\}={\frac {\frac {-17.0*s*(0.5*s+326.0)}{(s^{2}+142129)}}{10+.01*s}}$

### Time Domain

    $V_{s}(t)={\mathcal {L}}^{-1}\left\{i(t)\right\}=(-2.58)*e^{-{\frac {t}{.001}}}+97.2sin(377t)-591cos(377*t)$

## Comparison of answers

    $V_{s}(t)=599\cos(377t-2.98)$ ... from numeric solution out of phasor domain
    $V_{s}(t)=599\cos(377t+3.30)$ ... solution from substituting into symbolic time domain
Phase angles are exactly the same place in the third quadrant.

## Simulation

$i_{r}$ is in phase with $V_{s}$ as it should. $V_{s}$ is leading $i_{L}$ through the inductor by ${\frac {\pi }{2}}$ as it should. Everything appears centered around 0 volts, so no constants are in play.

### period check

The period above looks to be between 16ms and 17ms, closer to 17ms. This agrees with the formula:
    $\omega =2\pi *f$
    $f={\frac {\omega }{2\pi }}$
    $T={\frac {1}{f}}={\frac {2\pi }{\omega }}={\frac {2\pi }{377}}=16.7ms$

### magnitude check

The magnitude of V_s is above 500 volts .. although perhaps not 600 volts.

### transient response check

Everything starts out at zero. This means that only the middle to right side of the simulation windows are going to display steady state information that we can compare to calculated values.

### phase check

$I_{s}$ brown, $i_{R}$ blue (with same phase angle as source voltage), and $i_{L}$ (orange). $i_{R}V_{s}$ (blue) leads $i_{L}$ (orange) by ${\frac {\pi }{2}}$. The brown current (the starting point) is the starting point at 2.09 radians. The blue current should lead the brown by 3.30-2.09=1.21 radians which is 69.3 degrees which is about 3.21 ms or 1.5 squares above. This can not be seen at the beginning where the simulation software is dealing with the initial energy embalance, but by the middle of the simulation, the blue is leading the brown by about 1.5 squares. So all is well.

## Power Analysis

The constants are going to add some DC power or real power to this analysis. Without knowing what they are, we can not compute their impact. So for now we stick with phasor domain power analysis:
    $\mathbb {I} _{s}=120{\sqrt {2}}\angle 2.09$
    $\mathbb {V} _{s}=599\angle 3.30$
    $\mathbb {I} _{s}^{*}=120{\sqrt {2}}\angle -2.09$
if :$\mathbb {V} =M_{v}\angle \phi _{v}\quad$, and $\quad \mathbb {I} =M_{i}\angle \phi _{i}$ then
    $\mathbb {S} =\mathbb {V} \mathbb {I} ^{*}={\frac {M_{v}M_{i}}{2}}\angle (\phi _{v}-\phi _{i})={\frac {120{\sqrt {2}}*599}{2}}\angle (3.30-2.09)=10,164\angle 1.21=3,586+9,510j$
and
    $cos(1.21)=.357$
This is a bad power factor. Power factors below .9 will cause you a visit from the utility company or the transformer on the power pole might blow. The utility's apparent power is much larger than what the customer is willing to pay.
| Value | Units | Description |
| $10,164$ | volt-ampere va | apparent power what utility companies manage: peak power they design for, peak power they have to deliver |
| $.357$ | unitless | power factor, ratio of real power to apparent power, ideally 1 |
| $3,590$ | watt W | real, average, active power ... what consumers want to pay for (watt-hours) |
| $9,510$ | volt-amp-reactive var | reactive power ... why not all outlets in a room are on the same circuit breaker |

## Intuition

Should be way to do phasor math in symbol form in mupad ... probably with matrices.