PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

Related simulators

Continue with similar topics in this category — or all 48 in Engineering.

View category →
NewUniversity / research

PID Controller (1D)

Launch Simulator

Cart on a track: Kp, Ki, Kd and random velocity impulses toward set-point x = 0.

NewUniversity / research

Thermostat vs PID

Launch Simulator

First-order room: on/off hysteresis vs continuous PID heater power.

NewUniversity / research

Cart–Pole: LQR vs MPC vs PID

Launch Simulator

Nonlinear cart inverted pendulum: linearize about upright φ = θ, discrete-time LQR from DARE (Q, R → K), finite-horizon LQ MPC with DARE terminal cost, and hand-tuned PID — same force limit, kicks, and plant as the mechanics cart-pole.

NewUniversity / research

Root Locus: 1 + K·G(s) = 0

Launch Simulator

Same pole–zero plant editor as the Bode/Nyquist map: trace closed-loop poles as K sweeps log-spaced, asymptotes and real-axis locus sketch, Durand–Kerner roots at the current K; characteristic D(s)+K g₀ N₀(s)=0.

NewUniversity / research

Jeffcott Rotor Critical Speed

Launch Simulator

Single disk on a flexible shaft: ω_n = √(k/m), unbalance response, whirl orbit, phase lag, and critical-speed crossing.

NewUniversity / research

Torsional Drivetrain Resonance

Launch Simulator

Two-inertia torsional drivetrain: shaft stiffness and damping, twist angle, first natural mode, resonance response, and optional backlash deadzone.

PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Engineering/PID Tuning Sandbox

PID Tuning Sandbox

Second-order plant step response: overshoot, rise/settling time, Ziegler–Nichols Ku/Pu hints, actuator saturation, and disturbance rejection.

PID gains & plant

2.2
1.1
0.55
1
0.8 s
0.35
12
0.35
8 s

Plant: τ²ÿ + 2ζτẏ + y = K(u+d). Controller: u = Kp e + Ki∫e + Kd ė with saturation. Z–N finds ultimate gain Ku and period Pu under P-only control, then sets Kp=0.6Ku, Ti=0.5Pu, Td=0.125Pu.

Measured values

Overshoot12.1%
Rise time0.80s
Settling time13.10s
Steady-state |e|0.001
Z–N Ku—
Z–N Pu—s

Live graphs

About this model

This PID tuning sandbox closes a classical feedback loop around a second-order plant τ²ÿ + 2ζτẏ + y = K(u + d). A unit step in the setpoint r drives the error e = r − y into a saturated PID law u = Kp e + Ki ∫e dt + Kd ė. The page reports the usual step-response metrics: percent overshoot, 10–90% rise time, ±2% settling time, and steady-state error. A load disturbance step at a chosen time shows how well the tuned gains reject external forcing. The Ziegler–Nichols button estimates the ultimate gain Ku and ultimate period Pu under pure proportional control (sustained oscillation), then applies the classic PID rules Kp = 0.6 Ku, Ti = 0.5 Pu, Td = Pu/8. The model is pedagogical: it omits sensor noise, anti-windup beyond simple integral clamping, higher-order plant dynamics, and formal stability margins.

Who it's for: Students in classical control, mechatronics, and process control learning gain tuning, step-response metrics, and Ziegler–Nichols heuristics.

Key terms

  • PID controller
  • Step response
  • Overshoot
  • Settling time
  • Rise time
  • Ziegler–Nichols
  • Ultimate gain
  • Disturbance rejection
  • Actuator saturation

How it works

PID tuning sandbox: unit step response with overshoot, rise time, settling time, Ziegler–Nichols gain suggestions, and load-disturbance rejection on a second-order plant.

Key equations

u = Kp e + Ki ∫e dt + Kd ė, e = r − y
τ²ÿ + 2ζτẏ + y = K(u+d); Z–N: Kp=0.6Ku, Ti=0.5Pu, Td=Pu/8

Frequently asked questions

What are Ku and Pu?
Under pure P control, increasing Kp eventually produces sustained oscillation. That critical gain is Ku and the oscillation period is Pu. Ziegler–Nichols maps (Ku, Pu) into suggested PID gains.
Why does Z–N sometimes look aggressive?
The classic rules aim for a quarter-amplitude decay response, which often has noticeable overshoot. Many modern tunings detune from Z–N for smoother behavior.
What does the disturbance step test?
A sudden load d shifts the plant input. Integral action should remove the resulting offset; derivative and proportional terms shape how quickly the output recovers.
How is this different from the cart PID page?
The cart demo is a live 1D mechanical toy with random kicks. This sandbox focuses on quantitative step-response metrics, plant parameters, and Ziegler–Nichols suggestions on a standard second-order plant.