# Transport Delay (`transportDelay`)

> Delays a signal by a fixed time.

![transportDelay](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/img/transportDelay.svg)

[Component reference](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/) · [繁體中文](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/control/transportDelay/)

**Group:** Control · **Kind:** `{"block":"transportDelay","kind":"control"}`

## When to use it

Use it for a dead time of the plant: a sensor or communication delay, a computation delay, or the transport lag of a fluid. Use Unit Delay or zDelay for a delay of whole samples.

## Pins

| Pin | Domain | Meaning |
|---|---|---|
| `in` | signal | Signal input |
| `out` | signal | The input td seconds ago |

## Common parameters

- `td`: Delay from input to output (Default: required)

## Parameters

| Key | Unit | Default | Typical range | Description |
|---|---|---|---|---|
| `td` | s | required |  | Delay from input to output |

_Parameter descriptions are in English in both languages._

## Model

out(t) = in(t − td), with straight lines between the solver steps it remembers. Until td has passed the output holds the input's value at t = 0. With td = 0 the output is the input. The block keeps the history it needs, at most about one million points.

## Common mistakes

- A long delay against a small step needs a long history: a delay of more than about a million steps stops the run with an error naming the block. Raise maxStep or shorten the delay.
- The block has direct feedthrough, so a loop through it alone is an algebraic loop even with td above 0; put an integrator or a sample-and-hold in the loop. Code generation leaves it out; at a sample time a delay of n samples is n zDelay blocks.

Problems rules: `compile.error`, `solver.control`

## Datasheet and sources

There is no datasheet. A sensor's delay is often given as a propagation delay or a group delay in its data sheet; use that as td.

## Example

Open the example with the command `file.openExample` and the name `demo:transportDelay`.

---
Generated by `cargo xtask reference` from the usage texts and parameter specs. Do not edit by hand.
