Discrete and Continous Time

There are many different aspects of time possible. A straightforward distinction uses the concepts discrete or continuous.

More generally we could speak of discrete time (DT) as a structure


$\displaystyle DT$ $\displaystyle =$ $\displaystyle \langle T,< \rangle$ (5.1)
$\displaystyle T$ $\displaystyle \subseteq$ $\displaystyle Nat$ (5.2)
$\displaystyle Nat$ $\displaystyle :=$ $\displaystyle Natural Numbers$ (5.3)

If we map events $ e \in E$ into the set of time points $ T$ we get timed events:


$\displaystyle timestamp$ $\displaystyle :$ $\displaystyle E \longmapsto T$ (5.4)
$\displaystyle E$ $\displaystyle :=$ $\displaystyle Events$ (5.5)
$\displaystyle timestamp(e)$ $\displaystyle =$ $\displaystyle t$ (5.6)

A pair of an event with a time point $ (e, t) \in E \times T$ states that the event $ e$ is occuring at the point of time $ t$. A set of time points $ TDATA$ with several events $ e$ at the same point of time $ t$ could be given as :


$\displaystyle TDATA$ $\displaystyle \subseteq$ $\displaystyle 2^{E \times T}$ (5.7)

Mathematically it is straightforward to define the concept of continous time with the aid of the real numbers:


$\displaystyle CT$ $\displaystyle =$ $\displaystyle \langle T,< \rangle$ (5.8)
$\displaystyle T$ $\displaystyle \subseteq$ $\displaystyle Real$ (5.9)
$\displaystyle Real$ $\displaystyle :=$ $\displaystyle Real Numbers$ (5.10)

There are infinite many real numbers between two real numbers $ r, r'$ with $ r < r'$.

To measure timed data one needs in the real world clocks $ C$, real clocks. Real clocks have always a minimal distance $ d$ between two adjacent ticks representing time events with $ d > 0$. This leads to the assumption that a time structure with a limited precision could be a good compromise, using the rational numbers instead of the real numbers.


$\displaystyle LPT$ $\displaystyle =$ $\displaystyle \langle T,< \rangle$ (5.11)
$\displaystyle T$ $\displaystyle \subseteq$ $\displaystyle Rat$ (5.12)
$\displaystyle Rat$ $\displaystyle :=$ $\displaystyle Rational Numbers$ (5.13)

In the real world one has agreed to use a correlation of the astronomical based time measurement and the time measurement based on atomic clocks. The correlated time measurement is called Universal Time Coordinated (UTC) and has been set equal to the Temps Atomique Internationale (TAI) for 1.January 1958. Because the TAI is more stable than the astronomic time the UTC has to be adjusted repeatedly to the atomic time using the formula:


$\displaystyle UTC$ $\displaystyle =$ $\displaystyle TAI * n$ (5.14)
$\displaystyle \vert UTC-UT1\vert$ $\displaystyle <$ $\displaystyle 0.9$ (5.15)

(For more details see Kopetz (1997) [157] and
'http://www.fbmnd.fh-frankfurt.de/ doeben/I-RT04/VL/VL2/i-rt04-vl-vl2.html
#Zeitskalent' or
'http://www.uffmm.org/science-technology/single/themes/computer-science/
personal-sites/doeben-henisch/RTS/rts/node81.html' ). Following Kopetz (1997) we can define some concepts related to clocks.

One can define the point of time $ t$ measured by a clock $ k$ with regard to an event $ e$ as


$\displaystyle timestamp_{k}$ $\displaystyle :$ $\displaystyle E \longmapsto T_{k}$ (5.16)
$\displaystyle k$ $\displaystyle \in$ $\displaystyle C$ (5.17)
$\displaystyle t_{k}$ $\displaystyle =$ $\displaystyle k(e)$ (5.18)

The granularity of a clock $ k$ with regard to clock $ z$ with the highest possible precision according to the international time standard at a time point $ i \in T_{k}$ can be defined as


$\displaystyle gran_{z}(k,i)$ $\displaystyle :=$ $\displaystyle n_{z}^{k_{i},k_{i+1}}$ (5.19)

counting the number $ n_{z}$ of ticks of the clock $ z$ between to ticks of the clock $ k$ between k-time $ i$ and k-time $ i+1$.

One can furthermore define the drift of a clock $ k$ relative to the reference clock $ z$ having two consecutive granularity measurements of the clock $ k$ at $ i_{k}, (i+1)_{k}$


$\displaystyle drift_{i}^{k}$ $\displaystyle =$ $\displaystyle \frac{gran_{z}(k,i+1)}{gran_{z}(k,i)}$ (5.20)

If there is no drift, then $ gran_{z}(k,i+1) = gran_{z}(k,i)$ and the drift is '1', otherwise it is different from 1. The drift rate $ \varrho$ can then be defined as


$\displaystyle \varrho_{i}^{k}$ $\displaystyle =$ $\displaystyle \vert\frac{gran_{z}(k,i+1)}{gran_{z}(k,i)}-1\vert$ (5.21)

Because real clocks have usually a drift rate $ \varrho$ greater than '0' one has to guarantee a maximal drift rate $ \varrho_{max}^{k}$ for concrete clocks. Another helpful concept is the offset between two clocks k, k' at time point i:


$\displaystyle offset_{i}^{k,k'}$ $\displaystyle =$ $\displaystyle \vert gran_{z}(k,i) - gran_{z}(k',i)\vert$ (5.22)

Because the drift rate $ \varrho$ is greater than '0' the different clocks of an ensemble will drift apart during run time. A scheduling for resynchronization must be established.

Gerd Doeben-Henisch 2010-03-03