Wave Parameters Prediction for Wave Energy Converter Site using Long Short-Term Memory

—Forecasting the behaviour of various wave parameters is crucial for the safety of maritime operations as well as for optimal operations of wave energy converter (WEC) sites. For coastal WEC sites, the wave parameters of interest are significant wave height (H s ) and peak wave period (T p ). Numerical and statistical modeling, along with machine and deep learning models, have been applied to predict these parameters for the short and long-term future. For near-future prediction of H s and T p , this study investigates the possibility of optimally training a Long Short-Term Memory (LSTM) model on historical values of H s and T p only. Additionally, the study investigates the minimum amount of training data required to predict these parameters with acceptable accuracy. The Root Mean Square Error (RMSE) measure is used to evaluate the prediction ability of the model. As a result, it is identified that LSTM can effectively predict H s and T p given their historical values only. For H s , it is identified that a 4-year dataset, 20 historical inputs, and a batch size of 256 produce the best results for three, six, twelve, and twenty-four-hour prediction windows at half-hourly step. It is also established that the future values of T p can be optimally predicted using a 2-year dataset, 10 historical inputs, and a 128-batch size. However, due to the much dynamic nature of the peak wave period, it is discovered that the LSTM model yielded relatively low prediction accuracy as compared to H s .


I. INTRODUCTION
Ocean or sea waves carry a tremendous amount of kinetic energy and are considered an important source of renewable energy [1]. These waves have the highest energy density among available renewable energy sources [2]. Among the different types of ocean waves, it is the wind-generated wave that is almost always visible on the sea surface [3]. Maritime navigation, commercial, renewable power generation, and noncommercial activities are thus subject to prevailing wind-wave conditions and their future forecast. To describe the nature of wind-waves, the complex association of various wave and weather parameters needs to be studied. Due to their stochastic nature, modelling and forecasting of wind-waves using deterministic equations is considered a challenging task [4].
Numerical wave modelling [5][6] [7], statistical modelling [8] [9], as well as machine and deep learning methods [10] [11][12] [13] have been applied to study and forecast the nature of wind-waves for short-term and long-term time periods. Despite its wide application, it has been reported that numerical modelling requires high computation power and a large amount of data [14]. As an alternative, machine learning models that have outperformed statistical models [9] and execute faster than numerical wave models [15] can be used as a surrogate for numerical modelling [14].
In this study, a deep learning model, specifically long shortterm memory (LSTM), is evaluated to forecast the future values of two important wave parameters, i.e., significant wave height (Hs) and peak wave period (Tp) [16] for the near-shore WEC site.
The paper is divided into the following sections: Section II reviews the literature on wave energy converter, and recent machine and deep learning studies on wave parameters prediction. In Section III, the problem statement is defined. Section IV describes the methodology by explaining the study area selection criteria, dataset preprocessing and arrangement steps, hardware and software setup, the LSTM model and its parameters, and evaluation criteria. Results and related discussion are presented in Section V. Finally, in Section VI, the conclusion and future work is discussed.

