1 Introduction

With the development of the activities in deep ocean, application of the autonomous underwater vehicles (AUV) is widespread, and there is a very prominent prospect. The research on the AUV includes many areas, such as vehicle (carrier/platform) design, architecture, motion control, intelligent planning and decision making [15]. Researchers dedicate themselves to improving the performance on modularization, low-cost AUV in such applications as long-range oceanographic survey, autonomous docking and shallow-water mine countermeasures. These goals can be achieved through the improvement of maneuvering precision and motion control capability with energy constraints. For low energy consumption, low resistance and excellent maneuverability, fins are usually used to modify AUV hydrodynamic force. The underactuated AUV with fins can do gyratory motion by vertical fins and do diving and rising motion by horizontal fins. Therefore, the control system of the propeller-fin-drived AUV is very different to the conventional only-propeller-drived AUV.

A mathematic model for the underactuated AUV with fins based on a combination of theory and empirical data would provide an efficient platform for control system development, and an alternative to the typical trial-and-error method of control system tuning. Although some modeling and simulation methods have been proposed and applied [612], there is no standard procedure for modeling the underactuated AUV with fins in industry. Therefore, the modeling and simulation of the underactuated AUV is a challenge.

This paper describes the development and verification of a 6-DOF nonlinear model for the underactuated AUV with fins. In the model, the external force and moment resulting from hydrostatics, hydrodynamic lift and drag, added mass, and the thrusters and fins are all analyzed and expressed in matrix form. The equations describing the rigid-body dynamics are left in nonlinear form to better simulate the AUV inherently nonlinear behavior. Through CFD numerical computation, we simulate the PMM in circulating tank and obtain main hydrodynamic coefficients and calculate the lift and drag curves of fins [13, 14]. Moreover, considering the influence of current motion [15], motion simulation is achieved through numeric integration of the motion equations.

A series of motion simulation are conducted, and data are compared with dynamics data collected in ocean experiments. The comparison results show that the nonlinear model gives an accurate estimation to the actual motion of the AUV. The research object is WL-II mini-AUV, which is a small, low-cost platform serving in a range of oceanographic applications [16, 17].

2 Dynamics and kinematics modeling for underactuated AUV with fins

2.1 Coordinate system and motion parameters definition

The research object of this paper is WL-II AUV, which is a mini-underactuated AUV with fins developed by Harbin Engineering University, China. WL-II AUV belongs to a propeller-fin-drived AUV, and the velocity can reach 5 kn in design and 8 kn in maximum. In the paper, the simplified model is shown in Fig. 1.

Fig. 1
figure 1

Simplified model of WL-II AUV

It is convenient to analyze the equations of the rigid-body motion respecting to a body-fixed reference frame which keep the body geometry invariant all the time. Basing on the recommendation of International Towing Tank Conference (ITTC) and the Society of Naval Architects and Marine Engineers (SNAME), we build two reference coordinates [18]. Start with the application of Newton II law to the AUV motion by a fixed inertial frame of reference (global coordinates), and then transfer the equations to the body-fixed coordinates (local coordinates) through coordinate transformation relation. We can obtain 6-DOF equations of the rigid-body motion referred to as surge, sway, heave, roll, pitch and yaw. The global coordinates and local coordinates are illustrated in Fig. 2.

Fig. 2
figure 2

Global coordinates and local coordinates systemV

Considering shape characteristics for most AUVs, the mathematic model is basing on the hypothesis that the AUV is symmetric on the xoz plane. Defining generalized position vector, generalized velocity vector and generalized force vector, the motion vector includes

  1. 1.

    Position and attitude, in \(E-\xi \eta \zeta \)

    $$\begin{aligned} R=\left[ \begin{array}{cccc} r&\varLambda \end{array}\right] ^ {\mathrm {T}} r=\left[ \begin{array}{cccc} \xi&\eta&\zeta \end{array}\right] ^ {\mathrm {T}} \varLambda =\left[ \begin{array}{cccc} \varphi&\theta&\psi \end{array}\right] ^ {\mathrm {T}} \end{aligned}$$
  2. 2.

    Linear and angular velocities, in o-xyz

    $$\begin{aligned} V=\left[ \begin{array}{cccc} U^ {\mathrm {T}}&\varOmega ^ {\mathrm {T}} \end{array}\right] ^ {\mathrm {T}} U=\left[ \begin{array}{cccc} u&v&w \end{array}\right] ^ {\mathrm {T}} \varOmega =\left[ \begin{array}{cccc} p&q&r \end{array}\right] ^ {\mathrm {T}} \end{aligned}$$
  3. 3.

    Force and moment parameters, in o-xyz

    $$\begin{aligned} \tau =\left[ \begin{array}{cccc} F^ {\mathrm {T}}&M^ {\mathrm {T}} \end{array}\right] ^ {\mathrm {T}} F=\left[ \begin{array}{cccc} X&Y&Z \end{array}\right] ^ {\mathrm {T}} M=\left[ \begin{array}{cccc} K&M&N \end{array}\right] ^ {\mathrm {T}}\\ \end{aligned}$$

2.2 Dynamics model

Basing on momentum theorem, the AUV dynamic equation is

$$\begin{aligned} M_{RB}\dot{V}+C_{RB}(V)V=\tau \end{aligned}$$
(1)

where \(M_{BR}\) is the generalized mass matrix of the vehicle body, and \(C_{RB}(V)\) is the Coriolis and centripetal force matrix. \(M_{BR}\) is given by

$$\begin{aligned} M_{BR}=\left[ \begin{array}{c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c} m&{} 0&{} 0&{} 0&{} mz_\mathrm{G}&{} -my_\mathrm{G}\\ 0&{} m&{} 0&{} -mz_\mathrm{G}&{} 0&{} mx_\mathrm{G}\\ 0&{} 0&{} m&{} my_\mathrm{G}&{} -mx_\mathrm{G}&{} 0\\ 0&{} -mz_\mathrm{G}&{} my_\mathrm{G}&{} J_x&{} J_{xy}&{} J_{xz}\\ mz_\mathrm{G}&{} 0&{} -mx_\mathrm{G} J_{yx}&{} J_y&{} J_{yz}\\ -my_\mathrm{G}&{} mx_\mathrm{G}&{} 0&{} J_{zx}&{} J_{zy}&{} J_z \end{array}\right] \end{aligned}$$
(2)

where m is the AUV mass, J terms represent the inertial tensors, and \(x_\mathrm{G}\), \(y_\mathrm{G}\), \(z_\mathrm{G}\) represent the AUV position barycenter in local coordinates. \(C_{RB}(V)\) is given by

$$\begin{aligned} C_{RB}(V)&=\left[ \begin{array}{c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c} 0&{} -mr&{} mq\\ mr&{} 0&{} -mpr\\ -mq&{} mp&{} 0\\ -m(y_\mathrm{G}q+z_\mathrm{G}r)&{} my_\mathrm{G}p&{} mz_\mathrm{G}p\\ mx_\mathrm{G}u&{} -m(z_\mathrm{G}r+x_\mathrm{G}p)&{} mz_\mathrm{G}q\\ mx_\mathrm{G}r&{} my_\mathrm{G}r&{} m(x_\mathrm{G}p+y_\mathrm{G}q) \end{array}\right. \nonumber \\&\quad \left. \begin{array}{c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c} m(y_\mathrm{G}q+z_\mathrm{G}r)&{} -mx_\mathrm{G}q&{} -mx_\mathrm{G}r\\ -my_\mathrm{G}p&{} m(z_\mathrm{G}r+x_\mathrm{G}p)&{} -my_\mathrm{G}r\\ -mz_\mathrm{G}p&{} -mz_\mathrm{G}q&{} m(x_\mathrm{G}p+y_\mathrm{G}q)\\ 0&{} J_{zx}p+J_{zy}q+J_zr&{} -J_{yx}p-J_yq-J_{yz}r\\ -J_{zx}p-J_{zy}q-J_zr&{} 0&{} J_xp+J_{xy}q+J_{xz}r\\ J_{yx}p+J_yq+J_{yz}r&{} -J_xp-J_{xy}q-J_{xz}r&{} 0 \end{array}\right] \end{aligned}$$
(3)

Generalized force vector \(\tau \) at the right of (1) is outside force (or moment) acting on the AUV, including static force vector \(\tau _\mathrm{G}\) (gravity and buoyancy), hydrodynamics force vector of the vehicle body (include \(\tau _\mathrm{A}\) which is caused by added mass and viscous damping force \(\tau _\mathrm{V}\) ), and the controlled force vector (include the thruster force \(\tau _\mathrm{prop}\) and the fin force \(\tau _\mathrm{R}\) ). The static force vector \(\tau _\mathrm{G}\) reflects the effect of the vehicle weight and buoyancy. The vehicle weight is \(W=mg\), and the buoyancy is \(B=\rho \bigtriangledown g\), where \(\rho \) is the density of the surrounding fluid, and \(\bigtriangledown \) is the total volume displaced by the AUV. Therefore, \(\tau _\mathrm{G}\) is given by

