Localization of LHD Machines in Underground Conditions Using IMU Sensors and DTW Algorithm

This article presents the concept of using the DTW algorithm to partially solve the problem of locating LHD (load, haul, dump) in an underground mine. The concept assumes the recognition of characteristics—patterns that are hidden in vibrations recorded by vehicles—in segments of the route in the underground excavation, which under appropriate conditions enables the obtainment of information similar to that obtained through the use of RFID gates. With the use of this solution in practice, there are several problems that are addressed in this article. One of the main issues is the different arrangement of the signal fragments resulting from driving along with characteristic parts of the route (bumps, paving damage, lumps of excavated material, etc.) at different driving speeds. This problem was solved by using a combination of the road quality detection algorithm and the DTW algorithm, which estimates the similarity of time series with different lengths. The concept was developed and pre-tested using a test rig and a constructed wheeled robot, and then validated in the conditions of the KGHM underground copper mine in Poland, where the readings from the typical haulage process of an LHD vehicle were analyzed.


Introduction
There is a growing trend in the mining industry to develop towards big data, IoT, and robotization solutions. Considering the enormous amount of data collected from industrial automation, machinery, and equipment monitoring systems, the potential for the development of new technology to monitor mobile asset performance and technical conditions is very significant. Processing such an amount of data can be a task on its own. Very often, in the case of data collected on mobile assets, the factor limiting the scope of the analysis is the lack of spatial reference, which is crucial from the viewpoint of so-called awareness of operating context. This is especially important in the case of underground mines, where a multitude of different factors and variables can affect the collected measurements and in some cases-without a spatial context-can be very difficult to interpret in a commonly used data-driven approach. For example, the machine will enter a less ventilated area of the mine, which will result in exceeding the temperature data thresholds not related to its technical condition. In addition, having location methods tailored to the specific conditions of an underground mine, it is possible to develop methods of machine navigation, production optimization (e.g., indicating optimal haulage routes, mitigation of blockages), development of anti-collision systems, crisis management (indicating evacuation routes), or autonomous machines [1][2][3][4][5][6][7].
Obtaining information about the location of mobile vehicles is not a problem in the case of open-pit mines, thanks to the usage of Global Navigation Satellite Systems (GNSS), which of course cannot be utilized in an underground case [8]. Therefore, localization of mobile assets (i.e., LHD in the underground condition) is still an ongoing problem, 1.
Loading the cargo box at the mining face; 2.
Hauling material to the dumping point with a grid; 3.
Unloading cargo box into a grid; 4.
Returning to the loading zone at the mining face.
ization method based on the correction of the vehicle motion path estimated by integrating the gyro signal with a digital map and the existing topology rules of the mine's road infrastructure. The approach is dedicated to room and pillar mining, where the excavation's structure has the form of a lattice (similar to Manhattan). Another addition was to integrate the detection of turns and machines passing through the intersection presented in [30], which can be treated as an auxiliary algorithm (tracking the passes through the subsequent intersection) and the correction of the gyro indications (recalculation of the angle assuming that the excavations intersect orthogonally). As an extension, in this article we offer an additional procedure of path correction which provides discrete information about natural features of the environment. Its task is to recognize whether a given vehicle at a specific moment in time was passing through a selected, specific part of the excavation, based on specific patterns appearing in the vibration signals recorded during travels with individual parts of the excavations. Thanks to this, we can identify the location of the machine with accuracy with respect to the excavation in which the drive is carried out. The informational potential of such a solution would therefore be comparable to the RFID gates usually used in this regard. The advantage of our approach is that the only equipment needed to apply this method is a three-axis accelerometer and information necessary for the operation of the auxiliary algorithm for the road quality classification (primarily vehicle speed). It is also necessary to collect an extensive database of this type of data from machine travels across various excavations. In practice, this information is usually either a part of the onboard machine's monitoring system or requires a relatively low-cost expansion of this system. Ground recognition also has its roots extensively in robotics, particularly in perception. In the literature, this problem is widely recognized and is used in adapting the robot's motor skills to specific conditions, protection against falls, or mitigation of energy consumption [31][32][33][34][35][36]. In the future, our solution may also be adapted to autonomous LHDs. The challenges of robotization of haulage using LHD have been broadly described in [4], [6], and [37].

General Assumptions in the Machine Location Tracking Problem
This article considers an example of the cyclical operation of a haul truck (Figure 1), which consists of four basic operations: 1. Loading the cargo box at the mining face; 2. Hauling material to the dumping point with a grid; 3. Unloading cargo box into a grid; 4. Returning to the loading zone at the mining face. A sequence comprising those four operations is called a haulage cycle, and usually, a single vehicle conducts from a few to several dozen cycles during the working shift. In practice, each individual cycle involves the passage of the machine from point A to point A sequence comprising those four operations is called a haulage cycle, and usually, a single vehicle conducts from a few to several dozen cycles during the working shift. In practice, each individual cycle involves the passage of the machine from point A to point B along a strictly defined route. However, during one shift, there are common events where the machine changes its path. Given the Manhattan-like structure of the underground excavations (mainly straight routes, intersections at similar distances from each other, roads intersecting at 90 • angles), it might seem that the problem is not that complicated and can be solved using inertial sensors commonly used in an inertial measurement unit (IMU), especially combining a three-axis accelerometer, gyroscope, and magnetometer and using the gyro integral to estimate the turn angle of the vehicle, as presented below: (1) where α(t) is the vehicle's direction at moment t, and Gyr Z is the gyroscope readings from the vertical axis (Z in this case). This, combined with the vehicle's movement speed readings (which can be estimated from the accelerometer, but this solution reduces the accuracy of the results), can be easily converted into the vehicle position in the X-Y plane, as shown in [39]. This solution, however, has two related problems: 1.
Gyroscope drift, being the integral of two components: a slow-changing bias instability and a higher frequency noise-angular random walk (ARW).

