Holooly Plus Logo

Question 8.2: Damped vibrations. In a vibration experiment, a block of mas......

Damped vibrations.

In a vibration experiment, a block of mass m is attached to a spring of stiffness k, and a dashpot with damping coefficient c, as shown in the figure. To start the experiment the block is moved from the equilibrium position and then released from rest. The position of the block as a function of time is recorded at a frequency of 5 Hz (5 times a second). The recorded data for the first 10 s is shown in the figure. The data points for 4 ≤ t ≤ 8 s are given in the table below.

(a) The velocity of the block is the derivative of the position w.r.t. time. Use the central finite difference formula to calculate the velocity at time t = 5 and t = 6 s. (b) Write a user-defined MATLAB function that calculates the derivative of a function that is given by a set of discrete points. Name the function dx = derivative (x, y) where x and y are vectors with the coordinates of the points, and dx is a vector with the value of the derivative \frac{dy}{dx} at each point. The function should calculate the derivative at the first and last points using the forward and backward finite difference formulas, respectively, and using the central finite difference formula for all of the other points.

Use the given data points to calculate the velocity of the block for 4 ≤ t ≤ 8 s. Calculate the acceleration of the block by differentiating the velocity. Make a plot of the displacement, velocity, and acceleration, versus time for 4 ≤ t ≤ 8 s.

\begin{array}{lc}t(\mathrm{~s}) & 4.0 & 4.2 & 4.4 & 4.6 & 4.8 & 5.0 & 5.2 & 5.4 & 5.6 & 5.8 & 6.0 & 6.2 & 6.4 & 6.6\\ x (cm) &-5.87 &-4.23 &-2.55 &-0.89 &0.67& 2.09 &3.31& 4.31& 5.06& 5.55& 5.78& 5.77& 5.52 &5.08\end{array} \begin{array}{lc}t (s)& 6.8 &7.0 &7.2 &7.4 &7.6 &7.8 &8.0 \\x (cm) &4.46 & 3.72 & 2.88 & 2.00 & 1.10 & 0.23 & -0.59\end{array}
8.2
Step-by-Step
The 'Blue Check Mark' means that this solution was answered by an expert.
Learn more on how do we answer questions.

(a) The velocity is calculated by using Eq. (8.7):

\left.\frac{d f}{d x}\right|_{x=x_i}=\frac{f\left(x_{i+1}\right)-f\left(x_{i-1}\right)}{x_{i+1}-x_{i-1}}       (8.7)

\begin{array}{ll} \text { for } t=5 \mathrm{~s}: & \left.\frac{d x}{d t}\right|_{x=5}=\frac{f(5.2)-f(4.8)}{5.2-4.8}=\frac{3.31-0.67}{0.4}=6.6 \mathrm{~cm} / \mathrm{s} \\ \text { for } t=6 \mathrm{~s}: & \left.\frac{d x}{d t}\right|_{x=5}=\frac{f(6.2)-f(5.8)}{6.2-5.8}=\frac{5.77-5.55}{0.4}=0.55 \mathrm{~cm} / \mathrm{s} \end{array}

The 'Blue Check Mark' means that either the MATLAB code/script/answer provided in the answer section has been tested by our team of experts; or the answer in general has be fact checked.

Learn more on how do we answer questions.

Script File

(b) The user-defined function dx = derivative (x, y) that is listed next calculates the derivative of a function that is given by a set of discrete points.

Program 8-1: Function file. Derivative of a function given by points.

function dx = derivative(x,y)

% derivative calculates the derivative of a function that is given by a set

% of points. The derivatives at the first and last points are calculated by

% using the forward and backward finite difference formula, respectively.

% The derivative at all the other points is calculated by the central

% finite difference formula.

% Input variables:

% x A vector with the coordinates x of the data points.

% y A vector with the coordinates y of the data points.

% Output variable:

% dx A vector with the value of the derivative at each point.

n = length (x) ;

dx (1) = (y (2) - y (1))/ (x (2) - x (1));

for i = 2 :n - 1

dx (i) = (y (i + 1) - y (i - 1)) I ex (i + 1) - x (i - 1));

end

dx (n) = (y (n) - y (n - 1))/ (x (n) - x (n - 1));

The user-defined function derivative is used in the following script file. The program determines the velocity (the derivative of the given data points) and the acceleration (the derivative of the velocity) and then displays three plots.

t = 4:0.2:8;
x= [-5.87 -4.23 -2.55 -0.89 0.67 2.09 3.31 4.31 5.06 5.55 5.78 5.77 5.52 5.08 4.46 3.72 2.88 2.00 1.10 0.23 -0.59];

vel = derivative (t,x)

acc= derivative (t,vel);

subplot (3,1,1)

plot (t,x)

subplot (3,1,2)

plot (t,vel)

subplot (3,1,3)

plot (t,acc)

When the script file is executed, the following plots are displayed (the plots were formatted in the Figure Window):

8.22

Related Answered Questions