Non-Standard Analysis for Regularization of Geometric-Zeno Behaviour in Hybrid Systems

: Geometric-Zeno behaviour is a highly challenging problem in the analysis (including simulation) of hybrid systems. Geometric-Zeno can be deﬁned as an inﬁnite number of discrete mode switches in a ﬁnite time interval. Typically, for hybrid models exhibiting geometric-Zeno, the numerical simulation either halts or produces false results, because an inﬁnite number of discrete events occur in a given simulation time-step. In this paper, we provide formal methods for regularization of geometric-Zeno behaviour by using a non-standard analysis. In particular, we provide formal conditions for the existence of geometric-Zeno in hybrid systems, and we propose methods to allow geometric-Zeno executions to be continued beyond geometric-Zeno limit points. The concepts are illustrated with a case study throughout the paper.


Introduction
Hybrid Systems are complex dynamical systems that combine both physical (plant, process, network) and control (decision making algorithm, computation) components. Hybrid systems exist in a wide variety of technological applications in which continuous physical behaviour is combined with discrete control actions [1][2][3][4][5][6]. The correct functioning of such systems is often safety-critical, thus their formal modelling and analysis is of utmost importance. Formally, hybrid automata modelling framework, with mixed discrete-continuous behaviour can be used to model the interactions between the logic decision making actions (i.e., discrete dynamics) and the continuous physical processes (i.e., continuous dynamics) of hybrid systems [2,4,7]. The behaviour of hybrid automata is characterized by a finite set of discrete states (or locations). In each discrete state, the evolution of the system's continuous state over time is specified by differential equations (or inclusions), and the discrete state changes are modelled by instantaneous discrete transitions [2,[8][9][10][11]. The reachability problem poses the question, whether a state from a given unsafe set is reachable from a given set of initial states. Since the reachability problem for hybrid systems is undecidable [10,12,13], different techniques were proposed to observe and analyse the behaviour of hybrid systems approximatively. One of these techniques, which is frequently used both in academia and industry, is simulation. Usually, simulation techniques for hybrid systems use some numerical methods to compute the dynamical evolution of the systems from a given initial state over time. Additionally, the discrete switches between the different control modes need to be detected and simulated [2,3,14]. However, geometric-Zeno behaviour is a highly challenging problem in the analysis (including simulation) of hybrid systems. Geometric-Zeno behaviour can be defined as an infinite number of discrete mode switches in a finite time interval [2,15,16]. Geometric-Zeno results from modelling abstraction (or over-approximation). The presence of geometric-Zeno behaviour indicates that the abstraction mechanism imperfectly describes the complex interaction between the continuous and discrete dynamics of the modelled hybrid system [2]. All kinds of iterative forward techniques for reachability computation used in almost all existing hybrid modelling and simulation tools have troubles to deal with geometric-Zeno behaviour, because the computations at the time instant of geometric-Zeno limit point either halt or produce faulty results.
Geometric-Zeno behaviour has been investigated in different ways. In [17][18][19], authors proposed methods to obtain non-Zeno solutions by perturbing geometric-Zeno hybrid models. However, their method results in stiff models for which the simulation performance might collapse. Other authors proposed sufficient conditions for the existence geometric-Zeno in particular classes of hybrid systems, such as linear complementarity systems [20][21][22], Lagrangian hybrid systems [15,16,23,24], quadrant hybrid systems [25,26]. However, the majority of the proposed methods are conservative and apply to particular classes of hybrid systems. Thus, there is a need to provide a computational framework that can be used as a general framework for regularization of geometric-Zeno behaviour in all classes of hybrid systems.
In this paper, we provide formal methods for regularization of geometric-Zeno behaviour by using a non-standard analysis of hybrid automaton execution. Non-standard analysis allows the continuous dynamics-represented by differential equations-to be modelled by recurrence equations, where the system's continuous state changes within infinitesimal time steps, and therefore, the evolution of hybrid systems can be described only on discrete fashion, while at the same time the completeness in the state space is guaranteed. Through the non-standard analysis, we provide formal conditions for detecting geometric-Zeno, and we propose methods to allow geometric-Zeno execution to be continued beyond the geometric-Zeno limit point. This paper extends several results presented in [27]. The first version investigated sufficient conditions for geometric-Zeno based on the convergence of hybrid solution trajectory to a geometric-Zeno limit point as a non-standard Cauchy sequence. This paper investigates sufficient conditions for geometric-Zeno behaviour based on the convergence of hybrid automaton execution to a geometric-Zeno limit point through a contractive geometric simulation relation between hybrid states.
The paper is organized as follows: Section 2 introduces hybrid automata as modelling formalism for hybrid systems, and then provides the non-standard execution semantics for hybrid automata. Section 3 presents a realistic example of a hybrid model exhibiting geometric-Zeno behaviour and discusses the simulation of geometric-Zeno behaviour. Section 4 provides a non-standard analysis of geometric-Zeno, as well as non-standard formal conditions for the existence of geometric-Zeno and methods for geometric-Zeno elimination. Finally, Sections 5 and 6 present simulation results and conclusions, respectively.

