A New Switched State Jump Observer for Traffic Density Estimation in Expressways Based on Hybrid-Dynamic-Traffic-Network-Model

When faced with problems such as traffic state estimation, state prediction, and congestion identification for the expressway network, a novel switched observer design strategy with jump states is required to reconstruct the traffic scene more realistically. In this study, the expressway network is firstly modeled as the special discrete switched system, which is called the piecewise affine system model, a partition of state subspace is introduced, and the convex polytopes are utilized to describe the combination modes of cells. Secondly, based on the hybrid dynamic traffic network model, the corresponding switched observer (including state jumps) is designed. Furthermore, by applying multiple Lyapunov functions and S-procedure theory, the observer design problem can be converted into the existence issue of the solutions to the linear matrix inequality. As a result, a set of gain matrices can be obtained. The estimated states start to jump when the mode changes occur, and the updated value of the estimated state mainly depends on the estimated and the measured values at the previous time. Lastly, the designed state jump observer is applied to the Beijing Jingkai expressway, and the superiority and the feasibility are demonstrated in the application results.


Introduction
Throughout past decades, traffic flow modeling has always been a hot topic among scholars, and various models are gradually being applied to solve traffic flow analysis, control, state estimation, and prediction. In particular, dynamic model-based traffic state estimator design technology has proven its usefulness in solving traffic state estimation, reconstruction, and prediction. In recent years, with the continuous progress and development of technologies, a number of new state estimators have been designed and are gradually being applied to solve the state estimation problem of traffic networks with different sizes and topology structures. State observers and Kalman filters based on the cell transmission model (CTM) [1,2] and various improved cell transmission models are the most popular in current studies.  [3,4]. Canudas-de-Wit et al. [5] improved the CTM by using the called graph constrained method, and, based on this new model, a state observer was applied to a real freeway. Further, a robust approach was considered to improve the estimation accuracy in reference [6]. Chen et al. proposed a dynamic graph hybrid automata modeling framework [7,8] by combining the dynamic graph [9] with the hybrid automata theory [10,11] and deduced the piecewise affine system model (PWASM) of the traffic network [12]. Based on the PWASM, a series of switched state observers [13][14][15][16][17] and Kalman filters [18] were studied to solve the issues of traffic density estimation and congestion identification for traffic networks of any size and with any topology structures.
In addition, for other system models, corresponding observer design methods were also studied [19][20][21]. In reference [22], based on a hybrid 2-D model of the switched stochastic systems, the observer was designed to solve the tracking control problem. The reduced-order state observers were studied in literature [23][24][25]. In references [26][27][28], distributed state observers were applied to the large scale systems. The types of robust observers were proposed in the switched systems with unknown inputs [29] and discrete nonlinear systems with disturbances [30]. Other methods were also used in references [31,32].
Those studies mentioned above have shown that all the methods are only partially successful in accurately solving the problem of state estimation. All these approaches mainly rely on the strictly synchronous information from the actual system and the state observer system. Especially for the switched system, it is always assumed that there is no time delay in the switching signal. However, this assumption disobeys fact. As a typical switched system, there is always a time interval between the real traffic network system and its estimation system, either leading or lagging. That is to say, synchronous switching is almost impossible because of the inherent nature of the system.
As can be seen from the above analysis, it is not feasible to solve the state estimation problem of a real traffic network using the traditional observer design strategy. Therefore, discovering a more efficient method to solve this problem has become an important goal to pursue. For a similar issue, a state jump observer was presented for the continuous system in [33]. In a discrete system such as a traffic network system, the same observer design idea can be introduced.
In literature [20,21], the common Lyapunov function was used to solve the convergence of the error estimation systems. In this work, unlike most of the existing results, the state jump observer design is transformed to the linear matrix inequality problem by introducing Lyapunov function [34] and S-Prodecure [35], and the multiple Lyapunov functions are utilized to guarantee that the solution of the error system exists. The design of the observer can be completed to accurately reconstruct the real traffic states.
The organization of this paper is as follows. In Section 2, the hybrid dynamic model is deduced by embedding the CTM into the Dynamic Graph Hybrid Automata (DGHA) framework. In Section 3, the state jump observer is designed. In Section 4, the results obtained by applying the methods to the real expressway are illustrated. The paper is concluded in Section 5.

