Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A harmonically forced mass-spring-damper system also experiences Coulombic frict

ID: 1868114 • Letter: A

Question

A harmonically forced mass-spring-damper system also experiences Coulombic friction. A figure is shown below. Write a Matlab program to calculate and plot (a) the displacement of the mass, (b) velocity of the mass, and (c) force transmitted to the wall as a function of time. Hand in your hand derived equations of motion, your Matlab m-files and plots as stated above. Assume the mass starts at rest in equilibrium. Your solution should run for times up to the time the mass is clearly in approximate steady-state motion. Make sure the plots are properly labeled with axis labels, titles, grid lines tJ

Explanation / Answer

MATLAB PROGRAM FOR the plots. Put the values accordingly when you run. Here damping is caused due to friction

%Program Body
clear
clc
t= linspace(0,70);
%Input
prompt= 'For damped oscillation consider the following forces F1=-
b*v and F2=k*x. Insert the mass of the particle, damping constant b
and the spring force constant k ';
m= input(prompt);
b= input(prompt);
k= input(prompt);
prompt = 'Insert the initial position of particle ';
a= input(prompt);

%Defining functions
T= 2*m/b;
w= sqrt((k/m)-(b.^2/(4*m.^2)));
f= a*cos(w*t).*exp(-t/T);
v= gradient(f);
A= gradient(gradient(f));
K=0.5.*m.*(v.^2);
p=(0.5).*k.*(f.^2);
E= K+p;

%Obtaing the required subplots

%Displacement
subplot(2,2,1);
t= linspace(0,70);
plot(t,f);
title('Subplot 1: Displacement');
ylabel('Displacement');
xlabel('Time');
grid on;
grid minor;
%Velocity
subplot(2,2,2);
t= linspace(0,70);
plot(t,v);
title('Subplot 2: Velocity');
ylabel('Velocity');
xlabel('Time');
grid on;
grid minor;
%Acceleration
subplot(2,2,3);
t= linspace(0,70);
plot(t,A);
title('Subplot 3: Acceleration');
ylabel('Acceleration');
xlabel('Time');
grid on;
grid minor;

%Energy
subplot(2,2,4);
t= linspace(0,70);
plot(t,E);
title('Subplot 4: Energy');
ylabel('Energy');
xlabel('Time');
grid on;
grid minor;
%Program-end

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote