# Second Order Circuit Analysis - Mesh - Issue with DE Setup

1. May 18, 2010

### ghoti

Hi,

I am sure I have mistaken my DE setup or my initial conditions assumption.

1. The problem statement, all variables and given/known data
[URL]http://ivila.net/E8.png[/URL]
R1 will be the middle Resistor
R2 the top one.

2. Relevant equations
i1' + R1/L i1 = R1/L i2
i2(R1+R2)*1/(R1) + 1/(R1*C)*integral(i2)=i1

3. The attempt at a solution
My initial conditions are i1(0) = 1A
Vl = L di1/dt
at (0+) VL = 0 therefore L di1/dt = 0 therefore di1/dt = 0
i1'(0) = 0
Substitute for i1 I end up with sqrt(2)exp(-2)cos(t+45')

Last edited by a moderator: Apr 25, 2017
2. May 21, 2010

### vela

Staff Emeritus
Your first initial condition, i1(0) = 1A, is fine, but your second one, vL(0+)=0, is wrong. The current through an inductor must be continuous, but the voltage across it doesn't have to be.

The opposite is true for capacitors. The voltage must be continuous, but the current doesn't have to be. So the second initial condition would be vC(0) = 1 V.

3. May 22, 2010

### ghoti

Thanks vela, I have changed my working however I am still tragically stuck.

for the mesh, is = i1

initial conditions
i1(0) = 1A
Vc(0) = 1V

Mesh Equations
$$i_1 = (\frac{R_1+R_2}{R_1})i_2 + (\frac{1}{R_1C}) \int i_2$$
$$i_2 = (\frac{L}{R_1})\frac{di_1}{dt} + i_1$$

Sub (2) into (1)
$$i_1 = (\frac{R_1+R_2}{R_1})((\frac{L}{R_1})\frac{di_1}{dt} + i_1) + (\frac{1}{R_1C}) \int ((\frac{L}{R_1})\frac{di_1}{dt} + i_1)$$

Expand
$$i_1 = ((\frac{R_1+R_2}{R_1})(\frac{L}{R_1})\frac{di_1}{dt} + (\frac{R_1+R_2}{R_1})i_1) + (\frac{1}{R_1C})(\frac{L}{R_1}) (\int \frac{di_1}{dt} + \int i_1)$$

Simplify
$$i_1 = (\frac{L(R_1+R_2)}{R_1^2}\frac{di_1}{dt} + (\frac{R_1+R_2}{R_1})i_1) + (\frac{L}{R_1^2C})i_1 + (\frac{L}{R_1^2C})\int i_1$$

$$i_1 = \frac{L(R_1+R_2)}{R_1^2}\frac{di_1}{dt} + (\frac{(R_1^2C + R_1CR_2 + L)}{R_1^2C})i_1 + (\frac{L}{R_1^2C})\int i_1$$

$$\frac{L(R_1+R_2)}{R_1^2}\frac{d^2i_1}{dt} + (\frac{(R_1^2C + R_1CR_2 + L)}{R_1^2C} -1)\frac{di_1}{dt} + (\frac{L}{R_1^2C})i_1 = 0$$

Check if DE is dimensionally correct.
$$\frac{d^2i_1}{dt} + (\frac{R_1CR_2 + L}{CL(R_1+R_2)})\frac{di_1}{dt} + (\frac{1}{C(R_1+R_2)})i_1 = 0$$

I believe this to be incorrect due to the i1' term with an R/L coefficient, this is not dimensionally correct. CR^2/CLR gives a R/L term (no good) and L/CLR gives a 1/RC term, also no good. My understanding is that this co-ef should be some mixture of $$\tau$$

We will continue just to check

Put in a few numbers,
L = 0.5
C = 0.5
R1 = 1
R2 = 1

$$\frac{d^2i_1}{dt} - 0.5\frac{di_1}{dt} + i_1 = 0$$

$$i_1(0) = 1A$$
$$V_c(0) = 1V$$ therefore $$V_r(0) = 1V$$
$$V_r(0) = V_l(0) = 1V$$
$$V_l = L\frac{di_1}{dt}$$

$$\frac{di_1}{dt} = 2$$

Putting the DE into MatLab (to save some time)
pretty(simplify(dsolve(' D2y-0.5*Dy+y=0' , ' Dy(0)=2' , ' y(0)=1 ' )))
results in,

1/15*exp(1/4*t)*(7*sin(1/4*15^(1/2)*t)*15^(1/2)+15*cos(1/4*15^(1/2)*t))

As predicted, miles off, I am expecting a pair of sine and cosine terms with a common coefficient of 1

4. May 22, 2010

### vela

Staff Emeritus
After you substitute (2) into (1), differentiate the result to get rid of the integral, and let $\tau_C = R_1C$ and $\tau_L = L/R_1$, both of which have units of time. Then you'll have

$$i_1' = \frac{R_1+R_2}{R_1}(\tau_L i_1'' + i_1') + \frac{1}{\tau_C} (\tau_L i_1' + i_1)$$

Collect terms to get

$$\frac{R_1+R_2}{R_1}\tau_L i_1'' + \left(\frac{R_1+R_2}{R_1}+\frac{\tau_L}{\tau_C}-1\right)i_1' + \frac{1}{\tau_C} i_1 = 0$$

It's pretty easy to see that result is dimensionally correct.

5. May 22, 2010

### ghoti

Working with $$\tau$$ is a much simpler way to work the Algebra. I never thought of carrying around the time-constants are pairs but it makes complete sense. thankyou! should save me a lot of paper if nothing else.

I re-worked my solution from my initial mesh equations to your final result but I am confused about the final DE.

Does the $$\frac{\tau_L}{\tau_C}$$ term not reduce to dimensionless?

Last edited: May 22, 2010
6. May 22, 2010

### vela

Staff Emeritus
Yes, that combination is dimensionless as is (R1+R2)/R1 and 1.

You also made a mistake deriving di1/dt. Check the signs in your equations.