← Mechanical Systems Studio
🌀

Mechanical Vibration Simulator (Mass-Spring-Damper)

Real-time RK4 numerical integration of m·x″+c·x′+k·x = F₀cos(ωt) for a single-degree-of-freedom system. Watch free decay, forced response, and resonance as you adjust mass, stiffness, damping, and forcing frequency.

mx = +30.0 mm+0.0240.0240Displacement x(t), meters — sliding 15s window
System Parameters
5 kg
100 N/m
2 N·s/m
30 mm
0 N
0.50 Hz
Natural Frequency ωₙ
4.47
rad/s (0.71 Hz)
Damping Ratio ζ
0.045
Underdamped
Results
Current displacement x(t)30.00 mm
Current velocity ẋ(t)0.000 m/s
Damped natural frequency ωd4.47 rad/s
Forcing frequency ratio r = ω/ωₙ0.70
Steady-state forced amplitude X— (no forcing)
Critical damping ccr = 2√(km)44.72 N·s/m
Simulation time t0.00 s
Key Formulas
m·x″ + c·x′ + k·x = F₀cos(ωt)
ωₙ = √(k/m)
ζ = c / (2√(km))
ωd = ωₙ√(1−ζ²) (underdamped)
X = (F₀/k) / √[(1−r²)² + (2ζr)²], r = ω/ωₙ

About the Mechanical Vibration Simulator

This simulator numerically integrates the classic single-degree-of-freedom (SDOF) mass-spring-damper equation of motion, m·x″ + c·x′ + k·x = F₀cos(ωt), using fourth-order Runge-Kutta (RK4) integration in real time. It's the fundamental model behind vehicle suspensions, vibration isolators, seismographs, accelerometers, and machine foundation design.

The equation of motion

A mass m attached to a spring of stiffness k and a viscous damper with coefficient c forms the simplest possible vibrating system. Newton's second law gives m·x″ + c·x′ + k·x = F(t), where x is displacement from equilibrium. Two dimensionless parameters fully characterize the free-vibration behavior: the undamped natural frequency ωₙ = √(k/m), and the damping ratio ζ = c/(2√(km)) = c/ccr, where ccr = 2√(km) is the critical damping coefficient that separates oscillatory (underdamped, ζ < 1) from non-oscillatory (overdamped, ζ > 1) decay.

With zero applied force and only an initial displacement, an underdamped system oscillates at the damped natural frequency ωd = ωₙ√(1−ζ²) with an exponentially decaying envelope e^(−ζωₙt). A critically damped system (ζ = 1) returns to equilibrium in the shortest time without oscillating; an overdamped system (ζ > 1) returns more slowly without oscillating.

Forced vibration and resonance

When a harmonic force F₀cos(ωt) is applied, the steady-state response amplitude is X = (F₀/k) / √[(1−r²)² + (2ζr)²], where r = ω/ωₙ is the frequency ratio. The term F₀/k is the static deflection; the rest of the expression is the dynamic magnification factor. As r approaches 1 (forcing frequency near natural frequency), the magnification factor peaks — this is resonance. For lightly damped systems (small ζ), the peak amplitude can be many times the static deflection, which is why avoiding operation near a structure's or machine's natural frequency is a central concern in rotating equipment, bridges, and building design.

This simulator solves the full transient response (not just the steady-state approximation), so you can watch the amplitude build up over several cycles as the system approaches resonance, exactly as a real machine would when running up through a critical speed.

Practical applications

This SDOF model underlies vibration isolation mount selection (choosing k and c so the transmissibility at the operating frequency is well below 1), machine foundation design (keeping ωₙ of the foundation-soil system away from operating and blade-pass frequencies), automotive suspension tuning (balancing ride comfort against handling via ζ), and seismic instrument design. Multi-degree-of-freedom systems (buildings, rotating machinery with multiple modes) are analyzed by decomposing into a set of independent SDOF modal equations exactly like this one.

Frequently asked questions

What is the difference between natural frequency and damped natural frequency?

The undamped natural frequency ωₙ = √(k/m) is the frequency at which the system would oscillate with zero damping. The damped natural frequency ωd = ωₙ√(1−ζ²) is the actual oscillation frequency observed in a real (damped) free-vibration response, and is always slightly lower than ωₙ. For lightly damped systems (ζ < 0.1, typical of most machines), ωd ≈ ωₙ within about 0.5%.

Why does the response blow up near resonance with low damping?

At resonance (r=1) with zero damping, the forcing input adds energy to the system every cycle with nothing to remove it, so amplitude grows without bound over time (a secular/linear growth term appears in the exact solution). With any damping present (ζ > 0), energy dissipation eventually balances the energy input from forcing, and the response settles into a finite steady-state amplitude — but that amplitude can still be very large (magnification factor ≈ 1/(2ζ) at exact resonance for light damping).

What damping ratio should I design for?

It depends on the application. Vibration isolators for sensitive equipment typically target ζ ≈ 0.05–0.15 to minimize transmissibility above resonance while still passing through the resonant region quickly during startup/shutdown. Automotive shock absorbers typically target ζ ≈ 0.2–0.4 for a balance of ride comfort and control. Instruments needing a fast, non-oscillatory response (like a galvanometer or a car's active suspension damper valve) often target ζ ≈ 0.6–0.8, close to but below critical damping.

Does this simulator include Coulomb (dry friction) damping?

No — this model uses viscous damping only (damping force proportional to velocity, F = c·ẋ), which is the standard linear model and integrates in closed form for free vibration. Coulomb friction damping produces a linearly (not exponentially) decaying envelope and requires a piecewise equation of motion depending on the sign of velocity — a common extension taught after the viscous-damping case.

🎓

Try our Mechanical Studio

More calculators, simulators, and guides for this discipline.

Related tools & guides

Shaft Power CalculatorPID Motor Control SimulatorBeam Bending SimulatorMachine Design Fundamentals Guide