$$\begin{aligned} \tau _\mathrm{G}= & {} \left[ \begin{array}{cccccc} X_\mathrm{G}\\ Y_\mathrm{G}\\ Z_\mathrm{G}\\ K_\mathrm{G}\\ M_\mathrm{G}\\ N_\mathrm{G} \end{array}\right] \nonumber \\= & {} \left[ \begin{array}{cccccc} -(W-B)\sin \theta \\ (W-B)\sin (j)\cos \theta \\ (W-B)\cos (j)\cos \theta \\ y_\mathrm{G}W-y_BB\cos (j)\cos \theta -(z_\mathrm{G}W-z_BB)\sin (j)\cos \theta \\ -x_\mathrm{G}W-x_BB\cos (j)\cos \theta -(z_\mathrm{G}W-z_BB)\sin \theta \\ x_\mathrm{G}W-x_BB\cos (j)\cos \theta -(y_\mathrm{G}W-y_BB)\sin \theta \end{array}\right] \nonumber \\ \end{aligned}$$
(4)

where \(x_B\), \(y_B\), \(z_B\) are the vehicle coordinates in body-fixed coordinate system.

\(\tau _\mathrm{A}\) which is related to added mass is given by

$$\begin{aligned} \tau _\mathrm{A}=-(M_\mathrm{A})\dot{V}+C_\mathrm{A}(V)V \end{aligned}$$
(5)

where is the added mass matrix, which is given by

$$\begin{aligned} M_\mathrm{A}=\left[ \begin{array}{c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c} \lambda _{11}&{} 0&{} \lambda _{13}&{} 0&{} \lambda _{15}&{} 0\\ 0&{} \lambda _{22}&{} 0&{} \lambda _{24}&{} 0&{} \lambda _{26}\\ \lambda _{31}&{} 0&{} \lambda _{33}&{} 0&{} \lambda _{35}&{} 0\\ 0&{} \lambda _{42}&{} 0&{} \lambda _{44}&{} 0&{} \lambda _{46}\\ \lambda _{51}&{} 0&{} \lambda _{53}&{} 0&{} \lambda _{55}&{} 0\\ 0&{} \lambda _{62}&{} 0&{} \lambda _{64}&{} 0&{} \lambda _{66} \end{array}\right] \end{aligned}$$
(6)

where \(\lambda \) terms represent the vehicle added mass.

\(M_\mathrm{A}\) can be also denoted as hydrodynamic coefficients expression:

$$\begin{aligned} M_\mathrm{A}=\left[ \begin{array}{c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c} X_{\dot{u}}&{} 0&{} X_{\dot{w}}&{} 0&{} X_{\dot{q}}&{} 0\\ 0&{} Y_{\dot{v}}&{} 0&{}Y_{\dot{p}}&{} 0&{} Y_{\dot{r}}\\ Z_{\dot{u}}&{} 0&{} Z_{\dot{w}}&{} 0&{} Z_{\dot{q}}&{} 0\\ 0&{} K_{\dot{v}}&{} 0&{} K_{\dot{p}}&{} 0&{} K_{\dot{r}}\\ M_{\dot{u}}&{} 0&{} M_{\dot{w}}&{} 0&{} M_{\dot{q}}&{} 0\\ 0&{} N_{\dot{v}}&{} 0&{} N_{\dot{p}}&{} 0&{} N_{\dot{r}} \end{array}\right] \end{aligned}$$
(7)

\(C_\mathrm{A}(V)\) is a Coriolis-like matrix induced by \(M_\mathrm{A}\)

$$\begin{aligned} C_\mathrm{A}(V)=\left[ \begin{array}{c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c} 0&{} 0&{} 0&{} 0&{} a_3&{} -a_2\\ 0&{} 0&{} 0&{} -a_3&{} 0&{} a_1\\ 0&{} 0&{} 0&{} a_2&{} -a_1&{} 0\\ 0&{} a_3&{} -a_2&{} 0&{} b_3&{} -b_2\\ -a_3&{} 0&{} a_1&{} -b_3&{} 0&{} b_1\\ a_2&{} -a_1&{} 0&{} b_2&{} -b_1&{} 0 \end{array}\right] \end{aligned}$$
(8)

where

$$\begin{aligned} \left\{ \begin{array}{l} a_1=\lambda _11u+\lambda _13w+\lambda _15q\\ a_2=\lambda _22v+\lambda _24p+\lambda _26r\\ a_3=\lambda _31u+\lambda _33w+\lambda _35q\\ b_1=\lambda _42v+\lambda _44p+\lambda _46r\\ b_2=\lambda _51u+\lambda _53w+\lambda _55q\\ b_3=\lambda _62v+\lambda _64+\lambda _46r\\ \end{array}\right. \end{aligned}$$

The viscous damping force is given by

$$\begin{aligned} \tau _\mathrm{V}=D(V)V \end{aligned}$$
(9)

The damping matrix D(V) is given by

$$\begin{aligned} D(V)&=\left[ \begin{array}{cccccc} X_u+X_{u|u|}|u|&{} 0&{} 0\\ 0&{} Y_v+Y_{v|v|}|v|&{} 0\\ Z_0|u|&{} 0&{} Z_w+Z_{w|w|}|w|&{} \\ 0&{} 0&{} 0\\ M_0|u|&{} 0&{} 0\\ 0&{} 0&{} 0 \end{array}\right. \nonumber \\&\quad \left. \begin{array}{cccccc} 0&{} 0&{} 0\\ 0&{} 0&{} 0\\ 0&{} 0&{} 0\\ K_p+K_{p|p|}|p|&{} 0&{} 0\\ 0&{} M_q+M_{q|q|}|q|&{} 0\\ 0&{} 0&{} N_r+N_{r|r|}|r| \end{array}\right] \end{aligned}$$
(10)

where \(X_u\), \(Y_v\), \(Z_w\), \(K_p\), \(M_q\) and \(N_r\) are the linear damping coefficients. \(Y_{v|v|}\), \(Z_{w|w|}\), \(K_{p|p|}\), \(M_{q|q|}\), \(X_{u|u|}\) and \(N_{r|r|}\) are the quadratic damping coefficients. \(M_0\) and \(Z_0\) are the effect caused by the dissymmetry on xoy plane.

The external force and moment vector produced by thrusters are defined as

$$\begin{aligned} \tau =LT_\mathrm{prop} \end{aligned}$$
(11)

where L is a mapping matrix, and \(T_\mathrm{prop}\) is the thrust vector produced by thrusters given by

$$\begin{aligned} T_\mathrm{prop}= \left[ \begin{matrix} T_1\\ T_2\\ \vdots \\ T_n \end{matrix}\right] \end{aligned}$$
(12)

\(T_\mathrm{prop}\) is to find the overall force and moment acting on the vehicle.

Hydrodynamics of a single thruster is usually obtained through the in-water test. A series of advance coefficient J corresponding to the thrust coefficient \(K_T\) data can be obtained from the in-water test. Data from an in tank test are shown in Fig. 3. We fit the curve by least squares and obtain the fitted \(J-K_T\) curve. In practical applications, we obtain advance coefficient J and substitute it into fitted \(J-K_T\) curve to obtain \(K_T\). Finally, the thrust can be obtained. Detailed process is as follows:

  1. 1.

    We obtain the advance coefficient from fluid velocity cross the propeller, the propeller diameter D, and the screw propeller rotate speed n (n is determined by controller): \(J=\frac{V_\mathrm{prop}}{nD}\).

  2. 2.

    We put J into fitted \(J-K_T\) curve to obtain force coefficient \(K_T\).

  3. 3.

    We obtain the thrust forces by \(T=K_Tn_2D_4\).

The overall external force and moment vector produced by fins \(\tau \) are given by

$$\begin{aligned} \tau _\mathrm{R}=\left[ \begin{array}{cccccc} X_\mathrm{R}\\ Y_\mathrm{R}\\ Z_\mathrm{R}\\ K_\mathrm{R}\\ M_\mathrm{R}\\ N_\mathrm{R} \end{array}\right] \end{aligned}$$
(13)
Fig. 3
figure 3

Capability curves of thrusters

According to every single fin force and the installation position, \(\tau \) can be obtained.

As to a control fin on the vehicle, the hydrodynamic force can be decomposed into two directions: lift force L vertical to stream current and drag force D along stream current. Lift force and drag force can be calculated by the following equations:

$$\begin{aligned} \left\{ \begin{array}{l} L=\frac{1}{2}C_\mathrm{L}\rho A_\mathrm{R}\,v_g^2\\ D=\frac{1}{2}C_\mathrm{D}\rho A_\mathrm{R}\,v_g^2 \end{array}\right. \nonumber \\ \end{aligned}$$
(14)

where \(C_\mathrm{L}\) is the fin lift coefficient, \(C_\mathrm{D}\) is the fin drag coefficient, \(A_calculated by the following equations\) is the fin platform area, and \(v_e\) is the effective fin velocity. The values of lift coefficient \(C_\mathrm{A}\) and drag coefficient \(C_\mathrm{D}\) are related to effective fin angle of attack \(\alpha \) (Fig. 4).

Fig. 4
figure 4

Lift and drag coefficient curves

We can tank experiments, CFD computation or empirical formula to obtain \(C_\mathrm{L}\) and\(C_\mathrm{D}\). Each methods are discussed as follows.

  1. 1)

    A series of data of angles of attack \(\alpha \) vs. lift coefficient \(C_\mathrm{L}\) and drag coefficient \(C_\mathrm{D}\) can be obtained from hydrodynamic experiments on WL-II AUV, and then, fitted curves of \(C_\mathrm{L}\) and \(C_\mathrm{D}\) can be generated through least squares fit. The fitted curves of a fin are shown in Fig. 3. When we know the current angle of attack of fin on the AUV, the values of \(C_\mathrm{L}\) and \(C_\mathrm{D}\) under this angle can be obtained by curves interpolation. The effective fin angles of attack are given by

  2. 2)

    We also can use CFD method to predict the fin performance, and the results are shown in Fig. 5.

    Fig. 5
    figure 5

    Pressure distribution and fluid velocity vector

  3. 3)

    The empirical equations to calculate are given by

    $$\begin{aligned}&C_\mathrm{L}=\frac{\partial C_\mathrm{L}}{\partial \alpha }\times \alpha +\frac{C_\mathrm{DC}}{\lambda }({\alpha }{57.3})^2 \end{aligned}$$
    (15)
    $$\begin{aligned}&\frac{\partial C_\mathrm{L}}{\partial \alpha }= \frac{0.9(2\pi )\lambda }{57.3 \left[ \cos \varLambda \root 2 \of {\frac{\lambda ^2}{\cos ^4\varLambda }}+1.8\right] } \end{aligned}$$
    (16)
    $$\begin{aligned}&C_\mathrm{D}=C_{d0}+\frac{C_\mathrm{L}^2}{e\pi \lambda } \end{aligned}$$
    (17)

where \(\frac{\partial C_\mathrm{L}}{\partial \alpha }\) is the slope at = 0 in lift coefficient curves, and \(C_\mathrm{DC}\) is the drag coefficient of cross-current which depends on tip shape and rake ratio (e.g., quadrate tip: \(C_\mathrm{DC}=0.8\). Smooth tip: \(C_\mathrm{DC} =0.4\)). \(C_{d0}\) is the airfoil profile drag coefficient (viscous drag). For the profile section NACA0015, \(C_{d0}=0.0065\). \(\varLambda \) is the sweptback angle at 1/4 chord of the fin. \(\lambda \) is the aspect ratio. \(\alpha \) is the angle of attack (degree).

In order to obtain \(C_\mathrm{L}\) and \(C_\mathrm{D}\), we should know the real effective angle of attack [19, 20]. As the fin located at some offset from the origin of the AUV coordinate system, it experiences the following effective velocities

$$\begin{aligned} \left\{ \begin{array}{l} u_\mathrm{fin}=u+z_\mathrm{fin}-y_\mathrm{fin}r\\ v_\mathrm{fin}=v+x_\mathrm{fin}r-z_\mathrm{fin}p\\ w_\mathrm{fin}=w+y_\mathrm{fin}-x_\mathrm{fin}q \end{array}\right. \end{aligned}$$
(18)

where \(x_\mathrm{fin}\), \(y_\mathrm{fin}\) and \(z_\mathrm{fin}\) are the body-fixed coordinates of the fin posts.

The effective fin angles of attack \(\delta _{se}\) and \(\delta _{re}\) are given by

$$\begin{aligned} \left\{ \begin{array}{l} \delta _{se}=\delta _s+\beta _{se}\\ \delta _{re}=\delta _r+\beta _{re} \end{array}\right. \end{aligned}$$
(19)

where \(\delta _r\) and \(\delta _s\) are the fin angles referenced to the vehicle hull, \(\beta _{re}\) and \(\beta _{se}\) are the effective angles of attack of the fin zero plane, as shown in Fig. 4 (Fig. 6). \(\beta _{re}\) and \(\beta _{se}\) are given by

$$\begin{aligned} \left\{ \begin{array}{l} \beta _{re}=\frac{v_\mathrm{fin}}{u_\mathrm{fin}}=\frac{v+x_\mathrm{fin}r-z_\mathrm{fin}p}{u+z_\mathrm{fin}-y_\mathrm{fin}r}\\ \beta _{se}=\frac{w_\mathrm{fin}}{u_\mathrm{fin}}=\frac{w+y_\mathrm{fin}-x_\mathrm{fin}q}{u+z_\mathrm{fin}-y_\mathrm{fin}r} \end{array}\right. \end{aligned}$$
(20)

Basing on the above analysis, (1) could be rewritten into more detailed form.

$$\begin{aligned}&M_{RB}+M_\mathrm{A}\dot{A}=\tau +\tau _\mathrm{prop}\nonumber \\&\qquad +\,\tau _\mathrm{R}+\,D_{(V)}V-(C_{RB}(V)+C_\mathrm{A}{(V)})V \end{aligned}$$
(21)
Fig. 6
figure 6

Pressure distribution and fluid velocity vector. a Effective fin angle of attack, b effective stern plane angle of attack

2.3 Kinematics model

The coordinate transformation between body-fixed coordinate system and inertial coordinate system is given by

$$\begin{aligned} \left[ \begin{array}{cccccc} \dot{\xi _\mathrm{G}}\\ \dot{\eta _\mathrm{G}}\\ \dot{\xi _\mathrm{G}}\\ \dot{\varphi }\\ \dot{\theta }\\ \dot{\psi } \end{array}\right] =\left[ \begin{array}{cc} T_1 &{} 0_{3}\\ 0_{3} &{} T_2 \end{array}\right] \left[ \begin{array}{cccccc} u\\ v\\ w\\ p\\ q\\ r \end{array}\right] \end{aligned}$$
(22)

where \(\xi _\mathrm{G}\), \(\eta _\mathrm{G}\) and \(\zeta _\mathrm{G}\) are the barycentre coordinates in inertial coordinate system, \(T_1\) and \(T_2\) are coordinate transform matrix given by

$$\begin{aligned} T_1= & {} \left[ \begin{array}{c c c} \cos \psi \cos \theta &{} \cos \psi \sin \theta \sin \varphi -\sin \psi \cos \varphi &{} \cos \psi \sin \theta \cos \varphi +\sin \psi \sin \varphi \\ \sin \psi \cos \theta &{} \sin \psi \sin \theta \sin \varphi +\cos \psi \cos \varphi &{} \sin \psi \sin \theta \cos \varphi -\cos \psi \sin \varphi \\ -\sin \theta &{} \cos \theta \sin \varphi &{} \cos \theta \cos \varphi \end{array}\right] \end{aligned}$$
(23)
$$\begin{aligned} T_2= & {} \left[ \begin{array}{ccc} 1 &{} \tan \theta \sin \varphi &{} \tan \theta \cos \varphi \\ 0 &{} \cos \varphi &{} -\sin \varphi \\ 0 &{} \sin \varphi \sec \theta &{} \cos \varphi \sec \theta \end{array}\right] \end{aligned}$$
(24)

2.4 Numerical integration

Given the complex and highly nonlinear nature of (21) and (22), we will use numerical integration to solve these equations and obtain the vehicle speed, position and attitude vs time.

The nonlinear state equation of the AUV is given by

$$\begin{aligned} \dot{x_n}=f(x_n,u_n) \end{aligned}$$
(25)

where \(x_n\) is the state vector, and \(u_n\)is the input vector:

$$\begin{aligned} x_n= & {} \left[ \begin{array}{cccccccccccc} u&v&w&p&q&r&\xi&\eta&\zeta&\varphi&\theta&\psi \end{array}\right| ^ {\mathrm {T}} \end{aligned}$$
(26)
$$\begin{aligned} u_n= & {} \left[ \begin{array}{cc} \tau _\mathrm{prop}&\tau _\mathrm{R} \end{array}\right| \end{aligned}$$
(27)

Here, Runge–Kutta of numerical integration is usually used to solve the equations. Firstly, we calculate the following equations

$$\begin{aligned} k_1&=x_n+f(x_n,u_n)\nonumber \\ k_2&=f(x+\frac{\Delta t}{2}k_1,u_{n+\frac{1}{2}})\nonumber \\ k_3&=f(x+\frac{\Delta t}{2}k_2,u_{n+\frac{1}{2}})\nonumber \\ k_4&=f(x+\Delta t k_4,u_{n+1}) \end{aligned}$$
(28)

where the interpolated input vector is

$$\begin{aligned} u_{n+\frac{1}{2}}=\frac{1}{2}(u_n+u_{n+1}) \end{aligned}$$
(29)

Then, we combine the above equations

$$\begin{aligned} x_{n+1}=x_n+\frac{\Delta t}{6}(k_1+2k_2+2k_3+k_4) \end{aligned}$$
(30)

3 Hydrodynamic coefficients acquisition

Hydrodynamic numerical calculations are conducted to obtain inertia and viscous hydrodynamic coefficients. The computational object is the hull model with fins. Numerical calculation is in the both steady and unsteady tank to obtain various hydrodynamic coefficients [15]. Computational grid model is shown in Fig. 7.

Fig. 7
figure 7

Mixed grid divide of the AUV as whole/local

3.1 Solving speed coefficients under steady situation

In the steady case, we can solve drag coefficients and horizontal and vertical speed factor.

Drag coefficients Select separate implicit solver and SST k-omega turbulence model widely used. The main initial conditions are selected to the flow velocity and turbulence parameters. The entry speed and resistance for drag coefficients are shown in Table 1.

Table 1 Drag coefficient results

Fitting by the method of least squares, and changing to dimensionless, the calculated value of the resistance coefficients is \(X'_uu =-0.002563\).

Speed coefficients Speed coefficients are calculated, and in addition to set different velocity inlet, the other settings are the same as the drag coefficients. While setting flow speed u = 2.5 m/s, we simulate the models angle of attack changes from 0 to 10 in the control body. Horizontal plane speed coefficient results are shown in Table 2.

Table 2 Horizontal speed coefficient results

Fitting by least squares method, and changing to dimensionless, we obtain vertical and horizontal velocity coefficients:

$$\begin{aligned} Z'_w= & {} -0.02065,\,M'_w=0.038809\\ Y'_v= & {} -0.07086,\,N'_v=0.098568 \end{aligned}$$

3.2 Solving coefficients under unsteady situation

While solving acceleration coefficients and angular acceleration coefficients, we simulate PMM to measure hydrodynamic coefficients by dynamic mesh technology. Model moves in accordance with the law specified in the control domain. At the same time, in order to simulate the infinite flow at the control domain entrance, we set flow speed u = 2.5 m/s. According to a different law of motion, the AUV can be divided into pure heave, pure sway, pure pitching and pure shake bow. Considering symmetric characteristics of the AUV, we just need to discuss pure heave and pure pitching motion. Based on each DOF motion equations, we compile user self-defined function (UDF) program and make model hull wall motion in accordance with motion equations in the control domain. Table 3 shows the experimental conditions [21].

Table 3 Pure heave and pitch experimental condition table

While calculation, a motion cycle is divided into 250 time steps. Taking into account the initial subject to oscillation, we calculate five cycles to obtain a stable hydrodynamic graph which changes with time. Based on a stable cycle curve, we use MATLAB to expand the results by Fourier series and fit the corresponding hydrodynamic coefficients. the control body. Horizontal plane speed coefficients results are shown in Table 2 (Table 4).

Table 4 Vertical plane coefficients by simulation PMM

Because the calculation principles in the case of a steady velocity coefficients are defined by velocity coefficients, so the reliability of velocity coefficients obtained is higher. Eventually, we obtain 17 basic hydrodynamic coefficients in Table 5.

Table 5 Dimensionless hydrodynamic coefficients

Based on calculation results, we can obtain more high-end and coupled items hydrodynamic coefficients [18] and ultimately meet the simulation.

4 Simulation

Based on the above mathematic modeling and analysis, we develop a simulation system and conduct performance prediction for WL-II AUV. We obtain present relative acceleration of the AUV in the global coordinates, and the velocity of next moment through Runge–Kutta numerical integral, and the displacement of next moment further. The operating flowchart is shown in Fig. 8, and the visual simulation system of WL-II AUV is shown in Fig. 9.

Fig. 8
figure 8

Operating flowchart of simulation system

Fig. 9
figure 9

Visual simulation of WL-II AUV

4.1 Simulation without disturbance

4.1.1 Simulation of longitudinal motion

First, the AUV navigates in longitudinal straight direction. Given different control instruction, the AUV accelerates from rest state to uniform motion. Figure 10 shows the curves of velocity response. As can be seen, the AUV acceleration time is about 100 s, and the speed responds fast enough, which meet the design requirement that a maximum speed is 8 kn.

Fig. 10
figure 10

Curves of longitude velocity response

4.1.2 Simulation of horizontal rotation motion

Simulation results are given in the case of a pair of vertical fins with the fin angle from 5 to 25. Figure 11 shows the trajectory of the AUV gravity center in the horizontal plane. Figure 12 shows the relation curves between rotational diameter and vertical fin angle.

Fig. 11
figure 11

Horizontal rotary motion simulation

Fig. 12
figure 12

Relationship between turning radius and fin angle

The simulations are conducted under different speeds but the same fin angle. In the chosen speed range, rotational diameter hardly changes with speed, and the minimum rotational diameter is about 65 m.

4.1.3 Horizontal Z-shaped steering motion simulation

Then, we conduct Z-shaped steering motion simulation in the horizontal plane with 0/0 = 10/10, 20/20, by steering a pair of vertical fin simultaneously with 4/s. The results are shown in Fig. 13.

Fig. 13
figure 13

Curves of fin angle and bow direction angle

As can be seen, the beyond heading angles are 7.6 and 14.8 corresponding to the 10 and 20 test, and the period is 44 and 61 s. The results suggest that the AUV is of good mobility in the horizontal plane, and the fin has better ability to control heading.

4.1.4 Vertical trapezoidal steering motion simulation

Vertical trapezoidal steering motion simulation descending simulation is conducted by steering the horizontal fins. Longitudinal angle is \(\theta _e=7\), and fin steering rate of fins is 4/s. Fin angle instruction is \(\delta _0=10\). The results are shown in Fig. 14, and \(\zeta (t)\) in the figure is AUV the vertical location.

Fig. 14
figure 14

Vertical trapezoid steering motion simulation

As can be seen, when the horizontal fin angle turns to zero, the trim angle converges to the initial state due to its righting moment effect. That is, the AUV has a trim angle caused by an initially interference; however, when the interference disappeared, trim angle has a ability to recover by itself. However, there is no self-recovery capability in depth direction, and it should be corrected via control.

4.1.5 Space given regular helical motion simulation

Space spiral motion is a rotational descends motion that the AUV makes especially when sailing in a certain depth. The AUV set deep sailing, during which horizontal and vertical fins are rotated to fixed values. It is a coupling of horizontal and vertical motion. Characterization parameters of space steady spiral motion conclude the horizontal projection diameter \(D_s\) and liter distance \(\varDelta _e\). Figure 15 shows the AUV space spiral motion trajectory, with changing the horizontal fin angle to 10 and a vertical fin angle to 5.

Fig. 15
figure 15

Space spiral motion trajectory of the AUV

4.2 Simulation under current

Current forces are the essence of current effect on the AUV. Therefore, in the presence of current, the AUV is also affected by the interference current forces in addition to the hull hydrodynamics generated by its motion and actuator thrusts. The essence of the current force is also the hydrodynamics. Therefore, the total forces of the hull hydrodynamics and current disturbance force are directly calculated in this paper.

According to the principle of relative motion and the physical meaning of the hull hydrodynamic coefficients, under the current interference, the hydrodynamics of the AUV are no longer a function of the absolute velocity (u, v, w), but a function of the velocity (\(u_r\), \(v_r\), \(w_r\)) relative to the current. As a result, the hull hydrodynamics can be calculated by adopting the AUV velocity relative to the current instead of absolute speed in calm water.

4.2.1 Simulation of longitudinal motion

Figure 16 shows the AUV trajectory curves, in the case of the side flow and inclined side flow angle c = 90, 45, the current velocity uc = 2 kn. The AUV itself does not produce thrust, only fluttering freely under the current effect. The results show that the AUV without power will drift along with the current under that condition.

Fig. 16
figure 16

Trajectory curves under the current

4.2.2 Rotation motion under current disturbance

Figure 17 shows the AUV trajectory curves in the horizontal plane step fin rotation experiment, with \(\beta _c=0\), uc = 0, 1, 2 kn. As can be seen, the AUV circles into a spiral trajectory and associated with lateral motion. As a result, in the condition of cocurrent, the effect of current speed and direction on the AUV trajectory must be taken into consideration when the AUV needs to rotate in case of turning around or avoiding collision, and adopting corresponding control measures.

Fig. 17
figure 17

Cocurrent, rotation trajectory curves

4.2.3 Space spiral motion under current disturbance

Figure 18 shows the AUV trajectory curves of the space motion under current interference, with c = 90, c = 0, uc = 1 kn. As can be seen, if the current direction is not the same as the AUV sailing direction, horizontal motion will take place when the AUV sinks or rises. It takes special control to do vertical motion strictly. Current should be considered when the AUV needs sink spirally under current environment. To realize AUV steady and accurate sink, in-time control should be employed based on current velocity and direction, compounding the posture and AUV state of motions.

Fig. 18
figure 18

The curve of the space spiral motion under current

Finally, a part of simulation results are compared with the results of ocean experiments. The zigzag-like motions in horizontal plane and vertical plane are simulated, and the comparisons are shown in Fig. 19. From the comparison between simulation results and experiment results, we can conclude that the nonlinear dynamics model and performance prediction for the underactuated AUV with fins and the numerical integration method are accurate and feasible.

Fig. 19
figure 19

Comparison between simulations and experiments. a Zigzag-like motion in horizontal plane, b zigzag-like motion in horizontal plane

5 Conclusion

This paper concentrates on nonlinear dynamics modeling and performance prediction for the underactuated AUV with fins. We build the dynamics and kinematics model in 6-DOF for the underactuated AUV with fins and analyze the forces and hydrodynamic coefficients in detail, especially the fin effect. Various hull hydrodynamic coefficients are obtained by CFD numerical computation. A series of simulation experiments are conducted to predict AUV hydrodynamic performance. The results verify the feasibility and the superiority of the nonlinear dynamics modeling and performance prediction for the underactuated AUV with fins by comparing the results on WL-II underactuated AUV in ocean experiments. Moreover, the methods and simulation system in this paper also can be used universally to most AUVs.