A. Wave Energy Converter
A wave energy converter (WEC) generates electric energy by converting the kinetic energy of sea waves into mechanical energy, which subsequently runs the electric generators to generate electricity. Based on their design principles, a wave energy converter can be divided into three categories [17]: 1) Attenuator: This type of WEC rides the waves in parallel to the predominant wave direction to generate energy.
2) Point absorber: The point absorber WEC is a floating or submerged structure. It heaves up and down relative to the incident wavelength to generate energy.
3) Terminator: The terminator WEC produces energy by physically intercepting a wave by having its principal axes parallel to the wave direction.
The power generation efficiency of a WEC is highly dependent on prevailing wave conditions and mostly affected by significant wave height (Hs), peak energy wave period (Tp) and wave energy period (Te) [16]. The prediction of these parameters plays an important part in forecasting energy potential and generation, and as well as the operational safety (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 13, No. 3, 2022 482 | P a g e www.ijacsa.thesai.org of the WEC site. In a recent study, it has been reported that the commercial deployment of WECs still remains low [18]. Hence, there is still a lot of room for research and development in various aspects of the WEC echo system, including wave parameter forecasting using alternative approaches such as machine and deep learning.

B. Wind-Wave Parameters Forecasting using Machine
Learning Models Recently, various machine learning techniques have been applied to forecast wind-wave parameters and sea weather. One of such studies conducted by Ali et. al. [19] forecasted half-hourly peak energy wave period (Tp) using the extreme learning machine (ELM), which is a training algorithm for single hidden layer feedforward neural network (SLFN). The study compared the results of ELM with five other deep learning and linear regression models, including recurrent neural network (LSTM). A six-year record of peak energy wave period was used to train and test the models. An interesting finding was presented, which indicates that for Tp forecasting, deep learning models (i.e., CNN and LSTM) didn't perform well as compared to ELM. For example, in the North Moreton Bay region, the study reported that ELM produced a higher R value as compared to CNN and RNN (i.e., ELM = 0.963, CNN = 0.932, and RNN = 0.928). Similarly, the ELM model resulted in a lower RMSE value as compared to CNN and RNN (i.e., ELM = 0.52, CNN = 0.98, and RNN = 1.24). This study has established that ELM is the better choice for half-hourly Tp forecasting. However, the study did not go beyond the half-hourly forecast of Tp and how LSTM might perform in such a case. Additionally, the study's scope was limited and didn't consider forecasting another important wave parameter of interest, i.e., significant wave height.
In the work presented by Fan, Xiao, and Dong [11], an LSTM network was proposed to predict near-future significant wave height. The study trained the proposed model on wave datasets acquired from ten different locations across the globe. Keeping in consideration the gradual development of wave height, six parameters were chosen as inputs to the LSTM model. These parameters were wind direction, wave height one hour ago, and wind speed at 1, 2, 3, and 4 hours ago. The study proposed a simple LSTM model with one hidden layer and one output layer. The results of the LSTM model were compared with five other machine and deep learning models. The study reported superior prediction performance when compared to the back propagation neural network, extreme learning machine, support vector machine, residual network, and random forest algorithm. The study suggests using one year of data for one-hour forecasting and two years of data for six-hour forecasting. Additionally, the study advocates the inclusion of wind speed data as a factor to improve the forecasting efficiency of significant wave height. However, this study has not considered prediction of an important parameter of interest, i.e., the peak wave period.
A long-term (i.e., up to two years) significant wave height and peak wave period prediction method based on XGBoost and LSTM models was presented by Hu et. al. [15]. The study trained and tested the models on hourly data collected for Hs, Tp and surface wind over a span of 24 years. The surface wind parameters (i.e., speed and direction) were used as inputs for each model. The models then predicted Hs and Tp values over a span of two years. When compared to the numerical wave model WAVEWATCH III (WW3), the results showed that machine learning models exhibited an edge over numerical model in terms of faster execution. As compared to LSTM and WW3, the study reported lower Mean Absolute Percentage Error (MAPE) values for XGBoost for both target parameters. The study also reported that a tree-based model (i.e., XGBoost) came to saturation on the training data beyond 5 years. Additionally, it was found that the LSTM model yielded improved prediction performance on larger dataset. The study concludes that XGBoost is preferable if limited training data is available.
Kim et. al. [13] proposed an interesting technique to predict ocean weather by converting 1D ocean data into a 2D image and applying convolutional LSTM (ConvLSTM) to predict eight ocean weather parameters after one week. The method uses the AutoEncoderis for its effectiveness in removing noise from data, thus optimizing the training process of ConvLSTM. The model took eight parameters as an input. Six of the parameters have 20-year of data, while the remaining two have 4-year of data. The study predicted ocean weather for a window of one week with an average error of 6.7%. However, this study does not include significant wave height and peak energy wave period as target prediction parameters.
It has been observed in these studies that 1) Generally, datasets covering various wave and weather parameters across multiple years are used to train and test the models [19][15] [13].
2) LSTM and its variants have shown superior forecasting accuracy across different time frames and on various sizes of training dataset [11] [15] [13].
Given the recent applications of LSTM in wave parameters forecasting problems, for a near-shore wave energy converter site, this study proposes to identify the wave parameters (i.e., Hs and Tp) prediction capability of an LSTM model using historical values of target parameters only. Hence, a problem statement is formulated and discussed in succeeding section.
III. PROBLEM STATEMENT Sea surface waves, or wind-waves, are generally produced by the wind blowing over large stretches of water [3]. These waves carry a tremendous amount of kinetic energy, which can be converted into electricity by using a wave energy converter (WEC). Due to its stochastic nature, forecasting various parameters of wind-waves is a challenging task that requires high computational power and a large amount of time-series data. For wave energy converter sites, the wave parameters of interest are identified as being significant wave height (Hs), peak wave period (Tp), and wave energy period (Te) [16]. For near-coast wave energy converter sites, the parameters of interest are significant wave height (Hs) and peak wave period (Tp). Presented studies have shown that machine learningbased prediction of these parameters (i.e., Hs and Tp) requires a large dataset consisting of various wave and weather parameters to train the model. Contrary to this approach, in this study, we attempt to answer the following research questions. www.ijacsa.thesai.org RQ1: For a near-shore wave energy converter site, can the stochastic nature of significant wave height and peak wave period be predicted using an LSTM model which is trained on their historical values only? RQ2: What is the minimum dataset size required to optimally train an LSTM model for the wave parameters (i.e., Hs and Tp) prediction problem?
The following research objectives are hence defined. RO1: To develop, train and evaluate an LSTM model which predicts significant wave height and peak wave period given it is trained on their historical values only.
RO2: To identify the minimal dataset size required to optimally train an LSTM-based model for wave parameters prediction.

