Please note that the recommended version of Scilab is 6.1.1. This page might be outdated.

See the recommended documentation of this function

# VARIABLE_DELAY

Variable delay

### Block Screenshot

### Contents

### Palette

### Description

The Variable Transport Delay block can be used to simulate a variable time delay between an action and its effect. The block might be used, for example, to model a system with a pipe where the speed of a motor pumping fluid in the pipe is variable.

The block accepts two inputs and one output: the first input is the signal u(t) that passes through the block (data input); the second input is the variable time delay τ(t).

At the current time step t, the block outputs the delayed data input u(θ) where θ is the current simulation time t minus the time delay parameter τ.

The equation of the output signal is:

### Dialog box

**Max delay**It defines the largest value the time delay input can have. The value cannot be negative.

Properties : Type 'vec' of size 1.

**Initial input**The output generated by the block until the simulation time first exceeds the time delay input. If it is not set to the y(τ) value, a linear approximation will be calculated between the initial input at t0 and the y(τ) value.

Properties : Type 'vec' of size 1.

**Buffer size**The number of points the block can store.

Properties : Type 'vec' of size 1.

### Default properties

**always active:**yes**direct-feedthrough:**no**zero-crossing:**no**mode:**no**regular inputs:****- port 1 : size [1,1] / type 1****- port 2 : size [1,1] / type 1****regular outputs:****- port 1 : size [1,1] / type 1****number/sizes of activation inputs:**0**number/sizes of activation outputs:**0**continuous-time state:**no**discrete-time state:**no**object discrete-time state:**no**name of computational function:***variable_delay*

### Example

In this example, the max time delay in the Block Parameters dialog box is set to 4. The input signal is a sine wave with amplitude 1 and frequency 0.2 Hz.

The constant block is set to 2 to introduce a delay of 2 second. The input and output waveforms of the VARIABLE_DELAY block are shown below:

### Interfacing function

SCI/modules/scicos_blocks/macros/Linear/VARIABLE_DELAY.sci

### Computational function

SCI/modules/scicos_blocks/src/c/variable_delay.c (Type 4)

## Comments

Add a comment:Please login to comment this page.