Comparative Investigations of Tidal Current Velocity Prediction Considering Effect of Multi ‐ Layer Current Velocity

: Accurate tidal current prediction plays a critical role with increasing utilization of tidal energy. The classical prediction approach of the tidal current velocity adopts the harmonic analysis (HA) method. The performance of the HA approach is not ideal to predict the high frequency components of tidal currents due to the lack of capability processing the non ‐ astronomic factor. Recently, machine learning algorithms have been applied to process the non ‐ astronomic factor in the prediction of tidal current. In this paper, a tidal current velocity prediction considering the effect of the multi ‐ layer current velocity method is proposed. The proposed method adopts three machine learning algorithms to establish the prediction models for comparative investigations, namely long ‐ short term memory (LSTM), back ‐ propagation (BP) neural network, and the Elman regression network. In the case study, the tidal current data collected from the real ocean environment were used to validate the proposed method. The results show that the proposed method combined with the LSTM algorithm had higher accuracy than both the commercial tidal prediction tool (UTide) and the other two algorithms. This paper presents a novel tidal current velocity prediction considering the effect of the multi ‐ layer current velocity method, which improves the accuracy of the power flow prediction and contributes to the research in the field of tidal current velocity prediction and the capture of tidal energy. article provides a new type of tidal current data processing and prediction method combined with tidal depth information. The proposed method effectively improved the accuracy of the tidal current velocity prediction and contributes to tidal current energy development, tidal current machine energy capture, and extreme sea state control and avoidance. Future work will try to implement the online real time function of the proposed tidal current prediction method and develop a real time tidal current prediction system based on the proposed method.


Introduction
Tidal currents take place simultaneously with the rise and fall of the tide. The vertical motion of tides leads the water to move horizontally, which generates tidal currents. Tidal current energy is the marine energy from the seawater, occurring in submarine channels and straits [1][2][3]. Compared with other renewable energy, tidal current energy has the advantages of predictability, stability, and highdensity [4][5][6]. In contrast to the conventional generations, tidal current energy still suffers a problem of uncertainty, which interferes with the reliability of the power grid [7][8][9]. As the grid-connected power generation system has a very high demand for power quality, and the power fluctuation of tidal energy would significantly increase the difficulty of power management between power generation and load side [10]. With the development and utilization of tidal current energy, it would be desirable to develop an accurate short-term tidal current prediction method.
There are two factors that affect tidal currents including the astronomic factor and the random factor. The astronomic factor is determined by gravitational force. The astronomic factor of tidal currents is a kind of periodic component because of the periodic motion of the Moon and the Sun; the random factor is affected by variations of the turbulence flow, the wind, and the temperature, etc. Hence, the random factor of tidal currents generates random components. In terms of the tidal current prediction method, there are two general types of methods, namely the harmonic analysis method and machine learning based approach.
The harmonic analysis (HA) method, which was proposed by Professor G. H. Darwin [11], is the most widely used method in tidal current prediction. In the HA method, tidal currents are regarded as a combination of various periodic components. The HA method has therefore been applied in stationary tidal current analysis; the information of tidal dynamics can be calculated from the HA method [12]. However, the HA method has some disadvantages that limit its application. The accuracy of the HA method output is dependent on the component selection [13]. In addition to the component selection issue, the noise associated with the problem is another issue that poses a challenge for the HA method. For example, the turbulence flow is very difficult to predict by using the HA method. From Jay's research results [14], it shows that the HA method is also not suitable to be applied in non-stationary data analysis.
Apart from the HA method, machine learning methods have been utilized by many researchers in the renewable energy system [15][16][17][18]. Artificial neural network (ANN) is a type of classical machine learning method [19][20][21][22]. Due to high robust performance in noisy environments, ANNbased methods are suitable to solve noise associated with issues [23]. However, the performances of traditional ANN-based methods are not ideal in some complicated applications [24]. With the development of artificial intelligence technology, the deep neural network (DNN) has shown great potential [25]. The long short-term memory (LSTM) algorithm is a branch of DNN algorithms, which enables the effective process of many types of time series signals [26,27]. Furthermore, the LSTM algorithm has an advantage of capturing long-term dependencies within a sequence [28]. Essentially, the LSTM algorithm is a kind of special recurrent neural network (RNN), which is more suitable to process long-term dependence problems [29]. This feature of the LSTM algorithm makes it suitable to be applied in tidal current prediction because the main component of tidal currents is a kind of sequential periodic wave.

