Providing a prediction model to the output power of a wave energy converter by artificial neural network

: The technologies pertaining to ocean waves has been continuously improving since its creation and the major focus is to come up with accurate predication of power generation from the oceans waves. The precise forecast can not only reduce costs for investment but also it is essential for management and operation of electrical power. The purpose of the current paper is to numerically investigate a new economical wave energy converter named “Searaser”. The simulation is done with Flow-3D software which has high capability in analyzing the fluid solid interactions. by collecting the experimental data of another study and the exerted data which is from numerical simulation, the wind speed and output power are related with a long short term memory (LSTM). By doing comparative analysis between these data, it can be concluded that the artificial intelligence method is so accurate and fast. The network output figures show a good agreement and the root mean square is 0.49 in mean value which was related to the accuracy of LSTM method. One of the novelties of this study is to provide a scatter plot that generates power in terms of wind speed. Due to the accumulation of data, the power can be predicted for other wind speeds by using the inter-mediate values. Furthermore, the mathematical relation between the generated power and wave height was introduced by curve fitting the power function to the result of LSTM method.


Introduction
Based on available data fossil fuels are still the most important source of energy in the world [1]. As known fossil fuels are one of the sources that harm the environment, causes air pollution, global warming and climate change [2]. Therefore, in recent years, the interest in investment on systems that uses fossil fuel investment has declined. On the other hand, interest in developing non-petroleum-based sources of fuel, especially on the renewable source of energy, has increased tremendously. Among the different sources of renewable energy, solar energy, wind power, tidal energy and geothermal energy are the most well-known ones [3]. Ocean wave energy has the second largest potential among all ocean renewable energy sources [4].
Harvesting the wave energy and transform it into electricity implies wave energy converters (WECs) that used the motion of ocean surface waves to convert ocean wave energy into electricity. In general, there are different types of WEC systems [5][6][7]. Due to the fact, investors around the world need to know information about predicting the potential for power generation by WEC systems [8]. In these fields, especially utilizing the output power from WEC systems several studies through numerical simulations and experimental were done [9][10][11][12]. In this study, a new wave energy converter named "Searaser" was chosen because of the lower price than similar types on the market and considered as clean electricity producer with no climate gas emissions involved [13].
Even though ocean waves are clean, safe, reliable and affordable source of energy it also has unpredictable uncertainties with its usage. The unwanted uncertainty can threat the reliability and stability of the ocean energy systems, especially with the large-scale integration ones [14][15][16]. Hence, it is essential to properly forecast ocean wave energy to avoid management and operation hazard during the electrical power generation. As known the wave energy is not only more abundant in the natures than wind and solar energy and but also it is easier to forecast [17]. In fact, accurately predicting the power of ocean waves due to random data is still a challenging task in engineering. Because of the time-consuming and expensive calculations of solving equations with complex boundary conditions, researchers are looking for a way to replace numerical solutions. One of the areas that can make predictions in this area with minimal time and cost is the use of artificial intelligence in the field of estimating the production capacity of energy systems. Therefore, the artificial intelligence (AI) researchers in a field of engineering have been developing the methods to predict the generated electrical power of ocean waves energy systems from effective parameters [18_20]. Zhenqing et al. [21] have studied and simulated ocean waves and suggest a prediction model by using machine learning methods and genetic algorithm. The main goal of this study is to demonstrate converters by considering different wave periods, wave height and water depth. They conclude that optimizing the converters help to solve other technical problems on this field. Li et al. [22] have been conducted a study on the parameters affecting the wave power. They provided an artificial neural network for having an accurate prediction that creates relation between the height of the free surface of a wave and its force through a machine learning algorithm. They have identified a relation between the power capture efficiency and the other parameters by analyzing the errors. Gomez et al. [23] studied a research about utilizing latest machine learning methods to introduce a new software tool with a user-friendly guide interface to predict output using the integration of meteorological data from two data sources. But among all of these recent studies, the relationship between the wind speed which one is significant in these kinds of simulations.
Therefore, how to estimate the output power directly from wind speed and build an accurate model for optimizing its efficiency are two essential issues in the WEC improvements and output electrical power, has not yet been clarified and it is not evident. In order to address the gaps in the studies that have been done so far, this research has tried to predict the amount of power produced by searaser by using two methods of artificial intelligence and numerical solution at the same time. The novelties of the recent research are as follows.
 The numerical analysis of a Searaser in the form of the computational fluid dynamics is proposed by Flow-3D software, which completely demonstrates the ocean wave parameters and perfectly combines with the latest algorithm of long short-term memory.


