The Simple Harmonic Motion (SHM) Calculator determines displacement, velocity, acceleration, period, frequency, and angular frequency for systems exhibiting sinusoidal oscillation. Essential for analyzing mass-spring systems, pendulums, LC circuits, and vibrating structures, this calculator solves the fundamental differential equation of harmonic motion across mechanical, electrical, and acoustic engineering applications.
📐 Browse all free engineering calculators
Quick Navigation
Simple Harmonic Motion Diagram
Simple Harmonic Motion Calculator
Simple Harmonic Motion Equations
Displacement Equation
x(t) = A cos(ωt + φ)
Where:
- x(t) = displacement from equilibrium at time t (meters, m)
- A = amplitude, maximum displacement (meters, m)
- ω = angular frequency (radians per second, rad/s)
- t = time (seconds, s)
- φ = phase angle or initial phase (radians)
Velocity Equation
v(t) = -Aω sin(ωt + φ)
vmax = Aω
Where:
- v(t) = instantaneous velocity (meters per second, m/s)
- vmax = maximum velocity, occurs at equilibrium position (m/s)
Acceleration Equation
a(t) = -Aω² cos(ωt + φ) = -ω²x(t)
amax = Aω²
Where:
- a(t) = instantaneous acceleration (meters per second squared, m/s²)
- amax = maximum acceleration, occurs at maximum displacement (m/s²)
Period, Frequency, and Angular Frequency
ω = 2πf = 2π/T = √(k/m)
T = 2π√(m/k) f = 1/T
Where:
- T = period, time for one complete oscillation (seconds, s)
- f = frequency (hertz, Hz or cycles per second)
- k = spring constant (newtons per meter, N/m)
- m = mass (kilograms, kg)
Energy Equations
E = ½kA² = ½mω²A²
KE(t) = ½mv²(t) PE(t) = ½kx²(t)
Where:
- E = total mechanical energy (constant for undamped SHM) (joules, J)
- KE(t) = kinetic energy at time t (joules, J)
- PE(t) = potential energy at time t (joules, J)
Theory & Practical Applications of Simple Harmonic Motion
Simple harmonic motion represents the most fundamental oscillatory behavior in physics, arising whenever a system experiences a restoring force proportional to displacement from equilibrium. The defining characteristic—acceleration always directed toward equilibrium and proportional to displacement—produces sinusoidal motion describable by a single differential equation: d²x/dt² = -ω²x. This mathematical elegance allows SHM to serve as an approximation for nearly all small-amplitude oscillations in nature, from molecular vibrations at femtosecond timescales to the hour-long oscillations of skyscrapers in wind.
The Phase Space Perspective and Energy Conservation
While time-domain plots show displacement, velocity, and acceleration as separate sinusoidal curves, phase space analysis reveals SHM's deeper structure. Plotting velocity versus displacement produces an ellipse for any oscillating system, with the ellipse's area proportional to total energy. For undamped SHM, this ellipse remains constant—a geometric proof of energy conservation. Real systems trace spiraling trajectories as damping dissipates energy. The phase portrait immediately distinguishes underdamped (spiral to origin), critically damped (fastest approach without overshoot), and overdamped (slow exponential decay) behaviors without solving differential equations. Structural engineers use phase plots to assess bridge cable vibrations: an expanding ellipse signals resonant energy input requiring immediate damping intervention.
The constant exchange between kinetic and potential energy follows KE(t) + PE(t) = ½kA². At equilibrium (x=0), all energy is kinetic: KEmax = ½m(Aω)². At maximum displacement (x=±A), all energy is potential: PEmax = ½kA². These extrema occur π/2 radians (quarter period) apart, creating a 90° phase shift between displacement and velocity. Precision timing systems exploit this phase relationship: quartz crystal oscillators maintain their resonant frequency to within parts per million because thermal expansion affects amplitude but not the phase relationship between elastic and kinetic energy storage.
The Non-Intuitive Amplitude Independence
One of SHM's most counterintuitive properties—period independence from amplitude—contradicts everyday experience with pendulums and springs. A mass-spring system with amplitude 1 cm oscillates at identical frequency to the same system with 10 cm amplitude, though maximum velocity and acceleration increase tenfold. This isochronism (equal time) property requires the restoring force to be perfectly linear: F = -kx with no x², x³, or higher-order terms. Real springs deviate from Hooke's law at large displacements when coils compress against each other, introducing anharmonicity. Seismometers must operate within strictly linear ranges (typically ±1 mm for building-mounted units) to maintain calibrated frequency response; larger displacements introduce harmonic distortion corrupting earthquake magnitude measurements.
The amplitude independence fails catastrophically for pendulums beyond the small-angle approximation (θ < 15°). A simple pendulum's period T = 2π√(L/g) assumes sin(θ) ≈ θ, but at θ = 45°, the period increases 3.5% above small-angle prediction. Historical clock mechanisms used cycloidal pendulum guides—constraining the bob to follow a cycloid curve rather than circular arc—to achieve true isochronism at any amplitude. Modern precision pendulums use electromagnetic drive systems to maintain ±0.1° amplitude variation, limiting period uncertainty to 10⁻⁸ seconds.
Resonance and the Catastrophic Harmonic Oscillator
When an external periodic force matches a system's natural frequency (ωdrive = ω0), resonance produces theoretically infinite amplitude in undamped systems. Real systems reach maximum practical amplitude Ares = F0/(2mγω0), where γ is the damping coefficient and F0 is drive force amplitude. The quality factor Q = ω0/(2γ) measures resonance sharpness: mechanical systems achieve Q = 10²-10⁴, quartz crystals Q ≈ 10⁶, and atomic transitions Q > 10¹⁰. The 1940 Tacoma Narrows Bridge collapse occurred not at driving wind frequency matching the bridge's 0.2 Hz vertical mode, but through aeroelastic flutter coupling torsional and vertical modes. Wind vortices created time-varying lift forces at 0.2 Hz, continuously inputting energy with phase synchronized to bridge motion—the essential resonance condition often misunderstood as "matching frequency."
Modern structures incorporate tuned mass dampers—secondary oscillators with ωdamper ≈ ωbuilding but phase-shifted 180°. Taipei 101's 660-ton steel pendulum suspended between 87th and 92nd floors exemplifies this approach: when the building sways at 0.15 Hz (6.7 s period), the damper oscillates out of phase, dissipating energy through hydraulic shock absorbers. The system reduces peak displacement by 40% during typhoons, preventing resonance amplification that would otherwise produce ±1.5 m sway at the observation deck level. Engineers tune damper frequency by adjusting pendulum length L = g/ω², with millimeter precision required to maintain effectiveness across seasonal temperature variations affecting building stiffness.
Multi-Degree-of-Freedom Systems and Normal Modes
Systems with N coupled oscillators exhibit N normal modes—characteristic frequencies where all elements oscillate sinusoidally at the same frequency but possibly different amplitudes and phases. A two-mass system connected by springs displays symmetric and antisymmetric modes: in the symmetric mode (lower frequency), masses move in phase; in the antisymmetric mode (higher frequency), masses move 180° out of phase. The actual motion decomposes into superpositions of normal modes weighted by initial conditions. Multi-degree-of-freedom mechanical systems require matrix methods to extract normal modes, but the fundamental principle—each mode behaves as an independent simple harmonic oscillator—allows decomposition of arbitrarily complex vibrations into manageable components.
Molecular spectroscopy exploits normal modes to identify chemical compounds: a water molecule's three normal modes (symmetric stretch 3657 cm⁻¹, antisymmetric stretch 3756 cm⁻¹, bending 1595 cm⁻¹) produce unique infrared absorption peaks distinguishing H₂O from D₂O or contaminants. The frequency shift between modes reflects mass ratios and bond strengths through ω = √(k/μ), where μ is reduced mass. Analytical chemists use these "molecular fingerprints" to detect part-per-billion contaminants: a 0.1 cm⁻¹ shift in the antisymmetric stretch indicates isotopic substitution or weak hydrogen bonding to surrounding molecules.
Worked Example: Vibration Isolation for Precision Instrumentation
Problem: An electron microscope with mass m = 1250 kg sits on a vibration isolation table to eliminate building vibrations at fbuilding = 23.7 Hz (ωbuilding = 149 rad/s). Design a passive isolation system using four spring-damper units arranged symmetrically. Calculate: (a) required spring constant per unit for isolation cutoff at 3 Hz, (b) expected amplitude reduction at building frequency, (c) maximum stroke (displacement range) the isolation must accommodate for 2 mm building floor displacement at resonance, (d) damping coefficient to achieve 15% critical damping preventing resonant amplification during system startup, (e) phase lag between floor motion and microscope response at operating frequency.
Solution:
Part (a): Spring constant calculation
For vibration isolation effectiveness, the system natural frequency f0 must be well below driving frequency. We target f0 = 3.0 Hz giving frequency ratio r = fbuilding/f0 = 23.7/3.0 = 7.9 (r > 2.5 required for isolation).
Natural frequency for four springs in parallel:
ω0 = 2πf0 = 2π(3.0) = 18.85 rad/s
ktotal = mω0² = 1250 kg × (18.85 rad/s)² = 444,200 N/m
kper unit = ktotal/4 = 111,050 N/m ≈ 111 kN/m
Each spring unit must provide 111 kN/m stiffness. Commercial air springs or elastomer mounts in this range typically offer 25-50 mm static deflection under load.
Part (b): Amplitude reduction (transmissibility)
For undamped system, transmissibility at frequency ratio r:
T(r) = |1/(1 - r²)| = |1/(1 - 7.9²)| = |1/(1 - 62.41)| = 1/61.41 = 0.0163
This represents 98.4% amplitude reduction, or -35.7 dB attenuation. A 2 mm floor vibration transmits only 0.033 mm to the microscope table—within the 0.1 mm specification for sub-nanometer electron beam stability.
Part (c): Maximum stroke requirement
At system resonance (rare during operation but possible during seismic events or nearby construction), transmissibility peaks. For lightly damped system (ζ = 0.15), peak transmissibility:
Tmax = 1/(2ζ) = 1/(2 × 0.15) = 3.33
If floor experiences Afloor = 2 mm at resonance frequency (unlikely but design-critical):
Atable = Tmax × Afloor = 3.33 × 2 mm = 6.67 mm
Design stroke = 2 × Atable = 13.3 mm (accounting for both positive and negative displacement). Commercial isolation tables typically provide ±10 to ±20 mm stroke with mechanical stops preventing damage.
Part (d): Damping coefficient
Critical damping coefficient:
ccrit = 2√(km) = 2√(444,200 × 1250) = 2√(555,250,000) = 47,140 N·s/m
For 15% critical damping (ζ = 0.15):
c = ζ × ccrit = 0.15 × 47,140 = 7,071 N·s/m total
cper unit = 7,071/4 = 1,768 N·s/m ≈ 1.8 kN·s/m per damper
This light damping preserves high-frequency isolation (heavy damping would couple floor vibrations back to the table) while preventing resonance amplification. Viscous dampers with adjustable orifices allow field tuning.
Part (e): Phase lag
For damped forced oscillation, phase angle φ between excitation and response:
tan(φ) = (2ζr)/(1 - r²) = (2 × 0.15 × 7.9)/(1 - 7.9²) = 2.37/(-61.41) = -0.0386
φ = arctan(-0.0386) = -2.21° ≈ -0.0386 radians
The microscope table lags floor motion by 2.21° phase angle at 23.7 Hz. At this frequency, one cycle takes T = 1/23.7 = 0.0422 s, so phase lag represents:
tlag = (2.21°/360°) × 0.0422 s = 0.000259 s = 0.26 milliseconds
This minimal phase lag confirms the isolation system responds nearly instantaneously to floor motion, with amplitude reduction achieved through dynamic stiffness, not time delay. Large phase lags (approaching 180°) occur only near resonance where ζ becomes critical for system stability.
Verification: Check isolation effectiveness at twice and half target frequency. At f = 6 Hz (r = 3.95): T = 0.0621 (93.8% reduction). At f = 1.5 Hz (r = 1.98, near crossover): T = 0.503 (50% reduction but below isolation zone). The design successfully isolates all vibrations above 6 Hz while maintaining stability.
Nonlinear Oscillators and the Duffing Equation
Real systems deviate from pure SHM through nonlinear restoring forces. The Duffing oscillator includes cubic term: F = -kx - αx³, producing "hardening" (α > 0) or "softening" (α < 0) springs whose period depends on amplitude. Hardening springs—common in buckled beams and geometrically nonlinear structures—increase frequency at large amplitude, while softening springs (magnetic levitation, inverted pendulums) decrease frequency. This amplitude-frequency coupling enables nonlinear energy harvesting: a vibration energy harvester with softening spring maintains near-resonance operation across wider frequency ranges than linear devices, critical for powering wireless sensors from variable-frequency machinery vibrations.
The Van der Pol oscillator, modeling self-excited oscillations in electrical circuits and biological rhythms, demonstrates limit cycles—stable oscillations whose amplitude depends on system parameters rather than initial conditions. Unlike SHM where any initial disturbance creates sustained oscillation at that amplitude, limit cycle systems either grow to or decay to a unique stable amplitude. The human heart's pacemaker cells exhibit Van der Pol dynamics: membrane voltage oscillates at fixed amplitude regardless of transient perturbations, ensuring reliable 60-80 bpm rhythm. Medical pacemakers exploit this principle, applying small corrective pulses only when phase deviates from target rather than continuously driving oscillation.
Frequently Asked Questions
Free Engineering Calculators
Explore our complete library of free engineering and physics calculators.
Browse All Calculators →🔗 Explore More Free Engineering Calculators
- Bolt Torque Calculator — Preload and Clamp Force
- Omni-Wheel Robot Velocity Resolver
- Joint Friction & Damping Coefficient Calculator
- Newton's Second Law Calculator — F=ma
- Friction Coefficient Calculator
- Conservation Of Momentum Calculator
- Elastic Constants Calculator
- Reynolds Number Calculator — Laminar or Turbulent
- Factor of Safety Calculator
- Von Mises Stress Calculator — Combined Loading
About the Author
Robbie Dickson — Chief Engineer & Founder, FIRGELLI Automations
Robbie Dickson brings over two decades of engineering expertise to FIRGELLI Automations. With a distinguished career at Rolls-Royce, BMW, and Ford, he has deep expertise in mechanical systems, actuator technology, and precision engineering.