Skip to content
Documentation sections

PID Controller Tuning (Ziegler-Nichols)

POSThttps://rftools.io/api/py/v1/calculate

Slug pid-tuning. Calculate PID controller gains using the Ziegler-Nichols open-loop (reaction curve) method from process gain, dead time, and time constant.

Inputs

Send every one of these in inputs, in the units shown. Most are required: a call without one is refused (400) and costs nothing; one the calculator can do without takes the default shown. An input outside its range is still computed and flagged in the provenance.

Inputs of pid-tuning
NameUnitRangeDefaultDescription
processGainnumbernoneat least 0.0011.5Output change / Input step size from step test
deadTimenumbersat least 0.0010.1Time before response begins
timeConstantnumbersat least 0.0011Time for 63.2% of final step response
overshootBudgetnumber%0.1 … 20025The overshoot the loop may have on a setpoint step; Ziegler–Nichols tuning aims at about 25 % (Ogata, Modern Control Engineering, 5th ed., ch. 8)

Outputs

Returned in values, by key. A value that is unbounded or undefined is null.

Outputs of pid-tuning
FieldUnitDescription
kpPIDheadlinenoneKp (PID)
kiPID1/sKi (PID)
kdPIDsKd (PID)
kpPInoneKp (PI only)
tiPIsTi (PI only)
tiPIDsTi (PID)
tdPIDsTd (PID)
overshootPct%How far the process overshoots a setpoint step under the PID gains, simulated with the derivative on the measurement
settlingTimesWhen the simulated step response last leaves ±2 % of the setpoint

Calling it

  • Calculate: one call, the request and response in full, and its errors.
  • Batch: this calculator with others, or a sweep, in one request.
  • Solve for a target: the value of one input that brings an output to a target.