Smith Predictor
DynamicsThe Smith Predictor compensates for dead time — the transport delay between acting on a
process and seeing the result, like the hot water that takes seconds to reach the shower
head. A PID controller fed the delayed measurement keeps pushing while nothing seems to
happen, overshoots, and oscillates; the usual cure is detuning it until it is slow.
The block holds an internal first-order model of the plant and runs it twice: once
without the dead time and once with it. Its output, the predicted process variable, is
the undelayed model plus whatever the measurement disagrees with the delayed model. Wire
that output to the controller's feedback and, when the model matches, the controller
sees the plant as if the dead time were not there — so it can be tuned for the plant
alone, and the response is that fast response, shifted by the dead time.
Mathematical Model
Where:
u(inputu) is the controller output, which drives both the plant and the modely_meas(inputy) is the measured process variable, with the dead time in itŷ_mis the model output without dead time (outputŷ_model)y_meas − ŷ_m(t − θ)is the model error (outpute_model): disturbances plus mismatchŷis the predicted process variable (outputŷ)
The model is discretised exactly for the simulation sample time (zero-order hold on
u) and advances once per sample.
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | in1 |
u | number | Required |
| → In | in2 |
y | number | Required |
| ← Out | y_pred |
ŷ | number | Output |
| ← Out | y_model |
ŷ_model | number | Output |
| ← Out | error_model |
e_model | number | Output |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
gain |
Plant Gain (K) | number | 1 |
Static gain of the plant model |
tau |
Time Constant (τ) | number | 10 |
First-order time constant of the plant model |
deadTime |
Dead Time (θ) | number | 5 |
Transport delay to compensate; should match the plant's dead time |
initialOutput |
Initial Output | number | 0 |
Model output at the start; set it to the plant's initial value |
Usage Examples
PI Control Across a 5 s Dead Time
A PI controller tuned for the plant 1/(10s+1) alone — Kp = 2, Ki = 0.2, whose
integral time cancels the plant's time constant — drives that plant through 5 s of dead
time. Fed back through the Smith predictor the plant output rises as a smooth first-order
curve, 5 s late. Rewire the subtraction's second input to the delayed output instead and
the same controller oscillates.
Remarks & Best Practices
- The compensation is only as good as the model. A wrong gain or time constant shows up
in e_model and is corrected there, but a wrong dead time can make the loop worse than
no predictor at all: match deadTime to the plant first.
- The internal model is open loop, so a Smith predictor is for stable plants. An
integrating or unstable plant drifts away from its model.
- Disturbances reach the controller only through the measurement, so they are still
rejected a dead time late — the predictor speeds up setpoint tracking, not disturbance
rejection.
Related Components
- Delay" class="bw-link">Delay
- PIDController" class="bw-link">PIDController
- TransferFunction" class="bw-link">TransferFunction