<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Work in Progress: Reachability Analysis for Time-triggered Hybrid Systems, The Platoon Benchmark</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Francois Bidet</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Universite Paris-Saclay</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Universite Paris-Saclay</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ecole polytechnique</string-name>
          <email>goubault@lix.polytechnique.fr</email>
          <email>putot@lix.polytechnique.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Universite Paris-Saclay</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>91128 Palaiseau</institution>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>LIX, Ecole polytechnique</institution>
          ,
          <addr-line>CNRS</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <abstract>
        <p>This article presents an extension of the method of [1] to time-triggered hybrid systems, providing over- and under-approximations of the set of reachable states. Our results on the vehicles platoon benchmark [2] compare favorably to the state of the art tools Flow* and SpaceEx, with more precise over-approximations. Moreover, we provide a measure of the approximation's accuracy using the ratio of under- to overapproximation.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Introduction and presentation of the platoon benchmark</p>
    </sec>
    <sec id="sec-2">
      <title>Dynamics</title>
      <p>X_ = AcX</p>
    </sec>
    <sec id="sec-3">
      <title>Invariant</title>
      <p>timer c1
(b) Mode qc
Leader</p>
    </sec>
    <sec id="sec-4">
      <title>Dynamics</title>
      <p>X_ = AnX
Invariant
timer c2
(c) Mode qn
timer
timer :=
timer
timer :=
c01</p>
      <p>
        Unlike in article [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], we choose here a full loss of communication in mode qn, which means that all vehicles
lose communication. It results in a slightly di erent matrix An. Also, compared to the results given in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], we
will investigate several transitions between the two modes (with and without communication) of the system.1
2
      </p>
      <sec id="sec-4-1">
        <title>Approaches and tools for reachability analysis</title>
        <p>
          We developed a prototype extending the method of [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] for reachability analysis of uncertain continuous systems,
to the case of time-triggered hybrid systems, that is hybrid systems that change modes at certain speci ed times.
        </p>
        <p>
          To compute the continuous state in one mode of the system, we use a combination of a ne arithmetic [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] and
Taylor models [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ], as in [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]:
a
p
ne arithmetic: Each uncertain quantity x 2 Rn is represented by x = x0 + P xi i with for all i = 0; : : : ; p
i=1
xi 2 Rn and i 2 [ 1; 1]. Unlike interval arithmetic, it allows to encode dependencies between di erent
quantities, e.g. let x = 1 + 2 1 2 [ 1; 3], then x x = 1 1 + (2 2) 1 = 0 in a ne arithmetic, whereas
[ 1; 3] [ 1; 3] = [ 4; 4].
        </p>
        <p>Taylor model: A Taylor model of function x of t 2 [0; T ] is a pair (p; I) where p is a polynomial in t and I is
a set called remainder (typically an interval) such that 8t 2 [0; T ]; x(t) 2 p(t) + I.</p>
        <p>
          We improved the method of [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] by adding the possibility for the analyzer to adapt the time step by the naive
algorithm: if no over-approximation is found with the interval Picard operator [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ], we reduce the time step by
half, otherwise we enlarge the time step by 10%. Because our prototype is based on Taylor models, the time is
an implicit variable in our system, and the state at a given time instant can be precisely bounded by evaluating
the Taylor model at that time. Time-triggered transitions can thus be evaluated without any loss of precision.
        </p>
        <p>
          Moreover, in addition to over-approximations, our prototype is able to compute under-approximations (as will
be demonstrated in Section 3.3) following the algorithm of [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] : we thus compute an over-approximation of the
solution [z](t; z0) for a particular initial condition ze0 2 z0 and an over-approximation of the Jacobian matrix of
e
the solution [J ](t; z0) at each time t. Similarly, the interpretation of guards for time-triggered systems does not
lose any precision.
        </p>
        <p>
          The prototype has been programmed in C++ with the library \aa ib" [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] for the a ne forms and the library
\FADBAD++" [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] for the derivations (Taylor models and Jacobian matrix).
        </p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Other reachability tools experimented here</title>
      <p>
        Flow*[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] also uses Taylor Models [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], but there are some signi cant di erences with our approach. First, the
