From b4729b3abce30b96f2fd67f7c09734e6c0446541 Mon Sep 17 00:00:00 2001 From: Hans Olsson Date: Tue, 8 Feb 2022 08:50:30 +0100 Subject: [PATCH] Add special text for sample in clocked systems. (#3099) * Add special text for sample in clocked systems. Revert "RemoveSampleNow" This reverts commit 32770c0893ab7c7d26b2d3a977a8140b698ab0c5. Co-authored-by: Henrik Tidefelt --- chapters/synchronous.tex | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/chapters/synchronous.tex b/chapters/synchronous.tex index 8b8503906..9abc5baf8 100644 --- a/chapters/synchronous.tex +++ b/chapters/synchronous.tex @@ -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.