ROV dynamic modeling and grasping algorithm for underwater control system of marine oil and gas Authors: Yuhang Li, Sunwei Li, Yuanzhe Li Published: 2025 ABSTRACT Deepwater oil exhibits great difficulty and risk in extraction under complex marine environments and strong ocean currents, and the operation and maintenance of its underwater control system rely heavily on remote operation. Traditional control methods make it hard to satisfy the demands of extraction. Therefore, the study first proposes simulating the marine working environment using virtual technology and model the Remote Operated Vehicle (ROV) to optimize power allocation. Secondly, the robot grasping task is achieved by designing binocular vision stereo image matching and improving the Proximal Policy Optimization grasping algorithm to enhance its stability and operational success rate under turbulent disturbances. Finally, an underwater production simulation system is built to provide a virtualization platform for oil and gas development operations. The results show that ROV can effectively achieve propeller power distribution, and the amplitude error under different operating conditions is reduced by an average of about 25% compared to the traditional Saab Seaeye model, with a maximum of no more than 5%. The simulation effect is significant. And the robot grasping system designed by the research institute can autonomously complete tasks. After training, the positioning error is reduced by 41.6% and 74.7% compared to the Mask Region based Convolutional Neural Network (Mask R-CNN) algorithm and You Only Look Once algorithm, respectively, reaching a final height of 0.11 m. The grasping success rate is still better than the comparative algorithm by more than 10% and more than 90% in strong flow environments, and it takes less time to improve overall performance significantly. The research method can provide a guarantee for the safety of deepwater operations in oil and gas fields, and reduce operation and maintenance costs and mining difficulties. Introduction With the decreasing global marine oil and gas resources, deep-sea oil and gas exploration and development has become a key strategy to ensure energy security. However, the underwater environment with a depth exceeding 1000 m has extreme characteristics such as high pressure and low temperature, and traditional artificial diving operations can no longer meet the demand. At present, although long short-term memory network data-driven models can learn motion temporal features, they ignore the essence of fluid mechanics and have poor generalization. The reinforcement learning grasping algorithm has high computational efficiency but lacks underwater real interaction samples for simulation training. In this context, Remote Operated Vehicles (ROVs) have become indispensable executors for underwater operations and maintenance due to their strong high maneuverability and adaptability1,2. ROV power modeling can achieve precise pose control under the goal of minimizing energy consumption (EC) by constructing a six-degree-of-freedom motion equation and introducing the pseudo-inverse method to optimize the thrust distribution of the thruster3. The binocular vision stereo matching network enhances underwater feature extraction by combining attention mechanisms, while the Proximal Policy Optimization (PPO) algorithm is simpler to implement compared to trust region policy optimization algorithms and more stable than maximum entropy methods such as flexible action evaluation algorithms under limited sample conditions. And it can effectively avoid training collapse by updating the amplitude through constraint strategies, and is generally superior to traditional gradient methods in terms of average reward and convergence stability. In some benchmark tasks, the final performance is improved by about 10% − 25%, which can better solve the problems of slip and instability in dynamic target grasping4,5. Therefore, the study integrates ROV dynamic modeling with the PPO algorithm to achieve efficient and safe underwater grasping tasks. The innovations of the study are as follows: Firstly, the high-precision localization control of underwater ROV is realized by constructing an accurate dynamics model. Secondly, a combinatorial grasping algorithm is constructed, in which the residual network is trained by training a convolutional network to avoid the gradient of the network model from disappearing or generating explosions. The PPO algorithm achieves grasping control optimization by integrating the dominant value standardization strategy. The strategy entropy used by the supplement optimizes the algorithm globally to avoid the algorithm training falling into a local optimum. A binocular vision-stereo matching network is also introduced to further enhance the ROV’s movement prediction capability. Related work As technology advances, ROV has been broadly studied by scholars all over the world. Guo Y et al. proposed a finite element numerical simulation method to study the significant nonlinear characteristics of the dynamic response of ROV systems. During the process, the hydrodynamic forces related to the ROV motion were calculated to verify the dynamic response of the system. The results indicated that it could deepen our understanding of the nonlinear behavior of ROVs6. Øveraas H et al. designed a dynamic positioning controller to solve the issue of cumbersome operation in traditional ROVs. During the process, model predictive control technology and short-term wave motion prediction technology were introduced. The results indicated that the controller could reduce the average error by over 60%7. The Zhang Y team proposed an adaptive method for real-time estimation of noise to address the issue of ROVs prone to location faults. During the process, measurement residuals were used to detect and locate faults. The results indicated that this method could provide highly robust and smooth localization results8. The Farooq F team proposed a nonlinear observer model for the control and stability issues of ROVs. During the process, integral and differential controllers were also introduced to calculate the six degrees of freedom of the ROV. The findings indicated that the nonlinear observer model had high control accuracy and effectiveness9. The Morinaga A team proposed an autonomous surface vehicle to address the difficulty of underwater communication for ROVs. During the process, the aircraft and underwater positioning device achieved collaborative work with the ROV. The results indicated that the collaborative system could effectively expand the operating range of ROV10. The related technologies and methods of machine grasping control have also received more research. Li Y et al. proposed an underwater friction electric hand palm tactile sensor to solve the problem of insufficient accuracy of traditional underwater grippers. During the process, a flexible cover and sensing unit were applied to convert the applied force into an electrical signal. The results indicated that the sensor could effectively improve the grasping accuracy of the gripper11. Sun Y et al. proposed an underwater vibration adhesion mechanism to address the lack of research on underwater adsorption in the field of underwater grasping. During the process, the viscosity of the liquid was used to pull the surface of the object at a certain distance, and the adhesion effect was controlled by frequency. The results indicated that this adhesion mechanism provided new ideas for the field of underwater grasping12. The Hu Z team proposed a reinforcement learning-based algorithm to address the issue of traditional algorithms encountering difficulties in minimizing contact force. During the process, the antagonistic behavior of the living object was encoded as a reward function and it was used to train the grasping strategy. The results indicated that the algorithm could significantly reduce the contact force applied to living objects13. The Jiang D team developed a training optimization algorithm to deal with the issue of the need for a large amount of motion data training for robot grasping control. During the process, a large amount of motion data was trained through generative adversarial imitation learning. The results indicated that the algorithm completed assembly tasks significantly faster than scripts and keyboard operations14. Bai J et al. designed a model-free method for designing bionic hand controllers using reinforcement learning to solve the issue of the grasping control of bionic hands being easily affected by changing control parameters. During the process, the manual motion decomposition technique was used to learn complex movements from simple movements. The results indicated that this method had fast learning ability15. In summary, although existing research has made some progress in ROV dynamics or grasping control, it often only focuses on a single technology (such as dynamic control or grasping algorithm), making it difficult to balance accuracy and robustness. In addition, grasping algorithms often rely on a large amount of data support, which limits their performance in complex underwater environments. In contrast, this study achieved a systematic breakthrough by combining high-precision ROV dynamic modeling with an improved PPO visual grasping algorithm. The contribution of this study lies in its significant superiority over traditional methods such as Mask R-CNN and YOLO in key indicators such as positioning error (0.11 m) and grasping success rate under strong currents (> 90%). At the same time, it reduces reliance on training data, improves algorithm convergence speed and anti-interference ability, and provides a more competitive solution for reliable and autonomous oil and gas operation and maintenance operations in deep-sea environments. System architecture ROV dynamics and thrust allocation modeling To ensure that the underwater oil and gas control system has sufficient grasping accuracy and success rate when performing complex underwater maintenance tasks, it is necessary to construct a mathematical model of the ROV underwater power system16. Firstly, the motion coordinate system of ROV underwater is established, as shown in Fig. 1.Fig. 1ROV coordinate system. Source from: Author’s self drawn. ROV coordinate system. Source from: Author’s self drawn. In Fig. 1, the study constructs the spatial coordinate system of ROV based on the North East Down (NED) coordinate system. The motion of ROV includes six-degrees-of-freedom in different directions, namely the linear velocity and angular velocity (AV) of ROV in the X, Y, and Z axes. By calculating the three translational degrees of freedom and three rotational degrees of freedom of the ROV in three-dimensional space, the underwater motion state of the ROV can be accurately described, and the mathematical modeling equation of the underwater power system can be obtained as denoted in Eq. (1).1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G\dot{v}_{r} + Kv_{r} + Zv_{r} + g\left( \eta \right) = T + T_{wind} + T_{wave}$$\end{document} In Eq. (1), G is the inertia matrix, K means the Coriolis-centripetal force matrix, Z means the damping matrix, g(η) means the restoring force vector, τ is the propulsive force, τwind is the wind disturbance, and τwave is the wave disturbance. To real-time grasp the dynamic changes of ROV motion, it is necessary to calculate the velocity formulas of the three degrees of freedom of ROV in the NED coordinate system, where the velocity calculation formula perpendicular to the Earth’s surface direction is shown in Eq. (2).2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Delta B = - u\sin \left( \alpha \right) + v\cos \left( \alpha \right)\sin \left( \beta \right) + w\cos \left( \alpha \right)\cos \left( \beta \right)$$\end{document} In Eq. (2), ΔB is the Z-axis displacement in the coordinate system, u, v, and w denote the linear velocity components of the X-axis, Y-axis, and Z-axis in the coordinate system, α is the pitch angle, and β is the roll angle. To generate a smooth ROV motion trajectory, it is necessary to calculate the angular velocities of the three degrees of freedom of the ROV, where the formula for calculating the AV of the roll angle is shown in Eq. (3).3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Delta \beta = p + \left[ {q\sin \left( \beta \right) + r\cos \left( \beta \right)} \right]\tan \left( \alpha \right)$$\end{document} In Eq. (3), Δβ is the rate of change of roll angle, p is the AV around the X-axis (roll) 4, q is the AV around the Y-axis (pitch), and r is the AV around the Z-axis (yaw). To ensure the stable operation of ROV underwater, a thruster torque control mechanism is proposed. By accurately allocating the driving force of the ROV, the optimal installation position of the propeller is calculated. The three views of the ROV propeller are shown in Fig. 2.Fig. 2Three views of propeller layout for ROV. Source from: Author’s self drawn. Three views of propeller layout for ROV. Source from: Author’s self drawn. As shown in Fig. 2, a total of 9 propellers is installed on the ROV in the study. To ensure thrust redundancy and a certain degree of fault tolerance, the horizontal propellers are symmetrically distributed at four corners, and the vertical propellers are located at the center of gravity symmetry position17,18. To find the optimal thrust distribution for the propeller, the pseudo inverse method is introduced for solving, and the expression of the matrix relationship is shown in Eq. (4)19.4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$W_{n} = AX = XA$$\end{document} In Eq. (4), Wn is the identity matrix of n dimension, A is the non-singular matrix, and X is the inverse matrix of A. Meanwhile, to reduce the EC of the propeller system while meeting the thrust requirements, the optimization objective function is obtained by calculating the inverse matrix and the thrust of the propeller, as shown in Eq. (5).5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\left\{ \begin{gathered} \min e = u^{T} Wu \hfill \\ s.t.\tau - A_{u} = 0 \hfill \\ \end{gathered} \right.$$\end{document} In Eq. (5), u is the output vector of the propeller, e denotes the total EC of the system, W is the weight matrix of EC, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tau$$\end{document} is the generalized force required for ROV motion, and Au is the thrust allocation matrix. To address the constrained optimization problem of the propeller thrust formula, the study uses the Lagrange function to transform it into an unconstrained problem solution and obtains a constrained Lagrange function based on the calculation formula shown in Eq. (6).6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L\left( {u,\varphi } \right) = u^{T} w_{u} + \varphi^{T} T - \varphi^{T} Au$$\end{document} In Eq. (6), L(u, φ) is a linear combination of the objective function and the constraint conditions, and φ is the multiplier vector of the constraint conditions. Finally, the optimal propeller thrust distribution formula is obtained, and its calculation formula is shown in Eq. (7).7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$T_{o} = T_{d} A^{ - 1}$$\end{document} In Eq. (7), To means the thrust output vector of the propeller, Td means the required generalized force vector, and A is the thrust distribution matrix. Afterwards, to simulate the real underwater working environment, a 3D model of the ROV underwater is built using 3Ds Max, Blender modeling software, and Vortex dynamic engine. The modeling process is shown in Fig. 3.Fig. 3ROV 3D modeling and simulation flowchart. Source from: Author’s self drawn. ROV 3D modeling and simulation flowchart. Source from: Author’s self drawn. As shown in Fig. 3, the study first uses 3D Max and Blender as modeling software to finely model the ROV based on its solid data. The model is then mapped, rendered, and optimized, and the model resources are outputted. Based on the ROV entity, the Vortex engine is used for dynamic modeling, and the physical properties of the model and the motion constraint relationship between the model and the underwater environment are defined. Afterward, sensor simulation is used to construct an underwater simulation environment, ultimately completing the training of ROV operation underwater. Visual feedback grasping algorithm based on PPO The precise operation and positioning of the ROV have been achieved through the dynamic modelling of the ROV. To ensure the efficiency and stability of the ROV grasping operation, the study attempts to combine residual network, PPO algorithm, strategy entropy, and binocular vision stereo matching network to construct a grasping algorithm, which can achieve precise control of underwater grasping20. Firstly, to enhance the deployment speed of the grasping algorithm, the minimum loss function is introduced to train the convolutional network of the ROV robotic arm, and its calculation formula is shown in Eq. (8).8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Loss\left( {\pi_{s} \left( {o_{t} } \right),a_{t} } \right) = \lambda \left\| {\left[ {v_{ts} ,w_{ts} } \right] - \left[ {v_{t} ,w_{t} } \right]} \right\|_{2}^{2} + \left( {1 - \delta } \right)\left( {g_{t} \log_{ts} + \left( {1 - g_{t} } \right)\log \left( {1 - g_{ts} } \right)} \right)$$\end{document} In Eq. (8), Loss represents the loss function, πs represents the action strategy, ot represents the currently observed features, at represents the true action at time t, λ represents a positive weight coefficient, vts represents the predicted linear velocity, wts represents the predicted AV, δ represents a proportional coefficient of 0.9, and gt represents the true event state that occurred at time t. To avoid gradient vanishing or explosion caused by too many layers in the network model, residual networks are used to train convolutional neural networks. The basic structure of a residual network is the residual module, and the working architecture of the residual module is shown in Fig. 4.Fig. 4Basic structure of residual network. Source from: Author’s self drawn. Basic structure of residual network. Source from: Author’s self drawn. As shown in Fig. 4, compared to traditional networks, the residual block introduces a fast channel. x is input into the weight layer in the main path, and after being activated by the ReLu activation function, f (x) is output. After that, the output f(x) is added element by element with the original input x to get the result f(x) + x. The summed results are activated using the ReLu activation function and the final features are output. To minimize the amount of parameters required for computation, the study introduces grouped convolution for convolution operations. Grouping convolution can set irrelevant input channel weights to zero, thereby accelerating the convergence speed of the model. Afterwards, the computational complexity of the convolution operation is calculated using the formula shown in Eq. (9).9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$s_{F} = k^{2} \times C \div l \times W\prime \times H\prime \times l = k^{2} \times C \times W\prime \times H\prime$$\end{document} In Eq. (9), \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${s}_{F}$$\end{document} represents the computational complexity of the convolutional layer, k denotes the width of the convolutional kernel, C means the number of channels in the input feature map, l means the amount of grouped convolutions, W′ and H′ refer to the width and height of the output feature map, respectively. Meanwhile, to enhance the multi-scale representation ability of convolutional neural networks, 3 × 3 convolution is used on residual blocks to extract features, followed by 1 × 1 convolution for dimensionality enhancement. After 1 × 1 convolution, yi is used to represent each output feature subset, as shown in Eq. (10).10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$y_{i} = \left\{ \begin{gathered} X_{i} ,i = 1 \hfill \\ K_{i} \left( {X_{i} } \right),i = 2 \hfill \\ K_{i} \left( {X_{i} + Y_{i - 1} } \right),2 < i \le s \hfill \\ \end{gathered} \right.$$\end{document} In Eq. (10), \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${y}_{i}$$\end{document} represents the subset of output features at the i th scale, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${X}_{i}$$\end{document} denotes the input features at the i th scale, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${K}_{i}$$\end{document} represents the bottleneck layer transformation function. To guarantee the stability of grasping training, the PPO algorithm is studied to limit parameter changes21. The update formula for its restriction strategy is shown in Eq. (11).11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\theta_{k + 1} = \arg \;\max_{\theta } E_{{s,a \sim \pi_{\theta k} }} [L\left( {t,x,\theta_{k} ,\theta } \right)]$$\end{document} In Eq. (11), \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\theta }_{k+1}$$\end{document} represents the updated policy parameters, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${E}_{s,a\sim {\pi }_{{\uptheta }_{k}}}$$\end{document} represents the expected value of (s, a) for the downsampling action of the old policy, and L(t, x, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\theta }_{k}$$\end{document}, θ) represents the proxy objective function of the algorithm. To balance the update amplitude and stability of the optimization process, it is necessary to calculate the maximization objective function of the PPO algorithm, and its calculation formula is shown in Eq. (12).12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L\left( {t,x,\theta_{k} ,\theta } \right) = \min \left[ {\pi_{\theta } \left( {x\left| t \right.} \right) \cdot A^{{\pi_{\theta k} }} \left( {t,x} \right) \div \pi_{{\theta_{{_{k} }} }} \left( {x\left| t \right.} \right),g\left( {\grave{o}},A^{{\pi_{\theta k} }} \left( {t,x} \right) \right)} \right]$$\end{document} In Eq. (12), \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\pi_{\theta } \left( {x\left| t \right.} \right)$$\end{document} represents the probability of selecting action t in state x, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$A^{{\pi_{{{\uptheta }_{k} }} }}$$\end{document} represents the quality of action t relative to the average level, and g refers to the clipping function. To measure the difference in advantage between a certain action and the average level, the study standardizes the advantage value. The standardized formula is shown in Eq. (13).13\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{C}_{t} = \left( {C_{t} - \mu_{c} } \right) \div \left( {\sigma_{c} + {\grave{o}}} \right)$$\end{document} In Eq. (13), \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{C}_{t}$$\end{document} represents the standardized advantage function value, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu_{C}$$\end{document} represents the batch mean of the advantage value, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma_{C}$$\end{document} represents the batch standard deviation of the advantage value, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\grave{o}}$$\end{document} represents a minimum constant. To avoid getting stuck in local optima during training, the study supplemented the use of policy entropy for global optimization. The expression of policy entropy is shown in Eq. (14).14\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$H\left( {\pi \left( { \cdot \left| {\;s_{t} } \right.} \right)} \right) = - \sum\limits_{a} {\pi \left( {a_{t} \left| {\;s_{t} } \right.} \right)\log \left( {a_{t} \left| {\;s_{t} } \right.} \right)} = E_{a \sim \pi } \left[ { - \log \left( {\pi \left( {a_{t} \left| {\;s_{t} } \right.} \right)} \right)} \right]$$\end{document} In Eq. (14), \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$H\left( {\pi \left( { \cdot \left| {\;s_{t} } \right.} \right)} \right)$$\end{document} represents the entropy of strategy π in state S, S represents the current state, a represents optional actions, and E represents the summation function. To further enhance the ability of action prediction, research is being conducted to supplement the use of binocular vision stereo matching networks for collecting global information. The network is mainly composed of attention module, pyramid pooling module, and 3D convolution module. The attention mechanism can use channel attention and spatial attention to obtain more accurate action features. The attention mechanism module’s structure is denoted in Fig. 5.Fig. 5Attention mechanism working structure. Source from: Author’s self drawn. Attention mechanism working structure. Source from: Author’s self drawn. As shown in Fig. 5, the attention mechanism mainly consists of channel attention and spatial attention modules. Firstly, the 3D feature map is input, the feature map is subjected to maximum pooling and average pooling simultaneously, and the pooling results are input into the fully connected layer of shared weights to generate the channel weight vectors. Afterward, the feature maps processed by the channel attention module will be input into the spatial attention module, and a spatial weight matrix will be generated through convolutional layers. Afterward, the channel weights and spatial weights are multiplied element by element to output a weighted enhanced feature map. The study uses smooth L1 loss to train a binocular vision-stereo matching network, and the calculation formula for the loss function is denoted in Eq. (15)22.15\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Loss\left( {q,\hat{q}} \right) = \frac{{\mathop \sum \nolimits_{i = 1}^{N} smooth_{L1} \left( {q_{i} - \hat{q}_{i} } \right)}}{N}$$\end{document} In Eq. (15), Loss (q, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\hat{q}}$$\end{document}) represents the overall loss function value, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${q}_{i}$$\end{document} refers to the true disparity value of the ith pixel, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\hat{q}}_{i}$$\end{document} represents the predicted disparity value of the i th pixel, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${smooth}_{L1}$$\end{document} represents the smoothed L1 loss function. The study combines residual network, PPO algorithm, policy entropy, and binocular vision stereo matching network to construct visual feedback grasping algorithm based on PPO algorithm. Finally, the ROV power modeling is combined with the visual feedback grasping algorithm and subjected to underwater simulation testing. The testing process is shown in Fig. 6.Fig. 6Underwater simulation testing process. Source from: Author’s self drawn. Underwater simulation testing process. Source from: Author’s self drawn. As shown in Fig. 6, the study first conducts ROV dynamic modeling, establishes a six-degree-of-freedom nonlinear equation, and optimizes the propeller thrust. The pseudo inverse method is utilized to calculate the thrust matrix, obtain the objective function with minimized energy, and input it into the Vortex engine for training. The depth map is also generated using binocular stereo vision, and the feature extraction capability is strengthened and loss-trained using the attention mechanism. Research uses PPO algorithm for grasping training and optimization, and inputting the training results into Vortex engine for simulation testing. Finally, underwater environment grasping testing is conducted based on Vortex engine, and the accuracy and stability of the algorithm are continuously adjusted through the test results. Experimental setup Simulation environment To assess the performance of ROV dynamic modeling and grasping algorithm for marine oil and gas underwater control system, Simulink was used as the hydrodynamic module, ANSYS Fluent was used for fluid dynamics verification, and the UMI underwater grasping dataset was selected as the test data source. To accurately simulate the real marine environment, the following key boundary conditions were set: operating depth of 1000–1500 m, water temperature of 2–4 °C, underwater visibility range of 0.5–2 m, and salinity gradient of 34–35 PSU based on typical deep-sea profiles. The software, hardware, and their parameters used for performance testing are denoted in Table 1.Table 1The preset parameters of each component in the device.Software and hardware namesParameter descriptionROV entitySAAB SabertoothMechanical armSchilling OrionMulti-beam sonarImagenex 837BHydrodynamic moduleSimulinkFluid simulation softwareANSYS FluentForce sensorATI DeltaDynamics modelingVortexVisual ProcessingOpenCV 4.7 Table 1The preset parameters of each component in the device.Software and hardware namesParameter descriptionROV entitySAAB SabertoothMechanical armSchilling OrionMulti-beam sonarImagenex 837BHydrodynamic moduleSimulinkFluid simulation softwareANSYS FluentForce sensorATI DeltaDynamics modelingVortexVisual ProcessingOpenCV 4.7 The preset parameters of each component in the device. Based on the above software and hardware, dataset, and environmental boundary conditions, a marine oil and gas underwater simulation environment is built, and the performance of ROV dynamic modeling and grasping algorithms is tested. Evaluation indicators and baseline system To validate the performance of the baseline system, the operational accuracy, dynamic grasping performance, and algorithm convergence performance of the underwater production simulation system were studied. The ROV dynamic model was compared with the Saab Seaeye model and BlueROV model, and the computational efficiency and robustness of the three models were tested. The ROV power model aims to achieve higher computational efficiency and stronger anti-interference ability through precise dynamic modeling and thrust allocation optimization23. The Saab Seaeye model, as a representative of mature commercial ROV systems, embodies the current industry design standards for reliability and stability24. The BlueROV model, as a widely used open-source ROV platform model, represents the typical performance of the open-source community in low-cost, customizable solutions25. Results Performance under rated conditions To test the performance of the research algorithm, the grasping algorithm was referred to as Visual Feedback Grabbing (VFP) algorithm, and its operational accuracy was compared with Mask Region-based Convolutional Neural Network (Mask R-CNN) algorithm and You Only Look Once (YOLO) algorithm. The Mask R-CNN algorithm, as an advanced algorithm that can provide pixel level accurate segmentation, is used as a benchmark to test the impact of fine segmentation ability on the accuracy of grasping and positioning26. The YOLO algorithm, as a single-stage object detection algorithm known for its fast speed, serves as a benchmark for comparison and represents a typical level of positioning accuracy under high-speed inference27. The study uses the positioning error of the end effector and the slip of the target object as indicators, and the training ratio as experimental parameters. The training data includes a sequence of stereo image pairs collected by a binocular vision system, the pose of the end effector of the robotic arm recorded and annotated by sensors, and corresponding successful/failed grasping action labels. The test results are shown in Fig. 7.Fig. 7Comparison of operational accuracy among three algorithms. Source from: Author’s self drawn. Comparison of operational accuracy among three algorithms. Source from: Author’s self drawn. Figure 7a, b show the positioning error and the target slip test results of three algorithms, respectively. From Fig. 7a, the positioning error of the VFP algorithm was negatively correlated with the training ratio. When the training ratio was between 0–15%, the rate of decrease in positioning error was relatively slow. When the training ratio reached 20%, the positioning error began to rapidly decrease. After completing the training, the positioning error decreased to 0.11 m. The Mask R-CNN algorithm showed a slow decrease in positioning error when the training ratio was 0–20%, and when the training ratio reached 100%, the positioning error decreased to 0.18 m. As shown in Fig. 7b, the target slip of the VFP algorithm was also negatively correlated with the training ratio. When the training ratio was in the top 10%, the rate of decrease in slip was slower. When the training ratio reached 100%, the slip decreased to 14.8 mm, and the overall slip was lower than that of Mask R-CNN algorithm and YOLO algorithm. The results indicated that the research algorithm had higher operational accuracy. Robustness testing under environmental disturbances To evaluate the performance of the proposed algorithm in real robotic arm grasping tasks, dynamic grasping experiments were conducted on VFP algorithm, Mask R-CNN algorithm, and YOLO algorithm in a strong flow disturbance environment. The experiment used a Schilling Orion robotic arm as the actuator and integrated control through the ROV platform. The test results are shown in Fig. 8.Fig. 8Comparison of dynamic grasping performance of three algorithms. Source from: Author’s self drawn. Comparison of dynamic grasping performance of three algorithms. Source from: Author’s self drawn. Figure 8a shows the grasping success rate and energy consumption test results of the VFP algorithm in the robotic arm grasping task. Figures 8b and 10c show the grasping success rate and energy consumption test results of the Mask R-CNN algorithm and YOLO algorithm, respectively. The average and mean difference of its capture success rate and energy consumption are shown in Table 2.Table 2Comparison of the mean and mean difference of capture success rate and energy consumption.AlgorithmAverage capture success rate (%)Average energy consumption (kJ)Mean difference in success rateMean difference in energy consumptionVFP91.21.24Mask R-CNN86.81.46− 4.4 + 0.22YOLO84.71.51− 6.5 + 0.27 Table 2Comparison of the mean and mean difference of capture success rate and energy consumption.AlgorithmAverage capture success rate (%)Average energy consumption (kJ)Mean difference in success rateMean difference in energy consumptionVFP91.21.24Mask R-CNN86.81.46− 4.4 + 0.22YOLO84.71.51− 6.5 + 0.27 Comparison of the mean and mean difference of capture success rate and energy consumption. In Fig. 8a, the success rate of the VFP algorithm in grasping was negatively correlated with the water flow velocity. When the water flow velocity was 0.1 m/s, the success rate of grasping was 97.3%, and when the flow velocity reached 0.5 m/s, it was 86.7%. When the water flow velocity was 0.5 m/s, its EC reached 2.73 kJ. In Fig. 8b, the success rate of the Mask R-CNN algorithm’s grasping reached 81.9% when the water body flow speed reached 0.5 m/s, and the EC reached 1.18 kJ when the flow speed was 0.1 m/s. According to Fig. 8c, the YOLO algorithm’s grasping success rate reached 76.1% when the water flow velocity was 0.5 m/s, and its overall grasping success rate was lower than that of the VFP algorithm. The findings denoted that the research algorithm had superior dynamic grasping performance. Afterwards, the convergence performance of the three algorithms was tested, and the test findings are denoted in Fig. 9.Fig. 9Comparison of convergence performance of three algorithms. Source from: Author’s self drawn. Comparison of convergence performance of three algorithms. Source from: Author’s self drawn. Figure 9a shows the reward function diagram of the grasping behavior of three algorithms under interference in underwater terrain, and Fig. 9b shows the reward function diagram of the grasping behavior of three algorithms under communication delay. From Fig. 9a, the reward curve trends of VFP algorithm, Mask R-CNN algorithm, and YOLO algorithm were consistent. In the first 40 iterations of the VFP algorithm, the reward value grew rapidly and reached its maximum after 53 iterations, at which point the reward value was 42.8. After 67 iterations, the Mask R-CNN algorithm achieved a maximum reward value of 44.6. The YOLO algorithm reached its maximum reward value at 74 iterations. From Fig. 9, the three algorithms still had the same trend in the change of reward curves for grasping behavior. In the first 40 iterations of the VFP algorithm, the reward value increased rapidly and reached its maximum after 42 iterations, at which point the reward value was 39.7. After 58 iterations, the Mask R-CNN algorithm realized a max reward value of 39.9. At 62 iterations, the YOLO algorithm realized a max reward value of 39.6. The results indicated that the research algorithm had a faster convergence speed. Comparison with industry standard ROV system To assess the operational performance of ROV power modeling compared to other models, the study compared the robustness of the ROV power model with the Saab Seaeye model and BlueROV model, and the test findings are denoted in Fig. 10.Fig. 10Comparison of robustness of three models. Source from: Author’s self drawn. Comparison of robustness of three models. Source from: Author’s self drawn. Figure 10a, b show the fault recovery time and the amplitude error test findings of three models, respectively. The mean and mean difference of its fault recovery time and amplitude error are shown in Table 3.Table 3Comparison of mean and mean difference of fault recovery time and amplitude error.ModelMean time to recovery from failures (s)Average amplitude error (%)Mean difference in recovery timeMean difference of amplitude errorROV power model1.543.89Saab Seaeye model1.736.12 + 0.19 + 2.23BlueROV model1.987.08 + 0.44 + 3.19 Table 3Comparison of mean and mean difference of fault recovery time and amplitude error.ModelMean time to recovery from failures (s)Average amplitude error (%)Mean difference in recovery timeMean difference of amplitude errorROV power model1.543.89Saab Seaeye model1.736.12 + 0.19 + 2.23BlueROV model1.987.08 + 0.44 + 3.19 Comparison of mean and mean difference of fault recovery time and amplitude error. According to Table 3 and Fig. 10a, it can be concluded that the fault recovery time of the ROV power model decreased linearly with the increase of training ratio, and its overall recovery time was lower than that of the Saab Seaeye model and BlueROV model. When the training ratio was only 10%, the fault recovery time took 3.42 s. When the training ratio reached 90%, the fault recovery time decreased to 0.73 s. According to Table 3 and Fig. 10b, the amplitude error of the ROV power model was lower than that of the Saab Seaeye model and BlueROV model under different operating conditions. Under static water conditions, the amplitude error was 3.71%, and under irregular wave conditions, the amplitude error increased to 4.76%. In summary, the research model had better robustness. Afterward, the computational efficiency of the three models was compared, with the convergence iteration times and single step simulation time as indicators, and the complexity of the data was roughly divided into four levels. The test results are shown in Fig. 11.Fig. 11Calculation efficiency testing of three models. Source from: Author’s self drawn. Calculation efficiency testing of three models. Source from: Author’s self drawn. Figure 11a, b show the convergence iteration and the single step simulation time test results of the three models, respectively. From Fig. 11a, the number of convergence iterations of the ROV dynamic model was positively correlated with the level of data complexity. When the complexity level was 1, the convergence iteration of the ROV dynamic model reached 18 times, and when the complexity level reached 4, the convergence iteration quickly increased to 271 times. The convergence iteration number of LSTM data model was also positively correlated with the complexity level of the data, but its growth trend was unstable. When the complexity level reached level 4, the number of convergence iterations reached 294. In Fig. 11 (b), the single step simulation time of the ROV dynamic model was linearly related to the complexity level of the data, and the time consumption of different complexity levels was lower than that of the LSTM data model and SNAME standard model. When the data complexity level was 1, the single step simulation time reached 2.1 ms, and after increasing the complexity level to 4, the single step simulation time increased to 14.2 ms. The results showed that the research model had higher computational efficiency. To evaluate the comprehensive performance of the proposed method in this study, we compared it with two currently advanced controllers: Model Predictive Control (MPC), which is widely used for handling system constraints due to its feedforward optimization capability, and Adaptive Sliding Mode Control (ASMC), which is known for its strong robustness to parameter uncertainty and external disturbances. The comparison results are shown in Table 4.Table 4Comparison with advanced control methods.Performance metricsResearch methodologyMPCASMCSingle step calculation time consumption ~ 2.1 ms ~ 25 ms ~ 5 msPositioning error (m)0.110.080.18Success rate of strong flow (%) > 90 > 95 ~ 85RobustnessHighMediumHighReal time performance (> 100 Hz)YesNoNoActuator vibrationNoneNoneSignificant Table 4Comparison with advanced control methods.Performance metricsResearch methodologyMPCASMCSingle step calculation time consumption ~ 2.1 ms ~ 25 ms ~ 5 msPositioning error (m)0.110.080.18Success rate of strong flow (%) > 90 > 95 ~ 85RobustnessHighMediumHighReal time performance (> 100 Hz)YesNoNoActuator vibrationNoneNoneSignificant Comparison with advanced control methods. The comparative results indicate that the research method achieves a better balance between computational efficiency, tracking accuracy, and robustness. Although MPC has the highest control accuracy, its complex online optimization problem results in a single step computation time of up to 25 ms, making it difficult to meet the real-time requirements of high-speed ROV systems (> 100 Hz). Although ASMC can effectively suppress disturbances, its inherent chattering phenomenon will exacerbate actuator wear, and the control error (~ 0.18 m) in high-frequency dynamic environments is greater than that of our research method. In contrast, this study is based on the pseudo inverse method for thrust allocation and PPO strategy collaborative optimization, with a single step computation time of only 2.1 ms (complexity level 1). It not only meets real-time control requirements, but also maintains low amplitude errors (< 5%) and high-precision grasping and positioning capabilities (0.11 m) under different operating conditions, demonstrating its significant advantages in practical engineering applications. Discussion Engineering significance This research has solved the core problem of “inaccurate control and unstable grasping” in deep-sea oil and gas operation and maintenance. Through ROV dynamic modeling, precise positioning of ROV underwater has been achieved, which improves the stability of underwater movement under strong environmental interference and can meet the long-term high load operation requirements underwater. By integrating binocular vision and PPO algorithm, and optimizing control strategies, precise grasping control at the millimeter level has been achieved, ultimately improving China’s ability to operate and maintain deepwater oil and gas fields independently, and effectively avoiding millions of production losses. Limitations and future improvements Although the ROV power model already has high positioning accuracy, it has not taken into account the influence of real underwater environment on model parameters. In the future, efforts will be made to introduce adaptive observers to evaluate changes in model parameters and further improve the accuracy of ROV power modeling. At the same time, grasping algorithms also face challenges, as they rely on a large amount of underwater interactive data, resulting in high training costs and directly affecting the efficiency of algorithm iterations. In the future, high-level planning task sequences will be introduced, using low-level execution actions to improve algorithm training efficiency. Conclusion To further promote the success rate and efficiency of ROV underwater grasping control tasks in marine oil and gas environments, innovative research was conducted to integrate ROV dynamic modeling and grasping algorithms. Among them, ROV built an accurate mathematical model by calculating six degrees of freedom, and used the pseudo inverse method for thrust allocation to achieve precise control of ROV. The binocular vision network was used to generate depth sequences, and the PPO algorithm was used to train the grasping network to achieve precise operation of the robotic arm. The experimental results showed that the ROV dynamic model converged 18 times when the data complexity level was 1. When the training ratio was only 10%, the fault recovery time was 3.42 s. In practical application, the PPO algorithm had a maximum grasping time of 78.2 s when the movement speed reached 0.5 m/s. After 53 iterations of movement training, the reward value reached its maximum. The results indicate that the ROV dynamic modeling and grasping algorithm used in the study has higher computational efficiency and robustness, and can achieve efficient and safe underwater grasping operations.