1 Introduction

In recent years, various research projects have been working to realize autonomous surface ships. There have been many studies on automatic ship maneuvering to avoid collisions and realize voyage automation as ship maneuvering support systems [1,2,3,4,5,6]. In these systems, trajectory prediction using ship maneuverability mathematical models is considered one of the essential technologies. Therefore, various ship maneuverability mathematical models [7,8,9,10,11] have been studied and proposed. Recently, some platforms [12, 13] have been developed to digitally develop and validate functions for automated ship maneuvering using these mathematical models.

For ship maneuverability mathematical model identification, it is a common practice to conduct PMM and CMT tests using a model ship and a test tank. In recent years, CFD methods [14, 15] have been proposed to identify the ship maneuverability mathematical model instead of using a model ship and test tank. The problem with tank tests and CFD methods is that they are very time-consuming. In addition, depending on the payload and the sea area to be navigated, situations may arise where the same maneuvering operation can result in very different trajectories. Therefore, the current ship maneuvering by human operators does not fully utilize the ship maneuverability mathematical model. To utilize the ship maneuvering model in actual ship operations, it is essential to set the hydrodynamic maneuvering coefficients to match the actual ship motions. Several methods have been reported to directly inverse estimate the hydrodynamic maneuvering coefficients of a ship maneuverability mathematical model from operational data consisting of ship trajectory and maneuvering control records. The Kalman filter is a common method in the field of ship maneuvering system identification [16,17,18]. Some methods have been proposed to improve the accuracy of ship maneuvering system identification by reducing the effects of parameter drift with the Kalman filter [19]. In addition, ship system identification methods using machine learning and neural networks have been proposed [20, 21].

On the other hand, in recent years, Bayesian methods have been applied in parameters estimation in many fields due to the applicability of Bayesian inference methods [22,23,24,25]. Since Bayesian methods update parameters in the results of observations, they give a formal interpretation as an inductive method and are statistically superior parameter estimation methods. However, few studies have introduced Bayesian inference methods into ship maneuvering system identification considering the real case including some noise and uncertainty.

This paper proposes a method for estimating the ship hydrodynamic maneuvering coefficients of the MMG 3DOF model using three types of time-series ship motions (surge, sway, and yaw velocity) as observed data. This paper assumes that uncertainties exist in the observations and the hydrodynamic maneuvering coefficients of the ship maneuverability mathematical model. Based on a stochastic model with these uncertainties and Bayesian inference, the proposed method outputs the hydrodynamic maneuvering coefficients as samples of a simultaneous posterior probability distribution, not scalar values. As a result, we can conduct a highly robust estimation of the hydrodynamic maneuvering coefficients using the MCMC method. Although it is a different ship maneuverability mathematical model, a method for estimating the hydrodynamic maneuvering coefficient by applying MCMC has already been proposed [25]. The main contributions of this paper are as follows:

  • Construct the probabilistic model in a way that allows direct modeling of the performance or accuracy of the observation equipment without denoising the observed data.

  • Examine the application of uninformed and triangular distribution at the prior distribution of hydrodynamic maneuvering coefficients considering the past database.

  • Examine the sensitivity of identification of hydrodynamic maneuvering coefficients of MMG 3DOF by observing system simulation experiments.

  • Apply the MCMC method to the free-running model ship tests.

2 Proposed method

The proposed method uses three types of time-series ship motion as observation targets: surge velocity \(u(t)\), sway velocity \(v(t)\), and yaw velocity \(r(t)\) at time \(t\) which are recorded by a system such as a Voyage Data Recorder (VDR) and Gyro sensor. The proposed method can get a sample of a simultaneous probability distribution of hydrodynamic maneuvering coefficients on the MMG 3DOF model from the observed data of \({u}_{\text{obs}}\left(t\right)\), \({v}_{\text{obs}}\left(t\right)\), \({r}_{\text{obs}}\left(t\right)\) and the ship maneuvering control data consisting of the rudder angle \(\delta (t)\) and propeller revolution \({n}_{P}(t)\).

This paper constructs a stochastic ship maneuvering model by assuming that the observed data always includes sensor errors and that the hydrodynamic maneuvering coefficients in the MMG 3DOF model are not fixed or scaler values but values with uncertainties. From the prior distribution information of each hydrodynamic maneuvering coefficient in the constructed stochastic model, samples of the simultaneous posterior distribution of each hydrodynamic coefficient are obtained by the Markov chain Monte Carlo (MCMC) method [26] using the observed data and ship maneuvering control data. We can use these samples in the ship MMG 3DOF maneuvering simulation for robust prediction of ship trajectory.