Hybrid Dynamic Model for Traffic Network
In previous work, a new macroscopic traffic flow modeling method on the basis of the well-known CTM was proposed to describe the evolution law of traffic flow over the road network. This method was named the Dynamic Graph Hybrid Automata (DGHA). In the model, the nonlinear description was transformed into the piecewise linear expression of the multi-mode switching among cells through the space partition principle, and the combined modes between cells could be described by the convex polytopes. The traffic network dynamical system can be described by a piecewise affine system with the following equation (for the detailed modeling process, the reader can refer to references [12,17]). where x = [ρ 1 , · · · , ρ N ] T ∈ R N denotes the traffic density vector of the road network, the input vector u ∈ R M is added to represent the traffic demand of the road network, y(t) ∈ R P is the measured output vector of the sensors, F σ(t) is a vector consisting of the parameters in the fundamental diagrams of all the road segments, A σ , B, and C are the system matrix, the input matrix, and the output matrix, respectively, σ(t) is the switching function, and σ : [0, +∞) → I S = {1, 2, · · · , S} is determined by the convex polytopes D s , i.e., σ(t) = s if and only if x(t) ∈ D s . In the model, the triangular fundamental diagram is used to approximately describe the relationship between the traffic flow and the density of the road segment (cell) (see Figure 1), where ρ is the traffic density (vehicles per kilometer), q is the traffic flow (vehicles per hour), C is the traffic capacity (vehicles per hour), V is the free flow speed (kilometers per hour), W is the traffic wave speed (kilometers per hour), ρ 0 is the critical density (vehicles per kilometer), and ρ m is the maximum/jam density (vehicles per kilometer).
In the model, the triangular fundamental diagram is used to approximately describe the relationship between the traffic flow and the density of the road segment (cell) (see Figure 1), where ρ is the traffic density (vehicles per kilometer), q is the traffic flow (vehicles per hour), C is the traffic capacity (vehicles per hour), V is the free flow speed (kilometers per hour), W is the traffic wave speed (kilometers per hour), 0 ρ is the critical density (vehicles per kilometer), and m ρ is the maximum/jam density (vehicles per kilometer).

Design of the State Jump Observer
In order to express the switching processes between different traffic flow modes as clearly as possible, the linear hyper planes following Equation (2) describing the changes between different modes (subsystems) are defined, and where i  and j  denote the active field of the i th mode and the j th mode, respectively, which are described by the convex polytopes. The mode i cannot be switched to the mode j, if , i j  is an empty set.

Remark 1.
Traffic flow network can be modeled to be the piecewise affine system by introducing the state subspace, each subsystem can be seen as a mode and can be described by the convex polytope, and the changes of the values between the adjacent modes can be expressed using linear hyper planes.
For the convenience of design and computing, an important assumption is essential in the traditional switched observer design-the switching of the observer and the switching of the system are synchronous. However, strict synchronization is impossible for the real traffic network, thus this assumption does not hold. As a result, a novel structure observer, which is called state jump

Design of the State Jump Observer
In order to express the switching processes between different traffic flow modes as clearly as possible, the linear hyper planes following Equation (2) describing the changes between different modes (subsystems) are defined, and D i,j is called a switched set.
where D i and D j denote the active field of the ith mode and the jth mode, respectively, which are described by the convex polytopes. The mode i cannot be switched to the mode j, if D i,j is an empty set.