Non-Standard Hybrid Automata
Hybrid automata is a widely used modelling formalism for hybrid systems. A hybrid automaton is an extension of finite automaton, and consists of discrete states, discrete transitions, continuous invariants, guard conditions, reset maps, and R n -dimensional continuous functions [28]. A non-standard hybrid automaton is a hybrid automaton whose execution is defined using the theory of non-standard real numbers * R. That is, the non-standard execution of hybrid automata is based on using the non-standard time domain T ∂ (a subset of * R) as an execution time domain.
The field of non-standard real numbers * R has been used by several authors to define operational semantics of continuous and hybrid systems [28,29]. Definition 1. (Infinitesimal and Closeness) An infinitesimal ∂ ∈ * R is a non-zero number whose absolute value is smaller than any positive real number [27,28,30]. That is, for all a = 0 ∈ R there exists an infinitesimal number ∂ ∈ * R such that |∂| < |a|. A Closeness ≈ is a binary relation which implies that a ≈ b if and only if |a − b| is infinitesimal, where a, b ∈ * R are both non-standard numbers. [27] defined as a finite or infinite sequence of infinitesimal iterations of states (z, q, * x) ∈ B × Q × * R n such that the following conditions are satisfied:

Definition 3. (Non-Standard Hybrid Automata) A non-standard hybrid automaton * H is a tuple
where q(t) as the mode selector function that returns a discrete state in Q for any time instant t, that is, q(t) = q i ∈ Q for all t.

Geometric-Zeno: Case Study
In the following, we give an example of a hybrid system whose model exhibits geometric-Zeno behaviour, and we discuss the challenges of simulating its model.

Example (Collision of Three Masses)
Consider a mechanical system consisting of three point masses, m 1 , m 2 , and m 3 , on a table, as shown in Figure 1. We assume that the friction force between the table and the three masses be neglected. Let x i , v ix , and a ix denote the displacement, velocity, and acceleration of mass m i in the x direction, respectively, and y i , v iy , and a iy denote the displacement, velocity, and acceleration of mass m i in the y direction, respectively, with i = 1, 2, 3. It is assumed that both masses m 2 and m 3 are at rest, while mass m 1 is moving to the right with initial velocity v 1x (0) > 0 and collides with mass m 2 , which moves towards mass m 3 and collides with it. As a result, mass m 3 falls and starts bouncing on the ground, and the two masses m 1 , m 2 may either fall and start bouncing or eventually stop on the table. When a collision occurs between masses m 1 and m 2 , the velocities after collision can be derived from Newton's rule and the law of conversion of momentum as where v + i and v − i (i = 1, 2) are the velocities of mass i just after and just before the collision, respectively, and η is a restitution coefficient. The same applies when a collision occurs between masses m 2 and m 3 .   Table 1 gives the guard conditions together with the resets for the transitions e i , i = 1, 2, · · · , 8. In this example, three discrete events occur simultaneously if mass m 3 is positioned at the extreme edge of the table, that is, both masses m 2 and m 3 fall and start bouncing simultaneously, which results in a non-deterministic behaviour. In addition, at least mass m 3 will fall from the table and starts bouncing; the restitution coefficient λ ∈ (0, 1) models the loss of energy that happens when inelastic collisions with the ground occur during bouncing. Consider the case when mass m 3 bounces on the ground (see Figure 3). One can easily calculate the time instants of discrete events {τ j } i∈N by The series {τ j } has a finite limit τ ∞ = τ 0 + 2v 3y (τ 0 ) g(1−λ) < ∞. The same applies when masses m 1 and m 2 bounce. When either of the three masses bounces, it becomes at rest with zero position and velocity in finite time, but after going through an infinite number of bounces. Table 1. Guard conditions and resets for the transitions in Figure 2.

Transition Guard Condition Reset
Bouncing of mass m 3 ; the event times τ − j and τ + j refer to the times immediately before and after the collision j, respectively.
The numerical simulation of the bouncing behaviour is highly challenging. In fact, the simulation either halts or produces faulty results. Figure 4a shows the simulation in Simulink [31] of the bouncing behaviour with λ = 0.8. The simulation halts and terminates with a simulation error; see Figure 4b. This is because, near the geometric-Zeno limit point (0, 0), the simulation exceeds the default number of consecutive zero crossings allowed in Simulink. With λ = 0.5, the simulation in Simulink generates faulty results, where the simulated mass falls under the surface on which it is bouncing and then goes into a free-fall in the space below; see Figure 4c. This is because some discrete events are missed during simulation due to the accumulation of infinite number of discrete transitions. When simulating the bouncing behaviour in Openmodelica [32] with λ = 0.8, the simulation produces faulty results due to numerical errors encountered by the Modelica discrete events detector; see

