Chat with us, powered by LiveChat MATLAB Programming | WriteDemy

Question Description

This project consists of two parts.

Your project report should be turned in to the drop box in D2L.

Part I (20 points)

Solution of 2nd Order Homogeneous Differential Equations of the form:

d 2 y a dy by r(t)

dt2 dt

Creating a 2nd Order Function in Matlab

Under the File Pulldown Menu
Select New > mfile(a new window will appear)

Enter the following function into this file and save it

     function dydt = order2(t,y)     dydt = zeros(size(y));     a = 4.0; %coefficient for y’ term     b = -2.0; %coefficient for y term     r = 0.0; %forcing function     dydt(1) = y(2);     dydt(2) = r -a*y(2) - b*y(1);

Explanation of above functiona is the coefficient for dy term

dt

b is the coefficient for y term
r is the right hand side (forcing function) which is equal to 0 in this case

dydt(1) = y(2) (let y = y(1) , y’ = y(2))

dydt(2) = r -a*y(2) – b*y(1); (solve for y(2)’ in terms of r, y and y’ terms)Note: we have converted a 2nd order ODE to two 1st order ODE’s.

In the Matlab window enter the following lines

     >> tspan = [0 2];     >> y0 = [4,-5];     >> [t,y]=ode45(@order2,tspan,y0);     >> plot(t,y(:,1))

tspan provides the range of the time.
y0 provides the initial conditions with its first element = y(0), second element = y’(0)ode45 is a Matlab routine which solves the ordinary differential equation.
The routine gives discrete values of y for each value of t.
These results are then plotted.

Compare your Matlab figure to Fig. 30 on page 55 of your text [Fig. 29 on page 54 of 9th Ed. text].Notice that the damping coefficient is four times of that of Fig. 30 [Fig. 29 in 9th Ed. of text].

Open a word document and type your name at the top of the file.
Copy your m file and Matlab figure into it and type your comments for your observation,

Change the initial conditions in y0. Repeat the final 2 Matlab commands from above. Observe how theplots change. Add the plots with y0 = [4,-1] and y0 = [1,-5] along with comments foryour observations to the word document and submit it to the project 2 D2L drop box.

Save your m-file. You will be modifying this file in the next part.Part II (20 points)

1. Modify your prior code and save the new m-file after modifications, then settspan=[010]andsolve: d2y3.2dy2.56y10te1.6t with y(0)1,y(0)0.

Compare your Matlab figure to Fig. 51 on page 83 of your text [Fig. 50 on page 82 of 9th Ed. text].Open a new word document and type your name at the top of the file and copy
your m file and Matlab figure into it and type your observation.

dt2 dt

2. Resonance
Given an equation of the form m d 2 y c dy ky r(t) where

dt2 dt
m
 , k  48, with initial conditions y(0)  1 and y(0)  0 . Also set tspan = [0 40] and

* *kc2
let r(t) 12cos( t) where   m  4m2 for underdamping case or r(t)  5cos(ot) with

o mk for undamped case. Notice that xy is sqrt(x/y) in Matlab.

Modify your prior code (notice that you need to convert the spring mass ODE into the form ofODE with the coefficient of y” equal to 1, similar to the 1st equation in Part I on page 1 ) and runyour program several times with the following values for c and r(t) (copy the m file and figureof this run to the word file created in 1. of part 1I):

a) c=16 and use an appropriate r(t)
b) c=1.6 and use an appropriate r(t)
c) c=0.16 and use an appropriate r(t)
d) c=0.16 and change r(t) 12cos(0.9*t), i.e. detuning the input frequency 10% away from

the resonant frequency.

Compare to Figs. 55—57 (on page 88—91) [Figs. 54—56 in 9th Ed. of the text (on page 87—90)], do you see the trend indicated by these figures? Put your comments in the word fileand then submit it to the D2L drop box for project 2.

Note: Save the m-file after modifications of ODE parameters such as coefficients and r(t) eachtime. Open a new word document and type your name at the top of the file. Copy
your m-file and Matlab figure into it and type your observation for each part.

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Place Order” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order