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: Damped system

  1. Feb 20, 2008 #1
    1. The problem statement, all variables and given/known data

    Plot total energy vs. time graph using MATLAB (damped system)

    wn(the undamped natural frequency) = 2 rad/s
    damping ratio, z = 0.01
    mass = 10kg
    initial displacement = 0.1
    initial velocity = 0

    2. Relevant equations

    KE = (1/2)mv^2
    PE = mgh

    3. The attempt at a solution

    I can get damping coefficient but that's about it...
    I don't really know where to start from...
  2. jcsd
  3. Feb 20, 2008 #2
    Is this for a simple harmonic oscillator? I mean all you really have to do is define your constants and then relate the damped SHO to total energy. As you can presume, you should see your energy die out.

    In the end you should just have something like

    plot(totalEnergy, t),labels,etc.

    Do you have a specific question?
  4. Feb 20, 2008 #3
    Yes it is SHO and...
    Tmax = (1/2)m(Wn*A)^2
    Umax = (1/2)k(A)^2

    Both come out to be 0.2 Joules but I am just stuck.
    I know that the graph should be linear with a negative slope coming down from 0.2 joules but I don't know how to set it up.
    I've solved other questions and I have NO IDEA how I got stuck with this problem. :(

    (PE and KE goes back and forth like sin graphs except they go opposite direction...and I know it's underdamped(I don't know if that has anything to do with this problem.)

    Also, I can figure out the displacement function, x(t) = A sin (wt + phi) but I don't think that's needed;
    Last edited: Feb 20, 2008
  5. Feb 20, 2008 #4
    So you know that the potential energy is


    and the kinetic energy has a couple form you can use, one of which is


    Let matlab do the all the work for you.
  6. Feb 20, 2008 #5
    Total energy = T - U or U - T...then it's always 0
    I don't get it;

    input k, x, and m.
    then for x dot, x/t where t=0:0.01:10;

    total energy = T - U

    well that doesn't work...
    Last edited: Feb 20, 2008
  7. Feb 21, 2008 #6
    Total energy is kinetic plus potential.

    I mean, I don't really know how your class is structured or anything, so I don't know where to start helping. If I were to start on this problem I would separate the second order ode into a system of first odes, and the use ode45 to solve the two. Use the results from those to add the potential and kinetic energies for the plot.
  8. Feb 21, 2008 #7
    i only see x dot...where's 2nd ODE come from?

    input k, x, and m.
    then for x dot, x/t where t=0:0.01:10;
    total energy = KE + PE

    Why does my graph look so strange though...
    The graph shows that my TE is infinity at t=0 and TE approaches to 0 after t=1.
    Isn't my KE and PE should be fluctuating above TE = 0 like a sine/cosine graph so that TE is constantly decreasing linearly?
    I have PE as constant, which doesnt make sense neither;
    Last edited: Feb 21, 2008
  9. Feb 21, 2008 #8
    Where does this 40 and .1 business come in?


    %if you don't even have to solve for x and merely plug in
    x = stuff;
    xdot = derivative(stuff);
    U = .5*k*x^2;
    T = .5*m*abs(xdot)^2;
    totalEnergy = T+U;

    %if you have to solve for x
    u = stuff;
    v = u';
    [t1,x1] = ode45()
    [t2,x2] = ode45()
    U = .5*k*x^2;
    T = .5*m*abs(xdot)^2;
    totalEnergy = T+U;

    all you really have to do is fill in some things because I gave you a pseudo code
  10. Feb 21, 2008 #9
    40 was the K value and 0.1 is the initial displacement which was x...
    i will give it a try and come back...i dont know how to take derivative in matlab so;;

    is this "stuff" the displacement function in terms of t?

    [edit] another questions that i have is that when i take the derivative, matrix dimensions decrease by one so that i can't add them.

    TE=T+U; <- error!
    Last edited: Feb 21, 2008
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook