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.
| Name | Unit | Range | Default | Description |
|---|---|---|---|---|
| processGainnumber | none | at least 0.001 | 1.5 | Output change / Input step size from step test |
| deadTimenumber | s | at least 0.001 | 0.1 | Time before response begins |
| timeConstantnumber | s | at least 0.001 | 1 | Time for 63.2% of final step response |
| overshootBudgetnumber | % | 0.1 … 200 | 25 | The 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.
| Field | Unit | Description |
|---|---|---|
| kpPIDheadline | none | Kp (PID) |
| kiPID | 1/s | Ki (PID) |
| kdPID | s | Kd (PID) |
| kpPI | none | Kp (PI only) |
| tiPI | s | Ti (PI only) |
| tiPID | s | Ti (PID) |
| tdPID | s | Td (PID) |
| overshootPct | % | How far the process overshoots a setpoint step under the PID gains, simulated with the derivative on the measurement |
| settlingTime | s | When 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.