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.

26<br />

3. Coulomb Friction<br />

Example<br />

Solve the follow<strong>in</strong>g differential equation for θ ≥ 0 .<br />

2<br />

θ ..<br />

.<br />

g<br />

2<br />

(1 + s<strong>in</strong>θ<br />

) + µ cosθ θ = [cosθ<br />

(1 − µ ) − µ<br />

d<br />

d<br />

l<br />

d<br />

d<br />

µ<br />

d<br />

µ ={0, 0.1,0.2}; l = 0. 25m<br />

. θ (0) = 0; θ(0)<br />

= 0<br />

Solution<br />

.<br />

.<br />

s<strong>in</strong>θ<br />

]<br />

As expla<strong>in</strong>ed earlier, to solve the above differential equation by <strong>MATLAB</strong>, reduce it <strong>in</strong>to two<br />

first order differential equations.<br />

Let θ = y(1)<br />

.<br />

θ = y(2)<br />

The above equation reduces to<br />

.<br />

y (1) = y(2)<br />

.<br />

g<br />

2<br />

y(2)<br />

=<br />

{cos( y(1))[1<br />

− µ<br />

d<br />

] − µ<br />

d<br />

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

−<br />

l(1<br />

+ µ s<strong>in</strong>( y(1)))<br />

l(1<br />

+ µ<br />

d<br />

d<br />

1<br />

{ µ<br />

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

d<br />

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

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

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

A M-file must be written to store the derivatives. In this case the file is saved as ‘coulomb.m’.<br />

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

g=9.81;<br />

mu=0;<br />

l=0.25;<br />

k1=1+mu*s<strong>in</strong>(y(1));<br />

k2=mu*cos(y(1))*(y(2)^2);<br />

k3=cos(y(1))*(1-mu^2);<br />

k4=mu*s<strong>in</strong>(y(1));<br />

yp=[y(2);((g/l)*((k3-k4)/k1)-(k2/k1))]<br />

Type the follow<strong>in</strong>g code <strong>in</strong> a new M-file.

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

Saved successfully!

Ooh no, something went wrong!