A Novel Approach for Reducing Train Localization Errors by Inertial Measurements

The effectiveness of current railway signaling systems heavily depends on the accuracy in the localization of trains on the track, which is currently enforced using static markers mounted along the line, called balises. However, balises are expensive, sparse, prone to tampering, and subject to maintenance, hence they need to be integrated by additional onboard sensors. Also, the harsh operational environment and the strict safety regulation do not allow a straightforward adoption of solutions from other application domains, like the GNSS in automotive systems. Hence, finding novel cost-effective solutions to improve the localization accuracy is an emerging research topic in modern railway systems. Low-cost inertial sensors provide the required level of availability and thus represent a viable approach to integrate physical balises, but they need to be coupled with a rigorous methodology for integrating the inertial data with the track geometry features extracted from a digital railway map. This paper presents a novel methodology for exploiting inertial data in train localization. It is based on a two-phase approach: in an offline phase, track data from the digital map are analyzed to extract a number of features (curves, switches, slopes, etc.) that are stored in the map as position markers; at run time, such markers are detected by analyzing the inertial data and matched with those stored in the map. Such a marker matching allows reducing odometry errors by a significant extent. Preliminary experiments on synthetic and real data show the effectiveness of the proposed approach in enhancing train odometry.


I. INTRODUCTION
An accurate train localization is of paramount importance for ensuring safety and efficiency of the railway network. Today, the absolute position of a train along the track is determined by using radio-frequency transponders, called balises, installed along the track at predefined locations with a given accuracy (for instance, in Italy the balise location accuracy has been set to be no higher than ±5 meters) [1]. Between consecutive balises, the position of the train is estimated by an odometry system, which typically integrates the speed measured by a set of encoders installed on the train wheels. Due to the integration operation, the relative position (with The associate editor coordinating the review of this manuscript and approving it for publication was Jesus Felez . respect to the last passed balise) estimated by odometry can be affected by a significant drift. Such a drift depends on several reasons, among which wheel wearing and slip/slide phenomena caused by different environmental conditions; for example, the adhesion factor between a wheel and the rail depends on the quantity and type of debris, as snow, ice, and various slippery materials.
To account for the drift introduced by the odometry, the European Train Control System (ETCS) performance requirements for interoperability [2] state that, for every measured distance s from the last passed balise, the accuracy on the measured distance shall be better or equal to ±(5m+5%s). Figure 1 shows an example in which a train with a distance s from the last passed balise accumulates a worst-case relative position error = (5 + 0.05s), meaning that its length L has to be increased by 2 , considering both the effect on the front end and the one on the rear end and an equal contribution from under-reading and over-reading errors in the measured distance s. The accumulated position error has the effect of increasing the length of track segment occupied by the train, thus reducing the capacity of the railway system in terms of number of trains that can occupy the line simultaneously, that is, the efficiency of the whole signalling system. It is worth observing that increasing the number of balises to reduce the position error would significantly affect the overall cost of the line, also considering that balises are typically installed in groups for safety and availability reasons and are subject to frequent maintenance, due to wearing or tampering.
For the reasons discussed above, in the recent years, especially with the need of improving the capacity of railway lines, accurate and precise train position functions became an emerging research topic, and many research projects [3], [4] were launched to investigate enhancements of the odometry function.
However, most of the solutions proposed in the literature focused on improving the localization accuracy by integrating wheel odometry with other sensors, as Global Navigation Satellite System (GNSS) [5] and Inertial Measuring Unit (IMU). However, both of these sensors have their shortcomings, since the GNSS signal could be absent or not reliable due to multipath and non-line-of-sight phenomena and radio frequency interferences, while inertial navigation, which derives the position by integrating inertial data, is affected by noise and drift.
Differently from previous works, the solution proposed in this paper exploits inertial data not for directly computing the odometry, but for detecting specific features on the track (e.g., curvatures, slopes, and switches) to be matched with the corresponding ones stored on a digital map. As a consequence, the reconstructed positions are not affected by an error drift due to integration, making this method suitable for being used as an absolute input reference in localization solutions based on data fusion. In particular, when a feature is matched with the corresponding one present in the digital map, the confidence interval of the odometry error can be reset with a mechanism logically equivalent to the one performed when encountering a balise.
Although, at present, a digital map is not regulated by the European standard, a significant effort is being carried out for taking a digital map into account within the European Rail Traffic Management System User Group [6] and the European Community under specific research projects [3], [7].

A. PAPER CONTRIBUTIONS
This paper presents a new methodology for reducing the odometry error by exploiting inertial data to recognize a set of features on the track (e.g., curves, switches, and slopes), which are matched with the corresponding ones extracted from a digital map in an offline phase and stored as position markers. More specifically, the following novel contributions are provided in the paper: • A new method is proposed to reconstruct the curvature profile of a railway track based on the lateral accelerations sensed by an IMU.
• A new map matching algorithm is presented to align the curvature features detected by the IMU with those extracted from a digital map and stored as position markers. The alignment with the map also exploits the rough train position estimated by the odometry.
• An approach to employ the matched markers to reset the confidence interval of the odometry error is introduced.
• Several experiments are reported to validate the proposed approach both on simulated and real data.
The rest of the paper is organized as follows: Section II discusses the state of the art in the field, Section III presents the proposed solution, Section IV reports the experimental results, and Section V states our conclusions.

