System identification of Vessel Manoeuvring Models

Identifying the ship’s maneuvering dynamics can build models for ship maneuverability predictions with a wide range of useful applications. A majority of the publications in this field are based on simulated data. In this paper model test data is used. The identification process can be decomposed into finding a suitable manoeuvring model for the hydrodynamic forces and to correctly handle errors from the measurement noise. A parameter estimation is proposed to identify the hydrodynamic derivatives. The most suitable manoeuvring model is found using the parameter estimation with cross-validation on a set of competing manoeuvring models. The parameter estimation uses inverse dynamics regression and Extended Kalman filter (EKF) with a Rauch Tung Striebel (RTS) smoother. Two case study vessels, wPCC and KVLCC2, with very different maneuverability characteristics are used to demonstrate and validate the proposed method. Turning circle predictions with the robust manoeuvring models, trained on zigzag model tests, show good agreement with the corresponding model test results for both ships.


Introduction
Ship manoeuvring performance can be assessed with varying accuracy, effort, and cost.The full-scale manoeuvring test during sea trials is the most common method used to demonstrate compliance with the International Maritime Organization (IMO) manoeuvring criteria (IMO, 2002), which all ships over 100 meters must fulfill.However before ships are built, manoeuvring prediction methods are needed.The free model test (ITTC, 2008b) is often recognized as the most accurate prediction method (ITTC, 2008c), which can also be conducted with high accuracy in CFD (Araki et al., 2012).These methods are expensive and they also have the drawback of obtaining only results for one specific maneuver at the time.Some complex maneuvers, such as harbor maneuvers, are also very hard to conduct in this way.The system-based manoeuvring model is a more cost-efficient solution with many applications such as the maneuverability requirement for ship design and construction, the design of advanced ship autopilot systems, unmanned surface vehicles (USVs) (Bai et al., 2022) or master mariners' training simulators.
Captive model tests (ITTC, 2008a), planar motion mechanism tests (PMM) (ITTC, 2008a) or virtual captive tests (VCT) (Liu et al., 2018) can be conducted as input to the manoeuvring model.These tests are also costly, and the increased flexibility of the mathematical model gives lower accuracy (ITTC, 2008c).
System identification methods applied on recorded ship trajectories from free model tests, CFD free running trials (Araki et al., 2012) or full scale ship operation offers a more cost-efficient way to develop systembased manoeuvring models.Some of the publications within this field are summarized in Table 1.The methods identifies models that can be categorized into three groups: white-box (WB), grey-box (GB) or black-box models (BB) (Miller, 2021).The white-box models are deterministic and are not data driven by applying only physical principles, for instance with semi-empirical formulas which have very low cost but also very low accuracy (ITTC, 2008c).The black-box models are stochastic and data driven.No knowledge about the system structure and parameters is required (Miller, 2021).The grey-box modeling is a combination of white-box and black-box modeling methods, so that both a physical model and data is used.
The system identification can be applied on full scale data (Åström and Källström, 1976;Perera et al., 2015;Revestido Herrero and Velasco González, 2012) which has the highest uncertainty, both in terms of model uncertainty and measurement uncertainty which is therefore the hardest task, but also the most relevant.The uncertainty can be reduced by instead using model test data as in Araki et al. (2012), He et al. (2022), Xue et al. (2021), Miller (2021) and Luo et al. (2016).The uncertainty can be further reduced by using simulated data as in Shi et al. (2009), Zhu et al. (2017), Wang et al. (2021) Luo et al. (2016) the potential of new methods with the benefit that the true model is known, but one also has to remember that the objective is to identify real objects, not its mathematical model (Miller, 2021).Black-box modeling was used in He et al. (2022), using neural network, and in Xue et al. (2021), using gaussian process.The nonparametric models are related, where the system structure is known but no parameters are required as seen in Pongduang et al. (2020).However, most of the system identification methods for ship manoeuvring models use the grey-box modeling by assuming a predefined mathematical model, which reduces the problem to a parameter estimation.The Kalman filter (KF) combined with maximum likelihood estimation was proposed already in 1976 (Åström and Källström, 1976) to develop a linear manoeuvring model based on manually recorded data in 1969 onboard the Atlantic Song freighter.The Extended Kalman filter (EKF) can also estimate parameters if the parameters are represented as states of the state space model.This technique was used on a nonlinear Nomoto model (Perera et al., 2015) and a 3 degree of freedom model (3DOF) (Shi et al., 2009).EKF was used in Araki et al. (2012) with constrained parameters based on physical reasoning and prior knowledge using constrained least squares regression.Unscented Kalman filter (UKF), which has been proposed as an improvement to the EKF in handling nonlinear systems, was used in Revestido Herrero and Velasco González (2012).Support vector regression (SVR) has been investigated in Zhu et al. (2017), Wang et al. (2021) and Luo et al. (2016).A genetic algorithm was used in Miller (2021) for the system identification of model test performed on a lake.
The drift effect of the hydrodynamic coefficients is inevitable in modeling of ship manoeuvring motions by using the system identification.The drifts of hydrodynamic coefficients result from the so-called multicollinearity, meaning that if the input variables of a regression model are firmly linearly dependent on each other, the regression results of their coefficients may be incorrect (Luo et al., 2016).The identified coefficients within the mathematical model do not have to be physically correct but mathematically correct (ITTC, 2008c).Many nonlinear hydrodynamic coefficients in the mathematical model of ship manoeuvring motions have no apparent physical meaning (Luo et al., 2016).Multicollinearity can be reduced by reducing the number of parameters in the model, either by simplification or adding more deterministic parts by including hydrodynamic relations.For instance, slender body theory can be added (Hwang, 1982).Simplification can be based on hydrodynamic reasoning where the number of parameters can be reduced (Luo et al., 2016).
However, system identification methods must handle imperfections in the data from measurement noise and model uncertainty of the manoeuvring model, which will always be present since the model can never perfectly capture all fundamental physics.When developing a manoeuvring model with model test data for manoeuvring prediction, preprocessing of data and a method to choose an appropriate manoeuvring model is needed (Alexandersson et al., 2022).This paper proposes an innovative approach to address those issues for ship manoeuvring system identification based on actual noise test data.First, a parameter estimation method is proposed to study the capability of several candidate manoeuvring models.Model test data in all degrees of freedom is recorded as ship trajectories, including position and heading and thrust, where a model for propeller thrust is also proposed and further developed.In this method, the inverse dynamics regression and Extended the Kalman filter (EKF) with a Rauch Tung Striebel (RTS) smoother (Rauch et al., 1965) are proposed for the necessary data cleaning before feeding into the manoeuvring model.An iterative approach is adopted to determine the most appropriate manoeuvring model.The multicollinearity problem is addressed by identifying a ship manoeuvring system with proper parameters in the manoeuvring model.The proposed approach is verified by identifying a selected manoeuvring model and predicting turning circle manoeuvres for two different test vessels.
For the completeness of this paper, different manoeuvring models and propeller models are briefly introduced in Section 2. Then the proposed parameter estimation method is presented in Section 3, where each subcomponent is also described.The robust model development process is described in Section 3.2.The parameter estimation is applied to two case study ships which are introduced in Section 4 and corresponding results are presented in the Section 5 with discussions, followed by conclusions.All code to reproduce this paper is open source (Alexandersson, 2022b).

