A method for hydrodynamic simulation of an underwater robot
Patent Information
- Application Number
- CN202610966188.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-01
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2046-07-01
AI Technical Summary
[0005]有鉴于此,有必要提供一种水下机器人的水动力仿真方法,用以解决现有技术中存在的因水动力旋量计算依赖水下机器人的当前加速度所导致的仿真数值不稳定、保真度低,以及因水动力参数以静态文件固化而无法随机摄动所导致的强化学习域随机化难以实施、控制策略泛化能力不足的技术问题
[0016] The beneficial effects of the present invention are: the hydrodynamic simulation method for underwater robots provided by the present invention does not include the current acceleration term of the underwater robot in the equivalent hydrodynamic spinor expression calculated by the constructed hydrodynamic plug-in, thus avoiding the numerical oscillation and divergence problems caused by the reliance on acceleration information in traditional methods, and fundamentally achieving highly stable and high-fidelity underwater robot dynamics simulation.
Smart Images

Figure CN122508728B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of underwater robot simulation technology, and more specifically to a hydrodynamic simulation method for underwater robots. Background Technology
[0002] Underwater robots are crucial equipment in key areas such as marine resource exploration, ecological environment monitoring, and seabed salvage and rescue. The control strategies for underwater robots are often designed based on the Fossen underwater dynamics model, which includes an additional mass force term, which, along with the rigid body inertia term, determines the robot's acceleration response. However, the additional mass force term contains the underwater robot's current acceleration, causing the acceleration solution to depend simultaneously on both the rigid body inertia and the additional mass, resulting in a strong coupling relationship.
[0003] Current mainstream physics simulation software (such as Gazebo and Isaac Sim) primarily focuses on rigid body dynamics simulation for land robots, and their core physics simulation engines can only solve rigid body dynamics. To simulate underwater environments, hydrodynamic plugins are typically integrated, with the plugins calculating hydrodynamic forces and applying them as external forces to the engine. Under this interactive mechanism, traditional hydrodynamic plugins need to explicitly handle the additional mass force term containing the current acceleration when calculating hydrodynamic spindles. Since the current acceleration cannot be directly obtained from the engine without noise, traditional methods often rely on historical acceleration information for approximation, resulting in poor numerical stability, easy divergence in the simulation process, and insufficient simulation accuracy and reliability. Simultaneously, in underwater robot reinforcement learning training, domain randomization techniques require random perturbation of hydrodynamic parameters in the simulation environment to improve the generalization ability of the control strategy. However, the parameters of traditional hydrodynamic plugins are usually fixed in static files (such as URDF, XML, SDF), and the nominal values and perturbation ranges of hydrodynamic parameters cannot be flexibly configured and randomly sampled before the simulation starts, making it difficult to meet the requirements of reinforcement learning training for parameter randomization.
[0004] Therefore, there is an urgent need for a simulation method that can avoid numerical instability caused by the current acceleration term and support random perturbations of hydrodynamic parameters, so as to improve the simulation fidelity and control strategy generalization ability of underwater robots. Summary of the Invention
[0005] In view of this, it is necessary to provide a hydrodynamic simulation method for underwater robots to solve the technical problems in the prior art, such as unstable simulation values and low fidelity caused by the calculation of hydrodynamic spindle depending on the current acceleration of the underwater robot, and the difficulty in implementing randomization of reinforcement learning domain and insufficient generalization ability of control strategy caused by the fact that hydrodynamic parameters are fixed in static files and cannot be randomly perturbed.
[0006] To address the aforementioned technical problems, in a first aspect, the present invention provides a hydrodynamic simulation method for an underwater robot, comprising: A hydrodynamic plugin is constructed to calculate the equivalent hydrodynamic spindle and apply it to the physics simulation engine; wherein the expression of the equivalent hydrodynamic spindle does not include the current acceleration of the underwater robot and uses hydrodynamic parameters as variables; Before the simulation begins, the nominal values and perturbation upper and lower bounds of the hydrodynamic parameters are read through the parameter service of the robot operating system, and the actual hydrodynamic parameters are generated by random sampling within the range of the perturbation upper and lower bounds. Within each simulation step, the hydrodynamics plugin obtains the robot's current motion state through the physical simulation engine interface, substitutes the robot's current motion state and the actual hydrodynamic parameters into the expression of the equivalent hydrodynamic spindle to obtain the equivalent hydrodynamic spindle, and applies the equivalent hydrodynamic spindle to the physical simulation engine to simulate the underwater robot.
[0007] In one possible implementation, the process of constructing the expression for the equivalent hydrodynamic spindle is as follows: A Fossen underwater dynamics model is established, which includes a rigid body inertia term and an additional mass force term. The rigid body inertia term is the product of the rigid body inertia matrix and the current acceleration of the underwater robot. The additional mass force term is the product of the additional mass matrix and the relative acceleration. The relative acceleration is the difference between the current acceleration of the underwater robot and the acceleration of the ocean current. The Fossen underwater dynamics model is decomposed into a rigid body dynamics module solved by the physics simulation engine and a hydrodynamic module that calculates the equivalent hydrodynamic spindle and applies it to the physics simulation engine. Establish an externally applied equation that includes the rigid body inertia term but excludes the additional mass force term, and construct a transformation matrix based on the rigid body inertia matrix and the additional mass matrix; The Fossen underwater dynamics model is transformed based on the transformation matrix to generate a transformed hydrodynamic model. The externally applied equation is subtracted from the transformed hydrodynamic model to obtain the expression for the equivalent hydrodynamic spindle.
[0008] In one possible implementation, the expression for the equivalent hydrodynamic spindle is: ; ; In the formula, This is the equivalent hydrodynamic spindle; The transformation matrix; For the additional mass matrix; The speed of the ocean current; For ocean current acceleration; For the added mass Coriolis matrix; The relative ocean current speed, ; The hydrodynamic damping matrix; It is the gravitational spinor; This is the attitude angle vector; It is the buoyancy spinor; For rigid body Coriolis matrix; To control the force spinor; Here is the inertial matrix of the underwater robot; It is a 6×6 identity matrix.
[0009] In one possible implementation, the physical simulation engine is integrated into the physical simulation software, and the hydrodynamic plugin is organized as a robot operating system function package, inheriting the System class of the physical simulation software Gazebo, and compiled into a dynamic link library. In the robot model description file, it is bound to the corresponding physical link through the plugin tag.
[0010] In one possible implementation, the nominal values of the hydrodynamic parameters are stored in a YAML configuration file in the form of key-value pairs; when the hydrodynamic plugin is loaded, it reads the nominal values from the YAML configuration file through the parameter service of the robot operating system, reads the perturbation upper and lower bounds of the hydrodynamic parameters set in the simulation script, and randomly samples within the range of the perturbation upper and lower bounds to generate the actual hydrodynamic parameters.
[0011] In one possible implementation, the actual hydrodynamic parameters are: ; ; In the formula, These are the actual hydrodynamic parameters; These are the nominal values of the hydrodynamic parameters; These are random sampled values; For perturbation of the upper bound; To perturb the lower bound; It is a uniform distribution function.
[0012] In one possible implementation, the robot's current motion state includes linear velocity, angular velocity, and attitude angle; the physical simulation engine uses a first body coordinate system; and the Fossen underwater dynamics model uses a second body coordinate system. Before substituting the robot's current motion state and the actual hydrodynamic parameters into the expression for the equivalent hydrodynamic spinor to obtain the equivalent hydrodynamic spinor, the following steps are also included: The linear velocity, angular velocity, and attitude angle are transformed from the first body coordinate system to the second body coordinate system.
[0013] In one possible implementation, before applying the equivalent hydrodynamic spindle to the physics simulation engine, the method further includes: The equivalent hydrodynamic spin is transformed from the second body coordinate system to the first body coordinate system.
[0014] In one possible implementation, the hydrodynamic plugin publishes internal key data to the outside world through a robot operating system topic within each simulation step. The internal key data includes at least one of the following: actual hydrodynamic parameters, transformation matrix, current ocean current velocity vector, current ocean current acceleration vector, and equivalent hydrodynamic spindle.
[0015] Secondly, the present invention also provides an underwater robot simulation device, comprising: The physics simulation engine unit, integrated into a general-purpose computer or embedded industrial control computer, is used to solve the rigid body dynamics of underwater robots. The robot operating system communication interface is used to read the nominal values and perturbation upper and lower bounds of hydrodynamic parameters through parameter services; The hydrodynamic module is stored in the memory of the industrial computer as a dynamic link library and is loaded and executed by the processor. The hydrodynamic plug-in unit is configured as follows: Based on the nominal value and the upper and lower limits of the perturbation, actual hydrodynamic parameters are generated by random sampling within the range of the upper and lower limits of the perturbation. Within each simulation step, the robot's current motion state is obtained through the state interface of the physical simulation engine unit; Substitute the robot's current motion state and the actual hydrodynamic parameters into the expression for the equivalent hydrodynamic screw to obtain the equivalent hydrodynamic screw; the expression for the equivalent hydrodynamic screw does not include the underwater robot's current acceleration and uses the hydrodynamic parameters as variables; The equivalent hydrodynamic spindle is applied to the physical simulation engine unit through the external force interface of the physical simulation engine unit to simulate the underwater robot.
[0016] The beneficial effects of the present invention are: the hydrodynamic simulation method for underwater robots provided by the present invention does not include the current acceleration term of the underwater robot in the equivalent hydrodynamic spinor expression calculated by the constructed hydrodynamic plug-in, thus avoiding the numerical oscillation and divergence problems caused by the reliance on acceleration information in traditional methods, and fundamentally achieving highly stable and high-fidelity underwater robot dynamics simulation.
[0017] Furthermore, this invention reads the nominal values and perturbation upper and lower bounds of hydrodynamic parameters through the parameter service of the robot operating system, and randomly samples within the perturbation upper and lower bounds to generate actual hydrodynamic parameters. This allows the hydrodynamic parameters to be flexibly randomized before each simulation without modifying the static configuration file, which meets the requirements of reinforcement learning domain randomization technology for random parameter perturbation and is beneficial to improving the generalization ability of the trained control strategy.
[0018] Furthermore, within each simulation step, the hydrodynamic module directly acquires the robot's current motion state through the physical simulation engine interface. It then substitutes the state and randomized actual parameters into an expression that excludes the current acceleration, quickly obtaining the equivalent hydrodynamic spindle and applying it to the engine. This process eliminates the need for complex iterations or historical data, achieving efficient collaboration between the hydrodynamic module and the simulation engine and ensuring the real-time performance of the simulation. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A schematic flowchart of an embodiment of the hydrodynamic simulation method for underwater robots provided by the present invention; Figure 2 A schematic flowchart illustrating an embodiment of the process for constructing the expression for the equivalent hydrodynamic spinor provided by the present invention; Figure 3 Force diagram of the underwater robot provided by the present invention; Figure 4 The flowchart of the initialization configuration process performed after loading of the hydrodynamic plug-in provided by the present invention; Figure 5 The flowchart for performing calculation, application, and deployment in the hydrodynamic plug-in update provided by this invention; Figure 6 Diagram illustrating the integration and interaction mechanism of the hydrodynamic plug-in provided by this invention; Figure 7 A comparison chart of the velocity response curves of the underwater robot simulation in a specific example provided by the present invention; Figure 8 Velocity deviation diagrams for the implicit hydrodynamic application model and the explicit hydrodynamic application model provided by this invention; Figure 9 A comparison chart of the angular velocity response curves of the underwater robot simulation in a specific example provided by the present invention; Figure 10An angular velocity deviation diagram of the implicit hydrodynamic application model and the explicit hydrodynamic application model provided by the present invention; Figure 11 Comparison of attitude angle response curves of underwater robot simulation in specific examples provided by the present invention; Figure 12 Attitude angle deviation diagrams of the implicit hydrodynamic application model and the explicit hydrodynamic application model provided by the present invention; Figure 13 A comparison chart of the position response curves of the underwater robot simulation in a specific example provided by the present invention; Figure 14 Positional deviation diagram of the implicit hydrodynamic application model and the explicit hydrodynamic application model provided by the present invention; Figure 15 The motion diagram of the underwater robot in the Gazebo simulation environment provided by this invention; Figure 16 This is a schematic diagram of an embodiment of the underwater robot simulation device provided by the present invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0022] It should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this invention illustrate operations implemented according to some embodiments of the invention. It should be understood that the operations in the flowcharts may be implemented out of order, and steps without logical contextual relationships may be reversed or performed simultaneously. Furthermore, those skilled in the art, guided by the content of this invention, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0023] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0024] This invention provides a hydrodynamic simulation method for underwater robots, which will be described in detail below.
[0025] Figure 1 A schematic flowchart of an embodiment of the hydrodynamic simulation method for underwater robots provided by the present invention is shown below. Figure 1 As shown, the hydrodynamic simulation method for underwater robots includes: S101. Construct a hydrodynamic plugin. The hydrodynamic plugin is used to calculate the equivalent hydrodynamic spindle and apply it to the physics simulation engine. The expression for the equivalent hydrodynamic spindle does not include the current acceleration of the underwater robot and uses hydrodynamic parameters as variables.
[0026] In a specific embodiment of the present invention, the physics simulation engine is integrated into the physics simulation software, which is Gazebo, and the physics simulation engine is the Gazebo ODE physics simulation engine.
[0027] S102. Before the simulation begins, the nominal values and perturbation upper and lower bounds of the hydrodynamic parameters are read through the parameter service of the Robot Operating System (ROS), and the actual hydrodynamic parameters are generated by random sampling within the range of the perturbation upper and lower bounds.
[0028] S103. Within each simulation step, the hydrodynamics plugin obtains the robot's current motion state through the physical simulation engine interface, substitutes the robot's current motion state and actual hydrodynamic parameters into the expression of the equivalent hydrodynamic spindle to obtain the equivalent hydrodynamic spindle, and applies the equivalent hydrodynamic spindle to the physical simulation engine to simulate the underwater robot.
[0029] It should be understood that the hydrodynamic simulation method for underwater robots in this embodiment of the invention can be implemented in any device based on underwater robot simulation, such as: an underwater robot simulation workstation, an unmanned underwater vehicle ground control station, a marine engineering simulation server, or an underwater robot hardware-in-the-loop simulation platform. Specifically, the hydrodynamic simulation method for underwater robots is stored in the aforementioned device in the form of a pre-programmed program or plug-in. When the device loads the underwater robot model and starts the simulation environment, the program is invoked, the hydrodynamic simulation method for underwater robots is implemented, and the equivalent hydrodynamic spindle and robot motion state at each simulation step are output for reinforcement learning training, control strategy verification, or underwater robot motion performance analysis.
[0030] Taking the motion performance analysis of an underwater robot as an example: When conducting motion performance analysis of an underwater robot, engineers first need to build a hydrodynamic plugin in the simulation environment. This plugin embeds an equivalent hydrodynamic spinor expression that does not include the current acceleration term. Before each simulation starts, the hydrodynamic plugin reads the nominal values of the hydrodynamic parameters and the set upper and lower bounds of perturbation through the parameter service of the robot operating system, and randomly samples and generates a set of actual hydrodynamic parameters within this range to simulate the uncertainty of hydrodynamic characteristics in the real marine environment. Subsequently, within each simulation step, the plugin obtains the robot's current motion state in real time through the physical simulation engine interface, substitutes these states together with the pre-randomized actual hydrodynamic parameters into the equivalent hydrodynamic spinor expression, quickly calculates the equivalent hydrodynamic spinor at that moment, and immediately applies it to the physical simulation engine to drive the robot model to move in the virtual environment. The entire process does not rely on historical acceleration information, avoiding numerical oscillations, and the parameter randomization provides a rich combination of working conditions for multiple repeated simulations. After the simulation, the system records and outputs the robot's six-degree-of-freedom motion trajectory and hydrodynamic response data. Engineers can use this data to analyze the robot's heading control capability, anti-current interference performance, and manipulation response characteristics under different hydrodynamic parameter perturbation conditions, thereby evaluating its motion stability and control quality in actual operation.
[0031] Compared with the prior art, the hydrodynamic simulation method for underwater robots provided in this embodiment of the invention does not include the current acceleration term of the underwater robot in the equivalent hydrodynamic spinor expression calculated by the constructed hydrodynamic plug-in. This avoids the numerical oscillation and divergence problems caused by the reliance on acceleration information in traditional methods, and fundamentally achieves highly stable and high-fidelity underwater robot dynamics simulation.
[0032] Furthermore, in this embodiment of the invention, the nominal values and perturbation upper and lower bounds of hydrodynamic parameters are read through the parameter service of the robot operating system, and the actual hydrodynamic parameters are generated by random sampling within the range of the perturbation upper and lower bounds. This allows the hydrodynamic parameters to be flexibly randomized before each simulation without modifying the static configuration file, which meets the requirements of reinforcement learning domain randomization technology for random parameter perturbation and is conducive to improving the generalization ability of the trained control strategy.
[0033] Furthermore, in each simulation step, the hydrodynamic module directly obtains the robot's current motion state through the physical simulation engine interface, and substitutes the state and randomized actual parameters into an expression that does not include the current acceleration to quickly obtain the equivalent hydrodynamic spindle and apply it to the engine. This process does not require complex iterations or historical data, achieving efficient collaboration between the hydrodynamic module and the simulation engine, and ensuring the real-time performance of the simulation.
[0034] In some embodiments of the present invention, such as Figure 2 As shown, the process of constructing the expression for the equivalent hydrodynamic spinor is as follows: S201. Establish the Fossen underwater dynamics model. The Fossen underwater dynamics model includes a rigid body inertia term and an additional mass force term. The rigid body inertia term is the product of the rigid body inertia matrix and the current acceleration of the underwater robot. The additional mass force term is the product of the additional mass matrix and the relative acceleration. The relative acceleration is the difference between the current acceleration of the underwater robot and the acceleration of the ocean current.
[0035] Specifically, such as Figure 3 As shown, in the northeast inertial coordinate system, the relationship between the differential of the six-degree-of-freedom velocity vector of the underwater robot considering the influence of ocean currents and the rigid body and hydrodynamic spindles is expressed by the Fossen underwater dynamics model as follows: ; ; In the formula, Here is the inertial matrix of the underwater robot; For the additional mass matrix; For rigid body Coriolis matrix; This represents the velocity vector of the underwater robot. This represents the acceleration vector of the underwater robot. For the added mass Coriolis matrix; The relative ocean current speed, ; The speed of the ocean current; The hydrodynamic damping matrix; It is the gravitational spinor; This is the attitude angle vector; It is the buoyancy spinor; To control the force spinor; It is a linear damping matrix; It is a quadratic damping matrix.
[0036] like Figure 3 As shown, the hydrodynamic force consists of two parts: static and dynamic hydrodynamic forces. The static hydrodynamic force is generated by the buoyancy force B acting on the center of buoyancy O. b Generate force spinor The force rotation generated by dynamic hydrodynamics Among them, the additional mass item Includes acceleration This leads to acceleration The solution depends on both the rigid body inertia matrix and the additional mass matrix.
[0037] S202. Decompose the Fossen underwater dynamics model into a rigid body dynamics module solved by the physics simulation engine and a hydrodynamic module that calculates the equivalent hydrodynamic spindle by the hydrodynamic plugin and applies it to the physics simulation engine.
[0038] Specifically, the left side of the equation in the Fossen underwater dynamics model calculation formula is defined as the rigid body dynamics module, which is solved by the physics simulation engine. The right side of the equation is defined as the hydrodynamic module, which calculates the equivalent hydrodynamic spindle using the hydrodynamic plugin and applies it to the physics simulation engine in the form of external force spindle.
[0039] S203. Establish externally applied equations that include rigid body inertia terms but exclude additional mass force terms, and construct transformation matrices based on the rigid body inertia matrix and the additional mass matrix.
[0040] Specifically, the externally applied equation is expressed as: ; In the formula, This is the equivalent hydrodynamic spindle; Among them, the terms on the left side of the externally applied equation are the rigid body inertia matrix, the rigid body Coriolis centripetal force, and the gravity, respectively, while the right side is the equivalent hydrodynamic spindle to be determined. The transformation matrix is: ; In the formula, Let be the transformation matrix.
[0041] S204. Transform the Fossen underwater dynamics model based on the transformation matrix to generate a transformed hydrodynamic model. Subtract the externally applied equations from the transformed hydrodynamic model to obtain the expression for the equivalent hydrodynamic spindle.
[0042] Specifically, the Fossen underwater dynamics model is multiplied by the transformation matrix on the left. This is then subtracted from the externally applied equations, thereby eliminating the acceleration force spinor caused by the added mass in the Fossen underwater dynamics model. The hydrodynamic application model is used to calculate the equivalent hydrodynamic spindle, i.e., the expression for the equivalent hydrodynamic spindle is: ; ; In the formula, It is a 6×6 identity matrix.
[0043] The inertial matrix of a typical underwater robot With the additional mass matrix All are strictly diagonally dominated matrices, and The diagonal element values are significantly greater than The corresponding element, therefore, in this physical context, + Reversible. Therefore, the equivalent hydrodynamic spindle... It consists of the following four items: the transformation matrix Weighted mass added due to ocean currents, fluid Coriolis force and damping force spindle, and longitudinal Weighted buoyancy spin, Weighted rigid body Coriolis force and gravitational spinor, and T-weighted control force spinor.
[0044] This invention introduces a transformation matrix based on the rigid body inertia matrix and the applied mass matrix between the Fossen underwater dynamics model and the externally applied equations. By multiplying the transformation matrix by the externally applied equations and then subtracting from it, the current acceleration term in the Fossen underwater dynamics model is precisely eliminated. Compared to traditional methods that directly approximate the applied mass term using historical acceleration, leading to numerical divergence and model distortion, this construction process mathematically eliminates the dependence on the current acceleration. The resulting equivalent hydrodynamic spinor expression consists only of known quantities such as the current motion state, ocean current state, and hydrodynamic parameters. Therefore, without modifying the physics simulation engine kernel, it achieves a high-fidelity dynamic solution theoretically equivalent to the Fossen underwater dynamics model, fundamentally ensuring the numerical stability of the simulation process.
[0045] In some embodiments of the present invention, the hydrodynamic plug-in is organized in the form of a robot operating system function package, inherits the System class of the physical simulation software Gazebo, is compiled into a dynamic link library, and is bound to the corresponding physical link in the robot model description file through the plug-in tag.
[0046] Specifically, the robot model description file is URDF, Xacro, or SDF, and the plugin tag is... <gazebo>or <plugin>.
[0047] This invention organizes and inherits the System class of the physical simulation software as a robot operating system function package. By compiling it into a dynamic link library and binding it to the corresponding physical link in the robot model description file using a plugin tag, seamless integration with the physical simulation engine is achieved. This approach eliminates the need to modify the kernel source code of the physical simulation software; high-fidelity hydrodynamic models can be embedded into existing simulation frameworks through standardized interfaces, significantly reducing the complexity of plugin deployment and cross-platform porting costs. Furthermore, because the hydrodynamic plugin is decoupled from the robot model file, the same plugin can be easily applied to different underwater robot models. Adaptation is achieved by modifying the binding relationships in the description file, improving the versatility and reusability of the simulation method and providing flexible software architecture support for the rapid construction and iteration of underwater robot simulation environments.
[0048] In some embodiments of the present invention, the nominal values of hydrodynamic parameters are stored in a YAML configuration file in the form of key-value pairs; when the hydrodynamic plugin is loaded, it reads the nominal values from the YAML configuration file through the parameter service of the robot operating system, reads the perturbation upper and lower bounds of the hydrodynamic parameters set in the simulation script, and randomly samples within the perturbation upper and lower bounds to generate actual hydrodynamic parameters.
[0049] In a specific embodiment of the present invention, the actual hydrodynamic parameters are: ; ; In the formula, These are the actual hydrodynamic parameters; These are the nominal values of the hydrodynamic parameters; These are random sampled values; For perturbation of the upper bound; To perturb the lower bound; Let be the uniform distribution function; represent the distribution it follows, specifically, the random sampled values follow an interval [ ]. A uniform distribution on [the surface].
[0050] In a specific embodiment of the present invention, the configuration process of the YAML configuration file is as follows: Configure physical parameters, including robot mass Around the body coordinate system and Moment of inertia of the shaft and inertial product .
[0051] Configure nominal hydrodynamic parameters, including nominal static and dynamic hydrodynamic parameters. Adopt the Fossen hydrodynamic notation system, with the first letter... Indicates along the body coordinate system , and Force in the axial direction, Indicates the torque on the corresponding axis, subscript Indicates forward, lateral, and heave linear velocities. This indicates roll, pitch, and yaw angular velocities. The nominal values of hydrodynamic parameters are indicated by a horizontal bar above the symbol (e.g., ...). The actual value is not marked with a hyphen (e.g., ...). The nominal static hydrodynamic parameters include seawater density. Drainage volume buoyancy center position The nominal dynamic hydrodynamic parameters include the added mass coefficient, the linear damping coefficient, and the quadratic damping coefficient. The nominal added mass coefficient includes the direction coefficients of the main degrees of freedom. and coupling coefficient The nominal linear damping coefficient includes the direction coefficients of the main degrees of freedom. and coupling coefficient The nominal secondary damping coefficient includes the direction coefficients of the main degrees of freedom. and coupling coefficient . Configure ocean current model parameters. The ocean current model in this embodiment of the invention adopts a sinusoidal wave form with a constant component; that is, the ocean current velocity is composed of a constant component and a sinusoidal oscillating component. The ocean current model parameters include parameters along the body coordinate system. constant components of ocean currents in three directions Sine amplitude angular frequency and initial phase .
[0052] After loading, the hydrodynamic plugin performs initialization to determine the actual hydrodynamic parameters. After loading the hydrodynamic plugin, the physical simulation software calls the `Configure` method of the `System` class overridden by the plugin to perform initialization. First, it reads the initial parameters set in the YAML configuration file in ROS parameter form. Simultaneously, it reads the upper and lower bounds of the hydrodynamic parameter perturbation random domain set in the simulation script in ROS parameter form. Then, it randomly samples within this range to generate actual hydrodynamic parameters, thereby determining all the actual parameters applied by the hydrodynamic forces, and constructs the rigid body inertia matrix, added mass matrix, and linear damping matrix accordingly. The initialization configuration process of the hydrodynamic plugin after loading is as follows: Figure 4 As shown, the specific steps are as follows: The initial robot parameters, including physical parameters, nominal hydrodynamic parameters, and ocean current model parameters, are read from the YAML configuration file via the ROS parameter service and stored in their respective internal variables. All nominal hydrodynamic parameters are then combined to construct a nominal hydrodynamic parameter set. Simultaneously, by reading the upper and lower bounds of the perturbation random domain of hydrodynamic parameters using the ROS parameter service, an upper bound set of hydrodynamic parameters is constructed. and lower bound set .
[0053] For any nominal hydrodynamic parameters According to its corresponding perturbation lower bound and the Upper Realm Random values are sampled using a uniform distribution function. and with nominal value Based on this, calculate the corresponding actual hydrodynamic parameters. This yields the actual added mass coefficient, linear damping coefficient, quadratic damping coefficient, and static hydrodynamic parameters, which are the nominal hydrodynamic parameters in the configuration file.
[0054] The inertial matrix of the underwater robot is constructed based on the physical parameters obtained above. : ; Construct an additional mass matrix from actual hydrodynamic parameters. and linear damping matrix : ; 。
[0055] After obtaining the above parameters, the hydrodynamic plugin performs hydrodynamic calculations, application, and publication during updates. Within each simulation step, the physics simulation software calls the PreUpdate method of the System class overridden by the hydrodynamic plugin, performing the following update operations sequentially: First, it reads the robot's current motion state through the physics simulation engine interface function; simultaneously, it subscribes to the control force screw topic in the simulation script to obtain control force and torque. Second, based on the ocean current model, it calculates the velocity and acceleration vectors of the ocean current in the body coordinate system at the current moment, and then solves for the relative ocean current velocity. Based on this, it calculates the equivalent hydrodynamic screw according to the hydrodynamic application model, and then applies it to the corresponding physical links of the robot through the external force screw interface of the physics simulation engine. Finally, the plugin publishes its internal key data to the outside world through the ROS topic. The internal key data includes actual hydrodynamic parameters, ocean current data, transformation matrices, and equivalent hydrodynamic screws, etc., for data interaction in reinforcement learning algorithms.
[0056] It should be noted that: because the physics simulation engine and the Fossen underwater dynamics model use different coordinate systems, the process of substituting the robot's current motion state and actual hydrodynamic parameters into the expression for the equivalent hydrodynamic spinor to obtain the equivalent hydrodynamic spinor also includes: The robot's current motion state is transformed from the first body coordinate system used by the physics simulation engine to the second body coordinate system used by the Fossen underwater dynamics model.
[0057] Similarly, before applying the equivalent hydrodynamic spindle to the physics simulation engine, the following steps are also included: The equivalent hydrodynamic spindle is transformed from the second body coordinate system to the first body coordinate system.
[0058] Specifically, the first body coordinate system is the front-left-up (FLU) body coordinate system, and the second body coordinate system is the front-right-down (FRD) body coordinate system.
[0059] In a specific embodiment of the present invention, the calculation, application, and deployment process in the hydrodynamic plug-in update is as follows: Figure 5 As shown, the specific steps are as follows: Acquire all state data required for the hydrodynamic application model. At the current time t, the hydrodynamic plugin reads the robot's velocity vector in the front-left-up (FLU) body coordinate system within the Gazebo environment through the motion state interface function of the physics simulation engine. With attitude angle vector After rotational transformation to the lower right body coordinate system, the velocity vector of the Fossen hydrodynamic model is obtained. With attitude angle vector It satisfies the following transformation relationship: ; in, It is a rotation matrix. These represent roll, pitch, and yaw angles, respectively. The ocean current parameters are substituted into the ocean current model to calculate the ocean current velocity vector. and acceleration vector Among them, the ocean current velocity component , , , acceleration component Relative ocean current speed ,and , This represents the linear velocity component relative to the ocean current. Additionally, the plugin subscribes to the control force wrench topic (topic name / hydro_plugin / control_wrench) published by the simulation script to obtain the control force wrench. .
[0060] Calculate the equivalent hydrodynamic spinor based on the expression for the equivalent hydrodynamic spinor. Specifically, using the determined actual hydrodynamic parameters and all state data acquired within the current simulation step, the above parameters and states are substituted into the expression for the equivalent hydrodynamic spindle, and its calculation is completed: ; Among them, the rigid body Coriolis matrix Represented as: ; Added mass Coriolis matrix Represented as: ; Secondary damping matrix Represented as:
[0061] ; Gravitational spinor and buoyancy spin They are represented as follows:
[0062] 。
[0063] in, This is the acceleration due to gravity.
[0064] The calculated equivalent hydrodynamic spindle The conversion formula from the FRD body coordinate system to the FLU body coordinate system used by the physical simulation software is as follows: ,and .in, These are the force vector and torque vector in the FLU body coordinate system, respectively. Force vectors are applied to the corresponding physical links of the robot through the external force application interface of the Gazebo physics simulation engine (such as the AddRelativeForce function, AddRelativeTorque function, or AddWorldWrench function). and torque vector .
[0065] To facilitate data interaction in reinforcement learning, the hydrodynamics plugin publishes key internal data externally via ROS topics. Specifically: the hydrodynamic parameters topic ( / hydro_plugin / params) publishes actual hydrodynamic parameters at a frequency of 1 Hz, with each parameter stored in the order defined in the YAML configuration file; the transformation matrix topic ( / hydro_plugin / transform_matrix) publishes transformation matrices at a frequency of 1 Hz. The matrix elements are stored in row-major order; the current topic ( / hydro_plugin / current) publishes the current current velocity vector and current acceleration vector in sync with the update frequency of the physics simulation engine; similarly, the equivalent hydrodynamic spinor topic ( / hydro_plugin / additional_wrench) publishes the equivalent hydrodynamic and torque elements of the equivalent hydrodynamic spinor in sync with the update frequency of the physics simulation engine.
[0066] In a specific embodiment of the present invention, the integration and invocation process of the hydrodynamic plug-in is as follows: Figure 6 As shown, specifically: The hydrodynamics plugin is organized as a robot operating system function package, inheriting from the System class of the physical simulation software Gazebo. The hydrodynamics plugin is built using the ROS compilation mechanism to generate a dynamic link library (.so file), which is then included in the robot model description file (URDF / Xacro / SDF). <gazebo> <plugin>Tag referencing enables the binding of physical links to the robot model, completing the instantiation of the hydrodynamic plugin. In the simulation environment, the hydrodynamic plugin uses ROS parameter services and topic mechanisms to achieve data interaction with the YAML (YAML in't MarkupLanguage) configuration file and simulation scripts. Simultaneously, through the physical simulation engine interface functions, it dynamically acquires the robot's motion state within each simulation step, calculates and synchronously applies equivalent hydrodynamic spindles, achieving real-time simulation of hydrodynamic effects. The specific steps are as follows: Read and configure initial parameters. After the hydrodynamic plugin is launched and loaded by the physical simulation software, it reads the robot's initial parameters from the YAML configuration file through the ROS parameter service, and reads the upper and lower bounds of the perturbation random domain of the hydrodynamic parameters configured by reinforcement learning from the simulation script. Based on this, it generates the actual hydrodynamic parameters, thereby obtaining the actual parameters of hydrodynamic application.
[0067] During the synchronous update phase when the hydrodynamic plugin is called by the physical simulation software, the control force spinor is subscribed to by the simulation script in the form of ROS topics. At the same time, internal data such as ocean current data, actual hydrodynamic parameters, and equivalent hydrodynamic spinor are published to the simulation script through ROS topics to meet the data interaction needs in the reinforcement learning training process.
[0068] During the synchronous update phase when the hydrodynamic plugin is called by the physical simulation software, the hydrodynamic plugin obtains the robot's motion state through the physical simulation engine interface, calculates the equivalent hydrodynamic spindle based on the hydrodynamic application model, and applies it to the physical simulation engine through the external force spindle interface.
[0069] In summary, the hydrodynamic simulation method for underwater robots proposed in this invention has the following advantages: 1. The hydrodynamic plugin uses the Fossen underwater dynamics model as its core, implicitly expressing the additional mass term through a transformation matrix, calculating and applying hydrodynamic forces to the physics simulation engine. This approach strictly adheres to the Fossen underwater dynamics model theory, achieving high-fidelity simulation, while avoiding data instability and divergence caused by the explicit expression of the additional mass term. 2. The hydrodynamic plugin achieves seamless embedding through dynamic link libraries and model file tags, without requiring modification of the simulation software source code. Utilizing ROS parameter services and topic mechanisms, the hydrodynamic plugin efficiently achieves internal data interaction with parameter configuration files and simulation scripts, and supports dynamically acquiring the underwater robot's state, calculating, and applying hydrodynamic forces to the physics simulation engine, exhibiting flexible data interactivity. 3. The hydrodynamic plugin reads the simulation script to set the upper and lower bounds of the perturbation random domain for each hydrodynamic parameter. Using the nominal hydrodynamic parameters in the YAML file as a benchmark, it randomly samples within the perturbation domain to generate actual hydrodynamic coefficients, which are then used for subsequent hydrodynamic calculations and applications. This mechanism supports parameter randomization for each simulation, providing rich environmental parameter perturbations for reinforcement learning training and significantly improving the generalization ability of the control strategy.
[0070] To verify the effectiveness of the embodiments of the present invention, in some embodiments, the implicit hydrodynamic application model proposed by this method is compared with the traditional explicit hydrodynamic application model through simulation. Specifically, the complete expression of the Fossen underwater dynamics model is used as the theoretical model, and the solution is obtained using the fourth-order Runge-Kutta method in MATLAB software, providing reference values for the state response. To reduce the influence of acceleration noise in the traditional explicit hydrodynamic application model, the acceleration values obtained by velocity differentiation are appropriately filtered. The underwater robot mass... Moment of inertia , , Inertial product Drainage volume , position of buoyancy , Additional mass coefficients in the main degrees of freedom directions , , , , , The coupling-added mass coefficients are all zero. Linear damping coefficients in the main degrees of freedom directions. , , , , , The coupled linear damping coefficients are all zero. , , , , , The coupling secondary damping coefficients are all zero, and the system is set to be free of ocean current interference. The control force spinor is set in the simulation. Force along the direction of the body coordinate system , , torque about the corresponding axis , , .
[0071] Figure 7-14 The paper presents comparative results of underwater robot simulations in specific examples, including velocity, velocity deviation, angular velocity, angular velocity deviation, attitude angle, attitude angle deviation, position response curves, and position deviation. The symbols are... This represents the deviation of the corresponding state (velocity, angular velocity, attitude angle, and position) from the theoretical values of the Fossen model. Figure 7-8 As can be seen, 3 seconds after the simulation started, the forward velocity of the Fossen underwater dynamics theoretical model... u and vertical velocity w The lateral velocities gradually reached stable values of 0.38 m / s and 0.22 m / s, respectively. v A slight oscillation occurred, followed by a gradual stabilization to around 0.1 m / s. The implicit hydrodynamic application model closely followed the theoretical value, while the explicit hydrodynamic application model showed a forward velocity... u and vertical velocity w It is significantly faster than the theoretical value, and the oscillation phase and amplitude of the lateral velocity v deviate from the theoretical value. For example... Figure 9-10 As shown, the angular velocity response of the implicit hydrodynamic application model basically coincides with the Fossen theoretical value, while the roll angular velocity of the explicit hydrodynamic application model... p The oscillation response is misaligned, pitch angular velocity q and roll angular velocity r The response is faster than the theoretical value. For example... Figure 11-12 As shown, the attitude angle of the implicit hydrodynamic application model The response is consistent with Fossen's theoretical value, and the roll angle of the explicitly hydrodynamically applied model is... The oscillation response curve shows a large error, and the heading angle 1.2 appeared after 10 seconds. o Significant angular deviation. For example... Figure 13-14 As shown, the implicit hydrodynamic application model closely tracks the Fossen theoretical model in its position, while the explicit hydrodynamic application model, during simulation, shows a forward position... x Lateral position y and vertical position z The maximum deviations were 0.022m, 0.008m and 0.013m, respectively, and fluctuated repeatedly, which were significantly higher than the deviations of the implicit model.
[0072] Depend on Figures 7 to 14 Specific examples show that the implicit hydrodynamic application model can accurately reproduce the dynamic response of the Fossen underwater dynamics theoretical model, and its velocity, angular velocity, attitude angle, and position are consistent with the theoretical values. In contrast, the traditional explicit hydrodynamic application model shows significant deviations in multiple state responses such as forward and vertical velocities, roll and pitch angular velocities, attitude angles, and positions. This verifies that the implicit hydrodynamic application model proposed in this method has higher simulation accuracy than the explicit model.
[0073] This invention also provides motion diagrams of an underwater robot in the Gazebo simulation environment, specifically as follows: Figure 15 As shown, Figure 15 This fully showcases the physical environment, rendering engine, solver, and entity relationships of the BlueROV2 underwater robot within the Gazebo simulation environment. The top left corner displays the Gazebo title. Below the title is the toolbar, and below the toolbar is the 3D view area. The upper right corner houses the model container area, identified by "World" (the simulation world). The lower right corner displays the model properties area, identified by "Entity Tree." The toolbar supports manual addition of commonly used shapes, adjustment of simulation environment brightness, and operations such as rotation and translation. The 3D view area, as the core display area of the entire simulation, shows both the three-dimensional appearance of the BlueROV2 underwater robot and its real-time changes in position and attitude during the simulation. The model container area contains several parts: Entity 1 represents general entities; Atmosphere describes atmospheric environment parameters; Physics Engine Plugin represents the physics engine plugin; WorldSdf is the world description file; and Scene represents the visual scene. In the World's property configuration area, several configurable items are indicated by "+". Gravity is used to define the gravity vector in the world, for example, -9.82 m / s² in the z-axis direction. The SystemPlugin Info records basic information about system-level plugins. An example of its Name field is "empty," indicating a placeholder empty plugin. The Physics module further includes several sub-items: Render Engine Server Headless, a headless rendering engine server used for background simulation; Physics Collision Detector, a collision detector using the Open Dynamics Engine (ODE) for collision detection and response; Magnetic Field, simulating magnetic field parameters; Render Engine Gui Plugin, a graphical interface rendering engine plugin used for visualization; PhysicsSolver, a physics solver using DantzigBoxedLcpSolver, a bounded linear complementarity problem solver based on the Dantzig algorithm; and Render Engine Server Plugin, a rendering engine server plugin responsible for background rendering. The model attribute area lists the attribute information of the main entities in the current simulation world environment in a tree structure. Here, ground_plane represents the seabed plane, serving as the simulation reference plane. bluerov2 represents the BlueROV2 underwater robot model, which includes the entity model, sensors, and appearance. sun represents the directional light source entity used to simulate solar illumination. Within the aforementioned attribute area, clicking on any entity will display its specific attributes and their values.
[0074] On the other hand, embodiments of the present invention also provide an underwater robot simulation device, such as... Figure 16 As shown, the underwater robot simulation equipment 1600 includes: The physics simulation engine unit 1601 is integrated into a general-purpose computer or embedded industrial control computer and is used to solve the rigid body dynamics of underwater robots. The robot operating system communication interface 1602 is used to read the nominal values and perturbation upper and lower bounds of hydrodynamic parameters through parameter services; The hydrodynamic plug-in unit 1603 is stored in the memory of the industrial control computer as a dynamic link library and is loaded and executed by the processor; The hydrodynamic plug-in unit 1603 is configured as follows: Based on the nominal value and the upper and lower limits of the perturbation, actual hydrodynamic parameters are generated by random sampling within the range of the upper and lower limits of the perturbation. Within each simulation step, the robot's current motion state is obtained through the state interface of the physical simulation engine unit; Substitute the robot's current motion state and actual hydrodynamic parameters into the expression for the equivalent hydrodynamic screw to obtain the equivalent hydrodynamic screw. The expression for the equivalent hydrodynamic screw does not include the underwater robot's current acceleration and uses hydrodynamic parameters as variables. The equivalent hydrodynamic spindle is applied to the physical simulation engine unit through the external force interface of the physical simulation engine unit to simulate the underwater robot.
[0075] The underwater robot simulation device 1600 provided in the above embodiments can realize the technical solutions described in the above embodiments of the underwater robot hydrodynamic simulation method. The specific implementation principles of each module or unit can be found in the corresponding content in the above embodiments of the underwater robot hydrodynamic simulation method, which will not be repeated here.
[0076] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0077] The above provides a detailed description of the hydrodynamic simulation method for an underwater robot provided by the present invention. Specific examples have been used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core idea of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the idea of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.< / plugin> < / gazebo> < / plugin> < / gazebo>
Claims
1. A hydrodynamic simulation method for an underwater robot, characterized in that, include: A hydrodynamic plugin is constructed to calculate the equivalent hydrodynamic spindle and apply it to the physics simulation engine; wherein the expression of the equivalent hydrodynamic spindle does not include the current acceleration of the underwater robot and uses hydrodynamic parameters as variables; Before the simulation begins, the nominal values and perturbation upper and lower bounds of the hydrodynamic parameters are read through the parameter service of the robot operating system, and the actual hydrodynamic parameters are generated by random sampling within the range of the perturbation upper and lower bounds. Within each simulation step, the hydrodynamic plug-in obtains the robot's current motion state through the physical simulation engine interface, substitutes the robot's current motion state and the actual hydrodynamic parameters into the expression of the equivalent hydrodynamic spindle to obtain the equivalent hydrodynamic spindle, and applies the equivalent hydrodynamic spindle to the physical simulation engine to simulate the underwater robot; The process of constructing the expression for the equivalent hydrodynamic spinor is as follows: A Fossen underwater dynamics model is established, which includes a rigid body inertia term and an additional mass force term. The rigid body inertia term is the product of the rigid body inertia matrix and the current acceleration of the underwater robot. The additional mass force term is the product of the additional mass matrix and the relative acceleration. The relative acceleration is the difference between the current acceleration of the underwater robot and the acceleration of the ocean current. The Fossen underwater dynamics model is decomposed into a rigid body dynamics module solved by the physics simulation engine and a hydrodynamic module that calculates the equivalent hydrodynamic spindle and applies it to the physics simulation engine. Establish an externally applied equation that includes the rigid body inertia term but excludes the additional mass force term, and construct a transformation matrix based on the rigid body inertia matrix and the additional mass matrix; Multiply the Fossen underwater dynamics model by the transformation matrix to generate a transformed hydrodynamic model. Subtract the externally applied equation from the transformed hydrodynamic model to obtain the expression for the equivalent hydrodynamic spinor. The externally applied equation is: ; The expression for the equivalent hydrodynamic spin is: ; ; In the formula, This is the equivalent hydrodynamic spindle; The transformation matrix; For the additional mass matrix; The speed of the ocean current; For ocean current acceleration; For the added mass Coriolis matrix; The relative ocean current speed, ; This represents the velocity vector of the underwater robot. This represents the acceleration vector of the underwater robot. The hydrodynamic damping matrix; It is the gravitational spinor; This is the attitude angle vector; It is the buoyancy spinor; For rigid body Coriolis matrix; To control the force spinor; Here is the inertial matrix of the underwater robot; It is a 6×6 identity matrix.
2. The hydrodynamic simulation method for underwater robots according to claim 1, characterized in that, The physical simulation engine is integrated into the physical simulation software. The hydrodynamic plugin is organized as a robot operating system function package, inherits the System class of the physical simulation software Gazebo, is compiled into a dynamic link library, and is bound to the corresponding physical link in the robot model description file through the plugin tag.
3. The hydrodynamic simulation method for underwater robots according to claim 1, characterized in that, The nominal values of the hydrodynamic parameters are stored in the YAML configuration file in the form of key-value pairs. When the hydrodynamic plugin is loaded, it reads the nominal values from the YAML configuration file through the parameter service of the robot operating system, reads the perturbation upper and lower bounds of the hydrodynamic parameters set in the simulation script, and randomly samples within the range of the perturbation upper and lower bounds to generate the actual hydrodynamic parameters.
4. The hydrodynamic simulation method for underwater robots according to claim 3, characterized in that, The actual hydrodynamic parameters are as follows: ; ; In the formula, These are the actual hydrodynamic parameters; These are the nominal values of the hydrodynamic parameters; These are random sampled values; For perturbation of the upper bound; To perturb the lower bound; It is a uniform distribution function.
5. The hydrodynamic simulation method for underwater robots according to claim 1, characterized in that, The robot's current motion state includes linear velocity, angular velocity, and attitude angle. The physical simulation engine uses a first body coordinate system, and the Fossen underwater dynamics model uses a second body coordinate system. Before substituting the robot's current motion state and the actual hydrodynamic parameters into the expression for the equivalent hydrodynamic spinor to obtain the equivalent hydrodynamic spinor, the process further includes: The linear velocity, angular velocity, and attitude angle are transformed from the first body coordinate system to the second body coordinate system.
6. The hydrodynamic simulation method for underwater robots according to claim 5, characterized in that, Before applying the equivalent hydrodynamic spindle to the physics simulation engine, the process also includes: The equivalent hydrodynamic spin is transformed from the second body coordinate system to the first body coordinate system.
7. The hydrodynamic simulation method for underwater robots according to claim 1, characterized in that, The hydrodynamic plugin publishes internal key data to the outside world through the robot operating system topic in each simulation step. The internal key data includes at least one of the following: actual hydrodynamic parameters, transformation matrix, current ocean current velocity vector, current ocean current acceleration vector, and equivalent hydrodynamic spindle.
8. An underwater robot simulation device, characterized in that, include: The physics simulation engine unit, integrated into a general-purpose computer or embedded industrial control computer, is used to solve the rigid body dynamics of underwater robots. The robot operating system communication interface is used to read the nominal values and perturbation upper and lower bounds of hydrodynamic parameters through parameter services; The hydrodynamic module is stored in the memory of the industrial computer as a dynamic link library and is loaded and executed by the processor. The hydrodynamic plug-in unit is configured as follows: Based on the nominal value and the upper and lower limits of the perturbation, actual hydrodynamic parameters are generated by random sampling within the range of the upper and lower limits of the perturbation. Within each simulation step, the robot's current motion state is obtained through the state interface of the physical simulation engine unit; Substitute the robot's current motion state and the actual hydrodynamic parameters into the expression for the equivalent hydrodynamic screw to obtain the equivalent hydrodynamic screw; the expression for the equivalent hydrodynamic screw does not include the underwater robot's current acceleration and uses the hydrodynamic parameters as variables; The equivalent hydrodynamic spindle is applied to the physical simulation engine unit through the external force interface of the physical simulation engine unit to simulate the underwater robot. The hydrodynamic plug-in unit is also configured to: A Fossen underwater dynamics model is established, which includes a rigid body inertia term and an additional mass force term. The rigid body inertia term is the product of the rigid body inertia matrix and the current acceleration of the underwater robot. The additional mass force term is the product of the additional mass matrix and the relative acceleration. The relative acceleration is the difference between the current acceleration of the underwater robot and the acceleration of the ocean current. The Fossen underwater dynamics model is decomposed into a rigid body dynamics module solved by the physics simulation engine and a hydrodynamic module that calculates the equivalent hydrodynamic spindle and applies it to the physics simulation engine. Establish an externally applied equation that includes the rigid body inertia term but excludes the additional mass force term, and construct a transformation matrix based on the rigid body inertia matrix and the additional mass matrix; Multiply the Fossen underwater dynamics model by the transformation matrix to generate a transformed hydrodynamic model. Subtract the externally applied equation from the transformed hydrodynamic model to obtain the expression for the equivalent hydrodynamic spinor. The externally applied equation is: ; The expression for the equivalent hydrodynamic spin is: ; ; In the formula, This is the equivalent hydrodynamic spindle; The transformation matrix; For the additional mass matrix; The speed of the ocean current; For ocean current acceleration; For the added mass Coriolis matrix; The relative ocean current speed, ; This represents the velocity vector of the underwater robot. This represents the acceleration vector of the underwater robot. The hydrodynamic damping matrix; It is the gravitational spinor; This is the attitude angle vector; It is the buoyancy spinor; For rigid body Coriolis matrix; To control the force spinor; Here is the inertial matrix of the underwater robot; It is a 6×6 identity matrix.
Citation Information
Patent Citations
Method and device for constructing hydrodynamic model of underwater robot
CN118446108A
Hydrodynamic response prediction method and system for modular underwater robot
CN122199830A