# Localization of LHD Machines in Underground Conditions Using IMU Sensors and DTW Algorithm
## 2 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  
Figure 1: Investigated object—underground haul truck used in the conducted experiments. Load capacity: 24,000 kg, engine power: 172 kW, top speed: 25 km/h [38]. 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^{\circ}\) 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:  
\[\alpha(t)=\int_{0}^{t}Gyr_{Z}(x)dx \tag{1}\]  
where \(\alpha(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, [PERSON]'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.