Energy Consumption Modeling for Underwater Gliders Considering Ocean Currents and Seawater Density Variation

: Energy management is a critical and challenging factor required for efﬁcient and safe operation of underwater gliders (UGs), and the energy consumption model (ECM) is indispensable. In this paper, a more complete ECM of UGs is established, which considers ocean currents, seawater density variation, deformation of the pressure hull, and asymmetry of gliding motion during descending and ascending. Sea trial data are used to make a comparison between ECMs with and without the consideration of ocean currents, and the results prove that the ECM that considers the currents has a signiﬁcantly higher accuracy. Then, the relationship between energy consumption and multiple parameters, including gliding velocity relative to the current, absolute gliding angle, and diving depth, is revealed. Finally, a simple example is considered to illustrate the effects of the depth-averaged current on the energy consumption. The results demonstrate that at diving depths from 200 m to 1000 m, the energy consumption decreases first and then increases with the growth of V f1 , which has an important effect on the velocity relative to the current V . and time to complete a work cycle will be reduced, resulting in of


Introduction
After about 30 years of development, underwater gliders (UGs) have become an efficient ocean observation instrument, which are widely applied due to their high endurance, low energy consumption, and low cost without expensive supporting vessels [1].
Generally, UGs are designed to be very compact to facilitate deployment and concealment, which limits the space for the battery onboard, making it difficult for a UG to carry an energy intensive sensor, which is, however, necessary in some situations. For example, a UG cannot obtain its precise position without using a high-energy consumption navigation sensor, such as the Doppler velocity logger, which will result in route deviation and increased energy consumption [2]. Therefore, improving energy efficiency without adding an extra battery is critical to improving the performance indicators of UGs, such as motion accuracy, endurance and duration [3]. In addition, as battery power failures have been the second leading cause of glider mission failures [4], accurately predicting the energy consumption of the UG and then implementing energy management are very important and challenging factors for operating the glider efficiently and safely.
To solve the above problem, energy consumption models (ECMs) have been explored and established in many studies, which can reflect the relationship between energy consumption and various parameters of UGs. In the design and perfection stage of the glider, the ECM is usually used to evaluate the rationality of the design parameters, such as hydrodynamic coefficients. During the operation of the glider, the ECM is usually employed to optimize mission deployment, mainly involving path planning, motion parameter optimization, and sensor arrangement.
Sun et al. optimized the shape of a Blended-Wing-Body glider by an ECM to improve the hydrodynamic performance and increase the gliding range [5]. Zhang et al. designed a miniaturized underwater glider, and a simple ECM was used to understand the trade-off between the glide performance and energy cost [6]. Zhou et al. established an ECM for a deep-sea glider to evaluate the benefits of a hybrid buoyancy-regulating system they proposed [7]. Yang et al. used the ECM of the Petrel-L glider to verify the effectiveness of their shape optimization method [8]. Cao et al. optimized the 3D Dubin curve path of UGs by employing a highly nonlinear and coupled ECM as the heuristic function [9]. Using the same ECM in [9], Cao et al. obtained the rendezvous trajectories with minimal energy consumption for multiple gliders [10]. To address the problem of energy-optimal path planning in the presence of flow fields for UGs with complex dynamics, an ECM considering the change of the heading angle was presented by Lee et al. [11]. Woithe and Kermer investigated various sensor control techniques of a Slocum glider with the sensor energy models [12]. Yang et al. optimized the motion parameters of the Petrel-L glider by combining an ECM and the inner penalty-function method [13]. Song et al. established an ECM of the Petrel-II glider to identify the key parameters that affect the energy consumption and gliding range, with which the optimal motion parameters of the Petrel-II glider were determined [14]. Based on an ECM, Wu et al. proposed a multiobjective optimization method to make a trade-off between the energy utilization rate and motion accuracy [15]. Li et al. [16] established an ECM and sailing-range equation suitable for the electric, thermal and hybrid propulsion underwater gliders, and then performed analysis to investigate the effects of configuration parameters and navigation parameters on the endurance of three types of underwater gliders.
The above ECMs are effective in revealing the basic relationship between energy consumption and various parameters of UGs, which is very valuable in the shape design, motion parameter optimization and mission planning of UGs. The existing ECMs, however, may be inaccurate or inconsistent in a real situation in actual marine environments, with ocean currents and gradient of seawater density which have a significant impact on dynamic behaviour and the energy consumption of UGs [17][18][19]. The ocean currents will cause changes in the velocity relative to the current and thus the variation of hydrodynamics. The change of seawater density with depth will lead to buoyancy loss (BL) [1,7]. The dynamic behaviour of the UG when influenced by the ocean current and density variation has been fully investigated by Fan and Woolsey [18] and Yang et al. [1], respectively. However, the energy consumption of UGs under the above two factors has not been studied.
In the present work, we first establish a dynamic model of UGs, considering the depthaveraged current (DAC), and the BL caused by seawater density variation and deformation of the glider's pressure hull. Then, a more complete and realistic ECM is presented based on open-loop control, which means the control parameters are fixed during the ascending or descending phase of one work cycle and will not be affected by the motion state and the ambiance of the glider. In addition, asymmetry of the glider motion during ascending and descending is taken into account. The established ECM is validated to be effective by sea trials. Finally, several simulations are performed to investigate the relationship between the energy consumption and multiple parameters, as well as the impact of DAC on the energy efficiency of the UGs.
The main contributions of this work can be concluded as follows:

