diff --git a/chapters/synchronous.tex b/chapters/synchronous.tex index ebcfc6f9a..ad8848bec 100644 --- a/chapters/synchronous.tex +++ b/chapters/synchronous.tex @@ -522,6 +522,10 @@ \section{Clock Constructors}\label{clock-constructors} \section{Clocked State Variables}\label{clocked-state-variables} +\begin{definition}[Clocked state variable]\label{def:clocked-state-variable}\index{clocked!state variable}\index{state variable!clocked} +A component expression which is not a parameter, and to which \lstinline!previous! has been applied. +\end{definition} + The previous value of a clocked variable can be accessed with the \lstinline!previous! operator, listed below. \begin{center} \begin{tabular}{l|l l} @@ -529,26 +533,31 @@ \section{Clocked State Variables}\label{clocked-state-variables} \tablehead{Expression} & \tablehead{Description} & \tablehead{Details}\\ \hline \hline -{\lstinline!previous($u$)!} & Previous value of clocked state variable & \Cref{modelica:previous} \\ +{\lstinline!previous($u$)!} & Previous value of clocked variable & \Cref{modelica:previous} \\ \hline \end{tabular} \end{center} -A variable to which \lstinline!previous! has been applied is called a \firstuse[clocked!state variable]{clocked state variable}\index{state variable!clocked}. - \begin{operatordefinition}[previous] \begin{synopsis}\begin{lstlisting} previous($u$) \end{lstlisting}\end{synopsis} \begin{semantics} -The input argument $u$ is a component expression (\cref{def:component-expression}) or a parameter expression. -The return argument has the same type as the input argument. +The input argument $u$ is a component expression (\cref{def:component-expression}). +If $u$ is a parameter, its value is returned. + +Otherwise: Input and return arguments are on the same clock. At the first tick of the clock of $u$ or after a reset transition (see \cref{reset-handling}), the start value of $u$ is returned, see \cref{initialization-of-clocked-partitions}. At subsequent activations of the clock of $u$, the value of $u$ from the previous clock activation is returned. \end{semantics} \end{operatordefinition} +\begin{nonnormative} +At a clock tick only the (previous) values of the clocked state variables are needed to compute the new values of all clocked variables on that clock. +This roughly corresponds to state variables in continuous time. +\end{nonnormative} + \section{Partitioning Operators}\label{partitioning-operators} A set of \emph{clock conversion operators} together act as boundaries