› Spring-Mass System Simulator Back
Vibration Simulator

Spring-Mass System Simulator

Vary spring constant, mass, and damping coefficient to animate 1-DOF system vibration in real time. Visualize overdamped, critically damped, and underdamped responses. Also supports forced excitation.

How to use & worked examples

How to Use

  1. Set k between 1 and 1000 N/m and m between 0.1 and 50 kg.
  2. Vary c from 0 to 200 N·s/m. With ζ=c/(2√(km)), 0<ζ<1 is underdamped, ζ=1 critically damped and ζ>1 overdamped.
  3. Set x₀ between −0.5 and 0.5 m, or pull and release the mass. Initial velocity is zero. Use play/pause, 0.1-second steps or the time slider.
  4. Save a waveform before changing c to compare responses at the same time and RMS over 10 seconds. Switch periodic force OFF/ON and set F₀ and f.

Worked Example

A reproducible example in this view: k=100 N/m, m=1 kg, c=2 N·s/m and x₀=0.2 m give ωₙ=10 rad/s, fₙ≈1.59155 Hz and ζ=0.1. The free-response envelope time constant is 2m/c=1 second. The original suspension example k=20000 N/m, m=50 kg, c=2000 N·s/m is a theoretical case outside the input ranges: ωₙ=20 rad/s, fₙ≈3.1831 Hz and ζ=1 (critical damping). With x₀=0.1 m, x(t)=0.1(1+20t)e^(−20t).

Model & scope

Theory & Key Formulas
$$m\ddot{x}+ c\dot{x}+ kx = F_0\cos(\Omega t)$$ $$\omega_n = \sqrt{\frac{k}{m}}, \quad \zeta = \frac{c}{2\sqrt{mk}}, \quad \omega_d = \omega_n\sqrt{1-\zeta^2}$$

Underdamped($\zeta \lt 1$):$x(t) = Ae^{-\zeta\omega_n t}\cos(\omega_d t + \phi)$

Free vibration uses a closed-form solution; forced vibration uses the matrix exponential of a linear state equation augmented with sine and cosine. Initial velocity is always zero. The displayed interval is 10 seconds, sampled every 0.002 seconds. Ω=2πf; the input f is in Hz.

What is a Spring-Mass-Damper System?

🙋
What does the displayed damping ratio ζ mean?
🎓
ζ=c/(2√(mk)) is a dimensionless measure of damping. Holding m and k fixed, increase c to move from underdamping (0<ζ<1), through critical damping (ζ=1), to overdamping (ζ>1). At c=0, the system oscillates without losing mechanical energy.
🙋
Does ζ=1 stop the mass fastest?
🎓
For this model’s free response starting at rest, critical damping approaches equilibrium fastest among non-oscillatory responses. It does not reach exact rest in finite time. Door dampers and precision equipment also require a specified settling tolerance and disturbance conditions.
🙋
What is the periodic-force switch for?
🎓
It applies the continuing force F₀ cos(2πft), helping explore periodic forces such as engine excitation and the influence of damping. The first 10 seconds also contain the transient caused by initial displacement; this is not a steady-state resonance curve.

Physical Model & Key Equations

The fundamental equation of motion for a 1-DOF spring-mass-damper system, also known as the governing differential equation, balances inertia, damping, and spring forces with any external force.

$$m\ddot{x}+ c\dot{x}+ kx = F_0\cos(\Omega t)$$

m: Mass (kg) | c: Viscous damping coefficient (N·s/m) | k: Spring constant (N/m)
x: Displacement (m) | F₀: Amplitude of external force (N) | Ω = 2πf: Angular excitation frequency (rad/s)

From this equation, we derive key characteristic parameters that define the system's natural behavior and response type.

$$\omega_n = \sqrt{\frac{k}{m}}, \quad \zeta = \frac{c}{2\sqrt{mk}}, \quad \omega_d = \omega_n\sqrt{1-\zeta^2}$$

ωₙ: Natural frequency - the inherent oscillation frequency if there were no damping.
ζ (zeta): Damping ratio - a dimensionless number that determines the oscillation type (ζ < 1: underdamped, ζ = 1: critically damped, ζ > 1: overdamped).
ω_d: Damped natural frequency - the actual oscillation frequency when damping is present (for ζ < 1).