Non-Standard Regularization of Geometric-Zeno
In the following, we use non-standard analysis to develop sufficient conditions for the existence of geometric-Zeno behaviour, and we propose methods to allow hybrid automaton execution to be carried beyond the geometric-Zeno limit point, thus avoiding simulation halt or faulty results when simulating models exhibiting geometric-Zeno.
The idea we propose is based on using non-standard simulation relation analysis through cyclic executions of hybrid automata. We show that the execution of a given hybrid automaton converges to a geometric-Zeno limit point if all the cycles detected during the execution converge according to a non-standard geometric contractive simulation relation.

Definition 5.
(Finite Cyclic Path) Given a directed graph (Q, E), E ⊆ Q × Q. A Finite cyclic path is an alternating sequence of discrete states q i ∈ Q and edges e i ∈ E of the form q 0 −→ q m such that e i = (q i−1 , q i ) for all i. It is called a finite cyclic path if the starting state is the same as the ending state (i.e., q 0 = q m ). Furthermore, a portion of a finite path can be a finite cyclic path such as q 1 Cycles are compared by using a non-standard simulation relationship. In order to derive sufficient conditions for the hybrid automaton execution to be convergent to a geometric-Zeno limit point, we firstly study the non-standard simulation relation between hybrid states, and then we introduce conditions for such simulation relation to be geometric, and geometric contractive. Definition 6. (Non-Standard Simulation Relation) Given a hybrid automaton * H, and two non-standard hybrid states of * H: * r = (p, * x) and * s = (q, * y), where p, q ∈ Q, and * x, * y ∈ * R n . We call the relation ρ ⊆ (Q × * R n ) × (Q × * R n ) a non-standard simulation relation between * r and * s, denoted by * r ρ * s, if and only if ( * r, * s) ∈ ρ and for every successor state * r of * r after a non-standard micro-step ∂ ∈ * R there exists a successor state * s of * s after a non-standard micro-step ε ∈ * R such that ( * r , * s ) ∈ ρ.
The hybrid system's continuous state is usually described by a finite set of continuous state variables. So in Definition 6, the continuous states * x and * y are given by * x = [ * x 1 , * x 2 , · · · , * x l ] T and * y = [ * y 1 , * y 2 , · · · , * y l ] T .

Definition 7.
(Non-Standard Geometric Simulation Relation) Given two non-standard hybrid states * r = (p, * x) and * s = (q, * y) and a non-standard simulation relation ρ ⊆ (Q × * R n ) × (Q × * R n ) between them, as defined in Definition 6. The non-standard simulation relation ρ is geometric if and only if there exists c = [c 1 , c 2 , · · · , c l ] T ∈ R n , d ∈ R, and a diagonal matrix of elements z i ∈ R such that the following property is satisfied: with ε ∈ * R and ∂ ∈ * R as defined in Definition 6.

Definition 8. (Non-Standard Contractive Simulation Relation)
Given two non-standard hybrid states * r = (p, * x) and * s = (q, * y) and a non-standard geometric simulation relation ρ ⊆ (Q × * R n ) × (Q × * R n ) between them, as defined in Definition 7. The non-standard geometric simulation relation ρ is contractive if and only if d ∈ (0, 1) and |z i | < 1 for all z i .
If for every non-standard hybrid state * r = (p, * x)-during the execution of the hybrid automaton * H-there exists a non-standard hybrid state * s = (q, * y) such that * r ρ * s with ρ being geometric contractive, then the execution of the hybrid automaton converges asymptotically to a geometric-Zeno limit point.

Lemma 1.
(Sufficient Condition for Geometric-Zeno behaviour) An execution of a hybrid automaton * H is geometric-Zeno if the following conditions are satisfied: 1. The directed graph (Q, E) of * H contains a finite cyclic path. 2. For every non-standard hybrid state * r = (p, * x) there exists a non-standard hybrid state * s = (q, * y) such that * r ρ * s with ρ being a geometric contractive simulation relation.
A continuation beyond the geometric-Zeno limit point is done by triggering an urgent transition immediately when the continuous state vectors * x = [ * x 1 , * x 2 , · · · , * x l ] T and * y = [ * y 1 , * y 2 , · · · , * y l ] T become infinitesimally close to each other, that is, when | * x i − * y i | = ∂ for all * x i ∈ * x and * y i ∈ * y, i = 1, 2, · · · l. In the interval where the transition from pre-Zeno to post-Zeno is taken, the hybrid automaton switches its dynamics to 0, which allows sliding on the switching surface on which geometric-Zeno occurs, and thus allows the hybrid model solution to be continued beyond the geometric-Zeno limit point.