1.
A more complete and realistic ECM of the underwater gliders is developed, which considers the effects of horizontal DAC, BL and asymmetry of the glider motion during ascending and descending. The ECM is validated by a comparison with sea trial data.

2.
The relationship between the energy consumption and diving depth, gliding velocity relative to the current and gliding angle is revealed by simulations.

3.
The effects of horizontal DAC on energy consumption are analyzed by a simple example.
The paper is organized as follows. Section 2 presents the dynamic model of UGs, which considers the ocean currents and BL. In Section 3, the ECM is established and validated by sea trial data of a Petrel-II underwater glider. In Section 4, simulations are carried out to study the relationship between energy consumption and various parameters, and the impact of DAC on the energy efficiency of UGs. Section 5 ends the paper by presenting the main conclusions drawn from this work.

Dynamic Model
According to the work of Thomasson and Woolsey [20] and Fan and Woolsey [18], we use Lagrange's equations to establish a dynamic model of the Petrel-II underwater glider, whose structure and workflow can be found in our previous work [14].
For simplicity, we refer to [21] to give the following assumptions and simplifications: 1.
The UG has two planes of symmetry (see Section 2.5 for details).

2.
The dynamic equations of the UG do not include the disturbance forces of waves and wind.

The Reference Frames
As shown in Figure 1, an inertial frame, a body frame, and a flow frame are established to describe the motion of an underwater glider. The origin of the body frame B 0 (b 1 , b 2 , b 3 ) coincides with the centre of buoyancy B 0 , and the inertial frame I 0 (i 1 , i 2 , i 3 ) is established at a point on the sea surface. i 1 , i 2 and i 3 axes point North, East and Down, respectively. The origin of the flow frame V 0 (c 1 , c 2 , c 3 ) also coincides with B 0 . This flow frame can make the calculation of hydrodynamics more convenient.
relative to the current and gliding angle is revealed by simulations. 3. The effects of horizontal DAC on energy consumption are analyzed by a simple example.
The paper is organized as follows. Section 2 presents the dynamic model of UGs, which considers the ocean currents and BL. In Section 3, the ECM is established and validated by sea trial data of a Petrel-II underwater glider. In Section 4, simulations are carried out to study the relationship between energy consumption and various parameters, and the impact of DAC on the energy efficiency of UGs. Section 5 ends the paper by presenting the main conclusions drawn from this work.

Dynamic Model
According to the work of Thomasson and Woolsey [20] and Fan and Woolsey [18], we use Lagrange's equations to establish a dynamic model of the Petrel-II underwater glider, whose structure and workflow can be found in our previous work [14].
For simplicity, we refer to [21] to give the following assumptions and simplifications: 1. The UG has two planes of symmetry (see Section 2.5 for details).
2. The dynamic equations of the UG do not include the disturbance forces of waves and wind.