In this paper, the MMG 3DOF model is adopted expressed in Eq. (1). Let \(\dot{u},\) \(\dot{v}\), \(\dot{r}\) be the differentiation of \(u(t)\), \(v(t)\), \(r(t)\). Other variables are used the same definition in MMG 3DOF model [11] for the specific modeling of each force. Note that the coordinate system of this paper is the same as the original MMG 3DOF paper [11].

$$\begin{gathered} m(\dot{u} - vr) = - m_{x} \dot{u} + m_{y} vr + X_{H} + X_{P} + X_{R} , \hfill \\ m(\dot{v} + ur) = - m_{y} \dot{v} + m_{x} ur + Y_{H} + Y_{R} , \hfill \\ I_{zG} \dot{r} = - J_{z} \dot{r} + N_{H} + N_{R} . \hfill \\ \end{gathered}$$
(1)

2.1 Stochastic ship maneuvering model

Equation (2) shows the observed model of ship motion including uncertainties. Let \({u}_{\text{obs}}\left(t\right)\), \({v}_{\text{obs}}\left(t\right)\), \({r}_{\text{obs}}\left(t\right)\) be random variables following a Gaussian distribution \(N\) with \(u(t)\), \(v(t)\), \(r(t)\) being the respective true values as the mean and \({\sigma }_{u}\), \({\sigma }_{v}\) and \({\sigma }_{r}\) being the standard deviation. This observation model allows us to represent the error of the sensor to be observed.

$$\begin{aligned}{u}_{\text{obs}}\left(t\right)& \sim N\left(u\left(t\right),{\sigma }_{u}\right)\\ {v}_{\text{obs}}\left(t\right)&\sim N\left(v\left(t\right),{\sigma }_{r}\right)\\ {r}_{\text{obs}}\left(t\right)& \sim N\left(r\left(t\right),{\sigma }_{r}\right).\end{aligned}$$
(2)

In this paper, the target coefficients to be estimated are\({\sigma }_{u}\),\({\sigma }_{v}\), \({\sigma }_{r}\) in the observed model shown in Eq. (2). \({R}_{0}{\prime},{X}_{vv}{\prime},{X}_{vr}{\prime}, {X}_{rr}{\prime},{X}_{vvvv}{\prime},{Y}_{v}{\prime},{Y}_{r}{\prime},{Y}_{vvv}{\prime},{Y}_{vvr}{\prime}, {Y}_{vrr}{\prime},{Y}_{rrr}{\prime}{, N}_{v}{\prime},{N}_{r}{\prime},{N}_{vvv}{\prime}\) \(,{N}_{vvr}{\prime},{N}_{vrr}{\prime},{N}_{rrr}{\prime}\) are the non-dimensionalization hydrodynamic maneuvering coefficients shown in Eq. (3). Let \(\rho ,{L}_{pp}, d\) be the water density, ship length between perpendiculars and ship draft. Let \(U\) be the combined velocity (\(U\equiv \sqrt{{u}^{2}+{v}^{2}}\)). Let \({v}^{{^{\prime}}}, {r}^{{^{\prime}}}\) be the non-dimensionalization of each velocity (\({v}^{{^{\prime}}}\equiv \frac{v}{U}\),\({r}^{{^{\prime}}}\equiv \frac{{\text{rL}}_{\text{pp}}}{\text{U}}\)).

Equation (3) shows the MMG 3DOF definition of hydrodynamic forces acting on ship hull including non-dimensionalization of each velocity and coefficients [11]. Other coefficients required for MMG 3DOF simulations are assumed to have known true values in this paper. However, we can estimate other coefficients by including them in the stochastic model as the proposed method.

$$\begin{gathered} X_{H} = 0.5\rho L_{pp} dU^{2} ( - R^{\prime}_{0} + X^{\prime}_{vv} v^{{\prime}{2}} + X^{\prime}_{vv} v^{\prime}r^{\prime} + X^{\prime}_{rr} r^{{\prime}{2}} + X^{\prime}_{vvv} v^{{\prime}{2}} ), \hfill \\ Y_{H} = 0.5\rho L_{pp} dU^{2} (Y^{\prime}_{v} v^{\prime} + Y^{\prime}_{r} r^{\prime} + Y^{\prime}_{vvr} v^{{\prime}{2}} r^{\prime} + Y^{\prime}_{vrr} v^{\prime}r^{{\prime}{2}} + Y^{\prime}_{vvv} v^{\prime}r^{{\prime}{3}} + Y^{\prime}_{rrr} r^{{\prime}{3}} ), \hfill \\ N_{H} = 0.5\rho L_{pp} dU^{2} (N^{\prime}_{v} v^{\prime} + N^{\prime}_{r} r^{\prime} + N^{\prime}_{vvr} v^{{\prime}{2}} r^{\prime} + N^{\prime}_{vrr} v^{\prime}r^{{\prime}{2}} + N^{\prime}_{vvv} v^{\prime}r^{{\prime}{3}} + N^{\prime}_{rrr} r^{{\prime}{3}} ). \hfill \\ \end{gathered}$$
(3)