Example (Collision of Three Masses) Revisited
Consider the scenario when a mass m i , i = 1, 2, 3, bounces on the ground. Figure 5 shows the bouncing hybrid trajectory on the (y, v)-plane, where all bouncing cycles simulate each other according to a non-standard geometric contractive simulation relation. Denote * X to the non-standard state space of the bouncing hybrid trajectory. For each state ( * y i , * v iy ) ∈ * X in cycle k ∈ N there exists a state ( * ŷ i , * v iy ) ∈ * X in cycle m ∈ N, with m > k, such that * ŷ i = * y i λ 2(m−k) , * v iy = * v iy λ m−k , * ŷ i = * y i λ 2(m−k) , * v iy = * v iy λ m−k , and ε = ∂λ m−k , where ( * y i , * v iy ) is the successor state of ( * y i , * v iy ) after a micro-step ∂ ∈ * R and ( * ŷ i , * v iy ) is the successor state of ( * ŷ i , * v iy ) after a micro-step ε ∈ * R. That is, the following property is satisfied for c = [c 1 , c 2 ] T ∈ R 2 : In our example, the non-standard geometric simulation relation is contractive because λ ∈ (0, 1).

Simulation Results
The methods proposed in this paper were validated through two prototype implementations [37,38] developed in both Matlab and Simulink simulation tools. The first revision of these two prototype implementations was presented in [27]. This paper presents the second revision which implements the methods presented in Section 4. Figures 6 and 7 show the Zeno-free simulation of the bouncing behaviour in the case study presented in Section 3, with parameters: λ = 0.5, g = 9.81, and initial conditions: y i (0) = h = 1, v iy (0) = 0. The simulation time is set to 2[s]. During the simulation, the velocity v iy of the bouncing mass m i decreases due to the energy loss through impact. As a result, more and more collisions are triggered and the time interval between two consecutive collisions keeps shrinking. The first bouncing cycle was detected at time t = 0.9031. A geometric contractive simulation relation with coefficients z 1 = λ 2 = (0.5) 2 (for the state variable y i ) and z 2 = λ = 0.5 (for the state variable v iy ) was observed for every pair of two consecutive cycles. The convergence of solution to a geometric-Zeno point took place at time 1.3549[s]. The dense points near the time 1.3549 [s] indicates that more and more computation steps are taken near the geometric-Zeno limit point, so that discrete events are not missed during simulation. When the simulation closely approaches the geometric-Zeno point, the hybrid automaton automatically switches to integrate the dynamics such that a sliding occurs on the switching surface to which belong the geometric-Zeno state (y i , v iy ) = (0, 0). Therefore, the simulation does not halt, and the solution trajectory of the hybrid model moves beyond the geometric-Zeno limit point. This reflects the real dynamics of the bouncing behaviour, where at the end of the bouncing the mass becomes at rest.

Conclusions and Perspectives
Geometric-Zeno behaviour is one of the most challenging problems in the analysis of hybrid systems. Such behaviour never occurs in real physical systems, but results from modelling abstraction (or over-approximation) when abstraction mechanisms fail to model the complex interaction between the continuous and discrete dynamics of hybrid systems. In this paper, we discussed-through a realistic case study-the challenges of simulating geometric-Zeno models of hybrid systems, and we provided a non-standard analysis of hybrid automata executions in densely ordered hybrid time domain. Through the non-standard analysis, we developed formal sufficient conditions for the existence geometric-Zeno based on the existence of a geometric contractive simulation relation between hybrid states in different execution cycles. The advantages of using non-standard semantics in the analysis of geometric-Zeno behavior is that the completeness in the space of the continuous dynamics and discrete dynamics is naturally introduced, so that it allows representing geometric-Zeno behaviour in a concrete way, while at the same time preserving the original semantics of the hybrid model. We also provided methods for carrying solution beyond geometric-Zeno limit point. The proposed methods for geometric-Zeno detection and elimination were validated through prototype implementations and simulation results.
The work presented in this paper can be continued in many different directions. In the future we want to explore the applicability of our methods for experimental case studies of complex hybrid systems having a large number of state variables (and thus a large space dimension), and whose models exhibit geometric-Zeno behaviour. Furthermore, we want to explore techniques for estimating geometric-Zeno time and geometric-Zeno state from given initial states, and the usage of such estimation to transition hybrid automaton execution beyond the geometric-Zeno limit point.