# Trajectory Tracking Algorithm Study of Coal Mine Water Detector Drilling Bar Installation
## 2 Motion Attitude Analysis Based on the MDH Method  
In Figure 3 below, 3 is the base seats, 4, 5, 7, 8 are joints, 6 is the functional connectors, and 9 is the mechanical tongs, composing the supplied material device. The drilling bars are placed on the storage rack, and the supplied material device transports the new drilling bars from the storage rack to the planned installation location. A precise connection of the new drilling bars with the front drilling bars' position can be achieved by adjusting the positional attitude of the mechanical tongs. A diagram of the relative positions is shown in Figure 3.  
We preliminarily established the dynamic analysis model of the supplied material device by precisely defining its positional attitude. The supplied material device, formed by a series of functional connectors through the rotary joint, is a type of open-motion chain, and its characteristics comply with the MDH method [12]. Based on the above methods, the establishment of kinematic structural model was achieved, as shown in Figure 4. Based on the location of the rotary joint, four rectangular coordinates were established, with serial numbers of 0, 1, 2, and 3. The base coordinate corresponds to the 0 coordinate. The origin coordinate is at the bottom seat of the supplied material device, with the remaining three coordinates being the second and three rotary joints and the arm joints, respectively. The MDH coordinate model is shown in Figure 5.  
Figure 4: Kinematic structural model of the supplied material device. Figure 3: Illustration of drilling bars’ placement. 1—Drilling bars. 2—Storage rack. 3—Base seats. 4—Joint1. 5—Joint2. 6—Functional connector. 7—Joint3. 8—Joint4. 9—Mechanical tongs. 10—The front drilling bars. 11—Chuck. 12—Support frame. Based on the coordinate model in Figure 4, the D-H parameters of the supplied material device are listed in Table 1. The meaning of the parameters is as follows: \(a\) is the length of the connecting rod, representing the distance between joint \(z_{i}\) and \(z_{i+1}\) along the \(x\) axis; \(\alpha\) is the angle of rotation, representing the changes in the rotation angle of joint \(z_{i}\) to \(z_{i+1}\) around the \(x\) axis; \(d\) is the offset distance, representing the distance between joint \(x_{i}\) and \(x_{i+1}\) along the \(z\) axis; \(\theta\) is the angle of the connecting rod, representing the changes in the rotation angle of joint \(x_{i}\) to \(x_{i+1}\) around the \(z\) axis, where \(x_{1}\) and \(x_{0}\) coincide when \(\theta_{1}\) is equal to \(0^{\circ}\)[13]. The angular displacement of each joint was designed using the forward kinematics of the robot [14]. At the same time, the positional attitude of the end coordinates of the hand were solved in relation to the base coordinate system. We resolved the positional attitude of the hand using known linear parameters and joint variables. The homogeneous transformation matrix of the adjacent connecting rod coordinate system, based on the rigid body posture attitude transformation theory, is as follows [15]:  
\[ \begin{array}{c}\mathrm{i-1}\mathrm{T}=\begin{bmatrix}\mathrm{R}&\mathrm{P} \\ 0&1\end{bmatrix}=\begin{bmatrix}\cos\theta_{\mathrm{i}}&-\sin\theta_{\mathrm{i} }&0&\mathrm{a}_{\mathrm{i-1}}\\ \sin\theta_{\mathrm{i}}\cos\alpha_{\mathrm{i-1}}&\cos\theta_{\mathrm{i}}\cos \alpha_{\mathrm{i-1}}&-\sin\alpha_{\mathrm{i-1}}&-\mathrm{d}_{\mathrm{i}} \sin\alpha_{\mathrm{i-1}}\\ \sin\theta_{\mathrm{i}}\sin\alpha_{\mathrm{i-1}}&\cos\theta_{\mathrm{i}}\sin \alpha_{\mathrm{i-1}}&\cos\alpha_{\mathrm{i-1}}&-\mathrm{d}_{\mathrm{i}} \cos\alpha_{\mathrm{i-1}}\\ 0&0&0&1\end{bmatrix}\end{array}  \tag{1}\]  
By substituting the D-H parameter values in Table 1 into Formula (1) for calculation, the coordinate transformation matrix from joint1 to joint4 of the profiling mechanism can be obtained as follows:  
\[ \begin{array}{c}\mathrm{0}\mathrm{T}=\begin{bmatrix}\cos\theta_{1}&-\sin \theta_{1}&0&0\\ \sin\theta_{1}&\cos\theta_{1}&0&0\\ 0&0&1&0\\ 0&0&0&1\end{bmatrix}\end{array}  \tag{2}\]