2.2 MCMC sampling

MCMC method [26] is a means of obtaining samples from multivariate probability distributions. In general, it is not easy to estimate the posterior distribution when there are multiple parameters directly. On the other hand, we can obtain an approximate overview of the posterior distribution by sampling from a large number of predetermined prior distributions. The MCMC method repeats sampling based on a Markov process where the behavior of the next point is determined only by the current values. Using this property, we can generate samples resulting in a specified probability distribution.

To conduct the MCMC method, it is necessary to define the likelihood calculation method and the prior distribution of each coefficient to be estimated. The observed model shown in Eq. (2) is adopted for the likelihood calculation method. Specifically, let \(u(t)\), \(v(t)\), \(r(t)\) be the results obtained by MMG 3DOF simulation and let the observed data \({u}_{obs}(t)\), \({v}_{obs}(t)\), \({r}_{obs}(t)\) and \({\sigma }_{u}\), \({\sigma }_{v}\), \({\sigma }_{r}\) obtained by sampling are used to calculate the likelihood at each observed time according to Eq. (2). We can get the overall likelihood by multiplying the likelihood at each observed time together. The proposed method can use this overall likelihood as the information for sampling in the next iteration.

In this paper, the prior distribution of each coefficient to be estimated is defined as

$${P}_{{\sigma }_{u}},{P}_{{\sigma }_{v}},{P}_{{\sigma }_{r}},{P}_{{R}_{0}{\prime}},{P}_{{X}_{vv}{\prime}},{P}_{{X}_{vr}{\prime}},{P}_{{X}_{rr}{\prime}},{P}_{{X}_{vvvv}{\prime}},{P}_{{Y}_{v}{\prime}},{P}_{{Y}_{r}{\prime}},{P}_{{Y}_{vvv}{\prime}},{P}_{{Y}_{vvr}{\prime}},{P}_{{Y}_{vrr}{\prime}}, {P}_{{Y}_{rrr}{\prime}},{P}_{{N}_{v}{\prime}},{P}_{{N}_{r}{\prime}},{P}_{{N}_{vvv}{\prime}},{P}_{{N}_{vvr}{\prime}},{P}_{{N}_{vrr}{\prime}},{P}_{{N}_{rrr}{\prime}}.$$

In general, in the MCMC method, any prior distribution can be computed as long as it satisfies the properties of a probability distribution. However, in the MMG 3DOF model, the range of hydrodynamic maneuvering coefficients to obtain simulation results close to the observed data are small. Therefore, simulation results with misplaced hydrodynamic maneuvering coefficients cannot effectively calculate the likelihood and update coefficients in the MCMC method. Therefore, it is necessary to devise a way to search only for hydrodynamic maneuvering coefficients within a realistic range by setting a prior distribution. Specifically, the following setting methods can be considered:

  • Adopt a prior distribution with lower and upper limits of the hydrodynamic maneuvering coefficients from past ships' databases of hydrodynamic maneuvering coefficients.

  • Adopt a prior distribution such that the probability of the hydrodynamic maneuvering coefficients obtained from the simplified formula for calculating the hydrodynamic maneuvering coefficients is higher than the other values.

3 Observing system simulation experiments

This paper validates the effectiveness of the proposed method by an Observing System Simulation Experiments (OSSE) [27]. OSSE is an experiment in which a virtual observation system is constructed on a computer, and its behavior is evaluated. Actual observed data are affected by various disturbances and mechanical noise caused by ship vibration. To verify the influence of observation errors on the identification results, the proposed method is applied to observation data with different degrees of error, and the results are compared. Note that in this experiment, the true values of the hydrodynamic maneuvering coefficients exist as scalar values. Therefore, it is possible to directly compare the estimated results of the hydrodynamic maneuvering coefficients with the true values. However, this paper considers that even if the values of the hydrodynamic maneuvering coefficients have deviated from the true value, it is valuable for practical use if the trajectory obtained by the ship maneuvering simulation using the values is consistent with the true trajectory. Therefore, the paper also compares the results of ship maneuvering simulations using samples from the simultaneous probability distribution of the hydrodynamic maneuvering coefficients obtained by the proposed method with the true hydrodynamic maneuvering coefficients as the true trajectory.

