Time-series forecasting of ships maneuvering in waves via dynamic mode decomposition

A data-driven and equation-free approach is proposed and discussed to forecast responses of ships maneuvering in waves, based on the dynamic mode decomposition (DMD). DMD is a dimensionality-reduction/reduced-order modeling method, which provides a linear ﬁnite-dimensional representation of a possibly nonlinear system dynamics by means of a set of modes with associated oscillation frequencies and decay/growth rates. This linear representation is entirely derived from available data and does not require the knowledge of the underlying system equations, which are and remain unknown. Based on the linear representation, DMD allows for short-term future estimates of the system state, which can be used for real-time prediction and control. Here, the objective of the DMD is the analysis and forecast of the trajectories/motions/forces of ships operating in waves, offering a complementary efﬁcient method to equation-based system identiﬁcation approaches. Results are presented for the course keeping of a free-running naval destroyer (5415M) in irregular stern-quartering waves and for the free-running KRISO Container Ship performing a turning circle in regular waves. Results are overall promising and show how DMD is able to identify the most important modes and forecast the system state with reasonable accuracy upto two wave encounter periods.


Introduction
To ensure the safety of structures, payload, and crew in adverse weather conditions, ships must have good seakeeping, maneuverability, and structural performance. In this regard, commercial and military ships must meet International Maritime Organization (IMO) Guidelines and NATO Standardization Agreements (STANAG). The prediction capability of ship performance in waves, along with the understanding of the physics involved, is of utmost importance. Recent NATO Science and Technology Organization (STO) Applied Vehicle Technology (AVT) task groups, such as AVT-280 "Evaluation of Prediction Methods for Ship Performance in Heavy Weather" (2017-2019) and AVT-348 "Assessment of Experiments and Prediction Methods for Naval Ships Maneuvering in Waves" (2021-2023) have focused on prediction methods for ship seakeeping and maneuvering in waves, respectively.
Recent computational and experimental fluid dynamics studies have demonstrated the maturity of computational tools for the prediction of ship performance in waves, including their assessment in extreme sea conditions (van Walree et al. 2020;Serani et al. 2021). The computational cost associated with the analysis is generally very high, especially if statistical convergence of relevant estimators is sought after and complex hydro-structural problems are investigated via high-fidelity solvers (Diez et al. 2020). In this context, machine learning and reduced-order models can help reducing the computational cost providing fast estimates, as long as they are properly trained and/or calibrated. Certainly, a proper trade-off between the computational cost associated to model training and the computational benefit of executing the desired analysis with machine learning and/or reduced-order models needs to be assessed and identified on a case-bycase basis. Generally, models are trained with a relatively small number of simulations (considering for instance steady and/or dynamic but prescribed motions and maneuvers at given conditions). Once trained, reduced-order models may be used to assess more complex maneuvers, for longer observation periods, including stochastic conditions and significant statistical analyses where appropriate). In addition, the ability of these models to learn from data makes them suitable for use in digital twins platforms. Finally, reducedorder models are generally easier to interpret than machine learning approaches and could help shedding light on the physics involved.
The objective of the present work is to present and discuss a proof-of-concept study on the use of a data-driven and equation-free approach to the forecasting of ships maneuvering in waves, based on the dynamic mode decomposition (DMD). DMD is a dimensionality-reduction/reduced-order modeling method, which provides a set of modes with associated oscillation frequencies and decay/growth rates (Schmid 2010). For linear systems, these modes/frequencies correspond to the linear normal modes/frequencies of the system. More generally, DMD modes/frequencies approximate eigenmodes and eigenvalues of the infinite-dimensional linear Koopman operator, providing a linear finite-dimensional representation of the (possibly nonlinear) system dynamics (Kutz et al. 2016b). This linear representation is entirely derived from available data and does not require the knowledge of the underlying system equations, which are and remain unknown. DMD growing success, especially in the fluid dynamics community (e.g., Rowley et al. 2009;Dogan et al. 2020), is due to this equation-free and data-driven nature. The method is capable of providing accurate assessments of the spatio-temporal coherent structures in complex flows and systems (e.g., Magionesi et al. 2018;Pagliaroli et al. 2022), also allowing short-term future estimates of the system state, which can be used for real-time prediction and control (Kutz et al. 2016a). Furthermore, DMD may serve as an effective model-order reduction methodology in shape optimization studies to speedup the simulation-driven optimization process (Tezzele et al. 2018(Tezzele et al. , 2019. In the present work, the objective of the DMD is the analysis and forecast of the finite-dimensional set of trajectory/motion/force time histories of ships operating in waves, offering a complementary efficient method to equation-based system identification approaches, e.g., Araki et al. (2012Araki et al. ( , 2019. The efficiency of the method in this context stems from the finite dimensionality of the set of relevant state variables together with the simplicity of operations required to model the system dynamics (as opposed to more data/resourceconsuming machine learning approaches). This offers oppor-tunity for integration into digital twin platforms for the data-driven modeling and prediction of ships in waves.
Results are presented for the course keeping of a freerunning naval destroyer (5415M) in irregular stern-quartering waves at target Fr = 0.33 and sea state 7, using URANS (unsteady Reynolds-averaged Navier-Stokes) computations from Serani et al. (2021). Results are also presented for the free-running KRISO Container Ship (KCS), using experimental data from the University of Iowa IIHR wave basin, focusing on starboard turning circle with rudder angle of 35 • , target Froude number Fr = 0.157 in regular waves with λ/L = 1 (wavelength to ship-length ratio) and H /λ = 1/60 (wave-height to wavelength ratio). The present research is conducted in collaboration with NATO AVT-348 "Assessment of Experiments and Prediction Methods for Naval Ships Maneuvering in Waves", and AVT-351 "Enhanced Computational Performance and Stability and Control Prediction for NATO Military Vehicles".

Dynamic mode decomposition
The DMD formulation and nomenclature is taken from Kutz et al. (2016a). Specifically, consider a dynamical system described as where x(t) ∈ R n represents the system state at time t, α contains the parameters of the system, and f(·) represents its dynamics. The state x is generally large, with n 1 and can represent, for instance, the discretization of partial differential equations at a number of discrete spatial points, or multi-channel/multi-variable time series.
Considering f(x, t; α) as unknown, the DMD works with an equation-free perspective. Thus, only the system measurements are used to approximate the system dynamics and forecast the future states. Equation 1 is approximated by the DMD as a (time) locally linear dynamical system defined as with solution where ϕ k and μ k are, respectively, the eigenvectors and the eigenvalues of the matrix A; q k are the time-varying modal coordinates, and b k are the modal coordinates associated to the initial condition x 0 , i.e., b = Φ −1 x 0 . It may be noted how, clearly, the DMD is based on an equation, namely Eq.
2. Nevertheless, the latter does not need the knowledge of nor use by any means the underlying true system equations, which are and remain unknown. DMD is based on the (time) locally linear dynamical system approximation of Eq. (2), which is derived entirely from the available data, as explained in the following, see Eq. (6). For this reason, DMD may be rightfully seen as an equation-free and data-driven approach.
Sampling the system every t, the time-discrete state can be expressed as x k = x(k t) with k = 1, . . . , m, representing from now on known system measurements. An equivalent discrete-time representation of the system in Eq. (2) can be written as Arranging all the m system measurements in the following two matrices the matrix A in Eq. (4) can be constructed using the following approximation: where X † is the Moore-Penrose pseudoinverse of X, which minimize X − AX F , where · F is the Frobenius norm. The state-variable evolution in time can be approximated by the following modal expansion (as per Eq. 3): where the φ k are the eigenvectors of the approximated matrix A, ω k = ln(λ k )/ t with λ k eigenvalues of the same matrix (Kutz et al. 2016a).
In general, the DMD can be viewed as a method to compute the eigenvalues and eigenvectors (modes) of a finitedimensional linear model that approximates the infinitedimensional linear Koopman operator (Kutz et al. 2016a), also known as the composition operator. Here, the DMD is applied to inherently finite-dimensional data, i.e., ship trajectories/motions/forces in waves, similarly to DMD applications to power grid load data (Dylewsky et al. 2022;Mohan et al. 2018), financial trading strategies (Mann and Kutz 2016), sales data (Vasconcelos Filho and dos Santos 2019), and neural recordings ). Furthermore, due to the low dimensionality of data in the current context, Eq. (6) is computed directly, without the need of performing the singular value decomposition of X and projecting onto proper orthogonal decomposition modes (Kutz et al. 2016a).

Test cases and DMD setup
This section describes the test cases used for demonstration and the DMD setup. It is worth noting that, although the DMD is not a machine learning method in the strict sense, its data-driven nature allows for approaching DMD in a similar way to machine learning. Here the matrix A is constructed using observed (past) time histories, which are used as training set. The DMD is then used for the short-term prediction of trajectory/motion/force time histories, which are compared against true observed (future) data used as test set. As comparison metrics, the average normalized mean square error (NMSE) is used. The mean square of the modal coordinates q 2 k is used as a metrics for modal participation.

Course keeping of the 5415M in irregular waves
The hull form under investigation is the MARIN model 7967 which is equivalent to 5415M, used as test case for the NATO AVT-280 "Evaluation of Prediction Methods for Ship Performance in Heavy Weather" (van Walree et al. 2020). The full-scale ship is assumed L = 142 m long (length between perpendiculars). The model is self-propelled and kept on course by a proportional-derivative controller actuating the rudder angle. Course-keeping computations are based on the URANS code CFDShip-Iowa V4.5 (Huang et al. 2008). CFD simulations are performed with propeller revolutions per minute fixed to the self-propulsion point of the model for the nominal speed, corresponding to Fr = 0.33. The simulations are conducted in irregular long crested waves (following a JON-SWAP spectrum), with nominal peak period T p = 9.2 s and wave heading of 300 • (see Fig. 1). The nominal significant wave height is equal to 7 m, corresponding to sea state 7 (high), according to the World Meteorological Organization definition. It may be noted that the simulation conditions are close to a resonance condition for the roll. The six degrees of freedom rigid body equations of motion are solved to calculate linear and angular motions of the ship. A simplified body-force model is used for the propeller, which prescribes axisymmetric body force with axial and tangential components. The total number of grid points is about 45M. Further details can be found in Serani et al. (2021) and van Walree et al. (2020) where also potential flow computations and experimental data are presented and discussed.
The state variables used for DMD are the ship six degrees of freedom (surge, sway, heave, roll, pitch, yaw; ship motions in the carriage coordinate system, projected onto the ship axes) plus the rudder angle. In addition, first and second time derivatives of all variables are included in the data set, computed by a fourth-order finite difference scheme (therefore n = 21). The use of derivatives enables a better description of the system dynamics and defines a higher dimensional space potentially more amenable to an accurate linear representation of the nonlinear system dynamics. All variables are standardized, i.e., translated and scaled to have zero mean and unit variance. The matrix A is built using about five encounter waves (corresponding to 1766 time steps). The prediction and test sets span the same length. Finally, the prediction is built using all modes/frequencies, leaving reduced-order studies to future research.

Turning circle of the KCS in regular waves
The second test case is the starboard turning circle of the freerunning KCS in regular waves with constant rudder angle of 35 • . Data are taken from experiments conducted at the IIHR wave basin, which is shown in Fig. 1 and whose characteristics are given in Sanada et al. (2021). The model length is L = 2.7 m and the nominal speed corresponds to Fr = 0.157. The propeller RPM are fixed and provide the nominal speed in calm water. The regular wave parameters are λ/L = 1 and H /λ = 1/60.
The state variables used for DMD are the x, y, and z coordinates (Earth-coordinate system) of a reference point placed amidships, pitch and roll motions, turning rate, u, v, and w component of the ship velocity (projected onto the ship axes), rudder angle, propeller thrust, and torque. As in the previous test case, first and second time derivatives are included in the data set (n = 36) and all variables are standardized. The matrix A is built using about four encounter waves (corresponding to 132 time steps), while the prediction and test sets span the same length. Predictions are built using all modes/frequencies.

Results
The following subsections describe the DMD results for the test cases, discussing the DMD analysis of the system dynamics (including complex modal frequencies, modal participation, and most energetic modes) and the future prediction of the system state. Figure 2 presents the DMD results for the system dynamics. Specifically, the left figure shows the complex modal frequencies provided by DMD. For the sake of clarity of representation, only a subset with the most energetic frequencies is depicted. For the same subset, the center figure shows the modal participation as a function of the frequency imaginary part. Finally, the right figure presents the magnitude of components for the two most energetic couples of complexconjugate modes, where for the sake of clarity and simplicity derivatives are not shown. It may be noted how the dynamic is dominated by one couple only (see Fig. 2 center, namely represented by the modes k = 6, 7). This couple presents a frequency close to the roll resonance frequency (see, e.g., van Walree et al. 2020) and mainly involves roll, pitch, yaw, rudder, and to a lesser extent heave (see blue line in Fig. 2, right). The second couple is significantly less energetic and has a smaller frequency (slower dynamics). It mainly involves pla-  . 2 DMD complex modal frequencies, modal participation, and two most energetic modes (from left to right, respectively) for the 5415M test case nar motion variables, i.e., surge, sway, yaw, and to a lesser extent rudder (see black line in Fig. 2, right). It is worth noting that here frequencies and eigenvectors are ordered by the absolute value of the complex frequency imaginary part, in ascending order. Alternatively, frequencies and eigenvectors may be ordered by their modal participation or energy, in descending order, which is a natural choice if model-order reduction is sought after. This is not needed here as a fullorder expansion is used.

5415M course keeping in irregular waves
The short-term prediction of the system dynamics by DMD is shown in Fig. 3. The observed (past) time histories are depicted in black, the predicted (future) time histories are in blue, while the true observed (future) time histories are presented with a dashed black line. All variables are shown in their standardized form and time values are normalized with the average encounter period. The NMSE of the prediction is shown at the bottom in red. Roll, pitch, and rudder present the most accurate prediction, whereas sway is found the most difficult variables to forecast. On average, variables are reasonably predicted upto two encounter periods. After, the prediction becomes less accurate especially for sway and yaw. Figure 4 presents the results of the DMD of the system dynamics. Again, the left figure shows the complex modal frequencies provided by DMD. As in the previous case and for the sake of clarity of representation, only a subset with the most energetic frequencies is depicted. For the same subset, the center figure shows the modal participation as a function of the frequency (imaginary part), while the right figure presents the two most energetic couples of complex-conjugate modes (magnitude of components shown; derivatives not shown). It may be noted how the dynamic is dominated by one mode with zero frequency  (see Fig. 4 center; the real part, not shown, is also zero), setting an offset for the data. The first most energetic couple of complex-conjugate modes (k = 2, 3) correspond to a quite slow dynamics and mainly involves trajectory and planar motion variables, i.e., x, y, v and to a lesser extent z, rate of turn, and u. The second couple presents a larger frequency (faster dynamics, due to the waves). It mainly involves z, roll, pitch, rate of turn, u, v, w, thrust, and torque. It may be noted how the rudder does not participate in these dynamics, which may appear unexpected: in this demonstration, the rudder is kept fixed at 35 • . Certainly, the ship dynamics depends on the rudder angle, but here the rudder is fixed (see the rudder time history in Fig. 5) and therefore no rudder dynamics is observed. The same considerations made for frequencies/eigenvectors order of the 5415M apply here. Figure 5 shows the results of the DMD in producing the short-term prediction of the system dynamics, where the observed (past) time histories are depicted in black, the predicted (future) time histories in blue, the true observed (future) time histories are presented with a dashed black line. All variables are standardized and time values are normalized with the average encounter period. The NMSE of the prediction is shown at the bottom in red. The trajectory (x and y) is very well predicted, also due to its slow dynamics. Pitch, u, thrust, and torque presents a faster dynamics (due to the waves) and are also reasonably predicted. Roll, turning rate, and v are found the most difficult variables to forecast. Also in this case, variables are reasonably predicted upto two encounter periods. After, the prediction becomes overall less accurate.

Conclusions and future work
A proof-of-concept study on the use of a data-driven and equation-free approach to forecast responses of ships maneuvering in waves was presented and discussed, based on the dynamic mode decomposition of ship trajectory/motion/force time histories. The DMD provides a data-driven and equationfree approach to the linear representation of the system dynamics, allowing for (a) extracting knowledge on the system dynamics and (b) forecasting the system state in the near future. Results were shown for course keeping data of the self-propelled 5415M in irregular waves and turning-circle data of the self-propelled KCS in regular waves. Time histories were provided by CFD and EFD for 5415M and KCS, respectively.
Results are overall promising. The analysis is very efficient and suitable for real-time predictions. The DMD model is able to extract the most important modes and forecast with reasonable accuracy the system state upto two wave encounter periods. After this time horizon, the prediction is no longer accurate and the methodology needs improvements. The system nonlinearity plays certainly an important role in the DMD capability of predicting longer time horizons. Moreover, the overall analysis setup (such as the number of observed input waves and the number of time derivatives included in the data matrix) is also deemed to affect the DMD forecasting capabilities, thus requiring deeper investigations.
For these reasons, future research directions include systematic studies of observed data size, time step, and time-derivative order along with the most effective choice of the variable set and possibly coordinate systems, including whenever appropriate dimensional analysis (Dogan et al. 2020). Ongoing work is focusing on the statistical assessment of DMD performance using multiple time series, studying the effects of the number of input/output waves, time steps, derivatives, along with the use of time-shifted copies of the available data, i.e. using the Hankel matrix (Vasconcelos Filho and dos Santos 2019) of the time histories. The assessment is performed considering several performance metrics, such as the normalized root mean squared error, the Pearson correlation coefficient, the average angle measure (Hess et al. 2006), and the normalized average minimum/maximum absolute error (Diez et al. 2022). Parametric analysis of the DMD forecasting capabilities conditional to operating and environmental conditions is also of interest and will be assessed within the activity of the NATO AVT-348.
Methodological advancements that are expected to provide benefits include DMD with control ), DMD with time delay embedding (Kamb et al. 2020), and multi-resolution DMD (Kutz et al. 2016b). Finally, the combination of DMD with artificial neural network approaches (D'Agostino et al. 2021) is expected to overcome some of the limitations of the DMD (i.e., its linearity) providing more flexible architectures (Diez et al. 2022) to address highlynonlinear system dynamics.

Conflict of interest
The authors declare that they have no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecomm ons.org/licenses/by/4.0/. Publisher's Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.