The Reference Frames
As shown in Figure 1, an inertial frame, a body frame, and a flow frame are established to describe the motion of an underwater glider. The origin of the body frame B0 (b1, b2, b3) coincides with the centre of buoyancy B0, and the inertial frame I0 (i1, i2, i3) is established at a point on the sea surface. i1, i2 and i3 axes point North, East and Down, respectively. The origin of the flow frame V0 (c1, c2, c3) also coincides with B0. This flow frame can make the calculation of hydrodynamics more convenient.
Let X = [x, y, z] T and Θ = [φ, θ, ψ] T denote the position and attitude of the glider in the inertial frame, respectively. Vectors v = [u, v, w] T and ω = [p, q, r] T are defined as the translational velocity and the angular velocity of the glider in the body frame, respectively. In the flow fame, α and β are attack angle and slip angle, respectively. Here, rotation matrixes are defined to transform the motion parameters from one frame to another. BI cos cos sin sin cos cos sin cos sin cos sin sin cos sin cos cos sin sin sin sin cos cos sin sin sin sin cos cos cos Let X = [x, y, z] T and Θ = [ϕ, θ, ψ] T denote the position and attitude of the glider in the inertial frame, respectively. Vectors v = [u, v, w] T and ω = [p, q, r] T are defined as the translational velocity and the angular velocity of the glider in the body frame, respectively. In the flow fame, α and β are attack angle and slip angle, respectively.
Here, rotation matrixes are defined to transform the motion parameters from one frame to another.

Mass Distribution and Model of Mechanics
As shown in Figure 2, the total mass of a glider m v is divided into three parts: stationary mass, moving internal point mass, and variable ballast point mass, which are described in more detail below. BI 0 sin sec cos sec VB cos cos cos sin sin sin cos 0 sin cos sin sin cos where R*# represents the linear velocity transformation matrix from frame * to #, and Ω BI maps the angular velocity in the body frame to the rate of change of Θ in the inertial frame.

Mass Distribution and Model of Mechanics
As shown in Figure 2, the total mass of a glider mv is divided into three parts: stationary mass, moving internal point mass, and variable ballast point mass, which are described in more detail below.

Stationary Mass
The stationary mass ms is the total mass of the pressure hull, fixed wings, ballasts, and other objects relatively stationary to the body. The stationary mass can be regarded as a rigid body. Let , , l l l l      represent the vector from I0 to the centre of stationary mass.

Moving Internal Point Mass
The moving internal point mass mp is the mass of the attitude regulation unit. An internal battery pack with eccentric offset Rp is used as a mass block to adjust the attitude of the glider, and the principle is illustrated in Figure 3. The pitch angle of the glider is adjusted by moving the battery pack back and forth to keep the glider moving forward, and the roll angle is controlled by rotating the battery pack to achieve the turning motion.

Stationary Mass
The stationary mass m s is the total mass of the pressure hull, fixed wings, ballasts, and other objects relatively stationary to the body. The stationary mass can be regarded as a rigid body. Let r s = [r s1 , r s2 , r s3 ] T denote the vector from B 0 to the centre of stationary mass, and l s = [l s1 , l s2 , l s3 ] T represent the vector from I 0 to the centre of stationary mass.

Moving Internal Point Mass
The moving internal point mass m p is the mass of the attitude regulation unit. An internal battery pack with eccentric offset R p is used as a mass block to adjust the attitude of the glider, and the principle is illustrated in Figure 3. The pitch angle of the glider is adjusted by moving the battery pack back and forth to keep the glider moving forward, and the roll angle is controlled by rotating the battery pack to achieve the turning motion. Let r p = r p1 , r p2 , r p3 T denote the vector from B 0 to the centre of the moving internal point mass, and l p = l p1 , l p2 , l p3 T represent the vector from I 0 to the centre of the moving internal point mass.  If 0 p1 r and p1 r  are the initial position and displacement of the mp along the b1 axis, respectively, we know that   denote the rotation angle of battery pack, and then the position of mp in the body frame can be expressed as If r p1 0 and ∆r p1 are the initial position and displacement of the m p along the b 1 axis, respectively, we know that Let ξ (−π/2 ≤ ξ≤ π/2) denote the rotation angle of battery pack, and then the position of m p in the body frame can be expressed as

