ZERO Notificatons

NO Feedback yet!!

okay

xparo
X.P.A.R.O



PID Tuning Simulator

Pick a plant, drag the P, I and D gains, and see the step response, overshoot, settling time and actuator effort update instantly.

Plant and controller

Presets

Step response

Rise time—10 % → 90 %
Overshoot—past the setpoint
Settling time—within 2 %
Steady error—before any load
Saturated—time at the limit
Error under load—end of the run

    How to use the PID tuning simulator

    1. Pick a system. Four plants behave like hardware you meet on robots: a DC motor speed loop, a motor position (servo) loop, a heater with dead time, and a lightly damped mass on a spring. Each has a realistic actuator limit: 12 V for the motors, 0 to 100 % for the heater, ±20 N for the spring.
    2. Start from a preset. Each preset demonstrates one behaviour, and the note under the buttons explains what to look for.
    3. Drag the gains. The sliders are logarithmic, so small values are easy to reach, and the number boxes take exact values. The response redraws as you move.
    4. Stress the tuning. Turn on sensor noise and the load disturbance. A tuning that only looks good on a clean step often falls apart here.
    5. Compare. Pin a response you like, keep adjusting, and the pinned curve stays on the chart as a dashed grey line. Copy link saves the exact settings in the URL.

    What the simulator computes

    The controller is the standard parallel PID, run at the loop rate you choose and held constant between updates (zero-order hold), exactly like a timer interrupt on a microcontroller:

    e = setpoint − measurement u = Kp·e + Ki·∫e dt + D D = Kd · d(e)/dt (derivative on error) D = −Kd · d(measurement)/dt (derivative on measurement) D is low-pass filtered: τ·dD/dt + D = Kd·d(input)/dt u is clamped to the actuator limits

    With anti-windup on, the integral stops accumulating whenever the output is already saturated and the error would push it further, which is the clamping method used in most embedded controllers. The plants are simulated with a fourth-order Runge-Kutta integrator at a much finer time step than the controller, so what you see is the controller's behaviour, not integration error.

    Reading the numbers

    MetricMeaningIf it is too high
    Rise timeTime from 10 % to 90 % of the stepRaise Kp (if the actuator is not already saturating)
    OvershootHow far the output goes past the setpoint, as a percentage of the stepLower Kp or Ki, or add Kd
    Settling timeTime until the output stays within 2 % of the setpointAdd damping (Kd) or reduce Ki
    Steady errorAverage error near the end, before any load is appliedAdd Ki
    SaturatedShare of the run the actuator spends at its limitExpect windup; enable anti-windup or lower the gains
    Error under loadError left after the load disturbanceOnly the integral removes it: raise Ki

    A quick tuning recipe

    1. Set Ki and Kd to zero. Raise Kp until the response is quick with a little overshoot.
    2. Add Kd until the overshoot shrinks. Stop if the controller output turns noisy once sensor noise is on.
    3. Add Ki until the steady error disappears in a reasonable time, then back off if overshoot returns.
    4. Turn on noise and the disturbance, and check that the tuning still behaves. Keep anti-windup on.

    The plants are simple models. Use the simulator to build intuition and to find the right order of magnitude, then finish tuning on the real system, starting with lower gains than you think you need.

    Frequently asked questions

    What do P, I and D do?

    P reacts to the current error, I removes steady error by accumulating it over time, and D damps the response by reacting to how fast the measurement changes. Increase each in the simulator to see its effect.

    Which gain should I tune first?

    Start with I and D at zero, raise P until the response is fast with slight overshoot, add D to calm the overshoot, then add just enough I to remove the remaining error.

    Why does my response overshoot so much?

    Usually because P or I is too high, or because the integral keeps growing while the actuator is saturated. Turn on anti-windup in the simulator to see the difference.

    What do rise time, overshoot and settling time mean?

    Rise time is how long the output takes to go from 10 to 90 percent of the step, overshoot is how far it goes past the target, and settling time is when it stays within 2 percent of the target.

    Guides for this tool

    In-depth articles that explain the ideas behind the PID Tuning Simulator, with worked examples.

    PID Tuning Simulator has its own project page with the story behind the tool, a gallery and every guide in one place.

    Visit the project page →

    More free tools

    Every tool runs in your browser. Nothing you enter is uploaded.