Remark 1.
Traffic flow network can be modeled to be the piecewise affine system by introducing the state subspace, each subsystem can be seen as a mode and can be described by the convex polytope, and the changes of the values between the adjacent modes can be expressed using linear hyper planes.
For the convenience of design and computing, an important assumption is essential in the traditional switched observer design-the switching of the observer and the switching of the system are synchronous. However, strict synchronization is impossible for the real traffic network, thus this assumption does not hold. As a result, a novel structure observer, which is called state jump observer, is proposed. The structure diagrams of the switched state synchronous observer and the switched state jump observer are shown in Figures 2 and 3, respectively. observer, is proposed. The structure diagrams of the switched state synchronous observer and the switched state jump observer are shown in Figure 2 and Figure 3, respectively.
Traffic network Figure 2. Structure of state synchronous observer.  Therefore, based on system (1), the switched state observer of the road network system can be described as the following Equation (3): is the observer gain matrices to be designed, and the switching function one of the observer modes is active at a certain time point. In order to describe the switching of the observer system, the same method as shown in Equation (2) can be used to describe the value changes of the switching function ( ) t δ , which is as follows:  observer, is proposed. The structure diagrams of the switched state synchronous observer and the switched state jump observer are shown in Figure 2 and Figure 3, respectively.
Traffic network Figure 2. Structure of state synchronous observer.  Therefore, based on system (1), the switched state observer of the road network system can be described as the following Equation (3): is the observer gain matrices to be designed, and the switching function one of the observer modes is active at a certain time point. In order to describe the switching of the observer system, the same method as shown in Equation (2) can be used to describe the value changes of the switching function ( ) t δ , which is as follows:  Therefore, based on system (1), the switched state observer of the road network system can be described as the following Equation (3): wherex(t) ∈ R N is the estimated state vector, K δ ∈ K {K 1 , K 2 , K 3 , · · · , K S } is the observer gain matrices to be designed, and the switching function δ : [0, +∞) → {1, 2, · · · , S} decides which one of the observer modes is active at a certain time point. In order to describe the switching of the observer system, the same method as shown in Equation (2) can be used to describe the value changes of the switching function δ(t), which is as follows: For the general linear time invariant system, which only includes single mode, supposing that the system is observable or detectable, only the observer gain matrix K has to be designed to ensure that the matrix A-KC is Schur stable and that the estimated statex is able to track the system state x. Similarly, for the traffic network system, which is a multi-mode switching, it seems that a series of observer gain matrices need to be computed such that each of the A i -K i C is Schur stable. If the active mode of the system (1) is known, it is only to activate the corresponding observer mode. However, there is no guarantee the estimation error will converge by using this method, even if the estimation error of each mode is convergent-not to mention the active mode of the traffic network is unknown. Thus, the classical observer design approach is no longer applicable, and a novel methodology for the piecewise affine switched linear system (1) has to be investigated.
In the existing literature (including our previous work), most state observers for switched systems are designed in an ideal case. In references [12][13][14][15][16][17], it is assumed that the switching of the observer system is synchronous with that of the original system modes in the section of observer design. However, it is well known that this assumption is an ideal case; it does not conform to the actual situation. In most practical cases, compared to the original system (1), the switching between modes of the observer system (3) is always ahead or delayed. It is difficult to guarantee the estimation errors converge for the ideal assumption. Based on the analysis above, the switched observer including state jumps is adopted to solve the issue of traffic density estimation.
The state estimation error dynamics are obtained by combining the system (1) and the observer system (3).
In this paper, the multiple Lyapunov functions method is introduced to solve the stability of the error dynamic system, and each Lyapunov function can be expressed as V i (e) = e T P i e. Thus, the change of the energy can be obtained as follows: where The state of the observer system and the state of the origin system evolve according to mode i and mode j, respectively. Next, a theorem is given for reference: Theorem 1 [33,34]. The state estimation error dynamics (5) is eventually bounded by e max , and x is eventually bounded by x max , if there exist the matrices P i , L i and the nonnegative constant µ, λ i,j , such that the matrix inequality (7) is satisfied.
where The detailed proof process is as follows.
Proof of Theorem 1. The constant piecewise Lyapunov function V i (e) is expressed as: where P i is the symmetric positive definite matrix, and: In order to ensure the error estimation system (5) is converged, the following inequality with a constraint condition has to be satisfied: By using the S-Procedure [36], there must exist a nonnegative constant λ i,j such that the following inequality (11) is satisfied. Equation (9) with the constraint condition is equivalent to the following inequality for a nonnegative constant λ i,j : where Ψ = A i e + ∆A i,j x + ∆F i,j . Relying on the Schur complement, the inequality (11) can be rewritten as follows: namely: It is noted that the inequality (13) is not a Linear Matrix Inequality (LMI) because it contains bilinearities, but it can be transformed to an LMI by employing the change of the variable where the transformed problem is now of LMI variety, thus the matrix inequality is obtained (7).
The proof is completed.
For the observer design of the switched system, how to properly update the estimated states of the observer system when the observer mode changes at the switching sets (4) is another important problem, because it affects the observation accuracy directly.
The new estimated state of the observer can be obtained after jumping by the following equation: Sensors 2019, 19, 3822 7 of 15 wherex (t + 1) is the updated state of the observer statex(t), and η 1 and η 2 are two coefficients that need to be computed to guarantee that the estimated error e is bound. On the basis of Equation (14), the computational formula of the updated value of the observer is given as shown in Lemma 1.

