*5.1. Neural Network Design*

The first step to design a good neural network is to identify the number of hidden layers. A three layers neural network, which contains only one hidden layer, can simulate any reflection from n-dimensional inputs to m-dimensional outputs. Hence, a three-layer neural network with one hidden layer is selected in this study. Next, the nodes of each layer need to be identified. In this study, six key variables are selected, so the number of nodes in input layer is six. Only one parameter, capture power, needs to be predicted, so the number of nodes in output layer is one. Finally, the number of nodes in hidden layer needs to be identified. There is an empirical formula [38] that can be referred to identify the number of hidden nodes.

$$l = \sqrt{n+m} + a \tag{27}$$

where *l*, *n*, and *m* are the number of nodes in hidden layer, input layer, and output layer, respectively; *a* is an adjustment constant ranging from 1 to 10.

In this paper, the number of hidden nodes is tested from 3 to 12 to identify the most suitable value. MSE is used to elevate the performance, and the results are shown in Table 1.

**Table 1.** The number of hidden nodes and the values of MSE.


MSE reaches a minimum when the number of hidden nodes is 4, which is the optimal value for this case. The final BP neural network structure designed in this paper is shown in Figure 7.

**Figure 7.** Structure of the designed BP neural network.

According to the structure, the output *bj* of input layer can be expressed as follows:

$$b\_{\dot{j}} = f\_1(\sum\_{i=1}^{6} w\_{i\dot{j}} \mathbf{x}\_i + \theta\_{\dot{j}}), \; j = 1, 2, 3, 4 \tag{28}$$

where *wij* is the weight from the input layer to the hidden layer; *xi* is the input variable; *θ<sup>j</sup>* is the threshold value of the hidden layer. The output *y* of the BP neural network is

