Fault Detection Based on Parity Equations in Multiple Lane Road Car ‐ Following Models Using Bayesian Lane Change Estimation

using Bayesian


Introduction
Traffic congestion affects many cities around the world. The ITS (Intelligent Transportation Systems) concept is one of the main directions of research in transportation science. This concept ensures the incorporation of Internet of Things (IoT) technologies in traffic control and monitoring systems [1] through sensor networks and actuators [2,3]. Its main purposes are to reduce travel times and increase traffic volumes that can pass a crossroad during the green interval of traffic lights. IoT technologies have proven their capabilities on the V2X (vehicular-to-everything) communication concept implementation [4] and other smart systems [5,6] that ensure the proper functionality of connected vehicles [7]. An intelligent approach to evaluate and improve road traffic conditions should start from the perspective of traffic modeling, especially from an evaluation of driving behavior at the microscopic level [8,9]. The car-following model is probably the most widely used traffic model, as it provides an overview of microscopic traffic parameters and characterizes the behavior of vehicles in a specific lane.
The current paper started from the idea that the biggest disadvantage of the car-following model was its single-lane orientation, i.e., without incorporating relationships with vehicles in adjacent lanes, thus making it tough to perform lane change maneuvers and provide fault detection analyses in the case of a multiple lane car-following model. This work extends a previous approach of the authors of [10], where a new multiple lane car-following model that used Bayesian reasoning concepts in lane change behavior estimation was proposed. Here, the proposed modeling process is resumed and extended with an analysis of fault detection [11] using a method based on parity equations [12]. The chosen nominal model is a single-lane-oriented car-following model, referred to in this paper as a "standard" car-following model. This model was replicated in proportion to different numbers of lanes, with each lane's activity being managed separately, thus facilitating a comparison of the multiple-lane-oriented car-following model and the observed model. The fault analysis used nominal model outputs values and the outputs of the observed model assuming the presence of errors. The aim of the fault detection was to identify changes in the output and state variables values as a result of the proposed approach.

Background
A microscopic traffic analysis [9] gives information about the evolution of several parameters, such as velocity [13], acceleration [14] and vehicle trajectory [15,16]. These parameters characterize a vehicle's behavior as an individual and its relationship with other vehicles involved in the movement process. Furthermore, these parameters consist of the inputs of many developed car-following models [17][18][19]; the proposed models were calibrated [18] to reproduce real road traffic behavior.
Microscopic traffic parameters are changing, in many cases because of lane change actions [20] that introduce challenges in finding the most appropriate traffic model [21,22]. Lane change behavior is a critical point in autonomous driving projects, especially in the case of mixed traffic scenarios that include both autonomous and nonautonomous vehicles [23]. The type of vehicle is one of the most important factors in many cases. Small cars intended for regular passengers are highly influenced by heavy vehicles participating in the traffic process following their driver decisions by discouraging lane change actions [24]. This usually happens when a heavy vehicle is ahead on a one-lane road in the direction of movement. In this paper, only passenger vehicles will be taken into account and will be referred to simply as "cars" or "vehicles". This paper used the Bayesian reasoning concept to estimate lane change actions. This concept has proven its utility in optimization problems such as in increasing of the accuracy and speed of clustering algorithms designed for WSNs (wireless sensor networks), as stated in [25]. Another interesting use of the Bayesian approach is to attempt to identify malicious messages on CAN (controller area network) buses [26]. Attack detection is a big challenge for the automotive industry and connected cars projects.
Sensor networks are widely used in different domains, and very good approaches can be found in [27], where the authors proposed a multipurpose real-time decision platform to manage emergency cases and post disaster assessments, ensuring features like localization, the detection of damage and the identification of failures based on innovative concepts, such as the vibro-acoustic signature of a supervised asset. These sensors have problem-solving mechanisms like sensor failure detection and identification systems [28] that are required to validate the proposed sensor networkbased system. Referring strictly to transportation problems, inductive loops are the most widely used traffic detectors. There are many ways to identify the faults of these detection mechanisms, and it is important to consider the level of the used data: microscopic, mesoscopic or macroscopic [29]. The accuracy of data retrieved from inductive loops is crucial in avoiding some traffic monitoring and control faults. At the microscopic level, an interesting proposal from [30] of an eight-validation test cases suite succeeded in covering both single-and dual-loop cases by using the following: Another good proposal was made in [31], where the fault of inductive loops was detected by using FCD (floating-car data) as independent sources for vehicle travel speed estimations. The proof of this approach consisted of a microscopic traffic simulation that considered the residuals of a nonlinear regression model using inductive loop data and FCD estimated speeds. The researchers' aim was not only to present new fault detection approaches, but also to provide solutions for the automation of fault detection and diagnosis. In this regard, the proposal from [32] should be mentioned, as those authors discussed the automation of a multiple inductive loops detector system to detect open/short faults linked to the capacitive and inductive elements embedded in those sensors.
A fault in a system describes an unacceptable deviation from the standard behavior of at least one feature [11]. The system reaches a fault state after exceeding the threshold of the tolerance zone established for a fault value. To identify a fault in a monitored system, many methods can be used. Regarding systems where fault detection implies multiple signals, the process-model-based parity equations method is suitable [11]. The generation of the residuals requires three models: nominal, current (observed) and the faulty system [33]. The observed model is continuously compared with a nominal and a faulty model. This faulty model is the outcome of a fault analysis of the implementation of the nominal model.
A deep analysis of the fault diagnosis led to a special interest in diagnosing parametric faults [34]. In this regard, the design of parity equations and the isolation of faults should take into account possible system-specific additive and multiplicative faults [35]. The supervision of vehicle dynamics provided in [36] was a good example related to ITS; the fault detection algorithm described in that paper used bilinear parity relations to determine the alteration state of road surfaces, which is important in intelligent vehicle control and driving state monitoring.

