# Nonlinear Response Prediction of Spar Platform in Deep Water Using an Artificial Neural Network
## 2 Materials and Methods
### Artificial Neural Network  
An ANN was employed to develop models to predict the response of the spar platform. The reaction of the spar platform was anticipated using the ANN model, and the wave period and height were obtained. Prior to that, the wave period and height were anticipated by means of forecasting the wind speed and the ANN model. The ANN model was developed in this study considering a nonlinear autoregressive network model (NARX) to predict the wave period and wave height. The NARX is a dynamic recurrent neural network model with many layers involving feedback connections. The NARX model can be expressed mathematically as follows:  
\[y(t)=F(x(t-1),x(t-2),\ldots,x(t-n),y(t-1),y(t-2),\ldots,y(t-n)) \tag{1}\]  
where \(F(. )\) is the nonlinear function assessed by a multi-layer perceptron, \(x(t-n)\) and \(y(t-n)\) are the input and output of the network at the time \((t-n)\), respectively, and \(n\) is the input delay. The trained network can predict output \(y(t)\) based on the input values. The NARX network contains five neurons in the hidden layer with an activation function and two-step delays for both the input and the output. The Levenberg-Marquardt backpropagation [24; 25] algorithm helps to obtain the minimum mean square error (MSE) between the target and output by adjusting the weights and bias. In total, 1460 data samples were collected, of which 992 were used for training, 234 were used for validation, and 234 were used for testing. The NARX network was trained and predicted the wave height and wave period from randomly selected wind forces. The obtained wave height and wave period, along with the geometrical and mechanical properties (Table 1) and hydrodynamic properties (Table 2), were used as inputs for the response prediction of the spar platform using an ANN. A feed-forward backpropagation neural network was used to develop the ANN model for the prediction responses such as the heave, surge, and pitch of spar hulls and the top tension of the mooring line. The ANN architecture primarily consists of input, output, and hidden layers. The ANN architecture may be expressed mathematically as  
\[y_{j}(t)=\varphi\big{(}x_{i}(t)\ W_{ij}+b\big{)} \tag{2}\]  
where \(x_{i}(t)\) is the value of the input at time \(t\); \(i\) is the number of inputs; \(y_{j}(t)\) is the value of the output, which consists of responses at time \(t\); \(j\) is the number of output data; \(W_{ij}\) is the weight that is multiplied with the input; \(b\) is the bias; and \(\varphi\) is the activation function. The activation function can be utilized via a hyperbolic tangent sigmoid transfer function that can be expressed as  
\[\varphi(x)=\tan sig(n)=\frac{2}{1+e^{-2n}}-1 \tag{3}\]  
The hidden layer contains 20 neurons with a transfer function in the ANN and the output layer with a purely linear function type of activation function. When the ANN results differed from the anticipated output response, the Levenberg-Marquardt backpropagation was employed to reduce error. The weights were determined using the gradient optimization method, and the ANN network was created using the trial-and-error method. The effectiveness and efficiency of the network were then measured using MSE.