Taylor models are not built and evaluated in a ne arithmetic like in our approach. Moreover, the physical time
of the system is not directly accessible to evaluate transitions' guards. We have to add a \timer" variable to
know how much time we passed in each mode, as shown in Figure 2a. The relation between state variables
1The models and sources of experiments are downloadable on http://www.lix.polytechnique.fr/Labo/Francois.Bidet/
Experiments2
      </p>
    </sec>
    <sec id="sec-6">
      <title>Transient, but certain acceleration</title>
      <p>
        The original benchmark [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] presents some results for a velocity step of 1 m=s. Here, we chose to add a transient
acceleration for the leader of 1 m:s 2 during 3 seconds (a velocity variation of 3 m:s 1 in total). We suppose
that vehicles lose communication during 1 second every 2 seconds (i.e. c1 = 1 and c2 = 1 in Figure 2). As shown
and system time are thus not as direct as in our approach, and transitions become non-deterministic, inducing
over-approximations.
      </p>
      <p>
        SpaceEx [
        <xref ref-type="bibr" rid="ref10 ref9">9, 10</xref>
        ] uses di erent (sub-)polyhedra to over-approximate states combined with di erent approaches
to model time dependence. Like for Flow*, dependence of the system to physical time is not directly expressed,
and accuracy is lost in time-triggered transitions. Also, contrarily to Flow* and our approach, it is restricted to
a ne systems.
in Figure 3a, Flow* produces an over-approximation which clearly diverges. SpaceEx (Figure 3b) produces an
over-approximation wich width increases with time. Our prototype (Figure 3c) on the contrary is able to prove
that the system stabilizes to a zero error e1: the width of the over-approximation is of the order of 10 9 at time
30 s.
3.2
      </p>
    </sec>
    <sec id="sec-7">
      <title>Constant, but uncertain acceleration</title>
      <p>We now set c1 = c2 = c (same duration of communication and loss of communication) and we run multiple
analyzes with various values for c, in [1; 10]. We also assume that the leader acceleration aL is uncertain but
constant in [ 9; 1]. We x initial state variables to 0 (no spacing error and no acceleration), except for aL that is
set to be the interval [ 9; 1]. As mentioned in section 1, each vehicle is described using 3 variables (the spacing
error ei from the reference distance, the derivative of this error e_i and acceleration of the vehicule ai). We only
present results for e1 as a function of time in this section, but we obtain similar results with e2 and e3.</p>
    </sec>
    <sec id="sec-8">
      <title>Settings and results with Flow*</title>
      <p>We use an adaptative time step between 10 5 and 10 1 seconds, a remainder estimation of 10 8, a cuto
threshold of 10 12 and a precision of 100 bits (for the MPFR library). These parameter values were obtained
after several tests, in order to make the simulation successful (by reducing the time step) and reduce divergence
(by adapting the cuto threshold and remainder estimation). To reduce divergence of the over-approximation,
we increased the Taylor Model order up to 16. Results of simulations however still diverge after about 14 seconds
as shown in Figure 4. Interestingly, the analysis takes more time with order 4 Taylor Models (we stopped it after
10 minutes) than order 16 for which results for same time horizon 17 were obtained in 106 seconds. We expect
the analysis is re ning a lot the time step in order to try to control the increasing approximation error.
2All experiments can be downloaded on http://www.lix.polytechnique.fr/Labo/Francois.Bidet/
-1000
-100
-150</p>
    </sec>
    <sec id="sec-9">
      <title>Settings and results with SpaceEx</title>
      <p>We used the STC Support Function with octagons, without set aggregation, an absolute owpipe tolerance of
1 and a relative of 0, a local time horizon of 5 s (for c &lt; 5), a maximum number of iterations of 30, a relative
error of 10 12 and an absolute error of 10 15. We reduced the absolute owpipe tolerance to 10 2 without
signi cative di erence. We also used uniformly distributed directions instead of octagons (with 12 directions)
but had to stop the simulation after about 10 minutes of computation (with less than 12 directions, we obtained
an error). Figure 5 shows that the analysis behaves well for c = 3, but diverges for fast switching, that is with
(a) c = 1, time horizon = 30 s (com- (b) c = 3, time horizon = 180 s
putation time = 123 seconds) (computation time = 394 seconds)
c = 1, con rming that some accuracy is lost in transitions.</p>
    </sec>
    <sec id="sec-10">
      <title>Comparing accuracy and e ciency with our prototype</title>
      <p>As shown in Figure 6, our prototype was able to compute an over-approximation of e1 without signi cant