Car-Following Model-General Overview
Road traffic analysis has three levels of abstraction: microscopic, mesoscopic and macroscopic. Microscopic traffic modeling and analysis can give a detailed overview of vehicle behavior, the evolution of queues at crossroads and interactions between vehicles.
As part of a traffic network system, a network loading model consists of four levels of representation: intersection configuration, links, lane choice and car-following [19,37]. The car-following model, probably the most well-known and widely used approach to traffic modeling, provides a microscopic traffic modeling perspective.

Concept Representation and Parameters of Interest
The car-following concept [19] consists of the analysis of the interaction between two vehicles and their behavior on a road network. The vehicle ahead, called LV (leader vehicle), and the other vehicle, named FV (follower vehicle), are the main actors in this modeling approach. The FV "follows" the LV's behavior and adapts its driving behavior accordingly, ensuring collision avoidance.
The main parameters of interest considered in this concept are vehicle position, velocity, acceleration/deceleration and the direction of movement.
In addition to the aforementioned parameters, other parameters that influence a vehicle's movement behavior, some of which depend on the vehicle characteristics, are presented in Figure 1a:  To better understand the influence of the car-following model parameters, Figure 1b illustrates the interaction of a LV and FV at time t -τ and t. The parameters of interest for the vehicle's movement behavior are:  x FV -running distance of FV during a τ interval of time;  x LV -running distance of LV during a τ interval of time;  s t -dynamic distance value between FV and LV at time t;  s t -τ -dynamic distance value between FV and LV at time t -τ.

Car-Following Model
Based on previous assumptions and on MIMO (multiple input multiple output) systems theory, a state space representation of the car-following concept is needed.
A good way to expand the research possibilities for car-following models and create a framework for new optimal control approaches for these models is to follow the next three steps:  create a linear continuous system model without time-delay;  add the time-delay factor to the model;  create a discrete model to control the behavior of FV and LV.
According to the listed steps, the obtainment of car-following models, as proposed in [38,39], is further presented. Using x 1 and x 3 as notations for car velocities, x 2 and x 4 for the running distances of the cars, and u 1 and u 2 for the car accelerations, the linear continuous car-following model can be described by system equations from Relation (2).
The standard safety distance S computation is done according to Relation (3) considering the vehicle average length L: To transform the previous equations to the classic form for MIMO state space representation from Relation (4), it is necessary to define x̄1 = x 3 -x 1 , x̄2 = x 4 -x 2 = s (s-is the dynamic distance between two cars) and ȳ = x̄2: where the vectors and matrixes are: In addition, we have A B controllable and A C observable; additionally the system eigenvalues are 0. To introduce the time-delay τ, we assume that u 1 = u 1 t and u 2 = u 2 t -τ . Introducing these notations in Relation (4) yields the linear continuous time-delay car-following model as follows: x̄ t = A⋅x̄ t + B⋅ u 1 t u 2 t-τ ȳ t = C⋅x̄ t (5) Considering that τ = λT, where T is the sampling period, Relation (6) is defined as: If we rewrite Relation (5) according to Relation (6), we obtain the following relation: If we consider t 0 = kT, t = k + 1 T in the state equation and t = kT in the output equation, we obtain the discrete car-following model, as in Relation (8).

