# General SEcond Order Circuit: 2 Res. - 2 Inductors - Current Source

1. Apr 1, 2007

### VinnyCee

1. The problem statement, all variables and given/known data

Obtain $i_1$ and $i_2$ for t > 0 in the circuit below.

2. Relevant equations

$$V_L\,=\,\frac{di_L}{dt}$$

3. The attempt at a solution

To get initial conditions, I made a second circuit diagram for t < 0.

Since there is no current before t = 0, both initial currents and voltages are zero.

$$i_1(0^-)\,=\,i_1(0^+)\,=\,0\,A$$

$$i_2(0^-)\,=\,i_2(0^+)\,=\,0\,A$$

$$V_1(0^-)\,=\,V_2(0^-)\,=\,0\,V$$

I also made a third circuit diagram for t > 0.

$$i_1\,=\,\frac{di_1}{dt}$$

$$i_2\,=\,\frac{V_1\,-\,V_2}{3\Omega}$$

$$i_3\,=\,\frac{0\,-\,V_1}{2\Omega}$$

KCL @ $V_1$:

$$4\,A\,+\,i_3\,=\,i_1\,+\,i_2$$

$$4\,-\,\frac{V_1}{2}\,=\,\frac{di_1}{dt}\,+\,\frac{V_1\,-\,V_2}{3}$$

KCL @ $V_2$:

$$\frac{V_1\,-\,V_2}{3}\,=\,\frac{di_2}{dt}$$

Here I am stuck, I know that I need to produce a second order differential equation before I can even think about solving this circuit, but I am having trouble finding what equations to use to get such an O.D.E. Please help!

Last edited: Apr 1, 2007
2. Apr 1, 2007

### marcusl