$$y = f\_2(\sum\_{j=1}^4 w\_j b\_j + \theta'), \ j = 1, 2, 3, 4 \tag{29}$$

where *wj* is the weight from the hidden layer to the output layer; *θ'* is the threshold value of the output layer.

#### *5.2. Data Standardization and Neural Network Training*

Before training, data standardization for individual features needs to be conducted to improve training speed. The standardization formula used in this paper is

$$\mathbf{x} = \frac{\mathbf{x}\_i - \mathbf{x}\_{\text{min}}}{\mathbf{x}\_{\text{max}} - \mathbf{x}\_{\text{min}}} \tag{30}$$

where *x* is the standardized result; *x*max and *x*min are the maximum and minimum values in the dataset, respectively. The standardized data have a distribution range between 0 and 1.

The network training process is to adjust the weights and thresholds so that the value of loss function reduces to a minimum. The training parameters for this model are shown in Table 2.



Tangent sigmoid function (*tansig*) is adopted for the hidden layer, and the linear function (*purelin*) is adopted for the output layer. In the training process, mean squared error is used as loss function. It is defined as

$$MSE = \frac{1}{m} \sum\_{i=1}^{m} (\mathcal{Y} - \mathcal{Y})^2 \tag{31}$$

where *m* is the number of samples; *y*ˆ is the observed value; *y* is the real value. In this paper, the top 80 samples are defined as training set. This model is trained in MATLAB R2019a, and the trendline of MSE for training set is shown as Figure 8.

**Figure 8.** The trendline of training loss versus epochs.

The training process is terminated at 234 epochs because the gradient reaches the minimum (10−7). The rest 20 samples are used to test, and the forecasting results after being de-standardized are shown in the next section.

#### **6. Results and Discussion**

In this section, six groups' forecasting data (ω = 0.53 rad/s, ω = 0.81 rad/s, ω = 1.14 rad/s, ω = 1.42 rad/s, ω = 1.76 rad/s, and ω = 2.09 rad/s) is given because they are the most common wave frequency. The desired outputs and forecasting results are presented in Figure 9 under different frequency. For each sample, the output power at 52 frequency points can be predicted.

In Figure 9a, the deviation of five samples (85, 90, 94, 99, and 100), which are at the lowest position of the graph, are relatively large, with mean error about 60 W. In Figure 9c, the error of sample 81 is the largest, with approximately 500 W. The forecasting results of sample 95 and 96 are rather larger than desired outputs in Figure 9d,f, and the error of sample 89 is around 200 W in Figure 9f. The highest accuracy is at ω = 0.81 rad/s and almost all the forecasting points fit the desired points. In contrast, the worst result is at ω = 2.09 rad/s and there are five forecasting results deviating the desired outputs.

**Figure 9.** Comparisons between desired outputs and forecasting results. (**a**) ω = 0.53 rad/s; (**b**) ω = 0.81 rad/s; (**c**) ω = 1.14 rad/s; (**d**) ω = 1.42 rad/s; (**e**) ω = 1.76 rad/s; (**f**) ω = 2.09 rad/s.

To further verify the accuracy of the BP model, correlation coefficient (CC), root mean square error (RMSE), and error percentage are introduced in this section. They are defined as follows [29]

$$\text{CC} = \frac{\sum\_{i=1}^{m} \left(t\_i - \overline{t}\right) \left(y\_i - \overline{y}\right)}{\sqrt{\sum\_{i=1}^{m} \left(t\_i - \overline{t}\right)^2 \sum\_{i=1}^{m} \left(y\_i - \overline{y}\right)^2}} \tag{32}$$

$$RMSE = \sqrt{\frac{1}{m} \sum\_{i=1}^{m} \left(t\_i - y\_i\right)^2} \tag{33}$$

$$e = \frac{1}{m} \sum\_{i=1}^{m} \left| \frac{y\_i - t\_i}{t\_i} \right| \tag{34}$$

where *m* is the number of forecasting results; *ti* is the desired value; *yi* is the output of the network; *t* and *y* are average values of desired and forecasting results, respectively. The significance analysis of ANOVA is also conducted in MATLAB R2019a, and the statistical parameters (after de-standardization) are listed in Table 3.

**Table 3.** The statistical parameters between desired and forecasting results.


The values of CC are greater than 0.9, meaning that the correlations with each group are well fitted. The values of RMSE do not exceed 140 W, and the error percentage is no more than 4%, indicating that desired outputs and forecasting results are reasonably fitted. All P values are close to 1, which means there is no significant difference between desired and forecasting outputs. These validation factors indicate that this model has a good prediction accuracy and meets the engineering requirement.

#### **7. Conclusions**

In this paper, capture power predictions of a specific shape floating body are attempted based on mathematical model, ANSYS-AQWA simulations, and BP neural network. The key variables are identified and the simulation scheme is proposed. A sample database is built by LHS and the corresponding power of each sample is calculated. In the end, a BP neural network, of which training set is from simulation results, is designed to predict the capture power at different wave frequency. Its performance and accuracy are also evaluated through statistical parameters.

According to the results, the conclusions can be given as follows:


**Author Contributions:** Methodology, W.W.; Software, F.B.; Validation, W.W. and F.B.; Formal analysis, W.W.; Investigation, Y.L.; Resources, Y.L. and G.X.; Writing—original draft preparation, W.W.; Writing—review and editing, G.X.; Funding acquisition, Y.L. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by the Joint Research Fund under cooperative agreement between the National Natural Science Foundation of China and Shandong Provincial People's Government (grant number U1706230), Shandong Province Major Science and Technology Innovation Project (grant number 2018CXGC0104), Marine Renewable Energy Fund Project (grant number GHME2017YY01), and National Key Research and Development Plan (2017YFE0115000).

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Acknowledgments:** The authors gratefully acknowledge the financial support from the Joint Research Fund under cooperative agreement between the National Natural Science Foundation of China and Shandong Provincial People's Government (grant number U1706230), Shandong Province Major Science and Technology Innovation Project (grant number 2018CXGC0104), Marine Renewable Energy Fund Project (grant number GHME2017YY01), and National Key Research and Development Plan (2017YFE0115000).

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **Appendix A**


**Table A1.** Details of 100 sample points.

**Table A1.** *Cont.*



**Table A1.** *Cont.*

#### **References**