Real-World Applications

Automotive Suspension Tuning: Your car's shock absorbers and springs form a spring-mass-damper system. Engineers tune the damping ratio (ζ) to be slightly underdamped (around 0.2-0.3) for a balance of comfort (absorbing bumps) and control (keeping tires on the road). The simulator's "c" slider directly models this tuning process.

Earthquake Engineering & Building Design: Skyscrapers are essentially giant masses on flexible foundations (springs) with built-in dampers. Engineers analyze their natural frequency (ωₙ) to ensure it doesn't match the dominant frequency of earthquake ground motions, preventing catastrophic resonance. The "Forced Vibration" mode in the simulator demonstrates this dangerous phenomenon.

Precision Manufacturing & Machinery: In CNC machines or semiconductor manufacturing equipment, any vibration reduces precision. Systems are designed to be heavily overdamped (ζ >> 1) so that after a movement command, the tool settles to its position as quickly as possible without oscillating, just like the slow, smooth return you see in the simulator with high damping.

Aerospace & Aircraft Component Testing: Aircraft wings and components are subjected to forced vibration tests to find their natural frequencies and damping ratios, a process called modal analysis. This 1DOF model is the fundamental building block of the complex Finite Element Method (FEM) software (like NASTRAN or Abaqus) used for this analysis, where typical damping ratios for aerospace structures range from 0.01 to 0.05.

Common Misconceptions and Points to Note

Equal natural frequencies do not imply equal damping ratios. Both m=1 kg, k=100 N/m and m=4 kg, k=400 N/m give ωₙ=10 rad/s. Quadrupling both m and k also quadruples √(mk), so c must be quadrupled to keep ζ unchanged. Displacement under the same applied force also depends on the absolute stiffness and mass.

The steady displacement amplitude under harmonic force does not always peak at fₙ. For 0<ζ<1/√2 the peak is at fₙ√(1−2ζ²), about 0.906fₙ when ζ=0.3. This differs from the maximum or RMS of the first 10 seconds of transient motion; waveform comparisons are not steady frequency-response measurements.

Critical damping is not always optimal. A non-oscillatory return from rest, vehicle ride comfort and vibration isolation have different objectives. Damping ratios around 0.2–0.4 may be considered in suspension examples, but suitable values depend on excitation, structure and evaluation criteria.

Practical Notes

  1. Aircraft seats and vehicle systems require actual excitation histories, multiple degrees of freedom and acceleration limits. This linear single-DOF model cannot alone determine design values.
  2. Increasing damping does not reduce vibration transmission at every frequency. Distinguish floor/base excitation from the external force applied to the mass here.
  3. The waveform is sampled at 0.002-second intervals; RMS is a trapezoidal-integral interval metric. Sampled maxima and RMS are not guarantees of exact maxima, stopping time or safety.

Frequently asked questions

Hold mass m and stiffness k fixed and vary damping coefficient c. With ζ=c/(2√(mk)), c=0 is undamped, 0<ζ<1 underdamped, ζ=1 critically damped, and ζ>1 overdamped. For free response starting at rest, critical damping approaches equilibrium fastest among non-oscillatory responses. This does not mean exact rest in finite time.
The input f is in Hz. Start by comparing near fₙ=√(k/m)/(2π). For 0<ζ<1/√2, the steady displacement amplitude peaks at fₙ√(1−2ζ²); for ζ≥1/√2 there is no resonance peak at a positive frequency. The displayed first 10 seconds include the transient, so their peak is not necessarily the steady-state peak.
Use the Apply periodic force OFF/ON switch. OFF means zero external force; ON applies F(t)=F₀ cos(2πft). F₀ ranges from 0.1 to 20 N, so entering zero is not how you switch modes. Set initial displacement x₀; initial velocity is always 0 m/s. There is no initial-velocity input.
The natural angular frequency is √(k/m), so increasing k or decreasing m makes oscillation faster. This view uses the analytical free response and a matrix exponential for forced response; physical time is not counted in animation frames. Fast oscillations may be difficult to follow at the display refresh rate. Use slow playback, the time slider and the numerical values as well.