PID Tuning (Ultimate Gain)

Tune PI or PID controllers from ultimate gain and oscillation period using classic rules.

Tool Purpose & README

Loading README...

Inputs

Measure the ultimate gain and period by increasing proportional gain until the loop oscillates with a steady amplitude, then select a tuning rule and controller type.

?
?
?
?

Enter parameters and click Calculate to generate tuning gains.

Time Constants

Run a calculation to plot Ti and Td.

Tuning Coefficients

Run a calculation to plot dimensionless tuning coefficients.

Coefficients are computed from Kp/Ku, Ti/Pu, and Td/Pu.

Chart checklist
  • Axes are labeled and include units.
  • Legend is present and matches the plotted series.
  • Scale type is correct and stated (linear or log).
  • Plotted values are finite (no NaN or infinity gaps).
  • Ranges look physically plausible for the inputs.
  • Annotations reflect the correct numeric values.

Ultimate Gain PID Tuning

Loading summary...

The ultimate gain method identifies the proportional gain that drives a closed loop into sustained oscillation. Once you capture the oscillation period, classic tuning rules convert those two measurements into PI or PID settings that are easy to implement and validate.

Workflow

  1. Close the loop with proportional-only control.
  2. Increase proportional gain until the output oscillates with constant amplitude.
  3. Record the ultimate gain (Ku) and oscillation period (Pu).
  4. Select the tuning rule and controller type, then review the recommended gains.

When to Use This Tool

Use these settings for initial commissioning or for legacy loops with unknown models. They provide a consistent baseline for more detailed tuning, simulation, or auto-tune procedures.

Input Parameters

Detailed definitions for every input shown in the calculator.

Output Parameters

Descriptions of every tuned gain and time constant.

Tuning Rule Selection

The Ziegler-Nichols rule targets faster response and quarter-amplitude decay, which can introduce overshoot or oscillatory behavior on sensitive processes. The Tyreus-Luyben rule is more conservative, often delivering smoother control with improved stability margins.

Ziegler-Nichols (Ultimate Gain)

  • Faster rise time with higher proportional gain.
  • Best for systems that can tolerate overshoot.
  • Common starting point for further manual tuning.

Tyreus-Luyben (Ultimate Gain)

  • Lower proportional gain and longer integral time.
  • More robust when actuator limits or dead time dominate.
  • Preferred for integrating or noisy processes.

Implementation Notes

The gains provided are in parallel form: u = Kp * e + Ki * integral(e dt) + Kd * de/dt. Ensure your controller uses the same form, or convert as needed. Many industrial controllers use series or ISA form, which require different parameter mapping.

Practical Considerations

  • Derivative filtering: Apply a filter to reduce noise amplification.
  • Integral windup: Use anti-windup to avoid slow recovery after saturation.
  • Sampling time: Use a sample rate at least 10x faster than the dominant loop dynamics.
  • Actuator limits: Re-test Ku and Pu if saturation occurs during the ultimate gain test.

Equations

The tool applies the selected tuning coefficients to Ku and Pu, then converts to parallel-form gains.

Visualization uses the dimensionless ratios C_Kp = Kp/Ku, C_Ti = Ti/Pu, and C_Td = Td/Pu.

References

  • J. G. Ziegler and N. B. Nichols, "Optimum Settings for Automatic Controllers," Trans. ASME, 1942.
  • B. D. Tyreus and W. L. Luyben, "Tuning PI Controllers for Integrator/Dead Time Processes," Ind. Eng. Chem. Res., 1992.