divergence even when c is small, e.g. when c = 1. We used Taylor models of order 4, an adaptative time step
between 10 5 s and 10 1 s, and a cuto threshold of 10 5 (for each a ne form, we regroup all noise terms with
coe cient smaller than this threshold into a single noise term). The two analyzes represented in Figure 6 seem
to reach an almost periodic behavior, which is the expected behavior.</p>
      <p>For a switching time period c = 3, our prototype's over-approximation is slightly more accurate than that of
SpaceEx but both are comparable. But when the switching frequency is higher (c = 1), our prototype is clearly
more accurate than SpaceEx and Flow*. As already hinted, these tools lose precision when localizing and taking
the time-triggered transitions.</p>
      <p>
        A time comparison is di cult because we used order 4 Taylor models in our prototype and order 16 Taylor
model in Flow* (but the latter is faster than its own order 4 analysis with same other parameters). But we can
note that for c = 1, our analysis takes 36 seconds for time horizon 30, while Flow* takes 106 seconds for time
(a) c = 1, time horizon = 30 s (computation time 36 (b) c = 3, time horizon = 180 s (computation time
seconds) = 142 seconds)
horizon 15, for less accurate results. SpaceEx is running on a virtual machine with only 4Go of RAM against
8Go for our machine. In this setting, our prototype is between two and three times faster on this example.
In addition to the over-approximation, our prototype produces an under-approximation of the reachable states
(see the case of purely continuous systems in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]). An under-approximation (or inner-approximation) corresponds
to a set of states that are sure to be reached from some initial value.
      </p>
      <p>The under-approximation is useful as a complement of an over-approximation in many applications. It
can be used to obtain a measure of precision of the approximation (e.g. the ratio of the under- to the
overapproximations). It can also be used to invalidate some properties. Over-approximations ensure that if they do
not intersect a set of \bad" states, then the systems' executions are safe. In the case of the platoon benchmark,
such \bad" states are when the distances between two consecutive vehicles become negative (ei &lt; dref;i). If
the under-approximation intersects the set of bad states, then we are bound to run into an erroneous state, for
some initial state. We can see on Figure 7b that if we x dref;3 11, we will never have a collision between
vehicles 2 and 3 in the next 60 seconds following the acceleration of the leader aL 2 [ 9; 1] (over-approximation).
Conversely, if we x dref;3 = 10, we are sure that there is a value of the acceleration of the leader aL 2 [ 9; 1]
for which we will have a collision between vehicles 2 and 3 (under-approximation at time 7 seconds).</p>
      <p>
        As in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], we can also use the ratio of the under-approximation's width to the over-approximation's width as
an indicator of the accuracy of our approximations. The higher that ratio, the better the approximations are.
If the ratio is equal to 1, then we have the exact set of reachable states. For instance, in Figure 7a, the ratio
decreases from 1 (the set of initial states is known) to about 0:935 where it levels o . So the under-approximation
of e1 contains more than 93:5% of the real set of reachable states at the end of the simulation.
4
      </p>
      <sec id="sec-10-1">
        <title>Conclusion and future work</title>
        <p>Our prototype is able to compute over-approximation of reachable states of time-triggered system faster and with
more accuracy than Flow* and SpaceEx for a challenging benchmark (the platoon benchmark). This is because
we use a combination of a ne arithmetic and Taylor models, with adaptative time steps, and because we use the
time value as part of our Taylor models and not as an extra state variable, making guards for such time-triggered
hybrid systems much simpler to interpret. The under-approximation allows us to refute hypotheses and to de ne
an accuracy measure of our approximation as a ratio of under- to over-approximation's width.</p>
        <p>We do not yet handle problems due to oating-point arithmetic. They potentially result in small errors on the
over- and under-approximations' widths. This can be taken care of by carefully rounding (in the right direction)
the a ne forms coe cients, this will be included in the prototype in the near future.</p>
        <p>
          Another limitation of our prototype is the exact time of transition guards. The next step of our development
