Real-time prediction of water level change using adaptive neuro-fuzzy inference system

ABSTRACT Accurate water levels modelling and prediction is essential for maritime applications. Water prediction is traditionally developed using the least-squares-based harmonic analysis method based on water level change (WLC) measurements. If long water level measurements are not obtained from the tide gauge, accurate water levels prediction cannot be estimated. To overcome the above limitations, the wavelet neural network (WNN) has recently been developed for the WLC prediction from short water level measurements. However, a new adaptive neuro-fuzzy inference system (ANFIS) model is proposed and developed in this paper. The ANFIS model is utilized to predict and select the WLC models of one month of hourly WLC for Yarmouth, Sain-John and Charlottetown stations in Canadian waters and compared with the current-state-of-the-art WNN model. The statistical analysis is applied to analyse the performance of the developed model in training and testing stages. The results showed an accurate modelling level using ANFIS technique for each station in training and testing stage. A comparison between the developed ANFIS method and the current-state-of-the-art WNN method shows that the accuracy of the developed ANFIS model is superior to the current-state-of-the-art model by 21.5% in average.


Introduction
Nowadays, the water level rise is become a high risk for the earth life with temperature change of the earth. The prediction models for sea water level changes with temperature changes and human activities have shown a high correlation between them (Hansen et al. 2010;Hay & Mimura 2010;Stocker et al. 2015;Tang et al. 2016;Aral & Guan 2016). Therefore, many monitoring points of tides have been established worldwide to monitor the water level change (WLC) in real-time monitoring system (IOC 2017). The tide gauges provide the water level which is caused by gravitation attraction (P erez et al. 2013;El-diasty & Al-harbi 2015). The maritime and coastal engineering applications and future planning around the shore lines of seas or oceans are dependent mainly on the accurate WLCs measurements and predictions.
Accurate WLC prediction models are required for maritime applications. Recently, many integrated methods were developed to predict the WLC (Karimi et al. 2013;El-diasty & Al-harbi 2015;. For example, Karimi et al. (2013) developed a prediction model that investigated CONTACT Jong Wan Hu jongp24@incheon.ac.kr the neuro-fuzzy inference system and artificial neural network (ANN) to predict the WLC and the results showed that the two models performance are similar to detect the WLC.  investigated the autoregressive moving average (ARMA) to model predict the WLCs for Alexandria tide gauge station in Egypt. El-rabbany and El-diasty (2003) applied an ANN model to detect some WLC in Canada, and it was shown that the ANN can be used to predict the WLC with high accuracy. Shiri et al. (2016) studied three computing approaches to predict the WLC of Urmia lake, Iran that developed ANN, genetic programming and Extreme Learning Machine and it was concluded that the performace of the three methods can be used to detect the WLC of lake with autocorrolation coeffienent equal 0.99. Also, ANN and neuro-fuzzy inference system models were investigated by Shiri et al. (2011) to predict Hillarys Boat Harbour WLCs in Western Australia and it was shown that the two models can be emplyed to forecast the water level with high accuracy. In addition, Kisi et al. (2012) forcasted a daily lake-level of one, two and three dayes, for the Lake Iznik in Turkey using the ARMA, ANN, neuro-fuzzy inference system and gene expression programming; and the results showed that the ANN, neuro-fuzzy inference system and gene expression programming provided a close results with short water level measurements. Morever, Kisi et al. (2012) showed that the three models provide accurate prediction results with the maximum variation of the root-meansquare error (RMSE) is 9 mm. In addition, Karimi et al. 2013 utilized the neuro-fuzzy inference system to predict a different periods of the water level measurements and they found that the accuracy of model is increased with short measurement period of water level. Kisi et al. (2012) and Kisi et al. (2015) concluded that due to the limit number of produce underestimated of the parameters of prediction models design, a high precision of the prediction water level models can be obtained. Most recently, El-diasty and Al-harbi (2015) developed the current-state-of-the-art wavelet neural network (WNN or wavenet) method and the comparison was made between the WNN model and the ANN and the traditional harmonic method for a three Canadian points and two Sauidi Araibain points. El-diasty and Al-harbi (2015) showed that the WNN outperforms ANN and harmonic method for predictiong the WLC. As well as, Shiri and Kisi (2012) found that the integration of wavelet with ANN can improve the RMSEs of the prediction model of sediment loads by 16.2%. In addition,  utilized the wavelet decomposition to improve the prediction model of daily river stage for the ANN, and it was found that the RMSEs performance of ANN model for the river stage can be improved by 29% with wavelet decomposition applied. For more details about other neural computing methods that were emplyed to predict the WLC, see the following references (Erol 2011;Nayak et al. 2013;Meng et al. 2016). Therfore, the neuro-fuzzy inference system and wavelet models are considered highly non-linear methods when integrated with neural networks solution and consequently can be considered as promisong techniques for the WLC (El-diasty & Al-harbi 2015; . The objective of this paper is to develop a reliable WLC prediction model that provides accurate WLC forecasting for maritime applications using a new highly non-linear model with short data-set (about a month) and a comparison is made between the developed model and the current-state-ofthe-art model for WLC prediction. Therefore, a new adaptive neuro-fuzzy inference system (ANFIS) model is proposed and developed in this paper. The ANFIS model is utilized to predict and select the WLC models of one month of hourly WLC for Yarmouth, Sain-John and Charlottetown stations in Canadian waters and compared with the current-state-of-the-art WNN model. The statistical analysis is applied to analyse the performance of the developed model in training and testing stages.

Data measurements
WLCs from three tide gauges, namely Yarmouth (Canada), Saint John (Canada) and Charlottetown (Canada) that are located were used to implement the proposed ANFIS model and compare the results with the current-state-of-the-art WNN model proposed by El-Diasty and Al-Harbi (2015).
More details for the three station water level monitoring and evaluation can be found in (Surge 2002;John 2011;Climate Central 2014). Figure 1 represents the WLC of three stations selections. The three tide gauges are digital tide gauges located in Canadian Atlantic region and were retrieved from the Canadian tide and water levels data archives website that are operated by Canadian Hydrographic Service and Fisheries and Oceans Canada (Fisheries & Oceans Canada 2017). In addition, the characteristics of the tide gauge of three stations are shown in Table 1. About one-month realtime monitoring is utilized for water modelling, as presented in Table 1. The whole data of water level of each station are divided into two stages, 696 training data and 168 testing data. The statistical analyses (mean, maximum (max), minimum (min), standard deviation (SD) and coefficient of variation (CV)) of the data-sets of three stations are proposed in Table 2. A good agreement is shown between the training and testing data-set for each station. That means that both of training and testing data-sets for each station represents almost a similar population. Herine, it should be noted that to overcome the risk of over fitting, about 20% of the training data-set samples (validation data-set) are not considered (unseen) in determining the model parameters and then utilized to validate the model parameters to avoid over-fitting where the model training is stopped at global minimum of the model error cost function of the validation part.

Prediction models design
In this study, two prediction models are investigated to predict the WLC of three stations in Canada. The WNNs or wavenet and ANFIS are utilized as an integration neural computing techniques (McGarry et al. 1999;Shiri et al. 2011;Tahmasebi & Hezarkhani 2012;Meng et al. 2016). The two methods are illustrated in the following sub-sections.

WNN model
The current-state of-the-art for sea WLC prediction is the WNN (so called WN-only in this paper) model that recently developed by El-Diasty and Al-Harbi (2015). The WNN model is a highly nonlinear model that proved to be an accurate prediction model for many applications. The water level prediction model is developed using WNN model with an outputĥ k computed as El-Diasty and Al-Harbi (2015): where c kÀi are coefficient variables, a i are dilation variables, b i are translation variables and C is a wavelet function. Figure 2 shows the wavelet network structure. The wavelet network consists of an input vector of N p values, a layer of N i weighted wavelets and an output vector of N j output neurons. The wavelet network parameters (c kÀi , a i , and b i ) can be estimated by a backpropagation-learning method. If N k is the number of outputs, h d k is the desired output values andĥ k is the network output estimated from Equation (1), then, the wavelet network training objective is to minimize the error function, E (El-Diasty & Al-Harbi 2015): The selection of the wavelet function depends on the application. There are several wavelet functions that can be used to develop the wavelet network model such as Morlet, Shannon and Mexican hat. We use the Mexican hat in this paper to implement the proposed nonlinear tide model. The Mexican hat wavelet function for any variable x is: where kxk 2 ¼ x T x; and p is the order of the model (4) The Mexican hat wavelet function is known as Laplacian operator and represents the second derivative of the Gaussian function (El-Diasty & Al-Harbi 2015). The structure of the wavelet network model is determined by empirical methods. The number of wavelet neurons can be determined by trying different architectures with different number of wavelet neurons to select the optimal number, based on the lowest model error (El-Diasty & Al-Harbi 2015). It should be noted that the dilation and transition properties of the wavelet function make the wavelet network much more dynamic, flexible, robust and promising methodology for water levels modeling and prediction than traditional artificial neural network method.

ANFIS model
The ANFIS theory is introduced and presented in Jang (1993). The ANFIS is a highly nonlinear model that integrate adaptive neural network with a fuzzy inference system (Jang 1993;Eldessouki & Hassan 2015). More discussions of the ANFIS model types, design and application can be found in Shiri  produce of use a neural network learning algorithm for constructing a set of fuzzy IF-THEN rules with selection appropriate membership functions (MFs) from the specified input and output data pairs is called ANFIS (Jang 1993;Shiri et al. 2011). In the ANFIS method, two parameters should be adjusted that are the premise and consequent parameters. The premise parameters determined the shape and behaviour of the MF, while the consequent parameters are the parameters of the function of fuzzy IF-THEN rules. The hybrid learning algorithm is utilized to adjust the two parameters (Tahmasebi & Hezarkhani 2012;Eldessouki & Hassan 2015). Eldessouki and Hassan (2015) summarized the hybrid learning algorithm of the ANFIS model to update the model parameters as follows cycle: (1) forward propagation with fixed a premise parameters and least square estimation to found the consequent parameters; and (2) backward propagation with fixed a consequent parameters and gradient descent estimation to update the premise parameters. This cycle continues until the desired performance is achieved based on trial and error procedures to minimize model errors.
The typical ANFIS model developed in this study is presented in Figure 3. The Takagi and Sugeno (TS) (Takagi & Sugeno 1985) fuzzy model is applied. Figure 3 illustrates the ANFIS model structure and MF used in this paper. For two input variables, the ST typical IF-THEN rules can be given as follows (Jang 1993): Rule 1: if x is A 1 and y is B 1 ; then f 1 ¼ p 1 x þ q 1 y þ r 1 (5) Rule 2: if x is A 2 and y is B 2 ; then f 2 ¼ p 2 x þ q 2 y þ r 2 (6) where A 1,2 and B 1,2 are the MF's of the inputs x and y, respectively. p 1,2 , q 1,2 and r 1,2 are the parameters of the output functions. In our case, the real-time monitoring of water level which measured by tidal sensor is used to predict the WLC. The time delay (d) of real-time monitoring of water level (h) is applied to forecast the water level at time t (h t ) based on the following mathematical form: Four model inputs are trail in this study to forecast the WLC (h t ) as follows: h t-1 ; h t-1 ,h t-2 ; h t-1 ,h t-2 , h t-3 and h t-1 ,h t-2 ,h t-3 ,h t-4 . The performance of each trail is evaluated to estimate a better model can be used in our case.

Models performance evaluation
A five evaluation parameters are used to assess the developed models for the prediction of WLC real-time measurements, which are the mean and maximum absolute error (MAE) and (XAE) are describes the average and maximum magnitude of the errors, model correlation (MC) provides information for linear dependence between observations and corresponding predictions, RMSE is considered the average magnitude of the errors by giving more weight on large errors and percentage of RMSE (PE) provides the percentage of the model error. The parameters calculations are given as follows: where h ip and h io are the predicted and observed of the WLC, respectively, at ith time interval; h, h o_mx ; h o_mi are mean, maximum and minimum observed of the WLC, respectively; and N is the number of the observed WLC data.

Results and discussions
In this section, the results of the developed ANFIS model are investigated and a comparison is made with the current-state-of-the-art WNN model. In the ANFIS model design, two parameters should be evaluated first that are MF numbers and type or shape for each input. The Charlottetown training data-set was selected to evaluate the development model. The Gaussian MF was used to evaluate the MF numbers and thee MF numbers were utilized to analyze the MF type. Moreover, four inputs were selected to evaluate the output prediction water level with 50 epochs. Table 3 illustrates the evaluation criteria of each parameter. From Table 3, it can be seen that the three MFs can provide accurate prediction model with low RMSE values. In addition, the Gaussian, Sigmoid and Generalized bell provide the best prediction models with almost similar RMSE values; however, the P-shape MF provides worst RMSE results. Therefore, it can be concluded that the Gaussian MF shape with three MF's can be selected to predict the WLC. In addition, the trails of model inputs are represented in Table 4 for the Charlottetown station. In this analysis, the three MF number and Gaussian shape MF with 50 epochs are utilized.
From Table 4, it can be shown that the four inputs variables ANFIS model provides the most accurate prediction solution for the WLC of Charlottetown station. In addition, it can be seen that with more input values the accuracy of model performance is improved. Figure 3 shows the implementation of ANFIS model with MF shapes and four delayed inputs to predict the WLC of Charlottetown station. It should be noted that the same ANFIS model structures were implemented for the Yarmouth and Saint John stations and the time delayed of each station was utilized to predict the WLC of each the two stations. Moreover, the input MF's for each station was designed based on three MF's.
To validate the developed ANFIS model, the current-state-of-the-art WNN model was implemented using the three stations. To develop the wavelet network model, the sequential approach was followed to prepare the input-output data-sets. In this sequential approach, the past values of the water level measurements are used as input to the wavelet network and future values of the water level measurements are used as the desired output. The structure of the wavelet network developed by El-Diasty and Al-Harbi (2015) was built where it was found that the wavelet network with the structure (24-12-1) provides the best solution with the lowest RMSE.
The comparison between the developed ANFIS model and the WNN model with the three stations are shown in Figures 4, 5 and 6. Moreover, Figure 7 illustrates zoom-in of the observation and the prediction models results for the part of the training (600»696 h) and testing (697»800 h) sets for the three stations. Figure 4 illustrates the Yarmouth training and testing data-set; Figure 5 represents the Saint John scatter of training and testing data-set; and Figure 6 shows the training and testing data-set of Charlottetown station. In addition, the correlation coefficient and linear fitting equation are presented on each Figure. Table 5 illustrates the statistical performance of the developed models for the three stations also. The scatter plots of training and testing Yarmouth station in Figure 4 and the statistical performance in Table 5 show that the WNN and ANFIS models can be accurately employed to forecast the WLC of station. In addition, the WNN and ANFIS models provide almost the same performance with almost the same RMSE values in training stage, while the ANFIS model outperforms the WNN in testing (prediction) stage (about 20.5% improvement). Furthermore, the correlation coefficient and linear fitting of predicted water level with observed water level in the testing stage for the ANFIS model is about 94.0%. Therefore, it can be concluded that the ANFIS model performance is superior to the WNN model to predict the WLC of the Yarmouth station.
The scatter plots of training and testing Saint John station in Figure 5 and the statistical performance in Table 5 show that the WNN and ANFIS models can be accurately employed to forecast the WLC of station. In addition, the WNN and ANFIS models provide almost the same performance with almost the same RMSE values in training stage, while the ANFIS model outperforms the WNN in testing (prediction) stage (about 21.2% improvement). Furthermore, the correlation coefficient and linear fitting of predicted water level with observed water level in the testing stage for the ANFIS model is about 97.9%. Therefore, it can be concluded that the ANFIS model performance is superior to the WNN model to predict the WLC of the Saint John station.
The scatter plots of training and testing Charlottetown station in Figure 6 and the statistical performance in Table 5 show that the WNN and ANFIS models can be accurately employed to  forecast the WLC of station. In addition, the WNN and ANFIS models provide almost the same performance with almost the same RMSE values in training stage, while the ANFIS model outperforms the WNN in testing (prediction) stage (about 22.7% improvement). Furthermore, the correlation coefficient and linear fitting of predicted water level with observed water level in the testing stage for the ANFIS model is about 95.5%. Therefore, it can be concluded that the ANFIS model performance is superior to the WNN model to predict the WLC of the Charlottetown station. In addition, from Figure 7, it can be seen that the correlation of two models for the prediction of WLC is high with the measurements values for the three stations. Moreover, it can be seen the performance of ANFIS model is better with a two stets when compared with the WNN model. The model errors of the three stations are represented in Figure 8. From this figure, it can be seen that a high correlation in-between the two model errors are recorded in the training stage; while the high error is observed for the WNN models in the testing stage. Moreover, the accuracy of ANFIS model is higher than WNN in the testing stage by 20.5%, 21.2%, and 22.7% for the Yarmouth, Saint John and Charlottetown stations, respectively. However, it can be concluded that the ANFIS model is more accurate than WNN model to predict the WLCs. In addition, the ANFIS model can be used to predict the short-period real-time WLC as presented in the study results.

Conclusions
Hourly WLCs from three tide gauges, namely Yarmouth (Canada), Saint John (Canada) and Charlottetown (Canada) were used to implement the developed ANFIS model and compare the results with the current-state-of-the-art WNN model to obtain accurate WLC prediction model for maritime applications based on short-period of water level measurements from the three stations. It is shown that the ANFIS model using the Gaussian MF shape with three MF's and four time delay gave the best performance solutions based on the minimum RMSE vlaue, and therefore was used in modelling and predicting the WLCs. A comparison between the developed ANFIS method and the current-state-of-the-art method shows that the RMSE values of the developed ANFIS model when compared with the RMSE values of the WNN model are reduced by about 20.5%, 21.2% and 22.7% for Yarmouth, Sain-John and Charlottetown stations, respectively. Therefore, the developed ANFIS model is superior to the current-state-of-the-art WNN model by 21.5% in average.