Variable Ballast Point Mass
The variable ballast point mass m b is the net buoyancy of the glider, which can be adjusted by the buoyancy engine with the ability to transport the hydraulic oil between an external bladder and an internal bladder (tank). Assuming that the buoyancy engine is symmetrically arranged around the b 1 axis, and the position change of the hydraulic oil can be negligible, we define r b = [r b1 , 0, 0] T as the vector from B 0 to the centre of the variable ballast point mass, and l b = [l b1 , l b2 , l b3 ] T as the vector from I 0 to the centre of the variable ballast point mass.
Then, the following equations can be obtained: where m v is the total mass of the glider, M is the mass of water displaced by the glider, and ∆m is the net mass of the glider. Note that before deployment, the glider should be in suspension (completely submerged in seawater), when m b is set to zero. According to Equation (7), we have M = m s + m p on the water surface. Substituting this to Equation (8), we know that the net mass of the glider is determined by the variable ballast point mass m b , i.e., ∆m = m b .

Kinematics
It takes the glider several hours to complete one work cycle to cover a gliding range of several kilometers, during which the ocean currents are less likely to change drastically. Therefore, DAC is taken as the ocean current in one work cycle. In the inertial frame, the DAC vector is provided as North/ East/ Down vector components at each direction (i 1 , i 2 , i 3 ) in the ocean, which can be expressed as Then, the DAC in the body frame can be obtained using Equation (2).
The linear velocity and rotation velocity relative to the current (flow) in the body frame are where ω f is the rotation velocity of the current in the body frame.
In this study, we assume that the ocean current is irrotational, indicating that ω f = [0, 0, 0] T and ω r = ω. Then, the kinematics equations of a glider in the ocean currents are . For vectors a = [a 1 , a 2 , a 3 ] T and b = [b 1 , b 2 , b 3 ] T , the rule for the symbol· iŝ

Dynamics
For simplicity, this section only studies the dynamics of the stationary mass (rigid body part), whose dynamic behaviour can represent the macroscopic behaviour of the whole glider in the ocean. The forces of the moving internal point mass and variable ballast point mass are regarded as external forces.
We first define the generalized velocity of the glider in the body frame as The generalized velocity of the DAC in the body frame is Then, the generalized velocity relative to the current (flow) in the body frame is The kinetic energy of the combined fluid and rigid body system can be expressed as [20,22] where M f is the generalized added inertia matrix [23], M is the generalized inertia matrix of the fluid replaced by the glider, M s is the generalized inertia matrix of the rigid body of the glider. Their specific expressions are where M f is the added mass matrix, J f is the added inertia matrix, and C f is the cross term.
where I is a 3 × 3 identity matrix, and 0 is 3 × 3 matrix of zero.
be the Lagrangian function for a mechanical system with generalized coordinate q. The Lagrange's equation is d dt where Q denotes the generalized exogenous forces.
For a UG, the conventional generalized coordinates q can be expressed as Here, we use the alternative variables (q, q w ) rather than state elements q, . q to express Lagrangian [18,20,22]. If q w = v g , we have . q = D(q)q w (25) where Then, a new Lagrangian can be expressed as Equation (23) can be rewritten as where the calculation of the elements of the matrix G(q, q w ) can be found in [20], and the final result is According to Equation (18), the new Lagrangian of the combined fluid and rigid body system can be obtained by Substituting Equation (29) into Equation (27) and rearranging the terms, we can obtain the dynamic equations of the glider in the body frame.
where f and τ are the external force and moment acting on the rigid body of the glider in the body frame.
To obtain the flow-relative dynamic equations, subtracting from Equation (30) gives