II. STATE OF THE ART
The efficiency of a railway transportation system is highly related to the number of trains that can travel on the tracks, which, in turns, depends on the position error of the localization system. Given the constant demand for higher efficiency and high-speed trains, accurate train localization became an emerging topic in computing systems posing great research challenges [4]. Hutchinson et al. [8] provided an overview of the research activities on this topic within the Shift2Rail Joint Undertaking, showing the strong commitment to bringing such solutions into operation in the near future. For example, the GRAIL-2 [9] European project aims at integrating GNSS data in a demonstrator to enhance odometry capabilities and verify its adherence to current standards on safety and security.
Nowadays, the train position refers to the position of train front-end with respect to the position of a reference marker. Such a relative position is obtained by measuring the traveled distance from the last position marker located on the track. The traveled distance is safely measured by the odometry function implemented in the onboard signaling platform using wheel encoders or a combination of sensors such as wheel encoders, monoaxial accelerometers, and radars. The types of sensors and how they are used depend upon the suppliers of the onboard platforms. An onboard signaling platform implements many other functions such as those responsible for (a) reading the information sent by the beacons (balises) installed on the track sleepers, (b) associating the origin of the measurement reference system to the location of the last balise, and (c) carrying out the continuous supervision of specific locations on the line and at the stations to safely guarantee that the train reaches each specific location with the allowed speed.
Many different odometry algorithms have been developed during the last decades with the primary objective of improving both the accuracy and the availability of the measured distances under all the various operational conditions (e.g., snow, water, leaves on the rails). Typically, the error models associated with the accuracy of the measured traveled distance foresee an error contribution equal to a percentage of the traveled distance (e.g., 5% for the European Rail Traffic Management System (ERTMS) system [2]).
Around 2004, the Italian Infrastructure Manager and Italian Railway Undertaking started the deployment of the national Automatic Train Protection (ATP) system. In particular, due to the vital role of the odometry function in terms of both safety and performance, they have provided detailed specifications for the Odometry Algorithm [10] and the Train Brake Model [11]. The odometry function specification comes from many research activities and experimental analyses performed on different types of trains. For example, Allotta et al. [12] proposed an odometry algorithm, compliant with this specification, which can detect under not severe environmental conditions when the train is slipping or sliding by comparing different measured speeds acquired employing multiple encoders placed on separate wheel axes. The same group performed further research activities to extend the proposed algorithm by including an IMU [13]. However, this extended version has not been included in the ATP specification; therefore, no industrial implementation has been developed and put into service.
Regarding the ERTMS Standard, in the last decade, the evolution of the specifications has improved the functional specification of many functions related to the determination of brake deceleration curves and the Traction/Braking models. In this context, the ERTMS User Group has recently activated a working group to define and deliver new user requirements [14] for a train localization system. In particular, they state that lifecycle length and cost are currently weak points of the safe part of the Command and Control System (CCS), making railways often less sustainable and competitive than other means of transport. Furthermore, updates of ERTMS specifications or ERTMS instantiations sometimes make complete system re-certification compulsory. Moreover, high-density populated areas are currently demanding higher capacity and cost-effective solutions capable of improved exploitation of existing infrastructures.
In 2015, the European Union Agency for Railways (ERA) also recognized the need to carry out a detailed ERTMS Longer Term Perspective analysis [15]. In this analysis, they reported the main potential 'game changers', which can significantly impact the ERTMS business case (due to a significant increase in operational performance and/or substantial cost reduction for the overall ERTMS system). This analysis's strategic challenges are mainly linked to the need for further capacity increase and a decrease in the overall life cycle costs of the ERTMS implementations.
In the last decade, the railway stakeholder community has recognized the benefits attainable from new technologies for innovating the railway sector [16]. Thus, many Infrastructure Managers and Joint Undertakings have started R&D programs to define new generations of control, command, and signaling systems. One of such systems is the GNSS satellite positioning. However, the achievable performances and, especially, the reachable integrity depend on factors like the surrounding environment (e.g., tunnels, mountains, buildings).
Otegui et al. [4] provided a survey on train localization, specifying that the three critical issues that need to be accounted for in this type of applications are: reducing the maintenance costs of the infrastructure, ensure the interoperability of the system on different types of trains and structures, and guaranteeing the safety-critical constraints of the applications.
Denng et al. [17] proposed an approach based on Kalman filters to fix the IMU drift and the odometry with GNSS and velocity measurements. Other works [18], [19], [20] combined the GNSS with a Doppler sensor to reconstruct the curvature of the train trajectory and used a map-matching algorithm to refine the position of the train. Lauer and Stein [21] proposed a stochastic approach to fuse GNSS data with the velocity to locate a train on a digital map represented as a graph. Heirich [22] presented a solution employing a particle filter to merge inertial and GNSS data, also exploiting a digital map to refine the computed location and detect the traveled track. Note, however, that all these works use the digital map only to reduce the localization error of an initial solution obtained exploiting the GNSS signal, which is not always available and reliable. Moreover, they use the track as a geometric constraint and are not exploiting its peculiar features.
Cai et al. [23] designed a GNSS-free algorithm based on a set of high-precision lasers mounted in suitable positions of the train to measure the distance to the buildings along the path with an accuracy up to few millimeters. Assuming that the environment's topology remains constant, sensors measurements are stored and re-used for comparing future train positions. Although this approach can be effective in a urban context, its accuracy degrades in rural environments. Tschopp et al. [24] performed a comparison between visual and visual-inertial odometry algorithms applied to railway datasets, showing that visual-aided odometry can achieve higher accuracy for rail vehicles, but it is not reliable enough to be used in isolation for safety-critical applications.
Trehag et al. [25] estimated the railroad plane geometry through onboard IMU measurements, integrating the GNSS with an extended Kalman filter for removing the bias from the measurements in the yaw rate estimate, used to create a curvature's profile. Heirich et al. [26] derived a set of geometric characteristics of the track, as curvature and inclination, VOLUME 11, 2023 from inertial data and speculated that such features could eventually be exploited to localize the train, but no method is proposed to reduce the localization error. The problem of map-matching using IMU has been analyzed by Belabbas et al. [27], who pointed out that different curvature estimation methods perform differently depending on the sensor characteristics, proposing to combine them to overcome distinctive sensors limitations.
The solution proposed in this paper does not rely on GNSS, and it is only based on inertial data and the current odometry estimation. The key idea of the proposed method is to perform offline processing of a digital route map to extract a number of features (e.g., curvatures, switches, and slopes) and save them in the map file as virtual position markers. Then, inertial data are used at run time to recognize such features and match them with those stored in the map. The position of the matched virtual marker can be used to reduce the error accumulated by the wheel odometry system, as presented in Section III, but it can be integrated as a new input in more complex data-fusion approaches, exploiting its independence from GNSS data and balises.

