12.04.2015 Views

Solving Problems in Dynamics and Vibrations Using MATLAB ...

Solving Problems in Dynamics and Vibrations Using MATLAB ...

Solving Problems in Dynamics and Vibrations Using MATLAB ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

38<br />

6. A Half Cyl<strong>in</strong>der roll<strong>in</strong>g on a Horizontal Plane<br />

Example<br />

The general govern<strong>in</strong>g differential equation of motion of the above problem is<br />

2<br />

2<br />

3mr<br />

..<br />

.<br />

( − 2mer<br />

s<strong>in</strong> β ) β − mer cos β β = wecos<br />

β . (1)<br />

2<br />

4r<br />

Solve the above differential equation for m = 5 Kg; e = m; r = 0.1 m.<br />

3π<br />

Solution<br />

To solve the differential equation, convert the equation <strong>in</strong>to two first order differential equation.<br />

With<br />

β<br />

.<br />

β<br />

=<br />

=<br />

y(1);<br />

y(2);<br />

Equation (1) reduces to the follow<strong>in</strong>g equations<br />

.<br />

y(1)<br />

= y(2);<br />

.<br />

[ wecos(<br />

y(1))<br />

+ mer cos( y(1))(<br />

y(2)^2)]<br />

y(2)<br />

=<br />

[1.5mr^2<br />

− 2mer<br />

s<strong>in</strong>( y(1))]<br />

<strong>MATLAB</strong> Code<br />

The function file ‘tofro.m’ conta<strong>in</strong>s the systems derivatives <strong>in</strong> the form of a vector.<br />

function yp = tofro(t,y)<br />

m=5;<br />

r=0.1;<br />

e=(4*r)/(3*pi);<br />

g=9.81;<br />

yp=[y(2);((m*g)*e*cos(y(1))+m*e*r*cos(y(1))*(y(2)^2))/(1.5*m*r*r<br />

-2*m*e*r*s<strong>in</strong>(y(1)))]<br />

The ma<strong>in</strong> code, which is given below calls the function ‘tofro.m’, which conta<strong>in</strong>s the system<br />

differential equation <strong>and</strong> plots the displacement with respect to time. S<strong>in</strong>ce there is no damp<strong>in</strong>g<br />

present, the plot resembles a s<strong>in</strong>usoid of constant amplitude.<br />

tspan=[0 4];

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!