Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions chapters/operatorsandexpressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,11 @@ \subsection{Derivative and Special Purpose Operators with Function Syntax}\label
If $\mathit{delayMax}$ is not supplied in the argument list, $\mathit{delayTime}$ needs to be a parameter expression.
The operator is not allowed inside \lstinline!function! classes.
For non-scalar arguments the function is vectorized according to \cref{vectorized-calls-of-functions}.
For further details, see \cref{delay}.

Using a $\mathit{delayTime}$ too close to zero may compromise correctness due to the need for delay buffer extrapolation.
It is a quality of implementation to make the tradeoff between integration step size and \lstinline!delay! operator correctness.

For implementation notes, see \cref{delay}.
\end{semantics}
\end{operatordefinition}

Expand Down Expand Up @@ -935,17 +939,15 @@ \subsection{Derivative and Special Purpose Operators with Function Syntax}\label

\subsubsection{delay}\label{delay}

This section provides notes for \lstinline!delay! implementation in tools.

\begin{nonnormative}
\lstinline!delay! allows a numerical sound implementation by interpolating in the (internal) integrator polynomials, as well as a more simple realization by interpolating linearly in a buffer containing past values of expression $\mathit{expr}$.
Without further information, the complete time history of the delayed signals needs to be stored, because the delay time may change during simulation.
To avoid excessive storage requirements and to enhance efficiency, the maximum allowed delay time has to be given via $\mathit{delayMax}$.
Without further information, the complete time history of the delayed signals needs to be stored, because the $\mathit{delayTime}$ may change during simulation.
To avoid excessive storage requirements and to enhance efficiency, the maximum allowed $\mathit{delayTime}$ has to be given via $\mathit{delayMax}$.
This gives an upper bound on the values of the delayed signals which have to be stored.
For real-time simulation where fixed step size integrators are used, this information is sufficient to allocate the necessary storage for the internal buffer before the simulation starts.
For variable step size integrators, the buffer size is dynamic during integration.

In principle, \lstinline!delay! could break algebraic loops.
For simplicity, this is not supported because the minimum delay time has to be given as additional argument to be fixed at compile time.
Furthermore, the maximum step size of the integrator is limited by this minimum delay time in order to avoid extrapolation in the delay buffer.
\end{nonnormative}

\subsubsection{spatialDistribution}\label{spatialdistribution}
Expand Down