First, an MMG 3DOF simulation is performed based on the ship maneuvering data set using information from the KVLCC2 L7 model as the target ship. The rudder angle \(\delta (t)\) was changed according to each case, but the engine revolution \({n}_{P}(t)\) was constant at 17.95 rps in all cases in this paper. These simulation results created the surge velocity, sway velocity, and yaw velocity with a sampling rate of 1.0 Hz and an observation time of 100 s as true values. Next, pseudo-observed data are created by adding Gaussian noise to the true values. This paper implements the MCMC method using Turing.jl [28], which is registered as a package of the Julia programming language. As a specific setup of the MCMC method, this paper adopted No-U-Turn Sampler (NUTS) [29] as the sampler in the MCMC method. In addition, the number of burn-in was set to 500, and then sampling was conducted 1000 times after burn-in. These 1000 samples are the estimation results based on the simultaneous posterior probability distribution of the hydrodynamic maneuvering coefficients. For trajectory comparison by ship maneuvering simulation, 300 samples are randomly selected from 1000 samples. Using these 300 samples of hydrodynamic maneuvering coefficients, ship maneuvering simulations are conducted for evaluation and validation. On the ship maneuvering simulation using the hydrodynamic maneuvering coefficients samples, this paper uses the same \(\delta (t)\) and \({n}_{P}(t)\) as the one when the true value is created.

The objective of this OSSE is to investigate the deviation of hydrodynamic maneuvering coefficients estimation result by the proposed method due to observation error. As a specific setup for creating observation data, this paper added the following three patterns of Gaussian noise to the true values of surge velocity, sway velocity, and yaw velocity as Table 1. The mean value of each Gaussian noise is set to 0.0.

Table 1 Setting of observation data

In this experiment, the proposed method estimated the hydrodynamic maneuvering coefficients using the ship maneuvering simulation results of the 35-degree turning test. In addition, this paper compared the obtained trajectories of the ship maneuvering simulations using 300 samples to the trajectory of the ship maneuvering simulation using the hydrodynamic maneuvering coefficients set as the true values. The comparison was conducted on the 35-degree turning test and the 20/20-degree zigzag test, respectively. Note that this experiment assumes that the hydrodynamic maneuvering coefficients are the same for the 35-degree turning test and 20/20-degree zigzag test.

Figure 1 shows the true values and each observed data for the 35-degree turning test used in Case 1 and Case 2. Because of the randomness of Gaussian noise, the estimation results of the proposed method are expected to differ depending on the generated observed data. Therefore, in this section, we conducted the proposed method using the data in Fig. 1 as one case, and the variation of the results with the generated observation data is discussed in Chapter 4.

Fig. 1
figure 1

True and observed data in Case 1 and Case 2

Case 1. Using Uninformative prior distribution of each hydrodynamic maneuvering coefficient

In Case 1, this paper set up Eq. (5) as the prior distribution of target coefficients. In Eq. (5), the uniformly distributed probability density function \(U\)(x |ac) defined in Eq. (4) is used. This setting is equivalent to adopting uninformative prior distribution for each hydrodynamic coefficient. The width of each uniform distribution is supposed to be set based on the database of hydrodynamic maneuvering coefficients for similar ships in the past. This case set the width of each uniform distribution based on the past report of P-34 research committee in JASNAOE, Japan [30]. The preset values \(a, c\) in Eq. (5) define the search space of each hydrodynamic maneuvering coefficient by the proposed method. In addition, the inverse gamma distribution, whose shape and scale parameter are 1.0, is adopted as the prior distributions of \({\sigma }_{u}\), \({\sigma }_{v}\) and \({\sigma }_{r}\).

