# Inverse Kinematics of Large Hydraulic Manipulator Arm Based on ASWO Optimized BP Neural Network
## 2 Forward Modeling and Error Analysis of the Robotic Arm
### Forward Modeling of the Robotic Arm  
This paper takes the G3 Zi rock drill dolly mechanical arm as the research object, which has five rotary joints and two translational joints. The length of the arm is about 7.84 m, and it reaches 11.5 m when the translational joints are fully extended. This is a kind of large hydraulic arm, as shown in Figure 1.  
The standard DH method is used to establish the coordinate system of the robotic arm, rod, as shown in Figure 2.  
The DH parameter values for each joint of the model, including the rotation angle \(\theta_{i}\), link offset \(d_{i}\), twist angle \(\alpha_{i}\), and link length \(a_{i}\), are presented in Table 1.  
Figure 1: G3 Zi rock drilling rig.  
Figure 2: The DH model structure of the robotic arm.  
\(\theta_{i}\) denotes the angle at which the \(X_{i-1}\) axis is rotated about the \(Z_{i-1}\) axis until it is parallel to the \(X_{i}\) axis. \(d_{i}\) denotes the distance at which the \(X_{i-1}\) axis is translated along the \(Z_{i-1}\) axis until it is co-linear on the \(X_{i}\) axis. \(\alpha_{i}\) denotes the angle at which the \(Z_{i-1}\) axis is rotated about the \(Z_{i-1}\) axis until it coincides with the \(Z_{i}\) axis. \(a_{i}\) represents the distance of translation along the \(X_{i}\) axis until point \(O_{i-1}\) moves to point \(O_{i}\). The pose matrix between adjacent coordinate systems is shown in Equation (1), and the end-effector pose matrix is given in Equation (2), where \(c\theta_{i}\) is an abbreviation for \(cos\theta_{i}\), and \(s\alpha_{i}\) is a shorthand for \(sina_{i}\).  
\[\begin{split}\begin{split}\begin{split} \begin{subarray}{c}i-1\\ i\end{subarray}T=\left[\begin{array}{cccc}c\theta_{i}&-s\theta_{i}c \alpha_{i}&s\theta_{i}s\alpha_{i}&a_{i}c\theta_{i}\\ s\theta_{i}&c\theta_{i}c\alpha_{i}&-c\theta_{i}s\alpha_{i}&a_{i}s\theta_{i} \\ 0&s\alpha_{i}&c\alpha_{i}&d_{i}\\ 0&0&0&1\end{array}\right]\end{split}\end{split} \tag{1}\]  
\[\begin{split}\begin{split}\begin{subarray}{c} 0\\ \gamma\end{subarray}T=\prod_{i=1}^{7}i-1T=\left[\begin{array}{cccc}\frac{0}{7}R_{ 3\times 3}&\frac{0}{7}P_{3\times 1}\\ 0&1\end{array}\right]=\left[\begin{array}{cccc}n_{x}&o_{x}&a_{x}&p_{x}\\ n_{y}&o_{y}&a_{y}&p_{y}\\ n_{z}&o_{z}&a_{z}&p_{z}\\ 0&0&0&1\end{array}\right]\end{split}\end{split} \tag{2}\]  
In the configuration of the robotic manipulator, \(\begin{subarray}{c}i-1\\ i\end{subarray}T\) represents the pose transformation matrix from the \(i\) point to the \(i-1\) joint. As defined in Equation (2), \(\begin{subarray}{c}0\\ \gamma\end{subarray}R_{3\times 3}\) denotes the end-effector's orientation, and \(\begin{subarray}{c}0\\ \gamma\end{subarray}R_{3\times 1}\) signifies the end position.The end-effector's orientation \(\begin{subarray}{c}0\\ \gamma\end{subarray}R_{3\times 3}\) is the deflection angle of the end-effector coordinate system under the base coordinate system, and in this paper, we use the XYZ fixed angle method to describe the attitude, and the rotation matrix is shown in Equation (3). In inverse kinematics, the desired end-effector's orientation (typically specified in angles) can be swiftly converted into a rotation matrix.  
\[\begin{split}\begin{subarray}{c}0\\ \gamma\end{subarray}R_{XYZ}(\gamma,\beta,\alpha)=\left[\begin{array}{cccc} c\alpha c\beta&cas\beta s\gamma-s\alpha c\gamma&cas\beta c\gamma+s\alpha s\gamma\\ s\alpha c\beta&s\alpha s\beta s\gamma+c\alpha c\gamma&s\alpha s\beta c\gamma- \alpha s\gamma\\ -s\beta&c\beta s\gamma&c\beta c\gamma\end{array}\right]\end{split} \tag{3}\]