Assingment 7 - Aubrey Weese

Data Model - Damped Harmonic Oscillator

One of the most challenging problems in scientific computing is data modeling. Data modeling refers to the problem of fitting a parametric model to existing data for some phenomenon. For instance, let us consider the motion of a simple harmonic oscillator for which the motion is damped. The equation of motion (position xth as a function of time t) for a damped harmonic oscillator is given by

xth = A e (-bt/2m) cos(wt + d) + C ,

where A is the amplitude of the oscillator, b is the damping coefficient, m is the mass of the oscillating object, w is the angular frequency, d is the phase shift, and C is the offset.

The purpose of this exercise is to estimate the above unknowns using some observed data.


Procedure

  1. Download the file dhm.dat from /tmp directory of physics.gmu.edu to your PC.
  2. Open the Excel and read the data in.
  3. As you notice there are two columns. The first column is the data for time in seconds and the second column is the data for position in meters. Plot x vs time.
  4. Take the first derivative of the position with respect to time.
  5. Take the second derivative of the position with respect to time.
  6. Determine the times corresponding to the maximum positions.
  7. Make a table that contains all the maximum positions with their corresponding times.
  8. Estimate the value of C from the plot you made in Step 3.
  9. Plot the maximum positions vs maximum times and determine the value of b and A given m = 197.27 grams.
  10. From the table in Step 6, determine the values of w and d.
  11. Calculate the RMS error using the equation

    e = {(1/N) i=1SN [xth(i) - x(i)]2 }1/2

  12. Plot xth vs time and x vs time on the same plot.
  13. Adjust the value of C to make the RMS error minimum.
  14. Comment on how you would change the above procedure to improve the calculations of the parameters.
  15. Post a web page that contains the information regarding the parameters you found and e. Include your comments and the plot from Step 13.

Done. See Damped.htm