Relay Feedback PID Auto-Tuning Under Construction
Interactive Åström–Hägglund relay feedback auto-tuner. Pick any process model, run relay experiment to measure ultimate gain and period, then switch to automatically-tuned PID control.
Plant: G(s) = K·e−Ls / (Ts + 1) |
Relay: u = d·sgn(e) |
PID: u = Kp·e + Ki∫e + Kd·de/dt
Measured / Computed Values
Limit Amp a
—
Ultimate Period Tu
—
Ultimate Gain Ku
—
κ (Ku/K)
—
Kp
—
Ki
—
Kd
—
Error e
0.00
Simulation Controls
Process Model
Relay
PID Gains (Manual)
Reference r(t)
Tuning Formulas & References
All rules below are derived from a single relay-feedback experiment that produces the ultimate gain Ku and ultimate period Tu via describing-function analysis:
Ku = 4d / (π·a), ωu = 2π / Tu
where d is the relay amplitude and a is the resulting limit-cycle amplitude.
Ziegler–Nichols (1942)
The classic frequency-domain rules. Aggressive — expect ~25% overshoot on step setpoints. For aggressive setpoint tracking (e.g. square waves), ZN Classic is the default choice.
| Variant | Kp | Ti | Td | Notes |
|---|---|---|---|---|
| Classic | 0.60 · Ku | 0.50 · Tu | 0.125 · Tu | Quarter-decay, ~25% overshoot |
| Some Overshoot | (1/3) · Ku | 0.50 · Tu | (1/3) · Tu | Less overshoot, slower |
| No Overshoot | 0.20 · Ku | 0.50 · Tu | (1/3) · Tu | Conservative, monotonic step |
AMIGO — Åström & Hägglund (2006), Eq. 7.7
Model-based AMIGO. Uses the FOLPD parameters L, T together with the measured Ku, Tu to produce a controller with target overshoot around 10% — less aggressive than ZN, but slower setpoint tracking. For SOPDT, the effective time constant is taken as max(T1, T2).
| Parameter | Formula |
|---|---|
| Kp | (0.2 + 0.45 · Tu/T) / Ku |
| Ti | 0.4 · Tu / (1 + 0.5 · L/T) |
| Td | 0.5 · Tu · L / T |
Convert to standard gains: Ki = Kp / Ti and Kd = Kp · Td. The process model gain K does not appear directly — only the ratio Tu / T matters, which is what makes AMIGO tolerant of static-gain errors in the FOLPD model.
Process model used for the relay experiment
The relay feedback rules above are model-free (they only use Ku, Tu). The simulator additionally supports an FOLPD model G(s) = K · e−L·s / (T·s + 1) for users who want to compare with model-based rules. The κ = Ku / K gain ratio reported in the live values panel is useful for diagnostic purposes — a very large κ (≥ 10) usually indicates either a poorly-conditioned plant or a relay amplitude that is too small to overcome hysteresis.
References
- Åström, K. J. & Hägglund, T. (1984). "Automatic tuning of simple regulators with specifications on phase and amplitude margins." Automatica, 20(5), 645–651.
- Ziegler, J. G. & Nichols, N. B. (1942). "Optimum settings for automatic controllers." Trans. ASME, 64(8), 759–768.
- Åström, K. J. & Hägglund, T. (2006). Advanced PID Control. ISA — The Instrumentation, Systems, and Automation Society. Chapter 7 (PID Design), §7.4 (AMIGO).
- Hornsey, S. (2010). "A piecewise linear extension of the Ziegler–Nichols method." IEEE Control Systems Magazine, 30(6), 124–127. (cited for variant definitions; not the rule set used here.)