Study Area
It is clear that the tidal current prediction model, considering both the random factor and astronomic factor, is able to increase the prediction accuracy. Hence, a novel tidal current velocity prediction considering the effect of multi-layer current velocity based on the machine learning method was proposed. By analysis of the effect of multi-layer current velocity, both the astronomic factor and random factor of the tidal current are considered in the prediction model. In previous research, little work considered the effect of multi-layer current velocity in tidal current prediction. Otherwise, all machine learning based tidal current prediction approaches have their own advantages and drawbacks. These have been developed for different renewable energy prediction systems for decades. Hence, it is very useful to carefully evaluate and compare these methods before their applications, which help to select the appropriate strategy for a given case.
The main contributions of this paper are described as follows:  A tidal current velocity prediction considering the effect of the multi-layer current velocity prediction method is proposed, which enables the effect of turbulence flow to be reduced in prediction accuracy;  The LSTM algorithm method is applied in tidal current prediction; and  Comparative investigations of machine learning based approaches on tidal current prediction are given.
The remainder of this paper is organized as follows. Section 2 introduces the proposed tidal current velocity prediction considering the effect of the multi-layer current velocity method. Section 3 illustrates the traditional harmonic analysis method. Section 4 presents the machine learning based tidal current prediction algorithms. In Section 5, comparative investigations of machine learning based approaches for tidal current prediction are given by using the tidal current data. Conclusions and future work are at the end of this paper.

Tidal Current Velocity Prediction Considering Effect of Multi-Layer Current Velocity
In previous research, little work had considered the effect of multi-layer current velocity in tidal current prediction. The tidal current velocity prediction generally pays attention to the tidal current velocity in a specific depth [30]. Figure 1 presents a tidal current velocity distribution from the surface of the sea to 40 m under water. The tidal current data were collected from a real ocean environment in China. From Figure 1, it can be seen that the tidal current velocity varies greatly at some adjacent depths, which is mainly caused by the turbulent flow affection. Consequently, the prediction model, by applying the multilayer tidal current velocity difference as input, enables an increase in prediction accuracy in contrast to only using a single tidal current velocity as input, as shown in Figure 2. As above-mentioned, a novel tidal current prediction considering the effect of the multi-layer current velocity method was proposed. Figure 3 shows a diagram of the novel tidal current prediction considering the effect of the multi-layer current velocity method. The LSTM algorithm has an advantage of capturing long-term dependencies within a sequence. This feature of LSTM makes it suitable to be applied in tidal current prediction because the main component of tidal currents is a kind of sequential periodic wave. The tidal current velocity in the m-th layer (m means the depth of the predicted tidal current velocity) was selected as one of the LSTM prediction model inputs, which obtains the periodic components of tidal current velocity. Periodic components are the main components in tidal currents, which are generated by the astronomic factor. In terms of the random factor, the difference of tidal current velocity between the m-th layer and n-th layer (n means the depth adjacent to m-th layer) is used as the other prediction model input, which obtains the random components caused by the random factor. This is able to decrease the effect of the multilayer tidal current velocity difference caused by the effect of turbulent flow (random components of tidal current velocity). In contrast to the traditional single input tidal current prediction method, a novel tidal current prediction includes both the astronomic factor and random factor by considering the effect of multi-layer current velocity.

Harmonic Analysis Method
Essentially, the main principle of the HA method is the data analysis of tides generated by changes in the gravitational force. The magnitude of gravity is mainly dependent on the relative positions of the Earth, the Moon, and the Sun. Hence, the effects of different positions are combined with a set of particular components. Selecting a set of time series observations: , , … , , the time interval is △ . Then, the tidal model with N constituents is described as follows: where the and are the variation of the constituents; is the frequency of each constituent; is an offset; and indicates the trend. In this paper, the least squares technique was adopted in the HA based analysis due to it being more flexible and accurate.
The least squares equation is given as follows: where , , … , ′ ; , , , , , , … , ; and T is a 2 2 matrix of linear and sinusoidal basis functions evaluated at observation times.
The standard parameters of the particular constituent k are then calculated as follows: where and are the semi-major axis and semi-minor axis of the ellipse respectively; is the inclination angle of the semi-major axis; and is the Greenwich phase. The constituent selection method was proposed by Foreman and Rayleigh, which is used to achieve automatic constituent selection. Generally, the constituent selection is an iterative process. The classical approach of the constituent selection criterion is the Rayleigh criterion proposed by Foreman in 1977. The Rayleigh criterion illustrates two constituents (frequencies and ) that are decomposed by a record with uniformly distributed times.

