# Autonomous Loading System for Load-Haul-Dump (LHD) Machines Used in Underground Mining
## 3 Proposed Autonomous Loading System
### Positioning and Charging  
After the draw point location and status have been determined, the loading routine continues with the positioning of the machine. Here, the LHD is continued to be driven forward using a \"guidance\" algorithm [34] until the machine's reference point (in this case its central articulation joint) is at a set distance from the center of the pile (computed as the center of gravity of the segmented points). Once this distance is met, small corrections to the steering angle are issued to ensure that the projected path lands within the limits of the rock pile. Finally, the bucket is lowered until a tight contact with the ground is achieved. A block diagram of this process is shown in Figure 11.  
The projected path for the machine aligning procedure (see Figure 12) is computed using the LHD's kinematic equations, reported in several previous publications, such as [35]:  
\[\partial[x,y,\theta]/\partial t=\Big{[}v\ \cos(\theta),v\ \sin(\theta),(v\ \sin( \gamma)+L_{r}\omega)/\Big{(}L_{f}\cos(\gamma)+L_{r}\Big{)}\Big{]} \tag{1}\]  
\[\partial\gamma/\partial t=\omega \tag{2}\]  
where \([x,y,\theta]\) is the pose of the LHD, \(v\) is the linear speed, \(\gamma\) is the steering angle of the LHD's pivot, \(\omega=\dot{\gamma}\) is the steering speed of the LHD's pivot, \(L_{r}\) is the length from the LHD's pivot to the rear wheel axis, and \(L_{f}\) is the length from the LHD's pivot to the front wheel axis. Since the next step of the autonomous loading routine, the charging against the rock pile, does not involve steering commands, a fixed steering angle (constant \(\gamma\), \(\omega=0\)) can be considered, which simplifies the model:  
\[\partial[x,y,\theta]/\partial t=[v\ \cos(\theta),v\ \sin(\theta),v\cdot K] \tag{3}\]  
where \(K\) is a constant value that depends on the LHD dimensions and the fixed steering angle. Equation (3) shows that an LHD charging against a rock pile will follow a circular trajectory, characterized by a center (\(C\)) and a curvature radius (\(R\)). Because the _rock pile identification_ step computed the left (\(E_{L}\)) and right (\(E_{R}\)) pile edges, the problem of determining if the LHD will collide with the rock pile simplifies to checking if the line  
Figure 11: Positioning block diagram. The machine is driven by a guidance system until a predefined distance to the rock pile is achieved. The steering angle of the LHD is then adjusted to ensure collision with the pile, and the bucket is lowered. between \(E_{L}\) and \(E_{R}\) intersects with both the circular path of the left and right sides of the LHD. Figure 12 shows a diagram of the described scenario. The solution for the intersection between a circle and a line segment is well known in the common literature and it involves computing the following discriminant value:  
\[\Delta=\left(2\overset{\rightharpoonup}{E\cdot}\overset{\rightharpoonup}{E \cdot}\overset{\rightharpoonup}{E}\right)^{2}-4\left|\overset{\rightharpoonup}{E} \right|^{2}\left(\left|\overset{\rightharpoonup}{E\cdot}\right|^{2}-R^{2}\right) \tag{4}\]  
where \(\overset{\rightharpoonup}{E}\) is the vector going from \(E_{R}\) to \(E_{L}\) and \(\overset{\rightharpoonup}{E\cdot}\) is the vector going from \(E_{R}\) to \(C\). If \(\Delta\) results in a negative value, then the infinite line defined by the points \(E_{R}\) and \(E_{L}\) never intersects the given circular path. On the other hand, if \(\Delta\) is positive, a solution exists. Let \(S_{1}\) and \(S_{2}\) be solutions to the intersection between the infinite line defined by \(E_{R}\) and \(E_{L}\) and the circle of center \(C\) and curvature radius \(R\):  
\[ \begin{split} S_{1}&=\frac{-2\overset{\rightharpoonup}{E \cdot}\overset{\rightharpoonup}{E\cdot}\overset{\rightharpoonup}{C}- \sqrt{\Delta}}{2\left|\overset{\rightharpoonup}{E}\right|}\\ S_{2}&=\frac{-2\overset{\rightharpoonup}{E \cdot}\overset{\rightharpoonup}{E\cdot}\overset{\rightharpoonup}{E\cdot} \overset{\rightharpoonup}{C}+\sqrt{\Delta}}{2\left|\overset{\rightharpoonup}{E} \right|}\end{split}