is the analysis of arbitrary switching, e.g. guards like t 2 [t1; t2] or t t1. Once done, we will be able to compare
our performance with other platoon models (arbitrary loss of communication or loss at nondeterministic times)
presented in [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ].
        </p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>S. Putot E.</given-names>
            <surname>Goubault</surname>
          </string-name>
          .
          <article-title>Forward inner-approximated reachability of non-linear continuous systems</article-title>
          .
          <source>In Proceedings of the 20th International Conference on Hybrid Systems: Computation and Control</source>
          ,
          <source>HSCC '17</source>
          , pages
          <fpage>1</fpage>
          {
          <fpage>10</fpage>
          , New York, NY, USA,
          <year>2017</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>I. B.</given-names>
            <surname>Makhlouf</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Kowalewski</surname>
          </string-name>
          .
          <article-title>Networked cooperative platoon of vehicles for testing methods and veri cation tools</article-title>
          .
          <source>In ARCH</source>
          , volume
          <volume>34</volume>
          of EPiC Series in Computing, pages
          <volume>37</volume>
          {
          <fpage>42</fpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>L.</given-names>
            <surname>H. de Figueiredo</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Stol</surname>
          </string-name>
          .
          <article-title>A ne arithmetic: Concepts and applications</article-title>
          .
          <source>Numerical Algorithms</source>
          ,
          <volume>37</volume>
          (
          <issue>1</issue>
          ):
          <volume>147</volume>
          {
          <fpage>158</fpage>
          ,
          <string-name>
            <surname>Dec</surname>
          </string-name>
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>K</given-names>
            <surname>. Makino M. Berz</surname>
          </string-name>
          .
          <article-title>Veri ed integration of odes and ows using di erential algebraic methods on high-order taylor models</article-title>
          .
          <source>Reliable Computing</source>
          ,
          <volume>4</volume>
          (
          <issue>4</issue>
          ):
          <volume>361</volume>
          {
          <fpage>369</fpage>
          ,
          <string-name>
            <surname>Nov</surname>
          </string-name>
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <article-title>[5] aa ib - an a ne arithmetic c++ library</article-title>
          . http://aaflib.sourceforge.net.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>O.</given-names>
            <surname>Stauning</surname>
          </string-name>
          and
          <string-name>
            <given-names>C.</given-names>
            <surname>Bendtsen</surname>
          </string-name>
          . Fadbad++
          <article-title>- exible automatic di erentiation using templates and operator overloading in c++</article-title>
          . http://www.fadbad.com/fadbad.html.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>X.</given-names>
            <surname>Chen</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Sankaranarayanan</surname>
          </string-name>
          .
          <article-title>Decomposed reachability analysis for nonlinear systems</article-title>
          .
          <source>In RTSS</source>
          , pages
          <volume>13</volume>
          {
          <fpage>24</fpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>X.</given-names>
            <surname>Chen</surname>
          </string-name>
          , E. Abraham, and
          <string-name>
            <given-names>S.</given-names>
            <surname>Sankaranarayanan</surname>
          </string-name>
          .
          <article-title>Taylor model owpipe construction for non-linear hybrid systems</article-title>
          .
          <source>In RTSS</source>
          , pages
          <volume>183</volume>
          {
          <fpage>192</fpage>
          ,
          <string-name>
            <surname>Dec</surname>
          </string-name>
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>C.</given-names>
            <surname>Le Guernic G. Frehse</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kateja</surname>
          </string-name>
          .
          <article-title>Flowpipe approximation and clustering in space-time</article-title>
          .
          <source>In HSCC</source>
          , pages
          <volume>203</volume>
          {
          <fpage>212</fpage>
          . ACM,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>G.</given-names>
            <surname>Frehse</surname>
          </string-name>
          <string-name>
            <given-names>A.</given-names>
            <surname>Donze</surname>
          </string-name>
          . Modular,
          <article-title>hierarchical models of control systems in spaceex</article-title>
          . In ECC, Zurich, Switzerland,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>M.</given-names>
            <surname>Altho</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Bak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Cattaruzza</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Chen</surname>
          </string-name>
          , G. Frehse,
          <string-name>
            <given-names>R.</given-names>
            <surname>Ray</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Schupp</surname>
          </string-name>
          .
          <article-title>Arch-comp17 category report: Continuous and hybrid systems with linear continuous dynamics</article-title>
          .
          <source>In ARCH</source>
          , volume
          <volume>48</volume>
          of EPiC Series in Computing, pages
          <volume>143</volume>
          {
          <fpage>159</fpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>