Forces and Moments Acting on the Rigid Body of the Glider
External forces acting on the rigid body include net buoyancy and hydrodynamic force, and external moments acting on the rigid body include the moments from the stationary mass, moving internal point mass and variable ballast point mass, and the hydrodynamic moments. At depth z, the net mass of a glider in the inertial frame is According to Section 2.2.3, we know that The mass of water displaced by the glider at depth z can be calculated by where ρ(z) is the seawater density at depth z, which can be fitted by a polynomial [1] ρ where V h (z) is the volume of the glider at depth z, which can be expressed as where V h0 and ∆V h (z) are the volume of the glider on the water surface and the volume reduction of the glider at depth z caused by the water pressure, respectively. They can be calculated by where K vh is the compressibility of the pressure of the glider. Substituting Equations (34)-(39) into Equation (33) results in Then, the net buoyancy in the body frame can be represented as follows Let τ s , τ p and τ b denote the moments imposed by the stationary mass, moving internal point mass and variable ballast point mass, respectively. Then, we have For a glider with two symmetry planes of b 1 B 0 b 3 and b 1 B 0 b 2 , the inertial hydrodynamic force f I and moment τ I can be expressed as where λ ij is the inertial hydrodynamic coefficient.
In the flow frame, the viscous hydrodynamic force f V S and moment τ V S are usually expressed as where D, SF and L are the drag, side force, and lift, respectively, T DL1 , T DL2 , T DL3 are the hydrodynamic moments about the axes of the flow frame c 1 , c 2 and c 3 , respectively, K * and K ** are coefficients of viscous hydrodynamic forces and moments obtained by the computational fluid dynamic (CFD) method [24], and V r is the value of the velocity relative to the current, which can be calculated by The attack angle α and slip angle β can be expressed as Then, we map the viscous hydrodynamic forces and moments to the body frame as where f S and τ S are the viscous hydrodynamic forces and moments in the body frame, respectively. Finally, we can obtain the total external forces and moments by

Steady-State Motion
For a glider operating in DAC based on open-loop control, the following vectors can be used to describe the steady-state motion of the glider at a certain depth z in the body frame.
v r = [u r , 0, w r ] T (52) . v g r = 0 (55) Substituting Equations (52)-(56) into the dynamic model Equation (32) results in the steady-state dynamic equations of the glider at depth z as Let γ denote the gliding angle, which represents the angle between the projection of v onto b 1 B 0 b 3 and the horizontal plane of the inertial frame, as Then, Equations (57) and (58) can be rewritten as [25] 0 Taking the first line of Equation (61), together with the gliding velocity V r = 0 and gliding angle γ = 0, we have To solve α in Equation (62), we have Then, velocities u r and w r can be expressed as

Energy Consumption of the Buoyancy Engine
To avoid confusion, hereinafter, subscripts 1 and 2 are used to represent the descending and ascending of the glider, respectively.
In one work cycle, the solenoid valve will open on the water surface to allow the hydraulic oil in the external bladder to flow into the internal tank, and the pump will work at the inflection point under the water pressure to transfer the hydraulic oil from internal tank to the external bladder.
According to the second line of Equation (61), if the glider reaches a given velocity V r and a gliding angle γ at depth z, the net mass supplied by the buoyancy engine should be Substituting Equation (40) into Equation (66) and rearranging the terms, we have The volume of the transported oil in one work cycle is where z 1 and z 2 are the final depth during descending and ascending, respectively. In general, z 2 is zero, excluding for some special gliding models, such as the hidden gliding strategy model [13]. In this study, z 2 is set to zero, and then z 1 can be replaced by z.
The energy consumption of the buoyancy engine in one work cycle can be then calculated by where P pump (z) and q pump (z) are the power and flow rate of the pump at depth z, respectively, P v and q v (0) are the power and flow rate of the solenoid on the water surface, respectively, which can be found in [14].

Energy Consumption of the Attitude Regulation Unit
Before deployment, the initial position of the moving internal point mass in the body frame is According to Equation (59), if the glider reaches a given velocity V r and a gliding angle γ at depth z, the position of the moving internal point mass is r p1 = T DL2 −m s g(r s1 cos(α+γ)+r s3 sin(α+γ))−m b gr b1 cos(α+γ)+(λ 33 −λ 11 )u r w r m p gcos(α+γ) subject to r p1 min ≤ r p1 ≤ r p1 max The displacement of the moving internal point mass is As shown in Figure 4, for a glider based on open-loop control, the total displacement of the moving internal point mass in one work cycle is 2 ∆r p11 + ∆r p12 .
The displacement of the moving internal point mass is As shown in Figure 4, for a glider based on open-loop control, the total displacement of the moving internal point mass in one work cycle is   p11 p12 2 r r   . Then, the energy consumed by the attitude regulation unit can be expressed as where p11 r  and