The artificial intelligence model is reasonably utilized to predict output electrical power based on a wind flow speed and suggesting a mathematical relation between wave height and output power, much can be done to help the WEC industry and investors to predict output power with saving time and cost.

Dataset
To use supervised learning in the field of machine learning, it is necessary to give data to the algorithm. The input data to the utilized algorithm of this research includes two categories of data obtained from numerical solution of equations by Flow-3D simulation software and experimental data that He [24] has used in his studies. For details, by using computational fluid dynamic and numerically solving the governing equations, a relationship between wave height and output power was found and the experimental data of He's study [24] demonstrates the relation between wind flow speed and wave height which is shown as Figure1. By collecting this data, we can reach the main goal of this research, which is to find a relationship between wind speed and output power.

Geometry and description
Electricity generation industry in a field of wave energy converter has been improving and Alvin Smith registered a novel technology named as "Searaser" [25]. Searaser harnesses the motion of ocean waves by pumping pressurized water up into high reservoirs and then back down into hydro-power turbines to create electricity on demand. In this study the performance of a Searaser with geometric dimensions based on the data extracted from the patent was numerically evaluated [25]. The geometry of Searaser presents in Figure 2. As shown in Figure 2, part 1 is a buoy which floats on the ocean's water and it forced upward of the related buoyancy force. For moving downward, the gravity force dominates other forces during passing wave motions by considering the effect of wall fraction on a Searaser body. The buoy moves in a chamber which is indicates as part 2. Addition to these main parts, different components of Searaser was introduced in Figure 3. As presented in Figure 3, the inlet and outlet components are designed for entering and exiting the water flow during the buoy movements as the known piston-cylinder mechanism.

Governing equations
Flow 3D is utilized as a considering numerical solution software to analyze the solidfluid interactions between Searaser structure and ocean waves. This study used volume fraction technique which is introduced as a ratio of the open to the whole volume within a computation cell. The named technique used for such a complicated structure to utilized the governing equations which are dedicated as Equation 1 and 2 [26].
Simplification of Equation 1 was done by assuming the fact that the buoy movement divided into two main parts; rotational and translational one caused by 6 degree of freedom. Hence, by assuming the buoy as a rigid body, all of the movement takes place in the center of mass. In this study, the "o" index introduced the buoy center of mass. Equation 3 shows the buoy movement velocity [27]. (3) By utilizing the VO as a buoy velocity, the Equation 1 should be rewrite as Equation 4 [28]. (4) [J]. .

 
The total applied force to the Searaser was calculated as the summation of gravity and hydrodynamic forces (Equation 5). Similar to this, the Torques with the same indexing were applied to the "o" point respectively (Equation 6). So the fluid governing equations can be written as Equation 7 and 8 [28]. (5) Where is the density, is the area fraction, is the volume fraction, ⃑is the velocity of the fluid, and G is gravity. For coupling of the motion Equation 7 and 8 should be solved in each time step and the situation that is done by FAVOR technique in Flow-3D.
Hence, for different wave heights which were modified, Equation 9 was used as a power-height relation [29].
For solving these equations, the specific boundary conditions and simplifying assumptions should be applied.

Boundary conditions and grid generation
For simplifying procedure, the sine waves with a different magnitude in wave characteristics were used. Equation 10 shows the sine wave equation [30].
In this equation, A shows the wave amplitude which is gained from He's study [24]. The other wave characteristics were assumed constant. In addition to consider sine wave as an inlet of the specific control volume, other boundary conditions are shown in Figure  4.
. Different boundary conditions of numerical solution.
As shown in Figure 4 "VW" is a linear wave inlet of the control volume, "S" is the symmetric condition for three different wall, "W" is a wall with slip boundary condition and "O" is the outflow when it is not allowed the water to enter at the outflow boundary. The reason of using three different domains for numerical solution is to use different grid sizes. Whatever goes inside the blocks, the grid size becomes smaller because the computational accuracy is more essential than outer blocks in this region. So the inner block has the smallest grid size among the others. Same as the other computational fluid dynamic studies, the grid generation and independencies should be analyzed and find the suitable grid size which has the best accuracy due to the least computational time which is shown as Table1. As presented in Table1 the best selected total grid is 5000000 grids due to the related accuracy. It shows that this grid size can be selected because it is as accurate as 7000000 grids due to the fact that it has higher computing speed and lower computational cost. Furthermore, it presents the accuracy in displacement for each grid size during the whole of calculation time when the input wave height is assumed 1m [31]. According to the harmonic linear motion of buoy in a chamber, the special generator will convert these motions to electricity by utilizing the Faraday's induced law.

Machine learning LSTM method of prediction
The Electrical power of ocean waves forecasting models have become stable and highly credible after decades of considerable improvements. However, the models require large amount of data to train, which usually takes longer time even for a small-scale forecast. For that reason, the machine learning and deep learning algorithms were emerged and bloomed to improve accuracy and promptness of the prediction. Recurrent Neural Network (RNN) are types of Neural Networks designed to use sequential data such as time-series. In RNNs, the outputs can be fed back into the network as inputs creating a recurrent structure. RNNs are trained by backpropagation. During backpropagation, RNNs suffer from gradient vanishing problem. The gradient is the value used to update Neural Networks' weight. The gradient vanishing problem is when gradient shrink as it back propagates through time. Therefore, layers that get a small gradient do not learn and they cause the network to have short-term memory [32]. Long Short-Term Memory (LSTM) is a specialized RNN to mitigate the gradient vanishing problem. LSTMs can learn long-term dependencies using a mechanism called gates. Figure 5 presents an architecture of LSTM cell. These gates can learn what information in the sequence is important to keep or throw away. LSTMs have three gates; input, forget and output [33]. For saving the data information that is utilized in the specific storage within hidden layers, the "cell" has been introduced. As presented in Equation 11 and 12, ft and it indicate the input gate and forget gate for controlling each cell state [34].
Where the g indicates a non-linear sigmoid function for activation procedure. i and f indexes present the input and forget parameters, W and b presents the weight matrix and bias function, ht-1 introduces the output vector of the last time step and Xt shows the input vector of the current time step.
Equation13 presents the relation to obtain an input's current state.
As shown in Equation13, c indexing introduces the recent state of each parameters. Eq. 14 describes the current cell, that i considered as utilizing both of the forget and input gates.
By using the output gate of each cell as it is written in Eq. 15, the output of the whole network of a long short-term memory has been presented as Eq. 16.
o index introduces the cell output parameters.
The essential task in algorithm designing procedure of neural network is to select the best number of neurons and relative layers. In machine learning systems which contain neurons, the connection links between them are introduced as weighted activation. According to proposed usage, It was modeled by input layer. For analyzing procedure, hidden layers were used by considering several neurons which transferred data from input to output neuron. The network's dataset split into training and testing sets. The main crucial task in optimization is to minimize a difference between predicted and actual data [35][36][37].
In this research, the 5 hidden layers were selected which contains 10 neurons within the first layer. The epoch size is 7 and walk-forward validation method were used. The back propagation algorithm was utilized for administrated learning technique [38]. Figure 6 shows the neural network details which is used in this research. Figure6. The specific neural network of recent study.
As presents in Figure 6, recent study has used a proposed LSTM network with an input layer time-series parameters which are followed by an LSTM layer. These layers learn the relation between different parameters in time steps and serialized input data. moreover, during each of the layers, the LSTM layer's neuron connected to the next layer's neuron for each LSTM cell. The artificial intelligence predictions have been done by utilizing equations of LSTM method. Hence, decreasing rank procedure of the input data was done by Mahalanobis distance (MD) method to reduce the predicting time of the overall procedure. Our study is a kind of regression prediction which can find a relation between the input and output data. Table 2 presents the LSTM parameters which were introduced as effective parameters on output generated power of Searaser. In this study, by using the numerical solutions, the collected dataset from simulation and experimental study was imported to the LSTM Network then it would predict the output parameters. Then, the data that was gained by numerical solution would be compared with the predicted data from LSTM method. Finally, the correlation matrix has been applied on a recognition step of the occurrence of faults.

