## 2 Preliminaries
### Kinematic Modeling  
The kinematics of robotic arms primarily reflect the relationships among displacements, velocities, and accelerations between joints. In this study, a six-degrees-of-freedom welding robotic arm is modeled using the Denavit-Hartenberg (D-H) parameter method [30]. As a standard approach for serial robotic arm kinematic modeling, the D-H parameter method is both rigorous and widely applicable. Based on this method, the geometric relationships of the robotic arm's joints are systematically described, and the standard D-H parameters are presented in Table 1. A picture of the robotic arm with some of the DH parameters marked is shown in Figure 2.  
Figure 1: Overall environment architecture.  
The robotic arm possesses six degrees of freedom, allowing the end-effector's pose and position to be represented by \(\prescript{0}{6}{T}\). Vectors \(n\), \(o\), and \(a\) form a \(3\times 3\) matrix that describes the end effector's pose, while the vector \(p\) denotes its positional information. Utilizing the D-H parameters presented in Table 1, the link transformation matrices of the robotic arm can be determined.The following is the expression for the transformation matrix \(\prescript{0}{6}{T}\) between the base coordinate frame and the end effector coordinate frame:  
\[\prescript{0}{6}{T}=\prod_{i=1}^{6}i^{-1}T(q_{i}) \tag{1}\]  
Here, the superscript of the coordinate \(T\) denotes the coordinate system being transformed, while the subscript indicates the target coordinate system; \((n_{x},n_{y},n_{z})\) represents the normal vector of the robotic arm's end effector; \((o_{x},o_{y},o_{z})\) indicates the sliding vector; \((a_{x},a_{y},a_{z})\) is the approach vector; and \((p_{x},p_{y},p_{z})\) represents the position vector of the end effector. The homogeneous transformation matrix \(i^{-1}T\) describes the pose of link \(i\)'s coordinate system relative to that of link \(i-1\), as shown by the following formula:  
\[\prescript{i-1}{T}(q_{i})=\begin{bmatrix}\cos\theta_{i}&-\sin\theta_{i}\cos \alpha_{i}&\sin\theta_{i}\sin\alpha_{i}&a_{i}\cos\theta_{i}\\ \sin\theta_{i}&\cos\theta_{i}\cos\alpha_{i}&-\cos\theta_{i}\sin\alpha_{i}&a_{ i}\sin\theta_{i}\\ 0&\sin\alpha_{i}&\cos\alpha_{i}&d_{i}\\ 0&0&0&1\end{bmatrix} \tag{2}\]  
The final link is typically referred to as the end effector, to which an effector with a reference frame (e.g., a welding torch) is attached. The homogeneous transformation matrix of the end effector relative to the base link, denoted as \(\prescript{0}{6}{T}(q)=\prescript{0}{6}{T}(q)\prescript{0}{6}{T}\), can be defined as:  
\[x_{e}=fkine(q) \tag{3}\]  
\begin{table}
\begin{tabular}{c c c c c c} \hline
**Link \(i\)** & \(\theta_{i}\) (°) & \(d_{i}\) (_m_) & \(a_{i}\) (_m_) & \(a_{i}\) (°) & \(\theta_{i}\) Range (°) \\ \hline
1 & \(q_{1}\) & 0 & 0 & -90 & \([-180,180]\) \\
2 & \(q_{2}-90\) & \(-0.1265\) & 0.726 & 0 & \([-85,85]\) \\
3 & \(q_{3}-180\) & \(-0.096\) & 0 & 90 & \([-40,220]\) \\
4 & \(q_{4}\) & 0.6305 & 0 & 90 & \([-90,90]\) \\
5 & \(q_{5}\) & 0.091 & 0 & \(-90\) & \([-90,90]\) \\
6 & \(q_{6}\) & 0.122 & 0 & 0 & \([-360,360]\) \\ \hline \end{tabular}
\end{table}
Table 1: D-H parameters of the robotic arm.  
Figure 2: Robotic arm 3D model.  
where \(x_{e}=\left[\begin{array}{cc}p_{e}&\phi_{e}\end{array}\right]^{T}\in R^{6}\) represents the pose, in which \(p_{e}\) is the three-dimensional position and \(\phi_{e}\) denotes the orientation in Cartesian space.  
As most motions are defined directly in Cartesian space, the robot arm needs to convert Cartesian motion into joint motion in joint space. If the Cartesian velocity of the end effector \(\dot{x}_{e}\) is given, the corresponding joint velocity \(\dot{q}\) is expressed as follows:  
\[\dot{q}=J^{-1}(q)\,\dot{x}_{e} \tag{4}\]  
where \(J(q)\) represents the 6 \(\times\) 6 Jacobian matrix of the six-degree-of-freedom robotic arm.