1. Introduction
The advent of autonomous underwater vehicles has enabled significant advances in ocean floor mapping. However, the operation costs are impractical, typically exceeding 3,000 dollars per linear kilometer surveyed due to repositioning and launch/recovery. This low endurance is due to the power requirements of deep-sea operations. Autonomous underwater gliders (AUGs), incorporating the characteristics of both AUVs and autonomous drifters, scales down the power requirements and sizes to extend operation coverage and duration.
However, such long-duration, large-area missions of AUGs increase the cost and complexity of underwater testing of new approaches to autonomous mission planning and the development of hardware and software onboard. Therefore, a simulator that can support rapid design, development, and testing of autonomy solutions through software-in-the-loop simulation throughout the operation range, running at faster-than-real-time, is essential.
The ROS-Gazebo framework has become the de-facto standard environment for prototyping and testing robotic systems based on an open-source Gazebo robot simulator (Koenig and Howard, 2004). Many projects have exploited this framework to extend its capabilities for underwater simulations and maritime sensors for specific use cases (Prats et al., 2012;Kermorgant, 2014;Fernández, 2015;Gwon et al., 2017;Heriksen et al., 2016;Ciéslak, 2019;Suzuki and Kawabata, 2020;Jamieson et al., 2021). Among these projects, the UUV Simulator (Manháes et al., 2016), later inherited by Project DAVE (Dave, 2022), provides features for relatively general purposes. However, it lacks the critical features required for AUG simulation: glider dynamics, spatial/temporal ocean currents, faster-than-real-time simulation, hardware-in-the-loop interfaces, etc.
This paper explains AUG Sim, a simulator with extended capabilities customized to AUGs for ocean mapping. To support the mission characteristics of underwater gliders, critical features, including spatial/temporal-dependent ocean currents, dynamic assimilation of bathymetry, underwater glider dynamics, and faster-than-real-time capabilities, have been developed and demonstrated. Vehicle dynamics are formulated for next-generation hybrid underwater gliders (hybrid-AUGs), which operate in both the buoyancy engine of the AUGs and thrusters to improve navigation for bathymetry mappings, that is, line trajectory in ocean currents. The simulation results were validated with experiments while operating faster than real-time. This ability to test the autonomy solution of glider missions prior to deployment allows for rapid feedback early in the design cycle, demonstrating its utility in development.
2. Background and Objectives
In part of the development of EPIC-DAUG (Enhanced Propulsion Integrated Capability - Deep Autonomous Underwater Glider, Figure 1), which will incorporate significant innovation in propulsion, control, payload, communications, and navigation systems in development by the Woods Hole Oceanographic Institution (WHOI), a simulator capable of featuring various sensors, hybrid glider dynamics, and underwater environments for long-range missions operating faster-than-real-time was required.
The main objectives are to test high-level mission codes through low-level control of vehicle components, incorporating the following:
-
• Kinematics/dynamics of Hybrid-AUG physics
-
• Sensors (GPS, DVL, altimeter, USBL, Multi-beam sonar, etc.)
-
• Environmental influences (Ocean currents, Arbitrary Bathymetry)
Also, it should feature the following for mission planning:
-
• Multi-vehicle support, Faster-than-real-time, Live visualization
-
• Interactive interface with onboard driver for adaptive mission
There were no available simulators in the open-source community specific to Hybrid-AUG. However, relatively generic open-source underwater robotic simulator packages are available. AUG Sim is built on top of the simulator packages of Project DAVE, which is also based on the UUV simulator. The UUV simulator is a package containing necessary basic implementations for unmanned underwater vehicles (UUV), such as remotely operated vehicles (ROV) and autonomous underwater vehicles (AUV), for rapid prototyping and simulation in reproducible virtual environments. It is openly available for use as the base platform. Furthermore, Project DAVE added more features for manipulation and physics-based multibeam sonar (Choi et al., 2021). The key advantages of building on top of previous packages are that they inherit common underwater physics, sensors, utility plugins, and capabilities.
3. Glider Dynamics
By taking advantage of the existing structure of the UUV simulator, modifications were conducted on the vehicle physics plugins to incorporate the glider's dynamic models, as shown in Figure 2. The distinctive characteristics of the gliders are the changes in the internal mass distribution and ballast volume, which correspond to the underwater object plugin and buoyant object plugin in the UUV simulator.
The coordinate frames to define the dynamics of the glider, two reference frames are defined: body-fixed and inertial. The body-fixed frame coincides with the glider's center of buoyancy (CB) when the foils are in a neutral position and is denoted by subscript cb. The inertial frame is fixed to the ocean surface and expressed by vector η. The x-axis of the body-fixed frame xcb is aligned with the longitudinal body axis from the tail to the nose. The transverse axis ycb is in its direction toward the starboard side of the body, and the zcb is the normal direction axis with the bottom side as positive. For the inertial frame, z is fixed in the direction of gravity, x , and y are defined as perpendicular to each other, and z.
Notations for the positions and velocities of the motions are defined in the following vectors, consistent with Fossen's notation (Fossen, 1994).
In addition, the center of gravity(CG) and center of buoyancy(CB) are denoted as and respectively in the inertial reference frame. The angle of attack α and sideslip angle β can be formulated as and .
The transformation matrix between the body-fixed and inertial reference frames is defined as follows:
where
here, S, C, T are sine, cosine, and tangent respectively.
3.1 Equations of motion for hybrid glider
The complete non-linear 6-DOF equations of motion can be written in matrix form in the body-fixed reference frame as follows:
where
here, M is the mass matrix including components of the rigid body MRB and added mass MA , C is the Coriolis-centripetal matrix with a rigid body and added mass components, D is the damping matrix considering glider hydrodynamics including lift, drag, and moment of the foil wings Df and the hull Dh, g(η) is the hydrostatic restoring force due to gravitational and buoyancy, and τ represents the external forces applied to the glider.
3.1.1 Rigid Body
The equations of motion for the rigid-body dynamics of the glider can be written as follows:
where, represents the forces applied to the body, including added mass τA , damping τD , hydrostatic (restoring) τR, and hydrodynamic (propeller and foils) τH.
The mass and the Coriolis-centripetal matrix of the rigid body are defined as follows:
here, the superscripts represent 3 × 3 components, I0 is the inertia matrix, and the operator S(·): R3 → R3 × 3 is the skew-symmetric matrix operator defined as follows:
In rigid body matrices, m, which represents the mass of the body, is not consistent because of the change in volume in the buoyancy engine. The total mass m consists of fixed mass, body hull mh and sliding mass ms, and variable mass mw dependent on volume displacement ∇.
In addition, the center of gravity vector rcg changes as the sliding mass (battery pack) moves. Considering that the sliding mass moves only along the x-axis of the body-fixed reference frame xb and the buoyancy engine is aligned along the same axis, it can be obtained as follows:
where
where xs is the longitudinal distance to the sliding mass, xw is the distance to the center of the water mass in the buoyancy engine, rw is the radius of the buoyancy engine cylinder, and the subscript zero represents the initial value at the zero pitch condition.
For the inertia matrix I0, it is assumed that the glider is symmetric () and is obtained by assuming a prolate spheroid as follows:
here, a is half the length of the body, and b is the hull radius.
3.1.2 Added mass
The added mass force applied to the body τA can be expressed as follows (Isa et al., 2014):
where
here, . The center of the added mass (CA) is assumed to be equal to CG to have the added mass inertia matrix diagonal and transformed to the body-fixed reference frame.
3.1.3 Hydrostatic Forces
The gravitational and buoyant forces acting on the vehicle act as hydrostatic forces at the center of gravity and center of buoyancy, respectively. The hydrostatic restoring forces can be represented using the rotation matrix as follows:
here, W = mg is the gavitational force acting on a submerged vehicle, and B = ρg∇ is the buoyancy force. For the glider, it is assumed that is neutrally buoyant and satisfies W = B = mg = (mh+ms)g.
Accordingly, the hydrostatic forces in the body-fixed reference frame are expressed as follows:
3.1.4 Damping Forces
Damping forces may occur on the glider owing to skin friction acting on the surface. The damping forces depend on the relative velocity and angle of attack. Here, the coupled components of the damping terms were assumed to be insignificant. This can be represented as follows:
here, the damping coefficients cannot to be determined analytically. Values were estimated from the iterative process and compared with the experimental data.
3.1.5 Hydrodynamic Forces
Hydrodynamic forces include lift, drag, and moment forces generated by the glider hull and foils. The forces are dependent on the relative velocity and the angle of attack. Because the lift, drag, and moment coefficients can be defined as constants in certain ranges of the angle of attack and velocity, they can be calculated using the following with prescribed coefficients: For the glider hull, the hydrodynamic drag, lift, and moment forces are represented as follows:
where
here, Ah is the cross-sectional area of the glider, and are the hydrodynamic drag, lift, and moment coefficients, respectively. is the angle of attack of the hull. The final calculation of hydrodynamic forces can be represented as follows:
where Fpropeller is the force generated by the propeller propulsion (if zero, it is be a conventional underwater glider). Using the prescribed coefficients, the hydrodynamic forces due to foils can also be calculated using similar procedures. The forces due to the propeller should have their own interpolated formula that is dependent on the rotation speed and relative glider velocity.
3.1.6 Solver Schemes
Gazebo discretizes its physics equation in a simulated world using first-order Euler methods over time interval Δt. The equation is solved using an iterative Projected Gauss-Seidel algorithm implemented using the modified Open Dynamics Engine (ODE, Smite, 2015) to accelerate the convergence of the iterative solver (Hsu and Peters, 2014). Equation 1 is solved using the same Δt for every update of the simulated world using the Householder rank-revealing QR decomposition of a matrix with a column-pivoting linear solver, which can run much faster than the real-time using commonly available workstations. As the glider dynamics are calculated separately using first-order Euler methods, the accuracy depends on the Δt of the Gazebo world.
3.2 Validation and Verification
For the verification and validation of the vehicle dynamics formulated in Section 3.1, the in-house MATLAB code was validated with the model parameters defined using the knowledge of the physical system. The vehicle geometry and inertial properties are specified as follows:
here, the offset distances xs,0 and xw,0 provide the positions of the associated masses for the zero pitch condition. The inputs ms and ∇are the deviations of the movable mass position and ballast volume, respectively, from the zero-pitch condition. In this case, the ballast was modeled as a cylindrical volume of radius rw . The stationary vehicle mass offset δxυ was introduced to account for trimming errors.
Also, the added mass and damping terms were pre-defined. The damping coefficients cannot to be determined analytically. The added mass coefficients were calculated using the added mass calculations for a prolate ellipsoid and by adding the influence of the wings to the Zw term. The estimates were generated by running the model several times with different values for each damping coefficient.
The results obtained using the in-house MATLAB code with the measured ballast and mass distance from an actual mission were compared with the mission data in the Conception Bay South (CBS) in October 2010. The results well matched the data, as shown in Figure 3.
The Gazebo implementation was validated using the pre-validated MATLAB simulator. A glider dynamic model expression with inertial values using Fossen's hydrodynamic model is implemented on the Gazebo framework. The hydrodynamic model plugin source of the UUV simulator was modified to include the glider dynamics on the right-hand side of the external forces. The assumption applied is that the center of the added mass equals the center of gravity on the x-axis. For simplicity, the fins were removed in the simulator, and the thruster was assumed to force 1 N to the body frame x-axis at all times. The initial parameters that define the geometry of the model are as follows:
Cases for validation of the gazebo results are designed with various settings by controlling the position of the ballast tank xw translated into the ballast tank pump volume and the position of the battery mass xs as shown in Table 1. The results are well-matched to verify the implementation of underwater glider dynamics in the Gazebo, as shown in Figures 4 to 9.
4. Underwater Environments
Multiple vehicle supports were included in the simulator for the combined AUG-ASV and multiple AUG missions. The ocean currents and simulator-backseat driver interface should be defined with vehicle-wise ROS topics for multiple vehicle cases. The structure of the ROS nodes was designed to support multiple vehicles, including surface vehicles. Based on the stratified ocean current database, each vehicle is affected by ocean currents according to its depth. In addition, tidal oscillations were considered according to the position and time of the mission.
4.1 Ocean currents
4.1.1 Stratified ocean currents
The stratified ocean currents are definable in the simulator, with the stratified ocean current database of direction and magnitude at each depth. The developed plugin interpolates from the database to provide a vehicle with the appropriate ocean currents in the simulator at its depths. Using the interpolated value as the initial ocean current velocity, the ocean current, and the noise change can be defined using the Gauss-Markov process. Also, they can be changed on the fly or set to affect only specific periods.
4.1.2 Tidal ocean currents
Considering that the -100 to 100 cm/s ocean currents shift from ebb to flood, consideration of tidal ocean currents is essential. Using the database/prediction of the NOAA (National Oceanic and Atmospheric Administration), ocean currents oscillation for tidal periods were considered in the simulator. Tidal ocean currents can be defined in two ways: a database file downloaded from the NOAA website or harmonic constituents. Along with the simulation starting time specified at the GMT time frame and mean ebb/flood direction, the ocean currents were interpolated to include the tidal ocean currents at any time frame.
4.2 Dynamic bathymetry
The bathymetry of the operation region was assimilated into Gazebo simulator with the automatic spawning/removing of bathymetry tiles, as shown in Figure 10. The operation region of the glider is often a vast area; therefore the bathymetry digital elevation map (DEM) of the seabed cannot be loaded into the simulator at once. Therefore, bathymetry tiles are divided into multiple tiles (typically 1500 × 1500 m) and spawned on demand according to vehicle position (Bathymetry Converter, 2022). The overlapping regions also account for the smooth transition of the tiles. In addition, the number of tiles be kept in the scene is definable for the continuity of the sensory data stream from the sensors attached to the vehicle, for example the bottom tracking of the DVL sensor.
5. Mission simulation
As the main objective of the simulator is to test high-level mission codes through low-level control of vehicles components, the simulator can run common mission profile definitions used for the SLOCUM glider generated using SFMC(Slocum Fleet Mission Control (Teledyne Webb Research), a mission specification code generator). The Slocum glider Simulator Driver (Slocum glider ROS interfaces, 2022) interprets the mission files and interacts with the AUG Sim through the ROS interface layer, which can be manipulated interactively during the run.
5.1 Interfaces
The interfaces between the Gazebo simulator and the backseat driver were structured as shown in Figure 11. The proposed plugin of the Gazebo simulator developed to support the required ROS topics for the back-seat driver to simulate missions.
5.1.1 Kinematics/Dynamics Control
There are two methods of utilizing a the control interface. Kinematic control is used the direct imposition of glider orientation and velocities in cases where the detailed configuration of the glider hardware and its hydrodynamic properties are not available. In this case, the induced velocity due to buoyancy propulsion was calculated using the flight model (Eichhron et al., 2020). On the other hand, the dynamic control fully calculates the glider rigid-body dynamics and hydrodynamics using Fossen's added mass/hydrostatic/hydrodynamic models with the vehicle dynamics formulation introduced in Section 3. The ROS nodes for the control interface receive a ROS message, including the following parameters:
-
∎ Pitch control
-
∎ Thruster control
-
∎ Rudder control
-
∎ Buoyancy engine control
-
The buoyancy pump volume is defined with the first-order function with two coefficients
-
The Flight model (Eichhron et. al., 2020) is adopted to change the attack angle according to the pumped volume to produce buoyancy-induced velocity and orientation change if hardware design including hydrodynamic properties are not determined
-
Also, the glider status is published as an ROS topic for backseat driver.
5.1.2 Sensors
Various sensors implemented in the physical glider were included in the Gazebo simulator, with corresponding sensor-specific parameters. IMU and GPS sensors for the AUG Sim were developed to calculate the reprojection between the geodetic coordinates and the ENU coordinate frame used inside the simulator. Other sensors, such as the altimeter, pressure, DVL, USBL, Multibeam sonar, and camera, are inherited from the UUV simulator and Project DAVE.
5.2 Results
A simulator can run the mission files with control and sensor interfaces to test high-level mission configurations providing simulated low-level control and sensory data. The results in Figure 12 show that more investigation is needed to obtain appropriate hydrodynamic parameters and a vertical ocean current database for simulation. However, the simulator could validate the mission configuration and autonomy of the controller from the start to the end location. These simulation-in-the-loop results imply that the simulator provided low-level glider status during the mission to test the autonomy solution to switch commanding states between ascending and descending equally to the field operations. In addition, the effects of ocean currents, ascending/descending angles, and GPS signals on the surface during the operation were well captured. The curved trajectory represent the effect of the ocean currents when the mission is to reposition the glider northbound in a straight line.
With the default sensors, which include an altimeter, pressure, IMU, GPS, and DVL sensors, the simulator was able to run 120.93 times faster than real-time at the i9-9900K (3.6GHz), GeForce RTX 2080Ti workstation, as shown in Figure 13 which is sufficient for simulating of AUG simulations for ocean mapping.
6. Conclusion
The advent of the Autonomous Underwater Glider has significantly reduced the operating costs for ocean floor mapping compared to other types of underwater vehicles. However, such long-duration, large-area missions of AUGs increase the cost and complexity of underwater testing. Therefore, a simulator that can support the rapid design, development, and testing of autonomy solutions through software-in-the-loop simulation throughout the operation range, faster-than-real-time is essential.
AUG Sim, a simulator with extended capabilities customized to AUGs, is introduced. To support the mission characteristics of underwater gliders, critical features, including spatial/temporal dependent ocean currents, automatic assimilation of bathymetry, underwater glider dynamics, and faster-than-real-time, were developed. The vehicle dynamics formulation was verified using field experimental data.
Testing high-level mission codes generated using the SFMC became possible through low-level control of vehicle components and sensory data through the ROS interface layer using the mission simulation interface. The simulation-in-the-loop results are validated with experiments while operating 120 times faster than the real-time at a workstation. This ability to test the glider missions' autonomy solution before deployment enables feedback early in the design cycle to show its usefulness in developments.
In future studies, the adoption of FVCOM (a prognostic model library for ocean currents) using the Ocean Model Interfaces Library (JPL, 2022) will be planned. Also, continuous field data collection and fine-tuning of the parameters in the vehicle dynamics models are conducted. Migration to Ignition from the Gazebo Classic is also required for long-term support.