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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

42<br />

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

To f<strong>in</strong>d the eigen values <strong>and</strong> the eigen vectors<br />

To f<strong>in</strong>d the eigen values <strong>and</strong> the eigen vectors, the l<strong>in</strong>earized version of the model is used. The<br />

mass of the bar was considered to be 5 Kg <strong>and</strong> the length of the cord <strong>and</strong> the bar to be 1m. The<br />

<strong>MATLAB</strong> code is given below.<br />

% to f<strong>in</strong>d the eigen values <strong>and</strong> the eigen vectors.<br />

l1=1;<br />

l2=1;<br />

m2=5;<br />

g=9.81;<br />

w2=m2*g;<br />

M=[m2*l1^2 (m2*l1*l2)/2;(m2*l1*l2)/2 (m2*l1^2)/3];<br />

K=[l1*w2 0;0 (w2*l2)/2];<br />

[v,d]=eig(K,M)<br />

The columns ‘v’ represent the eigen vectors correspond<strong>in</strong>g to each eigen value ‘d’.<br />

‘M’ represents the <strong>in</strong>ertia matrix <strong>and</strong> ‘K’ represents the stiffness matrix. The square root of the<br />

eigen values gives the natural frequencies of the system.<br />

The eigen values were found to be 6.2892 <strong>and</strong> 91.8108 <strong>and</strong> the correspond<strong>in</strong>g eigen vectors were<br />

⎧0.6661⎫<br />

⎧− 0.4885⎫<br />

⎨ ⎬<strong>and</strong><br />

⎨ ⎬respectively.<br />

⎩0.7458⎭<br />

⎩ 0.8726 ⎭<br />

Initial response<br />

To plot the <strong>in</strong>itial response of the system the orig<strong>in</strong>al nonl<strong>in</strong>ear differential equation has to be<br />

used. Moreover the second order differential equation has to be converted <strong>in</strong>to a vector of first<br />

φ = y(1);<br />

.<br />

φ = y(2);<br />

θ = y(3);<br />

.<br />

θ = y(4);<br />

order differential equation. This step is done by follow<strong>in</strong>g the procedure given below.<br />

Substitut<strong>in</strong>g the above relations <strong>in</strong> the orig<strong>in</strong>al nonl<strong>in</strong>ear differential equation, we get the<br />

follow<strong>in</strong>g nonl<strong>in</strong>ear first order differential equation, which when represented <strong>in</strong> matrix form is<br />

. ⎧<br />

y(2)<br />

⎫<br />

⎡1<br />

0 0 0 ⎤⎧<br />

⎫<br />

⎪<br />

⎪<br />

− ⎪<br />

⎢<br />

− ⎪<br />

(1)<br />

2<br />

m ⎥<br />

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

2l2<br />

cos( y(3)<br />

y(1))<br />

y<br />

m2l2θ<br />

y y<br />

⎪−<br />

s<strong>in</strong> +<br />

⎪ ⎪<br />

⎪<br />

⎢0<br />

m 0<br />

.<br />

2l<br />

w2<br />

φ<br />

1<br />

2 ⎥ y(2)<br />

2<br />

⎢0<br />

0 1 0 ⎥⎨<br />

. ⎬ = ⎨<br />

y(4)<br />

⎬<br />

⎢<br />

⎢0<br />

⎢⎣<br />

m2l1l<br />

2<br />

cos( y(3)<br />

− y(1))<br />

2<br />

0<br />

m2l<br />

3<br />

2<br />

2<br />

⎥⎪y(3)<br />

⎪<br />

⎥⎪<br />

. ⎪<br />

⎥⎦<br />

⎩y(4)<br />

⎭<br />

⎪<br />

⎪<br />

⎪<br />

⎩<br />

− w l<br />

2 2<br />

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

+ m2l1l<br />

2<br />

. 2<br />

2<br />

φ<br />

s<strong>in</strong>( θ −φ)<br />

⎪<br />

⎪<br />

⎪<br />

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

Saved successfully!

Ooh no, something went wrong!