Results and discussion
This section describes the results of evaluation of the wave power generation prediction based on the proposed LSTM network. Accordingly, the result of numerical solutions and the prediction plots of correlation parameters were presented and compared with each other. Furthermore, the Searaser's performance was demonstrated for various input linear-sine waves that the information exists in Figure3. In this study, the main goal is to suggest relation between wave height and the generated electrical power. The wave height moves the buoy in z direction and its motion will be converted to the electricity. The Equation9 demonstrated that the output power depends on the wave height and wave period of each time. Furthermore, the other parameters become constant during the simulation. Figure 7 shows the numerical solution of the simulation. It shows the relation of the generated power with the whole simulation time.
Figure7. The variation of generated power with simulation time As shown in Figure 7, the instability of the generating power at different times during the simulation. This instability is caused by changes in the height of the input wave to the wave converter.
To illustrate the correlation between all of the effective parameter with LSTM method further, the predicted plots were presented as a matrix of figures. The scatter plot of predicted magnitudes was shown in Figure8. Figure 8 presents a matrix whose intersection of each row and column shows a graph showing the relationship between the two parameters. Using this type of display causes the dependence of all parameters on each other to be well shown. To find a higher correlated parameter among others which they can be neglected during predicting procedure, the correlation matrix could be prepared as Figure10. This matrix shows the relation of different quantities with heat-map visualization method. It demonstrated the magnitudes with colors from lighter to darker one. The lighter color shows the best relation so it is easy to inference that the prediction procedure finds a good relation between wave height and power. For comparative analysis, it is necessary to compare the predicted production power graphs with numerical solution values to prove the efficiency of this method in using this field which is shown as Figure10 and 11. For this reason, Figure 11 shows the power curve in terms of simulation time. It presents the bar graph and the differences between two type of values shows obviously.   Figure 12 shows that to achieve larger powers, it is necessary for wavelengths with higher altitudes to collide with the wave converter. Furthermore, the main claim of our study is to introduce a relation between the generated power and wave height. For this purpose, the output data of LSTM method were used and compared with numerical analysis which was done by simulation software. Figure 12 presents this relation and the curve fitting operation were done and the mathematical relation introduced as a power function.
In the following, we will examine one of the objectives of this article, which is the power diagram in terms of wind speed. Figure 13 shows this relationship extracted from the LSTM method. As can be deduced from Figure 13, the data frequency is low wind speed, and this chart is a reliable way to predict similar models because it is a combination of experimental card and simulation data modeled by artificial intelligence.
To represent the effect of selected parameter, the respective comparative analysis is displayed here. Root mean square error (RMSE) of these relations presented as shown in Table 3. Table 3 shows that there is a good agreement between two utilized methods and It can be concluded that the LSTM method is much faster and more accurate in predicting values.

Conclusions
According to the obtained results and the comparison between the two methods studied, it can be inferred that the LSTM network is able to predict Power in terms of height more accurately and faster than the numerical solution and they were in a good agreement with the result of the numerical analysis. The comparison between the two methods shows that results of the machine learning method are so accurate and RSME value of the parameters are 0.49 as a mean value. By utilizing exprimental data and the proposed LSTM prediction method a relationship was shown between wind speed and the output Power of Searaser. In this study, by accurate prediction of the electrical power generation of Searaser, several improvements will be happened on Energy management systems and investments of this field. In the future, better results can be achieved by using accurate methods as well as the development and upgrading of WEC systems. Declaration of interests: The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.