1 Introduction

More intensive economic activities in coastal zones trigger the necessity of constructing more long and flexible coastal bridges that usually cross vast and deep water. These sea-crossing bridges usually serve as the backbone in the transportation network connecting the islands and mainland. For example, Table 1 lists several major long-span bridges built in coastal zones in China since the late twentieth century. As evidenced from Table 1, with the development of the bridge construction technology, the forms of sea-crossing bridges are gradually diversified with increased span length, and the functions are also transformed from highway only to dual-use of highway and railway.

Table 1 Coastal bridges built in China since the late twentieth Century

The harsh environment, particularly huge waves and strong winds brought by tropical cyclones or hurricanes, as well as earthquakes, tides, and current, poses high challenges for the safety and resilience of these bridge structures during their service life. Many lessons have learned from hurricanes Ivan in 2004 and Katrina in 2005 that a large number of coastal low-lying bridges along the Gulf of Mexico were heavily damaged. Since then, many studies have been conducted on the bridge-deck-interaction (Bradner 2008; McPherson 2010; Sheppard and Marin 2009; Cuomo et al. 2009; Xu et al. 2018). The main reason for the bridge damage is that hurricane-induced storm surge and wave loads are not adequately accounted for in designing these low-laying bridges.

With the development of the bridge construction technology, coastal bridges may reach vast and deep ocean zones such that the marine environment at the bridge site would be more complex. Existing studies have shown that long span sea-crossing bridges are more vulnerable to extreme environmental loads (Zhu and Zhang 2017; Ti et al. 2018; Zhang et al. 2019a, b). For long span sea-crossing bridges, the structural stability and safety of the bridge tower and foundation are key issues since these structural components directly contact with the hydraulic forces. To disentangle these issues, Guo et al. (2016) took a bridge tower model as the experimental research object to test its vibration under coupled wind and wave loads, and concluded that the bridge tower will vibrate obviously when the structural frequency is close to the loading frequency, i.e., resonance would be dominant under the action of low-speed wind and regular waves. Meng et al. (2018) put forward a frequency spectrum method by considering the correlation between wind and wave loads based on theoretical analysis of experimental data. Wei et al. (2017) investigated the structural dynamic response of an elastic bridge tower model with a scale of 1:150 in a flume under the action of regular waves and current and observed the changes of the shear force and vibration amplitude at the pile foundation under different load situations.

To address the structural safety and resilience for coastal bridges under various extreme environmental conditions, quick and accurate prediction of the major loads and structural dynamic responses in advance would be highly desirable, especially for the stakeholders to make expedient decisions on the evacuation route before a hurricane landing. Therefore, time series prediction, from the perspective of timely evaluating the loads and structural dynamics for coastal bridges, is of high interest. Generally speaking, time series prediction is a regression prediction process, which uses the existing data for statistical analysis and data processing to predict their future values. Until now, the time series prediction technique has been substantially developed. The ARIMA (Autoregressive Integrated Moving Average Model), SVM (Support Vector Machine), random forest, ANN (Artificial Neural Network), XGBoost (Extreme Gradient Boosting), GRU (Gated Recurrent Unit), LSTM (Long Short-Term Memory Networks) and other machine learning models have emerged and extended for time series prediction purpose. Until now, the application of time series prediction techniques in bridge engineering is quite limited. Lee et al. (2008) applied the ANN model to evaluate the reliability of individual bridge elements and fixed the missing historical condition data. After that, a variety of machine learning techniques, including SVM, BP neural network (Back Propagation neural network), BDMs (Bayesian dynamic models), ARMA (Autoregressive Moving Average Model), are used to monitor the bridge’s health and assess its reliability (Yang and Zhou 2011; Li et al. 2012; Liu et al. 2014; Tang et al. 2015).

In recent years, time series prediction has been ever used in predicting the bridge conditions. For example, (Sun and Hao 2011) analyzed the girder deflection of the Xushui river bridge to establish a SHM (Structural Health Monitoring) system for early warning and found that the time series analysis can effectively predict the variations of structural response. Yi (2015) studied the internal stress of the bridge tower for a long span bridge subjected to typhoon and applied the BP neural network based on clustering to predict the tower stress, showing that the nonlinear time series prediction has high validity. (Gong and Li 2018) adhibited the RWTLS (robust weighted total least-squares) to predict two observed data sets for the pier settlement by taking the errors in the coefficient matrix and possible gross errors into consideration, proving that the RWTLS model can be much more reliable and accurate than LS (least-squares), RLS (robust least-squares) and WTLS (weighted total least-squares) models. Shi et al. (2019) adopted the liner regression model to predict the routine maintenance costs for reinforced concrete beam bridges where the logarithm of the historical routine maintenance cost is set as the dependent variable and the bridge age is taken as the independent variable. Kaloop et al. (2019) estimated the safety behavior of the Incheon large span bridge with the ARMA model and revealed that the bridge is safe under traffic loads. Liu et al. (2020) regarded the dynamic coupled extreme stresses of bridges as time series data and applied the Bayesian probability recursive processes to successfully predict the value of stresses. However, currently, there are rare studies on using time series prediction techniques for estimating the response of bridges under dynamic loads in coastal environment, which is essential in terms of the hazard prevention for coastal bridges.

This study aims to address the particular features of the major loads and structural dynamics for coastal bridges by using three competitive time series prediction techniques, the XGBoost, LSTM, and ARIMA. The three models are selected for their proved ability for precisely predicting and wide application in academic achievements. The ARIMA model, a combination of the AR (Autoregressive) model and MA (Moving Average) model, is specially proposed for the time series prediction with limited hyper-parameters, high accuracy and fast calculation speed. The XGBoost model is a newly proposed decision tree model. Based on the GBDT (Gradient Boosting Decision Tree) model, the XGBoost model has been developed to enhance the prediction accuracy and calculating speed. Since then, many participants won prizes in modeling competitions, e.g., Kaggle, with the XGBoost model, confirming its superiority. The LSTM model is a classical and widely used deep learning model and it well solves the gradient exploding and gradient vanishing problems. In addition, the overfitting problem can be reduced by regularization. The performances of these techniques are comparatively demonstrated in three typical cases, the wave-load-on-deck under regular waves, structural displacement under combined wind and wave loads, and wave height variation along with typhoon/hurricane approaching. The features of the statistical data sets associated with coastal bridges are representative and therefore, this study can provide guidance to resolve similar engineering problems with time-history prediction requirements.

2 Time series prediction techniques

2.1 ARIMA

The ARIMA model, known as Autoregressive Integrated Moving Average model, can be used for stationary and non-white noise time series forecasting. The ARIMA model consists of three aspects, capture the three key aspects of the model. AR for autoregression, I for integrated, and MA for moving average. Compared with the ARMA model, ARIMA model can deal with the non-stationary process by a degree of differencing. At present, many scholars have successfully used the ARIMA model combined with certain other technical means to predict a variety of data. For example, the ARIMA model, combined with the wavelet analysis, was used to predict the network flow, leading to a higher prediction accuracy than the original ARIMA model (Li et al. 2009). The ARIMA and DBN (Deep Belief Network) model were combined and applied to multiple classical datasets prediction, and find that to predict the value with DBN model and predict the error with ARIMA model separately can be a better choice than use the ARIMA model only (Hirata et al. 2015). The ARIMA model was also used in mechanical engineering to predict the residual life and fault conditions of mechanical products, e.g., estimating the service life of water pumps (Sanayha and Vateekul 2017) and the remaining useful life of aircraft engines (Ordóñez et al. 2019), where rather high prediction accuracy is attained. For applications in bridge engineering, Xin et al. (2018) predicted the structure deformation of a bridge with Kalman-ARIMA-GARCH (Generalized Autoregressive Conditional Heteroskedasticity) Model.

The ARIMA model is developed based on the ARMA model and the main equation of the ARMA model is given as follows.

$$ \left(1-\sum \limits_{i=1}^{p^{\prime }}{\alpha}_i{L}^i\right){X}_t=\left(1+\sum \limits_{i=1}^q{\theta}_i{L}^i\right){\varepsilon}_t $$
(1)

where p is the autoregressive order, q is the moving average order, Li is the lag operator, Xt refers to the real value at time t, αi indicates the parameters of the autocorrelation part for the model, θi refers to the parameters of the moving average part, and εt is the error term.

Assume that the polynomial \( \left(1-{\sum}_{i=1}^{p^{\prime }}{\alpha}_i{L}^i\right) \) has a unit root (1 − L) of multiplicity d, then the core equation of ARIMA model can be obtained as

$$ \left(1-\sum \limits_{i=1}^p{\varphi}_i{L}^i\right){\left(1-L\right)}^d{X}_t=\left(1+\sum \limits_{i=1}^q{\theta}_i{L}^i\right){\varepsilon}_t $$
(2)

where p = p − d, φi are the parameters of autocorrelation part of the model.

In Eq. (2), the value of d is the number of differences needed for stationary, aka the degree of differencing. The parameters of p, q, and d should be determined in establishing the model. In determining the specific value of p, q and d parameters, the autocorrelation coefficient and partial autocorrelation coefficient of the model need to be calculated firstly. The two coefficients can be roughly estimated by observing the graph of ACF (Autocorrelation Function) and PACF (Partial Autocorrelation Function), then precisely determined by grid search, information criterion function, thermodynamic diagram or other methods.

2.2 XGBoost

The XGBoost model, i.e., extreme gradient boosting, is an open source framework proposed by (Chen and Guestrin 2016) for the gradient enhancement, where the existing gradient boosting algorithm can be optimized. Because favorable prediction results have been obtained by using this model, it is widely used in machine learning competitions. Meanwhile, the XGBoost model performs excellently on the prediction of the sales volume, stock price, and traffic flow (Gurnani et al. 2017; Wang and Guo 2020; Lu et al. 2020). However, there are few applications of this algorithm for prediction tasks in engineering practices due to its the late advent. Chen et al. (2019) used the XGBoost model to predict the quality of welding and the error rate on the test set is 20.5%. (Zheng and Wu 2019) predicted the wind power by employing the XGBoost model and several other machine learning techniques, the BP neural network, classification and regression tree, random forests, and support vector regression and the result shows the XGBoost model attains the highest prediction accuracy.

The XGBoost model consists of many trees, each of which has its own number of layers. For a single tree, several functions can be added to predict the output, which is shown as

$$ {Obj}^{(t)}=\sum \limits_il\left({y}_i,{\hat{y}}_i^{\left(t-1\right)}+{f}_t\left({x}_i\right)\right)+\varOmega \left({f}_t\right)+C\kern11.25em $$
(3)

where \( l\left({y}_i,{\hat{y}}_i^{\left(t-1\right)}+{f}_t\left({x}_i\right)\right) \) is the loss function, yi is the target value, \( {\hat{y}}_i^{\left(t-1\right)} \) is the prediction of tree i-1, and ft(xi) is the prediction of tree i; Ω(ft) is the regular term; C is a constant.

By using the Taylor expansion to approximate the loss function, we have

$$ f\left(x+\Delta x\right)\approx f(x)+{f}^{\prime }(x)\Delta x+\frac{1}{2}{f}^{\prime \prime }(x)\Delta {x}^2\kern9.5em $$
(4)

Define the parameters gi and hi

$$ {g}_i={\partial}_{{\hat{y}}^{\left(t-1\right)}}l\left({y}_i,{\hat{y}}_i^{\left(t-1\right)}\right)\kern15em $$
(5)
$$ {h}_i={\partial}_{{\hat{y}}^{\left(t-1\right)}}^2\left({y}_i,{\hat{y}}_i^{\left(t-1\right)}\right)\kern15.25em $$
(6)

Then rewrite Eq. (3) as

$$ {Obj}^{(t)}\approx \sum \limits_i\left[l\left({y}_i,{\hat{y}}_i^{\left(t-1\right)}+{g}_i{f}_t\left({x}_i\right)+{h}_i{f}_t^2\left({x}_i\right)\right)\right]+\varOmega \left({f}_t\right)+C\kern5em $$
(7)

For the XGBoost algorithm, once the prediction result of the former t-1 trees is obtained, the tree t will then be added to predict the difference between yi and \( {\hat{y}}_i^{\left(t-1\right)} \). Therefore, the final predicted Obj is the sum of all trees by the end of the model construction. In the actual simulation, the maximum number of trees needed for the prediction and the deepest depth of each tree will be set as hyper-parameters to stop the tree splitting when the model complexity reaches the preset, thus preventing the overfitting.

2.3 LSTM

