Circuits with inductors
We will begin to analyze circuits with inductors in addition to resistors,
capacitors and batteries. The same procedure developed in a previous
chapter will be used, together with the new information we just learned
about inductors. Roughly, this is the procedure again:

Indicate current arrows, and draw (or just imagine) implied voltmeters
consistant with your current arrows for the elements and consistent with
the battery polarity for the batteries.

Write node equations (KCL) and loop rules (KVL).

Write constitutive laws.

Specify the state variable(s).

Find the state equation(s).
Wait! What about state variables??? Before we had one state variable for
each capacitor. What about inductors? Going back to the analogy with mechanical
systems, just like the velocity of the mass is a state variable, the current
in the inductor is also a state variable. So, for electrical systems we
will have one state variable for each capacitor and each inductor.
Here is an example of a simple circuit that we will analyze:
In the circuit above, C = 5 mF, L = 20 mH
(millihenries), and V_{b} = 9 V (volts).
Initially, the capacitor is uncharged: q_{c}(t=0) = 0.
The switch is open. At this point, the current in the inductor must be
zero and the voltages across each element is zero, except for the battery
of course.
Now close the switch:

KCL: i_{B}= i_{C}= i_{L}=
i
KVL: V_{B}+ V_{C}+ V_{L}=
0
Const. Laws: V_{C}= q_{C }/C
V_{L}= L i'_{L}


In the first moment, what do the voltmeters read ( V_{C},
V_{L})? At the first moment, t=0, thus looking at
the constitutive law of the capacitor and rewriting as
we see that V_{C}(t=0) =0. Thus by KVL,
V_{L}(t=0) =V_{B}(t=0) .

What are the values of i_{B}, i_{C}, i_{L}
in the first moment after closing the switch? Again, since t=0,
we rewrite the constitutive law of the inductor as
and we see that i_{L}(t=0) =0. Thus by
KCL, i(t=0) = 0

State Variables: We will choose V_{C} and i_{L}
to be the state variables.

Thus, we will find equations of motion, of the form

i'_{L} = ...

V'_{C} = ...
where the right hand side involves only no dynamic variables except the
state variables i_{L} and V_{C}. To do this,
we use the constitutive laws, continuity equations, loop sum rules, and
of course the definition q' = i.
We will obtain:

We can now put the state equations in matrix form by making a state
twovector x = ( i_{L}, v_{C})^{T}
and a onevector of inputs, B: x' = A x + B

Of course, we can solve this system numerically via the same Euler method
developed for twostate systems in previous domains. This is done by dividing
time up into small time steps, Dt, and assuming
that during each time step the currents and voltages persist at
the values of the previous timestep. Using the notation that x with
an arrow underneath represents the state vector and that the subscript
i indicates time step number i, we obtain the update equation:

So, we start from the initial conditions that V_{C}(t=0)
=0 and i(t=0) = 0 , calculate V'_{C}
and i' at time zero via the state equations, then use the update
equations to obtain the values of V_{C} and i at
the first time step. Then we proceed to use the state equations and update
equation in succession to move forward in time and determine the values
of the state variables at each time step. . . . Easy!
What do you think the solution for this circuit will look like as a
function of time? That is, how will the voltage in the capacitor and the
current in the inductor vary with time? Remember that for a RC circuit,
the capacitor charges up to the voltage of the battery in an exponential
fashion. Once it reaches the voltage of the battery, the current in the
system stops and there is a steady state. What about for this LC circuit?
Remember that in a steady state (V'_{C}=0, i'_{L}=0),
the capacitor wants to have a constant voltage and zero current through
it, while the inductor wants to have a zero voltage and constant current.
These conflicting demands cause oscillatory behavior! This should not be
too surprising if we make the analogy to mechanical systems: an LC circuit
is analgous to a springmass system, which indeed will oscillate. Here
is the solution for the following parameters: C=5*10^(6); Vb=9; L=20*10^(3).
So, what is happening?

the switch is closed and current starts flowing from the battery into the
system

the inductor allows current to begin flowing slowly and to slowly increase
(remember the current in the inductor cannot have discontinuous jumps)

the capacitor begins charging and so voltage increases on the capacitor

at time 0.5 seconds, note that the capacitor has attained the voltage of
the battery (9v). The inductor has also achieved a constant current and
zero voltage state, which is what it desires for steady state. So why does
the system not stop here, like for RC circuits? At this point, the current
is still flowing in the inductor and cannot stop instantly, which is what
the capacitor desires for steady state. So the current in the inductor
begins to decrease slowly, but the voltage in the capacitor continues to
increase since current is still flowing through it.

The current in the inductor reaches zero at 1 second, so the capacitor
is happy with the zero current, but since di/dt is not zero current reverses
direction and the capacitor begins discharging through the battery.

The cycle contines in this fashion such that every time the steady state
desire of one element is satisfied, that of other element is not. Hence
oscillatory behavior.