A Monitoring Approach Based on Fuzzy Stochastic P-Timed Petri Nets of a Railway Transport Network

the


Introduction
Railway industry plays a critical role in transportation and transit systems attributed to the ever-growing demand for catering to both freight and passengers. However, owing to many challenges faced by railway stations such as harsh environments, traffic flow, safety, and security risks, new and adaptive systems employing new technology are recommended [1].
In the railway transport system, the processing times are interval-valued with parameters that depend on the operation to be performed. Any deviations from the specified interval will characterize a traffic disturbance. Consequently, the monitoring of the time intervals will be used as the main principle to detect and isolate the disturbances that affect the system. e system that motivated this study is a real railway transport network in Tunisia.
To reduce road congestion in urban areas, railway networks are coming under increasing strain. In Tunisia, integrity rail services are operated in many metropolitan areas but most notably in the Tunisian Sahel region.
Safety is of critical concern, particularly given the recent high-profile rail accidents featured in the media. e metro derailment, which happened near Sahline, 10 km south of Sousse, is especially relevant (numerous injured passengers). e inquiry commission determined that the accident resulted from failure of the railroad switch, holding the maintenance company responsible for the failure. In this context, it is essential to develop a supervision approach allowing to avoid catastrophic scenarios and to further rail safety.
Our study is devoted to the modeling and monitoring of the Tunisia railway transport networks by using stochastic P-timed Petri nets in order to control traffic and to avoid disruptions problems. e approach proposed in this paper is based on a statistical analysis of the real measurements, collected by the Supervisory Control and Data Acquisition (SCADA) system of the Tunisian National Railway Company (TNRC), to identify the time parameters of the stochastic P-timed Petri net (SP-TPN) model. In particular, the approach determines the dynamic time intervals associated with the places of the SP-TPN and the resulting probability density functions (PDF) of the travelling and parking times.
e main objectives are to analyze the traffic conditions by simulation and to monitor the traffic by avoiding possible troubles and perturbations.
Our study concerns the Tunisian railway transport system, particularly, in the Tunisian Sahel region. is system must respond to different requirements, minimizing the waiting times in the stations, respecting schedules, and ensuring the safety of passengers and equipment. In our previous works [2], synchronized Petri nets (P-TPNs) are used to model railway transport systems. In this way, the modeling process is greatly simplified, and the complexity of the model is widely reduced. In [2], an identification of the P-TPN model of the Sahel railway network in Tunisia was made. e objective was to identify the temporal parameters of the model from a set of real measurements collected by the SCADA system of TNRC. e contributions of the present paper are as follows: (i) e improvement of the time semantic of the railway network model with the introduction of the stochastic P-timed Petri nets (SP-TPNs) (ii) A new supervision approach, based on the study of effective sojourn time of the token in places and the evaluation of the probability density functions (PDF) of the travelling times, is proposed. is approach is used to evaluate the influence of different types of disturbances on the expected schedule.
is paper is organized as follows. Section 2 presents the state of the art. Section 3 presents the studied railway transport system and the SP-TPN model of the railway network of the Sahel Tunisia. Afterward, the problem of monitoring of railway transport networks is tackled. An original supervision approach based recovery approach based on stochastic P-timed Petri nets is presented.
In Section 5, an application of the developed monitoring approach to realistic railway is proposed. Finally, a conclusion is presented with some perspectives.