III. PROPOSED SOLUTION
As IMU sensors are affected by error sources that are totally independent of those concerning the GNSS positioning, the proposed work describes an approach for extracting cues from the track layout (e.g., curvatures, slopes, cross switches) using inertial data, matching their location with the corresponding ones stored in an enriched version of the Digital Map. The navigation of the Digital Map is done by using the train odometry. Once the locations of a cue is detected, an onboard signaling subsystem can potentially use this location as an a-priori known position marker.
Such position markers can be used to reset the odometry confidence intervals, independently of the equivalent train confidence interval reset done by the ETCS kernel 1 by using linked balise groups and the linking information [1]. The detection of position errors greater than a specified threshold (a configuration parameter) can be used as a fault detection mechanism whose design has to be carefully done considering the recommendations on the Detection and Negation Times provided in [28]. The detected position can be exploited for other uses, such as one of the inputs for 3D localization algorithms or a monitoring technique for detecting unbounded GNSS position errors, but the research on these benefits goes beyond the scope of the paper.
The employment of inertial sensors has also the main advantage of not relying on any external signals, which could be either tampered or unavailable in some sections of the railway paths or, in the worst case, disturbed by intentional or unintentional radio frequency interferences.
Among the track features, the path curvature ρ, defined as the inverse of the curve radius r, has a significant importance and has been selected as the key index for this paper. Nev- 1 The core of the ERTMS/ETCS onboard equipment. ertheless, the proposed approach can be extended to other track parameters, as discussed in the final remarks. On the other hand, the proposed approach requires a precise Digital Map to achieve train positions with a desired accuracy and availability.

