Using MATLAB: The following ODE models a spring with friction and forcing: y \'\
ID: 3753817 • Letter: U
Question
Using MATLAB:
The following ODE models a spring with friction and forcing:
y'' + y' + 2y = sin(0t)
a) (role of friction in spring-mass system) Use the parameters below:
(i) (Over damped) Make a plot (WITH labels) of (y vs t) with = 5 and = 2.5 (same plot). What's going physically?
(ii) (Critically Damped) Make a plot using = 2.0. Change the initial data - can the graph cross the x-axis more than once? - can you prove your result?
(iii) (Under Damped) Make a plot using = 0.4. What is happening here?
b) (no friction and resonance) use the parameters below:
(i) Make plots of y vs t with 2 = 0.4, 0.6, 0.8, 0.9, 0.99...
(ii) Describe the behavior of the plots as 2 approaches 1. Increase T if you have to in order to see what is going on.
Parameter Value 1 0 0 T 20 dt 0.1 y(0) 0.2 y'(0) -0.5Explanation / Answer
Solution i):
W=1;
Wo=0;
T=20;
myoutput=[ y(2); sin(Wo*t)-2*W*y(2) - 5*y(1) ];
time=[0; 20];
initial=[0.2 ; 0.5];
[t , y]=ode45(myoutput,time,initial);
plot(t,y(:,1);
% Amplitude first Increases drastically then attain equilibrium .
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.