# Localization of LHD Machines in Underground Conditions Using IMU Sensors and DTW Algorithm
## 2 General Assumptions in the Machine Location Tracking Problem
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. **Issue 2: Different speed when covering the same sections of the route and signal length:**  
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 full- cargo 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.