← Back
ExercisesComplete setItalian / English

Completed exercises of the course

Complete course materials for Mechanical Systems Dynamics in the Mechanical Engineering degree programme at Politecnico di Milano. The document covers: Politecnico di Milano Polo Territoriale di Piacenza Advanced Dynamics of Mechanical Systems Dispensa dei codici MATLAB Raccolta dei codici MATLAB delle esercitazioni con testi, schemi dei sistemi, richiami teorici e figure A.A. 2025–2026 Filippo Casaroli Matr. 330090 29 ottobre

Mechanical Systems DynamicsComplete set

Document information

What's included in this study material

Complete course materials for Mechanical Systems Dynamics in the Mechanical Engineering degree programme at Politecnico di Milano. The document covers: Politecnico di Milano Polo Territoriale di Piacenza Advanced Dynamics of Mechanical Systems Dispensa dei codici MATLAB Raccolta dei codici MATLAB delle esercitazioni con testi, schemi dei sistemi, richiami teorici e figure A.A. 2025–2026 Filippo Casaroli Matr. 330090 29 ottobre

Import quality: text was extracted directly from the original document.

Extracted content from the document

Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.

Page 1

Politecnico di Milano Polo Territoriale di Piacenza Advanced Dynamics of Mechanical Systems Dispensa dei codici MATLAB Raccolta dei codici MATLAB delle esercitazioni con testi, schemi dei sistemi, richiami teorici e figure A.A. 2025–2026 Filippo Casaroli Matr. 330090 29 ottobre 2026 Dipartimento di Ingegneria Meccanica Sede di Via Scalabrini Piacenza (Pc), Italy

Page 27

CAPITOLO 1. ADVANCED DYNAMICS OF MECHANICAL SYSTEMS 26 1.2.4.4 Moto libero non smorzato 22 %% free motion 23 [ modes , omega2 ] = eig ( M \ K ) ; % modes are the eigenvectors , omega2 are the ,→ eigenvalues 24 % [ modes , omega2 ] = eig ( inv ( M ) * K ) ; 25 omega = diag ( sqrt ( omega2 ) ) 26 freq = omega /(2* pi ) 27 28 % sort the natural frequencies in ascending order 29 [~ , indices ] = sort ( omega ) ; 30 omega_sorted = omega ( indices ) ; 31 % sort the modeshapes in ascending order 32 modes_sorted = modes (: , indices ) ; 33 % normalize the modeshapes 34 modes_norm = modes_sorted ./ modes_sorted (2 ,:) 1.2.4.5 Sistema smorzato 36 %% damped system 37 c1 = 0.5; % *5; % Ns / m 38 c2 = c1 *3; 39 c3 = c1 *10; 40 41 C = [ c1 + c2 - c2 ; 42 - c2 c2 + c3 ]; 43 44 % state matrix formulation : z = [ v ; x ] 45 A = [ - inv ( M ) * C - inv ( M ) * K ; 46 eye ( size ( M ) ) zeros ( size ( M ) ) ]; 47 48 [ modes_damped , omega_damped ] = eig ( A ) ; 49 omega_damped = diag ( omega_damped ) ; 50 modes_damped = modes_damped (3:4 ,:) ; % NB : first 2 rows associated to the ,→ velocities , discard them 51 52 [~ , indices ] = sort ( imag ( omega_damped ) ) ; 53 o me g a _d a m ped_sorted = omega_damped ( indices ) 54 m od e s _d a m ped_sorted = modes_damped (: , indices ) ; 55 56 m od e s _d a m ped_sorted = modes_damped_sorted ./ modes_damped_sorted (2 ,:) ; 57 58 % damping ratio : alfa = csi * w 59 csi = abs ( real ( omega_damped_sorted (3:4) ) ./ omega_sorted ) Output a Command Window: o me g a _d a m ped_sorted = -0.2873 - 5.4627 i -0.1377 - 3.1633 i -0.1377 + 3.1633 i -0.2873 + 5.4627 i csi = 0.043531 0.052461

Page 54

CAPITOLO 1. ADVANCED DYNAMICS OF MECHANICAL SYSTEMS 53 118 h2 . YData = w2 ; 119 pause (.05) 120 else 121 return 122 end 123 end

Page 80

