Schematic of mass-spring-damper system
To analyze a 2-DOF spring–mass–damper system using Newtonian and Lagrangian methods, compute natural frequencies and mode shapes, and simulate free vibration and forced response using MATLAB. The system was linearized into matrix form, solved with state-space modeling, and evaluated via frequency response functions (FRFs). This individual project was completed for MAE 4314: Mechanical Vibrations at UT Arlington.
Project Type: Individual
Duration: 3–4 weeks
Tools: MATLAB, ODE23, modalfrf
Focus: Vibration Modeling, Simulation, Frequency Response
Outcome: Simulated dynamic behavior of a 2-DOF system with validated mode shapes and frequency response
Derived equations of motion using Newton's and Lagrange’s methods
Transformed high-order equations into state-space form (4 first-order ODEs)
Computed natural frequencies (5.16 rad/s, 7.75 rad/s) and corresponding mode shapes
Built free vibration simulations using MATLAB’s ode23 solver
Applied modalfrf() to generate frequency response from randomized input
Tuned damping and matrix inputs to reflect realistic system behavior
MATLAB functions and derivations were completed from first principles and match theoretical solutions from class examples
Code was submitted in-line per course requirement
Modeled a 2-DOF system with masses, springs, and dampers (m₁, m₂, k₁–₃, c₁–₃)
Represented both masses’ equations in matrix form: [M]{ẍ} + [C]{ẋ} + [K]{x} = {0}
Linearized for modal and state-space analysis
Free vibration response: Mode 1 displacement
Free vibration response: randomized initial conditions
Free vibration response: Mode 2 displacement
Frequency response function (FRF) via modalfrf
Converted system into first-order state-space representation to simplify MATLAB simulation
Chose ode23 solver for smooth performance with damped systems
Damping matrix derived from user-defined c₁, c₂, c₃ inputs; used values c₁ = 2, c₂ = 1.5, c₃ = 0
Applied Hann window + 50 Hz sample rate to balance spectral resolution and runtime
Used modal FFT analysis to evaluate frequency peaks and system behavior
%% Free Vibration Mode Calculation
k1=2000; k2=2000; k3=5000;
m1=100; m2=150;
c1=2; c2=1.5; c3=0;
m = [m1 0; 0 m2];
k = [k1+k2 -k2; -k2 k2+k3];
c = [c1+c2 -c2; -c2 c2+c3];
[modeShape, fr] = eig(k, m);
*Full code included in downloadable report
Initial damping assumptions (e.g., c₃ = 0) caused underdamped responses; adjusted values for realistic decay
Required conversion from second-order to first-order ODEs for ode23
Manual matrix entry errors during FRF setup required debug iterations
Tuning FFT resolution (window length, overlap) to match MATLAB’s modalfrf needs
Derived equations of motion from first principles using Newtonian and Lagrangian approaches
Linearized system for modal analysis and computed natural frequencies and eigenvectors
Simulated damped motion of a 2-DOF system with validated natural frequencies and frequency response
Evaluated frequency response function (FRF) using FFT-based random signal analysis with modalfrf
Demonstrated full understanding of mechanical vibration analysis and digital simulation methods
MATLAB · System Modeling · Modal Analysis · Matrix Algebra · FRF · Damped Response · Eigenvalue Calculation · Simulation · State-Space Dynamics
This project strengthened my understanding of mechanical vibration principles by applying them through code. I practiced deriving equations of motion from first principles, translating systems into matrix form, and building simulations from scratch in MATLAB. I now have confidence in interpreting vibration modes and frequency behavior in second-order dynamic systems.
*Note: MATLAB code and simulations were submitted for MAE 4314 coursework and are archived by UT Arlington. This page includes all final plots and project explanations.*
Download Project PDF
View or Download Project Report (PDF)