Vessel manoeuvring models
Ship manoeuvring is a simplified case of seakeeping.The encountering waves have been removed, assuming calm water conditions.This simplification allows the ship dynamics to be expressed with only four degrees of freedom: surge, sway, roll, and yaw, where the roll is often excluded.Surge, sway, and yaw have very low frequencies during manoeuvres, so added masses and other hydrodynamic derivatives can be assumed as constants (Fossen, 2021).Three manoeuvring models are used in this paper: the Linear (LVMM) (Matusiak, 2021), the Abkowitz (AVMM), Abkowitz (1964) and the modified Abkowitz (MAVMM), proposed in this paper.Fig. 1 shows the reference frames used in the manoeuvring models where  0 and  0 and heading  are the global position and orientation of a ship fix reference frame (, , ) (or rather (, ) when heave is excluded) with origin at midship., , , ,  and  are velocities and forces in the ship fix reference frame.The acceleration can be solved from the manoeuvring equation Eq. (1) (Fossen, 2021) to obtain Eq. ( 2), where  is a helper variable: A state space model for manoeuvring can now be defined with six states: The time derivative of this state ẋ can be defined by a state transition  (, ) using geometrical relations how global coordinates  0 ,  0 and  depend on , , and  viz., where  is control inputs (rudder angle  and thrust); the last three derivatives: u, v, ̇ are calculated with Eq. (2). is the process noise, i.e., the difference between the predicted state by the manoeuvring model and the true state of the system. is unknown when the manoeuvring model is used for manoeuvre predictions and therefore normally assumed to be zero, but it is an important factor when the manoeuvring model is used in the EKF, see Section 3.4.The manoeuvring simulation can now be conducted by numerical integration of Eq. ( 5).The main difference between the manoeuvring models lies in how the hydrodynamic functions   (, , , , ℎ),   (, , , , ℎ),   (, , , , ℎ) are defined.These expressions are denoted below for the various manoeuvring models: LVMM, AVMM and MAVMM.Linear Vessel Manoeuvring Model (LVMM) (Matusiak, 2021): Abkowitz Vessel Manoeuvring Model (AVMM) (Abkowitz, 1964): Modified Abkowitz Vessel Manoeuvring Model (MAVMM), where only the most relevant coefficients in AVMM are included.) The hydrodynamic functions above are expressed using nondimensional units with the prime system, denoted by the prime symbol ( ′ ).
The quantities are expressed in the prime system, using the denominators in Table 2.For instance, surge linear velocity  can be expressed in the prime system as seen in Eq. ( 15) using the linear velocity denominator.
Equations can either be written in the prime or regular SI system.The hydrodynamic derivatives are always expressing forces in the prime system as function of state variables.The ( ′ ) sign is therefore implicit and not written out as seen in Eq. ( 16).
The exceptions are the added masses ( u,  v,  ̇,  v and  ̇) which are expressed in both Prime system or the regular SI system where the ( ′ ) sign is therefore explicitly stated.There is however a great benefit in expressing the hydrodynamic forces in the prime system.The forces are Length  Linear acceleration often nonlinear due to a quadratic relation to the flow velocity, as seen in Eq. ( 17).
which becomes linear when expressed in the prime system as seen in Eq. ( 18).

