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

More from Engineering

Other simulators in this category — or see all 48.

View category →
NewSchool

Two-Link Arm IK (2R)

Launch Simulator

Planar 2R manipulator: mouse goal, elbow-up / elbow-down inverse kinematics; joint angles live.

NewSchool

Four-Bar Linkage

Launch Simulator

Crank–rocker geometry with coupler-curve trace; link lengths and crank speed.

NewSchool

Cam & Follower

Launch Simulator

Eccentric circular cam and knife-edge follower: lift and estimated velocity.

NewSchool

Finite State Machine

Launch Simulator

Traffic-light Moore machine: timed green–yellow–red cycle or manual step; state graph.

NewUniversity / research

ADC / DAC (Sampling)

Launch Simulator

Sine → samples → quantization → ZOH; Nyquist and optional aliasing demo.

NewSchool

Stepper Motor (4-phase)

Launch Simulator

Full-step vs half-step commutation; rotor snaps as coils A–B–A′–B′ sequence.

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.