Challenges in Car-Following Modeling
In car-following modeling, several situations when the FV and LV behavior can be influenced can appear. The most common is LV change. This situation usually occurs when a vehicle intends to start a lane change maneuver, or when a vehicle leaves the current road network using an exit point.
The challenges in these cases include the model of the deceleration process of neighboring vehicles, the acceleration of the vehicle that wants to change its current lane, respecting safe distances, the change of leader and follower roles and the switching of roles between FV and LV due to the LV's low velocity. All these can be better explained by using the lane change concept.

Lane Change Behavior Estimation
A lane change can be defined as the decision taken by a driver to change his/her current lane. This action can be observed as a process that usually occurs in two main cases. The first case is when the LV has low velocity and the FV changes lane only for a while, before returning to its previous lane. In this case, the only reason for the change is the driver's desire to move at a higher speed without changing his/her planned destination. The second case arises from issues like leaving the road network using an exit lane or possible future restrictions of lane changes that can influence the planned destination.
Based on previously explained situations, in a car-following model, the leader-change concept is a parameter. In all circumstances of lane changes, the LV is changed, even while switching roles between current LV and FV, or the introduction of a new LV from a new joined traffic lane.

Lane Change Process Modeling
For a better understanding of lane change behavior, Figure 2 shows all possible situations that can appear during this action for a road that has three lanes in the direction of movement. The relationships with the specific terms for car-following models are illustrated.   (Figure 2b). Similar to the previous situation, the driver can further choose to return to his/her previous lane or leave the road network if lane L i-1 is a right exit. We can see that in all presented situations, the new role of a vehicle is highlighted with an asterisk, notation further used also in the case of parameters to identify the parameter value after a role change. In addition to the classic lane change based on a possible decision taken by the driver to modify his/her initial itinerary, a lane change action taken only based on the low velocity of the LV is also possible.
As shown before, the vehicle that initiates the lane change maneuver influences the behavior of the two vehicles from the current and the target lanes [21]. To see that a lane change can lead to improvements in the individual local traffic situation of a driver, the incentive criterion was defined.
Consider the following notations for the accelerations of the vehicles involved in the FV L i lane change action: where a FV L i 2 represents the acceleration of the FV L i successor and assuming that we have symmetric lane changing rules, the incentive criterion is represented by Relation [21]: a driver + p⋅ a newfollower + a oldfollower > Δa th (10) where p is the politeness factor that denotes the total advantage of the two immediately affected neighboring vehicles, and Δa th is the switching threshold. According to driving rules established by legislation, some lane changes are forbidden. Here, we can reformulate the incentive criterion based on asymmetric passing rules defined according to the majority of European countries' traffic legislation [21].
For asymmetric passing rules, two forms of incentive criterion can be defined: where a k eur , k = FV L i * , FV L i are the accelerations adapted by the driver to the majority of European countries' traffic legislation and Δa bias is a constant representing the keep-right directive of the lane change rule. Another important criterion specific to this action is the safety criterion: the deceleration of the successor vehicle from target lane (FV L i+1 or FV L i-1 ) shall not exceed a given acceleration safe limit, as defined by Equation (13) [21]. a FV L j t + τ ≥ -a safe , j = i -1, i + 1 Lane change behavior can be measured by calculating the lane changing rate using the relation below [21]: where n is the number of lane changes during a Δt interval of time on a section of road with a length of Δx kilometers.