2.
Unreliable readings from the magnetometer working in underground conditions.
These problems are related in this way: in the surface-based use cases, it is common to use magnetometer readings to correct drift by using, for example, Kalman's or a complementary filter [40]. On the other hand, this simple solution does not use the aforementioned information on the specific excavation layout of the underground mine. That information could be used in the tracking method to reduce the drift problem, for example by identifying characteristic parts of the route and resetting the drift in those points. A concept of such a method is presented in [29], where each crossing is treated as an instance of a separate class, including its X and Y coordinates and references to the adjacent intersections. Such a graph-based construction has one significant disadvantage: when the position of the vehicle is incorrectly established once, this error affects all the subsequent readings. In the article, a simple method addressing this problem is described.
The method assumes recognizing characteristic vibration-based patterns on the vehicle route. After recognizing such a pattern, the tracking algorithm could correct the determined vehicle position burdened with an error resulting from the drift and other signal-interfering noises. The concept assumes creating a catalog of signals generated by haul trucks on small sections of routes. It would be necessary to select parts of the routes: • with possibly a hardened surface, the characteristics of which are relatively constant over time, e.g., when leaving the heavy machinery chamber, or segments with a rock surface that is not quickly damaged or deformed. • that would be characteristic-signals from the passage of a given section should make it possible to distinguish them from other sections of the route in an unambiguous manner and thus enable the location of a given section in space. Therefore, they cannot be, for example, flat sections of the route, on which the machine vibrations generated while driving will be practically indistinguishable.
The signals from the repeated experimental runs of the machine along such characteristic parts of the route would be used to prepare a "pattern catalog" with which the signals from the machine recorded during its regular operation should be compared. However, before such a solution could be implemented, it would be necessary to address several problems associated with it.

Issue 1: The different trajectory of vehicle movement within one pattern:
Driving through the same bumps at slightly different angles or bypassing them by the operator may result in significant changes in the signal recorded on the vehicle by IMU or the on-board monitoring system.

Solution: Create a "pattern catalog":
Multiple passages through the same sections of the route should provide sufficiently extensive reference material that takes into account slight differences in the trajectory of the haul truck. Different driving styles of operators and speed of covering given sections of the route may affect the overall length of the signal recorded on a given section and the distribution of characteristic signal fragments to each other.

Solution: DTW-Dynamic Time Warping:
DTW is an algorithm that takes into account the different lengths of the compared signals and differences in the position of their characteristic fragments.

Issue 3: Unexpected stoppages:
If the haul truck stops while driving along with the pattern, it may be very difficult to identify the pattern with basic methods such as cross-correlation.

Solution: DTW-Dynamic Time Warping:
The DTW alignment is not an injection, so it is possible to match multiple consecutive readings from one signal to one read from a signal in a catalog. As a result, many consecutive readings from the period when the machine was not moving are likely to be assigned to a short fragment of the pattern, which will minimize the alignment error.

Issue 4: Different machine speed and its influence on vibration level:
When the machine runs over the same sections of the route, it may result in a different level of vibrations recorded by the sensors depending on the driving speed, as described in [39,41], where linear dependence of vibrations on speed was demonstrated and classification thresholds for the adaptive vibrations to the driving speed were proposed.

Solution: Use of the road quality classification algorithm:
The prepared road quality classification algorithm is to some extent resistant to the variable speed of the haul truck.

Issue 5: Vehicle load and its influence on the vibration level:
The vehicle driving over the same route sections may result in a different level of vibrations recorded by the sensors depending on the load level of the haul truck (filling the cargo box with transported material). The conducted research shows, for example, a significantly higher level of vibrations recorded by the accelerometer in the Z-axis during the same section of the route without a load than with it. Solution: Using the algorithm for identifying the road quality or limiting the method to only run with an empty or full cargo box: The prepared road quality classification algorithm is resistant to the variable load of the machine. It is also possible to limit the application of the method to empty-or fullcargo box runs only, but this will seriously reduce the area of potential applications.
The suggested DTW algorithm as an answer to issues 2 and 3 are described in greater detail in the latter part of this article.