A. SYSTEM ARCHITECTURE
The overall architecture used to implement the proposed method is illustrated in Figure 2. It consists of two macro blocks, one executed offline and one executed online.
The off− =line macroblock extends the row Digital Map (M ) generating a new enriched map (M E ), containing a set of features along the path. A path in the map is represented as a sequence of 3D points, each characterized by its coordinates expressed in the North, East, Down (NED) reference system [29]. 2 In particular, the Curvature Reconstruction block receives the Digital Map M as input and computes the curvature ρ(q) as a function of the traveled distance q, expressed in the odometry coordinate system. Then, the curvature data are sent to the Feature Extraction block, which extracts a set of features along the path, corresponding to the railway sections with the highest absolute curvature derivative. In particular, each feature f i is represented by a tuple (q i , ρ i , ρ ′ i ) storing its position, its curvature, and the curvature derivative. The set F of all the features selected on the Digital Map is then stored in the enriched map M E .
The online macro block estimates the features from inertial data, matching them with the ones stored in the enriched map M E . Every time a match is found, the odometry error is reduced. In particular, the Curvature Estimation block reconstructs the curvature ρ(t) from the inertial data (acceleration vector − → a (t) and angular speed vector − → ω (t)) and the train velocity v(t) provided by the odometry (e.g., based on wheel sensors). The Feature Estimation block extracts the features from the curvature ρ(t) at runtime, applying an algorithm similar to the one used offline.
In the following, the actual train position is denoted as q(t), the position estimated by odometry is denoted by q(t), and the odometric error is denoted by ϵ(t) = q(t) − q(t).
As soon as a new feature is detected by the Feature Estimation block at time t * , it is directly sent to the Feature Matching block, which performs the matching with the features stored in the digital map M E . The matched feature is denoted by f * (q * , ρ * , ρ ′ * ). To restrict the set of features F to be compared, a subset F is selected by the Feature Selection block within a moving window on the route centered on the current estimated train position q(t) and having a width [δ lb (t), δ ub (t)] established by the maximum current error bounds of the odometry. Such bounds can be computed as follows. The odometry system is built to guarantee a maximum error specified as a function of the actual position q. In particular, the regulation requires the estimated position q to be in the range where q L denotes the position of the last detected feature, while the constants a and b depend on the specific country (e.g., ETCS performance requirements for interoperability [2] specify a = 5 m and b = 0.05). The value of q L is initialized by q(t 0 ). Inverting Equation (1), it is possible to state that, given the position q estimated by the odometry, the actual train position is within the range where The Feature Matching block produces as output the matched feature f * , whose position q * is used to reduce the odometry error by the amount λ = q(t * ) − q L .
If the detected feature is used for odometry error correction, when a matching occurs, the value of q L is set to q * and the correction is performed. The fixed error is computed as A more detailed explanation of the functional blocks illustrated in Figure 2 is reported in the following sections. Table 1 summarizes the most common symbols used throughout the paper.

B. OFFLINE CURVATURE RECONSTRUCTION
At the moment, the digital map under investigation in Hitachi Rail STS [30] is an oriented graph of interconnected nodes with variable distances between them, not including information on curves, gradients, and superelevations. Therefore, an offline curvature reconstruction process has to be performed taking into account the characteristics of the current Digital Map.
To understand the curvature reconstruction process considered in this paper, we recall some basic geometric criteria adopted to design rail transit, aimed at providing costeffective, efficient, and comfortable transportation, while maintaining adequate safety factors [31], [32]. For example, the Italian track design specification [32] states that the minimum radii of the horizontal and vertical curvatures of a railway track in line are 275 m and 500 m, respectively; the horizontal value is further decreases to 170 m for some tracks located in train stations. Moreover, transitions between curves have to follow a clothoid or a cubical parabolic function. For instance, a curve subsequent to a straight section starts with a curvature ρ equal to zero that is increased linearly until the desired plateau value and is kept constant for the central part of the curve. The end of the curve follows the same profile, where the curvature linearly reduces to zero. In addition, the track design criteria state that between a curve with a positive radius and another one with a negative radius there must be a straight section with a minimum length of 50 m.
A convenient representation of a track used in several industrial solutions makes use of a graph where the nodes are geolocalized points of the track, and a link represents the connection between two consecutive nodes [30], [33]. The basic rule used to develop a Digital Map is to sample the nodes' positions following the convention that the link length should be inversely proportional to the curvature and less than a maximum sampling distance.
The curvature reconstruction algorithm receives the sequence of geolocalized nodes from the map M and estimates the curvature at each node, using Taubin's method [34]. The reconstruction algorithm must also deal with errors in nodes coordinates due to measurement inaccuracies. Such errors in node positions can cause large errors in the estimated curvature when nodes are separated by a small distance. To reduce such errors consecutive points closer than a minimum distance d min are discarded. Since the maximum location error affecting the node positions is a specification requirement for the Digital Map, the best value for d min is a function of the map features. Section IV-E will present some preliminary results on an actual track while describing the map used to evaluate the proposed approach on real data.

C. OFFLINE FEATURES EXTRACTION
Curvature features are selected offline by the Feature Extraction block from the curvature profile ρ previously reconstructed from the Digital Map M . To increase the accuracy of the feature-matching algorithm, features are selected by choosing those points on the track whose curvature variation has a local maximum above a certain threshold η M (a configurable parameter). Figure 3 illustrates how the curvature error affects the position error of the feature, when this is selected based on the maximum absolute curvature derivative.
The threshold is selected as a trade-off between the radius range admitted by the construction rules and the error introduced by inaccuracies in the geolocalization of points composing the map. A low threshold value allows detecting curves with a large radius, while a higher value provides robustness against computation errors due to inaccuracies in the Digital Map locations. In this paper, a value η M = 5 × 10 −6 m −2 has been used to define the intervals in which local maxima of the absolute curvature derivative are computed.
Algorithm 1 presents the pseudocode of the procedure used by the Feature Extraction block to select the features on the digital map M from the curvature profile ρ and its derivative ρ ′ .
In particular, the proposed algorithm sequentially analyzes the K M points describing the curvature profile of the track and selects each feature by choosing the point with the maximum absolute curvature derivative within a search interval. The beginning of the search interval is set to the point in which the absolute curvature derivative becomes higher than the threshold η M (lines 4-7), while the end of the interval is set as the first successive point where the absolute curvature derivative returns below the threshold (line 14). Within each search interval, the algorithm keeps track of the point (q max , ρ max ) with the maximum absolute curvature derivative ρ ′ max (lines 8-13), which becomes a new feature. The condition (q max > 0) at line 9 is necessary to avoid computing a feature in the case in which the track starts with an absolute curvature derivative above the threshold. The new feature is then added to the set F of detected features that will be embedded in the enhanced Digital Map M E (line 16).

