Skip to content
Tutorials Center
My learning

Topics

Lesson 18 of 36 ยท Continuous and Discrete Systems

Simulink Transport Delay, Lookup Tables and Nonlinear Blocks

Model real-world nonlinearities in Simulink: Transport Delay, 1-D and 2-D Lookup Tables, Saturation, Dead Zone, Rate Limiter, Relay with hysteresis, Backlash and Quantizer.

Linear models are clean, but real hardware is not: pipes delay fluid, actuators saturate and have dead bands, motors cannot change speed instantly, and sensors report values through calibration tables. Simulink has a collection of blocks for these effects. Adding the right nonlinearity often explains why a design that works on paper misbehaves in the lab, such as oscillating at a limit.

Simulink is not available on this site. The block parameters below follow the real product; Python stand-ins reproduce each behavior with numbers so you can experiment.

Delays

A Transport Delay outputs its input exactly T seconds late: y(t) = u(t - T). Parameters: Time delay T, Initial output (value before time T) and Initial buffer size (memory reserved for the history; if the delay needs more, Simulink grows it with a warning). Use it for pipes, conveyor belts, network latency and sensor lag. A Variable Transport Delay makes T an input signal. In discrete systems, a Unit Delay or Delay block (with a number of steps) is the equivalent. Transfer Fcn cannot represent a pure delay exactly; the Control System Toolbox offers pade approximations.

Delays reduce stability margins: a controller that works with no delay may oscillate once a long delay is added.

Python Stand-in: Transport Delay as a buffer (Python)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The input steps at 0.2 s and the output at 0.7 s: a pure shift.

Lookup tables

Many properties come from measurements, not formulas: engine torque versus speed, a thermistor's resistance versus temperature, gain versus altitude. The n-D Lookup Table (and the faster 1-D Lookup Table and 2-D Lookup Table) stores them:

Parameter Meaning
Breakpoints The input values at which the table is defined (strictly increasing), e.g. [0 1000 2000 4000]
Table data Output values at the breakpoints
Interpolation method Linear point-slope (default), Nearest, Flat (previous point), Cubic spline
Extrapolation method Linear, Clip (hold the end value)
Index search method Binary search, Evenly spaced points (fast) and others

Prefer Clip for inputs outside the measured range: linear extrapolation can invent unrealistic values. A 2-D table takes two inputs (row and column) and interpolates bilinearly: a torque map versus speed and throttle. In generated code, tables become arrays with a search and interpolation function.

Python Stand-in: 1-D lookup with clip versus linear extrapolation (Python)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Saturation, dead zone and rate limiting

Block Behavior Parameters
Saturation Clips to [lower, upper] Upper limit, Lower limit
Dead Zone Output zero while the input is inside a band; outside it the output is the input minus the band edge Start of dead zone, End of dead zone
Rate Limiter Limits how fast the output may change Rising slew rate, Falling slew rate (units per second)
Relay Two-state output with hysteresis Switch on point, Switch off point, Output when on/off
Backlash Gear play: output follows only after the play is taken up Deadband width, Initial output
Quantizer Rounds to multiples of an interval (an ADC) Quantization interval
Coulomb & Viscous Friction Offset at nonzero input plus a gain Coulomb value, Viscous gain

These blocks have zero crossings (see Zero-Crossings and Hybrid Systems), and they strongly affect control design. A saturated actuator combined with an integrating controller causes integrator wind-up: the integral keeps accumulating while the actuator cannot respond, and the system overshoots badly once it can. Anti-windup options in the PID blocks address this.

Real hardware is nonlinear

Saturation Limited output range
Dead zone No response to small input
Rate limit Cannot change too fast
Backlash Play in gears

Model them before they surprise you.

1 / 2
Python Stand-in: Dead Zone, Rate Limiter and Relay with hysteresis (Python)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The relay stays on between +1 and -1 (hysteresis), so a signal that wobbles near zero does not make it chatter.

Putting it together: a limited actuator

Python Stand-in: integrator wind-up with a saturating actuator (Python)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

For the first 3 s the reference (2) is out of reach, because the actuator can only deliver 1. Without anti-windup the integral keeps growing, and after the reference drops the controller stays saturated for a long time before it recovers. With conditional integration it recovers sooner.

Design tips

  • Always include actuator saturation and rate limits in plant models used for controller tests.
  • Prefer hysteresis to avoid chatter; prefer Clip in tables.
  • Use Lookup Tables for calibration data and keep the data in the base workspace or data dictionary, not typed into the dialog (see Block Parameters and Workspace Variables).
  • Be careful when linearizing models with nonlinear blocks; the result depends on the operating point.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does a Transport Delay with T = 2 s output at t = 5 s?

    y(t) = u(t - T), so at t = 5 it outputs u(3).
  2. 2. Which lookup table extrapolation setting avoids unrealistic values outside the data range?

    Clip holds the first or last table value outside the breakpoints.
  3. 3. What does hysteresis in a Relay block prevent?

    Different on and off thresholds stop the output from toggling on small wiggles.
  4. 4. What is integrator wind-up?

    The controller keeps integrating an error that the saturated actuator cannot remove.

Summary

  • Transport Delay shifts a signal by T seconds; delays reduce stability margins.
  • Lookup tables model measured maps; choose interpolation and prefer Clip extrapolation.
  • Saturation, Dead Zone, Rate Limiter, Relay, Backlash and Quantizer model actuator and sensor limits.
  • Include nonlinearities when testing controllers; use anti-windup with saturating actuators.

Next: Stateflow Charts: States, Transitions and Your First Chart