This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

A New Hybrid Automaton Framework with Partial Differential Equation Dynamics

Tianshu Bao Hengrong Du Weiming Xiang and Taylor T. Johnson Institute for Software Integrated Systems, Vanderbilt University, Nashville TN 37240, USA Department of Mathematics, Vanderbilt University, Nashville TN 37240, USA School of Computer and Cyber Sciences, Augusta University, Augusta, GA 30912, USA
Abstract

This paper presents the syntax and semantics of a novel type of hybrid automaton (HA) with partial differential equation (PDE) dynamic, partial differential hybrid automata (PDHA). In PDHA, we add a spatial domain XX and harness a mathematic conception, partition, to help us formally define the spatial relations. While classically the dynamics of HA are described by ordinary differential equations (ODEs) and differential inclusions, PDHA is capable of describing the behavior of cyber-physical systems (CPS) with continuous dynamics that cannot be modelled using the canonical hybrid systems’ framework. For the purposes of analyzing PDHA, we propose another model called the discrete space partial differential hybrid automata (DSPDHA) which handles discrete spatial domains using finite difference methods (FDM) and this simple and intuitive approach reduces the PDHA into HA with ODE systems. We conclude with two illustrative examples in order to exhibit the nature of PDHA and DSPDHA.

keywords:
Hybrid Automata, Cyber-Physical Systems, Partial Differential Equations

1 Introduction

Cyber-Physical Systems have the potential to revolutionize the development of technology worldwide, and in recent years, numerous researchers and companies have invested significant time and money into ensuring that these systems will realize their economic and societal potential [1]. However, since CPS fundamentally integrate computational and physical processes, there are unique challenges in designing and analyzing these systems. In fact, the functional correctness of CPS relies deeply on the dynamics of their physical environment and the discrete control decisions of their computational units. Within hybrid systems, the framework of HA has demonstrated considerable utility in capturing the complex interactions between the discrete and continuous parts of a CPS. Additionally, it allows for a formal analysis of the safety and reliability of CPS [2]. However, this modelling framework has catered to systems with dynamics that can be described by ODEs, and hardly any attention has been paid to systems with dynamics described by PDEs [3].

Meanwhile, safety of certain CPS relies on reachable set/state estimation results that are based on Lyapunov functions analogous to stability [4, 5, 6, 7, 8, 9, 10] and reachability analysis of dynamical systems [11, 12], certainly have potentials to be further extended to safety verification. One can study the stability of switched systems, a switched system is composed of a family of continuous or discrete-time subsystems along with a switching rule governing the switching between the subsystems, with the help of the given switching rules described by a prescribed state space partitioning [13, 14, 15] or some known constraints on switching sequence such as dwell time [16, 17] or average dwell time [18, 19] restrictions.

PDEs are accomplished at describing a wide range of phenomena such as fluid dynamics and quantum mechanics that cannot be adequately described by ODEs [20, 21, 22]. As an example, a typical application for PDEs is the modelling of congestion in highway networks [23], and one popular model for highway control is the Lighthill-Whitham-Richards (LWR) model [24, 25]. Within this context, the PDEs evolve in an infinite dimensional space and must be discretized for computational purposes. In our approach, we seek to extend the existing framework from ordinary differential equations to partial differential equations. However, this extension is non-trivial since the internal structure of HA with PDEs is inherently more complicated due to the fact that switching and jump conditions cannot be easily specified. An in-depth discussion of these complexities, along with a discussion of three types of switching conditions, can be found in the following paper by [26].

While the hybrid automata theory for ordinary differential equations (ODEs) has been extensively studied (e.g., see [27, 28]), the theory for partial differential equations (PDEs) is still in the stage of case study [29, 30, 31, 32]. The main challenges in this area can be attributed to two factors:

  1. (1)

    The dynamics of automata involve switching due to known constraints, which gives rise to the so-called free boundary problem. This problem entails tracking the interface between different stages. In the context of PDEs, analyzing and numerically solving the free boundary is highly challenging (e.g., see [33, 34, 35, 36, 37, 38, 39]).

  2. (2)

    Unlike ODEs, PDEs incorporate various types of boundary conditions. Determining suitable boundary conditions for the partition is a complex task that poses numerical challenges.

Therefore, in this article, we present a novel approach to address the hybrid automata problem with partial differential modelling. Our approach aims to reduce the PDE problem to a manageable ODE hybrid automaton by employing a standard numerical discretization technique known as the finite difference method.

2 Running Examples

Before illustrating the main ideas of our framework, we use two running examples throughout the paper. The components of these running examples are depicted in Figures 1 and 2. The heater model consists of three devices: (i) a rod that can be heated using a gas burner from anywhere, (ii) a long gas burner that can be turned on or off partially in any region, and (iii) a thermometer that monitors the temperature of the rod at every location and periodically issues signals when the temperature of the rod is above or below certain a threshold. The goal is to design a control policy that maintains the temperature of the rod within a given range.

The second model we consider is a traffic model that was originally proposed in [26]. The system consists of a highway segment in which vehicles flow in and out. Vehicles maintain a high speed when the traffic flow density is below a given critical density and when the density exceeds the critical threshold, the speed of the traffic wave and the overall flow capacity decrease.

2.1 Heater Model

Refer to caption
Figure 1: Diagram for heater model.

We first describe the behavior of the temperature of the rod. When the gas burner is OFF, the temperature of the rod, denoted by the variable uu, decreases according to the following PDE: u(x,t)tαu(x,t)xx=0u(x,t)_{t}-\alpha u(x,t)_{xx}=0 where α\alpha is the thermal diffusivity. The thermal diffusivity measures the rate of heat transfer of a material from the hot side to the cold side. The boundary conditions are u(0,t)=0u(0,t)=0 and u(L,t)=0u(L,t)=0, which denote that at the location x=0x=0 and x=Lx=L the temperature is fixed to be 0, and heat is absorbed. XX denotes the space coordinate and tt denotes time. This law, however, is only true when the temperature of the corresponding position on the rod is greater than 0.7. When the heater is OFF, and the temperature of a position on the rod is below 0.4, the heater at that position will be turned on. The heater function is defined as f(x)=xL+1f(x)=-\frac{x}{L}+1. The maximum of the heater function appears at x=0x=0 and the minimum is 0 at x=Lx=L. During the heater ON mode, the temperature is governed by the equation u(x,t)tαu(x,t)xx=f(x)u(x,t)_{t}-\alpha u(x,t)_{xx}=f(x) where f(x)f(x) is the function defined above. As one can see from the description of the evolution of the temperature, the system is not purely continuous. The system can switch from one mode to another by turning the heater on and off at a specific location on the rod.

2.2 Traffic Flow Model

Refer to caption
Figure 2: Diagram for traffic model.

The traffic model describes how traffic conditions may behave on a given highway. In free flow mode, which means the density is less than a specified critical density ρc\rho_{c}, the density function is given by the following equation u(x,t)t+v1u(x,t)x=0u(x,t)_{t}+v_{1}u(x,t)_{x}=0, where v1v_{1} is always a positive number and denotes that the traffic flow propagates forward. However, if the traffic density achieves ρc\rho_{c}, the system transitions into a high-density congestion mode. In this mode, the governing equation is described by u(x,t)t+v2u(x,t)x=0u(x,t)_{t}+v_{2}u(x,t)_{x}=0, where v2v_{2} is always a negative number and denotes that traffic congestion always moves backwards and propagates upstream. As an example, one of the causes of congestion may be a result of merging slow and fast-moving traffic, resulting in a high-density traffic flow. In this model, we can frequently switch between a free-flowing mode and a congestion mode, and as a result, a more powerful hybrid framework is needed to formalize these kinds of system behavior.

Additionally, the two models we have outlined present a mixture of space and time variables and are therefore quite complicated. In the following sections, we present a framework that is able to capture such a mixture of discrete and continuous behaviors, where PDEs describe the temporal and spatial dynamics.

3 Partial Differential Hybrid Automata

3.1 Transitions, Trajectories and Executions