Algorithm 1 Select Features on the Curvature From the Digital Map
Input: ρ(q), ρ ′ (q) Output: F 1: procedure Features_Selection 2: end if 9: if (q max > 0) then 10: if ρ ′ (q k ) > ρ ′ (q max ) then 11: q max ← q k 12: end if 15: if end if 18: end if 19: end for 20: end procedure Figure 4 shows a curvature profile reconstructed from a synthetically generated track. Red crosses denote the selected features corresponding to the points in which the absolute curvature derivative has a local maximum.

D. ONLINE CURVATURE ESTIMATION
The online curvature estimation process exploits the inertial data to reconstruct the curvature profile of the route followed by the train.
The train velocity vector can be defined as − → v = v xûX + v yûY , where u X and u Y represent the unit vector of longitudinal and lateral axes in the body frame, respectively. Assuming that the velocity vector is directed along the longitudinal axis of the track, the lateral speed is null (v y = 0) and the train acceleration can be expressed as where s represents the traveled space. Since the acceleration vector lies on the plan defined by (u X , u Y ), it can be decomposed into two components exploiting the relationu X =˙ û Y , where˙ is the yaw angular rate obtained from the IMU in the NED frame. Therefore the acceleration can be expressed as − → a = a xûX + a yûY , where a x =s and a y =ṡ˙ . It is possible to write s and its derivative in the form: Under the hypothesis that the local radius r is constant, the derivative can be represented asṡ = r˙ , and the normal acceleration a y can be expressed as: Equation (6) describes the relationship between the longitudinal speed ||v||, the curvature radius r, and the cross track acceleration a y . Since the curvature ρ is the inverse of the radius, this formula allows defining three methods for deriving it: The first method (ρ (1) ) does not require integration, because the IMU directly senses the dynamic variables. However, when the train is covering a straight segment of the track, both the numerator and the denominator are zero and the ratio becomes indeterminate, making the result only depending on the noise in the sensory data. For this reason, this method cannot be exploited alone.
The second and the third methods (ρ (2) and ρ (3) ) are similar, with the speed appearing at the denominator. However, in the third method, the speed is quadratic, meaning that ρ (3) is more sensitive to errors in the speed value provided by the odometry function. This effect is also more significant at low speeds, because the error component in the measurement becomes more prominent and is no longer negligible.
Bellabas et al. [27] compared the three methods and showed that no one dominates the others, suggesting that a robust solution should merge them. Although this goal is outside the scope of this work, Section IV-A presents some remarks on the performance of some integrated methods applied to data acquired in a real-world scenario.

E. ONLINE FEATURES ESTIMATION AND MATCHING
While the train is moving, the online Feature Estimation block detects a feature f using the curvature ρ computed from the inertial data by the Curvature Estimation block and provides it to the Feature Matching block, which compares it against the set F stored in the enhanced map M E and provides the current positions q * corresponding to the matched feature.
As inertial data are typically very noisy, the curvature derivative is first processed by a low-pass filter before being analyzed by the feature extraction algorithm. Figure 5 shows the raw curvature derivative (thin black plot) and the corresponding envelop (thick red plot) filtered using a root mean square function with a window of 50 samples.
The curvature ρ computed from the inertial data and the corresponding filtered derivative ρ ′ are analyzed online by the Feature Estimation block with an approach similar to the one applied offline to the curvature obtained from the map by the Feature Extraction block. The pseudocode of Feature Estimation is detailed in Algorithm 2.