The propeller model
The propeller model is developed based on Manoeuvring Modeling Group (MMG) model (Yasukawa and Yoshimura, 2015) where the thrust is expressed as: and the thrust coefficient   is modeled as a second order polynomial: The advance ratio  is calculated as: where  is propeller diameter,  is propeller speed and   is the wake fraction at an oblique inflow to the propeller from the drift angle and the yaw rate.A semi-empirical formula for   is provided in the MMG model.As an alternative, a simple polynomial is proposed in Eq. ( 22).
is modeled as a function of rudder angle , to include wake influence from the rudder and ship speed , to include a speed dependency.
The influence from drift angle  and yaw rate  is expressed by   in Eq. ( 23).
where   is the propeller longitudinal position and  0 is the regular Taylor wake fraction, applicable to straight ahead steaming with no rudder angle.Similar to the MMG propeller model, two sets of parameters  1 - 4 should be used in the propeller model depending on the sign of   .

Method
An efficient approach to build the manoeuvring model for a ship's manoeuvres is presented in this paper.In this procedure, an initial manoeuvring model is used to solve the reversed manoeuvring problem, i.e., predicting unknown forces from known ship manoeuvres.Then, the hydrodynamic derivatives in the manoeuvring model can be identified with regression of the force polynomials on forces predicted with inverse dynamics.The ordinary least square (OLS) method is used to regress the hydrodynamic derivatives in the proposed parameter estimation method.The OLS is known to be extremely sensitive to noise and outliers inevitably associated with both experimental and full-scale test data.Thereby, the focus in the present parameter estimation is on pre-processing data with filtering rather than the regression method itself.Both the Extended Kalman filter (EKF) and Rauch Tung Striebel (RTS) smoother are used to perform the data-processing for building a proper manoeuvring model.