Single input Predicted velocity value
In terms of raw input with length of record ; the frequency resolution is Δ = 1/ .
where is a minimum threshold; when 1 , the criterion is equivalent to obtain a sufficiently long record length, by comparing all constituent pairs and omitting constituents, the suitable constituents of the raw input can be obtained. A commercial harmonic analysis toolbox UTide [31], proposed by Codiga in 2011, enables the analysis of harmonic currents. UTide integrates various harmonic analysis methods, which is specifically designed to treat multi-year records with irregular temporal sampling.

Long-Short Term Memory
The LSTM algorithm is an improved RNN algorithm. With the unique memory and forgotten pattern, the LSTM algorithm can understand the timing characteristics and the time-dependent relation accurately [32,33]. The LSTM algorithm is able to preferably solve the problems of gradient descent and gradient explosion that are inherent disadvantages of traditional circulating neural networks [34]. As the number of network layers increases, the perception of subsequent nodes to the previous nodes is weakened, which makes the model lose the previous information phenomenon over time. The LSTM algorithm has therefore been applied in many application fields including natural language translation, image processing, and voice recognition. Compared with traditional RNN algorithm, LSTM algorithm has three types of gates (input gate, forget gate, and output gate) and a memory cell with the LSTM neuron.
The LSTM neuron can achieve the function of information discarding and retaining via transferring information with gate structure.
According to Figure 4, first, the forget gate chooses information for discarding. The output value ℎ from the last time output and the new input information are used as inputs. Through the activation function , they are mapped between 0 and 1. The function of the forget gate is given as follows: where and are the weights, and is an activation function: Second, the input gate chooses information for retaining. The output value ℎ from the last time output and the new input information are selected as inputs. Through the activation function , they are mapped between 0 and 1. The function of the input gate is given as follows: Aside from the above-mentioned functions, there is a new vector , which represents all information.
Where and are the weights, and ℎ 2 2 1.
With information adding and forgetting, the state of the cell can be updated from to .
New cell state is composed of state and the memorized information.
Finally, there are two steps to get output value ℎ , described as follows: where and are the weights, and is the offset. From the information processing procedure, it can be seen that the output information is not only related to the input information, but also to the memory information of the cell state and the output information from the last time. It is a cumulative process among cell states, which solves the problems of vanishing gradient and exploding gradient. The prediction model of LSTM with time series is shown in Figure 5, where it consists of the input layer, LSTM layer, two hidden layers, and output layer.  The input layer is used to get the original information of the time series; the LSTM layer, composed of 48 LSTM units, is used to learn the time series relationship and extract features from inputs; two hidden layers, composed of 24 neurons and 12 neurons, respectively, are used to reduce dimensionality and map the feature learned from the LSTM layer; and finally, the results are obtained from the output layer. According to the model structure above-mentioned, the prediction results of non-stationary sequences can be expressed as follows: y where , , , are the weights of the LSTM layer, hidden layer and output layer; and (ℎ , ℎ , … , ℎ ) is the output state of LSTM cells at time t. is an activation function: 0, .

Back-Propagation Artificial Neural Network
Among the numerous ANN methods, a single hidden layer feed forward neural network (SLFN) using the gradient-based back-propagation (BP) training algorithm, is one of the most classical ANN methods. It is usually selected as a standard of comparison for estimating the performance of other ANN methods. Figure 6 shows a diagram of a feed forward neural network with a single hidden layer. The network consists of an input layer, a hidden layer, and an output layer of neurons. For this example, the input layer has n neurons; the hidden layer has L neurons, and the output layer has m neurons.  The parameters of the neural network structure are determined by bias values, activation constant, learning rate, and the number of hidden neurons. The optimal values of the neural network parameters are obtained by trial and error. In terms of the neural network structure optimization, it is essentially an optimization of the weight values. The steepest descent method is generally adopted to achieve weight value optimization.