Bayesian Reasoning for Lane Change Estimation
A lane change action can be considered a process where the estimations can be done while assuming a high level of uncertainty. This arises because of driver decisions that are hard to predict or plan. The driver acts based on real-time traffic conditions to maximize his/her chances to obtain a lower travel cost and reach a planned destination on time. In addition, the driver lane change action is also influenced by other drivers through the politeness factor, as presented before.
After admitting the existence of a level of uncertainty, we can say that this lane change action is a Bayesian specific problem. Here, the main conditions for a successful lane change are: to have a driver decision to initiate the action and the contribution of neighboring drivers to help this action happen. Other factors that have important roles are the routing alternatives associated with a lane at a vehicle entry point on the road network and the previously established destination.
Below, we briefly present the Bayes probabilistic concept and our proposal of this concept application based on the previously mentioned assumptions.
Bayes systems estimate the probability of an upcoming event occurrence based on posterior probabilities, which comprise prior, available information related to the conditions that can influence our system's behavior. Briefly, Bayes' theorem can be expressed as Equation (15) [40,41]: posterior ∝ likelihood × prior (15) In Bayes theory, the probability of event x is expressed conditioned on the observed event y, according to Relation (17). The prior probability distribution obtained for p(x) uses previous knowledge data. The influence of observed event is represented by the conditional probability p(y|x), also known as the likelihood function. The form p(x|y) is called posterior probability, which can be used to establish the level of uncertainty in x after event y has been observed [40][41][42].
The probability of event y conditioned by a known event x can be defined as (17) [40,42,43].
Going further and considering x and y as independent events, the probability p(y,x) of event y conditioned by event x can be computed using Equation (18) [40,44].
Our proposed approach is to compute the probabilistic estimator of a lane change action as an intersection of five Bayes probabilities, according to Equation (19) and Figure 3. We can observe that lane L 1 offers the possibility to go straight or leave the road network using a right exit, while lane facilitates the driver's decision to leave the road network using a left exit. P e FV i denotes the probability of the FV which joined the traffic link using the entrance lane e L i , and P d FV i the probability that FV will leave the link using the exit (destination) lane d L i . Probability P v LV i shows the level of influence of the LV's velocity on the FV's lane change decision from lane L i . The significance of the other probabilities is related to the target lane probabilities associated with respect to FV and LV. Based on previous assumptions, p was defined as the total advantage of the two immediately affected neighboring vehicles. In this case, the politeness factor p L i→j can be defined as a product of the last two conditional probabilities from Equation (19): In this manner, Equation (19) becomes: By expanding Equation (21) according to Bayes rule, we obtain: After estimating the probability of a lane change action based on the probabilities from previous road networks crossings, it is necessary to introduce new notations, similar to the approach presented in [40]. Lowercase notations will be used to represent the probabilities computed based on previous traffic data: By replacing these notations in Equation (24), we can obtain the final form of estimated probability of a lane change action from lanes i to j: Our approach also consists of modifications into lane changing rules. Furthermore, the relations that define these rules are as follows:


incentive criterion for symmetric lane changing rules: a driver + P L j ⋅ a newfollower + a oldfollower > Δa th , j = i -1, i + 1  incentive criterion for asymmetric lane changing rules-lane change from left to right: a FV L i * eur t + τa FV L i t + P L j ⋅a oldfollower > Δa th -Δa bias , j = i -1, i + 1 (26)  incentive criterion for asymmetric lane changing rules-lane change from right to left: a FV L i * t + τa FV L i eur t + P L j ⋅a newfollower > Δa th + Δa bias , j = i -1, i + 1 Considering the likelihood of initiating a lane change maneuver by driver c, the probabilities computed based on previous data and using Equation (24) offer the lane with the highest probability to be chosen by that driver from lane L i . The driver decision c to perform a lane change maneuver is computed according to Equation (28), and its meaning can be summarized as the probability of not choosing lane L i :

Car-Following Model for Multiple Lane Road
The acceleration and other parameters, like velocity and running distance for the target vehicle, are updated according to the specific rules of lane change actions. If there is not a driver decision for a lane change maneuver, the model behaves as a standard car-following model without incorporating the lane change rules into the vehicle behavior description.

Fault Detection using Parity Equations
The residual computation starts from the discrete car-following model described by Equation (7), and follows the process described by [12,45]. A system works correctly only if the residuals are equal to zero, i.e., a nonzero residual may demonstrate a functional fault in the studied system [12,45]. The general relation that can define the computation for the q th (q ≤ m) sampled output of the car-following model is: In case of a time window of length q + 1 and shifted by q backwards, the equation becomes: where vectors Y[k] and U[k] are: and the matrixes M and Q have the following values: As the state vector x 1 k -q x k -q is unknown, the Relation (30) is multiplied by a vector w T [12]: The residual r[k] computation, that represents the parity signal, is described below, using the defined matrixes by Equations (32) and (33) as follows: where u 1 and u 2 are permanently updated considering the incentive criteria defined by Equations

Experiment and Results
This section presents the results of the proposed multiple-lane car-following model in comparison with a separate, standard car-following model for each lane, as well as the fault detection results. Additionally, this section provides the implementation details and the input data used for the experiment. The purpose is to show that the proposed multiple-lane model is able to detect a lanechange maneuver and can change the model parameters accordingly. For this reason, each figure also shows the driver's decision regarding a possible lane. The second part of this section presents the evolution of the residual values, which was based upon an analysis of the impact of possible faults on the system inputs.

Input Data
To show the practical application of the fault detection method based on parity equations, we present a case study for a three-lane road in Timisoara, Romania. Figure 5 illustrates a real map of the studied section of road and its lane configuration. The simulation used the data from Table 1 as inputs. The table defines the velocities for the studied lanes and the probabilities of lane choice behavior. The number of vehicles considered in the probability and velocity computation consisted of raw data retrieved from inductive loops placed on the road network. The simulation applied a derivative for velocities to obtain the acceleration values as a first step, and further application led to the implementation of our proposal, as described in [10].