Hmm, you have some errors in your analysis. First off, you'd only get a second order equation if you also had capacitance. This circuit will have only first oder DE's. Second, you need to re-look at your equations. For instance, i1=di1/dt makes no sense (I assume it's a typo?).

Finally a heads up that, you drew the arrow for i3 backwards to the current that will flow through that resistor. It won't matter, just expect a minus sign for i3.

3. Apr 1, 2007

### VinnyCee

Lemme try again!

$$V_1\,=\,\frac{di_1}{dt}$$

$$V_2\,=\,\frac{di_2}{dt}$$

$$i_2\,=\,\frac{V_1\,-\,V_2}{3\Omega}$$

$$i_3\,=\,\frac{V_1\,-\,0}{2\Omega}$$

KCL @ $V_1$:

$$4\,A\,=\,i_1\,+\,i_2+\,i_3$$

$$4\,=\,i_1\,+\,\frac{V_1\,-\,V_2}{3\Omega}\,+\,\frac{V_1}{2\Omega}$$

$$24\,=\,6\,i_1\,+\,2\,V_1\,-\,2\,V_2\,+\,3\,V_1$$

$$24\,=\,6\,i_1\,+\,5\,V_1\,-\,2\,V_2$$

Substituting for $V_1$ and $V_2$:

$$24\,=\,6\,i_1\,+\,5\,\frac{di_1}{dt}\,-\,2\,\frac{di_2}{dt}$$

Now what? I have that pesky $i_1$ that I don't know what to do with!

Last edited: Apr 1, 2007
4. Apr 1, 2007

### Nacer

The following may be a good starter.

Regards,

Nacer.

5. Apr 1, 2007

### VinnyCee

How do you get the last part of your last equation?

$$\frac{di_1}{dt}\,=\,3\,\left(4\,-\,i_1\,-\,\frac{1}{2}\,\frac{di_1}{dt}\right)\,+\,\left(-\frac{di_1}{dt}\,-\,\frac{1}{2}\,\frac{d^2\,i_1}{dt^2}\right)$$

How do you get the last squared term?

$$\frac{di_2}{dt}\,=\,-\frac{di_1}{dt}\,-\,\frac{1}{2}\,\frac{d^2\,i_1}{dt^2}$$

Last edited: Apr 1, 2007
6. Apr 2, 2007

### marcusl

For such a simple circuit, the math gets pretty messy! Here's a solution using state variables. The first eqn is
$$I_0=I_1+I_2+I_3$$
where I_0(t) is the source current (0 for t<=0, i0 later). Since we’re interested in I1 and I2 we'll eliminate I_3 and V_1 from the equations using

$$I_3=I_0-I_1-I_2,$$

$$V_1=I_3 R_3=L_2 \dot{I_2}=I_1 R_1+L_1 \dot{I_1} .$$

I've used symbols instead of actual values for the R's and L's in the branches so you can follow what's what.
We get

$$\dot{I_1}=\frac{R_3 I_0-R_3 I_2 -(R_1+R_3) I_1}{L_1},$$

$$\dot{I_2}=\frac{R_3(I_0-I_1-I_2)}{L_2} .$$

These are two coupled first order DE's in the 4 state variables (Idot and I for subscripts 1 and 2). We know the solutions will be of the form
$$I=a e^{-t/\tau}+b$$
for t>0 so we can substitute this form and solve the resulting 2 simultaneous algebraic equations.

To keep track of the multitude of coefficients it's easiest to put this into matrix form. It's no different then the above, but it’s easier to write the matrix “A” instead of writing a bunch of R's and L's on each line. Define the matrix

$$A=-\left(\begin{array}{cc}(R_1+R_3)/L_1 & R_3/L_1\\R_3/L_2 & R_3/L_2\end{array}\right),$$

whose terms have dimensions 1/second, and column vectors

$$b=\left(\begin{array}{cc}R_3/L_1 \\ R_3/L_2\end{array}\right)$$

and
$$x=\left(\begin{array}{cc}I_1 \\ I_2\end{array}\right),$$

then
$$\dot{x}=Ax+bI_0 .$$

Try the solution
$$x=e^{At}z$$
where the meaning of the exponential is a matrix where each term in A is multiplied by t and the product is exponentiated. This gives

$$\dot{z}=[e^{At}]^{-1} bI_0= e^{-At}bI_0 .$$

I won’t fill in all the steps, it’s straightforward to integrate this, use the initial condition x(0)=(0;0), and get for currents I_1 and I_2

$$x=-i_0 A^{-1} (1-e^{At}) b.$$

Terms in A are negative and have the form of 1/tau where tau is a classic L/R time constant, so the currents start out at zero and grow exponentially, reaching a steady state DC value after a time long compared to the time constants.

EDIT: clean up the equations (as usual...)
EDIT 2: remove erroneous dot from x=exp(At)z
EDIT 3: N.B.: I defined I_3 in same direction as other currents, according to second diagram...

Last edited: Apr 2, 2007
7. Apr 3, 2007

### VinnyCee

I still don't understand, how do you get the last term in this EQ:

$$V_1=I_3 R_3=L_2 \dot{I_2}=I_1 R_1+L_1 \dot{I_1}$$

And what were your calculationis to get $\dot{I_1}$ and $\dot{I_2}$ after that?

8. Apr 3, 2007

### marcusl

First I see I swapped currents--my equations correspond if you swap I1 and I2 in your diagram. Sorry for that.

1. V1 is the sum of the voltage drop across resistor R1 (I1*R1) plus that across the inductor ($$L_1 dI_1/dt$$, which I labelled $$L_1\dot{I_1}).$$

2. From the V1 equation,
$$\dot{I_1}=\frac{I_3 R_3-I_1 R_1}{L_1}.$$
Rearrange
$$I_3=I_0-I_1-I_2$$ Eq. (1)
to give
$$I_3=I_0-I_1-I_2$$ Eq. (2)
and substitute into the equation above to eliminate I3. This gives $$\dot{I_1}$$ in terms of $$I_1$$ and $$I_2$$ as in the post.

Now do the same for I2 from the V1 equation. Get
$$\dot{I_2}=\frac{I_3 R_3}{L_2}$$
and again substitute Eq. (2) to eliminate I3.

Choosing which state variables to work with are a key to making the problem easier. You could work with three coupled equations (I1, I2 and I3) but they contain redundant information as expressed by Eq. (1) so something will eventually drop out. I chose to express $$\dot{I_1}$$ and $$\dot{I_2}$$ in terms of $$I_3$$, which is then eliminated early, leaving two coupled equations expressing $$\dot{I_1}$$ and $$\dot{I_2}$$ in terms of $$I_1$$ and $$I_2$$.

EDIT: equation cleanup

Last edited: Apr 3, 2007
9. Apr 3, 2007

### SGT

No, if you have two energy storing elements that cannot be associated in series or in parallel, you will have a second order system.

10. Apr 3, 2007

### marcusl

Oh! Well, I'm always interested in learning. Can't you consider these two elements to be in parallel? Is my solution incorrect?

11. Apr 3, 2007

### SGT

They are not in parallel since there is a 3 ohm resistor between them.

12. Apr 3, 2007

### marcusl

Ok, if I do this with Laplace transforms I get a different answer. The current source $$I(s)= i_0/s$$ looks into an impedance Z(s)

$$\frac{1}{Z(s)}=\frac{1}{R_3}+\frac{1}{sL_2}+\frac{1}{R_1+sL_1}$$ or

$$Z(s)=\frac{sR_3 L_2(R_1+sL_1)}{sL_2(R_1+sL_1)+R_3(R_1+sL_1)+sR_3 L_2}.$$

The voltage is $$V_1 (s)=Z(s)I(s)$$ which works out to

$$V_1 (s)=\frac{i_0 R_3 L_2(R_1+sL_1)}{s^2 L_1 L_2+s(R_1 L_2+R_3 L_1+R_3 L_2)+R_1 R_3}.$$

This could be a damped oscillation, having both sine and cosine terms, for certain choices of components. With the present values it still looks non-oscillatory.

So the question is: which derivation is correct, and why?

Last edited: Apr 3, 2007
13. Apr 3, 2007

### SGT

The signs of the elements of your matrix A in the state space are wrong. If you correct them, the eigenvalues of the matrix will be identical to the poles of your function in the s plane.
Both solutions are correct, giving real natural frequencies. This means that your circuit is overdamped.

14. Apr 3, 2007

### VinnyCee

A new circuit diagram using the s-domain:

KCL @ $V_1$:

$$4\,=\,i_1\,+\,i_2\,+\,i_3$$

$$4\,=\,\frac{V_1}{2}\,+\,\frac{V_1}{j\omega}\,+\,\frac{V_1}{j\omega\,+\,3}$$

$$8j\omega(j\omega\,+\,3)\,=\,V_1j\omega(j\omega\,+\,3)\,+\,2V_1(j\omega\,+\,3)\,+\,2V_1j\omega$$

$$V_1\,=\,\frac{8j\omega(j\omega\,+\,3)}{j\omega(j\omega\,+\,3)\,+\,2(j\omega\,+\,3)\,+\,2j\omega}$$

Now what?

Last edited: Apr 3, 2007
15. Apr 3, 2007

### VinnyCee

$$i_2\,=\,\frac{8\,V}{j\omega}$$ <----- Is that right?

16. Apr 4, 2007

### marcusl

Hmm, I don't see it. The sign seems right to me, and the solution oscillates only if A is complex.
It's more conventional to replace jomega with s. You need to also transform your source. For a step function I0(s)=4/s, whcih will cancel the leading factor of s in your expression for V1(s).

Now it's just a matter taking the reverse transform of your expression using the Laplace transform table of your choice, for instance, entry 2.27 from
http://www.vibrationdata.com/Laplace.htm

Last edited: Apr 4, 2007
17. Apr 4, 2007

### SGT

I didn´t see the minus sign before the matrix. To find the eigenvalues, that are the natural frequencies of the circuit you must calculate
$$|\lambda I - A| = 0$$

$$\left|\begin{array}{cc}|lambda + 5 & 3\\3 & \lambda + 3\end{array}\right|, =, 0$$

This gives $$\lambda^2 + 8\lambda + 6 = 0$$ which has real roots. So, no oscillation.

18. Apr 4, 2007

### marcusl

Of course, I should have calculated the eigenvalues of A sooner. The state variable and s-domain methods give the same result as expected.

Thx SGT.