pathsim.blocks.delay module

class pathsim.blocks.delay.Delay(tau=0.001)[source]

Bases: Block

Delays the input signal by a time constant ‘tau’ in seconds using an adaptive rolling buffer.

Mathematically this block creates a time delay of the input signal like this:

\[\begin{split}y(t) = \begin{cases} x(t - \tau) & , t \geq \tau \\ 0 & , t < \tau \end{cases}\end{split}\]

Example

The block is initialized like this:

#5 time units delay
D = Delay(tau=5)
Parameters:

tau (float) – delay time constant

_buffer

internal interpolatable adaptive rolling buffer

Type:

AdaptiveBuffer

reset()[source]

Reset the blocks inputs and outputs and also its internal solver, if the block has a solver instance.

update(t)[source]

Evaluation of the buffer at different times.

Parameters:

t (float) – evaluation time

Returns:

error – deviation to previous iteration for convergence control

Return type:

float

sample(t)[source]

Sample input values and time of sampling and add them to the buffer.

Parameters:

t (float) – evaluation time for sampling