Figure 2 shows the prior and posterior distributions estimated by the proposed method using each observed data. Although the proposed method can only obtain samples of each coefficient's simultaneous posterior probability distribution, the posterior distribution is shown here as the probability density function approximated by KDE (Kernel Density Estimation) using a Gaussian kernel from the samples of each coefficient. The black dashed line is the prior distribution set in Eq. (4), the blue line is the posterior distribution estimated by applying Gaussian noise to the observed data with Noise L1, the orange line is posterior distribution from Noise L2, the green line is posterior distribution from Noise L3. From Fig. 2, we can observe that the posterior distributions of the higher-order hydrodynamic maneuvering coefficients such as \({X}_{vvvv}{\prime}\),\({Y}_{vvv}{\prime}\), \({Y}_{rrr}{\prime}\), \({N}_{vvv}{\prime}\) and \({N}_{rrr}{\prime}\) are similar regardless of the degree of observation error, while the posterior distributions of the lower order hydrodynamic maneuvering coefficients such as \({R}_{0}{\prime},{X}_{vr}{\prime},{X}_{rr}{\prime},{Y}_{r}{\prime},{N}_{r}{\prime}\) tend to differ in terms of the width of the base and the location of mountain formation depending on the observation error. In particular, for the case of Noise L3, some distributions form at locations that differ significantly from the other three cases.

$$U(x|a,c) = \left\{ {\begin{array}{ll} \frac{1}{c - a};& a \le x \le c \\ 0;& {\text{otherwise}} \\ \end{array} } \right.,$$
(4)
$$\begin{aligned}P_{R_{0}^{\prime}}&=U(x \mid0.000, 0.100)\\P_{X_{vv}^{\prime}}&=U(x \mid-0.200, 0.200)\\P_{X_{vr}^{\prime}}&=U(x \mid-0.223, 0.177)\\P_{X_{rr}^{\prime}}&=U(x \mid-0.088, 0.032)\\P_{X_{vvvv}^{\prime}}&=U(x \mid-1.400, 1.400)\\P_{Y_{v}^{\prime}}&=U(x \mid-0.500, 0.000)\\P_{Y_{r}^{\prime}}&=U(x \mid-0.100, 0.200)\\ P_{Y_{vvv}^{\prime}}&=U(x \mid-6.000, 2.000)\\P_{Y_{vvr}^{\prime}}&=U(x \mid-2.500, 1.000)\\P_{Y_{vrr}^{\prime}}&=U(x \mid-1.500, 0.000)\\P_{Y_{rrr}^{\prime}}&=U(x \mid-0.120, 0.040)\\P_{N_{v}^{\prime}}&=U(x \mid-0.200, 0.000)\\P_{N_{r}^{\prime}}&=U(x \mid-0.100, 0.000)\\P_{N_{vvv}^{\prime}}&=U(x \mid-0.500, 0.400)\\P_{N_{vvr}^{\prime}}&=U(x \mid-1.000, 0.000)\\P_{N_{vrr}^{\prime}}&=U(x \mid-0.300, 0.300)\\P_{N_{rrr}^{\prime}}&=U(x \mid-0.060, 0.000).\end{aligned}$$
(5)
Fig. 2
figure 2

Prior and posterior distribution of hydrodynamic maneuvering coefficients in Case 1

Figure 3 shows the trajectories of simulations of the 35-degree turning test and the 20/20-degree zigzag test using 300 samples of the hydrodynamic maneuvering coefficients obtained from Fig. 1 by the proposed method compared to the true trajectory. Figure 4 shows the results of a quantitative evaluation of the range of errors in the trajectory output from the 300 samples. As the error evaluation criteria, this paper adopted a nondimensional value of RMSE (Root Mean Square Error) based on the Euclidean distance from the true trajectory divided by \({L}_{pp}\). From Fig. 3, we can find that the width of simulated trajectories increases as the observation error increases. This indicates that it is greatly affected by the observation error. In addition, in the context of machine learning, it is possible to view the results of the 35-degree turning test in Figs. 3 and 4 as the learning results and the 20/20-degree zigzag test as the test results. From this perspective, we can find that, in Figs. 3 and 4, especially when the observation error is large, for the 35-degree turning test used for learning, there is a true value path near the center of the simulation results using 300 samples, but for the 20/20-degree zigzag test, there is no true value path near the center of the simulation results using 300 samples. It is clear that the estimated hydrodynamic maneuvering coefficients in the case of Noise L3 cannot be used practically.

Fig. 3
figure 3

Comparison of trajectory estimation between three noise levels in Case 1

Fig. 4
figure 4

Boxplot of error analysis between true trajectory and ship maneuvering simulation results using 300 samples in Case 1

Case 2. Using triangular distribution of each hydrodynamic maneuvering coefficient

In Case 2, as a case study for estimating practical hydrodynamic maneuvering coefficients, the proposed method is executed using a prior distribution created from the knowledge of the hydrodynamic maneuvering coefficients. We use the same data of the 35-degree turning test in Fig. 2. The prior distribution is set as Eq. (7) which is described by the probability density function of the triangular distribution \(T\) (xa, b, c) expressed in Eq. (6). The upper and lower bounds of the prior distribution are the same as in Eq. (5), and the peak value in the probability density function of the triangular distribution is given by the simplified formula using the principal particulars of the target ship, which is based on the past report of P-34 research committee in JASNAOE [30]. The preset values \(a \text{ and } c\) in Eq. (7) define the search space of each hydrodynamic maneuvering coefficient by the proposed method. In addition, the preset value \(b\) means the predicted appropriate values of hydrodynamic maneuvering coefficients. Adding the predicted appropriate values of hydrodynamic maneuvering coefficients as prior information is expected to improve the search efficiency and time of the proposed method. In addition, the prior distributions of \({\sigma }_{u}\), \({\sigma }_{v}\), \({\sigma }_{r}\) are the same as Case 1.

Figure 5 shows the proposed method's prior and posterior distributions estimated using each observed data. Compared with the results in Figs. 2 and 5 shows that the simultaneous posterior probability distribution of each of the hydrodynamic maneuvering coefficients has a peak near the true value. Owing to the triangular distributions, suitable combinations of the hydrodynamic maneuvering coefficients are sampled from the beginning of the iteration in the MCMC method.

Fig. 5
figure 5

Prior and posterior distribution of hydrodynamic maneuvering coefficients in Case 2

Figure 6 shows the trajectories of simulations of the 35-degree turning test and the 20/20-degree zigzag test using 300 samples of the hydrodynamic maneuvering coefficients obtained from Fig. 4 by the proposed method compared to the true trajectory. Figure 7 shows the results of a quantitative evaluation of the range of \({\text{RSME}}/{L}_{pp}\) in the ship trajectory output from the 300 samples. It can be seen that the proposed method outputs trajectories closer to the true value than Fig. 3. It can also be confirmed that the \({\text{RSME}}/{L}_{pp}\) has also decreased compared to Fig. 7.

$$T(x \mid a, b, c)=\left\{\begin{array}{ll}\frac{2(x-a)}{(c-a)(b-a)} ; & a \leq x \leq b \\\frac{2(c-x)}{(c-a)(c-b)} ; & b<x \leq c \\0 ; & x<a, x>c\end{array}\right.,$$
(6)
$$\begin{aligned}P_{R_{0}^{\prime}} & =T(x \mid0.000, 0.027, 0.100)\\P_{X_{vv}^{\prime}}& =T(x \mid-0.200, -0.011, 0.200)\\P_{X_{vr}^{\prime}}& =T(x \mid-0.223, -0.022, 0.177)\\P_{X_{rr}^{\prime}}& =T(x \mid-0.088, -0.012, 0.032)\\P_{X_{vvvv}^{\prime}}& =T(x \mid-1.400, 0.118, 1.400)\\P_{Y_{v}^{\prime}}& =T(x \mid-0.500, -0.001, 0.000)\\P_{Y_{r}^{\prime}}& =T(x \mid-0.100, 0.062, 0.200)\\ P_{Y_{vvv}^{\prime}}& =T(x \mid-6.000, -1.351, 2.000)\\P_{Y_{vvr}^{\prime}}& =T(x \mid-2.500, 0.115, 1.000)\\P_{Y_{vrr}^{\prime}}& =T(x \mid-1.500, -0.346, 0.000)\\P_{Y_{rrr}^{\prime}}& =T(x \mid-0.120, -0.011, 0.040)\\P_{N_{v}^{\prime}}& =T(x \mid-0.200, -0.057, 0.000)\\P_{N_{r}^{\prime}}& =T(x \mid-0.100, -0.001, 0.000)\\P_{N_{vvv}^{\prime}}& =T(x \mid-0.500, -0.008, 0.400)\\P_{N_{vvr}^{\prime}}& =T(x \mid-1.000, -0.230, 0.000)\\P_{N_{vrr}^{\prime}}& =T(x \mid-0.300, 0.048, 0.300)\\P_{N_{rrr}^{\prime}}& =T(x \mid-0.060, -0.001, 0.000)\end{aligned}.$$
(7)
Fig. 6
figure 6

Comparison of trajectory estimation between three noise levels in Case 2

Fig. 7
figure 7

Boxplot of error analysis between true trajectory and ship maneuvering simulation results using 300 samples in Case 2

In Case 1 and Case 2, the hydrodynamic maneuvering coefficients were estimated from a single pattern of observed data. However, it is assumed that the results of the proposed method will change depending on the observed data generated. Here, this paper generates the 100 independent patterns of observed data of the 35-degree turning test, and samples are obtained from each observation data by estimating the hydrodynamic maneuvering coefficients. The posterior distribution is described as the probability density function approximated by KDE using a Gaussian kernel from the samples of each coefficient from these combined samples. Figures 8 and 9 show the combined results of the estimation with the prior distribution settings of Case 1 and Case 2 based on the 100 independent patterns of 35-degree turning test data. Compared to Figs. 2 and 5, the results for Noise L1, where the errors in the observed data are small, the estimation results do not vary much. However, for Noise L3, where the errors in the observed data are large, the probability distribution peaks of hydrodynamic maneuvering coefficients have been flattened. From the estimation result of each observed data, especially the low-order hydrodynamic maneuvering coefficients is not stable. These results indicate that it is difficult to estimate the hydrodynamic maneuvering coefficients with the observation accuracy of Noise L3. At the same time, it is reasonably feasible to estimate it with the observation accuracy of Noise L1. Moreover, comparing to Fig. 8, the peak of the probability density distribution in Fig. 9 is closer to the true value. From this result, by introducing a triangular distribution with a peak value close to the true value, the proposed method can get more efficient estimation of the hydrodynamic maneuvering coefficients. In actual situations, we cannot know the true value of hydrodynamic maneuvering coefficients in advance. However, it is possible to obtain information close to the true value of hydrodynamic maneuvering coefficients using the expert knowledge and the databases of hydrodynamic maneuvering coefficients of past ships maintained by shipyards. Therefore, the proposed method can provide a more efficient and practical estimation of the hydrodynamic maneuvering coefficients by utilizing this information.

Fig. 8
figure 8

Posterior distribution of hydrodynamic maneuvering coefficients combining 100 independent patterns in Case 1

Fig. 9
figure 9

Posterior distribution of hydrodynamic maneuvering coefficients combining 100 independent patterns in Case 2

The main objective of OSSE is to evaluate the behavior of virtual observation system. As a result, for the KVLCC2 L7 model used in this experiment, the proposed method does not provide a useful estimate of the hydrodynamic maneuvering coefficients on the case of Noise L3. However, this is the one case when the sampling rate is 1.0 Hz. To estimate the hydrodynamic maneuvering coefficients of the target ship by the proposed method, it is necessary to observe more frequently than the current setting or to improve the accuracy of observation. The advantage of OSSE is that such studies can be conducted virtually in advance. The proposed method enables quantitative studies of the observation system assuming specific cases.

From Figs. 2, 5, 8, and 9, some of the hydrodynamic maneuvering coefficients have no peak at the point where they are set as the true value. On the other hand, from Figs. 3, 4, 6, and 7, the state and trajectory of the target ship can be obtained with a certain degree of accuracy even when using a combination of hydrodynamic maneuvering coefficients that are not true values. From these, multiple combinations of hydrodynamic maneuvering coefficients of the MMG 3DOF model can reasonably explain the observed data with uncertainty. Since the proposed method searches mathematically without considering the importance of each hydrodynamic maneuvering coefficient, the proposed method has the property of outputting combinations of the hydrodynamic maneuvering coefficients as the final results if these can explain the state and trajectory of the target ship, although these are different from the true values. Considering the practical use, it is possible to get more practical results by narrowing the search range of low-order hydrodynamic maneuvering coefficients by setting adequate prior distributions, as in Case 2.

4 Applying the proposed method to free-running model ship test

In Chapter 3, OSSE has conducted on the assumption of the completeness of the ship maneuverability mathematical model. However, it is natural to assume that actual ships are not guaranteed the completeness of the ship maneuverability mathematical model but rather do not operate in perfect accordance with the ship maneuverability mathematical model. To verify the effectiveness of the proposed method in actual ship operations, we applied the proposed method to several free-running model ship test data maintained by MTI Co., Ltd. Table 2 shows the principal particulars of model ship in this free-running test.

Table 2 Principal particulars of model ship

Figure 10 shows one of the data obtained from a 35-degree turning free-running model ship test in the calm water at an experimental tank. Two gyro sensors are installed at different locations in the target model ship. In applying this data to the proposed method, the surge, sway, and yaw information obtained at each location is converted to surge, sway, and yaw information at the location of center of gravity. In other words, two sets of surge, sway, and yaw information of the center of gravity are obtained simultaneously. When calculating the likelihood at a certain time, the likelihood is first calculated independently for each data set and then multiplied together.

Fig. 10
figure 10

Observed data of the free-running model ship test

Figure 11 shows the prior and posterior distributions estimated from the observed data of Fig. 10. The setting of the prior distributions of this case is the same as Case 1 in Chapter 3. From Fig. 11, all the hydrodynamic maneuvering coefficients show an update from the prior distribution. In addition, the posterior distributions of all the hydrodynamic maneuvering coefficients formed a peaked distribution. Figure 12 shows the trajectory comparison between observed data and hip maneuvering simulation results using 300 samples of obtained posterior distributions. Figure 12 shows that the obtained predicted route has a small variation and captures the observed route in the center. Figure 12 shows that the obtained predicted routes have a small variation and capture the observed routes at the center. This result indicates that the proposed method enables robust identification that includes the uncertainties in the observed data and the hydrodynamic maneuvering coefficients.

Fig. 11
figure 11

Posterior distribution of hydrodynamic maneuvering coefficients the free-running model ship test

Fig. 12
figure 12

Comparison between observed data of the 35-degree turning test and ship maneuvering simulation results using 300 samples from the free-running model ship test data

Figure 13 shows the trajectories of simulations of the 10/10-degree zigzag test using 300 samples of the hydrodynamic maneuvering coefficients obtained from Fig. 11 by the proposed method compared to the observed data of the 10/10-degree zigzag test. Comparing Figs. 3 and 6, the difference in trajectory between these is larger. This difference may be because the data of the free-running test is a different state of value range than the data of Fig. 10, and the same hydrodynamic maneuvering coefficients are used to describe right-turn and left-turn behavior. We need to consider various strategies for applying the proposed method to actual operations, such as estimating hydrodynamic maneuvering coefficients using multiple patterns of ship trajectory.

Fig. 14
figure 13

Comparison between observed data of the 10/10-degree zigzag test and ship maneuvering simulation results using 300 samples from the free-running model ship test data

In addition to this, we applied the proposed method to several free-running model ship test data maintained by MTI Co., Ltd. From these case studies, it can be said that when maneuvering in an environment with relatively small external disturbances, such as calm water, the observed data can be reasonably explained by estimating the hydrodynamic maneuvering coefficients using the proposed method with the MMG 3DOF model and MCMC method. However, in an environment where external disturbances are relatively large, such as wind and wave or low speed of the target ship, the proposed method cannot get adequate samples of each hydrodynamic maneuvering coefficient because of the large gap between model behavior and observed data. How to integrate the effects of wind and waves into the ship maneuverability mathematical model considering the actual sea operation using sea condition data and how to utilize the hydrodynamic maneuvering coefficients identified in calm water in actual sea conditions are future issues to be addressed.

5 Conclusion

This paper proposed a method for estimating the hydrodynamic maneuvering coefficients of the MMG 3DOF model using three types of time-series ship motions (surge, sway, and yaw velocity) as observed data. In the assumption of this paper, there is uncertainty in observations and the hydrodynamic maneuvering coefficients. Therefore, the proposed method outputs samples of the simultaneous posterior probability distribution of the hydrodynamic maneuvering coefficients by the MCMC method using the observed data and stochastic model. A robust trajectory with a wide range can be presented by conducting ship maneuvering simulations using these samples.

To verify the feasibility of the proposed method, we conducted an observation system simulation experiment (OSSE) using the KVLCC2 L7 model and applied the proposed method to several free-running model ship tests. The findings are as follows.

  • On the hydrodynamic maneuvering coefficients of the MMG 3DOF model, which are difficult to estimate from the observed data of surge, sway, and yaw velocity, the proposed method, including a stochastic ship maneuvering model and MCMC sampling, could be used to estimate reliable hydrodynamic maneuvering coefficients on the assumption that MMG 3DOF model can explain the ship's state and trajectory, depending on the accuracy of the observed data.

  • The proposed method enables us to consider the observation accuracy for estimating the hydrodynamic maneuvering coefficients for each target ship.

  • When maneuvering in an environment with relatively small external disturbances, such as calm water, the observed data can be reasonably explained by estimating the hydrodynamic maneuvering coefficients using the proposed method with the MMG 3DOF model and MCMC method.

  • More efficient and practical estimation is possible by incorporating the information on the values of the hydrodynamic maneuvering coefficients, such as the tank tests and CFD calculation results. It is recommended that the proposed method conducts by including information on the hydrodynamic maneuvering coefficients tested on similar ships in the prior distribution.