Research on position offset compensation of underwater manipulator

A compensation method for end position offset of underwater manipulator is presented in this paper. Firstly, the end deformation of the underwater manipulator is obtained by ANSYS analysis, and then the end position offset equation is obtained by MATLAB curve fitting. Finally, the equation is added to the kinematic model of the underwater manipulator, which improves the accuracy of the kinematic model of the underwater manipulator and lays a foundation for the accurate position control of the underwater manipulator.


Introduction
As an important equipment for underwater operation, underwater manipulator plays an important role in marine scientific investigation and mineral resources development [1][2]. The research on underwater manipulator has become a hot research topic at present.
The forward kinematics equation of the manipulator can be used for the forward control of the manipulator, and the inverse kinematics is the basis of the trajectory planning and motion control of the manipulator [3]. The establishment of the kinematics model is the basis of the follow-up robot arm related research, so the accuracy of the kinematics model is related to the accuracy of the follow-up research. However, the current kinematics model of the underwater manipulator does not take into account the deformation caused by the flow of the manipulator structure, which is more obvious when the rigidity of the manipulator structure is small and the flow velocity is high. The appearance of deformation will inevitably lead to the offset of the position of the end of the manipulator, which will lead to the decrease of the position accuracy of the manipulator, so in the process of establishing the kinematic model of the manipulator, it is necessary to consider the deformation caused by the current of the manipulator, so as to improve the accuracy of the kinematic model.
In order to solve the above problems, a method of position offset compensation for the end of underwater manipulator is proposed in this paper. the position offset equation caused by deformation at the end of underwater manipulator is obtained through simulation analysis, and this equation is added to the kinematic model. the accuracy of the kinematic model is improved, It lays a foundation for precise position control and lightweight design of underwater manipulator.

Forward kinematics model.
Taking the planar two-link manipulator as the research object, the reference coordinate system of the manipulator is established by using D-H rule. The model diagram and reference coordinate system of the manipulator are shown in figure 1. The connecting rod parameters and joint variables of the linkage manipulator are given in table 1.
The transformation from one connecting rod coordinate system to the next includes rotation transformation and translation transformation [4], that is, (1) By substituting the basic equation of homogeneous rotation and translation matrix transformation into the above equation, the general expression of connecting rod homogeneous transformation matrix can be obtained.
By substituting the D-H parameter in table 1 into the equation (2), the equation (3) can be obtained, and the equation (3) is also the total transformation matrix, that is, the pose matrix.
Pedestal Joint pin

Lower arm
Upper arm

Inverse kinematics model.
For the manipulator shown in figure 1, the combination equation (3) can obtain the following two nonlinear equations under the condition that the terminal coordinates are known to be (x 3 , y 3 ), and then θ 1 , θ 2 can be obtained. 3 1 The equation (6) can be obtained by adding the square of equation (4) and equation (5).
Using the bivariate arctangent equation to calculate, the following equation is obtained, Finally, the following equation can be obtained from equation (5), and the value of θ 1 can be obtained from the following equation. 3 1

Force analysis.
The Morison equation proposed by J.R.Morison [5] was widely used to calculate the wave forces acting on small-scale structures, and its vector form is: The water resistance coefficient C D in the formula is calculated by empirical value C D =1.2.
In the static analysis of the steady flow set in this paper, the force on the manipulator is only the water resistance F d , buoyancy F f and gravity F g caused by the water flow acting on the manipulator, so the force analysis of the connecting rod unit is shown in figure 2.

Water resistance calculation.
When the connecting rod is impacted by the current at rest in the water, the flow acting on the connecting rod mainly produces normal water resistance [6]. The equation for calculating the water resistance of the upper arm and the lower arm can be obtained from the equation (9) as follows:

Equivalent gravity calculation.
Since the direction of buoyancy and gravity are opposite, under the assumption that the center of gravity of the connecting rod coincides with the center of buoyancy. We can replace gravity and buoyancy with a downward equivalent gravity, that is:

Model building.
The three-dimensional model of the underwater manipulator is established by SolidWorks, as shown in figure 1. In order to facilitate data observation and reduce the amount of simulation calculation, the upper arm of the model established in this paper is vertical, that is, θ 1 =0 remains unchanged, the rotation angle of the lower arm θ 2 is in the range of [-90°,90°], and a set of models are established every 5°. A total of 37 models were established. The established model is imported into the ANSYS. The material is Aluminum1060-H12; The material density is 2705kg/m 3 , and other physical parameters are defined automatically by the software database.

The application of force.
In the finite element analysis, the equivalent gravity is applied to the whole in the form of acceleration, and the a=(1-ρ/ρ m ) can be obtained from the equation (11). It can be seen from the equation (10) that the forces on the upper arm and the lower arm of the underwater manipulator are different, so the water resistance is added by the way of upper and lower parts.

Simulation results.
37 groups of models with different attitudes are simulated and analyzed by software, and the deformation of the terminal position of the underwater manipulator in the X direction and Y direction in the steady flow environment is obtained.
By using the curve fitting function of MATLAB, the simulation data are fitted to the curve equation in which the rotation angle of the lower arm θ 2 is the independent variable and the deformation in the X direction and Y direction is the dependent variable. The fitted curve equation and the corresponding sum of square error SSE and goodness of fit R 2 are shown in table 2. In curve fitting, the closer the goodness of fit R 2 is to 1, the better the degree of fit is, and the smaller the sum of square error SSE is, the better the degree of fit is. After considering the degree of fit and the complexity of the equation, the fitting equations of X-direction deformation and Y-direction deformation are equation (12) and equation (13), respectively. The corresponding fitting curves of these two equations are shown in figure 3 and figure 4.

Forward kinematics model modification.
From the forward kinematics equation established above, it can be known that without the action of water flow and no deformation of the structure, the coordinates at the end of the manipulator is (x 3 , y 3 ), and the values in the coordinates are respectively: When the manipulator is in a constant flow environment and the rotation angle of the upper arm is kept constant and the lower arm turns a certain angle θ 2 , the real position coordinate of the end of the manipulator should be (x 3 ', y 3 '). At this time, the value in the coordinate should be:

Inverse kinematics model modification.
The inverse kinematics model established in section 1 of this paper can obtain the rotation angles θ 1 and θ 2 of the upper and lower arms when the terminal coordinates (x 3 , y 3 ) are known. In the static analysis of underwater force, we set the rotation angle of the upper arm θ 1 = 0, so at this time we only need to find a method that can obtain the rotation angle of the lower arm θ 2 through the terminal coordinates.
Because it is not easy to solve θ 2 directly, so here we can take y 3 ' as the independent variable and the lower arm rotation angle θ 2 as the dependent variable, use MATLAB to draw the scatter plot and fit the curve, so we can get the inverse function image of the equation (17). The fitting curve is shown in figure  5, and the goodness of fit of the curve shown in the figure 5 is R 2 =1. The coordinate value of any point can be read by using the data cursor in the graph window, and the y coordinate value in the coordinate is the θ 2 of the required solution.

Conclusion
A method of position offset compensation for underwater manipulator is presented in this paper. In this method, the terminal offset equation of the underwater manipulator is obtained by simulation, and then it is added to the kinematic model of the manipulator. This method is demonstrated by taking the planar two-link underwater manipulator as an example. This position compensation method improves the accuracy of the kinematic model of the underwater manipulator and lays a foundation for the accurate position control of the underwater manipulator.