Lemma 1.
The updated statex can be obtained by the following equation: where Remark 2. As mentioned above, P i is the symmetric positive definite matrix. Thus, there exist Λ i , K i , Q i such that P i = K i Λ i K T i and P i = Q i Q T i , where K i and Λ i are the orthonormal eigenvectors, and the diagonal matrix consists of the eigenvalues of P i . Q i is the symmetric positive definite matrix, and Q i is not the only one.

Remark 3.
In practice, the estimated statex will abruptly jump to the new statex , once thex reaches the linear hyper planes D i,j .x is called the updated density ofx.
The detailed algorithm steps are as follows.
Step 1: Compute the matrices A i , B, and F i and design the output matrix C such that the pair (A i , C) is observable or detectable. If the system is not observable or detectable, the matrix C is redesigned until the system meets the conditions.
Step 2: Compute matrices P i , and then calculate Q i by factorizing P i ; meanwhile, collect measurements y.
Step 3: Update the state value of the observer at the beginning of each mode byx =

Experiment Parameters Setting
In this section, an experiment example is presented to demonstrate the validity and the practicability of our approach by applying the designed state jump observer to the Beijing Jingkai expressway. The selected road section (see Figure 4a) is considered only from north to south, which is from the Majialou bridge to the Xihongmen toll station. The section is approximately 3.5 km long and is made up by three lanes. In accordance with the segment partition rules mentioned in reference [17], the road section is divided into six links including 14 cells, and the detailed results are labeled in Table 1.
First of all, according to the actual road network structure, the experiment road section is reconstructed by using the traffic simulator VISSIM (see Figure 4b). In order to reconstruct the traffic densities of all the cells, the traffic flow evolution process from 16:00 to 20:00 is then further simulated. First of all, according to the actual road network structure, the experiment road section is reconstructed by using the traffic simulator VISSIM (see Figure 4b). In order to reconstruct the traffic densities of all the cells, the traffic flow evolution process from 16:00 to 20:00 is then further simulated. The sample time interval is 5 s. Because there are three on-ramps and two off-ramps, the corresponding dimensions of the input matrix B are 14 × 3, and b2,1 = 0.0203, b8,2 = 0.0192, b14,3 = 0.0192, and others are 0.  According to the observability analysis of the traffic network, which is mentioned in references [17,36,37], and to ensure that the system is observable or detectable, the traffic detectors are placed in cells 1, 2, 3, 7, 8, 9, 10, 11, 12, 13, and 14. Thus, the matrix C has the following forms: c1,1 = c2,2 = c3,3 = c4,7 = c5,8 = c6,9 = c7,10 = c8,11 = c9,12 = c10,13 = c11,14 =1, and other entries are 0.