A. Study Area
The coastal areas of east Australia have a high potential for wave energy generation [19]. For this reason, this study has been designed on the data collected by a moored wave monitoring buoy (i.e., the Datawell 0.9m GPS Waverider buoy) deployed off the eastern coast of Australia at a latitude of 26° 33.960' S, and longitude of 53° 10.870' E. The location of the buoy is shown in Fig. 1. The buoy is approximately 8 km off the coast of Coolum Beach, Queensland, Australia, and the reported water depth at this site is 36 meters. The dataset is available under a Creative Commons Attribution 4.0 license and can be accessed at the Queensland Government's open data portal (https://www.data.qld.gov.au/dataset/coastal-datasystem-waves-mooloolaba) [20].

B. Dataset Description
To train and test the LSTM model, the wave parameters dataset from the years 2000 to 2014 was initially selected as a source dataset (Dsrc). The dataset has a temporal resolution of 30 minutes and consists of 235,708 readings for six parameters, namely significant wave height (Hs), maximum wave height (Hmax), zero upcrossing wave period (Tz), peak energy wave period (Tp), peak direction related to true north (Pdir) and sea surface temperature (SST). However, upon initial investigation, it was found that Dsrc suffers from missing values in continuity (i.e., from March 2 nd , 2009, till September 30 th , 2009). In this case, as shown in Fig. 2., the application of data interpolation technique to such a long missing series resulted in undesirable values. Thus, a subset (Dsub) of Dsrc was identified for further investigation such that Dsub has a smaller number of missing data points in continuity. The features of Dsrc and Dsub are given in Table I.

C. Data Preprocessing
Since one of the objectives of this study is to investigate the forecasting of Hs and Tp based on their historical values only, thus as a first step, irrelevant parameters are dropped from the dataset (Dsub).   In the second step, it is important to identify the magnitude of data anomalies and gaps at both temporal scale and parameter level. Thus, at the parameter level, a statistical analysis for data anomalies, such as negative or extremely large values, is conducted. The results of this investigation are presented in Table II, which indicates the absence of any such anomalies. In the third step, to identify missing values on a temporal scale, a series at a half-hourly step size is generated for each day for 8 years starting from January 1st, 2001, to December 31st, 2008. A date and time-based one-to-one mapping of values from Dsub is completed on the generated series. This step identified 3,774 missing values in Dsub. The magnitude of missing values was smaller than the magnitude of missing values in the dataset Dsrc. Interpolation is not applied to the segment in which a large series of missing data points is identified. For the rest of the data, the linear interpolation technique is applied to fill in the missing values. Some examples of the interpolated values are presented in Fig. 3.
At this stage, as per recommendation of a previous study [11] and to answer RQ2, three datasets of 2,4 and 8-year data are created. These datasets are used to train, validate, and test the LSTM model.

D. Hardware and Software Setup
For the experiment, the LSTM model is written in the Python programming language using the Keras framework. For data processing, NumPy and the Pandas libraries are used. The programming environment is built on a Windows 10 Pro system running on an Intel (R) Core (TM) i7-9750H CPU at a clock speed of 2.60 GHZ. All experiments are executed on an NVIDIA GeForce RTX 2070 with a Max-Q Design GPU with 8 GB of RAM.