The LSTM model (long-short term memory model) was proposed by Hochreiter and Schmidhuber (1997), through which the gradient vanishing and exploding problems in previous deep learning models can be effectively avoided. Compared with the aforementioned two machine learning models, the LSTM model maintains some unique characteristics, while it requires more training time and thus is computationally costly. In addition, the LSTM model is highly dependent on the data size. For a relatively small data set, the prediction accuracy would fall below the expectation. However, for certain large data set, appreciable prediction accuracy can be thereby achieved. Until now, the LSTM model has been applied to assess the safety of industrial facilities, such as tailings ponds, as well as the heating and cooling equipment (Li et al. 2019; Wang et al. 2019). In the field of civil engineering, this model is ever employed to predict the failure of bearings, seismic response of nonlinear structures, and displacement of dams (Gu et al. 2018; Zhang et al. 2019a, b; Liu et al. 2020). Relatively high prediction accuracy was obtained in these studies.

Figure 1 shows the structure of the LSTM model with demonstrative three cells, where the inside structure of the middle cell associated with time t (in short, cell t) is explicated given. Note here ht − 1 represents the information transmitted from the cell t-1, ht refers to the short time memory output from cell t, xt denotes the newly acquired information, tanh function is the activation function.

Fig. 1
figure 1

Structure of LSTM model

Each cell in LSTM contains three key components: the forget gate, input gate, and output gate. The forget gate controls how much memories can be retained from cell t-1 at time t, the input gate determines the amount of information that can be transferred into cell t from xt, and the output gate decides the information that can be transferred to ht. The information at the forget gate, i.e., ft, can be expressed as

$$ {f}_t=\sigma \left({W}_f\bullet \left[{h}_{t-1},{x}_t\right]+{b}_f\right)\kern11.25em $$
(8)

where Wf and Wi, WC, Wo in the following equations are weight matrices, bf and bi, bC, bo in the following equations are bias vectors, and σ is a sigmoid function.

Consequently, at the input gate, the model obtains new information it and \( {\hat{C}}_t \) by

$$ {i}_t=\sigma \left({W}_i\bullet \left[{h}_{t-1},{x}_t\right]+{b}_i\right)\kern11.5em $$
(9)
$$ {\hat{C}}_t=\mathit{\tanh}\left({W}_C\bullet \left[{h}_{t-1},{x}_t\right]+{b}_C\right)\kern10.25em $$
(10)

Next, the memory transformed from the forget gate and input gate can be combined to get Ct

$$ {C}_t={f}_t\ast {C}_{t-1}+{i}_t\ast {\hat{C}}_t\kern12.5em $$
(11)

At last, the output gate outputs the result ot and ht as

$$ {o}_t=\sigma \left({W}_o\bullet \left[{h}_{t-1},{x}_t\right]+{b}_o\right)\kern11.75em $$
(12)
$$ {h}_t={o}_t\ast \mathit{\tanh}\left({C}_t\right)\kern14em $$
(13)

3 Demonstration cases

Common dynamic loads and structural responses for coastal bridge engineering can be roughly divided into three forms according to the characteristics of their amplitude and periodicity. For the first form, the load has a clear periodicity and its amplitude fluctuates within a certain range. For example, in case the bridge girder is fully submerged under the action of regular waves, the time histories of the wave forces on deck largely show this pattern. Secondly, the time-history data fluctuates within a certain range, whereas its frequency distribution is relatively complex and there are no obvious periodicities on the data; this data pattern can be witnessed on the time-history displacements of the tower top and mid span for long-span sea-crossing bridges under random waves and turbulence winds. As for the third form, the time-history data has certain tendency, generally increasing or decreasing with time. Demonstratively, the wave height variation along with typhoon approaching favors this pattern.

In this section, the aforementioned three machine learning techniques will be utilized in three demonstrative cases with typical datasets in the time domain. This aims to provide guidance for the structure health monitoring for coastal bridges during their service life.

3.1 Wave-load-on-deck under regular waves

In the design of long-span ocean bridges, ocean waves generally exert wave forces on the bridge pile foundation, thus indirectly affecting the time-history displacement of the main girder (superstructure). However, under special circumstances when hurricanes (or tropical cyclones) approach, the bridge girder may be partial or completely submerged due to the rising water level. In this scenario, the wave force will not only affect the bridge pile foundation but also impact the superstructure directly, probably leading to much more severe damage.

