Dynamics of Machines - Part II - IFS.pdf
Dynamics of Machines - Part II - IFS.pdf Dynamics of Machines - Part II - IFS.pdf
1.7.5 Analytical and Numerical Solutions of Equation of Motion using Matlab %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % DYNAMICS OF MACHINERY LECTURES (72213) % % MEK - DEPARTMENT OF MECHANICAL ENGINEERING % % DTU - TECHNICAL UNIVERSITY OF DENMARK % % % % Copenhagen, February 11th, 2000 % % % % IFS % % % % 2 D.O.F - EXACT AND NUMERICAL SOLUTION % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear all; close all; %Concentred Masses m1= 0.191; %[Kg] m2= 0.191; %[Kg] m3= 0.191; %[Kg] m4= 0.191; %[Kg] m5= 0.191; %[Kg] m6= 0.191; %[Kg] %Elastic Properties of the Beam of 600 [mm] E = 2e11; %elasticity modulus [N/m^2] b = 0.030 ; %width [m] h = 0.0012 ; %thickness [m] Iz= (b*h^3)/12; %area moment of inertia [m^4] % (1.CASE) Data for the mass-spring system %__________________________________________________ M1=m1+m2; %concentrated mass [Kg] | M2=m3+m4; %concentrated mass [Kg] | L1= 0.310; %length for positioning M1 [m] | L2= 0.610; %length for positioning M2 [m] | %__________________________________________________| % Coefficients of the Stiffness Matrix LL=(L1-4*L2)*(L1-L2)^2; K11= -12*(E*Iz/LL)*L2^3/L1^3; % Stiffness coeff.[N/m] K12= -6*(E*Iz/LL)*(L1-3*L2)/L1; % Stiffness coeff.[N/m] K21= -6*(E*Iz/LL)*(L1-3*L2)/L1; % Stiffness coeff.[N/m] K22= -12*(E*Iz/LL); % Stiffness coeff.[N/m] % Coefficients of the Damping Matrix % (damping factor xi=0.005) D11= 2*0.005*sqrt(M1/K11); % Damping coeff.[Ns/m] D12= 0; % Damping coeff.[Ns/m] D21= 0; % Damping coeff.[Ns/m] D22= 2*0.005*sqrt(M2/K22); % Damping coeff.[Ns/m] %Mass Matrix M= [M1 0; 0 M2]; %Damping Matrix D=[D11 D12; D21 D22]; %Stiffness Matrix K= [K11 K12; K21 K22]; %State Matrices A & B % EQUATION (52) A= [ M D ; zeros(size(M)) M ] ; B= [ zeros(size(M)) K ; -M zeros(size(M))]; %Dynamical Properties of the Mass-Spring System [u,w]=eig(-B,A); %eigenvectors u %eigenvalues w w1=abs(imag(w(3,3)))/2/pi; %first natural freq.[Hz] w2=abs(imag(w(1,1)))/2/pi; %second natural freq.[Hz] wexp1=0.78125; %measured natural freq.[Hz] wexp2=5.563; %measured natural freq.[Hz] dif1=(w1-wexp1)/wexp1; %error calculated and measured freq. dif2=(w2-wexp2)/wexp2; %error calculated and measured freq. %_____________________________________________________ %Initial Condition y1_ini = -0.000 % beam initial deflection [m] y2_ini = -0.000 % beam initial deflection [m] v1_ini = -0.001 % beam initial velocity [m/s] v2_ini = -0.000 % beam initial velocity [m/s] freq_exc = 0.000 % excitation frequency [Hz] force1 = -0.000 % excitation force 1 [N] force2 = -0.000 % excitation force 2 [N] time_max = 30.0; % integration time [s] %_____________________________________________________ 40 %_____________________________________________________ %EXACT SOLUTION % EQUATION (68) n=2000; % number of points for plotting j=sqrt(-1); % complex number w_exc=2*pi*freq_exc; % excitation frequency [rad/s] z_ini = [v1_ini v2_ini y1_ini y2_ini]’; force_exc = [force1 force2 0 0 ]’; vec_aux = z_ini - inv((j*w_exc*A + B))*force_exc; lambda1=w(1,1); lambda2=w(2,2); lambda3=w(3,3); lambda4=w(4,4); u1=u(1:4,1); u2=u(1:4,2); u3=u(1:4,3); u4=u(1:4,4); C=inv(u)*(vec_aux); c1=C(1); c2=C(2); c3=C(3); c4=C(4); for i=1:n, t(i)=(i-1)/n*time_max; y_exact=c1*u1*exp(lambda1*t(i)) + ... c2*u2*exp(lambda2*t(i)) + ... c3*u3*exp(lambda3*t(i)) + ... c4*u4*exp(lambda4*t(i)) + ... inv((j*w_exc*A + B))*force_exc*exp(j*w_exc*t(i)); end y1_exact(i) = y_exact(3); y2_exact(i) = y_exact(4); figure(1) title(’Simulation of 2 D.O.F System in Time Domain’) subplot(2,1,1), plot(t,real(y1_exact),’b’) title(’Exact Solution ’) xlabel(’time [s]’) ylabel(’ y1_{exact}(t) [m]’) grid subplot(2,1,2), plot(t,real(y2_exact),’b’) xlabel(’time [s]’) ylabel(’y2_{exact}(t) [m]’) grid pause; %_____________________________________________________ %NUMERICAL SOLUTION % EQUATION (73) % deltaT=0.3605; % time step [s] % deltaT=0.3; % time step [s] % deltaT=0.1; % time step [s] % deltaT=0.05; % time step [s] % deltaT=0.01; % time step [s] deltaT=0.005; % time step [s] n_integ=time_max/deltaT; % number of points (integration) % Initial Conditions y1_approx(1) = y1_ini; % beam initial deflection [m] y2_approx(1) = y2_ini; % beam initial deflection [m] yp1_approx(1) = v1_ini; % beam initial velocity [m/s] yp2_approx(1) = v2_ini; % beam initial velocity [m/s] for i=1:n_integ, t_integ(i)=(i-1)*deltaT; ypp1_approx(i)=-1/M1*(K11*y1_approx(i)+K12*y2_approx(i) ... + D11*yp1_approx(i)+D12*yp2_approx(i) ... -(force1)*exp(j*w_exc*t_integ(i))); ypp2_approx(i)=-1/M2*(K21*y1_approx(i)+K22*y2_approx(i) ... +D21*yp1_approx(i)+D22*yp2_approx(i) ... -(force2)*exp(j*w_exc*t_integ(i))); yp1_approx(i+1)=yp1_approx(i) + ypp1_approx(i)*deltaT; yp2_approx(i+1)=yp2_approx(i) + ypp2_approx(i)*deltaT; y1_approx(i+1)=y1_approx(i)+yp1_approx(i+1)*deltaT; y2_approx(i+1)=y2_approx(i)+yp2_approx(i+1)*deltaT; end %_____________________________________________________
%_____________________________________________________ %Graphical Results figure(2) title(’Simulation of 2 D.O.F System in Time Domain’) subplot(2,1,1), plot(t_integ(1:n_integ), real(y1_approx(1:n_integ)),’r’) title(’Numerical Solution (delta T = 0.005 s)’) xlabel(’time [s]’) ylabel(’y1_{approx}(t) [m]’) grid subplot(2,1,2), plot(t_integ(1:n_integ), real(y2_approx(1:n_integ)),’r’) xlabel(’time [s]’) ylabel(’y2_{approx}(t) [m]’) grid %_____________________________________________________ %Graphical Results (Comparison Exact vs. Numerical) figure(3) subplot(2,1,1), plot(t,real(y1_exact),’b’, t_integ(1:n_integ),real(y1_approx(1:n_integ)),’r’) title(’Simulation of 2 D.O.F System in Time Domain - Exact Solution vs. Numerical Solution (delta T = 0.005 s)’) xlabel(’time [s]’) ylabel(’y1_{approx}(t) [m]’) grid subplot(2,1,2), plot(t,real(y2_exact),’b’, t_integ(1:n_integ),real(y2_approx(1:n_integ)),’r’) xlabel(’time [s]’) ylabel(’y2_{approx}(t) [m]’) grid 1.7.6 Analytical and Numerical Results of the System of Equations of Motion y1 exact (t) [m] y2 exact (t) [m] y1 approx (t) [m] y2 approx (t) [m] 2 0 −2 −4 x Exact 10−5 4 Solution −6 0 5 10 15 time [s] 20 25 30 4 2 0 −2 −4 −6 x 10−5 6 −8 0 5 10 15 time [s] 20 25 30 x Numerical 10−5 5 0 Solution (delta T = 0.005 s) −5 0 5 10 15 time [s] 20 25 30 4 2 0 −2 −4 −6 x 10−5 6 −8 0 5 10 15 time [s] 20 25 30 Figure 25: Analytical and Numerical Solutions – (a) Analytical solution with initial velocity condition at ˙y1(0) = 1 mm/s, ˙y2(0) = 0 mm/s, y1(0) = 0 mm and y2(0) = 0 mm; (b) Numerical solution (time step of 0.005 [s]) with the same initial conditions – Transient Analysis. 41
- Page 1 and 2: DYNAMICS OF MACHINES 41614 PART I -
- Page 3 and 4: 1 Introduction to Dynamical Modelli
- Page 5 and 6: 1.3 Data of the Mechanical System
- Page 7 and 8: 1.5 Calculating Stiffness Matrices
- Page 9 and 10: 1.6 Mechanical Systems with 1 D.O.F
- Page 11 and 12: Demanding (λ 2 + 2ξωnλ + ω 2 n
- Page 13 and 14: 1 yini − A det λ1 vini − A C2
- Page 15 and 16: 1.6.4 Analytical and Numerical Solu
- Page 17 and 18: (a) y(t) [m] (b) y(t) [m] (c) y(t)
- Page 19 and 20: 1.6.6 Homogeneous Solution or Free-
- Page 21 and 22: (a) Amplitude [m/s 2 ] x Signal 10
- Page 23 and 24: (a) Amplitude [m/s 2 ] (b) Amplitud
- Page 25 and 26: Imag(A(ω)) [m/N] 0 −1 −2 −3
- Page 27 and 28: 1.6.11 Superposition of Transient a
- Page 29 and 30: (a) Amplitude [m/s 2 ] (b) Amplitud
- Page 31 and 32: 1.7 Mechanical Systems with 2 D.O.F
- Page 33 and 34: ⎧ ⎫ ⎪⎨ ˙y1(t) ⎪⎬ ˙y
- Page 35 and 36: zini = U c + A ⇒ c = U −1 {(zin
- Page 37 and 38: 1.7.4 Modal Analysis using Matlab e
- Page 39: 0.7 0.6 0.5 0.4 0.3 0.2 0.1 First M
- Page 43 and 44: ||y 1 (ω)|| [m/N] Phase [ o] Excit
- Page 45 and 46: ||y i (ω)|| [m/N] Phase [ o] 0.8 0
- Page 47 and 48: Imag(y i (ω)/f 1 (ω)) (i=1,2) [m/
- Page 49 and 50: 1.8 Mechanical Systems with 3 D.O.F
- Page 51 and 52: which could be verified using Modal
- Page 53 and 54: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- Page 55 and 56: 1.8.4 Theoretical Frequency Respons
- Page 57 and 58: (a) Amplitude [m/s 2 ] (b) Amplitud
- Page 59 and 60: 4. Vary the number of masses attach
- Page 61 and 62: 1.10 Project 0 - Identification of
- Page 63 and 64: (a) (b) REAL(Acc/force) [(m/s 2 )/N
- Page 65 and 66: 6. Model application - As explained
- Page 67 and 68: changeable unbalanced mass for simu
- Page 69 and 70: %Modal Matrix u with mode shapes %M
- Page 71 and 72: acc [m/s 2 ] acc [m/s 2 ] 0.8 0.6 0
1.7.5 Analytical and Numerical Solutions <strong>of</strong> Equation <strong>of</strong> Motion using Matlab<br />
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br />
% DYNAMICS OF MACHINERY LECTURES (72213) %<br />
% MEK - DEPARTMENT OF MECHANICAL ENGINEERING %<br />
% DTU - TECHNICAL UNIVERSITY OF DENMARK %<br />
% %<br />
% Copenhagen, February 11th, 2000 %<br />
% %<br />
% <strong>IFS</strong> %<br />
% %<br />
% 2 D.O.F - EXACT AND NUMERICAL SOLUTION %<br />
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br />
clear all;<br />
close all;<br />
%Concentred Masses<br />
m1= 0.191; %[Kg]<br />
m2= 0.191; %[Kg]<br />
m3= 0.191; %[Kg]<br />
m4= 0.191; %[Kg]<br />
m5= 0.191; %[Kg]<br />
m6= 0.191; %[Kg]<br />
%Elastic Properties <strong>of</strong> the Beam <strong>of</strong> 600 [mm]<br />
E = 2e11; %elasticity modulus [N/m^2]<br />
b = 0.030 ; %width [m]<br />
h = 0.0012 ; %thickness [m]<br />
Iz= (b*h^3)/12; %area moment <strong>of</strong> inertia [m^4]<br />
% (1.CASE) Data for the mass-spring system<br />
%__________________________________________________<br />
M1=m1+m2; %concentrated mass [Kg] |<br />
M2=m3+m4; %concentrated mass [Kg] |<br />
L1= 0.310; %length for positioning M1 [m] |<br />
L2= 0.610; %length for positioning M2 [m] |<br />
%__________________________________________________|<br />
% Coefficients <strong>of</strong> the Stiffness Matrix<br />
LL=(L1-4*L2)*(L1-L2)^2;<br />
K11= -12*(E*Iz/LL)*L2^3/L1^3; % Stiffness coeff.[N/m]<br />
K12= -6*(E*Iz/LL)*(L1-3*L2)/L1; % Stiffness coeff.[N/m]<br />
K21= -6*(E*Iz/LL)*(L1-3*L2)/L1; % Stiffness coeff.[N/m]<br />
K22= -12*(E*Iz/LL); % Stiffness coeff.[N/m]<br />
% Coefficients <strong>of</strong> the Damping Matrix<br />
% (damping factor xi=0.005)<br />
D11= 2*0.005*sqrt(M1/K11); % Damping coeff.[Ns/m]<br />
D12= 0; % Damping coeff.[Ns/m]<br />
D21= 0; % Damping coeff.[Ns/m]<br />
D22= 2*0.005*sqrt(M2/K22); % Damping coeff.[Ns/m]<br />
%Mass Matrix<br />
M= [M1 0; 0 M2];<br />
%Damping Matrix<br />
D=[D11 D12; D21 D22];<br />
%Stiffness Matrix<br />
K= [K11 K12; K21 K22];<br />
%State Matrices A & B % EQUATION (52)<br />
A= [ M D ;<br />
zeros(size(M)) M ] ;<br />
B= [ zeros(size(M)) K ;<br />
-M zeros(size(M))];<br />
%Dynamical Properties <strong>of</strong> the Mass-Spring System<br />
[u,w]=eig(-B,A); %eigenvectors u<br />
%eigenvalues w<br />
w1=abs(imag(w(3,3)))/2/pi; %first natural freq.[Hz]<br />
w2=abs(imag(w(1,1)))/2/pi; %second natural freq.[Hz]<br />
wexp1=0.78125; %measured natural freq.[Hz]<br />
wexp2=5.563; %measured natural freq.[Hz]<br />
dif1=(w1-wexp1)/wexp1; %error calculated and measured freq.<br />
dif2=(w2-wexp2)/wexp2; %error calculated and measured freq.<br />
%_____________________________________________________<br />
%Initial Condition<br />
y1_ini = -0.000 % beam initial deflection [m]<br />
y2_ini = -0.000 % beam initial deflection [m]<br />
v1_ini = -0.001 % beam initial velocity [m/s]<br />
v2_ini = -0.000 % beam initial velocity [m/s]<br />
freq_exc = 0.000 % excitation frequency [Hz]<br />
force1 = -0.000 % excitation force 1 [N]<br />
force2 = -0.000 % excitation force 2 [N]<br />
time_max = 30.0; % integration time [s]<br />
%_____________________________________________________<br />
40<br />
%_____________________________________________________<br />
%EXACT SOLUTION % EQUATION (68)<br />
n=2000; % number <strong>of</strong> points for plotting<br />
j=sqrt(-1); % complex number<br />
w_exc=2*pi*freq_exc; % excitation frequency [rad/s]<br />
z_ini = [v1_ini v2_ini y1_ini y2_ini]’;<br />
force_exc = [force1 force2 0 0 ]’;<br />
vec_aux = z_ini - inv((j*w_exc*A + B))*force_exc;<br />
lambda1=w(1,1);<br />
lambda2=w(2,2);<br />
lambda3=w(3,3);<br />
lambda4=w(4,4);<br />
u1=u(1:4,1);<br />
u2=u(1:4,2);<br />
u3=u(1:4,3);<br />
u4=u(1:4,4);<br />
C=inv(u)*(vec_aux);<br />
c1=C(1);<br />
c2=C(2);<br />
c3=C(3);<br />
c4=C(4);<br />
for i=1:n,<br />
t(i)=(i-1)/n*time_max;<br />
y_exact=c1*u1*exp(lambda1*t(i)) + ...<br />
c2*u2*exp(lambda2*t(i)) + ...<br />
c3*u3*exp(lambda3*t(i)) + ...<br />
c4*u4*exp(lambda4*t(i)) + ...<br />
inv((j*w_exc*A + B))*force_exc*exp(j*w_exc*t(i));<br />
end<br />
y1_exact(i) = y_exact(3);<br />
y2_exact(i) = y_exact(4);<br />
figure(1)<br />
title(’Simulation <strong>of</strong> 2 D.O.F System in Time Domain’)<br />
subplot(2,1,1), plot(t,real(y1_exact),’b’)<br />
title(’Exact Solution ’)<br />
xlabel(’time [s]’)<br />
ylabel(’ y1_{exact}(t) [m]’)<br />
grid<br />
subplot(2,1,2), plot(t,real(y2_exact),’b’)<br />
xlabel(’time [s]’)<br />
ylabel(’y2_{exact}(t) [m]’)<br />
grid<br />
pause;<br />
%_____________________________________________________<br />
%NUMERICAL SOLUTION % EQUATION (73)<br />
% deltaT=0.3605; % time step [s]<br />
% deltaT=0.3; % time step [s]<br />
% deltaT=0.1; % time step [s]<br />
% deltaT=0.05; % time step [s]<br />
% deltaT=0.01; % time step [s]<br />
deltaT=0.005; % time step [s]<br />
n_integ=time_max/deltaT; % number <strong>of</strong> points (integration)<br />
% Initial Conditions<br />
y1_approx(1) = y1_ini; % beam initial deflection [m]<br />
y2_approx(1) = y2_ini; % beam initial deflection [m]<br />
yp1_approx(1) = v1_ini; % beam initial velocity [m/s]<br />
yp2_approx(1) = v2_ini; % beam initial velocity [m/s]<br />
for i=1:n_integ,<br />
t_integ(i)=(i-1)*deltaT;<br />
ypp1_approx(i)=-1/M1*(K11*y1_approx(i)+K12*y2_approx(i) ...<br />
+ D11*yp1_approx(i)+D12*yp2_approx(i) ...<br />
-(force1)*exp(j*w_exc*t_integ(i)));<br />
ypp2_approx(i)=-1/M2*(K21*y1_approx(i)+K22*y2_approx(i) ...<br />
+D21*yp1_approx(i)+D22*yp2_approx(i) ...<br />
-(force2)*exp(j*w_exc*t_integ(i)));<br />
yp1_approx(i+1)=yp1_approx(i) + ypp1_approx(i)*deltaT;<br />
yp2_approx(i+1)=yp2_approx(i) + ypp2_approx(i)*deltaT;<br />
y1_approx(i+1)=y1_approx(i)+yp1_approx(i+1)*deltaT;<br />
y2_approx(i+1)=y2_approx(i)+yp2_approx(i+1)*deltaT;<br />
end<br />
%_____________________________________________________