Release. Push. Find the rhythm.
Explore a mass, spring and viscous damper before adding a controller. Motion, energy and plots come from the same equations.
Release, then watch the energy
Displace the mass by 0.25 m and release it without pushing. Where does the motion's energy go?
Pin the baseline. Change only damping c to 0 and pin again. Compare displacement and Energy at the same time. Then try c = 8 N·s/m, the critical value for this m and k.
Preparing the physics engine…
One time, every signal
Click a trace or use the replay slider. Pinned traces are dashed and numbered; the current run is solid cyan.
Compare one change 0/3
Keep mass, stiffness, force and initial conditions matched when testing damping. Pins allow other changes too, so check their labels.
Measured step response
Rise, overshoot and settling apply only to a nonzero step from zero initial state. Settling requires at least 1 s within the band through the recorded end; it is not a general stability proof. The equilibrium line is not a controller target, and at zero damping it need not be reached.
Equations, assumptions and numerical method
m·x″ + c·x′ + k·x = F(t) · G(s) = 1/(ms² + cs + k)
An ideal horizontal mass, linear spring and viscous damper share displacement. There is no gravity along the motion, no travel stop, dry friction, sensor noise, saturation or feedback controller. The visual scale adapts to each run; compare the numbers and plots. Large excursions are mathematical predictions, not a claim that a real spring remains linear.
Fixed-step RK4 at 1 ms runs in a Web Worker; samples are recorded every 20 ms. Playback speed changes neither time integration nor force history. Energy balance: E(t) − E(0) = Wexternal − Edissipated.
Final energy residual: J
University of Michigan CTMS — System Modeling ↗