User`s guide
Variable Integer Delay
5-497
The Variable Integer Delay block stores the D+1 most recent samples received
at the
In port for each channel. At each sample time the block outputs the
stored sample(s) indexed by the input to the
Delay port.
For example, if the input to the
In port, u, is a scalar signal, the block stores a
vector,
U, of the D+1 most recent signal samples. If the current input sample
is
U(1), the previous input sample is U(2), and so on, then the block’s output is
y = U(v+1); % Equivalent MATLAB code
where v is the input to the Delay port. Note that a delay value of 0 (v=0) causes
the block to pass through the sample at the
In port in the same simulation step
that it is received. The block’s memory is initialized to the
Initial conditions
value at the start of the simulation (see below).
The figure below shows the block output for a scalar ramp sequence at the
In
port, a
Maximum delay of 5, an Initial conditions of 0, and a variety of
different delays at the
Delay port.
Note that the current input at each time-step is immediately stored in memory
as
U(1). This allows the current input to be available at the output for a delay
of 0 (
v=0).
The
Initial conditions parameter specifies the values in the block’s memory at
the start of the simulation. Unlike the Integer Delay block, the Variable
0
1
2
3
4
5
6
7
8
9
10
0
0
2
1
3
3
4
4
8
5
5
Simulation time
In Delay
Output
3
1
0
2
1
2
2.3
3
–1
4
10
[0 0 0 0 0 0]
[1 0 0 0 0 0]
[2 1 0 0 0 0]
[3 2 1 0 0 0]
[4 3 2 1 0 0]
[5 4 3 2 1 0]
[6 5 4 3 2 1]
[7 6 5 4 3 2]
[8 7 6 5 4 3]
[9 8 7 6 5 4]
[10 9 8 7 6 5]
...
...
Memory (U)
...
...
i.c.
rounded to 2
clipped to 0
clipped to 5