3D Interactive Laboratory Simulation

Spring-Mass-Damper and PID Step Response — 3D Lab Simulation

Tune m, c, k and Kp, Ki, Kd to see overshoot, rise time and settling time

Theoretical Foundation & Historical Context

The spring-mass-damper m·x'' + c·x' + k·x = u is the standard model for vehicle suspensions, robot arms and many mechanisms. With only the spring in play, the damping ratio ζ = c / 2√(km) decides whether the response is underdamped, critically damped or overdamped. In 1922 Minorsky described the proportional-integral-derivative controller for ship steering: u = Kp·e + Ki·∫e dt − Kd·x'. The simulation plots the step response and measures overshoot, 10-90 % rise time, 2 % settling time and steady-state error.

Law: Damped second-order oscillator with PID feedback control  |  Scientist: Nicolas Minorsky  |  Year: 1922

Key Learning Objectives & Competencies

  • ✓ Classify a response as underdamped, critically damped or overdamped from ζ.
  • ✓ Read overshoot, rise time, settling time and steady-state error from a step response.
  • ✓ Explain what each PID term does and how tuning trades speed against overshoot.

Mathematical Formulations & Differential Equations

Equation of motion
m·x'' + c·x' + k·x = u(t)

Passive: u = k·r, so DC gain is 1 and x(∞) = r

Natural frequency, damping ratio, overshoot
ωn = √(k/m),  ζ = c / (2√(km)),  Mp = exp(−πζ / √(1−ζ²))

Mp applies for ζ < 1; the 2 % settling time is about 4 / (ζ·ωn)

PID controller
u = Kp·e + Ki·∫e dt − Kd·dx/dt,   e = r − x

Derivative acts on the measurement to avoid a kick at the step; the integral is clamped against windup

Physical Parameters & Units of Measurement

Symbol Physical Quantity SI Unit Default
m Mass (kg) — —
c Damping coefficient (N·s/m) — —
k Spring stiffness (N/m) — —
Kp, Ki, Kd Proportional, integral and derivative gains of the PID — —
ζ Dimensionless damping ratio — —

Real-World & Industrial Engineering Applications

Engineering Application 01

Vehicle suspension and shock absorber design.

Engineering Application 02

Motor, robot-joint and drone attitude control loops.

Engineering Application 03

Process control: temperature, flow and pressure regulation in industry.

3-Step Controlled Experimental Protocol

  1. Step 1: Baseline Setup — Initialize the simulation in standard conditions and observe undisturbed system dynamics.
  2. Step 2: Parameter Variation — Gradually modulate physical parameters using the control panel sliders.
  3. Step 3: Verification & Phase Space Analysis — Compare phase space trajectories and conservation metrics against analytical ODE solutions.

Frequently Asked Questions (FAQ)

Why does an integral term remove steady-state error?

The integral accumulates error over time, so the control output keeps changing until the error is exactly zero.

What does raising Kd do?

Kd adds effective damping, cutting overshoot and ringing, but it amplifies measurement noise and slows the system if too large.

Why can the response become unstable?

With excessive gain, especially Ki, the loop adds energy instead of removing it, so oscillations grow; the simulation clamps amplitude for display.

Related Simulations & Experiments

Closed-Loop Feedback PID Controller

Proportional-integral-derivative automatic feedback control with dynamic plant tracking

Interactive Simulation: Interactive real-time 60 FPS WebGL simulation is active in your browser. Rotate, zoom, and inspect physical apparatus components with full camera freedom.

Academic & Encyclopedic Reference: Wikipedia — Spring-Mass-Damper and PID Step Response