Overview of the proposed procedure
After choosing a proper manoeuvring model to describe a ship's manoeuvring performance, the coefficients in those manoeuvring models can be estimated by the proposed parameter estimation method composed of two basic steps similar to Revestido Herrero and Velasco González (2012) as shown in Fig. 2. The measurement noise needs to be removed if the regression of hydrodynamic derivatives in the manoeuvring model should work well.However, filtering with the EKF also needs an accurate manoeuvring model as the system model.Therefore the accurate manoeuvring model is both the input and output of the parameter estimation.The system model in the EKF is guessed to solve this dilemma.A linear manoeuvring model with hydrodynamic derivatives estimated with semi-empirical formulas is used as the initial guess.Once the regressed manoeuvring model has been obtained, the parameter estimation can be rerun using the regressed manoeuvring model as the system model in the EKF, to obtain an even better manoeuvring model.This procedure can be repeated several times for improved accuracy.Using semi-empirical formulas for the initially guessed manoeuvring model adds prior knowledge about the ship dynamics to the regression.When used with the recursive EKF, this method is an innovation compared to other parameter estimation methods.
The iterative process is composed of two basic steps: (1) First, hydrodynamic derivatives of a predefined format of manoeuvring model are initially guessed.The derivatives are estimated with semi-empirical formulas for a linear manoeuvring model to make an initial guess.The manoeuvring model is used in the EKF and RTS smoother to filter all the model tests.The manoeuvring models are assumed to have Markov property, meaning that future states depend only on the current state.
Then the filtered data with estimated hidden states from all the model tests can be joined into a time-independent dataset passed to the regression.The hydrodynamic derivatives are regressed on quasi-static forces from inverse dynamics giving the identified nonlinear manoeuvring model.
(2) Re-run the iteration in the previous step with EKF that use the identified manoeuvring model from the previous step to replace the guessed system model in the initial stage, such as with AVMM or MAVMM.There should be more trust in this model than in the guessed model, so the covariance matrices should be updated.
An example with simulation results from the steps in the iterative EKF is shown in Fig. 3 In the following section, the methods of inverse dynamics, regression and EKF used in the proposed PIT method, and their connections, are presented in detail.

Model development process
The general aim of developing a manoeuvring model with parameter estimation is to develop a model that can generalize outside the known data.The method presented in this paper is evaluated with the holdout evaluation (Sammut and Webb, 2017) where the data is divided into three sets: training set, validation set and test set as seen in Fig.The purpose with the training set is to train all the candidate models using the proposed parameter estimation method.The validation set is then used to select which one of the candidate models is the best.The training and validation sets are then joined to train the selected model as the final model, to be used in predicting the test set, which is used to evaluate the accuracy of the model.These three sets are not divided randomly, but rather to assess the model's extrapolation ability.The datasets are therefore split to have the smallest: yaw rates, drift-and rudder-angles in the training set, the medium values in the validation set and the largest values in the test set which for instance can be seen in Fig. 8 in the next section.

Inverse dynamics and regression
Each manoeuvring model has some hydrodynamic functions   (, , , , ℎ),   (, , , , ℎ),   (, , , , ℎ) that are defined as polynomials.The hydrodynamic derivatives in these polynomials can be identified with force regression of measured forces and moments.The measured forces and moments are usually taken from captive model tests (CMT), planar motion mechanism (PMM) tests or virtual captive tests (VCT).When the ship is free in all degrees of freedom, as in the present model tests, only motions are recorded however.Hence, forces and moments causing ship motions need to be estimated by solving the inverse dynamics problem.The inverse dynamics is solved by restructuring the system equation (Eq.( 1)) to get the hydrodynamics functions on the left-hand side.If the mass and inertia of the ship including added masses:  u,  v,  ̇,  v and  ̇, are known, the forces in Prime system can be calculated using Eqs.( 24), ( 25) and (26).
An example of forces calculated with inverse dynamics from motions in a turning circle test can be seen in Fig. 5.The forces have been converted to SI units.Finding the hydrodynamic derivatives can be defined as a linear regression problem: The model for the hydrodynamic forces must first be assumed.The label vector  and feature matrix  in the regression problem in Eq. ( 27) can now be inserted.As an example: the labels in the regression of the surge degree of freedom for the MAVMM can be calculated using the inverse dynamics force, expressed with primed units: The feature matrix  is expressed as: The regressed hydrodynamic derivatives are stored in the  vector: The hydrodynamic derivatives in the manoeuvring model are considered Gaussian random variables when conducting the ordinary least squares (OLS) regression.The hydrodynamic derivatives in the manoeuvring model are usually taken as the mean value of each regressed random variable, being the most likely estimate.The regression result can be described with a multivariate Gaussian distribution, defined by the regression's mean values and covariance matrix.Monte Carlo simulations can be conducted with this distribution to study alternative realizations of the regression.
Strong multicollinearity is a known problem for the manoeuvring models (Luo et al., 2016;Wang and Zou, 2018).The thrust coefficient   in the hydrodynamic function   in Eq. ( 9) introduces multicollinearity to the regression.This coefficient can instead be calculated from the thrust deduction factor   : The   coefficient is excluded from the regression by moving it to the left-hand side of the regression equation Eq. ( 27): Rudder coefficients (  ) from   equation Eq. ( 10) such as   ,   etc. have been excluded in the same way by assuming a connection with their   equation counterpart through the rudder lever arm   :

Extended Kalman filter (EKF)
It is possible to do an exact parameter identification on perfect (simulated) data with no noise (see Section 5.1).However, such data from physical experiments does not exist in reality.The measured data will always contain process noise and measurement noise.In order to mitigate this, the data is preprocessed using an Extended Kalman filter (EKF) and Rauch Tung Striebel (RTS) smoother which are both presented below.

The EKF recursive algorithm
EKF is an extension of the Kalman filter (KF) to work on nonlinear systems such as the manoeuvring models.The basic idea is that noise can be disregarded if it does not make sense from a physical point of view.If noisy measurement data were perfectly correct, this would mean that the ship has many vibrations that must have originated from tremendous forces, considering the large mass of the ship.The prior understanding of model tests suggests that these forces are not present during the test.Therefore, the noise should be considered as measurement noise and should be removed.Low-pass filtering is a common way to remove noise, where motions above some cut-off frequencies are regarded as unphysical measurement noise.The problem with low-pass filter is that it is hard to know what cut-off frequency to choose, either too low: removing part of the signal, or too high: keeping some unfiltered measurement noise in the data.The Kalman filter has a system model that continuously estimates the system's state that is run in parallel with the measurement data.The filter estimates the current state as a combination of the measurement data and the system model estimate based on belief in the data and the model.If the data has low noise, the estimate turns toward that data.Conversely, if the model gives very good predictions, then that estimate turns towards the model.
The system's inverse dynamics require the entire states, including positions, velocities, and accelerations, to be known.Only positions are known from the measurements, which means that velocities and accelerations are hidden states that the EKF should estimate.The state transition  (, ) is taken from the manoeuvring model (Eq.( 5)) to use the manoeuvring model as the EKF predictor.The state of the system is observed (measured) with a linear observation model (Eq.( 34)) where  is the measured data  is the observation matrix and  is measurement noise.
The used EKF recursive algorithm used is summarized in the pseudocode below (Brown and Hwang, 1997).
where  is number of states (6 in this case),   is an ⋅ identity matrix.The transition matrix is calculated for each iteration using a Jacobian of the transition model: This part and the fact that the nonlinear transition model is used directly as the predictor are the extension part of the EKF compared to the linear KF.Please note the linear approximation in Eq. ( 35) around the current state.This approximation can cause stability problems if the real system and the linearized system deviates too much, when large time steps are used on a very nonlinear system.The unscented Kalman filter, which was used in Revestido Herrero and Velasco González (2012), is an alternative that can be used in these situations.The output from the filter contains the estimated states: x and estimated state covariance matrix P .x represent the most likely estimates, but the estimates have uncertainty that is expressed in P .The state of the system is described by the ships position, heading, velocities and yaw velocity: The initial state  0 is taken as the mean value of the first five measurements, where the velocities are estimated with numeric differentiation.  selects the measured states ( 0 ,  0 , ): selects the hidden states (, , ): where ℎ is the discrete time step,   describes the covariance matrix of the measurement,   is the covariance matrix of the process model, and  0 is the initial state covariance.Selecting good values for these three matrices is the most complicated part of getting the EKF to work well.The amount of expected measurement noise in the data should be inserted in to   , and the amount of error generated by the process model (manoeuvring model) needs to be estimated in   .The choices for these matrices depend on the reliability of the present data and the present process model.

The Rauch Tung Striebel (RTS) smoother
The EKF is recursive and can be run online, continuously making new estimates as new measurements arrive.The EKF uses passed measurements to estimate states in the near future.This prediction is helpful for online applications such as autopilots or autonomous ships (USVs).This restriction is unnecessary for the parameter estimation on already existing data where a whole time series of existing measurements are available.The fact that both past and future data are known can be used to improve the filter.An EKF filter can include future time steps by adding a smoother after the filter.The parameter estimation uses a Rauch Tung Striebel (RTS) smoother (Rauch et al., 1965), which is an algorithm that runs the EKF backward to also account for future time steps.The EKF and RTS have been run on simulated data with Gaussian noise added to see if the real states can be identified.Results from this can be seen in Fig. 6.This figure shows that the RTS smoother is also needed to get an accurate estimate of the yaw acceleration.

Presentation of case studies
The two case study model test results from the wPCC as shown in Fig. 7 and the well-known KVLCC2 are used to validate the proposed system identification method.The models are developed following the process as described in Section 3.2.Consequently, both test cases aim to predict turning circle maneuvers.The main dimensions of the two case study ship models are listed in Table 3, with explanations in Table 4.The wPCC is a wind-powered car carrier tested at SSPA (Alexandersson, 2022a).This twin screw ship with large rudders has good course stability and symmetric hydrodynamic manoeuvring forces.The KVLCC2 model test data from the Hamburg ship model basin (HSVA) and Maritime Research Institute Netherlands (MARIN) was made available by SIMMAN2008 conference (Stern et al., 2011).This single screw ship is more course unstable than the wPCC test case, and manoeuvring forces are unsymmetrical due to the single propeller.This instability makes it good as the second test case with parameter estimation on an unsymmetrical model.

