Gray- and Black-Box Modeling of Ships and Wave 2 Energy Converters Based on Bayesian Regression 3

: Establishing an accurate mathematical model is the foundation of simulating the motion of marine vehicles and structures, and it is the basis of modeling-based control design. System identification from observed input-output data is a practical and powerful method. However, for modeling objects with different characteristics and known information, a single modeling framework can hardly meet the requirements of model establishment. Moreover, there are some challenges in system identification, such as parameter drift and overfitting. In this work, three 18 robust methods are proposed for generating ocean hydrodynamic models based on Bayesian regression. Two Bayesian techniques, semi-conjugate linear regression and noisy input Gaussian 20 process regression, are used for parametric and nonparametric gray-box modeling and black-box 21 modeling. The experimental free-running tests of the KVLCC2 ship model and a multi-freedom 22 wave energy converter (WEC) are used to validate the proposed Bayesian models. The results demonstrate that the proposed schemes for system identification of the ship and WEC have good generalization ability and robustness. Finally, the developed modeling methods are evaluated 25 considering the aspects required conditions, operating characteristics and prediction accuracy.

depth. In the study of WEC [26], an observer -based unknown input estimator is used to estimate the 85 wave excitation force, then a Gaussian Process (GP) is adopted to forecast the wave excitation force.

86
On the one hand, the nonparametric gray-box model directly substitutes the information of the object 87 itself. On the other hand, compared with linear expansion, it can better fit the hydrodynamic force.

88
Therefore, this method is worth studying and comparing with the experimental data of more devices.

89
Recently, Bayesian regression has been successful applied in multiple fields for parameter 90 estimation and black-box modeling. Bayesian methods have significant advantages in modeling with 91 good statistical properties, predictions for missing data and forecasting [35][36][37]

124
(degree of freedom) DOF, the notation of motion variables is shown in Table 1.

142
Bayes theorem treats and 2 as random variables belonging to some probability distributions.

143
Generally, the Bayesian analysis process updates the probability density function (PDF) of the where is the mean value ( × 1 vector), is the × diagonal matrix in which each element where is an × matrix of training data and ( ) is given by Since and 2 are mutually influential, their posterior distributions are not analytically tractable.
proposed to solve this problem. In the present work, the Gibbs sampler [45] is applied to approximate the posterior of and 2 . The Gibbs sampler is an iterative algorithm that constructs a dependent 164 sequence of parameter values whose distribution converges to the target joint posterior distribution.

165
The values of parameters are the mean of the posterior of .

166
In multivariate linear regression, introducing the L 2 -norm into the algorithm to overcome the We can use a first order Taylor series expansion of the GP latent function , , to write an approximation to Equation (19) as, Note that the expansion can be expanded to higher terms. However, these higher term calculations where the notation " " results in a diagonal matrix.

209
In this way, the input is treated as deterministic and a correction term, The solution to estimating the hyperparameters is a two-step approach. First, we evaluate a regular 218 GP without any input noise. Then, we calculate the derivatives and use them to approximate the 219 posterior distribution. The marginal likelihood of the GP wit h corrected variance is then computed.

220
We can cycle this process until the convergence; this step involves chaining the derivatives of the   The essence of the parametric gray-box modeling is to construct a simplified parameterized 233 equation to replace Equation (1). The nondimensional rigid-body kinetics using the Prime system of 234 surface ship 3 DOF maneuvering motion is given as follows: where denotes the ship mass; is the longitudinal coordinate of the ship's center of gravity in 236 the body-fixed coordinate frame; denotes the moments of inertia of the ship about the z 0 axes; 237 ̇ , ̇ , ̇ , ̇ and ̇ are acceleration derivatives which can be determined using potential 238 theory; and 1 2 and 3 are forces and moment disturbing quantity at x 0 -axis, y 0 -axis and z 0 -239 axis respectively. Note that the superscript " ′ " indicates that the corresponding variable is 240 normalized using the Prime-system.

241
The selection of a mathematical model for identification is a trade-off between model complexity where the hydrodynamic derivatives and speed state variables in Equation (28)

260
Output response: where = √ 2 + 2 is the resultant speed in the horizontal plane and △ is the time sample.

262
The procedure of the parametric gray-box modeling and motion prediction using ScBR is briefly    Table 2.

302
the 30°/5° and 15°/5° zigzag tests are predicted. Fig. 5 and Fig. 6 show the prediction results of each 303 method, and the root mean square error (RMSE) is adopted to analyze the prediction performance of 304 these methods, which is shown in

310
From the perspective of the modeling framework, the prediction results of gray-box modeling are 311 better than those of black-box modeling in 30°/5° zigzag maneuvers, but worse in 15°/5° zigzag tests.

312
The main reason is that the training data of gray-box modeling only contains 35°/5° movement, which 313 is closer to the 30°/5° zigzag validation test. For the prediction time, parametric gray-box modeling is 314 significantly faster than black-box modeling because the calculation process of parametric gray-box 315 modeling is entirely linear. Because it considers the input noise and variance in the calculation 316 process, NIGP spends more time on the prediction than SVM. Note that the black-box modeling 317 usually requires more training data to enhance generalization ability than parametric gray-box 318 modeling, because the specified framework of the parametric gray-box model already contains some 319 information about the system. In a similar study [24], four groups of ship maneuver datasets a re used 320 for training black-box models while one group dataset is used for parameter estimation.
Different from the parametric model in Equation (28), the force and moment on the right side of 332 the equation are not fitted by the method of multiplying the hydrodynamic coefficient and the speed.

333
In this case, NIGP is adopted to perform nonlinear regression between forces, speed and other The process of nonparametric gray-box modeling and motion prediction using NIGP is depicted in The detailed process of the black-box modeling of the WEC using NIGP is shown in Fig. 8.  Table 6. Table 6 demonstrates that the black-box model 379 based on NIGP is the most accurate identification method for WEC buoy.