. Simulation Model
To perform fault detection based on parity equations for the multiple-lane car-following model, a simulation was done in Simulink, part of MATLAB R2020a (MathWorks, Natick, MA, USA). Usually, the fault detection considers three types of models: nominal, observed, and the model with a defect. This paper assumed that the observed model had already incorporated faults as a result of the proposed computational approach. In this case, the implementation consisted of two main types of subsystems, as shown in Figure 6: three separate blocks for the standard implementation of a carfollowing model, consisting of the nominal model (orange); and the proposed model for multiplelane car-following, consisting of the observed model (blue). The transformation of velocity into acceleration is covered by the input handler subsystem, shown in Figure 7. Here, a discrete-time derivative block was applied to the raw velocity data to transform them in acceleration data, ensuring the functionality of the previously presented blocks.  The main outputs of this block are the LV and FV velocities and running distances, that are further used as input for the computation of the residuals. In the Simulink implementation, the residuals were the difference between the output of the standard carfollowing model block and the outputs from the proposed multiple-lane car-following model. It is necessary to mention that the standard safety distance S computation was done for both models according to Equation (2) [39] and assuming that the vehicle average length L for passenger vehicles was L = 4.50 m. The subsystem shown in Figure 9 covers the residual computation. The outputs are the relative_velocity_residual and dynamic_distance_residual, and consist of the differences between the values of x 1 and x 2 obtained from Equation (34) by using the nominal model and the observed model with faults introduced by the computation approach. To simplify the obtained results, Table A1 describes the mapping between the models defined in this paper and the signals used as simulations. Some of the internal states were passed as outputs from the subsystems for the creation of graphics. The table sets the parameter type based on the statespace representation concept. Figure 10 shows the acceleration profiles and the internal update of the acceleration values for LV and FV after c is greater or lower than the threshold. The threshold value was set to 0.50 and showed a greater than 50% chance of changing lanes. In this case, the simulated values for LV and FV were set to the calculated values, taking Equation (26)   Changing acceleration values also implies a change of velocity. Figure 11 shows an overview of the velocity values for all lanes, and incorporates a velocity change after a lane change maneuver. Here, the outputs from both the standard car-following model and the proposed approach can be seen.

Fault Analysis
The fault analysis created an overview of the evolution of two residuals, i.e., relative velocity and dynamic distance, based on the movement in lane L i . Figure 13 depicts the influence of the lane change actions on the velocity and distance computation using the multiple-lane car-following model. The proposed model introduces faults when driver decision c has a low degree of uncertainty (i.e., c is near the 0.50 threshold with ± 0.10). In other cases, when the driver decision is not affected by this low level of uncertainty, the relative velocity residual tends to zero. The dynamic distance residual has a continuous increasing trend based on the same pattern, and its value remains relatively constant in the absence of a low level of uncertainty.

Conclusions
This paper shows a multiple-lane car-following approach that allows the introduction of a new vehicle into a specific lane, and ensures the update of traffic parameters for an LV and a new FV. It should be noted that is a new car-following model that incorporates the behavior between the vehicles from the current and adjacent lanes. A fault detection analysis based on parity equations was performed for the proposed model.
The paper starts with a summary of current related works on microscopic traffic analysis, traffic parameters estimation methods, sensor networks applications and system fault detection.
Overviews of other car-following modeling approaches, lane change behavior estimation and fault detection using parity equations were mandatory for the creation of a new model that can adapt to multiple-lane roads.
The proposed model uses Bayesian probabilities as inputs to simulate driver decisions to initiating a lane change maneuver. The accelerations of LV and FV adapt according to these probabilities in the case of a lane change action taking place. This change of values also ensures compliance with the incentive criteria defined for lane changes.
Assuming that the proposed model introduces defects through the computational process, fault detection using parity equations is performed by adapting the general equations to our car-following model. The result of this fault detection consists of two residuals: that of relative velocity between LV and FV from the current lane, and that of the residual dynamic distance between LV and FV from the current lane without considering standard safety distance S.
The proposed model implementation using Simulink (MATLAB R2020a) proved the expected features. The simulation used data from a local traffic monitoring center as inputs and succeeded in showing the integration of a lane change action in a multiple-lane car-following model by modifying the rest of the traffic parameters accordingly. The paper presents, through the evolution of the residual values, an overview of the faults introduced by the proposed approach. The analysis showed that driver decision uncertainty represents the main source of faults.
The main drawback of the proposed approach is that it currently only shows the behavior of the