Appearance
PID Controller
Proportional-Integral-Derivative controller: out = Kp·e + Ki·∫e dt + Kd·de/dt. Setting any gain to zero disables that term and the icon label shrinks to the active letters (e.g. "PI" when Kd = 0). Two optional clamps are available: an anti-windup clamp on the I term's contribution and a saturation clamp on the final output. Each clamp turns on its own little saturation-curve icon inside the body so the active limits are visible at a glance.
Category: Continuous
Keywords: PID, controller, PI, PD, P, I, D, proportional, integral, derivative, feedback, control, Kp, Ki, Kd, anti-windup, saturation, clamp, limit
Ports
| Name | Direction | Value type | Notes |
|---|---|---|---|
in | input | double | |
out | output | double |
Parameters
| Name | Label | Type | Default | Units | Description |
|---|---|---|---|---|---|
kp | Kp | double | 1 | — | Proportional gain. Set to 0 to disable the P term (the icon label drops the 'P'). |
ki | Ki | double | 0.1 | — | Integral gain. Set to 0 to disable the I term (the icon label drops the 'I' and the integrator stops accumulating even if Ki is later restored; the saturation toggle and limits remain in the dialog and are honoured when Ki is non-zero). |
kd | Kd | double | 0.01 | — | Derivative gain (backward-difference). Set to 0 to disable the D term (drops the 'D' from the icon). |
initial_integrator | I₀ | double | 0 | — | Initial value of the integrator state at sim_time = 0. |
i_saturation | I saturation | enum (Off / On) | 0 | — | Clamp the integral term's contribution (Ki·∫e dt) to [I_min, I_max]. Standard anti-windup: once the contribution hits a limit, the integrator state itself is back-solved so further input in the same direction cannot grow it. |
i_upper_limit | I_max | double | 1 | — | Upper saturation limit on Ki·∫e dt. |
i_lower_limit | I_min | double | -1 | — | Lower saturation limit on Ki·∫e dt. |
out_saturation | Output saturation | enum (Off / On) | 0 | — | Clamp the final summed output (P + I + D) to [Out_min, Out_max] after every step. Independent of the I-term anti-windup clamp above — you can use either, both, or neither. |
out_upper_limit | Out_max | double | 1 | — | Upper saturation limit on the final output. |
out_lower_limit | Out_min | double | -1 | — | Lower saturation limit on the final output. |
Implemented in C++ class SimCompCtlPid (components/control/CSim_comp_ctl_pid/sim_comp_ctl_pid.h).