Skip to content

Commit

Permalink
Add special text for sample in clocked systems. (modelica#3099)
Browse files Browse the repository at this point in the history
* Add special text for sample in clocked systems.
Revert "RemoveSampleNow"

This reverts commit 32770c0.

Co-authored-by: Henrik Tidefelt <henrikt@wolfram.com>
  • Loading branch information
HansOlsson and henrikt-ma committed Feb 8, 2022
1 parent 30f04e6 commit b4729b3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions chapters/synchronous.tex
Expand Up @@ -1092,6 +1092,14 @@ \subsection{Clocked Discrete-Time and Discretized Continuous-Time}\label{clocked
Such a partition has to be solved with a \emph{solver method} of \cref{solver-methods}.
When \lstinline!previous(x)! is used on a continuous-time state variable \lstinline!x!, then \lstinline!previous(x)! uses the start value of \lstinline!x! as value for the first clock tick.

The use of the operator \lstinline!sample! from \cref{event-related-operators-with-function-syntax} in a clocked partition is problematic.
A diagnostic is recommended, especially if the operator is intended to generate events faster than the clock ticks, and otherwise the sampling should ideally be adjusted to the clock ticks.

\begin{nonnormative}
The reason for not disallowing \lstinline!sample! in a clocked partition is to make it possible to include \emph{any} continuous-time Modelica model in a sampled data control system.
Note that even if the sampling is slower than the clock ticks (or even the same rate) it still introduces the problem of possibly uneven sampling.
\end{nonnormative}

In a clocked discrete-time partition all event generating mechanisms do no longer apply.
Especially neither relations, nor any of the built-in operators of \cref{event-triggering-mathematical-functions} (event triggering mathematical functions) will trigger an event.

Expand Down

0 comments on commit b4729b3

Please sign in to comment.