Due to the properties of PDEs, the switching structure is more involved than in the case of ODEs [26]. One highway congestion alleviation model in [23] considers NN connected segments, where each segment is governed by an independent LWR PDE [24] with one side boundary condition. Each segment affects the boundary condition of the preceding segment and serves as an input function to the PDE. Additionally, the system is allowed to switch to another mode that incorporates a speed limit. One control approach for transport systems [40] proposes rules for switching based on criteria of minimizing a cost function. We outline two specific structures that are of interest to our framework:

  • 1.

    Switching PDEs in time on the full spatial domain. This situation is portrayed in Figure 3 (left) and is the PDE counterpart of hybrid systems as defined in [41], where a game theory approach is used to determine when mode switching occurs. Boundary condition switching has been investigated in highway traffic applications in [42]. PDE switching in time appears in [40] and in [23] and the latter one contains switching between modes in each highway segment.

  • 2.

    Switching PDEs on subsets of the time-space domain. This is illustrated in Figure 3 (right). Examples include the LWR PDE, in [23] where each highway segment is coupled with a boundary condition at the starting point of itself. This also appears in [24], where the LWR with triangular flux function can be decomposed into two modes (two one-dimensional wave equations) resulting in a partition of the (x,t)(x,t) space in regions with forward travelling waves, and regions with backward travelling waves.

Refer to caption
Figure 3: Switching cases for two scenarios, full domain switching on left and partial domain switching on right. BC denotes boundary conditions and IC denotes initial conditions. xx axis denotes the spatial domain and yy axis denotes time.

In order to describe the partial domain switching case in Figure 3 (right), it is useful to partition the whole domain into several parts and assign each one a corresponding mode. One possible solution is to use the union of disjoint domains to represent the region governed by specific modes. For example, the heat equation utuxx=0u_{t}-u_{xx}=0 with α=1\alpha=1 (mode 1) and without heat source can cover domain [0,0.4)[0,0.4). The equation utuxx=f(x)u_{t}-u_{xx}=f(x) with external source (mode 2) occupies domain [0.4,1][0.4,1].

Based on this idea, the main challenge is how to formalize the particular structure of the domain occupying behavior. One approach is to associate the union operator with the modes of the system. Thus, the system mode qq can be described as a composition of multiple modes qi\cup q_{i}, where each mode specifies the domain it occupies. Like in q1q_{1}, utuxx=0u_{t}-u_{xx}=0 when x𝒟1x\in\mathcal{D}_{1} and in q2q_{2}, utuxx=f(x)u_{t}-u_{xx}=f(x) when x𝒟2x\in\mathcal{D}_{2}, where 𝒟i\mathcal{D}_{i} is the region occupied by qiq_{i}. Thus, the space domain XX is composed of 𝒟1\mathcal{D}_{1} and 𝒟2\mathcal{D}_{2}.

This embodies our approach to represent the multiple mode occupation phenomenon, and we refer to the multiple mode occupation as the changing behavior of 𝒟i\cup\mathcal{D}_{i}. The remaining challenge is to how to describe the moving behavior of the modes. This can be realized by changing 𝒟i\mathcal{D}_{i}, together with its boundary condition. As the system evolves, points satisfying a given condition will be moved from one mode to another and cause 𝒟i\mathcal{D}_{i} to grow or shrink. We call this point’s moving behavior a trajectory. The evolution of 𝒟i\mathcal{D}_{i} is not easily depicted. It can be a function of time or a function of several other complicated variables. Additionally, it might be impossible to predict switching behavior due to the complexity exhibited by the PDE’s solution.

Based on the ideas discussed above, the concept of spatial control mode is given below.

Definition 1 (Spatial Control Mode).

Let XnX\subseteq\mathbb{R}^{n} be a space domain. Let QQ be a finite set of mm control modes, where each mode is denoted as qiq_{i}. A space control mode consists of a union of k(km)k~{}(k\leq m) control modes, where each mode covers part of the space domain XX. The spatial control mode is denoted by q~\tilde{q} where q~=qiQ{qi}Q\tilde{q}=\cup_{q_{i}\in Q}\{q_{i}\}\subseteq Q and the region mode qiq_{i} covers is denoted by Dom(qi)Dom(q_{i}) and Dom()Dom(\cdot) is a set map Dom():Q2XDom(\cdot):Q\to 2^{X}. Additionally, i=1k𝒟i=X\cup_{i=1}^{k}\mathcal{D}_{i}=X, where 𝒟i=Dom(qi)\mathcal{D}_{i}=Dom(q_{i}).

Now, according to our definition, q~\tilde{q} is a subset of QQ and not just an element in QQ. We want to emphasize that the system could occupy several control modes simultaneously, rather than stay at a single mode as defined in classical hybrid automata. In order to accommodate q~\tilde{q} and Dom(qi)Dom(q_{i}) and for the purposes of formalizing domain division, we rely on partition defined in Definition 2. One can see that {𝒟i}\cup\{\mathcal{D}_{i}\} is a partition of domain XX since each 𝒟i\mathcal{D}_{i} is nonempty, {𝒟i}=X\bigcup\{\mathcal{D}_{i}\}=X and 𝒟i𝒟j=\mathcal{D}_{i}\cap\mathcal{D}_{j}=\emptyset for iji\neq j. For convenience, we denote p={𝒟i}p=\cup\{\mathcal{D}_{i}\} a specific partition of XX consisting of 𝒟i\mathcal{D}_{i}s and denote P={p}P=\cup\{p\} a set containing all possible partitions of domain XX.

Definition 2 (Partition [43]).

A partition of a set SS is a set of nonempty subsets of SS such that every element xx in XX is in exactly one of these subsets. Equivalently, a family of sets pp is a partition of XX if and only if all the following conditions hold:

  • 1.

    The family pp does not contain the empty set (that is p\emptyset\notin p).

  • 2.

    The union of the sets in pp is equal to XX (that is apa=p\cup_{a\in p}a=p).

  • 3.

    The intersection of any two distinct sets in pp is empty (that is (a,bp\forall a,b\in p) abab=a\neq b\Rightarrow a\cap b=\emptyset).

It is worth noting that the new PDE dynamic hybrid automaton needs a function to describe its state value. The additional spatial variable requires us to specify the values at different space locations while, in classical hybrid automata, the system only has finite values since the system only considers finite continuous state variables. The values of these state variables and discrete modes can be determined as long as the time is fixed, and the system is deterministic. In our model, for any time tt, we regard that the PDE solution u(,t)u(\cdot,t) lies in the state space U=XU=\mathbb{R}^{X}. In other words, for any given xXx\in X, u(x,)u(x,\cdot) represents a real-valued trajectory.

After we obtain q~\tilde{q}, pp and u(,t)u(\cdot,t), the state can be defined now.

Definition 3 (State).

A state ss is a collection of variables that describes the current condition of a PDE dynamic system. It consists of a space control mode q~\tilde{q}, a partition pp of a domain XX and a real function u(,t)u(\cdot,t) defined on XX.

s=q~×p×u(,t)2Q×P×U\begin{split}&s=\tilde{q}\times p\times u(\cdot,t)\in 2^{Q}\times P\times U\\ \end{split} (1)

In Figure 3 (left), each mode occupies the whole space domain XX and the system stays in only one mode. We have q={qi},𝒟i=Xq=\{q_{i}\},\mathcal{D}_{i}=X, i=1,2,3i=1,2,3. In Figure 3 (right), PDE 1 (mode 1) and PDE 2 (modes 2) occupy the whole domain XX, q={q1q2}q=\{q_{1}\cup q_{2}\} and 𝒟1𝒟2=X\mathcal{D}_{1}\cup\mathcal{D}_{2}=X at t=0t=0. It is worth stressing the differences between representing a state in PDE dynamic hybrid automata and classical hybrid automata. For discrete modes, the combination of q~\tilde{q} and pp replaces the single qq and describes the space occupation behavior.

Bearing the above in mind, the next step is to formalize the flow function.

Definition 4 (Flow).

A flow for a PDE dynamic hybrid automaton is of the form 2Q×P×UU2^{Q}\times P\times U\rightarrow U which maps from one state to another as time evolves.

Similar to classical hybrid automata, PDE equations simulate the dynamics of the system. The flow consists of a piecewise PDE equation and the corresponding domain partition. A simple flow function for the heater example can be formally represented as