Materials and Methods
The purpose of the method is to parameterize road sections in the underground mine where the mining vehicle is moving. It comes down to the classification of signal fragments into groups corresponding to different types of road sections. The distinguishable fragments of the road will generally correspond to the type, profile, and condition of the road surface. The type and origin of the signal cause a number of the previously described phenomena, where the signal fragments corresponding to the same road segments are Appl. Sci. 2021, 11, 6751 6 of 19 not identical. The main problem with this is the varying signal length. This problem is typical of the study of time series. Altogether, our efforts are related to the identification of similarity in signals (or their segments) and is commonly known in the literature as the time series matching approach. An overview of typical methods is presented in [42]. The most popular approach to measuring the similarity/dissimilarity between two time series is to estimate the Euclidean distance on the transformed representation. The method of signal similarity analysis, resistant to above the mentioned phenomenon, is Dynamic Time Warping (DTW).
The problem of detecting patterns in time series has been a current topic for a long time. This is related to the growing popularity of collecting data, a large part of which is inherently temporal data. The authors of [43] emphasized the importance of this problem, whilst also showing that DTW is a good solution. In particular, for years, scientists have been very interested in the topic of human speech recognition [44]. A signal record of each spoken word may be a pattern. These patterns can then be used to recognize words throughout a sentence. However, it is known that words are spoken at different speeds, which shows the need to use a method that is resistant to different pattern lengths. Many different ideas using DTW for this purpose can be found in the literature. For example, the authors of [45] describe the combination of this method with the Mel Frequency Cepstral Coefficient. Another idea for recognizing human speech is to use the Hidden Markov Model (HMM) [46]. In addition to human speech, a similar interesting topic is the use of DTW to recognize bird voices [47]. The obvious next step in recognizing patterns in signals is to use an appropriate classification or clustering method to automatically group similar signal segments corresponding to the same patterns. There are many examples in the literature that combine the DTW algorithm with various machine learning methods. The use of DTW with fuzzy clustering can be found in [48]. Another innovative idea is to connect DTW with neural networks [49].
In line with DTW, other methods are also commonly used, which work better or worse in specific applications. One idea is to use a measure of similarity when comparing time series. In the simplest case, the Euclidean distance is usually used for this purpose. For X, Y signals of length n, the Euclidean distance can be expressed by the following formula: However, this measure has limitations in further applications. It requires both signals to be of the same length and it is not immune to time shifts. The signals are compared at the same points in time. If the patterns are of different lengths, this method will not work properly-it will not show their similarity. In this case, the so-called elastic distance measures seem to be better methods. One such method is the Longest Common Subsequence (LCSS) [50]. The method was initially developed for discrete variables. Here, the method is to find the longest string of repeating symbols [51]. It is assumed that the symbols in the sequence need not be adjacent to each other. For the extension to continuous variables, a constant threshold value is introduced, which means whether the given two values fit together. The advantage of this method is noise immunity [50]. There are also extensions to the classic string edit distance methods to time series, for example, Edit Distance for Real sequences (EDR) [52], Edit distance with Real Penalty (ERP) [53], or Time-Warp Edit Distance (TWED) [54]. These methods assume the comparison of two time series as the minimum number of transformations needed to transform one series into another. Therefore, for continuous values, it is necessary to establish a threshold that will indicate whether the two values can be considered the same or not. The disadvantages of the above methods include the need to establish a fixed threshold value. The summary of all the considered methods, along with their advantages and disadvantages, is described in Table 1. As can be seen in the table above, the DTW algorithm is also best suited for solving roblem presented in this case. The main reason here is the fact that, among the other ods, it performs the best in the case of stretching or shortening of some fragments of ignal, which would correspond to the vehicle operator covering the given route fragts more slowly or quickly, respectively. Similarly, it is also best when a given pattern sturbed, e.g., by a longer fragment of the signal corresponding to the machine's stop-.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for suring the similarity between two signals (time series) that may differ in length. The of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. es in the following columns and rows correspond to two signals respectively (e.g., A B). Let's consider the following two time series: = , , … , , … , , The presented matrix symbolizes all possible matches of the value of signal A to the e of signal B. The green points symbolize the optimal match of two signals, found by . The optimal solution is chosen by minimizing the Euclidean distance between the ts. The different length of the signals implies the necessity to match at least one value the shorter signal to several values from the longer signal (surjection). This is illusd by points arranged vertically or horizontally. As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally. As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally. As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally. As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally. As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally. Resistance to inserting large fragments of same patterns (vehicle stoppages)

Noise immunity
No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally. As can be seen in the table above, the DTW algorithm is also best suited for solving roblem presented in this case. The main reason here is the fact that, among the other ods, it performs the best in the case of stretching or shortening of some fragments of ignal, which would correspond to the vehicle operator covering the given route fragts more slowly or quickly, respectively. Similarly, it is also best when a given pattern sturbed, e.g., by a longer fragment of the signal corresponding to the machine's stop-.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for suring the similarity between two signals (time series) that may differ in length. The of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. es in the following columns and rows correspond to two signals respectively (e.g., A B). Let's consider the following two time series: = , , … , , … , , The presented matrix symbolizes all possible matches of the value of signal A to the e of signal B. The green points symbolize the optimal match of two signals, found by . The optimal solution is chosen by minimizing the Euclidean distance between the ts. The different length of the signals implies the necessity to match at least one value the shorter signal to several values from the longer signal (surjection). This is illusd by points arranged vertically or horizontally. As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally. Resistance to inserting large fragments of same patterns (vehicle stoppages)

Noise immunity
No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally.

Edit Distance for Real Sequences Edit Distance for Real Penalty Time Warp Edit Distance Dynamic Time Warping
Applies to signals of different length Resistance to shortening/lengthening pattern fragments (different vehicle speed) Resistance to inserting large fragments of same patterns (vehicle stoppages) Noise immunity No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route frag-ments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stop-page.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
(2) The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illus-trated by points arranged vertically or horizontally.

Edit Distance for Real Sequences Edit Distance for Real Penalty Time Warp Edit Distance Dynamic Time Warping
Applies to signals of different length Resistance to shortening/lengthening pattern fragments (different vehicle speed) Resistance to inserting large fragments of same patterns (vehicle stoppages) Noise immunity No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route frag-ments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stop-page.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
(2) The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illus-trated by points arranged vertically or horizontally.

Edit Distance for Real Sequences Edit Distance for Real Penalty Time Warp Edit Distance Dynamic Time Warping
Applies to signals of different length Resistance to shortening/lengthening pattern fragments (different vehicle speed) Resistance to inserting large fragments of same patterns (vehicle stoppages) Noise immunity No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route frag-ments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stop-page.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
(2) The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illus-trated by points arranged vertically or horizontally. As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally.
Resistance to inserting large fragments of same patterns (vehicle stoppages) t pattern recognition algorithms. Red dot-considered method does not meet the given met only partially, green dot-criteria fully met.

Euclidean Distance
Cross-correlation Longest As can be seen in the table above, the DTW algorithm is also best suited for solving roblem presented in this case. The main reason here is the fact that, among the other ods, it performs the best in the case of stretching or shortening of some fragments of ignal, which would correspond to the vehicle operator covering the given route fragts more slowly or quickly, respectively. Similarly, it is also best when a given pattern sturbed, e.g., by a longer fragment of the signal corresponding to the machine's stop-.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for suring the similarity between two signals (time series) that may differ in length. The of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. es in the following columns and rows correspond to two signals respectively (e.g., A B). Let's consider the following two time series: = , , … , , … , , The presented matrix symbolizes all possible matches of the value of signal A to the e of signal B. The green points symbolize the optimal match of two signals, found by . The optimal solution is chosen by minimizing the Euclidean distance between the ts. The different length of the signals implies the necessity to match at least one value the shorter signal to several values from the longer signal (surjection). This is illusd by points arranged vertically or horizontally. arison of different pattern recognition algorithms. Red dot-considered method does not meet the given dot-criteria are met only partially, green dot-criteria fully met.

Euclidean Distance
Cross-correlation Longest As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally. Resistance to inserting large fragments of same patterns (vehicle stoppages)

Noise immunity
No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally. Applies to signals of different length Resistance to shortening/lengthening pattern fragments (different vehicle speed) Resistance to inserting large fragments of same patterns (vehicle stoppages) Noise immunity No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route frag-ments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stop-page.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: (2) The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illus-trated by points arranged vertically or horizontally. Applies to signals of different length Resistance to shortening/lengthening pattern fragments (different vehicle speed) Resistance to inserting large fragments of same patterns (vehicle stoppages) Noise immunity No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route frag-ments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stop-page.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: (2) The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illus-trated by points arranged vertically or horizontally. Applies to signals of different length Resistance to shortening/lengthening pattern fragments (different vehicle speed) Resistance to inserting large fragments of same patterns (vehicle stoppages) Noise immunity No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route frag-ments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stop-page.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: (2) The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illus-trated by points arranged vertically or horizontally. Resistance to inserting large fragments of same patterns (vehicle stoppages)

Noise immunity
No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally.
Noise immunity t pattern recognition algorithms. Red dot-considered method does not meet the given met only partially, green dot-criteria fully met.

Euclidean Distance
Cross-correlation Longest As can be seen in the table above, the DTW algorithm is also best suited for solving roblem presented in this case. The main reason here is the fact that, among the other ods, it performs the best in the case of stretching or shortening of some fragments of ignal, which would correspond to the vehicle operator covering the given route fragts more slowly or quickly, respectively. Similarly, it is also best when a given pattern sturbed, e.g., by a longer fragment of the signal corresponding to the machine's stop-.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for suring the similarity between two signals (time series) that may differ in length. The of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. es in the following columns and rows correspond to two signals respectively (e.g., A B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
The presented matrix symbolizes all possible matches of the value of signal A to the e of signal B. The green points symbolize the optimal match of two signals, found by . The optimal solution is chosen by minimizing the Euclidean distance between the ts. The different length of the signals implies the necessity to match at least one value the shorter signal to several values from the longer signal (surjection). This is illusd by points arranged vertically or horizontally. arison of different pattern recognition algorithms. Red dot-considered method does not meet the given dot-criteria are met only partially, green dot-criteria fully met.

Euclidean Distance
Cross-correlation Longest As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally. lies to signals of different length tance to shortening/lengthening pattern fragments (different vehicle speed) tance to inserting large fragments of same patterns (vehicle stoppages) e immunity eed for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route frag-ments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stop-page.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: (2) The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illus-trated by points arranged vertically or horizontally. Resistance to inserting large fragments of same patterns (vehicle stoppages)

Noise immunity
No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally. Resistance to inserting large fragments of same patterns (vehicle stoppages)

Noise immunity
No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally. Resistance to inserting large fragments of same patterns (vehicle stoppages)

Noise immunity
No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally. Resistance to inserting large fragments of same patterns (vehicle stoppages)

Noise immunity
No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally. in the table above, the DTW algorithm is also best suited for solving ed in this case. The main reason here is the fact that, among the other s the best in the case of stretching or shortening of some fragments of uld correspond to the vehicle operator covering the given route fragor quickly, respectively. Similarly, it is also best when a given pattern a longer fragment of the signal corresponding to the machine's stoparping arlier, Dynamic Time Warping (DTW) is one of the algorithms for arity between two signals (time series) that may differ in length. The in the form of a two-dimensional matrix is presented in Figure 2. ing columns and rows correspond to two signals respectively (e.g., A r the following two time series: = , , … , , … , , = , , … , , … , . matrix symbolizes all possible matches of the value of signal A to the e green points symbolize the optimal match of two signals, found by olution is chosen by minimizing the Euclidean distance between the length of the signals implies the necessity to match at least one value nal to several values from the longer signal (surjection). This is illus-t pattern recognition algorithms. Red dot-considered method does not meet the given met only partially, green dot-criteria fully met.

Euclidean Distance Cross-correlation
Longest As can be seen in the table above, the DTW algorithm is also best suited for solving problem presented in this case. The main reason here is the fact that, among the other hods, it performs the best in the case of stretching or shortening of some fragments of signal, which would correspond to the vehicle operator covering the given route fragts more slowly or quickly, respectively. Similarly, it is also best when a given pattern sturbed, e.g., by a longer fragment of the signal corresponding to the machine's stope.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for suring the similarity between two signals (time series) that may differ in length. The of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. es in the following columns and rows correspond to two signals respectively (e.g., A B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
The presented matrix symbolizes all possible matches of the value of signal A to the e of signal B. The green points symbolize the optimal match of two signals, found by . The optimal solution is chosen by minimizing the Euclidean distance between the ts. The different length of the signals implies the necessity to match at least one value the shorter signal to several values from the longer signal (surjection). This is illus-mparison of different pattern recognition algorithms. Red dot-considered method does not meet the given ow dot-criteria are met only partially, green dot-criteria fully met. As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illus- Resistance to inserting large fragments of same patterns (vehicle stoppages)

Noise immunity
No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illus- Resistance to inserting large fragments of same patterns (vehicle stoppages)

Noise immunity
No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illus- Resistance to inserting large fragments of same patterns (vehicle stoppages)

Noise immunity
No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illus- Resistance to inserting large fragments of same patterns (vehicle stoppages)

Noise immunity
No need for arbitrary selection of parameters As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: = , , … , , … , , = , , … , , … , .
The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illus-As can be seen in the table above, the DTW algorithm is also best suited for solving the problem presented in this case. The main reason here is the fact that, among the other methods, it performs the best in the case of stretching or shortening of some fragments of the signal, which would correspond to the vehicle operator covering the given route fragments more slowly or quickly, respectively. Similarly, it is also best when a given pattern is disturbed, e.g., by a longer fragment of the signal corresponding to the machine's stoppage.

Dynamic Time Warping
As explained earlier, Dynamic Time Warping (DTW) is one of the algorithms for measuring the similarity between two signals (time series) that may differ in length. The idea of the algorithm in the form of a two-dimensional matrix is presented in Figure 2. Values in the following columns and rows correspond to two signals respectively (e.g., A and B). Let's consider the following two time series: Appl. Sci. 2021, 11, x FOR PEER REVIEW 8 of 19 Figure 2. The matchings for the compared A and B signals can be presented on a two-dimensional matrix.
The above example shows only when the algorithm finds the optimal match indicated by the smallest Euclidean distance value. The values of this distance for each pair of readings, normalized to the range (0, 1), correspond to the probability of matching this pair, where 0 is a full match and 1 is no match. The pseudo-code of the Dynamic Time Warping algorithm is presented in Algorithm 1. The presented matrix symbolizes all possible matches of the value of signal A to the value of signal B. The green points symbolize the optimal match of two signals, found by DTW. The optimal solution is chosen by minimizing the Euclidean distance between the points. The different length of the signals implies the necessity to match at least one value from the shorter signal to several values from the longer signal (surjection). This is illustrated by points arranged vertically or horizontally.
The above example shows only when the algorithm finds the optimal match indicated by the smallest Euclidean distance value. The values of this distance for each pair of readings, normalized to the range (0, 1), correspond to the probability of matching this pair, The way in which the described method can be used in the process of correcting the vehicle location is shown in Figure 4. (a) vehicle position as calculated using method described in [39]; (b) selection of characteristic road patterns; (c) vehicle position after correction, using methods described in [29]; (d) recognition of patterns using DTW algorithm for further evaluation and path correction. It can be seen that during one haulage cycle, the same part of the route is covered by the vehicle in two different directions; therefore, two patterns should be saved in the catalog.

Description of the Experiment in Laboratory Conditions
In the first step, the proposed algorithm was tested on a test rig with the use of a wheeled robot (Figure 5a) with sensors enabling, among other things, the measurement of driving speed, vibration, gyroscope, and accelerometer signals.
As a part of the experiments, five different 18 cm wide road modules (panels) made of cardboard, bottle caps, and pens were prepared. The combinations of these modules created characteristic patterns on the longer route. The scheme of the prepared patterns is presented in Figure 6. The scheme shows the following patterns: (1) alternating caps; (2) caps evenly distributed on one side; (3) three consecutive humps at different distances, with the same height; (4) modification of pattern three with different hump heights; (5) two humps of the same height, but the second is three times as long. le in two different directions; therefore, two patterns should be saved in the catalog.

Description of the Experiment in Laboratory Conditions
In the first step, the proposed algorithm was tested on a test rig with the use of a wheeled robot (Figure 5a) with sensors enabling, among other things, the measurement of driving speed, vibration, gyroscope, and accelerometer signals. As a part of the experiments, five different 18 cm wide road modules (panels) made of cardboard, bottle caps, and pens were prepared. The combinations of these modules created characteristic patterns on the longer route. The scheme of the prepared patterns is presented in Figure 6. The scheme shows the following patterns: (1) alternating caps; (2) caps evenly distributed on one side; (3) three consecutive humps at different distances, x FOR PEER REVIEW 11 of 19 with the same height; (4) modification of pattern three with different hump heights; (5) two humps of the same height, but the second is three times as long. During the experiment, 10 training drives were performed to learn every single pattern, and then three test drives (for each module) were conducted to verify the pattern recognition algorithm. The training drives were made using the following panel combinations: (a) panels 1-5 arranged directly one after the other, (b) panels 1, 3, and 5 arranged directly one after the other, (c) isolated panels 1, 3, and 5.
The test routes were created by placing one of the patterns at the beginning and the other panels later. Such drives were made for each of the a-c patterns.

Application of the Algorithm
The signal used for pattern recognition is the Z-axis accelerometer values. These are the linear acceleration values measured along the axis perpendicular to the plane on which the vehicle is driving. These values are therefore proportional to the vibration on this axis and seem to correspond best to the problem presented. Figure 7 shows four examples of accelerometer signals measured during training drives for the first pattern-(a) panels 1-5 directly one after the other. It can be seen that the signals vary in length and it is difficult to visually determine the similarities between them. During the experiment, 10 training drives were performed to learn every single pattern, and then three test drives (for each module) were conducted to verify the pattern recognition algorithm. The training drives were made using the following panel combinations: (a) panels 1-5 arranged directly one after the other, (b) panels 1, 3, and 5 arranged directly one after the other, (c) isolated panels 1, 3, and 5.
The test routes were created by placing one of the patterns at the beginning and the other panels later. Such drives were made for each of the a-c patterns.

Application of the Algorithm
The signal used for pattern recognition is the Z-axis accelerometer values. These are the linear acceleration values measured along the axis perpendicular to the plane on which the vehicle is driving. These values are therefore proportional to the vibration on this axis and seem to correspond best to the problem presented. Figure 7 shows four examples of accelerometer signals measured during training drives for the first pattern-(a) panels 1-5 directly one after the other. It can be seen that the signals vary in length and it is difficult to visually determine the similarities between them.
The signal used for pattern recognition is the Z-axis accelerometer values. These are the linear acceleration values measured along the axis perpendicular to the plane on which the vehicle is driving. These values are therefore proportional to the vibration on this axis and seem to correspond best to the problem presented. Figure 7 shows four examples of accelerometer signals measured during training drives for the first pattern-(a) panels 1-5 directly one after the other. It can be seen that the signals vary in length and it is difficult to visually determine the similarities between them.   Figure 8 shows the graphs of the Z-axis accelerometer for three test drives along the route containing pattern (a). It can be seen that there is a greater variance in the first part of the signal, which corresponds to driving through the panels of the pattern that were placed at the start of the route. At the same time, it can be seen that this fragment is much longer, containing the first 7-8 s of the signal (training drives lasted up to 2 s). This is mainly due to the necessity of frequent correction of the vehicle's route and deliberate stopping before entering the ramp that was placed behind the pattern.
Appl. Sci. 2021, 11, x FOR PEER REVIEW 12 of 19 Figure 8 shows the graphs of the Z-axis accelerometer for three test drives along the route containing pattern (a). It can be seen that there is a greater variance in the first part of the signal, which corresponds to driving through the panels of the pattern that were placed at the start of the route. At the same time, it can be seen that this fragment is much longer, containing the first 7-8 s of the signal (training drives lasted up to 2 s). This is mainly due to the necessity of frequent correction of the vehicle's route and deliberate stopping before entering the ramp that was placed behind the pattern. The accelerometer measurements during the test drives were compared with the signals corresponding to the pattern for each training drive. An example of the results of the normalized Euclidean distance, which is the result of the DTW algorithm, is presented in Figure 9. It can be seen that the signals look very similar in each drive, which results from experimenting in laboratory conditions. It is not expected to obtain similar repeatability during subsequent drives in industrial conditions. In each case, the moment of the pattern occurrence was correctly detected as the fragment with the lowest normalized DTW distance. In Figure 9, these are the fragments marked with a green circle. The accelerometer measurements during the test drives were compared with the signals corresponding to the pattern for each training drive. An example of the results of the normalized Euclidean distance, which is the result of the DTW algorithm, is presented in Figure 9. It can be seen that the signals look very similar in each drive, which results from experimenting in laboratory conditions. It is not expected to obtain similar repeatability during subsequent drives in industrial conditions. In each case, the moment of the pattern occurrence was correctly detected as the fragment with the lowest normalized DTW distance. In Figure 9, these are the fragments marked with a green circle.
The accelerometer measurements during the test drives were compared with the signals corresponding to the pattern for each training drive. An example of the results of the normalized Euclidean distance, which is the result of the DTW algorithm, is presented in Figure 9. It can be seen that the signals look very similar in each drive, which results from experimenting in laboratory conditions. It is not expected to obtain similar repeatability during subsequent drives in industrial conditions. In each case, the moment of the pattern occurrence was correctly detected as the fragment with the lowest normalized DTW distance. In Figure 9, these are the fragments marked with a green circle.  The same method was repeated for the subsequent shorter patterns-(b) composed of panels 1, 3, and 5 arranged directly one after the other; and (c) isolated panels 1, 3, and 5. In case (b), despite the shortened pattern, good results were still obtained, where the detection of the moment of pattern occurrence was possible for each signal (an example of matches is presented in Figure 10). However, there were signals in which too high a threshold resulted in a wrong match (the fragment marked with a yellow circle). The same method was repeated for the subsequent shorter patterns-(b) composed of panels 1, 3, and 5 arranged directly one after the other; and (c) isolated panels 1, 3, and 5. In case (b), despite the shortened pattern, good results were still obtained, where the detection of the moment of pattern occurrence was possible for each signal (an example of matches is presented in Figure 10). However, there were signals in which too high a threshold resulted in a wrong match (the fragment marked with a yellow circle). On the other hand, when using only single panels as a pattern, it cannot be said that the DTW method allows the determination of the moment of pattern occurrence. Figure  11 shows exemplary results using panel number 3. The erroneous detection of the moment of pattern occurrence is marked in red, and the fragment that should have been detected is marked in green. However, it should be remembered that in this case, the length of the pattern was about 18 cm, which is approximately the wheelbase of the remote vehicle used for testing. This shows that the pattern must be long and complex enough to be detected by the DTW algorithm. On the other hand, when using only single panels as a pattern, it cannot be said that the DTW method allows the determination of the moment of pattern occurrence. Figure 11 shows exemplary results using panel number 3. The erroneous detection of the moment of pattern occurrence is marked in red, and the fragment that should have been detected is marked in green. However, it should be remembered that in this case, the length of the pattern was about 18 cm, which is approximately the wheelbase of the remote vehicle used for testing. This shows that the pattern must be long and complex enough to be detected by the DTW algorithm. of pattern occurrence is marked in red, and the fragment that should have been detected is marked in green. However, it should be remembered that in this case, the length of the pattern was about 18 cm, which is approximately the wheelbase of the remote vehicle used for testing. This shows that the pattern must be long and complex enough to be detected by the DTW algorithm.  The summary of the tests conducted in the laboratory stands for different lengths of the pattern are presented in Table 2. As it can be seen, the proposed method returns reliable results for the patterns consisting of five and three panels (90 cm and 54 cm respectively), but a one panel pattern turned out to be insufficient for the problem being considered.