Remark 4. In practice, the output matrix C is not unique; it can be designed in many different forms according to the location and the types of the traffic sensors as long as the system (A,C) is observed.
Remark 5. In order to reconstruct the full state by using the designed observer, we must construct the C matrix so that the pair (A_s, C) is observable or detectable, which is the sufficient and necessary condition of observer design, where C is the matrix related to the number and the places of traffic detectors in the road segments (cells). This is the first step for the design observer. Thus, the detectors are installed in cells of most of the highway segments to collect traffic data to guarantee the pair (A_s, C) is observable or detectable.  According to the observability analysis of the traffic network, which is mentioned in references [17,36,37], and to ensure that the system is observable or detectable, the traffic detectors are placed in cells 1, 2, 3, 7, 8, 9, 10, 11, 12, 13, and 14. Thus, the matrix C has the following forms: c 1,1 = c 2,2 = c 3,3 = c 4,7 = c 5,8 = c 6,9 = c 7,10 = c 8,11 = c 9,12 = c 10,13 = c 11,14 =1, and other entries are 0.

Remark 4.
In practice, the output matrix C is not unique; it can be designed in many different forms according to the location and the types of the traffic sensors as long as the system (A,C) is observed.

Remark 5.
In order to reconstruct the full state by using the designed observer, we must construct the C matrix so that the pair (A_s, C) is observable or detectable, which is the sufficient and necessary condition of observer design, where C is the matrix related to the number and the places of traffic detectors in the road segments (cells). This is the first step for the design observer. Thus, the detectors are installed in cells of most of the highway segments to collect traffic data to guarantee the pair (A_s, C) is observable or detectable.

Analysis Results
Jingkai expressway is not only the main road connecting the south area of Beijing with the city center but also one of the important passageways for the areas outside Beijing to enter the city. As the main passway out of Beijng, it carries considerable traffic every day, especially during the evening rush hour. Therefore, the period of time from 16:00 to 20:00 is chosen for our experiment.
In order to further verify the performance of the state jump observer designed in this paper, the conventional synchronous observer is used to reconstruct the cell densities of the experimental road section as the first step.
The Figures 5-7 are the error curve, real densities and estimated densities, respectively From the error curve, which is shown in Figure 5, it can be seen that the estimation error between the real density and the estimated one begins to converge at about 30 s, and the convergence speed is acceptable. Since the observer and the actual road network system switch synchronously, the error does not jump and tends to be stable. Figure 7 indicates that the synchronous observer can accurately reconstruct the real density (see Figure 6). evening rush hour. Therefore, the period of time from 16:00 to 20:00 is chosen for our experiment.
In order to further verify the performance of the state jump observer designed in this paper, the conventional synchronous observer is used to reconstruct the cell densities of the experimental road section as the first step.
The Figure 5, Figure 6 and Figure 7 are the error curve, real densities and estimated densities, respectively From the error curve, which is shown in Figure 5, it can be seen that the estimation error between the real density and the estimated one begins to converge at about 30 s, and the convergence speed is acceptable. Since the observer and the actual road network system switch synchronously, the error does not jump and tends to be stable. Figure 7 indicates that the synchronous observer can accurately reconstruct the real density (see Figure 6).   conventional synchronous observer is used to reconstruct the cell densities of the experimental road section as the first step.
The Figure 5, Figure 6 and Figure 7 are the error curve, real densities and estimated densities, respectively From the error curve, which is shown in Figure 5, it can be seen that the estimation error between the real density and the estimated one begins to converge at about 30 s, and the convergence speed is acceptable. Since the observer and the actual road network system switch synchronously, the error does not jump and tends to be stable. Figure 7 indicates that the synchronous observer can accurately reconstruct the real density (see Figure 6).    Compared to the synchronous state observer, the biggest difference is that the jumps and the oscillations appear when the mode changes occur in the error curve for the state jump observer (see Figure 8). The main reason is that, when the new mode is updated, the error system is oscillated repeatedly from the initial state until it converges again. The estimated densities, which are shown in Figure 9, exhibit that the densities can be reconstructed by using the state jump observer and that 16  Compared to the synchronous state observer, the biggest difference is that the jumps and the oscillations appear when the mode changes occur in the error curve for the state jump observer (see Figure 8). The main reason is that, when the new mode is updated, the error system is oscillated repeatedly from the initial state until it converges again. The estimated densities, which are shown in Figure 9, exhibit that the densities can be reconstructed by using the state jump observer and that jumps only occur where the new models are updated. Figure 10 demonstrates the more detailed estimation results of cell 5 and cell 6. From the estimation results, the congested area and the congested period of the expressway can be easily identified. Thus, it can provide basis for residents to avoid traffic congestion and improve the road operation efficiency.
In addition, the Mean Percentage Error (MPE) and the Root Mean Squared Error (RMSE) are adopted to further verify the performance of the jump observer, which are shown in Equations (16) and (17), respectively.
where ρ i (t) andρ i (t) are, respectively, the real densities and the estimated ones, and n is the total number of observations. By using Equations (16) and (17), the MPE and the RMSE are computed for the two types of state observer, which are the synchronous state observer [16] and the state jump observer. The detailed results are shown in Tables 2-5, respectively. From the results, we can see that, not only can the real densities be more accurately reconstructed by using the state jump observer, but the MPE and the RMSE of the state jump observer are better than the synchronous state observer as well.   Remark 6. For the synchronous state observer, the signal switching is synchronous between the observer system and the actual traffic network system without any time delay and advance. Therefore, it is unnecessary to consider the influence of the modes switching on the estimation accuracy when the system state is reconstructed by using this type of observer. On the contrary, the state of the jump observer cannot keep synchronization with the network system when cell mode changes occur, thus there may exist a time advance or a time delay. Therefore, when a new mode appears, the estimated state must jump and oscillate until the error between the observer and the actual system converges again.