Elman Regression Network
Unlike BPANN, the Elman neural network is a typical dynamic neural network, which is based on the structure of BPANN. By storing the internal state, it has the function of mapping dynamic characteristics. Hence, an Elman neural network has the ability to adapt to time-varying characteristics.
Compared with traditional BPANN, the Elman neural network has a receiving layer that is mainly used for feedback connection within or between layers. The Elman neural network is therefore able to achieve the time delay between input and output. With the description of dynamic equations, the Elman neural network has a memory function. The structure of the Elman neural network is shown in Figure 7. In terms of feedforward connection, the connection weights can be modified due to the existence of the receiving layer, while the weights of recursive are fixed.

Results
The tidal current data were collected in Zhoushan, China. There was a consecutive observation of the velocity and the direction of the tidal current by using an acoustic doppler current profiler (ADCP) [30,35]. The ADCP equipment height was 1 m, and the distance between the top and the center of the first measurement unit was 1.5 m. The water depth can be roughly obtained through water pressure measurement, and atmospheric pressure was compensated during the measurement process. The sampling parameters of ADCP are listed as Table 1. The measurement time lasted from February 13 to 20, and the pressure value indicated that the water depth was about 40 m. There are three steps in the post processing acquisitions: (1) remove data during deployment and recovery; (2) remove the echo intensity values below the threshold value; and (3) remove outliers such as sudden changes in tidal current data.
In order to validate and compare the performance of the above-mentioned methods, the mean absolute error (MAE) and the root-mean-squared error (RMSE) were used to evaluate the prediction accuracy, which is defined as follows: where is the forecast data, while is the measurement data.

Single Input Tidal Current Prediction Method
In case study A, a short-term (with one-hour prediction interval) tidal current prediction was applied. Four types of algorithms were adopted to compare the performance in tidal current prediction. The commercial tidal current prediction software (UTide) adopts the harmonic analysis method to obtain the periodic components of tidal current velocity. The tidal data collected from 20 m under the sea surface were selected as input for UTide data analysis. The other three machine learning based algorithms (LSTM, BPANN, and ELMAN) were applied in the single input prediction method. Figures 8 and 9 show the comparison results of the single input prediction method by using three machine learning algorithms and UTide (20 m under sea surface). Through these comparison results, it can be seen that the predicted outputs of UTide were smooth periodic signals that lacked random components, which affects the prediction accuracy, while the LSTM algorithm had much better performance than the other two machine learning algorithms.
In order to further compare the performance of each method, residual signals of the single input prediction method by using three machine learning algorithms and the UTide analysis results are given in Figure 10. The residual signal is the difference between the prediction result and actual measurement data. It can be seen that the UTide and LSTM algorithms had higher accuracy than the other two algorithms. The prediction errors of the UTide and LSTM algorithms were under ±0.5 m/s. In terms of RMSE and MAE values, the values of UTide were 0.214 and 0.165, respectively, while the values of the LSTM algorithm were 0.142 and 0.113, respectively. This means that the LSTM algorithm had the highest accuracy among the four types of algorithms.

Tidal Current Velocity Prediction Considering Effect of Multi-Layer Current Velocity Method
Apart from the traditional single prediction input method, the proposed tidal current velocity prediction considering the effect of the multi-layer current velocity method was also performed to validate the effectiveness. For input variables, the tidal current velocity at 20 m depth of the sea and the tidal current velocity difference (between 21 m depth of the sea and 20 m depth of the sea) were used as inputs of the proposed prediction method. Figures 11 and 12 illustrate the comparison results of the proposed method by using three machine learning algorithms and UTide (20 m under sea surface). Through these comparison results, it can be seen that the LSTM algorithm has much better performance than the other two machine learning algorithms.
In order to further compare the performance of each method, residual signals of the proposed method by using three machine learning algorithms and UTide are given in Figure 13. It can be seen that the UTide and LSTM algorithms had higher accuracy than the other two algorithms. The prediction errors of the UTide and LSTM algorithms were under ±0.5 m/s. In terms of RMSE and MAE values, the values of the LSTM algorithm were 0.125 and 0.099, respectively. This means that the LSTM algorithm had the highest accuracy among the four types of algorithms. Furthermore, the proposed tidal current velocity prediction considering the effect of the multi-layer current velocity method had higher prediction accuracy than the traditional single input prediction method.