Application to Industrial Data
Using data from vehicles operating in industrial conditions, it was decided to conduct a simple simulation to verify the conclusions obtained during laboratory tests. The machines have a built-in on-board monitoring system that measures different types of operational parameters, such as vehicle speed. Additionally, the machine was equipped with an IMU, which allows the obtainment of a signal from an accelerometer. The speed and Z-axis accelerometer (direction: up-down) signals made it possible to create a threestate classification of road quality [39,41]. The results of this classification will be used as a signal to test the possibility of recognizing road patterns. Sample results for selected cycles of haulage process from one shift are presented in Figure 11. Subsequent cycles are performed on the same routes. Additionally, in each cycle, the machine traveled to a set point and returned along the same route. However, separate patterns were created for both of these drives. Similarities between the signals can be seen; however, there are different lengths of the same patterns, and time shifts between different sections are also visible.
When comparing two of the presented paths by using DTW implementation in the DTW library in R language, a cumulative cost density with an over-imposed warping path can be plotted using the dtwPlotDensity function. This, applied to cycles 13 and 14 from Figure 12, is presented in Figure 13.
both of these drives. Similarities between the signals can be seen; however, there are different lengths of the same patterns, and time shifts between different sections are also visible.
When comparing two of the presented paths by using DTW implementation in the DTW library in R language, a cumulative cost density with an over-imposed warping path can be plotted using the dtwPlotDensity function. This, applied to cycles 13 and 14 from Figure 12, is presented in Figure 13.  The blue line represents an optimal alignment on a field, where the high cost of an assignment has been presented with a red-orange color and low cost with a green color.

Creating Patterns
In the signals, it was decided to select fragments that would constitute patterns. For example, for cycle number 13, three patterns were selected: A (duration 24 s), B (19 s) C (37 s), which are shown in Figure 14. The blue line represents an optimal alignment on a field, where the high cost of an assignment has been presented with a red-orange color and low cost with a green color.

Creating Patterns
In the signals, it was decided to select fragments that would constitute patterns. For example, for cycle number 13, three patterns were selected: A (duration 24 s), B (19 s) C (37 s), which are shown in Figure 14.
The blue line represents an optimal alignment on a field, where the high cost of an assignment has been presented with a red-orange color and low cost with a green color.