Remark 7.
In order to reduce the complexity of observer design, the mode changes are ignored in the previous method, and thus jumps and oscillations disappear. However, in our method, in order to reconstruct the real densities more accurately, we consider the mode changes. Compared to the previous method, the biggest difference is that the jumps and the oscillations appear when the mode changes occur in the error curve for the state jump observer. The main reason is that, when the new mode is updated, the error system is oscillated repeatedly from the initial state until it converges again-this is the essential attribute of the real traffic network. This attribute cannot be eliminated and can only be weakened by the corresponding approach optimization. Although the oscillations appear when the mode changes occur, the error system can stabilize quickly by using our method, and it does not affect the accuracy of the results; this is also the advantage of our method.

Conclusions
In the paper, based on the hybrid dynamic traffic network model, a switched observer with state jumps was designed to achieve traffic density reconstruction and solve traffic density estimation and congestion identification. Considering the particularity of the switched system, multiple Lyapunov functions were applied-one for each mode. The S-Procedure method was also used in the design procedure of the observer, and the update of the estimated states mainly 16

Conclusions
In the paper, based on the hybrid dynamic traffic network model, a switched observer with state jumps was designed to achieve traffic density reconstruction and solve traffic density estimation and congestion identification. Considering the particularity of the switched system, multiple Lyapunov functions were applied-one for each mode. The S-Procedure method was also used in the design procedure of the observer, and the update of the estimated states mainly depended on the mode switching and the measured output. In order to verify the performance of the designed observer, the proposed method was applied on the Beijing Jingkai expressway, and the analysis results demonstrate that the proposed method was able to accurately estimate the traffic density. However, because the observer was designed for the central structure only, it is difficult to apply the observer to large scale expressway networks. From the view of practical application, the structure of distributed observers should be studied for large-scale traffic networks in future work.