VOLUME 11, 2023
When a new curvature is computed from inertial data at time t, the algorithm evaluates whether its absolute derivative crosses the threshold η I (line 6). The crossing is detected if the value ρ ′ (t) is above η I and ρ prev is below it, where ρ prev is the value of ρ ′ stored at the previous iteration (line 24). If a crossing is detected, the feature f is associated with the curvature ρ(t) and derivative ρ ′ (t) values of the current time t. (lines 6-11). The algorithm performs two activities when the new data arrives within a search interval (line 12). If the new absolute curvature derivative is greater than the current maximum, it is selected as the new maximum (lines [13][14][15][16][17][18]. Then, if the absolute curvature derivative has decreased below the threshold η I (line 19) the selected maximum is passed to the Feature Matching block (line 20). Note that the Curvature Estimation and the Feature Estimation blocks are executed at the rate imposed by the inertial data, while the matching is invoked only when a new feature is detected.
Given the time t * at which feature f is detected, the algorithm defines the search interval W as a moving window shifted on the track with the motion of the train (line 2). The window is centered on the position estimated at time t * by the odometryq(t * ), whereas its width is determined by the odometry error bounds, as illustrated in Figure 7. A subset of features F is extracted from the set of features F, computed offline by the Features Extraction block and stored in the enriched Digital Map M E , and including all features f i whose position q i is within the search interval W (line 3). The subset F is provided to the Feature Matching block for the actual matching.   The algorithm starts creating a new set F N of features including those belonging to F and following the last match f L (i.e., those features with a position q i greater than the position of the last detected feature q L ), as performed in line 5.

Algorithm 3 Identifies the Set
A feature can be characterized by considering the signs of the curvature and its derivative. Hence, by evaluating them is possible to know whether the position is relative to the beginning or the ending of a curve and if the turn is right or left. The approach exploits this information to create a new set F C selecting the features in F N whose curvature and related derivative have a concording sign with those of f (line 6). Note that, given the geometric criteria in track design and the constraints in the maximum tolerance in the odometric error, the subset F C usually contains only one feature. If the set includes more than one feature, the algorithm selects the first one along the track based on the consideration that features are engaged sequentially (i.e., with an increasing value of q), as performed in line 8.

Algorithm 4 Match the Estimated
if (F C ̸ = ∅) then 8: q L = q * 10: else 11: q * ← MATCH_NOT_FOUND 12: end if 13: end procedure The feature-matching algorithm produces as output a tuple of values (t * , q(t * ), q * ), where t * is the time at which the feature is detected, q(t * ) is the odometry estimation at time t * , and q * is its position of the matched feature on the enhanced Digital Map.

F. ODOMETRIC ERROR CORRECTION
If the detected feature is used for correcting the odometry error, the position correction λ(t), performed at detection time, is computed as Figure 8 compares the error of the odometry without correction ϵ(t) = q(t) − q(t) against the one fixed with the proposed method ϵ f (t) = ϵ(t) − λ(t).
Note that applying the correction is not enough to reset the error. In fact, the residual error is only partially ascribable to the map-matching algorithm, due to the errors in the geolocalization of the points in the map and those in the curvature reconstruction. Also observe that the feature correction is performed at time t, when the curvature derivative goes below the threshold (line 19 in Algorithm 2), after time t * . In the meantime, the odometry has accumulated an additional error that will be handled when the next feature is matched.
Finally, it is worth noting that, although this paper only focuses on features coming from curvature variations, other types of track features can be considered, like switches, as well as altitude and roll gradients. For example, the proposed algorithm can detect pitches due to slopes and roll variations related to track inclinations present on the train route. Each feature can potentially act as a position marker used for resetting the odometric error, detecting unbounded GNSS position data, and performing 3D localization.

IV. EXPERIMENTAL RESULTS
This section presents a set of experiments carried out to test the proposed approach, both on synthetic and real-world data.

A. CURVATURE ESTIMATION
As described in Section III-D, the curvature of the actual train route can be estimated at runtime using different methods applied to inertial data, as presented in Equation (7). This subsection compares the performance of two approaches (i.e., ρ (2) and ρ (3) ) using real data acquired from the Hitachi Rail STS trial site. The achieved results show that the effectiveness of the two approaches depends on the quality of the inertial data (i.e., noise) and the operating conditions (mainly the train speed). Figure 9 compares the curvature estimated by using the two approaches for a given speed profile.
In particular, the first two plots report the curvature estimated with the second (ρ (2) ) and third (ρ (3) ) approaches, while the third plot shows the profile of the longitudinal train speed during the arrival to a station, where the speed decreases to zero. As it can be observed, the difference between the two approaches depends on the train speed. When the speed is higher than 20 m/s, the curvature profiles obtained by the two approaches are comparable, as illustrated in Figure 10, which compares the two curvature profiles when the speed is between 20 and 30 m/s. Conversely, the third approach (ρ (3) ) shows a significant degradation for low speeds, due to the quadratic term at the denominator, which amplifies the odometry error. This is also confirmed by Belabbas et al. [27], who reported that the approach using the yaw angular rate (ρ (2) ) is better than the one based on the lateral acceleration (ρ (3) ) for low-medium speed ranges, up to 30 m/s. In particular, Figure 11 compares the two approaches for low speeds, showing that both results diverge when the speed is close to zero. However, the difference between them is  significant, as the curvature estimated by the acceleration (ρ (3) ) is affected by an error that is more than ten times higher than the one achieved using the angular velocity (ρ (2) ).
This comparison confirms that the performance of both approaches depends on the quality of the inertial data and the train speed, and their optimal integration depends on the characteristics of the specific inertial sensors and the train and line operational conditions. Integrating such methods, however, is outside the scope of this paper and will be carried out in a future work. In the following experiments, the curvature has been estimated by exploiting the angular speed of the yaw angle (ρ (2) ) due to its robustness.

B. EXPERIMENTAL SETUP
To evaluate the performance of the proposed approach in a large variety of situations, a generator of synthetic railway paths has been developed. To obtain realistic paths, the generator follows the specifications provided by the Italian Infrastructure Manager [32]. Initially, the path is generated as a continuous line composed of straight and curved segments (straight segments are generated as a curve with a radius equal to 10000 meters). Each curve consists of three elements: an initial spiral curve, a circular curve with a constant radius, and a final spiral curve. Spiral curves are generated using a linearly increasing or decreasing radius to ensure a smooth transition between two consecutive track segments. The continuous path is then sampled with a fixed step of 5 m in order to have a fine-grained discrete path, used as ground truth. A synthetic path is generated by sub-sampling the fine-grained path, so obtaining a sequence of points with a structure similar to the one adopted in a real Digital Map, where the distance between consecutive points is proportional to the radius.
The map generator takes as input a number of parameters, as the maximum length of the path, the number of curves, and, for each curve, its radius and degree of curvature. Each parameter value is randomly generated within a given range to obtain a number of pseudo-random paths. Another input parameter is the maximum allowed train speed, which defines the maximum allowed curvature and characterizes the guidance law during the simulation. Once a synthetic path is generated, the simulator directly computes the train dynamics and uses the train state variables to provide the output of the inertial sensor, also adding a Gaussian noise with zero mean and variance compatible with the sensor used in the real environment.

C. SENSITIVITY TO THE IMU NOISE
A set of three experiments was carried out to verify how the noise present on inertial data affects the corrected odometric error ϵ f (t). The experiments have been carried out on a synthetic path consisting of two curves illustrated in Figure 12. Figure 13 reports the corresponding ground truth curvature (top graph) and the curvature reconstructed by the proposed algorithm (bottom graph).
In such a path, the proposed approach detects a feature at the entrance and the exit of each curve, for a total number of four detected features.
Considering the approach used to estimate the curvature online, which employs only the yaw angle from the inertial data, a white noise with a variable standard deviation has been injected into the yaw angular data of the virtual IMU. To generate realistic inertial data, a standard deviation σ in the range [0.08, 0.28] deg/ √ s has been utilized. The value of the uncorrected odometry q(t) was generated from the ground truth q(t) by adding an error such that q(t) is kept within the bound of 5 m plus 5% of the traveled distance [2].
The first test was carried out for curves with radius of 500 m and degree of curvature equal to 20 degrees. Figure 14 shows the simulation results obtained over ten runs for a single value of σ equal to 0.01 deg/ √ s. In particular, a profile of the residual error ϵ f (t) is presented, together with the uncorrected odometry error ϵ(t). Even if remaining significantly below the bound, the uncorrected odometry error  The second experiment evaluated the impact of noise on the residual error by varying the value of σ in the whole range [0.08, 0.28] deg/ √ s with a step of 0.02 deg/ √ s. The ratio between the residual error ϵ f after the correction (t * + ) and the one before applying the correction (t * − ) is used as a metric to evaluate the performance of the proposed solution. It can be computed as e % = 100 · ϵ(t * + )/ ϵ(t * − ).
The obtained results are not shown because the variation of the residual error e % resulted to be below 5% in the whole range of values used for σ . This confirms that the proposed solution is robust against a wide range of noise present in the inertial data. This behavior is due to the filtering phase of the signal performed by the Features Detection block, which makes the system robust even to significant changes in the standard deviation. Since an optimal filter calibration depends on the knowledge of the IMU characteristics, the selection of the IMU device and the filter design are two crucial phases that need to be carefully addressed.
A third experiment was carried out to verify whether the effect of the noise depends on the geometry of the curves. The test was performed by generating a set of ten paths formed by two curves with a degree of curve equal to 20 degrees and a radius varying in the range [150, 2500] meters. Ten repetitions were generated on each route with the same parameters used in the previous experiment, computing the average and the maximum error. The resulting trend as a function of the standard deviation σ of the noise is similar to the one observed in the previous experiment and is not reported for lack of space. Overall, the results confirm that the system is robust to noise independently of the curve parameters.

D. SENSITIVITY TO THE CURVATURE
The experiments reported here were carried out to evaluate the effects of the parameters used for filtering the inertial data and the influence of the threshold used for feature detection. Other tests were done to evaluate the effect of the curvature on the odometric error estimation for fixed filter parameters and threshold. The path shape used in these tests is the same as the one used in the previous experiments (see Figure 12 and Figure 13). The degree of curvature was kept fixed, while the maximum curvature radius of the section was varied from 150 m to 4500 m with a step of 50 m to respect the minimum and maximum values allowed by the paths construction constraints. Ten runs were performed for each value of the radius, computing the average and the maximum errors over all repetitions. Figure 15 shows the route features detected on one of the paths, where crosses denote the detected features and circles show the point where the odometry fixes were performed. Since fixes allow reducing the cumulative error due to the  drift in odometry data, precisely detecting all the features is crucial for containing the position error between balises. Figure 16 (top) shows the average of the maximum error of the ten repetitions as a function of the radius, starting from a minimum of 150 m to a maximum of 4500 m. As expected, as the curve radius increases, the detection capability of the approach decreases, since the curvature variation is smaller. As a result, the maximum corrected odometer error decreases, as shown in Figure 16 (middle), and the Features Estimation block cannot detect all the features, as reported in Figure 16 (bottom). This effect can be ascribed to a high threshold, set to increase the robustness against the noise of the inertial sensor after filtering. Finding the right trade-off between robustness and the residual odometry error after the correction is crucial, because inadequate filtering or thresholds limits the benefit of reducing the odometry error. In fact, the number of odometry corrections decreases as the number of detected features  decreases. Since the filtering is specific for the selected sensor characteristics, the next test focuses only on the threshold. It uses the same setup of the previous test and evaluates the effect of the threshold on the detection quality.
This test was performed to verify whether there exists an optimal threshold value for detecting the correct number of features for any radius within the constraints allowed by tracks construction rules. As expected, the threshold value strongly depends on the radius of curvature of the path. However, if the curve radius is reported in the Digital Map, the onboard platform can read the radius of the next approaching curve and select the best threshold associated with it. Figure 17 shows the results of the previous experiment repeated with three different threshold values. With a threshold equal to 0.00045 (yellow curve), no feature is detected for most of the allowed range of curvatures and no odometry correction is performed during the train path. A threshold equal to 0.00015 (orange curve) represents an excellent alternative, since all the features are detected up to a radius of 2500 m, and some fixes are performed even for values over 4000 m. A threshold value of 0.00005 (blue curve) produces inconsistent results, because the number of estimated features is much higher with respect to the real ones. This generates a wrong correction in some points detected as features, because they were associated with some reconstructed features on the moving window in the map.

E. VALIDATION WITH REAL DATA
To evaluate the correctness of the proposed approach, some preliminary validation tests have been performed on real data. The reference track is a short path of around 5000 m concerning the arrival of the train at a station. Figure 18 shows a portion of three different reconstructed curvature profiles obtained with different values of the minimum distance d min between consecutive points, as described in Section III-B. As evident from the plots, values of d min smaller than 10 m generate curvature errors visible as spikes (dot-dashed red plot), while values higher than 10 m lead to a degradation of the reconstructed curvature profile (dashed pink plot). Hence, in this work, d min = 10 m has been used to reconstruct the curvature. Figure 19 shows the track curvature reconstructed on the whole traveled path extracted from the map with d min = 10 m. Note that the spikes present in the intervals 3200-3500 m and 4000-4500 m are generated by the switches located on the railway line.
Applying the proposed approach to detect the features on the track produces the results presented in Figure 20, where the curvature (top graph) is shown together with its derivative (bottom graph). Note that the features (indicated by a cross) correctly match the local maxima of the derivative function, and the end of the corresponding window (indicated by a circle) is selected as the first point were the derivative decreases below the chosen threshold. The final part of the available  data was not considered due to the very low speed, requiring a precise knowledge of the sensor noise model, which was not available for the inertial unit used during the measurement campaign.
Finally, Figure 21 shows the curvature derived from the IMU signal following the presented approach, together with its derivative and the revealed features.
Note that the derivative of the estimated curvature is significantly more noisy than the one obtained for the reconstructed one, implying the use of a proper threshold value. However, the number of matched features is bounded by the number of features in the reconstructed track. The choice of the features to be reconstructed is a task that can be performed offline and needs to be repeated only if the railway is subjected to modifications, embedding the results in the Digital Map.

V. CONCLUSION
This paper presented a novel solution to improve the odometry precision in train localization. The proposed method exploits inertial data (i.e., lateral accelerations and yaw angular rotations) to estimate the track curvature and detect a number of track features, which are then matched with those extracted offline from a digital map of the train path, used as virtual position markers. The map features considered for the matching are those found in a moving window centered in the position estimated by the odometry and with a length proportional to the uncertainty bounds. Every time a feature reconstructed from the inertial data matches the corresponding feature stored in the digital map, its position is provided as output.
The experiments carried out on both synthetic and real data showed the effectiveness of the proposed approach when applied to reduce the odometry error, which can be decreased up to 74% over 4500 m stretch by exploiting the auxiliary markers. The results also showed the robustness of the method to noise in the inertial data. The proposed method can be exploited to contain the train position confidence interval without increasing the number of physical balises along the line, thus saving both infrastructure and maintenance costs.
In a future work, we plan to extend the proposed approach to extract additional features, such as switches and slopes, enriching the digital map with a higher number of virtual position markers. Finally, we envisage a more in-depth analysis of real-world data obtained from fully-characterized sensors, to be integrated in a comprehensive localization solution making use of additional sensors, as GNSS and Lidar.