E. Long Short-Term Memory Model
Long short-term memory (LSTM) is a variant of RNN that with the help of a forget gate solves the RNN's problems of exploding and vanishing gradient [21]. In an LSTM, each time step is represented by an identical neural network cell, which by passing its non-linear activation to the next cell builds a system memory. This system memory is used to model time series data. In Fig. 4, the LSTM network cell is depicted. The equations for LSTM cell are given in equations 1-6.  (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 13, No. 3, 2022 485 | P a g e www.ijacsa.thesai.org Where, = sigmoid function, W = weight for each layer, xt = input in time step t, b = bias, tanh = hyperbolic tangent function, ⨂ = element-wise product, ct = main message passed between the steps, ft = forget gate, and ht = value passed to the next cell.
An LSTM model is designed to predict half-hourly forecasts for significant wave height (Hs) and peak wave period (Tp) at four different forecast windows. The model takes historical values of Hs and Tp as input. The model has three layers (L1, L2, and L3). A dropout layer (D) is added after the L2 layer. For its better performance, Adaptive Moment Estimation (ADAM) is employed [13]. The parameters of the LSTM model are provided in Table III.

F. Evaluation Criteria
To evaluate the prediction efficiency of the model, the root mean square error (RMSE) measure is used. The formula to calculate RMSE is presented in equation 7.
Where oi = observed value and pi = predicted value.

V. RESULTS AND DISCUSSION
To predict significant wave height and peak wave period for the WEC site, four experiments are designed for each dataset in which a combination of historical inputs (Hi) and batch sizes (BS) are used to train the LSTM model. The validation data split of 20% remains constant across experiments. The evaluated combinations are presented in Table IV. The model is tested on its half-hourly prediction accuracy at four near-future windows, i.e., three, six, twelve, and twenty-four hours, and their results, in the form of RMSE values, are presented in Table V.
The RMSE values for the near-future prediction of significant wave height indicate that the model trained on 4 years of data, 20 historical inputs, and a batch size of 256 outperformed all other Hs prediction experiments. The RMSE values for the half-hourly 3, 6, 12, and 24-hour forecasts are 0.0279, 0.0268, 0.0334, and 0.0327, respectively. It is also observed that the lowest RMSE values for half-hourly 3, 6, 12, and 24-hour forecasts are produced by model trained on either 2 or 8-year of data. This indicates that the optimal prediction efficiency of the LSTM model is related to the dataset size, which in this case is 4 years. Hence, to predict the complex behaviour of Hs optimally, 4-year significant wave height historical data is sufficient. The best-performing prediction results for significant wave height are shown in Fig. 5(a).  For all near-future forecast windows, the forecast for the peak wave period is best produced by the smallest dataset and with the minimum historical inputs and batch size (i.e., 2-year dataset, Hi=10, BS=128). The RMSE values for half-hourly 3, 6, 12, and 24-hour forecasts are 0.126, 0.1713, .2369, and 0.4094, respectively. However, when compared to the model's forecasting ability for significant wave height, these values remain high. This indicates that for Tp prediction, the model is not efficiently identifying the trend for a relatively much dynamic pattern of Tp. It is also observed that the model trained on a larger dataset, i.e., an 8-year dataset, performed well as compared to the model trained on a 4-year dataset. The worst performing RMSE values for Tp are generated by the model trained using 4-year data. Fig. 5(b) depicts the best-performing prediction results for the peak wave period.

VI. CONCLUSION AND FUTURE WORK
A wind wave is a type of ocean wave that is generally present on the sea surface and affects navigation, commercial, power generation, and non-commercial activities taking place in a maritime environment. Thus, the study of wind-wave state prediction plays a pivotal role in the planning, execution, and safety of these activities.
In this study, from the point of view of a near-shore wave energy converter site, the effect of minimal training parameters and dataset size on the LSTM-based significant wave height and peak wave period prediction model is investigated.
Three datasets with variable temporal length were prepared, and on each dataset, four experiments were conducted to investigate the prediction ability of LSTM based on the target parameter's historical inputs and batch sizes. In addition, the study investigated the minimum dataset size required for the training of the LSTM model.
It was found that for significant wave height, the LSTM model generated better results using a 4-year dataset, 20 historical inputs, and a 256-batch size. It was also observed that for the peak wave period forecast, the model didn't perform as well as compared to the significant wave height forecast. However, it was identified that a 2-year dataset with 10 historical inputs and a 128-batch size yielded the best results for Tp prediction. Based on the presented results, the study concluded that future values of Hs and Tp can be predicted by www.ijacsa.thesai.org training an LSTM model on their historical values only. Additionally, the study also identified the minimum size of the dataset (4 years for Hs and 2 years for Tp) required to train and predict the future values of Hs and Tp.
Development of a LSTM model which can forecast both Hs and Tp with a similar sized dataset and accuracy can be considered as future work of this study.