Energy Consumption of the Control Unit
Since the control unit keeps working throughout the operation of the glider, the energy it consumed is determined by the elapsed time of the glider. To be more accurate and practical, we divide the elapsed time into navigation time t, which represents the time taken to complete the ascent and descent movements, and additional floating time tadd, during which the glider floats on the surface to perform instructions and data transfers. In order to reduce the number of variables, hereinafter, the average velocity of the glider is replaced by Vr.
For a glider with the diving depth z, the elapsed time of the control unit can be expressed by the following equations: Then, the energy consumed by the attitude regulation unit can be expressed as where ∆r p11 and ∆r p12 are the displacement of the moving internal point mass during descending and ascending, respectively, v p is the velocity of the moving internal point mass along the b 1 axis in the body frame, and P p (|γ|) is the input power of the motor.

Energy Consumption of the Control Unit
Since the control unit keeps working throughout the operation of the glider, the energy it consumed is determined by the elapsed time of the glider. To be more accurate and practical, we divide the elapsed time into navigation time t, which represents the time taken to complete the ascent and descent movements, and additional floating time t add , during which the glider floats on the surface to perform instructions and data transfers. In order to reduce the number of variables, hereinafter, the average velocity of the glider is replaced by V r .
For a glider with the diving depth z, the elapsed time of the control unit can be expressed by the following equations: Let P c denote the average power of the control unit, then the energy consumption in one work cycle is

Energy Consumption of the Detection Unit
The detection unit includes mission sensors. Let ∆z i , ∆t i and P si denote the single sampling time, the sampling depth interval and the power of the ith sensor, respectively, and the energy consumption of the detection unit in one cycle can be expressed as For the uninterrupted sensors which keep running throughout the whole operation of the glider, ∆z i in Equation (78) should be set to zero.

Energy Consumption of the Communication Unit
Communication occurs only when the glider is floating on the surface. The energy consumption for communication E com is determined by the elapsed time t com and the average power P com of the communication module, such as Iridium. Therefore, we have E com = t com P com (79)

Energy Consumption Model and Its Characteristics
Summing the energy consumption of each unit, we can obtain the energy consumption model of a UG in ocean currents based on open-loop control as Compared with the previous ECMs, this model has the following characteristics: 1.
The velocity relative to the current is used to reflect the effects of ocean currents; 2.
The BL caused by seawater density variation and deformation of the pressure hull is considered; 3.
The asymmetry in velocity and gliding angle during ascending and descending is taken into account.

Model Validation
A Petrel-II glider is used to validate the proposed ECM, which completed 188 profiles in the South China Sea. This glider is equipped with an uninterrupted conductivitytemperature-depth (CTD) sensor and an interrupted altimeter. The parameters and coefficients of the glider (Tables A1-A3) and environment (Table A4) are in Appendix A. As the vertical components of the currents are generally negligible in comparison to the lateral currents, herein, we assume that V f3 = 0 and the velocity of the DAC in the horizontal plane is calculated as shown in Figure 5. 1. Calculate the velocity of the glider along i3 axis using

1.
Calculate the velocity of the glider along i 3 axis using 2.
Calculate the velocity to the North and East without the currents by where γ act and ψ act denote the actual gliding angle and heading, respectively. 3.
Calculate the displacement to the North (x cal ) and East (y cal ) without the currents by

4.
Calculate the DAC velocity to the North and East according to the actual displacement of the glider on the surface (x act , y act ) obtained by the global positioning system (GPS).
The actual energy consumption is calculated using the voltage, current, and time recorded by the onboard controller. The energy consumed by the motor for roll regulation, which is random and difficult to calculate in the ECM, is subtracted from actual energy consumption [14]. Figure 6 shows the actual energy consumption and that calculated by the ECM without considering the DAC of the 188 profiles. Figure 7 shows the actual energy consumption and that calculated by the ECM considering the DAC of the 188 profiles.
J. Mar. Sci. Eng. 2021, 9,1164 16 of 21 The actual energy consumption is calculated using the voltage, current, and time recorded by the onboard controller. The energy consumed by the motor for roll regulation, which is random and difficult to calculate in the ECM, is subtracted from actual energy consumption [14]. Figure 6 shows the actual energy consumption and that calculated by the ECM without considering the DAC of the 188 profiles. Figure 7 shows the actual energy consumption and that calculated by the ECM considering the DAC of the 188 profiles.  orded by the onboard controller. The energy consumed by the motor for roll regulation, which is random and difficult to calculate in the ECM, is subtracted from actual energy consumption [14]. Figure 6 shows the actual energy consumption and that calculated by the ECM without considering the DAC of the 188 profiles. Figure 7 shows the actual energy consumption and that calculated by the ECM considering the DAC of the 188 profiles.  The mean absolute percentage error (MAPE) is employed to investigate the accuracy of the ECM. The MAPE of ECM without considering DAC is 47.58%, while that of ECM considering DAC is 14.45%, showing a difference of 33.13%, which indicates that the ocean currents have significant impact on the accuracy of the ECM. From Figures 6 and 7, we can find that the energy consumption calculated by the ECM is generally greater than the actual value. The main reason is that the final velocity, which is smaller than the average The mean absolute percentage error (MAPE) is employed to investigate the accuracy of the ECM. The MAPE of ECM without considering DAC is 47.58%, while that of ECM considering DAC is 14.45%, showing a difference of 33.13%, which indicates that the ocean currents have significant impact on the accuracy of the ECM. From Figures 6 and 7, we can find that the energy consumption calculated by the ECM is generally greater than the actual value. The main reason is that the final velocity, which is smaller than the average velocity, is used to calculate the navigation time t, leading to the greater energy consumption of the control unit. Other factors of the error mainly include seawater density error, which may mainly cause the inaccurate calculation of m b , and other marine environmental factors, such as biofouling, variation in temperature, and biological attacks.

Simulations and Discussions
Simulations are performed to investigate the relationship between energy consumption and different parameters. First of all, the factors that may have the most important impact on energy consumption [14] are first analysed, including the gliding velocity relative to the current V r , gliding angle γ, and diving depth z. In the simulations, we assume that the analysed parameters are consistent during the ascending and descending process. The range of V r is from 0.198 m/s to 0.766 m/s, the range of |γ| is from 15 degrees to 45 degrees, while the diving depth is set to five typical values, including 200 m, 400 m, 600 m, 800 m and 1000 m. The results are shown in Figure 8. Because of the seawater density variation and the limitations of m b max and r p1 max/min , the range of achievable V r decreases as the diving depth increases and absolute gliding angle decreases. The energy consumption increases with the increasing depth and decreases with the increasing absolute gliding angle, which is consistent with the facts that the power of the buoyancy engine and the navigation time of the glider will increase with diving depth, and smaller absolute gliding angles will also result in longer navigation time. With fixed |γ| and z, the energy consumption decreases first and then increases with the growth of V r , which is the result of a trade-off between the energy consumption of the buoyancy engine and the navigation time of the glider, and this phenomenon becomes more apparent as diving depth increases.
the navigation time of the glider will increase with diving depth, and smaller absolute gliding angles will also result in longer navigation time. With fixed  and z, the energy consumption decreases first and then increases with the growth of Vr, which is the result of a trade-off between the energy consumption of the buoyancy engine and the navigation time of the glider, and this phenomenon becomes more apparent as diving depth increases. To illustrate the effects of the DAC, an example of a UG moving in an ocean current is considered. For simplicity, we assume that a glider is sailing at an absolute northerly velocity Vi1, a certain gliding angle and a depth in the inertial frame without a roll. There is only a current due north Vf1. Therefore, we have ψ = 0, φ = 0, Vf2 = Vf3 = 0. Then, we take Vi1 = 0.2 m/s as an example to calculate the energy consumption with different absolute gliding angles, diving depths, and due north current. To ensure that reasonable range of the gliding velocity relative to the current Vr can be covered, the range of Vf1 is set to −0.5 m/s to 0.1 m/s. The range of  is from 15 degrees to 45 degrees, while the diving depth is set to five typical values including 200 m, 400 m, 600 m, 800 m, and 1000 m. The energy consumption obtained by the ECM is shown in Figure 9, where the limits of mb and rp1 are To illustrate the effects of the DAC, an example of a UG moving in an ocean current is considered. For simplicity, we assume that a glider is sailing at an absolute northerly velocity V i1 , a certain gliding angle and a depth in the inertial frame without a roll. There is only a current due north V f1 . Therefore, we have ψ = 0, ϕ = 0, V f2 = V f3 = 0. Then, we take V i1 = 0.2 m/s as an example to calculate the energy consumption with different absolute gliding angles, diving depths, and due north current. To ensure that reasonable range of the gliding velocity relative to the current V r can be covered, the range of V f1 is set to −0.5 m/s to 0.1 m/s. The range of |γ| is from 15 degrees to 45 degrees, while the diving depth is set to five typical values including 200 m, 400 m, 600 m, 800 m, and 1000 m. The energy consumption obtained by the ECM is shown in Figure 9, where the limits of m b and r p1 are taken into account, and the parts that cannot be realized in practice have been removed. The results demonstrate that at diving depths from 200 m to 1000 m, the energy consumption decreases first and then increases with the growth of V f1 , which has an important effect on the velocity relative to the current V r . Since V i1 is fixed, V r will decrease as V f1 grows. Therefore, the results are consistent with those in Figure 8. To maintain the desired V i1 , the buoyancy engine has to transfer more hydraulic fluid to increase the driving force at a higher current velocity in the direction opposite to V i1 (negative V f1 ), and then the navigation time of the glider to complete a work cycle will be reduced, resulting in higher energy consumption of the buoyancy engine and lower energy consumption of control unit and detection unit. For a higher current velocity in the same direction as V i1 (positive V f1 ), the change in energy consumption is reversed. Therefore, the result of energy consumption is a trade-off between the energy consumption of the buoyancy engine and the navigation time of the glider. The above phenomenon becomes less obvious as the depth decreases. This can be explained by the fact that for an underwater glider operating in a shallow area, the change in energy consumption caused by navigation time is smaller, and the influence of the buoyancy engine on energy consumption is more significant.
J. Mar. Sci. Eng. 2021, 9,1164 18 of 21 taken into account, and the parts that cannot be realized in practice have been removed. The results demonstrate that at diving depths from 200 m to 1000 m, the energy consumption decreases first and then increases with the growth of Vf1, which has an important effect on the velocity relative to the current Vr. Since Vi1 is fixed, Vr will decrease as Vf1 grows. Therefore, the results are consistent with those in Figure 8. To maintain the desired Vi1, the buoyancy engine has to transfer more hydraulic fluid to increase the driving force at a higher current velocity in the direction opposite to Vi1 (negative Vf1), and then the navigation time of the glider to complete a work cycle will be reduced, resulting in higher energy consumption of the buoyancy engine and lower energy consumption of control unit and detection unit. For a higher current velocity in the same direction as Vi1 (positive Vf1), the change in energy consumption is reversed. Therefore, the result of energy consumption is a trade-off between the energy consumption of the buoyancy engine and the navigation time of the glider. The above phenomenon becomes less obvious as the depth decreases. This can be explained by the fact that for an underwater glider operating in a shallow area, the change in energy consumption caused by navigation time is smaller, and the influence of the buoyancy engine on energy consumption is more significant.

Conclusions
This work presents an ECM of UG based on open-loop control considering the DAC Figure 9. The energy consumption with different V f1 , |γ| and z, when V i1 = 0.2 m/s.

Conclusions
This work presents an ECM of UG based on open-loop control considering the DAC and the BL caused by seawater density variation and deformation of the pressure hull. In the ECM, the asymmetry of gliding motion during ascending and descending is also taken into account. The ECMs with and without the consideration of ocean currents are compared using sea trial data, and the results show that the accuracy of the ECM considering ocean currents is significantly higher. Several simulations are performed to reveal the relationship between energy consumption and multiple parameters. The results demonstrate that the seawater density variation, the maximum capacity of the buoyancy engine, and the moving range of the moving internal point mass will limit the gliding velocity relative to the current in the deep sea. The energy consumption increases with the increase of diving depth and the decrease of absolute gliding angle, while with the growth of gliding velocity relative to the current, the energy consumption decreases first and then increases. In addition, the effects of DAC on energy consumption are illustrated by a simple example, and the specific reasons are explained.
Future work will focus on the establishment and validation of the energy consumption model of the underwater glider based on closed-loop control in time-varying and spacevarying currents, and the development of the energy consumption control strategies.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A
Parameters and coefficients of the glider and environment. Power of the buoyancy engine pump at depth z: P pump (z) = 0.017841z+28.212 Flow rate of the buoyancy engine pump at depth z: q pump z) = − 1.98z × 10 −10 +1.7 × 10 −6 Input power of the pitch regulation motor: P p (|γ|)= 0.063|γ|+1.26