Delay Block
Introduces a fixed time delay to the input signal (transport lag)
Open Delay in BlockWerk →Description
The Delay block introduces a fixed time delay (transport lag) to the input signal. This models communication delays, sensor latency, processing time, and other real-world system dynamics. The delay is implemented using a circular buffer that stores historical input values.
Mathematical Model
y(t) = u(t - τ)
where τ is the constant delay time
Parameters
- delayTime: Duration of delay in seconds
- Default: 0.1
- Internally converted to buffer size: ceil(delayTime / sampleTime) + 1
- initialOutput: Value output during startup (before delayed values are available)
- Default: 0
Examples
A pulse signal with 0.2 second delay appears shifted 0.2 seconds later.
Edge Cases
- Zero delay time: Always enforces a minimum of 1 sample delay. There is no zero-delay passthrough mode — this prevents algebraic loops and discontinuities. With delayTime=0 and sampleTime=0.01, the effective delay is 0.01 seconds (1 sample).
- Sub-sample delay: If delayTime < sampleTime, the delay rounds up to 1 sample.
- Buffer initialization: All buffer slots start at
initialOutput. During the firstdelay_samplessteps, the output will beinitialOutput.
Remarks
- Buffer size automatically calculated: ceil(delayTime / sampleTime) + 1
- Memory usage scales linearly with delay duration
- Steady-state magnitude unchanged, only phase-shifted
- Typical applications: networked control, sensor lag, transport delays
- Uses write-then-read circular buffer order for consistent delay behavior
See Also
- Derivative: Rate computation (phase-sensitive)
- Sum: Signal combination
- Saturation: Output limiting