{utuxx=f(x,t;q),0<x<L,0<t<T,qQ,u(0,t)=u(L,t)=0,0tT,u(x,0)=u0(x),0xL.\begin{cases}u_{t}-u_{xx}=f(x,t;q),~{}&0<x<L,\quad 0<t<T,\quad q\in Q,\\ u(0,t)=u(L,t)=0,&0\leq t\leq T,\\ u(x,0)=u_{0}(x),&0\leq x\leq L.\end{cases}
Definition 5 (Transition).

A transition in a PDE dynamic hybrid automaton is of the form 2Q×P×U×E2Q×P2^{Q}\times P\times U\times E\rightarrow 2^{Q}\times P which maps the current mode and partition to another. EE is a finite set of events.

Definition 6 (Reset).

A reset function for a PDE dynamic hybrid automaton is of the form 2Q×P×U×EU2^{Q}\times P\times U\times E\rightarrow U which specifies how the value of u(x,t)u(x,t) changes when a transition takes place.

The ON mode, triggered by conditions defined in the set EE, for example (Figure 4), u(x,t)r1u(x,t)\geq r_{1}, then q=q1q=q_{1} so that f(x,t;q1)=f(x)f(x,t;q_{1})=f(x) while the OFF mode happens when u(x,t)r2u(x,t)\leq r_{2}, we set q=q2q=q_{2}, then f(x,t;q2)=0f(x,t;q_{2})=0.

3.2 Partial Differential Hybrid Automaton (PDHA)

With the above discussion in mind, we can now provide a formal definition of a partial differential hybrid automaton.

Definition 7 (Partial Differential Hybrid Automaton (PDHA)).

A partial differential hybrid automaton is a tuple Q,E,P,X,U,Init,Inv,f,ϕ,G,R\langle Q,E,P,X,U,Init,Inv,f,\phi,G,R\rangle where:

  • 1.

    QQ is a set of finite qiq_{i}s that represents control modes.

  • 2.

    EE is a finite set of events.

  • 3.

    XX is a space domain and XnX\subseteq\mathbb{R}^{n}.

  • 4.

    PP is a set of all partitions defined on domain XX.

  • 5.

    UU is a function space defined on domain XX and U=XU=\mathbb{R}^{X}.

  • 6.

    InitInit is a set of initial states and Init2Q×P×UInit\subseteq 2^{Q}\times P\times U.

  • 7.

    InvInv is a set of invariants defined for each mode qiq_{i}.

  • 8.

    f:2Q×P×UUf:2^{Q}\times P\times U\to U is a flow function and ff has the form :

    {ut=f1(Δu,u,x,t),x𝒟1,q=q1ut=f2(Δu,u,x,t),x𝒟2,q=q2ut=fk(Δu,u,x,t),x𝒟k,q=qk.\begin{cases}u_{t}=f_{1}(\Delta u,\nabla u,x,t),~{}~{}x\in\mathcal{D}_{1},~{}~{}q=q_{1}\\ u_{t}=f_{2}(\Delta u,\nabla u,x,t),~{}~{}x\in\mathcal{D}_{2},~{}~{}q=q_{2}\\ ...\\ u_{t}=f_{k}(\Delta u,\nabla u,x,t),~{}~{}x\in\mathcal{D}_{k},~{}~{}q=q_{k}.\\ \end{cases}

    where fi,i{1,2,,k}f_{i},i\in\{1,2,...,k\}, is the continuous segment in ff, Δ\Delta is the Laplacian, \nabla is the gradient, and 𝒟i,i{1,2,,k}\mathcal{D}_{i},i\in\{1,2,...,k\} is the domain covered by qiq_{i}.

  • 9.

    ϕ:2Q×P×U×E2Q×P\phi:2^{Q}\times P\times U\times E\rightarrow 2^{Q}\times P is a transition map.

  • 10.

    GG is a set defining guard condition, G2Q×P×2Q×P×UG\subseteq 2^{Q}\times P\times 2^{Q}\times P\times U.

  • 11.

    R:2Q×P×U×EUR:2^{Q}\times P\times U\times E\rightarrow U is a reset function.

In our framework, each mode contains only one PDE instead of a system of equations as in classical hybrid automata. Boundary conditions must not be violated and can be treated as a kind of invariant. They are imposed on the boundary of XX and act like constraints within the mode. Additionally, they are forced to be satisfied even during mode discrete transitions.

Refer to caption
Figure 4: Heater PDHA corresponding to the system in Figure 1.
Refer to caption
Figure 5: Traffic PDHA corresponding to the system in Figure 2.

Revisiting the examples outlined at the very beginning, we construct two models to illustrate the idea of PDHA in Figures 1 and 2. In each model, the system is composed of two modes and each mode is governed by a PDE, the given boundary conditions, and the initial condition. In the heater model, we have fi(Δu,u,x,t)=Δu+f(x,t;qi)f_{i}(\Delta u,\nabla u,x,t)=\Delta u+f(x,t;q_{i}).

The continuous trajectory is realized by moving a point satisfying a guard condition GG to another mode. In the heater model, a point in the mode ON where the temperature exceeds the threshold will be transferred to the mode OFF, meaning the heater located at this point is turned off while the other areas remain unchanged. At the same time, as the temperature at some points drops below some given bound, the heater at that location is turned on and the point at mode OFF will be moved to mode ON.

The same rule applies to the traffic model as well. The points in the free flow mode satisfying the guard condition G1G_{1} will be moved to a congestion mode, and points in the congestion mode satisfying G2G_{2} will be moved to the free flow mode.

4 Discrete Space Partial Differential Hybrid Automaton

In this section, we describe some core steps in deriving DSPDHA. First, we define a discretization scheme and use it to discretize a PDHA to construct its “discrete” model for analysis. Second, using this discretization scheme, we define a discrete PDHA that is related to the original PDHA via a “discretization relation” corresponding to the scheme \mathcal{R}.

4.1 Discretization Scheme and Discretization Relation

A discrete treatment of PDEs requires the use of new tools to realize the functions we need. One of the most widely used sets of methods is called finite difference methods (FDMs). Generally speaking, FDMs are a family of numerical approaches for solving differential equations by replacing them with an approximation using difference equations. Combining FDMs and PDHA produces the following definition:

Definition 8 (Discretization Scheme).

A discretization scheme is a numerical scheme to discretize a continuous partial differential equation into a set of algebraic equations (full-discretization scheme) or ordinary differential equations (semi-discretization scheme).

We present several schemes below to demonstrate how this technique approximates spatial derivatives.

Example 4.1 (Finite Difference Method Discretization Scheme).

A common example is shown for the heat equation using the central difference scheme:

u(i×h,t)xx=u((i1)×h,t)2u(i×h,t)+u((i+1)×h,t)h2+O(h2),\begin{split}u(i\times h,t)_{xx}=\frac{u((i-1)\times h,t)-2u(i\times h,t)+u((i+1)\times h,t)}{{h}^{2}}+O(h^{2}),\end{split} (2)

where the scheme is based on a uniform mesh, hh is the grid size, h=xi+1xih=x_{i+1}-x_{i}, {x1,x2,x3,,xn}\{x_{1},x_{2},x_{3},...,x_{n}\} is a list of locations where the mesh points sit, and these points are the same ones defined in pdp_{d}. Additionally, u(i×h,t)u(i\times h,t) denotes the value at the ithi^{th} position given time tt and the respective derivative is approximated using itself and the two adjacent values. The proof is based on using Taylor’s expansion with error O(h2)O(h^{2}).

After applying (2) and dropping the redundant part O(h2)O(h^{2}), the heat equation becomes

ui˙(t)1h2(ui1(t)2ui(t)+ui+1(t))+f(i×h,t),i=1,2,,n.\begin{split}&\dot{u_{i}}(t)\approx\frac{1}{{h}^{2}}(u_{i-1}(t)-2u_{i}(t)+u_{i+1}(t))+f(i\times h,t),~{}~{}i=1,2,\cdots,n.\end{split} (3)

We replace u(i×h,t)u(i\times h,t) by ui(t)u_{i}(t) since the derivative with respect to space has been removed. Thus, u˙i(t)\dot{u}_{i}(t) is used to represent the time derivative at the grid point i×hi\times h, and f(i×h,t)f(i\times h,t) represents the input function valued at the same location.

Once the scheme has been chosen, the relation between our models can be described by the following definition.

Definition 9 (Discretization Relation).

If the model AA is obtained from the model BB via discretization scheme \mathcal{R}, we say that the model AA relates to the model BB via discretization scheme \mathcal{R}, which is denoted by: ABA\preceq^{\mathcal{R}}B.

4.2 Discrete Space Partial Differential Hybrid Automaton

Using a discretization scheme, we obtain discrete models of the state, transition, flow and reset function of the original PHDA. These discrete models are defined below.

Refer to caption
Figure 6: Irregular discretization on domain XX, the left diagram shows the partition of XX and the right diagram shows how discretization is used on the domain XX. The black dots represent the points chosen in XdX_{d} and are connected through dash lines. These points can be on the boundary or inside the region.
Definition 10 (Discrete Domain).

Let XX be a domain and XnX\subseteq\mathbb{R}^{n}, a discrete domain XdX_{d} of XX is a set of distinct points obtained from XX by a discretization scheme \mathcal{\mathcal{R}}: Xd=i=1m{xi}X_{d}=\bigcup_{i=1}^{m}\{x_{i}\}, xiXx_{i}\in X and mm is the number of points. We say XdXX_{d}\preceq^{\mathcal{R}}X.

Example 4.2 (Discrete Domain of Heater Model).

Consider the heat equation defined on domain X=[0,10]X=[0,10]. One possible corresponding discrete domain XdX_{d} is {0,1,2,3,4,5,6,7,8,9,10}\{0,1,2,3,4,5,6,7,8,9,10\}.

Definition 11 (Discrete Partition).

Let QQ be a set of modes, PP is the set of all partitions on XX and XdXX_{d}\preceq^{\mathcal{R}}X. A discrete partition pdQmp_{d}\in Q^{m} is a set of values, and each value is associated with a point xiXdx_{i}\in X_{d}. The set of all possible pdp_{d}s is denoted by Pd=QmP_{d}=Q^{m} and PdPP_{d}\preceq^{\mathcal{R}}P.

In contrast to the continuous domain hybrid automaton which uses q~×p\tilde{q}\times p to describe the current mode that the system occupies, a discrete partition combines the two notations and simplifies the expression.

Example 4.3 (Discrete Partition of Heater Model).

Consider the model with q1=\ q_{1}= OFF, q2=\ q_{2}= ON and Xd={0,1,2,3,4,5}X_{d}=\{0,1,2,3,4,5\}. Then q~={q1,q2}\tilde{q}=\{q_{1},q_{2}\}, 𝒟1=[0,3]\mathcal{D}_{1}=[0,3] and 𝒟2=(3,5]\mathcal{D}_{2}=(3,5] can be expressed as {q1,q1,q1,q1,q2,q2}\{q_{1},q_{1},q_{1},q_{1},q_{2},q_{2}\}.

Definition 12 (Discrete State).

A discrete state sds_{d} is an ordered pair (pd,ud)(p_{d},u_{d}) where pdPdPp_{d}\in P_{d}\preceq^{\mathcal{R}}P is a discrete partition on XdXX_{d}\preceq^{\mathcal{R}}X and udmu_{d}\in\mathbb{R}^{m} is a list of real values. We denote the set of all possible sds_{d}s by SdS_{d} and say SdSS_{d}\preceq^{\mathcal{R}}S where SS is the set of states defined in PDHA.

A discrete state gives the whole picture of the system by combining a discrete partition and state values.

Example 4.4 (Discrete State of Heater Model).

One discrete state can be in the form {{q1,q1,q1,q1,q2,q2},{0.6,0.6,0.5,0.6,0.7,0.8}}\{\{q_{1},q_{1},q_{1},q_{1},q_{2},q_{2}\},\\ \{0.6,0.6,0.5,0.6,0.7,0.8\}\}, where q1,q2q_{1},q_{2} are the modes and the succeeding numbers are the temperatures at each node.

Everything listed above leads us to discrete flow.

Definition 13 (Discrete Flow).

Let ff be a flow function, fdf_{d} is the set of discrete flow functions such that the spatial derivative of ff is approximated using \mathcal{R}. We say fdff_{d}\preceq^{\mathcal{R}}f.

Example 4.5 (Discrete Flow of Heater Model).

Consider the heater example again,

{utuxx=f(x,t),0<t<T,0<x<L,u(0,t)=u(L,t)=0,0tT.\begin{cases}u_{t}-u_{xx}=f(x,t),\quad&0<t<T,\quad 0<x<L,\\ u(0,t)=u(L,t)=0,\quad&0\leq t\leq T.\end{cases}

The spatial derivative uxxu_{xx} is approximated by a FDM centred difference scheme based on a uniform mesh of step size Δx\Delta x. We obtain a system of ODEs: In place of u(t,iΔx)u(t,i\Delta x), we obtain an ODE system for ui(t)u_{i}(t), i=1,,mi=1,\cdots,m, (m+1)Δx=L(m+1)\Delta x=L:

u˙i(t)=ui12ui+ui+1Δx2+f(t,iΔx),\dot{u}_{i}(t)=\frac{u_{i-1}-2u_{i}+u_{i+1}}{\Delta x^{2}}+f(t,i\Delta x),

where u0=u1,um+1=umu_{0}=u_{1},u_{m+1}=u_{m} due to the boundary condition. We would like to remark that the convergence of FDM is due to the Lax–Richtmyer theorem [44].

Definition 14 (Discrete Transition).

A discrete transition ϕd\phi_{d} of a DSPDHA is of the form Pd×Ud×EPdP_{d}\times U_{d}\times E\rightarrow P_{d} which maps a current discrete partition to another. We say ϕdϕ\phi_{d}\preceq^{\mathcal{R}}\phi where ϕ\phi is the transition defined in the original PDHAPDHA and \mathcal{R} is the discretization scheme.

Example 4.6 (Discrete Transition of heater model).

In order to illustrate the idea of a discrete transition, we make a simple modification of the previous example:

{u˙1=2u1+u2h2,u˙2=u12u2+u3h2,u˙m=um12umh2.\begin{cases}\dot{u}_{1}=\displaystyle\frac{-2u_{1}+u_{2}}{h^{2}},\\ \dot{u}_{2}=\displaystyle\frac{u_{1}-2u_{2}+u_{3}}{h^{2}},\\ \quad\vdots\\ \displaystyle\dot{u}_{m}=\frac{u_{m-1}-2u_{m}}{h^{2}}.\end{cases}
e{u˙1=2u1+u2h2,u˙2=u12u2+u3h2+f(2h,t),u˙m=um12umh2+f(mh,t).\xrightarrow{e^{{}^{\prime}}}\begin{cases}\dot{u}_{1}=\displaystyle\frac{-2u_{1}+u_{2}}{h^{2}},~{}~{}\\ \dot{u}_{2}=\displaystyle\frac{u_{1}-2u_{2}+u_{3}}{h^{2}}+f(2h,t),~{}~{}\\ \quad\vdots\\ \displaystyle\dot{u}_{m}=\frac{u_{m-1}-2u_{m}}{h^{2}}+f(mh,t).\end{cases}

A transition to the mode ON at location x1x_{1} and x2x_{2} occurs because event ee takes place. Thus, we can write the transition function

ϕd(pd,1;ud;e)={pd,2,e=e,pd,1,otherwise.\phi_{d}(p_{d,1};u_{d};e)=\begin{cases}p_{d,2},~{}~{}e=e^{{}^{\prime}},\\ p_{d,1},~{}~{}otherwise.\\ \end{cases} (4)

where pd,1={q1,q1,q2,,q2}p_{d,1}=\{q_{1},q_{1},q_{2},...,q_{2}\}, pd,2={q2,q2,q2,,q2}p_{d,2}=\{q_{2},q_{2},q_{2},...,q_{2}\}, q1q_{1} represents mode OFF and q2q_{2} represents mode ON.

Definition 15 (Discrete Reset).

A discrete reset function RdR_{d} of a DSPDHA is of the form Pd×Ud×EUdP_{d}\times U_{d}\times E\rightarrow U_{d} which specifies how a value of udu_{d} changes to a new value when a transition takes place. We say RdRR_{d}\preceq^{\mathcal{R}}R where RR on the right is the reset function in original PDHAPDHA.

Definition 16 (Discrete Space Partial Differential Hybrid Automaton (DSPDHA)).

A discrete space partial differential hybrid automaton is a tuple Q,E,Pd,Xd,U,Init,Inv,fd,ϕd,G,Rd\langle Q,E,P_{d},X_{d},U,Init,Inv,f_{d},\phi_{d},G,R_{d}\rangle where:

  • 1.

    QQ is a set of finite modes;

  • 2.

    EE is a set of finite events;

  • 3.

    XdX_{d} is a set of mm points;

  • 4.

    PdP_{d} is a set of values defined on domain XdX_{d}, PdQmP_{d}\in Q^{m};

  • 5.

    UdU_{d} is a set of discrete values defined on XdX_{d}, Ud=mU_{d}=\mathbb{R}^{m};

  • 6.

    InitInit is a set of initial states, InitPd×UdInit\subseteq P_{d}\times U_{d};

  • 7.

    InvInv is a set of invariants defined for each mode qiQq_{i}\in Q;

  • 8.

    fd:Pd×UdUdf_{d}:P_{d}\times U_{d}\to U_{d} is a set of discrete flow functions and fdf_{d} have the form :

    {u˙1=f1(u1,u2,,um,t),u˙2=f2(u1,u2,,um,t),u˙m=fm(u1,u2,,um,t).\begin{cases}\dot{u}_{1}=f_{1}(u_{1},u_{2},...,u_{m},t),\\ \dot{u}_{2}=f_{2}(u_{1},u_{2},...,u_{m},t),\\ ...\\ \dot{u}_{m}=f_{m}(u_{1},u_{2},...,u_{m},t).\\ \end{cases} (5)

    where u˙i\dot{u}_{i} denotes time derivative of uiu_{i};

  • 9.

    ϕd:Pd×Ud×EPd\phi_{d}:P_{d}\times U_{d}\times E\rightarrow P_{d} is a transition function;

  • 10.

    GG is a set defining guard condition, GPd×Pd×UdG\subseteq P_{d}\times P_{d}\times U_{d};

  • 11.

    Rd:Pd×Ud×EUdR_{d}:P_{d}\times U_{d}\times E\rightarrow U_{d} is a reset function.

A key observation is DPHPHDPH\preceq^{\mathcal{R}}PH if the discrete space partial differential hybrid automaton DPHDPH is obtained from a partial differential hybrid automaton PHPH through \mathcal{R}.

The DSPHDA provides us with a set of properties that can easily be formalized and stated. Additionally, similar concepts that appear in HA are outlined below.

Definition 17 (Hybrid Time Trajectory).

A hybrid time trajectory τ={Ii}i=0N\tau=\{I_{i}\}_{i=0}^{N} is a finite or infinite sequence of intervals of the real line, such that

  • 1.

    Ii=[τi,τi]I_{i}=[\tau_{i},\tau_{i}^{{}^{\prime}}] for i<Ni<N;

  • 2.

    if N<N<\infty, then either IN=[τN,τN]I_{N}=[\tau_{N},\tau_{N}^{{}^{\prime}}], or IN=[τN,τN)I_{N}=[\tau_{N},\tau_{N}^{{}^{\prime}});

  • 3.

    for all ii, τiτi=τi+1\tau_{i}\leq\tau_{i}^{{}^{\prime}}=\tau_{i+1}.

where τi\tau_{i}^{{}^{\prime}} are the time when discrete transition takes place.

Now that we have defined the syntax of DSPDHA, we define the semantics in terms of executions.

Definition 18 (Execution).

An execution of a DSPDHA is a collection χ=(τ,pd,ud)\chi=(\tau,p_{d},u_{d}) satisfying

  • 1.

    Initial Condition: (pd(τ0),ud(τ0))(p_{d}(\tau_{0}),u_{d}(\tau_{0}))\in Init;

  • 2.

    Continuous Evolution: for all ii with τi<τi\tau_{i}<\tau_{i}^{{}^{\prime}}, pdp_{d} is a constant, udu_{d} is a solution to the ODEs (5) over [τi,τi][\tau_{i},\tau_{i}^{{}^{\prime}}] and for all t[τi,τi)t\in[\tau_{i},\tau_{i}^{{}^{\prime}}), ud(t)Iu_{d}(t)\in I;

  • 3.

    Discrete Evolution: for all ii, (pd(τi+1),ud(τi+1))R(pd(τi),ud(τi))(p_{d}(\tau_{i+1}),u_{d}(\tau_{i+1}))\in R(p_{d}(\tau_{i}^{{}^{\prime}}),u_{d}(\tau_{i}^{{}^{\prime}})).

An execution χ=(τ,pd,ud)\chi=(\tau,p_{d},u_{d}) is called finite if χ\chi is a finite sequence ending with a closed interval, infinite if τ\tau is either an infinite sequence, or if i=0(τiτi)=\sum_{i=0}^{\infty}(\tau_{i}^{{}^{\prime}}-\tau_{i})=\infty, and Zeno if it is infinite but i=0(τiτi)<\sum_{i=0}^{\infty}(\tau_{i}^{{}^{\prime}}-\tau_{i})<\infty.

Definition 19 (Zeno Execution).

An execution χ\chi is Zeno if

limiτiτ0=i=0(τiτi)=τ<\lim_{i\rightarrow\infty}\tau_{i}-\tau_{0}=\sum_{i=0}^{\infty}(\tau_{i}^{{}^{\prime}}-\tau_{i})=\tau_{\infty}<\infty (6)

Here τ\tau_{\infty} is called the Zeno time.

We use DPH(pd,0,ud,0)\mathcal{E}_{DPH}(p_{d,0},u_{d,0}) to denote the set of all executions of DSPDHA with initial condition (pd,0,ud,0)Init(p_{d,0},u_{d,0})\in Init, DPH(pd,0,ud,0)\mathcal{E}_{DPH}^{*}(p_{d,0},u_{d,0}) to denote the set of all finite executions, DPH(pd,0,ud,0)\mathcal{E}_{DPH}^{\infty}(p_{d,0},u_{d,0}) to denote the set of all infinite executions, and DPH\mathcal{E}_{DPH} to denote the union of DPH(pd,0,ud,0)\mathcal{E}_{DPH}(p_{d,0},u_{d,0}) over all (pd,0,ud,0)Init(p_{d,0},u_{d,0})\in Init.

Definition 20 (Zeno Discrete Space Partial Differential Hybrid Automaton).

A discrete space partial differential hybrid automaton DPH is Zeno if there exists (pd,0,ud,0)Init(p_{d,0},u_{d,0})\in Init such that all executions in DPH(pd,0,ud,0)\mathcal{E}_{DPH}^{\infty}(p_{d,0},u_{d,0}) are Zeno.

limiτiτ0=i=0(τiτi)=τ<\lim_{i\rightarrow\infty}\tau_{i}-\tau_{0}=\sum_{i=0}^{\infty}(\tau_{i}^{{}^{\prime}}-\tau_{i})=\tau_{\infty}<\infty (7)

Here τ\tau_{\infty} is called the Zeno time.

The set of states reachable by a DSPDHA, ReachDPHReach_{DPH}, is defined as

ReachDPH={(pd^,ud^)Pd×Ud:(τ,pd,ud)DPH,(pd(N),ud(τN))=(pd^,ud^)}.\begin{multlined}Reach_{DPH}=\{(\hat{p_{d}},\hat{u_{d}})\in P_{d}\times U_{d}:\exists(\tau,p_{d},u_{d})\in\mathcal{E}_{DPH}^{*},(p_{d}(N),u_{d}(\tau_{N}^{{}^{\prime}}))=(\hat{p_{d}},\hat{u_{d}})\}.\end{multlined}Reach_{DPH}=\{(\hat{p_{d}},\hat{u_{d}})\in P_{d}\times U_{d}:\exists(\tau,p_{d},u_{d})\in\mathcal{E}_{DPH}^{*},(p_{d}(N),u_{d}(\tau_{N}^{{}^{\prime}}))=(\hat{p_{d}},\hat{u_{d}})\}. (8)

where τ={[τi,τi]}i=0N\tau=\{[\tau_{i},\tau_{i}^{{}^{\prime}}]\}_{i=0}^{N}.

Definition 21 (Nonblocking).

A DSPDHA is called nonblocking if DPH(pd,0,ud,0)\mathcal{E}_{DPH}^{\infty}(p_{d,0},u_{d,0}) is nonempty at all (pd,0,ud,0)Init(p_{d,0},u_{d,0})\in Init.

Definition 22 (Deterministic).

A DSPDHA is called deterministic if DPH(pd,0,ud,0)\mathcal{E}_{DPH}^{*}(p_{d,0},u_{d,0}) contains at most one element for all (pd,0,ud,0)Init(p_{d,0},u_{d,0})\in Init.

More definitions about DSPDHA are similar to those in the classical HA theory, and we omit them here for the simplicity of the presentation.

4.3 Relation to Classical Hybrid Automaton

In this section, we explore the relations between classical hybrid automata, DSPDHA and PDHA. The central basis of introducing PDHA is extending HA with ODE dynamics to discretize PDE dynamics. To achieve this goal, some adjustments need to be made to accommodate the new framework within the classical hybrid automata scheme. It is our hope, that after these changes, the properties that hold for HA will hold for PDHA as well. This is the basis for the motivation to add an intermediate level (DSPDHA) lying between PDHA and HA, which captures the idea of PDHA and also stays close to classical HA. Using this framework, we make comparisons and illustrate useful results in the form of theorems.

In PDHA, we use space control modes and partitions q~×p\tilde{q}\times p to replace a discrete mode qq, a state function φ(x)\varphi(x) to replace state variables XX. The weakness of this scheme is determining executions and transitions because q~×p\tilde{q}\times p evolves continuously. DSPDHA overcomes these shortcomings by introducing a discrete state partition, pdp_{d} which functions similarly to qq in HA. Along the same lines, a discrete flow function obtained from PDHA by FDM is essentially the same as a HA flow function. This allows us to assert some PDE system properties where we cannot otherwise reason with certainty due to a lack of information. We lay out several points below to illustrate how these connections are built.

Refer to caption
Figure 7: PDHA, DSPDHA and HA relations.
  1. (1)

    Any DSPDHA is a HA if pdp_{d} has identical elements. Based on the knowledge that elements in pdp_{d} represent the modes where each location resides, identical elements indicate all the locations are assigned to the same modes and the system stays at a single mode. Therefore, the given DSPDHA is a HA. Thus, the general dynamical properties of HA, for instance, the existence, uniqueness, continuous dependence, reachability, stability and invariant sets follows. (See [45]). On the other, the DSPDHA inherits the physical feature (like diffusion) from the PDE model, which we demonstrate in the heat model below.

  2. (2)

    If the order of the time derivative of the PDE considered in a PDHA is 11, the number of points mm, in a discrete domain XdX_{d} is equivalent to the size of flow functions in the corresponding DSPDHA. According to Definition 13, the discretization is made on each discrete point in XdX_{d}. As a result, we have mm equations eventually.

  3. (3)

    If the order of the highest time derivative of a PDE is nn, then the PDE can be reduced to a system of nn PDEs with a 1st1^{st} order time derivative. We begin the proof by a change of variables. Let us replace the kstk^{st} order time derivative of uu by vkv_{k} and add a new equation to the system once the replacement is done. In the end, we obtain a system of equations in the form below.

    {u˙=v1,v˙1=v2,v˙2=v3,,v˙n2=vn1,v˙n1=f(u,ux,uxx,,t).\begin{cases}\dot{u}=v_{1},\\ \dot{v}_{1}=v_{2},\\ \dot{v}_{2}=v_{3},\\ ...,\\ \dot{v}_{n-2}=v_{n-1},\\ \dot{v}_{n-1}=f(u,u_{x},u_{xx},...,t).\end{cases} (9)

    where the original equation is u(n)=f(u,ux,uxx,,t)u^{(n)}=f(u,u_{x},u_{xx},...,t) and u(n)u^{(n)} is its nthn^{th} time derivative. For example, we can deal with the wave equation uttuxx=0u_{tt}-u_{xx}=0.

  4. (4)

    If the order of time derivative of the PDE considered in a PDHA is nn and the number of points in discrete domain XdX_{d} is mm, the size of flow functions in the corresponding DSPDHA is nmn\cdot m. Since mm determines the number of mesh points and each point is associated with an ODE (1st1^{st} order PDE after spatial discretization), mm equals the dimension of the system of ODEs which is the flow function.

Besides investigating the relation and distinction between models above, an interesting observation which occurs in classical hybrid automata are discontinuity issues, especially under PDE dynamics. [40] discusses the propagation of discontinuities when the system switches mode. They are numerous reasons why discontinuities occur. For the transport equation with a nonlinear flux function, there does not always exist a smooth solution, and a weak solution has to be constructed to handle a shock or rarefaction wave [46]. Jump discontinuities for hyperbolic system are discussed in [47].

The situation discussed in [40] is likely to happen if the discrete transition takes place in our framework. Consider a segment of road governed by a transport equation and the model is ut+ux=0u_{t}+u_{x}=0. Supposing the switching is triggered, and a new model ut+2ux=0u_{t}+2u_{x}=0 is introduced, the latter model which involves fast wave speed will push the front flow to move fast, and the traffic will start to accumulate at the boundary of the road which directly leads to a discontinuity.

5 Experiments on Running Examples

The heater and traffic examples are formalized as DSPDHA and analyzed in this section. 111Code for the experiments is available at https://drive.google.com/drive/folders/1qnpwlU9WdVNjYm8lsZOjAqFIQhGhH0ME?usp=sharing

Heater Model.

As illustrated above, the first example is the bronze rod with two isolated ends. The heater provides heat to the rod and can be partially turned on and off at any time once the temperature reaches the given thresholds. For the input function, a linear increment function is considered with a maximum value appearing on the left and a minimum value appearing value on the right. The diagram of the model is in Figure 8.

Refer to caption
Figure 8: PDHA diagram for the heater model analyzed. The left circle indicates the ON mode and the right circle indicates the OFF mode. The guard conditions are specified as greater equal than 0.70.7 or less equal than 0.40.4. The initial condition is 0.20.2 for everywhere.
Refer to caption
(a) Δx=1\Delta x=1
Refer to caption
(b) Δx=2\Delta x=2
Figure 9: Simulation results of heater model at x=2x=2. The heater at location x=2x=2 is turned on and off repeatedly. The two subfigures use different discretization sizes.
Refer to caption
(a) Δx=1\Delta x=1
Refer to caption
(b) Δx=2\Delta x=2
Figure 10: Simulation results of heater model at t=9t=9. Temperatures at the boundaries remain 0. The two subfigures use different discretization sizes.

The idea of discrete partitions is illustrated in this example, and 99 points are chosen to describe the temperature along the rod. A point whose value is greater than 0.7 will be moved to mode OFF and be moved back to ON as the value drops below 0.4. The initial temperature is 0.20.2 everywhere on the rod, and the input function for mode ON is f1(x)=0.1x+1f_{1}(x)=-0.1x+1 and 0 for mode OFF. Since we have the boundary condition u(0,t)=0u(0,t)=0 and u(L,t)=0u(L,t)=0, the two values, u(x1,t)u(x_{1},t) and u(xn1,t)u(x_{n-1},t), will decrease rapidly due to the heat diffusion effect [20]. Additionally, the input function decreases as xx increases, therefore the heating effect near the boundary x=Lx=L will be trivial, and the heater remains on. We discretize the domain and assign each mesh point a heater. The center difference scheme is used to approximate the space derivative and the forward scheme is used to approximate the time derivative.

Mathematically speaking, we can see even though the discretization reduces the model in HA for ODE, in the following analysis we can see the dynamic of the solutions is consistent with the diffusion feature of the PDE model: consider the following ODE system

{duidt=ui12ui+ui+1+(10i)when ui0.4,duidt=ui12ui+ui+1when ui0.7,\left\{\begin{array}[]{ll}\displaystyle\frac{du_{i}}{dt}=u_{i-1}-2u_{i}+u_{i+1}+(10-i)&\text{when }u_{i}\leq 0.4,\\ \displaystyle\frac{du_{i}}{dt}=u_{i-1}-2u_{i}+u_{i+1}&\text{when }u_{i}\geq 0.7,\end{array}\right. (10)

where i=1,2,,9i=1,2,\cdots,9 and u0=u10=0u_{0}=u_{10}=0. Initially, we have ui(0)=0.2u_{i}(0)=0.2, (10) is an ODE system with constant coefficients, hence the existence, uniqueness and continuous dependence follows from the standard ODE theory. Furthermore, it is easy to see that

duidt|t=0=i+10,i=1,2,,9,\frac{du_{i}}{dt}\Big{|}_{t=0}=-i+10,\quad i=1,2,\cdots,9,

in other words, uiu_{i} is increasing initially since the heat source is turned ON. If there are some uiu_{i} hits the threshold value 0.70.7, we may pick the maximum value, say uiu_{i}, then since the heat source is turned OFF, we have

duidt=ui12ui+ui+10,\frac{du_{i}}{dt}=u_{i-1}-2u_{i}+u_{i+1}\leq 0,

where we use the fact that uiui1u_{i}\geq u_{i-1}, and uiui+1u_{i}\geq u_{i+1}. This implies that uiu_{i} starts to decrease. For locations that are away from the boundary, if the value falls into 0.40.4, we pick the minimum value, then we have that

duidt=(ui12ui+ui+1)+10i10i>0,\frac{du_{i}}{dt}=(u_{i-1}-2u_{i}+u_{i+1})+10-i\geq 10-i>0,

where we use the fact that uiui1u_{i}\leq u_{i-1} and uiui+1.u_{i}\leq u_{i+1}. Therefore, uiu_{i} starts to increase again. We conclude that invariant region for uiu_{i}, i=2,3,,8i=2,3,\cdots,8 is [0.4,0.7][0.4,0.7]. For u1u_{1} and u9u_{9}, we claim that their values cannot fall below 0, in fact, from the OFF mode, when u1u_{1} and u9u_{9} go down to 0, we have

du1dt=2u1+u2+9=u2+9>0,du9dt=u82u9+1=u8+1>0,\frac{du_{1}}{dt}=-2u_{1}+u_{2}+9=u_{2}+9>0,\qquad\frac{du_{9}}{dt}=u_{8}-2u_{9}+1=u_{8}+1>0,

which means the values of u1u_{1} and u9u_{9} will start to go up again which prevents the values fall further into negatives. Hence, the invariant region for u1u_{1} and u9u_{9} is [0,0.7][0,0.7].

Traffic Flow Model.

We consider the model appearing in [26]. The switched PDE problem is a LWR PDE [24] with the triangular flux function. The flux function and two PDE modes are:

ϕ(u)={v1u,x<uc,v2(ωu),xuc.mode={ut+v1ux=0,x<uc,utv2ux=0,xuc.\phi(u)=\begin{cases}v_{1}u,&~{}x<u_{c},\\ v_{2}(\omega-u),&~{}x\geq u_{c}.\end{cases}~{}~{}\text{mode}=\begin{cases}u_{t}+v_{1}u_{x}=0,~{}x<u_{c},\\ u_{t}-v_{2}u_{x}=0,~{}x\geq u_{c}.\end{cases} (11)

We chose v1=3v_{1}=3, v2=1v_{2}=1, ω=4\omega=4 and uc=1u_{c}=1. The forward traffic flow maintains a speed equal to 33 and the backward wave maintains a speed equal to 11. Moreover, ucu_{c} equals 11 which is the guard condition for switching. Lastly, ω\omega is the parameter specified in backward wave. The diagram of the model is in Figure 11.

Refer to caption
Figure 11: PDHA diagram for the traffic model analyzed. The left circle indicates the free flow mode and the right circle indicates the congestion mode. The guard conditions are specified as greater equal than 11 or less than 11. The initial condition is Ψ(x)\Psi(x).

Initially, the regions, {0,,0.9}{1.3,,3.4}{3.8,,10.0}\{0,...,0.9\}\cup\{1.3,...,3.4\}\cup\{3.8,...,10.0\}, are assigned a value 0 for free flow mode. The other remaining areas, {1.0,1,1,1.2}{3.5,3.6,3.7}\{1.0,1,1,1.2\}\cup\{3.5,3.6,3.7\}, are assigned a value 11 for congestion mode. The Equation 11 shows the free flow mode carries the traffic forward and congestion pushes the traffic backwards. Once the forward and backward waves meet each other, the forward wave merges into the backward wave and starts to move back. The traffic leaves the system and no longer enters again when it reaches the boundary. For simplicity, no incoming traffic is considered.

We can facilitate simulation if we harness the theoretical aspects of linear hyperbolic equations. To simulate the first-order wave equation, only a one-side scheme is feasible and the low accuracy of the scheme requires a very dense discretization [46] which makes the computation task a nightmare. Thus, the simulation is just done by moving the waves along the axis. The results are shown in Figure 12(a) and 12(b).

Refer to caption
(a) t=1t=1.
Refer to caption
(b) t=3t=3
Figure 12: The left subfigure shows the simulation results of the traffic model at t=1t=1. A backward wave appears at the boundary x=0x=0. A forward wave starting at [3.9,4.0][3.9,4.0] has propagated to the region [6,9,7.0][6,9,7.0]. The right subfigure shows the simulation results of the traffic model at t=3t=3. Only one backward wave remains.

At t=1t=1, the backward wave appearing at the boundary x=0x=0 is about to leave. Wave originating from [3.5,3.7][3.5,3.7] moves to the place around 2.42.4. The forward wave starting at [3.9,4.0][3.9,4.0] propagates to the region [6,9,7.0][6,9,7.0]. The discrete partition pdp_{d} changes to 0 for points {0.3,0.4,,2.3,2.4}{2.8,2.9,,9.9,10}\{0.3,0.4,...,2.3,2.4\}\cup\{2.8,2.9,...,9.9,10\} and 11 for points {0,0.1,0.2}{2.5,2.6,2.7}\{0,0.1,0.2\}\cup\{2.5,2.6,2.7\}. At t=3t=3, only one single backward wave remains. pd=0p_{d}=0 for {0,0.1,,0.7,0.8}[1.1,1.2,,9.9,10]\{0,0.1,...,0.7,0.8\}\cup[1.1,1.2,...,9.9,10] and pd=1p_{d}=1 for {0.9,1.0}\{0.9,1.0\}. Here we use the explicit solutions instead of numerical solutions for the ODE system due to the transport feature of the traffic model. Simulations show that the traffic merges around t=0.5t=0.5 and eventually all flows leave the system. Around the merging location, the area that used to be in the free mode switches to the congestion mode.

6 Conclusion

In this paper, we propose a theoretical model called PDHA for modelling PDE dynamic systems. PDHA involves novel features such as the notion of domain XX, which is used to define the spatial location, and domain partition PP, which is used to describe the mode occupation and domain changing with respect to time. After building the theory for PDHA, we present another model called discrete space PDHA that we construct for the purpose of analysis. In discrete space PDHA, the discretization relation and scheme are proposed to formalize the discrete model. Additionally, the partition and space mode are replaced by a discrete partition, making the analysis easier. Moreover, we formally defined concepts such as time trajectory, model execution, Zeno behavior, reachability analysis, and determinism for DSPDHA. The paper also displays explorations towards the relations of the three models.

Although a few results and similarities are presented regarding DSPDHA and HA, other topics such as invariants, uniqueness, and continuity remain unexplored. The dynamic properties we proposed are only for DSPDHA, there is no similar conclusion for the continuous PDHA. Also, in our examples, we simply consider a one-dimension uniform discretization using easy FDMs. Other approaches like generalized finite difference and finite element methods can also play a critical role if an irregular domain is considered. Deciding DSPDHA from PDHA is also a challenging endeavor. Thus, an approach for measuring the distance between the approximated DSPDHA and real PDHA is deeply needed.

It is worth mentioning that the number of ODEs in the finite difference scheme (FDM) framework depends on the chosen partition. To obtain accurate and highly-resolved solutions, a fine partition becomes indispensable, which consequently leads to high-dimensional ODE systems. In such cases, the use of deep neural network models [48] could potentially offer valuable insights and broaden the applications of our approach. Exploring the potential of deep neural networks in this context is an avenue we plan to investigate in future research.

7 Acknowledgements

W. Xiang was supported by the National Science Foundation, under NSF CAREER Award no. 2143351, and NSF CNS Award no. 2223035.

References

  • [1] E. A. Lee, Cyber physical systems: Design challenges, in: 2008 11th IEEE International Symposium on Object and Component-Oriented Real-Time Distributed Computing (ISORC), IEEE, 2008, pp. 363–369.
  • [2] S. N. Krishna, A. Trivedi, Hybrid automata for formal modeling and verification of cyber-physical systems, arXiv preprint arXiv:1503.04928.
  • [3] H.-D. Tran, W. Xiang, T. T. Johnson, S. Bak, Reachability analysis for one dimensional linear parabolic equations, 6th IFAC Conference on Analysis and Design of Hybrid Systems.
  • [4] W. Xiang, On equivalence of two stability criteria for continuous-time switched systems with dwell time constraint, Automatica 54 (2015) 36–40.
  • [5] W. Xiang, Necessary and sufficient condition for stability of switched uncertain linear systems under dwell-time constraint, IEEE Transactions on Automatic Control 61 (11) (2016) 3619–3624.
  • [6] W. Xiang, Parameter-memorized lyapunov functions for discrete-time systems with time-varying parametric uncertainties, Automatica 87 (2018) 450–454.
  • [7] W. Xiang, J. Lam, J. Shen, Stability analysis and l1-gain characterization for switched positive systems under dwell-time constraint, Automatica 85 (2017) 1–8.
  • [8] W. Xiang, H.-D. Tran, T. T. Johnson, Robust exponential stability and disturbance attenuation for discrete-time switched systems under arbitrary switching, IEEE Transactions on Automatic Control 63 (5) (2017) 1450–1456.
  • [9] L. Zhang, W. Xiang, Mode-identifying time estimation and switching-delay tolerant control for switched systems: An elementary time unit approach, Automatica 64 (2016) 174–181.
  • [10] Z. Xu, H. Su, P. Shi, R. Lu, Z.-G. Wu, Reachable set estimation for markovian jump neural networks with time-varying delays, IEEE transactions on cybernetics 47 (10) (2016) 3208–3217.
  • [11] W. Xiang, H.-D. Tran, T. T. Johnson, Output reachable set estimation for switched linear systems and its application in safety verification, IEEE Transactions on Automatic Control 62 (10) (2017) 5380–5387.
  • [12] W. Xiang, H.-D. Tran, T. T. Johnson, On reachable set estimation for discrete-time switched linear systems under arbitrary switching, in: 2017 American Control Conference (ACC), IEEE, 2017, pp. 4534–4539.
  • [13] M. Johansson, A. Rantzer, Computation of piecewise quadratic lyapunov functions for hybrid systems, in: 1997 European Control Conference (ECC), IEEE, 1997, pp. 2005–2010.
  • [14] M. Margaliot, G. Langholz, Necessary and sufficient conditions for absolute stability: the case of second-order systems, IEEE Transactions on Circuits and Systems I: Fundamental Theory and Applications 50 (2) (2003) 227–234.
  • [15] S. Pettersson, B. Lennartson, Stabilization of hybrid systems using a min-projection strategy, in: Proceedings of the 2001 American Control Conference.(Cat. No. 01CH37148), Vol. 1, IEEE, 2001, pp. 223–228.
  • [16] A. S. Morse, Supervisory control of families of linear set-point controllers-part i. exact matching, IEEE transactions on Automatic Control 41 (10) (1996) 1413–1431.
  • [17] L. I. Allerhand, U. Shaked, Robust stability and stabilization of linear switched systems with dwell time, IEEE Transactions on Automatic Control 56 (2) (2010) 381–386.
  • [18] J. P. Hespanha, A. S. Morse, Stability of switched systems with average dwell-time, in: Proceedings of the 38th IEEE conference on decision and control (Cat. No. 99CH36304), Vol. 3, IEEE, 1999, pp. 2655–2660.
  • [19] L. Zhang, H. Gao, Asynchronously switched control of switched linear systems with average dwell time, Automatica 46 (5) (2010) 953–958.
  • [20] L. C. Evans, Partial differential equations, American Mathematical Society.
  • [21] T. Bao, X. Jia, J. Zwart, J. Sadler, A. Appling, S. Oliver, T. T. Johnson, Partial differential equation driven dynamic graph networks for predicting stream water temperature, in: 2021 IEEE International Conference on Data Mining (ICDM), IEEE, 2021, pp. 11–20.
  • [22] T. Bao, S. Chen, T. T. Johnson, P. Givi, S. Sammak, X. Jia, Physics guided neural networks for spatio-temporal super-resolution of turbulent flows, in: Uncertainty in Artificial Intelligence, PMLR, 2022, pp. 118–128.
  • [23] A. M. Bayen, R. L. Raffard, C. J. Tomlin, Network congestion alleviation using adjoint hybrid control: Application to highways, in: International Workshop on Hybrid Systems: Computation and Control, Springer, 2004, pp. 95–110.
  • [24] M. J. Lighthill, G. B. Whitham, On kinematic waves ii. a theory of traffic flow on long crowded roads, Proc. R. Soc. Lond. A 229 (1178) (1955) 317–345.
  • [25] L. Muñoz, X. Sun, R. Horowitz, L. Alvarez, Traffic density estimation with the cell transmission model, in: American Control Conference, 2003. Proceedings of the 2003, Vol. 5, IEEE, 2003, pp. 3750–3755.
  • [26] C. G. Claudel, A. M. Bayen, Solutions to switched Hamilton–Jacobi equations and conservation laws using hybrid components, in: International Workshop on Hybrid Systems: Computation and Control, Springer, 2008, pp. 101–115.
  • [27] T. A. Henzinger, The theory of hybrid automata, in: Proceedings 11th Annual IEEE Symposium on Logic in Computer Science, IEEE, 1996, pp. 278–292.
  • [28] R. Alur, C. Courcoubetis, T. A. Henzinger, P.-H. Ho, Hybrid automata: An algorithmic approach to the specification and verification of hybrid systems, in: International Hybrid Systems Workshop, Springer, 1991, pp. 209–229.
  • [29] T. Bao, et al., Modelling physics-based dynamic system using machine learning, Ph.D. thesis, Vanderbilt University (2023).
  • [30] D. G. Mallet, L. G. De Pillis, A cellular automata model of tumor–immune system interactions, Journal of theoretical biology 239 (3) (2006) 334–350.
  • [31] A. Banerjee, S. K. Gupta, Spatio-temporal hybrid automata for safe cyber-physical systems: A medical case study, in: Proceedings of the ACM/IEEE 4th International Conference on Cyber-Physical Systems, 2013, pp. 71–80.
  • [32] C. Tomlin, J. Lygeros, S. Sastry, Computing controllers for nonlinear hybrid systems, in: Hybrid Systems: Computation and Control: Second International Workshop, HSCC’99 Berg en Dal, The Netherlands, March 29–31, 1999 Proceedings 2, Springer, 1999, pp. 238–255.
  • [33] R. Bonnerot, P. Jamet, Numerical computation of the free boundary for the two-dimensional stefan problem by space-time finite elements, Journal of Computational Physics 25 (2) (1977) 163–181.
  • [34] J. M. Aitchison, S. Howison, Computation of hele-shaw flows with free boundaries, Journal of Computational Physics 60 (3) (1985) 376–390.
  • [35] A. Friedman, V. Principles, Free boundary problems, Malabar, Fla.: RE Krieger 258.
  • [36] L. A. Caffarelli, S. Salsa, S. Salsa, A geometric approach to free boundary problems, Vol. 68, American Mathematical Soc., 2005.
  • [37] A. Friedman, Free boundary problems in science and technology, Notices of the AMS 47 (8) (2000) 854–861.
  • [38] G. Ryskin, L. Leal, Numerical solution of free-boundary problems in fluid mechanics. part 1. the finite-difference technique, Journal of fluid mechanics 148 (1984) 1–17.
  • [39] G. Ryskin, L. Leal, Numerical solution of free-boundary problems in fluid mechanics. part 2. buoyancy-driven motion of a gas bubble through a quiescent liquid, Journal of Fluid Mechanics 148 (1984) 19–35.
  • [40] F. M. Hante, G. Leugering, T. I. Seidman, Modeling and analysis of modal switching in networked transport systems, Applied Mathematics and Optimization 59 (2) (2009) 275–292.
  • [41] C. J. Tomlin, J. Lygeros, S. S. Sastry, A game theoretic approach to controller design for hybrid systems, Proceedings of the IEEE 88 (7) (2000) 949–970.
  • [42] I. S. Strub, A. M. Bayen, Weak formulation of boundary conditions for scalar conservation laws: An application to highway traffic modelling, International Journal of Robust and Nonlinear Control: IFAC-Affiliated Journal 16 (16) (2006) 733–748.
  • [43] P. R. Halmos, Naive set theory, Courier Dover Publications, 2017.
  • [44] G. D. Smith, Numerical solution of partial differential equations: finite difference methods, Oxford university press, 1985.
  • [45] J. Lygeros, K. H. Johansson, S. N. Simic, J. Zhang, S. S. Sastry, Dynamical properties of hybrid automata, IEEE Transactions on automatic control 48 (1) (2003) 2–17.
  • [46] J. W. Thomas, Numerical partial differential equations: finite difference methods, Vol. 22, Springer Science & Business Media, 2013.
  • [47] J. Rauch, M. Reed, Jump discontinuities of semilinear, strictly hyperbolic systems in two variables: Creation and propagation, Communications in Mathematical Physics 81 (2) (1981) 203–227.
  • [48] R. T. Chen, Y. Rubanova, J. Bettencourt, D. K. Duvenaud, Neural ordinary differential equations, Advances in neural information processing systems 31.