As evidenced from the damage of many low-lying bridges induced by Hurricanes Ivan and Katrina in 2004 and 2005, respectively, huge waves and rising storm surge largely lead to the superstructure, in the form of simply supported spans in most instances, displaced and/or falling from the bent (Okeil and Cai 2008; Padgett et al. 2008). Many subsequent studies reveal that the wave loads largely surpass the capacities of the supporting interface between the bridge superstructure and substructure (Douglass et al. 2006; Robertson et al. 2007; O'Connor and McAnany 2008; Robertson et al. 2011; Yuan et al. 2018; Huang et al. 2018; Xu et al. 2020).

It is noticed that Huang (2019) used a wave flume to experimentally investigate the variation of the time-history wave forces on the bridge superstructure under hurricane induced regular waves. The schematic diagram of the experimental setup is shown in Fig. 2, where the total length of the wave flume is 68 m and the regular waves are generated at the left boundary, with a distance of 39 m from the target bridge deck model. The wave induced loads on the deck model are measured by a force transducer placed adjacently above the deck model in a suspended rigid steel frame. Figure 3 shows a typical time history of the wave force in the transverse direction of the bridge, i.e., horizontal wave load, when the bridge superstructure is completely immersed. Because the measurement frequency of the transducer is 40 Hz, a total of 516 data points in the scope of the time history curve, corresponding to equal steps of data measurement, will be thereafter analyzed.

Fig. 2
figure 2

Flume arrangement for the experimental study by Huang (2019) (unit: m)

Fig. 3
figure 3

Typical time history of the horizontal wave force

As shown in Fig. 3, the wave period here is 2.5 s and the variation of the wave forces due to the presence of high frequency signals enables that the variation pattern is different in each period. This motivates the necessity of time series prediction of the wave forces, potentially benefiting the timely monitoring of the structural vibration and safety.

To start the work, the autocorrelation function is used to confirm the autocorrelation of wave forces in time series, and the result is shown in Fig. 4. In the figure, the abscissa represents the lag time step in wave force dataset, and the ordinate indicates the value of autocorrelation coefficient. As observed in Fig. 4, the horizontal wave force on the bridge superstructure has a strong autocorrelation in the time series. Note that the values of the structural force, displacement and other data at time t can all be regarded as the sum of itself at time t − 1 and the variation within the time period ∆t. In the following two demonstrated cases, the variation of data values also shows this pattern, and therefore the autocorrelation results will not be presented in the context for simplicity purpose.

Fig. 4
figure 4

Autocorrelation of data in time series

In the training procedure, the proportion of the training set, validation set and prediction set for the considered prediction models, the XGBoost, LSTM and ARIMA is correspondingly different for each model, as shown in Table 2. It should be noted that the amount of data required for the model training and the number of forecast steps for the ARIMA model are different with the other two models. In addition, there is no validation set for the XGBoost and ARIMA models.

Table 2 Model setup in the case of wave-load-on-deck under regular waves

Figure 5 shows the overall prediction results, along with the measured data by Huang (2019). Based on the comparison between the predicted results and the experiment data, it can be concluded that the prediction results by using the three models agree with the experiment data quite well, and the overall trend and the peak values, exhibited as the pulse component of the wave forces, can be favorably predicted in advance. The metrics of mean absolute error (MAE) and mean squared error (MSE) are used to evaluate the performance of three prediction models, and the results are listed in Table 3.

Fig. 5
figure 5

The prediction results in the case of wave-load-on-deck under regular waves

Table 3 Performance of three prediction models in the case of wave-load-on-deck under regular waves

By comparing the predictive power of the three models, it can be found that the XGBoost model features a higher prediction accuracy across multiple time steps when the autocorrelation coefficient remains over 0.5. The prediction accuracy of the LSTM model is relatively lower, probably because the LSTM model needs the validation set to support multiple rounds of training. When the original data set is small, the prediction accuracy will be lower due to the reduction of the training set. When the data collected for training is sufficiently large, the error will be reduced. The ARIMA model requires a small amount of data during training, and the accuracy on the predicted data can be similar to the results obtained by the XGBoost model. However, the disadvantage of the ARIMA model is that it predicts only one step ahead, which leaves a shorter response time after obtaining the predicted results.

3.2 Structural displacement under combined wind and wave loads

In the design of sea-crossing bridges, the influence of combined wind and wave loads is more obvious with the increasing of the bridge span, as well as the complex natural environment condition. Fang et al. (2020) carried out numerical analysis for a typical sea-crossing bridge under the combined action of wind and waves, and the overall elevation view of the prototype bridge is shown in Fig. 6. Based on the analysis, time histories of the vibration displacement with 250 s long at three key locations, the tower top, mid-span, and joint of the tower and main girder, as also shown in Fig. 6. Since the attenuation of the structural transient response takes certain amount of time after the load is applied, the time history displacement within the range from 50 s to 250 s is selected for the prediction analysis. During the calculation of the finite element model, the data is saved every 0.025 s. Therefore, the displacement response curve at each of the three discussed locations contains 8000 data points correspondingly. The time histories of the displacement obtained at the monitored locations are shown in Fig. 7.

Fig. 6
figure 6

Elevation view of the prototype bridge

Fig. 7
figure 7

Time histories of displacement at different monitored locations. a Mid-span. b Joint. c Tower top

The model parameter setup for the three prediction models is similar to that listed in Table 2. The prediction results of the structural displacement at three typical locations are shown in Fig. 8, where expected refers to the target time history curve from the finite element analysis.

Fig. 8
figure 8

Time history prediction of bridge displacement at three locations. a Mid-span. b Joint. c Tower top

Based on the analysis of the vibration response at three different locations on the bridge, it can be concluded that the response at the middle span is mainly consistent with the symmetric lateral vibration mode, thus the prediction results obtained by the three prediction methods agree with the simulated time-history displacement favorably. However, because the time history displacement at the other two locations consists of multiple vibration modes, the time autocorrelation is not as obvious as that associated with the mid-span vibration, resulting in more difficulties for the prediction task. Failures can be observed for both the XGBoost and LSTM models, such as the prediction misses the extreme values and prediction tendency goes in the reverse direction occasionally, leading to unfavorable prediction results. The ARIMA model can predict the future data much better, but the time step of predictions is still limited. Therefore, the time history displacement at the joint and tower top should be preprocessed before the model training.

Based on the analysis of the data in the frequency domain, the displacement response features large amplitudes at some frequencies, as shown in Fig. 9.

Fig. 9
figure 9

Frequency domain analysis for the time history displacement at joint and tower top locations. a Joint. b Tower top

The process of the optimized prediction can be specified as four steps. Firstly, for the vibration signals at the joint and tower top locations, the scipy and numpy modules of the Python language were used to particularly extract five most prominent vibration frequencies with corresponding maximum amplitudes. Then, the FFT (Fast Fourier transform) filter was applied to separate the extracted time history displacement signals from the raw data, and therefore, the extracted signals show the characteristics of stable frequency and strong time-autocorrelation, which indicates the prediction is more likely to get favorable results. As follows, the XGBoost and LSTM models are applied to predict the five sets of signals. Finally, the rest signals with lower amplitude can be summed up and predicted together. With this data preprocessing, the XGBoost and LSTM models perform well for the prediction task in the context of the time history displacement at the joint and tower top locations and attain higher prediction accuracy, as evidenced in Fig. 10.

Fig. 10
figure 10

Time history prediction by XGBoost and LSTM models with data preprocessing. a Joint. b Tower top

The MAE and MSE values predicted with raw data and preprocessed data are listed in Table 4. From the table, it can be seen that the prediction error of the two models decreases obviously after the preprocess, which means the machine learning models can better conclude rules from the preprocessed data.

Table 4 Comparison of the prediction results

To summarize, with certain data preprocessing, the XGBoost and LSTM models can yield desirable results for the prediction of the time-history structural displacement with complex frequency domain signals. In addition, the prediction time span is longer than that of the ARIMA model. Thus, it is promising to use both models for prediction tasks regarding datasets without obvious periodicity.

3.3 Wave height variation along with typhoon/hurricane approaching

Coastal Bridges may be often visited by typhoons or hurricanes in their service life. With the typhoon approaching, the wave height rises continuously, along with the particular storm surge. As a result, the bridge structure may be damaged by huge waves. However, since the transit time of typhoon is relatively short as compared with the previous two circumstances, the amount of collected data will be marginally limited. Furthermore, before the typhoon comes, the model training data cannot be collected in advance. In case of insufficient samples, the prediction accuracy of the model will be significantly affected. To solve the above two issues, an improved prediction framework for LSTM model after the rolling forecast prediction, as shown in Fig. 11, is proposed. The framework firstly gathers a small dataset to establish the initial model with k-fold verification method. Although training on future data sets and validating on past data sets is an inverse time series behavior, the k-fold verification can still result in appreciable accuracy. This is due to the fact that data sets have inherent characteristics that can be exploited. The next step is to gradually update the model in the following time steps by append new observations. When the accuracy of predicted value meets the criterion, it means that the model can be applied for the future prediction.

Fig. 11
figure 11

Schematic diagram for an improved prediction framework

Due to the lack of specific observation data for typhoons, a public dataset with certain variation trend is adopted here for demonstration purpose. The dataset processed in both the time- and frequency-domains is shown in Fig. 12.

Fig. 12
figure 12

Schematic diagram for wave height variation. a Time domain data. b Frequency domain data

In the training of the LSTM model, a small sample with 40 steps, i.e., data points, is firstly used, thus the initial model can be built. With the time moving, the data set can be augmented with real-time monitored data and the prediction model can be updated until the prediction accuracy meets the set criteria. As can be seen from the analyzed data in the frequency domain in Fig. 12 (b), the peak amplitude appears at the four frequencies, i.e., 0.08, 0.169, 0.25 and 0.33, which correspond to the input number of 12, 6, 4 and 3 data points for one batch size. The batch size put into the model should be emphasized, because when the batch size is too large for a single iteration, the model updating time will be longer, which will affect the immediacy of prediction. However, when the batch size is too small, the model update times before meeting the criteria will be excessive due to the information can be obtained in one update is insufficient. Therefore, in the process of model updating, the batch size being four is chosen in the present study.

Figure 13 shows the prediction results by using the three prediction models. In the updating procedure for the LSTM model, the prediction error is controlled within 5% after 5 epochs and the MAE for the LSTM model is 13.08 cm pertaining to the prediction set, indicating favorable fitting results have been obtained. By this time, the trained model can be used to predict the subsequent wave height.

Fig. 13
figure 13

Prediction for wave height variation by machine learning models

The XGBoost and ARIMA models, as Fig.13 shows, can marginally predict the tendency of the data series. Since the learning capability for these two techniques is relatively high, the prediction procedure can be initiated when the first group of data is collected, and subsequently the prediction model is updated in each following time step. However, the forecast accuracy is far less than that predicted by the LSTM model, as obvious time lag phenomenon is observed. Compare the MAE and MSE value of predictions given by three models in Table 5, it can also be concluded that the result of LSTM model is much more favorable than that predicted by the rest of the two models. The unfavorable prediction results by XGBoost and ARIMA model may be related to the difficulties in controlling the complexity of models’ architecture in the training process, thus overfitting in small sample learning would largely happen.

Table 5 Prediction errors of wave height

4 Concluding remarks

In this study, three machine learning techniques, i.e., the XGBoost (Extreme Gradient Boosting), ARIMA (Autoregressive Integrated Moving Average Model) and LSTM (Long Short-Term Memory Networks) were applied in three demonstrative cases with datasets that are closely related to the safety and resilience of coastal bridges during their service life. A typical data preprocessing method was adopted and an improved prediction framework for the LSTM model after the rolling forecast prediction was proposed to enhance the prediction accuracy. Based on the comparative results in the demonstration cases, the following conclusions can be obtained:

  1. 1.

    For datasets with clear periodicity, all three considered machine learning models demonstrate rather favorable performance in the time series prediction. Both the XGBoost and LSTM models can predict multi-step ahead, whereas a relatively larger accuracy on a small training dataset can be achieved by using the XGBoost model and employing the LSTM model cannot reach a high precision yet due to the partitioning ways on datasets. Therefore, it is necessary to ensure a sufficiently large dataset when using the LSTM model for time series prediction. By using the ARIMA model a high prediction accuracy is remained, but this model predicts only one step ahead.

  2. 2.

    For datasets with fluctuating values within certain range and complex frequency distribution, using the ARIMA model can achieve a relatively higher prediction accuracy on the original dataset than that associated with the XGBoost and LSTM models. However, with adopting a typical preprocessing method where the five most prominent wave bands with corresponding maximum amplitudes in the frequency domain are extracted for individual prediction, higher prediction accuracy can thus be achieved.

  3. 3.

    The LSTM model features with high prediction accuracy with an improved framework after the rolling forecast prediction, where overfitting issues can be avoided. The k-fold method and model updating overcomes the lack of data points to some extent. However, the low accuracy and phase lag phenomenon can be observed for the prediction results by using the XGBoost and ARIMA models and this is because overfitting in small sample learning usually occurs.

The availability of the data largely limits the model training process. Currently, the models have been trained based on the available datasets in the literature. Once given a larger data set, it is worth analyzing the model performance more extensively, especially for the rolling forecast models. The overfitting problem may then be resolved, but the efficiency of the model training needs to be emphasized.