1. Limited time only! Sign up for a free 30min personal 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!

Homework Help: Differential Equation: Trouble finding constants in PI-regulator

  1. Dec 10, 2011 #1
    Until now, I have come this far:

    The differential equation equals the particular part, and the homogene part:
    [tex]x = x_p + x_h[/tex]

    The homogene part equals the differential equation when set to zero
    \frac{d^2x}{dt^2} + \frac{K_p}{A} \times \frac{dx}{dt} + \frac{K_p}{A \times T_i} \times x(t) = 0

    Converting the derviates into lambda, and inserting values for constants it turns into this:

    [tex]A = 1, K_p = 0,02, T_i = 200[/tex]

    \lambda^2 + \frac{K_p}{A} \times \lambda + \frac{K_p}{A \times T_i} = 0

    Solving the equation with regard to lambda, I get:
    [tex]Lambda_1 = Lambda_2 = -0.01[/tex]

    It is now time to assume the form of the solution of the homogene part, which should be like this:
    [tex]C_1 \times e^{\lambda t} + C_2 \times t \times e^{\lambda t}[/tex]

    C1 and C2 are the constants I have trouble finding
    According to what I have learned, I have to set the whole original equation = starting condition when time = 0 to find them.

    Starting condition: [itex]x(0) = 1[/itex]

    [tex]x(0) = 1 = x_p + x_h[/tex]

    Inserting values for particular and homogene part
    (particular part = 1) (t = 0)

    [tex]x(0) = 1 = 1 + C_1 \times e^{\lambda 0} + C_2 \times 0 \times e^{\lambda 0}[/tex]

    When trying to solve this equation with regards to C1 and C2, I get that C2 is canceled out when multiplying with T = 0.

    The real values of C1 and C2 is found when solving the derivate of the start condition with regards to C1 and C2. The first one is to find the relation between them (example: c1 = -c2 or similar)

    Can someone help me out here?
    Last edited: Dec 11, 2011
  2. jcsd
  3. Dec 10, 2011 #2

    I like Serena

    User Avatar
    Homework Helper

    Hi Twinflower! :smile:

    Try using curly braces {} for the parts you want to keep together.
    (Fixed it in your post.)

    Hmm, that's not how I learned it.
    I'm used to first solving for the particular solution.

    For that you would have to restart with the entire differential equation, meaning the part that is dependent on t, but not on x(t), which is the inhomogeneous part.

    Or don't you have such a part?

    Assuming you have no inhomogeneous part, you should do it like this:

    [tex]x(0) = 1 = C_1 \times e^{\lambda \cdot 0} + C_2 \times 0 \times e^{\lambda \cdot 0} = C_1[/tex]

    This way, you have solved one constant, but you still have the freedom of a second constant.
    To find the second constant, you need another constraint.
    For instance x'(0) if you have that.

  4. Dec 11, 2011 #3
    I'm not entirely sure about this, but maybe what you call the inhomogeneous part is what I call the particular part.

    Or do you refer to the part that the entire differential equation equals to?

    In that case; This is the entire differential equation after setting it up:
    \frac{d^2x}{dt^2} + \frac{K_p}{A} \times \frac{dx}{dt} + \frac{K_p}{A \times T_i} \times x(t) = \frac{K_p}{A\times T_i} \times r

    To put this in perspective, this case is about fluid regulation in a tank by the means of a PI-regulator.

    The R is the desired level, and X = the actual level (measured in meter above the tank's floor)
  5. Dec 11, 2011 #4
    and yes, I think I have the x'(0):

    x'(0) = - \frac{V}{A} = r + C_1 \lambda e^{\lambda t} + C_2 t \lambda e^{\lambda t}
    But I am not sure if this is derivated correctly. (the last part with C2 and the 2 t's)
    This will render C2 multiplied with 0 once again
    Last edited: Dec 11, 2011
  6. Dec 11, 2011 #5

    I like Serena

    User Avatar
    Homework Helper

    Yes, this is what I mean.
    To solve it, you need to find a particular solution to the entire differential equation (which is called an inhomogeneous differential equation).
    Since the right hand side is a constant, the particular solution can be "guessed" to be a constant as well (method of undetermined coefficients).

    If you fill in [itex]x=C_0[/itex], you should find this is indeed a solution if:
    [tex]\frac{K_p}{A \times T_i} \times x(t) = \frac{K_p}{A \times T_i} \times C_0 = \frac{K_p}{A\times T_i} \times r[/tex]

    In other words if [itex]C_0 = r[/itex] and therefore [itex]x_p = r[/itex]

    After that, you can resolve your boundary conditions with x(0) and x'(0) ...

    Interesting! :)
    What kind of education do you do to learn about stuff like this?

    Your derivative is not quite right.
    You should apply the product rule for differentiation...
  7. Dec 11, 2011 #6
    I really appreciate that you spend so much time with detailed explanations, Serena :)

    I am studying to bachelor in electrical engineering, but this problem is a large case-study created by my teacher. It is supposed to be some of the foundation for my upcoming exam.

    But thanks for pointing out that I missed the product rule. I am back on track now :)
  8. Dec 11, 2011 #7
    Ok, so I've fixed the last derivative to this:
    x'(0) = - \frac{V}{A} = C_1 \lambda e^{\lambda t} + C_2 t \lambda e^{\lambda t} + C_2 e^{\lambda t}
    Inserting values; r = 1, C1 = 0, V= 0.005, A = 1

    x'(0) = -0.005 = 0 + 0 + C_2 e^0

    -0.005 = C_2

    Now for the final solution;
    C1 = 0
    C2 = -0.005
    Lambda = -0.01
    r = 1

    x = x_p + x_h

    x = 1 - 0.005t e^{-0.01t}
  9. Dec 11, 2011 #8

    I like Serena

    User Avatar
    Homework Helper

    And I believe you are done! :smile:
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook