1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

RLC Circuit Differential Equation

  1. Dec 2, 2011 #1
    1. The problem statement, all variables and given/known data
    For RLC circuit determine and solve differential equation. R, L, C, E0 values are constants, E = E(t) = E0*sin(ω*t) (E is marked as V in the image). Then make program which calculates values of I(t) when R, L, C, E0, ω are given.
    In short, I need to get function I(t), so I could get values at given time steps to plot graph.


    2. Relevant equations
    Kirchoff's Voltage Law


    3. The attempt at a solution
    Most of this was provided by our teacher, but I'm still having troubles solving it (I generally suck at math).
    We've got this equation which is built off R, L, C, E components ( I = I(t) ):

    LI' + RI + 1/C * ∫Idt = E0*sin(ω*t)

    Then got differencial equation, by finding derivative (to get rid of integral):

    LI'' + RI' + I/C = E0*ω*cos(ω*t)

    Tried to find solution for I by combining one solution and homogeneous equation's solution (I = Ip + Ih):

    Ip = a*cos(ω*t) + b*sin(ω*t), where
    a = -(E0S) / (R2 + S2)
    b = (E0R) / (R2 + S2)
    S = ω*L - 1 / (ω*C)

    This leads to:

    Ip = I0*sin(w*t - omega), where
    I0 = sqrt(a2 + b2) = E0 / sqrt(R2 + S2)
    tg(omega) = - a/b = S/R

    And for homogeneous part we used characteristic equation:

    Ih = C1*eX1*t + C2*eX2*t
    X2 + R/L*X + 1/(L*C) = 0

    Solving equation above using simple discriminant:

    X1 = -R/(2*L) + sqrt(R2 / L2 - 4/(L*C))
    X2 = -R/(2*L) - sqrt(R2 / L2 - 4/(L*C))

    Assuming when t = 0 we have I(t) = 0, inserting this into Ih we get:

    C1 + C2 = 0

    But that's not enough to find C1 and C2 values and this is where I got stuck. I should be able to make program, but I need to at least solve it on paper first. Hopefully someone can help me out here.

    Thank you in advance.
     
  2. jcsd
  3. Dec 2, 2011 #2

    gneill

    User Avatar

    Staff: Mentor

    You know that C1 + C2 = 0, or in other words, C2 = -C1. So eliminate one or the other in your homogeneous solution so you have a single constant. Next, you can differentiate this solution (twice) and plug the derivatives (i.e. I'', I', and I) into your original equation. Set t = 0 there. You should be able to solve for the constant.
     
  4. Dec 3, 2011 #3
    I used C1 = -C2, so my equations became
    Ih = C2(ex2t - ex1t)
    Ih' = C2(x2ex2t - x1ex1t)
    Ih'' = C2(x22ex2t - x12ex1t)

    By "plug the derivatives into your original equation" you mean LI'' + RI' + 1/C * I = E0ωcos(ωt) ? If yes this leads to
    LC2(x22ex2t - x12ex1t) + RC2(x2ex2t - x1ex1t) + 1/C * C2(ex2t - ex1t) = E0ωcos(ωt)

    According to Wolfram Alpha I get some result (X = C2).

    Have I done everything correctly?
     
  5. Dec 3, 2011 #4

    gneill

    User Avatar

    Staff: Mentor

    Yes, that's the idea. But I can't tell if everything done correctly because you only hint at your final expression for C2. But the method looks good.

    Note that your 'substitution efforts' can be greatly simplified if you set t=0 in the equations before you do the substitutions. All the exponentials then become 1's and the algebra can be done without recourse to Wolfram!
     
  6. Dec 3, 2011 #5
    I had troubles with indexes, so I made X = C2, A = x1, B = x2, E = E0, w = ω.

    Well my assignment is to make program which draws graph. R, L, C, E0, ω will be provided, t is time which will be X axis. Therefore I have to keep all these constants and variables to get correct result.
    Currently it plots this. However that's only when discriminant > 0. Still have to solve when it's = 0 and < 0.
     
  7. Dec 3, 2011 #6
    Sorry for double post if it's against rules.

    Now I'm assuming D = R2/L2 - 4/(L*C) = 0, meaning both roots are x = -R/(2*L)
    Therefore homogeneous equation is
    Ih = C1ext+C2ext
    Ih = ext(C1+C2)
    Ih = Bext (C letter is already in use, using B)
    Ih' = Bxext
    Ih'' = Bx2ext
    Trying to plug it into LI'' + RI' + 1/C * I = E0ωcos(ωt)
    L(Bx2ext) + R(Bxext) + 1/C * (Bext) = E0ωcos(ωt)
    Using Wolfram Alpha I find value of B (link). It seems Wolfram assumed 4L != CR2, however according to discriminant it is equal. If I specify it is equal, Wolfram cannot find solution (link).

    What have I done wrong?
     
  8. Dec 3, 2011 #7

    gneill

    User Avatar

    Staff: Mentor

    Automated solvers like Wolfram Alpha can be a bit picky about the assumptions made, and if you aren't explicit they may take it into their heads to make assumptions that you didn't expect, didn't specify, and didn't want!

    B should be a constant that doesn't depend on time. So to solve for B you can specify a convenient value for t. Zero is a convenient value! Specify t = 0 as a condition for the solver. Here's the result.
     
  9. Dec 3, 2011 #8
    Hm... Interesting. For some reason I though I shouldn't specify t value. But this seems to work :D
    Graph looks like this now.

    Last part left, discriminant < 0. It seems my notes have more information on this case.
    Lets say x1 = α + iβ and x2 = α - iβ where α = -R/(2*L) and β = sqrt(R2/L2 - 4/(L*C))

    Homogeneous equation now looks like this:
    Ih = C1e(α + iβ)t + C2e(α - iβ)t

    Using our previous assumption of I(0) = 0 once again we get C1 = -C2
    Ih = C2e(α - iβ)t - C2e(α + iβ)t

    Using Euler's Formula splitting complex exponential into trigonometry functions:
    Ih = C2eαt(cos(βt) - isin(βt)) - C2eαt(cos(βt) + isin(βt))
    Ih = -2C2eαtisin(βt)

    Notes suggest to pick complex C2 to eliminate i next to sin. So lets assume it is complex and join constants: B = 2C2i. In result we have
    Ih = -Beαtsin(βt)
    Ih' = -Beαtcos(βt)β
    Ih'' = Beαtsin(βt)β2

    Plugging into LI'' + RI' + 1/C * I = E0ωcos(ωt)
    L(Beαtsin(βt)β2) + R(-Beαtcos(βt)β) + 1/C * (-Beαtsin(βt)) = E0ωcos(ωt)

    Seems it's too complex for Wolfram to solve (link), I tried second iteration in second window but still same result, it just doesn't substitute α and β, then I tried Maple and result is
    B = - (Eω) / (R * sqrt((R2C-4L) / (L2C)))
    I wonder where all trigonometry disappeared, but result is wrong. Again. Square root is negative and whole idea of getting rid of complex numbers is gone.

    Seems I really fail at this. Could you help out once more please?
     
  10. Dec 3, 2011 #9

    gneill

    User Avatar

    Staff: Mentor

    You'll need to apply the chain rule to differentiate the function, since it is composed of the product of two functions each of which depend upon t. So, for example,

    Ih' = (-α sin(βt) - β cos(βt)) B e(αt)

    After you find the derivatives, plug in t=0 right away! This will clear away a LOT of clutter! Then substitute into the differential equation (and be sure to set t=0 there too!). You should be able to do the resulting algebra by hand.
     
  11. Dec 4, 2011 #10
    I guess I rushed it too much, failed to notice variable in exponent.

    Ih = -Beαtsin(βt) = 0
    Ih' = -Bαeαtsin(βt) - Bβeαtcos(βt) = -Bβ
    Ih'' = -Bα2eαtsin(βt) - 2Bαβeαtcos(βt) + Bβ2eαtsin(βt) = -2Bαβ

    L(-2Bαβ) + R(-Bβ) + 1/C * (0) = E0ωcos(ωt)
    -2LBαβ - RBβ = E0ωcos(ωt)
    Bβ(-2Lα - R) = E0ωcos(ωt)
    B = (E0ωcos(ωt)) / (β(-2Lα - R))
    Plugging in α
    B = (E0ωcos(ωt)) / (β(-2L(-R/(2L)) - R))
    B = (E0ωcos(ωt)) / (β(R - R))

    That's division by zero. Once again I failed somewhere :(
     
    Last edited: Dec 4, 2011
  12. Dec 4, 2011 #11

    rude man

    User Avatar
    Homework Helper
    Gold Member

    You need two equations to obtain C1 and C2.

    One of them you already have, based on i(0) = 0.

    Ok, what can you say about di/dt(0+)? How about at t = 0+, I know the capacitor hasn't had any time to build up any voltage, so E is totally across R and L alone.
    But since i(0+) = 0 also, iR(0+) = 0 so E must all be across L alone. So Ldi/dt(0+) = E(0+).

    Now you have your two equations for C1 and C2. The rest you seem to have a good handle on.
     
  13. Dec 4, 2011 #12

    gneill

    User Avatar

    Staff: Mentor

    It's a good thought, but since the driving function is sin(ωt) , E(0+) is zero, making dI/dt at t = 0+ also zero.
     
  14. Dec 4, 2011 #13

    rude man

    User Avatar
    Homework Helper
    Gold Member

     
  15. Dec 4, 2011 #14

    rude man

    User Avatar
    Homework Helper
    Gold Member

    The driving function in your all-differential equation is not E0sin(ωt). It's ωE0cos(ωt).
    And so you need to rewrite your A and B equations to accord with the equation you're dealing with, not the original integro-differential equation you eliminated (quite correctly, I might add).
     
    Last edited: Dec 4, 2011
  16. Dec 4, 2011 #15

    gneill

    User Avatar

    Staff: Mentor

    While it is true that the function in the differential equation is (ω/L)Eocos(ωt), which yields amps/sec2 (the 'acceleration' of the current), in the original circuit it is a voltage of the form Eosin(ωt) that drives the circuit, and that's where we must find our initial conditions. The current in the circuit and the current modeled by the differential equation must be the same. The initial conditions come from the circuit: At time t = 0 the driving voltage is zero, capacitor is uncharged and the current is zero.
     
    Last edited: Dec 4, 2011
  17. Dec 4, 2011 #16

    gneill

    User Avatar

    Staff: Mentor

    Okay, I've revived some braincells that have been laying dormant for lo these many years.

    If the roots of the characteristic equation are complex, then they are a conjugate pair of the form [itex] a \pm j b [/itex]. The homogeneous solution then looks like:

    [itex] I_h = C_1 e^{a + j b} + C_2 e^{a - j b} [/itex]

    In our case we have [itex] a = -\alpha[/itex] and [itex] b = \omega_c[/itex] where [itex]\omega_c = \sqrt{\omega_o^2 - \alpha^2}[/itex]

    After applying Euler's relations this can be wrestled into the form:

    [itex] I_h = e^{-\alpha t} \left[ (C_1 + C_2) cos(\omega_c t) + j (C_1 - C_2)sin(\omega_c t) \right] [/itex]

    In order for this to yield a real solution constants C1 and C2 must be also be a conjugate pair (Then the sum is real, and the difference imaginary but then multiplied by j to make it real).

    So replace the constants (including the j) with two new arbitrary real constants:

    [itex] I_h = e^{-\alpha t} \left[ c_1 \; cos(\omega_c t) + c_2 \; sin(\omega_c t) \right] [/itex]

    That's the homogeneous solution to work with. It remains to find values for its constants.

    At this point you need to bring the Particular Solution back into the picture. The initial conditions that you obtain from the circuit apply to the sum of Ih and Ip. For example, I noted that the Particular Solution that you derived earlier does not yield a value of zero current for time t = 0. So the difference must be taken up by the homogeneous solution.

    Set t = 0 in both Ip and Ih and equate the sum to the initial current in the circuit (we've determined that it's zero). That should yield a value for c1. Proceed to do the same for dI/dt, where you also know the initial condition. Solve for c2.
     
  18. Dec 4, 2011 #17

    rude man

    User Avatar
    Homework Helper
    Gold Member

    As a preamble to admitting what I did was irrelevant, let me say that I, and you too probably, would never dream of resorting to classical diff eq's for something like this- that's because God gave us Pierre-Simon, marquis de LaPlace!

    Very embarrassingn , nonetheless. :redface:

    Ih = C1*eX1*t + C2*eX2*t

    C1 and C2 are both zero, I think we all have that figured out by now, me last. C1 and C2 are associated with the initial conditions.

    So we look for - what did they call it? - the complementary function or particular integral, I don't remember.

    So we "guess" i(t) = Asin(wt) + Bcos(wt) & stick that into our diff eq., equate coefficients of sin and cos, and away we go. Does that sound better, gneill?
     
  19. Dec 4, 2011 #18

    gneill

    User Avatar

    Staff: Mentor

    Yep. Laplace Transforms are like putting away the bone knife and picking up a chainsaw.
    The Particular Solution will be necessary, yes, but there should still be a homogeneous solution to add to it. The complete solution is always the sum of the two. This particular problem seems to be a bugger because the initial conditions for the circuit are all zero. So there's nothing for the homogenous solution, by the usual procedure, to come to grips with. It's like saying, "here's a circuit with no charges, no currents, and no power source. What will happen?".

    I finally got around that by using both the Particular Solution and the homogeneous solution together with the initial conditions to find the coefficients for the homogeneous solution. Quite a bother. It doesn't help that I'm rather rusty in the "bone knives and bearskins" approach to differential equation solving!

    I took a moment to graph the resulting total solution and compared it to a spice simulation (picked suitable component values). The plots seem to match remarkably well.

    Hopefully the OP will be able complete the problem in a similar manner with the hints given.
     
  20. Dec 5, 2011 #19

    rude man

    User Avatar
    Homework Helper
    Gold Member

    I think you have it right.
    Why don't they teach Laplace before doing these relatively complex networks I can't imagine.

    On the other hand I have to admit loss of memory on the classical way to solve this sort of thing, not good if you're trying to help undergrads. Thanks for your posts.
     
  21. Dec 5, 2011 #20
    Teacher suggested to assume I(0) = I'(0) = 0 and use same equation Ip(0) + Ih(0) = 0 for all cases, I'll post results later, if I manage to get any.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook