⏳

Smith Predictor

Dynamics
Run the live example Free · no sign-up · runs in your browser

The SmithPredictor block implements an industrial dead-time (transport delay) compensator based on the classic Smith predictor architecture. In processes characterized by significant transport lags (such as long pipelines, conveyor belts, heating ducts, and chemical reactors), conventional PID controllers must be severely detuned to avoid unstable oscillations caused by phase lag (Δϕ=−ωθ\Delta \phi = -\omega \theta). The SmithPredictor incorporates an internal First-Order Plus Dead-Time (FOPDT) model of the plant, generating an undelayed prediction of the process variable that feeds the feedback controller directly, allowing tight and aggressive loop tuning as if dead time were absent.

Mathematical Model

The nominal plant model is represented in the Laplace domain by a first-order lag with transport dead time:

Gp(s)=G0(s)e−θs=Kτs+1e−θsG_p(s) = G_0(s) e^{-\theta s} = \frac{K}{\tau s + 1} e^{-\theta s}

where KK is static gain, τ\tau is time constant (tau), and θ\theta is transport delay (deadTime).

The block receives the controller output u(t)u(t) and the actual delayed measurement y(t)y(t). It evaluates an internal fast model without delay y^0(t)\hat{y}_0(t) and a delayed model output y^d(t)\hat{y}_d(t):

τdy^0(t)dt+y^0(t)=Ku(t)y^d(t)=y^0(t−θ)\begin{aligned} \tau \frac{d\hat{y}_0(t)}{dt} + \hat{y}_0(t) &= K u(t) \\ \hat{y}_d(t) &= \hat{y}_0(t - \theta) \end{aligned}

The predicted feedback signal y^(t)\hat{y}(t) routed to the controller is:

y^(t)=y^0(t)+(y(t)−y^d(t))\hat{y}(t) = \hat{y}_0(t) + \left( y(t) - \hat{y}_d(t) \right)

where the residual term em(t)=y(t)−y^d(t)e_m(t) = y(t) - \hat{y}_d(t) reflects unmodeled external disturbances and model parameter mismatch. When the model matches the plant perfectly and disturbances are absent, em(t)≡0e_m(t) \equiv 0, and the feedback loop operates as if the plant had zero dead time.

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

Example 1: Long Industrial Heat Exchanger Fluid Temperature Control

Controlling hot water discharge temperature where sensor placement along a long pipe introduces θ=5.0 s\theta = 5.0\text{ s} of dead time with a thermal lag of τ=10.0 s\tau = 10.0\text{ s} and gain K=1.0K = 1.0. Without compensation, a PI controller must use very low gains (Kp≤0.5K_p \le 0.5) to avoid oscillation. Adding a SmithPredictor allows tuning the controller aggressively (Kp=2.0,Ki=0.2K_p = 2.0, K_i = 0.2), accelerating settling time by over 300%300\% without overshoot.

Example 2: Conveyor Belt Thickness Regulation with Disturbance Estimation

Regulating sheet thickness on an industrial rolling mill where optical thickness gauges sit downstream from the roll gap (θ=2.5 s\theta = 2.5\text{ s}). Monitoring the auxiliary error_model port (em=y−y^de_m = y - \hat{y}_d) provides real-time detection of unmodeled raw material thickness variations independently of control actions.

Remarks & Best Practices

  • Model Accuracy Criticality: The effectiveness of dead-time compensation depends directly on model fidelity. While errors in KK and τ\tau are partially corrected by the disturbance feedback loop, a significant mismatch in deadTime can degrade closed-loop stability.
  • Stable Plants Only: The internal open-loop model simulation requires open-loop stable plants (τ>0\tau > 0). Pure integrating plants (1/s1/s) or open-loop unstable dynamics will drift away from the real system.
  • Disturbance Rejection Timing: While setpoint tracking is accelerated significantly, external load disturbances entering at the plant output are still delayed by θ\theta before reaching the feedback loop.
  • Auxiliary Telemetry Ports: Provides optional diagnostic outputs: y_model (undelayed prediction) and error_model (mismatch/disturbance estimate).

Frequently Asked Questions (FAQ)

Q: Why does pure dead time (transport delay) break standard feedback loops?

A pure transport delay e−sθe^{-s \theta} introduces phase lag Δϕ(ω)=−ωθ\Delta \phi(\omega) = -\omega \theta radians that grows linearly with frequency without any gain reduction. This destroys the phase margin, forcing controllers to drastically lower loop gain. The Smith Predictor eliminates the delay term from the closed-loop characteristic equation by predicting the delay-free output via an internal plant model.

Related Components

  • Delay: Continuous transport delay block (e−θse^{-\theta s}).
  • PIDController: Three-term closed-loop controller.
  • TransferFunction: General continuous linear transfer function B(s)/A(s)B(s)/A(s).
  • LeadLag: Dynamic lead/lag phase compensator.