The wPCC test scenarios
The wPCC test case focuses on predicting forces and moments from the ship hull and rudders.The propeller force is not part of the prediction model but is taken from the model test measurements

The KVLCC2 test scenarios
The proposed method is also validated using the KVLCC2 case study ship model.The propeller is part of the manoeuvring model for this test case, instead of only the hull and rudders, as in the wPCC test case, so that the entire ship can be simulated without additional input.The model development process as described in Section 3.2 is applied for the KVLCC2 as well.Here the training dataset contains various zigzag tests to starboard and port from model tests carried out at HSVA for the SIMMAN2008 conference (Stern et al., 2011), where the ZigZag35/5 test is kept for the validation set.The test set is taken from turning circle model tests carried out at MARIN for the SIMMAN2008 conference (Stern et al., 2011) as seen in Fig. 9.

Results
The results motivating the choices of methods in the proposed parameter estimation are presented below.Result with the inverse dynamics regression is presented in Section 5.1 for one ideal case without measurement noise.A comparison between the proposed preprocessors, EKF and RTS, and alternative low-pass filter is presented in Section 5.2.Results with the parameter estimation for the turning circle test cases are presented for both ships in Section 5.3 and 5.4.Results from the KVLCC2 propeller model is also presented in Section 5.4.1.

Inverse dynamics
The hydrodynamic derivatives within the manoeuvring model can be identified exactly at ideal conditions for the parameter estimation with no measurement noise and a perfect estimator.For example, artificial data from a turning circle test can be simulated by a pre-defined/true manoeuvring model.The hydrodynamic derivatives within the manoeuvring model can be identified with the same values.Results from such a simulation is shown in Fig. 10 where the regression has identified the true values precisely.

Preprocessing
The low-pass filter is a prevalent alternative to preprocessing the model test data, as opposed to the EKF used by the proposed parameter estimation.In order to study which of the filters works best, the proposed parameter estimation has been run on the wPCC model test data with the EKF + RTS smoother replaced by a Low-pass filter instead.The low-pass filter applies a first-order linear digital Butterworth filter twice, once forward and once backward, to get zero phase (Virtanen et al., 2020).Fig. 11 shows the average simulation error  with low-pass filters at various cut-off frequencies for all wPCC model tests.Corresponding error with parameter estimation using EKF + RTS is also shown in the figure.The simulation error for each model test is expressed as Root Mean Square Error  (Eq.( 48)) of the distance between the position from the model test and simulation.
where   is the euclidean distance for each time step between the model test positions ( 0 ,  0 ) and the predicted positions.Even though high accuracy can be obtained using a low-pass filter as the pre-processor, if an optimal cut-off frequency is selected, its accuracy decreases quickly at lower or higher frequencies.With higher cut-off frequencies, too much of the measurement error remains in the data, resulting in poor performance of the OLS regression.In extreme cases, it is like having no filter at all.Using too low of a cut-off frequency removes too much, including parts of the actual signal.The results show that the low-pass filter with a 7 Hz cut-off frequency has the lowest error among the low-pass filters, but EKF + RTS in the parameter estimation has an even lower error, which is why this is used as the preprocessor in the proposed parameter estimation.

The wPCC tests
The LVMM was ruled too simple, so only the AVMM and MAVMM were considered possible manoeuvring models in the cross-validation.Forces and moment predicted for the validation dataset with the manoeuvring models fitted with proposed parameter estimation on the training set are shown in Fig. 12.It can be seen that the fitted AVMM the forces by far.Therefore, simulations of the validation cases are only possible using the MAVMM, which is selected as the suitable manoeuvring model for the wPCC.The simulations are shown for one of the ZigZag20/20 validation cases in Fig. 13.
The over-prediction of forces with the AVMM can be explained by the large problems with multicollinearity that were encountered when applying the parameter estimation method to the wPCC data.The absolute correlation coefficient between the features in the wPCC yaw moment regression are shown in Fig. 14.It can be seen that most of the coefficients have very high absolute correlation (indicated in black).Some of the regressed hydrodynamic derivatives in the AVMM also have a substantial values and large uncertainty.
For the wPCC the prediction was conducted using simulation of the turning circle by the trained MAVMM, and the prediction results are presented in Figs. 15, 16.Monte Carlo simulations with alternative realizations of the regression, considering the uncertainty in the regressed parameters, are also shown in these figures.The alternative realizations have similar simulation results to the model with mean values of the regression (black line).Advance and tactical diameter (IMO, 2002) differs 4% and 1% between prediction simulation and corresponding results from the model tests (Table 6) which are acceptable deviations for the wPCC considering the large margin to the limits of the IMO standard (IMO, 2002).
The mean values and standard error (se) of the hydrodynamic derivatives expressed with prime units for the wPCC obtained with parameter estimation of MAVMM (Eqs.( 12), ( 13), ( 14)) applied on all the wPCC data (including the turning circle) are shown in Table 7.

The KVLCC2 tests
The propeller is part of the manoeuvring model for thr KVLCC2 test case.A propeller prediction model needs to be regressed, based on thrust measurements from the model tests.

The KVLCC2 propeller model
The coefficients of   (Eq.( 20)) were regressed from the KVLCC2 propeller characteristics from SIMMAN2008 HSVA model tests (Stern et al., 2011) ( 0 : 0.32419,  1 : −0.22091,  2 : −0.14905).The Polynomial propeller model was developed with polynomial regression and cross-validation on the training and validation datasets to make the best feature selection.A cross-validation study was carried out on the three candidate propeller models: the MMG propeller model, the simple   Taylor wake  0 = 0.4 was used in all three models, the MMG model used  1 = 2.0,  2 = 1.6   > 0 and  2 = 1.1 when   0 (Yasukawa and Yoshimura, 2015).Fig. 17 shows a small part of the cross-validation.
Table 8 shows coefficients of the polynomial propeller model fitted on the training and validation dataset for KVLCC2.

KVLCC2 manoeuvring model
The LVMM was ruled too simple, for KVLCC2 as well, so only the AVMM and MAVMM were considered possible manoeuvring models in the cross-validation.The forces and moments applied on the hull, rudder, and propeller predicted with the AVMM and MAVMM fitted with the proposed parameter estimation on the training set are shown in Fig. 18.The forces are well predicted with both manoeuvring models.The AVMM is not giving the large over predictions that were seen for wPCC (see Section 5.3).However, the MAVMM is still slightly better and is therefore selected as the suitable manoeuvring model for the KVLCC2.For KVLCC2 comparisons of turning circle advance and tactical diameter compared to the model test result is shown in Table 9. Predicted advance and tactical diameter differ 2% and 5%, which can be considered acceptable, considering the margin to the IMO standard limits, which are also shown in this table.The results are also closer to the model tests than a similar study conducted for the KVLCC2 (He et al., 2022).
The mean values and standard error (se) of the hydrodynamic derivatives expressed with prime units for the KVLCC2 obtained with parameter estimation of MAVMM (Eqs.( 12), ( 13), ( 14)) applied on all the HSVA data are shown in Table 10.

Discussion
Using inverse dynamics in the proposed parameter estimation can find the parameters in a manoeuvring model precisely when there is no measurement noise, and the selected manoeuvring model is a perfect model.This type of result can be seen when identifying parameters in a manoeuvring model on data from simulations with the same manoeuvring model.In order to succeed in system identification on actual model test data, measurement noise as well as model uncertainty need to be handled, and a manoeuvring model as close as possible to longer time steps.In this case, unscented Kalman filter (UKF) can be considered as an alternative.
Multicollinearity was a significant problem with the AVMM for both the wPCC and KVLCC2 data.Consequently, some of the regressed hydrodynamic derivatives in the AVMM have unphysically large values and substantial uncertainties.The model is still mathematically correct, where the regressed polynomials fit the training data well.The regressed polynomial is the sum of large counteracting coefficients.The model works as long as the states are similar to the training data.However, when extrapolating, it is easy to imagine that the balance between these massive derivatives is disturbed, giving significant extrapolation errors very quickly.This behavior was seen when predicting forces and moments with the AVMM on unseen validation data and is a well known problem (ITTC, 2008c).
The MAVMM has fewer hydrodynamic derivatives with lower multicollinearity and minor extrapolation errors.Including propeller thrust in the manoeuvring model made it possible to obtain high accuracy with fewer hydrodynamic derivatives.Another problem with a too complex model is that the standard manoeuvres used in this paper does not follow the aspect of persistence of excitation, so that some of the hydrodynamic derivatives might not be identifiable (Revestido Herrero and Velasco González, 2012).During zigzag tests, the model is for instance exposed to only two rudder angles for a majority of the data.A series of step responses as used in Miller (2021) gives a better excitation, but requires a lot of space, which is possible at lake experiments, but not in a narrow basin.
The close integration with the EKF makes this method very convenient to use in online applications.The hydrodynamic derivatives are however not updated online.The regression needs to be rerun, which is a rapid procedure with the OLS regression.The entire time series history or more recent parts, can be used depending on how much the model should remembered.