State of the Art
Railway transport systems must be monitored online to avoid situations that may be critical because of disturbances. ese disturbances can affect the railway infrastructure or traffic management, and that they can lead to a degradation of the transport service. e general objective is to maintain the stability of the railway network and make it more efficient and secure. In this context, various research projects were conducted on the monitoring of transportation systems to save time and improve the quality of rail service [3][4][5][6][7][8][9].
Among many related research studies, Bennet et al. [10] propose an identification of the critical factors that should be considered in the design of a wireless sensor network, including the availability of electrical power and communications networks in railway transport. Various issues facing underground deployment of wireless sensor are discussed, in particular, for two-field case studies involving networks deployed for structural monitoring in the Prague Metro and the London Underground.
In [1], the authors present a review of wireless sensor networks (WSNs) that have been designed for use in monitoring and securing railway stations. Several WSNs applications are proposed for use in railway station systems, including advanced WSNs, which will enhance security, safety, and decision-making processes to achieve more costeffective management in railway stations, as well as the development of integrated systems. e authors demonstrate that the size, efficiency, and cost of WSNs are influential factors that attract the railway industry to adopt these devices.
Kulbovskyi et al. [11] propose a new monitoring approach for a power supply network system. e proposed monitoring model shows information chains between system components and their object, generalized structure of original data flow-over, particulrly, controlling decisions and external effects within the information and computer system. In order to identify emergency and abnormal operating regimes of electrical networks in real-time mode, an application to railway power supply network was proposed. e development of algorithms for detecting failures in railway catenary support components was proposed by Liu et al. [12]. In this context, virtual reality technology is employed to control the learning environment of convolutional neural networks (CNNs) for the automatic multicamera-based monitoring of catenary support components. First, 3D image data based on drawings and reallife video images are developed. en, a virtual reality environment for monitoring the railway catenary support system is created, emulating real-life conditions such as measurement noise and a multicamera train simulation to resemble state-of-the-art monitoring systems.
On the other hand, Mishra [13] proposed an anticollision system named "TMCAS" (train monitoring and collision avoidance system) that uses a protocol to share and exchange position, speed, and the signal at danger information between trains and central control room. TMCAS aims to automate train operations and act as a safety enhancement system by ensuring speed control, rear-end and head-on collision avoidance, and signal-at-danger avoidance.
Some other works are interested in the online monitoring of railway traffic in presence of unpredictable events. Pinto et al. [14] presents a contactless system to measure track displacements and its application in an embankment/ underpass transition zone, located on the Northern line of the Portuguese railway network where the Alfa Pendular tilting train travels at a maximum speed of 220 km/h. e system is based on a diode laser module and a position sensitive detector (PSD). e PSD receives the laser beam emission, and the detection of the center of gravity of the beam spotlight on the PSD area enables the calculation of the displacement. e optical measuring system proved to be an efficient and flexible way to measure absolute and relative rail displacements in the field, enabling the detection of track deformability differences along the transition zone. e work presented by Ciampoli et al. [15] reports on the experimental activities carried out on a test-site area within a railway depot in Rome, Italy. In particular, combinations of varying scenarios of fragmentation and fouling of the ballast were reproduced. e setup was then investigated using different multifrequency of ground penetrating radar (GPR) horn antenna systems. ese were towed along the rail sections by means of a dedicated railway cart. Interpretation of the preliminary results has shown viability of the GPR method in detecting signs of decay at the network scale, thereby proving this technique to be worthy for implementation in monitoring systems.
To ensure the safety of railway operations and reduce the maintenance costs, a satellite synthetic aperture radar (InSAR) system is presented by Wang et al. [16]. e proposed InSAR provides a potential solution for a consecutive structural health monitoring of transition zones with bi-/triweekly data update and mm-level precision. To demonstrate the feasibility of the InSAR system for monitoring transition zones, a transition zone is tested. e results show that the differential settlement in the transition zone and the settlement rate can be observed and detected by the InSAR measurements.
All previous works are different from our work. In our article, a new supervision approach allows to recognize abnormal behaviors and traffic disturbances with the cooperation of the sojourn time and the probability density functions (PDF) associated with the travelling times. To the best of our knowledge, such monitoring approach has been never formalized for railway transport networks.

Presentation.
e railway line of the Sahel Tunisia ensures the transportation of passengers and connects the main cities and agglomerations in the Sahel Tunisia from Sousse to Mahdia. is metro line is 70 km long, and it is totally electrified. e trains that run on the line make the ride several times a day between 5 : 00 and 22 : 00, in an average duration of 1h 30 minutes: 30 minutes between Sousse and Monastir and 1 hour between Monastir and Mahdia. It ensures the transport of more than 10 million passengers per year with an average traffic of 27 000 passengers per day. Figure

Modeling of the Studied Railway Network by Stochastic
P-Timed Petri Nets. Stochastic P-timed Petri nets (SP-TPNs) are a convenient tool to model the railway transportation networks with uncertainties and disturbances. SP-TPNs are a subclass of timed Petri nets where stochastic durations are associated with the places of the net [17][18][19]. In the considered application, the sojourn duration q i in each place p i represents either the stop at a station or the duration required to travel through a segment of the railway network. Such a duration has an expected value (qe i ) computed in order to satisfy the planned scheduled. Formally, SP-TPN models are inspired from Khansa et al. [20] and defined as follows: Definition 1 (see [20]). A SP-TPN system is a triplet < R, IS, IR>, where (i) R is a Petri net system is the dynamical interval associated to the place p i IS i defines the static interval of staying time of a mark in the place p i belonging to the set of places P (Q + is the set of positive rational numbers). A mark in the place p i is taken into account in transition validation when it has stayed in p i at least a duration a i and no longer than b i . After the duration b i , the token will be dead.
In the railway network, each parking and travelling operation is associated with a time interval ([ai, bi] with u.t (unit time)). Its lower bound indicates the minimum time needed to travelling, and the upper bound sets the maximum time not to exceed in order to avoid the traffic disturbances. Consequently, SP-TPNs have the capability of modeling time intervals and deducing a set of scenarios, when time constraints are violated.

A Stochastic P-Timed Petri Net Model of the Railway
Network.
e objective of the SP-TPN modeling of the transportation networks is to obtain a usable representation of the network to analyze the system and improve its performance.
e Sahel railway network is composed of three terminals stations (Mahdia, Monastir, and Sousse) and 28 stations: 20 stations between Mahdia and Monastir and 8 stations between Monastir and Sousse. At the beginning of the day, it is assumed that four trains start at Mahdia station, and 2 others are stationed at Sousse station. Figure 2 shows the SP-TPN model for the Sahel railway network. e places P 127 , P 128 , P 129 , P 130 , P 131 , and P 132 are source places initially marked to represent the parking of the trains. e static intervals associated with these places are: IS  e displacement of the tokens represents the circulation of the trains on the railway. e whole model has 238 places and 126 transitions and more than 100 000 states because 6 trains are assumed to be simultaneously in circulation (this is the true situation in the considered railway network).
A specific module for bidirectional segments is detailed in [2] and used in Figures 2 and Figure 3. e sojourn duration q i in each place p i represents either the travelling time between station or the parking times in stations. Such duration has an expected value (q ie ) which should be computed in order to satisfy the planned schedule.  Table 1. e static intervals are defined based on the TNRC traffic dataset. Figure 4 shows a part of the SP-TPN modeling a single directional segment. In the graph, (i) e filled red places represent the stations (ii) e empty white places represent the paths between two stations (iii) e presence of a token at a place represents a train movement

A Model of a Single Directional Segment.
Other places (places P 185 and P 186 ) ( Figure 5) have been added to avoid the catching-up between two metros: if metro "M1" parks at a station P75, the latter cannot be caught by metro "M2," since the crossing of the transition T76 is conditioned by the presence of two tokens, respectively, at places P186 and P75.

Uncertainty in Railway Network
e railway traffic is subject to many uncertainties arising from the travelling and staying time in stations. All authors, who treated uncertainties, studied mainly two disturbances: disturbances on the equipment (metro, train, traffic lights, security barrier etc.) or the disturbances concerning travelling durations and, more particularly, the changes in staying and travelling times. For all these reasons, two functions of possibilities representing uncertainty over the effective residence time (q i ) of a token in a place p i and uncertainty on travelling time are proposed. ese functions make it possible to highlight traffic disturbances and help the human agent in charge of detecting perturbations and deciding reconfiguration actions.

Uncertainty on Travelling Time.
e proposed approach is based on the analysis of the measured behavior (departure times of the trains at the stations) and expected schedule. From a sequence of experimental measurements observed during the operation of the Sahel rail transport system, the goal is to build a complete SP-TPN model capable of reproducing the observed behavior of the railway traffic. For this purpose, the measured times will be used to determine the dynamic intervals and the sojourn times for each place of the SP-TPN.

Collected Data from the TNRC Company.
To identify the parameters of the SP-TPN model, a set of real data is considered (see Table 2), that concerns the circulation of trains from Mahdia to Sousse and from Sousse to Mahdia on the Sahel railway network, during the month of June 2019. e measurements have been recorded by the SCADA of the TNRC company.
e SCADA system allows to control traffic, monitor, process real time, and record events.
From an experimental point of view, at the end of each operation, the current real-time value is collected and stored in TNRC database. e identification of model parameters is based on a set of vectors showing the planned and measured metro departure times at each station. All data and measurements are reported in Table 2.

Computation of the Parking and Travelling
Times. e identification process aims to calculate the durations between the stations. For this purpose, the duration between the departure times in two successive stations is first computed: Each duration D(k) is decomposed into two times: the parking time at station and the travelling time between the stations. One difficulty is that the SCADA does not collect separately these two times.
us, the parking times have been estimated based on the expert knowledge of the     Table 3 illustrates an example:

Determination of the Duration Probability Density
Functions. For each segment, the computation of the series of travelling and parking times during a period of several days leads to a collection of values that can be used to build a stochastic model of the time behavior at the considered segment. In particular, we are interested in computing the probability density functions (PDF) of the travelling times, and then estimating the characteristic time parameters of the SP-TPN model (i.e., the IR dynamical intervals). e histograms of the collected values are computed. e parameters α i and β i correspond to the limit values of these histograms. e shape of the PDF is determined from the histogram. ree types of PDF are considered for travelling time: triangular, exponential, or uniform PDF. Figures 6 and  7 illustrate three particular segments with PDF of different types. For parking times, only the uniform PDF has been considered based on the knowledge of the operators. e triangular probability density functions (PDF) is considered as fuzzy number. Indeed, the PDF is a continuous variable restricted to a distribution function μ(PDF), which satisfies the following assumptions: e effective sojourn duration q i differs from the expected duration qe i depending on the disturbances Ω that occur in the network: e probability density function of the sojourn time q i is assumed to be known. Next, uniform probability density functions will be considered (Figure 8), but any other function can be considered.

A Graphical Representation of Effective Sojourn Time
Uncertainty. In rail transport networks, by analyzing the time constraints (static intervals of the SP-TPN), which represent the travel and parking times, it seems practical to provide an intermediate state between the normal and failure behavior, by providing a tolerance interval located chronologically after the proper functioning interval. In the transport system, the time travel is specific to a given situation. erefore, the system is in normal operating mode, if the travel duration "T" is in the interval noted I T , Figure 9. e mode is qualified as degraded, if the travel duration belongs to the interval J T (I T ≠ J T ). If the travelling time exceeds the upper bound T m c , the system is considered as faulty. As shown in Figure 9, for each travelling and staying times, three time values are defined:   (Figure 9). In order to quantify the set of possible duration q i , a graphical representation is proposed (Figure 10). e possibility that a time constraint is satisfied belongs to the interval [0, 1]. Consequently, the verification of time constraints can be considered as fuzzy numbers represented by fuzzy membership functions ( Figure 10). ese results ( Figure 10) make it possible to highlight zones of certainty for travelling durations; a high value of effective sojourn time (q i ∈ I T ) can guarantee a normal behavior of the transport monitored system, and there are no traffic disturbances. Instead, a low value (q i ∈ J T ∪ ] T m c , + ∞ implies the possibility of detecting behavioral deviation. Based on the fuzzy model (Figure 10), all system scenarios are developed. e scenarios consider all possible deviations. en, from the fuzzy model, it is possible to deduce a set of scenarios (events sequences) bringing the system to erroneous situations.

Monitoring of the Sahel Railway Network
5.1. Introduction. In railway transport system, traffic disturbances will occur if the degradation level exceeds the permissible value. erefore, monitoring represents all the means implemented (manual or automatic operations, steps, functions, and mechanisms) intended to observe the state of an entity (online and in real time) in order to deal with the vagaries of the system during the operating phase. e role of a monitoring system is to know the state of the process, to provide validated data to the control system, and to improve the availability and safety of the process.
Two types of monitoring can be distinguished: operating system and control monitoring.
e operating system monitoring can be broken down into two types: curative and predictive monitoring (Figure 11). e monitoring of the operating system is responsible for monitoring process failures which are classified into two categories: cataleptic failures (sudden and complete) failures and progressive failures ( Figure 11).

Monitoring Principle.
In the studied transport system, the monitoring is based on the control object technique. e control objects can be connected to the places of SP-TPN model of the Sahel railway network and can, respectively, be applied to perform checking and validation of the   Journal of Advanced Transportation        To restrict the maximum and the minimum time periods, allowed for a particular travelling operation, and Watch-dog control objects can be utilized for the purpose. In this case, if the time restrictions are violated (travelling and staying times), the considered control system is capable to generate an immediate reaction (similar to the alarm cases).

Constraint Violation and Monitoring
Task. In the transport system, the fuzzy models associated with effective sojourn time (q i ) and the probability density functions (PDF) monitor the system evolutions through the time duration verification (travelling and staying times). ese durations represent interval constraints. When the interval constraints are exceeded, there is an error.
An error is defined as a discrepancy between observed or measured value and the true or theoretically correct value or condition. In our study, error means a gap between measured and computed time intervals by the scheduling task.
Based on the above statements, error is sometimes referred to as an incipient failure. erefore, monitoring action is taken when the system is still in an error condition, i.e., within acceptable deviation and before failure occurs.
us, this study employs uncertainty of sojourn time and probability density function of the travelling times in order to perform early railway traffic disturbances.

Stochastic Fuzzy Petri Nets for Monitoring (SFPNM).
Much of development works has been undertaken in certain of the monitoring fields. Monitoring tools have been researched, and their application to failure prevention is well reviewed. Each input and output places of the proposed SFPNM are associated with a fuzzy description. For the input places, we describe sojourn time of a mark in places and probability density functions (PDF) of the travelling times (Figure 12), whereas the output variables represent the monitoring task. ese actions can be slow, normal, or urgent. In SFPNM, the transitions represent rules in which antecedent propositions implicate consequent propositions, Figure 12. Each rule "F w " is associated with a certainty factor, which describes the confidence level of the rule.

Illustrative Example
In order to help the supervisor in charge of managing the studied railway networks; i.e., detecting traffic perturbations, alerting travelers' claims, and maintaining stability and security of the networks, a monitoring task is needed. is section presents an application of the monitoring approach to the railway network between Mahdia and Faculty station ( Figure 13).
Let us suppose that we want to supervise the duration between the two events e 1 (metro arrival at Faculty station: place p 6 ) and e 2 (departure from Mahdia station: place p 1 ) ( Figure 13). In the studied railway networks, every sensor provides useful information as events. To monitor this duration, it is necessary to check the time constraint linking the occurrences of the two events e 1 and e 2 . is timing constraint is a global one; therefore, the verification of this constraint can be done through the measure of the travelling time between station and parking time of a metro in stations. As long as these durations are included in the mentioned intervals, no disturbance is detected. Otherwise, a traffic disturbance is detected. e global constraint "C" to compute is an interval constraint defined as T m min ≤ C ≤ T m max with the following: According to the time intervals (Figure 13), the minimum time (T m min ) of the journey between Mahdia and Faculty is 756 s, whereas the maximum time (T m max ) is 984 s. Let us suppose a late departure of the metro from Mahdia station (departure at 05 : 26 : 48, see Table 2). is delay disturbance Φ1 (Φ �108 s) occurred in p0 may involve an illegal behavior and can lead to a degraded service ( Figure 14). In fact, according to Figure 14, we deduce that the possibility of railway traffic delay is 0.59 (possibility of violation of the global constraint C). is delay can affect the stability of the studied railway network: according to Table 2, the metro arrives in the Faculty station with a delay Φ2 equal to 84 s (planned arrival time 05 : 35 : 00/measured arrival time at 05 : 36 : 24). e computation of the series of travelling and staying times between Mahdia and Faculty station, during a period of several days (from October to November 2020), leads to build probability density functions (PDF) of the travelling times at the considered segment ( Figure 14). e probability density calculation permits to verify at each iteration that the time constraints are respected during several days. e PDF also makes it possible to check the time constraints linking the occurrences of the two events and enable detecting disruptions when these constraints are violated. e histograms of the collected values allow to built triangular probability density functions (PDF) which can be considered as a fuzzy number (Figures 15(a) and 15(b)). e parameters α i and β i correspond to the limit values of these histograms.     3 Critical e mission of the proposed SFPNM associated with the Sahel railway network ( Figure 16) is to modify the control models, activate urgent procedures, and decide about the selective monitoring task. ese monitoring actions can be slow, normal, urgent, predictive, or curative. e full set of linguistic variables associated with each input membership is summarized in Table 4.
Similarly, Table 5 shows linguistic variables associated with the output "monitoring action." To demonstrate the effectiveness and accuracy of the monitoring approach, an example with three fuzzy rules is outlined. Consider the following fuzzy rules: , then an urgent monitoring action is required (iv) Each rule use the operator "AND" in the premise, and since it is an AND operation, the minimum criterion is used (Mamdani inference method), and the fuzzy outputs corresponding to these rules are represented in Figure 17. (v) Next, we perform defuzzification to convert our fuzzy outputs to a single number (crisp output); various defuzzification methods were explored; the best one for this particular application: the Center of Area (COA) defuzzifier; according to the COA method, the weighted strengths of each output member function are multiplied by their respective output membership function center points and summed; finally, this area is divided by the sum of the weighted member function strengths, and the result is taken as the crisp outputs In practice there are two fuzzy outputs to defuzzify (operating system or control monitoring). Analyzing the data, it is noted that the appropriate task is operating system monitoring.

Remarks
is monitoring approach can be applied to any discrete event system integrating time constraints (urban, maritime, rail transport networks, manufacturing system with time constraints, etc.). e proposed surveillance approach would lead to more efficient inspection routines and directed anticipatory maintenance trips.
Certainly the approach can be applied to other networks, but it does not cover three aspects: (i) e first is the progression of faults: it is not easy to define, extract, or "quantity" damage; but it may be worthwhile to consider the history of maintenance on a point and other relevant facts. (ii) e second aspect is the deterioration process. It is not possible to wait until the component deteriorates to an unrepairable status because it may be very unsafe when it is working in this condition. Hence, it would be better to repair or replace the components before its deterioration.

Conclusion
In this paper, we have proposed a stochastic fuzzy Petri net for monitoring. e new supervision approach is based on the study of effective sojourn time of the token in places and the evaluation of the probability density functions (PDF) of the travelling times. Abnormal behaviors and traffic disturbances are recognized with the cooperation of the sojourn time and PDF and not due to a simple detection based on isolated sites. Our study makes the assumption that the supervised system is modeled by stochastic timed Petri nets. e proposed SFPNM is able to integrate uncertainty on sojourn time and probability density functions (PDF) of the travelling times related to a base of fuzzy logic rules. e paper proposes an application of the developed monitoring approach to the realistic railway network. e proposed monitoring model has a double interface, one with the modeling model system and the second one with the behavioral model.
Simulation results of the case study of a part of the Tunisian railway network show that monitoring approach is able to modify the control models, activate urgent procedures, and decide about the selective monitoring task. is monitoring task is based on time constraint verification performed with a probability density function. e results obtained in the illustrative example are promising. ey show that the proposed approach improves the prevention of temporal disruption, traffic management by performing an early detection, and can be used to evaluate the influence of different types of disturbances on the expected schedule.

Suggested Further Work.
It is interesting as further research to incorporate the issues of maintenance and repair strategies into the fuzzy probabilistic approach to compute a modified maintenance cost. e development of operating and monitoring algorithms and their implementation on a PLC seems interesting for this rail transport application.
In the railway networks, the travelling times should be within two bounds. Any deviations (occurrence of a temporal disturbance) from the allowed lower (resp., upper) bounds will lead to a low service quality and can lead to disaster scenarios. e proposed monitoring approach have been validated and verified by the real data provided by TNRC which manages the Sahel railway networks.
In this context, we are in the process of developing with the engineers of the railway company a platform (dashboard) allowing the supervision and the selection in real time of the most appropriate maintenance strategy. e developed dashboard permits real-time data display and allows the supervisor to control the train locomotion through a graphical interface. e first test demonstrates that the surveillance approach has the potential to react in real time in order to avoid catastrophic scenarios and to further improve rail safety.
Other perspective of this work is to develop maintenance scheduling. Scheduling involves the allocation of resources to tasks over time subject to temporal and capacity constraints. e notion of maintenance scheduling in railway transport networks refers to the assignment of resources to a task in one or several connected discrete time intervals and a decision-making process with the objective of optimizing one or more targets. In this context, it is interesting to develop a static insertion policy. is procedure allows us to insert the projected maintenance jobs in periods of machine availability, without changing the initial scheduling solution jobs.
is method of integration can also integrate unforeseen and urgent recovery job.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that they have no conflicts of interest.