CAPITOLO 1. ADVANCED DYNAMICS OF MECHANICAL SYSTEMS 79 49 xlabel ( 'f [ Hz ] ') ; ylabel ( '| det [ H (\ omega ) ]| ') 50 title ( sprintf ( ' Natural frequencies in the range 0 - % d Hz ' , fmax ) ) Output a Command Window: Natural frequencies [ Hz ]: 2.1075 6.4998 12.4622 26.4177 32.3919 63.7861 76.0104 Figura 1.43: Modulo del determinante di [ H (ω )] tra 0 e 80 Hz e frequenze proprie individuate. 1.8.5.5 Modi di vibrare 52 %% Mode shapes 53 % non - trivial solution of [ H ( w_j ) ] X = 0: null vector of H ( equivalent to 54 % fixing A1 = 1 and solving the reduced 7 x7 system ) 55 nm = min ( length ( fn ) ,4) ; % number of modes considered ( n ) 56 x = linspace (0 ,L ,2001) ; 57 phi1 = zeros ( nm , length ( x ) ) ; phi2 = phi1 ; % mode shapes 58 dd1 = phi1 ; dd2 = phi1 ; % second derivatives 59 for jj = 1: nm 60 [~ ,~ , V ] = svd ( H ( wn ( jj ) ) ) ; 61 X = V (: , end ) ; 62 g = ( m * wn ( jj ) ^2/ EJ ) ^(1/4) ; 63 B = [ cos ( g * x ) ; sin ( g * x ) ; cosh ( g * x ) ; sinh ( g * x ) ]; % basis 64 B2 = g ^2*[ - cos ( g * x ) ; - sin ( g * x ) ; cosh ( g * x ) ; sinh ( g * x ) ]; % 2 nd derivative 65 p1 = X (1:4) . '* B ; p2 = X (5:8) . '* B ; 66 q1 = X (1:4) . '* B2 ; q2 = X (5:8) . '* B2 ; 67 [~ , imax ] = max ( abs ([ p1 p2 ]) ) ; % normalization : max displacement = 1 68 all_p = [ p1 p2 ]; nrm = all_p ( imax ) ; 69 phi1 ( jj ,:) = p1 / nrm ; phi2 ( jj ,:) = p2 / nrm ; 70 dd1 ( jj ,:) = q1 / nrm ; dd2 ( jj ,:) = q2 / nrm ;

Page 107

CAPITOLO 1. ADVANCED DYNAMICS OF MECHANICAL SYSTEMS 106 147 legend ( ' Direct ' , ' Modal ( c only ) ' , ' Modal ( c + structural ) ') 148 title ( sprintf ( ' Tip displacement in C - N = % d modes ' ,N ) ) 149 150 figure (4) 151 semilogy ( fF , abs ( R_dir ) , 'k ' , ' LineWidth ' ,2) ; hold on ; grid on 152 semilogy ( fF , abs ( R_mod ) , ' --r ' , ' LineWidth ' ,1.5) 153 semilogy ( fF , abs ( R_modS ) , 'b ' , ' LineWidth ' ,1) 154 xlabel ( 'f [ Hz ] ') ; ylabel ( '| R | [ N ] ') 155 legend ( ' Direct ' , ' Modal ( c only ) ' , ' Modal ( c + structural ) ') 156 title ( ' Reaction force in B ') (a) Spostamento dell’estremo C (b) Reazione in B Figura 1.56: Esercizio 2 – Ampiezza della risposta a regime a y(t) e p(t) tra 0 e 30 Hz: approccio diretto (nero), modale con il solo smorzatore c (rosso tratteggiato) e modale con anche lo smorzamento strutturale (blu). Con N = 9 modi (fino a 123 Hz) l’approccio modale con il solo smorzatore concentrato coincide con la soluzione esatta dell’approccio diretto in tutto il campo di frequenze. Il secondo modo (6.01 Hz), che sposta molto il punto B, è fortemente smorzato dallo smorzatore e non dà un picco visibile; lo smorzamento strutturale riduce ulteriormente i picchi, in particolare quelli a frequenza più alta (termine β[K ]). Nota Le frequenze proprie di entrambi gli esercizi sono state verificate con modelli a elementi finiti indipendenti (scarto inferiore a 10−4 ), e le matrici [ H (ω )] riportate sopra coincidono numericamente con quelle costruite dalle funzioni locali degli script.

Preview

First page of the document.

First page: Completed exercises of the course