Creating Patterns
In the signals, it was decided to select fragments that would constitute patterns. For example, for cycle number 13, three patterns were selected: A (duration 24 s), B (19 s) C (37 s), which are shown in Figure 14. Then, to expand the training sample, it was decided to simulate the distortion of the patterns. This was done by lengthening or shortening some fragments several times. An example of a modification record for a signal consisting of 19 readings can be presented as follows: _ = 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1 .
Then, to expand the training sample, it was decided to simulate the distortion of the patterns. This was done by lengthening or shortening some fragments several times. An example of a modification record for a signal consisting of 19 readings can be presented as follows: arti f icial_series = {1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1}. ( Successive values correspond to the number of repetitions of each subsequent signal fragment. This means that the output signal will now be 25 readings long, the first four readings will not be changed, the fifth one will be repeated three times, etc.

Pattern Detection
The patterns determined in this way and their distortions could be found in raw signals using the DTW algorithm. An exemplary adjustment of the B pattern and its two modifications to the signal using the DTW method is shown in Figure 15. It can be seen that the DTW distance signal for distorted patterns changes slightly, but the detection of the moment of pattern occurrence is still possible (the fragment is marked on the signal with an ellipse). This shows that the discussed method also allows the detection of path patterns when applied to industrial data. Additionally, it is resistant to different signal lengths, which is a key problem in the case of time series. However, this method would require more comprehensive tests of real conditions, strictly in order to confirm its effectiveness. Successive values correspond to the number of repetitions of each subsequent signal fragment. This means that the output signal will now be 25 readings long, the first four readings will not be changed, the fifth one will be repeated three times, etc.

Pattern Detection
The patterns determined in this way and their distortions could be found in raw signals using the DTW algorithm. An exemplary adjustment of the B pattern and its two modifications to the signal using the DTW method is shown in Figure 15. It can be seen that the DTW distance signal for distorted patterns changes slightly, but the detection of the moment of pattern occurrence is still possible (the fragment is marked on the signal with an ellipse). This shows that the discussed method also allows the detection of path patterns when applied to industrial data. Additionally, it is resistant to different signal lengths, which is a key problem in the case of time series. However, this method would require more comprehensive tests of real conditions, strictly in order to confirm its effectiveness. Figure 15. DTW distance between the road quality signal for cycle 13 and pattern B and its modifications.

Conclusions
The location of LHD in underground mining excavations is a key issue not only from the point of view of navigation and automation of the haulage process and increasing safety through anti-collision systems, but also the development of advanced analytics in the field of predictive traffic maintenance, production planning, and optimization of horizontal transport. For indoor conditions, especially underground, the range of available technology is limited. Internal sensors such as inertial, odometry, and heading angle are commonly used to estimate the absolute position of the vehicle in the fixed real-world Figure 15. DTW distance between the road quality signal for cycle 13 and pattern B and its modifications.

Conclusions
The location of LHD in underground mining excavations is a key issue not only from the point of view of navigation and automation of the haulage process and increasing safety through anti-collision systems, but also the development of advanced analytics in the field of predictive traffic maintenance, production planning, and optimization of horizontal transport. For indoor conditions, especially underground, the range of available technology is limited. Internal sensors such as inertial, odometry, and heading angle are commonly used to estimate the absolute position of the vehicle in the fixed real-world coordinate system. Their main disadvantage is high susceptibility to scale errors and offsets which lead to unbounded errors on the position estimate. For this reason, it is necessary to correct them through additional sources of information from the LHD environment. In practice, solutions based on the detection of artificial beacons or natural features of the environment are used. Therefore, such solutions require the fusion of data from internal sensors embedded on the machine and the expansion of the infrastructure in its surroundings, which is not cost-effective both from the point of view of construction and maintenance of such a system. For the needs of post-factum analytics development, the mining industry is expected to develop a cheap and possibly non-invasive system, preferably based on a single data source. For this reason, we fill this niche by proposing an approach based solely on the accelerometer signal and digital map. In the article, we have focused on the issue of identifying the characteristic road surface patterns that will serve as control points for the correction of the estimated movement path on the map. In our case, the task comes down to recognizing the patterns hidden in the accelerometer signal along the Z-axis resulting from different height profiles of pavement. These patterns are not visible in the raw signals; therefore, we have proposed using the three-state road quality classification procedure for their extraction. Having a pattern database for various local mine points, we can further identify them while processing subsequent signals. This issue is related to the identification of similarity in signals (or their segments) and is commonly known in the literature as the time series matching approach. The most popular approach to measuring the similarity/dissimilarity between two time series is to estimate the Euclidean distance on the transformed representation. In our case, we chose the DTW algorithm because it is resistant to the boundary conditions of the investigated task (different runs of the machine in relation to the width of the road, unplanned stoppages, and different driving speeds resulting in different signal lengths and pattern distribution, the influence of driving speed and cargo box load on vibration level, and input data in flag form). The described concept was presented and validated on a laboratory stand, with the real industrial data being recorded by the LHD vehicle operating in an underground mine. The minimal length of the pattern was established as three times the wheelbase of the vehicle. For that pattern length, we were able to accurately identify different patterns for each of the three conducted test drives. The advantage of using the DTW method is the algorithm robustness to the signal distortion, consisting of the stretching or shortening of its specific fragments, which would correspond to operators covering given parts of the route more slowly or quickly, respectively.