# Automated Docking System for LNG Loading Arm Based on Machine Vision and Multi-Sensor Fusion
## 2 Design of Docking Logic and Kinematic Analysis for LNG Loading Arm
### Kinematic Modeling and Docking Posture Control of LNG Loading Arms
#### 2.2.2 Definition of Jacobian Matrix  
To achieve precise adjustments of the loading arm's end-effector to the target position during the fine docking process, this paper introduces the Jacobian matrix to analyze the impact of joint angle variations on the position of the end-effector. The Jacobian matrix describes the linear relationship between changes in the end-effector's position and joint angles [25], expressed as follows:  
\[v=J*\dot{\theta} \tag{10}\]  
where \(v\) represents the velocity vector of the end-effector, \(\dot{\theta}\) represents the velocity vector of the joint angles, and \(J\) is the Jacobian matrix. The mathematical expression for the Jacobian matrix is as follows:  
\[J(\theta_{1},\theta_{2},\theta_{3})=\begin{bmatrix}\frac{\partial P_{x}}{ \partial\theta_{1}}&\frac{\partial P_{x}}{\partial\theta_{2}}&\frac{\partial P _{y}}{\partial\theta_{1}}\\ \frac{\partial P_{x}}{\partial\theta_{1}}&\frac{\partial P_{x}}{\partial \theta_{2}}&\frac{\partial P_{y}}{\partial\theta_{1}}\\ \frac{\partial P_{x}}{\partial\theta_{1}}&\frac{\partial P_{x}}{\partial \theta_{2}}&\frac{\partial P_{y}}{\partial\theta_{2}}\end{bmatrix} \tag{11}\]  
Each element of the Jacobian matrix describes the change in the end-effector's position in a specific direction caused by a small variation in a particular joint angle. For instance, \(\frac{\partial P_{x}}{\partial\theta_{1}}\) represents the influence of a slight variation in joint \(\theta_{1}\) on the end-effector's position in the \(x\) direction. Based on the kinematic characteristics of the loading arm, the position of the end-effector \(\left(P_{x},P_{y},P_{z}\right)\) can be expressed in terms of the joint angles. The forward kinematics model of the loading arm describes the relationship between the end-effector's position and the joint angles. Substituting this into Equation (11), the Jacobian matrix of the loading arm can be expressed as follows:  
\[J=\begin{bmatrix}J_{1}&J_{2}&J_{3}\end{bmatrix}^{T} \tag{12}\]  
where \(J_{1},J_{2},\text{ and }J_{3}\) are the row vectors of the Jacobian matrix, calculated as follows:  
\[J_{1}=\begin{bmatrix}-450\text{sin}(\theta_{1}+\theta_{2})-450\text{  
of each row in the Jacobian matrix, the joints that have the greatest influence on the corresponding positional components can be determined, enabling prioritization of these joints during adjustments.  
Since variations in joint angles affect multiple directional components, adjustments must consider all positional components simultaneously. The adjustment strategy is as follows:  
1. Vertical and horizontal: Priority is given to correcting errors in the x and z directions by driving the joints that have the greatest influence on these directions, thereby gradually reducing positional deviations;
2. Step-by-step advancement: After adjustments in the x and z directions are completed, the end-effector is driven to advance incrementally in the y direction, reducing front-back positional errors;
3. Iterative fine-tuning: To address potential positional deviations caused by disturbances such as wind and waves, the system continuously monitors and dynamically adjusts the posture until the end-effector is stably aligned with the target flange.  
Through this design, the Jacobian matrix provides not only a mathematical tool for precise adjustment of the end-effector but also significantly enhances the docking capabilities of the loading arm in dynamic environments, laying a solid foundation for safe and efficient automated docking.