Single Input Tidal Current Prediction Method
The proposed method was also applied at different depths of the sea (30 m under the sea). Four types of algorithms were adopted to compare the performance in tidal current prediction. Figures 14  and 15 show the comparison results of the single input prediction method with three machine learning algorithms and UTide (30 m under sea surface). Through these comparison results, it can be seen that the LSTM algorithm had much better performance than the other two machine learning algorithms.
In order to further compare the performance of each method, residual signals of the single input prediction method with three machine learning algorithms and UTide analysis results are given in Figure 16. It can be seen that the UTide and LSTM algorithms had higher accuracy than the other two algorithms. The prediction errors of the UTide and LSTM algorithms were under ±0.5 m/s. In terms of RMSE and MAE values, values of UTide were 0.177 and 0.138, respectively, while values of the LSTM algorithm were 0.145 and 0.115, respectively. This means that the LSTM algorithm had the highest accuracy among the four types of algorithms.

Tidal Current Velocity Prediction Considering Effect of the Multi-Layer Current Velocity Method
Apart from the traditional single prediction input method, the proposed tidal current velocity prediction considering the effect of the multi-layer current velocity method was also performed to validate the effectiveness. For input variables, the tidal current velocity at 30 m depth of the sea and the tidal current velocity difference (between 31 m depth of the sea and 30 m depth of the sea) were used as inputs of the proposed prediction method. Figures 17 and 18 illustrate the comparison results of the proposed method with three machine learning algorithms and UTide (30 m under sea surface). Through these comparison results, it can be seen that the LSTM algorithm had much better performance than the other two machine learning algorithms.
In order to further compare the performance of each method, the residual signals of the proposed method by using three machine learning algorithms and UTide are given in Figure 19. It can be seen that the UTide and LSTM algorithms had higher accuracy than the other two algorithms. The prediction errors of the UTide and LSTM algorithms were under ±0.5 m/s. In terms of RMSE and MAE values, values of the LSTM algorithm were 0.143 and 0.109, respectively. This means that the LSTM algorithm had the highest accuracy among the four types of algorithms. Furthermore, the proposed tidal current velocity prediction, considering the effect of multi-layer current velocity method, had higher prediction accuracy than the traditional single input prediction method in this case study.    Tables 2 and 3. In these comparative investigations, the proposed prediction method, traditional single input prediction method, and UTide were performed by using two sets of tidal current data. The results showed that the proposed prediction method combined with the LSTM algorithm had the higher prediction accuracy than the other methods performed in this paper. From the above two case studies, it can be seen that residual signals of BPANN and ELMAN had a time shift in the time series. With the prediction interval decreasing, the prediction accuracy of BPANN and ELMAN had a significant increase. The RMSE values of BPANN and ELMAN could reach 0.23 and 0.26 when the prediction interval was 5 min. This can further prove that the prediction performances of BPANN and ELMAN were poorer than the LSTM in tidal current prediction.

Conclusions
The tidal current velocity data, collected from Zhejiang Province, were used to validate the effectiveness of the proposed method. Comparative investigations were carried out to demonstrate the accuracy of the tidal current velocity prediction method. Four types of algorithms were adopted to compare the performance in tidal current prediction. Through the data analysis results, two conclusions can be obtained: (1) The proposed tidal prediction method (shown in Figure 3) had higher prediction accuracy than the traditional single input tidal current prediction method (shown in Figure 2); and (2) the proposed method combined with the LSTM algorithm had the best performance among all the comparative investigation cases in this paper.
This article provides a new type of tidal current data processing and prediction method combined with tidal depth information. The proposed method effectively improved the accuracy of the tidal current velocity prediction and contributes to tidal current energy development, tidal current machine energy capture, and extreme sea state control and avoidance.
Future work will try to implement the online real time function of the proposed tidal current prediction method and develop a real time tidal current prediction system based on the proposed method.