Conclusions
This paper presented a new method for system identification of ship manoeuvring dynamics using a new parameter estimation method applied to manoeuvring models.The proposed method includes: • A model development process for robust models with good generalization, where the validation set should have larger yaw rates, drift angles and rudder angles compared to the training set.• A new parameter estimation method which includes: -Preprocess measurement data with EKF + RTS run in iteration with initial guess from semi-empirical formulas.-Inverse dynamics regression It was shown that: • The new method can predict Turning circles with less than 5% error in advance and tactical diameter for the wPCC and KVLCC2 test cases, which should be considered sufficient considering the margin to the corresponding limits in the IMO standard for both ships.
• For the KVLCC2 case with the manoeuvring model trained on zigzag model test data from the towing tank at HSVA, it was possible to reproduce the turning circle model test data from MARIN with reasonable accuracy.This example is one exciting application where the new method can be used to extend the model test from a narrow towing tank to predict turning circles.• The inverse dynamics regression had higher accuracy when the proposed preprocessor was used instead of low-pass filters.
Finally, it is concluded that the proposed method can potentially improve the system identification of ship manoeuvring dynamics.The KVLCC2 test case results with the new method are closer to the model tests compared to a similar study (He et al., 2022).Adding the prior knowledge from semi-empirical formulas as the initial guess into the EKF iteration, adding the thrust model and adopting the complexity of the manoeuvring model by reducing the number of hydrodynamic derivatives are all contributing to the improved performance.Even though the method has been validated by two very different ships, further validations with more ships is needed to strengthen the belief in the method.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Fig. 2 .
Fig. 2. Flow chart over the proposed parameter estimation method.

Fig. 3 .
Fig. 3. Simulation with: initial model, first and second iteration of the parameter estimation. 4

Fig. 5 .
Fig. 5. Example of forces and moments calculated with inverse dynamics on data from a turning circle test.
. The model test data used for modeling is split into training, validation and test datasets, following the model development process as described in Section 3.2.The training dataset contains self-propulsion, pull-out tests, and zigzag10/10 tests to starboard and port.The validation dataset consists of three zigzag20/20 tests and the turning circle test is left for the test set as shown in Fig. 8.If the manoeuvring model built by the proposed method based on a series of model tests including ZigZag10/10, 20/20 to port and starboard as well as self-propulsion and pull out test (IMO, 2002) can predict the turning circle maneuver, then it is a capable model.

Fig. 10 .
Fig. 10.True and regressed hydrodynamic derivatives in MAVMM identified with Inverse dynamics and OLS regression on a simulated turning circle with MAVMM.

Fig. 11 .
Fig. 11.Average simulation error with MAVMM fitted on wPCC model test data using low-pass filters with various cut off frequency or EKF.

Fig. 14 .
Fig. 14.Absolute correlation between the features in the wPCC yaw moment regression of AVMM.

Table 2
Prime system denominators.

Table 3
main dimensions of test case ship models.

Table 4
List of main dimensions symbols.

Table 5
Initial guessed derivatives in linear models (times 1000).

Table 6
wPCC predicted turning circle advance and tactical diameter compared to SSPA model tests and IMO limit.
Comparison between predicted Turning circle test with MAVMM trained on HSVA data and MARIN model test results for KVLCC2.Comparison between predicted Turning circle test with MAVMM trained on HSVA data and MARIN model test results for KVLCC2.
the real system should be used.The proposed parameter estimation method requires that the model test data is preprocessed to remove measurement noises.The proposed iterative EKF and RTS smoothers gives higher accuracy and avoids finding the optimal cut-off frequency for using a low-pass filter.The linearization in the EKF did not cause any stability problems, with the high frequency model test data used (100 Hz), which can be a problem for more sparse time series, with Fig. 21.Fig. 23.The prediction error (prediction-model test) for Turning circle test with MAVMM trained on HSVA data and MARIN model test results for KVLCC2.