Numerical Iintegration In MATLAB And Working Model 2D Assessment
The System
Figure 1: Spring-mass-damper system
Recall the equation for the system in Figure 1. This will be used as a basis for the MATLAB program.
Also recall the representation of this in terms of damping coefficient:
Use m = 1 kg, k = 40 N/m. Set the initial value for y,y0 = 0.1 m. Evaluate b for the critically damped system. For the Working Model version, make the spring at least 0.2 m long and ensure the mass is clamped securely to it in the model.
Some useful information
Frequency can be expressed in radians/sec (w), or Hz (f), where:
and the period of oscillation is given by:
With no damping, b = 0, the system oscillates at the natural frequency given by wn=(k/m)1/2When damped, provided it is underdamped, it oscillates at the damped natural radiancy
,
or for frequency:
where fn is the damped natural frequency and
The assignment
Your task is to ascertain how well Euler integration can show this and how this compares to a more complicated numerical integration method as used in Solidworks motion. Use the Pendulum example on myLearning as an example of how to generate the report for the comparison.
In the Solidworks motion settings, set the animation frames/s to match that of the time step used in MATLAB so that you can make a fair comparison. Also look at the integrator values.
From your simulations, make a table of results so that you can compare the results for over-damped response. Model values of damping ratio (b) from 0 to 12 kg/s and determine the period of oscillation (T) for each in both the MATLAB Euler integration and Solidworks (SW). From this you can evaluate damped frequency and calculate the analytical (fda) from equation (6). Plot these (frequency versus damping ratio) on a graph.
Evaluate the differences between 1) the analytical and MATLAB and 2) the analytical and SW. Using statistical analysis determine which is more accurate and whether the differences are statistically significant (you will need to use Minitab for this).
You might want to create a spreadsheet of the results in order to plot fd against b. It might look something like this: