- #1

stroustroup

- 14

- 0

## Homework Statement

The switches have been in their initial positions for a long time, and switch to the other position at time t = 0s. Find [itex]v_0(t)[/itex] for all t > 0.

## Homework Equations

See the attached image for the circuit (I had to draw it because I don't have access to the original image, but I am sure the circuit is the same as the one I was given).

S-domain analysis:

Capacitor of capacitance C is equivalent to uncharged capacitor with impedance 1/sC in parallel with current source with current -Cv(0).

Inductor of inductance L is equivalent to inductor with no initial current and impedance sL in series with a voltage source of -Li(0).

## The Attempt at a Solution

The initial conditions are [itex]v_0(0-)[/itex] = 1V and i(0) = 1A (i is current across the inductor)

which you get by replacing C with an open circuit and L with a short circuit (steady-state).

Then the switches go to the other position. I replaced the capacitor and inductor with their equivalent s-domain representations, taking into account their initial conditions, in the second diagram in the image.

Then I used the node voltage method to solve for [itex]V_0(s)[/itex].

[tex]\frac{v_1-4}{1}+\frac{v_1+1}{s}+\frac{v_1-v_0}{1}=0[/tex]

[tex]\frac{v_0-v_1}{1} + \frac{v_0}{\frac{2}{s}} - \frac{1}{2}=0[/tex]

[tex]\left(2+\frac{1}{s}\right)v_1 - v_0 = 4 - \frac{1}{s}[/tex]

[tex]-v_1 + \left(1+\frac{s}{2}\right)v_0 = \frac{1}{2}[/tex]

By Cramer's rule (or any other method),

[tex]v_0 = \frac{5-\frac{1}{2s}}{s + \frac{3}{2} + \frac{1}{s}}[/tex]

[tex]v_0 = \frac{5s-\frac{1}{2}}{s^2 + \frac{3}{2}s + 1}[/tex]

Now I used partial fractions and inverse Laplace transforms to go back to the time domain, which gives me

[tex]v_0(t) = e^{-\frac{3}{4}t}\left(5\cos\left(\frac{\sqrt 7}{4}t\right)-\frac{17}{\sqrt 7}\sin\left(\frac{\sqrt 7}{4}t\right)\right)[/tex]

Now, the thing that worries me is that, altough I can't find errors in my solution, the voltage of the capacitor at t = 0 clearly isn't continuous. The formula above gives 5V for the initial voltage, but it is 1V before the switch opens. This can also be seen from the Laplace transform by using the initial value theorem.

Is it possible for the capacitor voltage to be discontinous? Or did I mess up somewhere, in the circuit transformations for example?

Actually, what happens if you have a capacitor connected in parallel with two batteries of different voltages, but with a switch allowing to choose either voltage source but not both? Moving the switch should cause a discontinuity in the capacitor's voltage, right?