Next Article in Journal
Artificial Intelligence Advancements for Accurate Groundwater Level Modelling: An Updated Synthesis and Review
Previous Article in Journal
AODs-CLYOLO: An Object Detection Method Integrating Fog Removal and Detection in Haze Environments
Previous Article in Special Issue
Multi-Objective Evolutionary Neural Architecture Search with Weight-Sharing Supernet
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Crested Porcupine Optimizer-Optimized CNN-BiLSTM-Attention Model for Predicting Main Girder Temperature in Bridges

1
School of Automation, Central South University, Changsha 410006, China
2
School of Civil Engineering, Central South University, Changsha 410006, China
3
CCCC Second Harbor Engineering Co., Ltd., No. 5 BRANCH, Wuhan 430040, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2024, 14(16), 7356; https://doi.org/10.3390/app14167356 (registering DOI)
Submission received: 24 July 2024 / Revised: 17 August 2024 / Accepted: 18 August 2024 / Published: 20 August 2024
(This article belongs to the Special Issue Evolutionary Computation Meets Deep Learning)

Abstract

:
Stage-built long-span bridges deform with temperature, affecting alignment to design needs. In this paper, a model for predicting temperature time series is proposed, which can predict temperatures in engineering practice and utilize the predicted results to adjust the elevation of stage construction. The model employs convolutional neural networks (CNNs) for initial feature extraction, followed by bidirectional long short-term memory (BiLSTM) layers to capture temporal dependencies. An attention mechanism is applied to the LSTM output, enhancing the model’s ability to focus on the most relevant parts of the sequence. The Crested Porcupine Optimizer (CPO) is used to fine-tune parameters like the number of LSTM units, dropout rate, and learning rate. The experiments on the measured temperature data of an under-construction cable-stayed bridge are conducted to validate our model. The results indicate that our model outperforms the other five models in comparison, with all the R2 values exceeding 0.97. The average of the mean absolute error (MAE) on the 30 measure points is 0.19095, and the average of the root mean square error (RMSE) is 0.28283. Furthermore, the model’s low sensitivity to data makes it adaptable and effective for predicting temperatures and adjusting the elevation in large-span bridge construction.

1. Introduction

Temperature changes can lead to the expansion and contraction of materials, resulting in the deformation of engineering structures. Particularly in materials such as concrete and steel, there are noticeable changes in the shape and dimensions of structures. Large-span complex bridge structures like cable-stayed bridges and suspension bridges cannot ignore the thermal effects such as strain and deflection induced by temperature [1,2]. Lei et al.’s research [3] showed that the tensile stress caused by lateral temperature gradients is significant and cannot be ignored in structural design. In the construction control of large-span concrete cable-stayed bridges, there are quite a few parameters affecting their control precision, with temperature changes having the greatest impact on bridge elevations. In the research by Innocenzi et al. [4], it was pointed out that temperature variations affect the dynamic testing results of newly constructed cable-stayed steel–concrete bridges. Ling et al. [5] found that the longitudinal displacement of the bridge increases with the rise in temperature throughout the day, indicating that temperature variations cause structural responses. Cao et al.’s research [6] indicates that temperature variations have a significant impact on bridge structures, including causing thermal expansion or the contraction of materials, temperature lags, and gradient changes. These factors may lead to displacement and deformation of the bridge, and they can even affect the stability and safety of the bridge. Liu et al. [7] employed a numerical analysis method based on measured temperature fields to study the effect of temperature on the elevation of the main beam. Meanwhile, under the influence of temperature, the main girder of a cable-stayed bridge will exhibit significant deflection, so timely temperature prediction can better assess the health condition of the bridge. Yue et al. [8] provided comparative values for bridge assessment by establishing a correlation model between temperature and temperature-induced deflection. The studies mentioned above calculated the effects of temperature on bridge deformation based on the measured temperature data and could not guide the temperature corrections for construction stage elevations in advance. Therefore, using a more accurate method to predict short-term temperature is of great practical value.
In the early days, people employed models such as the Autoregressive Integrated Moving Average (ARIMA) to forecast and model time series data [9]. In recent years, with the development of machine learning technology, more and more researchers have been engaged in the study of temperature prediction models, which essentially involve time series prediction. Wang K et al. [10] established a model for predicting the vertical and lateral temperature gradients of concrete box girders using a BP neural network optimized by a genetic algorithm, achieving good results. X Shi et al. [11] used support vector machines (SVMs) to predict temperature levels at specific locations. Both models exhibited high temperature prediction accuracy in terms of temperature prediction. However, considering the characteristics of time series—time dependency and periodic trends—traditional machine learning models may have certain advantages on specific datasets, but they may not effectively capture time-related information in trend data. Therefore, models better suited for handling time dependency and dynamic features have emerged, such as recurrent neural networks (RNNs), long short-term memory networks (LSTMs), gated recurrent unit networks (GRUs) [12,13,14,15], etc. These models can better capture the time relatedness and long-term dependencies in time series data.
According to the research, the long short-term memory (LSTM) network outperforms the autoregressive integrated moving average (ARIMA) in terms of performance [16]. Meanwhile, researchers compared the performance of the LSTM model with the SVM on time series data and concluded that LSTM outperformed the SVM in all scenarios [17]. Based on LSTM, Youru Li et al. proposed an LSTM training method incorporating evolutionary attention in 2019. In temperature prediction, this model can achieve competitive predictive performance [18]. Based on LSTM, scholars have further proposed a bidirectional long short-term memory network (BiLSTM). Experimental studies have shown that the BiLSTM model provides better predictions than LSTM models, but the BiLSTM model reaches equilibrium much slower than models based on LSTM [19].
To improve prediction performance, researchers have introduced hybrid models to integrate the strengths of each individual model. The hybrid prediction model combines data preprocessing, optimization algorithms, and ensemble neural networks. Gang Liu [20] proposed an architecture called Attention-based Convolutional Bidirectional Long Short-Term Memory (AC-BiLSTM) to handle sequential data, which achieved good results. This algorithm combines convolutional layers with attention mechanisms, improving the BiLSTM algorithm. The convolutional layer is used to extract information from the initial data, and the attention mechanism is used to give different weights to the output of the BiLSTM hidden layer. Z Wang et al. [21] derived the hyperparameters of the random forest (RF) model through the Bayesian optimization algorithm, enabling accurate assessments of the temperature field for the design, construction, and maintenance of large-span bridges. Zhang K et al. [22] proposed a temperature time series prediction model, which combined the Seasonal-Trend decomposition based on LOESS (STL) [23] decomposition method, Jump-Upward-Shift-and-Trend (JUST) algorithm, and bidirectional long short-term memory (Bi-LSTM) network [24], which integrated the advantages of various methods, eliminating the fluctuation influence of temperature time series and making accurate temperature predictions. It can be seen that the comprehensive use of models to improve prediction model accuracy is evident and also provides effective and reasonable ideas for solving our problems.
To enhance prediction accuracy, researchers have developed hybrid models that leverage the strengths of individual models. The hybrid prediction model incorporates data preprocessing, optimization algorithms, and ensemble neural networks. Gang Liu [20] introduced the Attention-based Convolutional Bidirectional Long Short-Term Memory (AC-BiLSTM) architecture, which effectively processes sequential data by combining convolutional layers with attention mechanisms to enhance the BiLSTM algorithm. Convolutional layers extract information from the initial data, while the attention mechanism assigns different weights to the BiLSTM hidden layer’s output. Z Wang et al. [21] utilized a Bayesian optimization algorithm to fine-tune the hyperparameters of a random forest (RF) model, enabling precise temperature field assessments for the design, construction, and maintenance of large-span bridges. Zhang K et al. [22] proposed a temperature time series prediction model that integrates the Seasonal-Trend decomposition based on LOESS (STL) [23], the Jump-Upward-Shift-and-Trend (JUST) algorithm, and a bidirectional long short-term memory (Bi-LSTM) network. This approach combines the strengths of various methods to reduce the fluctuation in temperature time series and deliver accurate predictions. These comprehensive model strategies significantly improve prediction accuracy and offer effective solutions to our challenges.
This paper proposes a model for bridge temperature prediction, which combines convolutional networks, attention mechanisms, and Bi-LSTM neural networks, as well as uses the Crested Porcupine Optimizer to optimize the parameters of the network. This model has stronger expressive power and generalization ability in temperature prediction tasks, accurately capturing the regularities of temperature changes and being applicable to various complex temperature transformation scenarios. The attention mechanism was initially used for visual image processing and has since been widely applied to sequence data processing and natural language processing (NLP) [23,25,26,27]. In our data, temperatures often exhibit phased different trends. The model with an attention mechanism can dynamically learn the importance of the input data at each time step, thereby improving the performance and generalization ability of the model. We also use the Crested Porcupine Optimizer (CPO) optimization algorithm to optimize the network model parameters, using the number of LSTM units, Dropout Rate, and Learning Rate as optimization parameters, as well as the model’s Loss as the fitness function for iteration to obtain the best parameters. Using the optimized model to predict temperature series can effectively capture the long-term dependencies of the temperature series and generate accurate forecast results.
The model can accurately predict the temperature of the main girder, providing important data support for bridge construction and maintenance. Our on-site measurements focus on the vertical temperature distribution of the bridge’s main girder and our predictions target these measurement points as well. The temperature data obtained on-site at the Xuefeng Lake Bridge reflects the vertical temperature distribution of the bridge’s main girder, with the distribution of measurement points shown in Figure 1. This study offers predictive data for analyzing the temperature distribution of the main girder, which can then be used to assess the impact of this temperature distribution on the vertical deformation of the main girder. By considering these impacts during construction, the elevation of the main girder can be adjusted to better meet the design requirements for the bridge’s alignment.
The main work of this paper is as follows:
  • We proposed a short-term bridge temperature prediction model based on the CPO-CNN-BilSTM-Attention model, which effectively captures the long-term dependence relationship of temperature sequences;
  • We used the CPO optimization algorithm to optimize the key parameters of the model to improve the accuracy of the model;
  • We used a large amount of real temperature data from Xuefeng Lake Bridge for extensive analysis, proving the generalization ability and stability of the model.
The rest of this paper is structured as follows: Section 2 discusses the processing and utilization methods of the data materials and the model. Section 3 outlines the experimental process and results, as well as the comparison of models. Finally, we present our thoughts and conclusions.

2. Materials and Methods

2.1. Data Materials

This study utilizes data from temperature measurement points on Xuefeng Lake Bridge in Anhua County, Yiyang City, Hunan Province, China. Spanning the Zhexi Reservoir, the bridge measures 1187 m in total length, with a main span of 500 m. It is a double-tower, double-cable-plane, semi-floating system, cable-stayed bridge, and it is a critical project for the Guanxin Expressway as the largest span steel–concrete composite girder cable-stayed bridge in Hunan Province. Temperature sensors installed vertically along the main girder provide surface temperature data from various positions, which we used to train models predicting the girder’s temperature. By analyzing the temperature distribution’s impact on the vertical deformation of the main beams during construction, we can adjust the construction elevation of the main girder. This adjustment ensures that the bridge’s line shape aligns better with design specifications.
The temperature data used in this study were collected from 23 June 2023 to 1 August 2023. Since higher temperatures have a significant impact on bridges, analyzing temperatures in spring, autumn, and winter is less meaningful. Therefore, we chose to use summer temperature data for model training and validation. Each day’s data consists of the temperature readings from 40 measurement points, with temperature recorded once per minute at each point. After preprocessing the data, we obtained 57,600 data points for each measurement point. We randomly selected data from 10 out of 40 temperature measurement points for model training, and the data of the remaining 30 measurement points were used for the model compare experiments. An example of a temperature sensor installation is shown in Figure 1.
Given the small time intervals of the selected data, it is exceptionally well-suited for validating and testing short-term prediction models, effectively meeting the demands of practical engineering applications. However, due to random sensor failures, the data obtained may contain unreasonable values. To address this issue, this study employed the multiple imputation method to handle the erroneous data [28].

2.2. Methods

In this part, we will introduce the methods used in the model proposed in this paper, as well as the conceptual framework of our model. The methods mainly include the attention mechanism, Bi-LSTM, and the CPO optimization algorithm.

2.2.1. Covolutional Neural Network (CNN)

Convolutional neural networks (CNNs) extract local features of input data through convolutional layers, followed by pooling layers to reduce spatial dimensions of features. The CNN structure proposed in this article consists of two One-dimensional convolutional layer (Conv1D), each followed by a One-dimensional max pooling layer (MaxPooling1D) and a Dropout layer. The first Conv1D layer utilizes 64 filters with a size-1 convolutional kernel and ReLU activation function. Subsequently, the MaxPooling1D layer performs pooling with a window size of 2. The second Conv1D layer employs 64 filters with a size-3 convolutional kernel, and it uses ReLU activation.
By utilizing different kernel sizes, the model can capture temporal information at different scales. The first convolutional layer, with a smaller kernel size, helps capture finer-grained features, while the second convolutional layer, with a larger kernel size, captures broader temporal patterns. MaxPooling layers reduce parameters count, mitigating overfitting risk while maintaining feature representativeness. The dropout layers randomly discard outputs of neurons to enhance model generalization. This combination of CNN layers provides rich feature representations for subsequent LSTM layers and attention mechanisms, enhancing the model’s capability to handle series data.

2.2.2. Bidirectional Long Short-Term Memory Model (Bi-LSTM) and Attention

Recurrent Neural Networks (RNNs) [12] are designed to process sequential data, capturing temporal dependencies by passing hidden states across time steps. Long short-term memory (LSTM) [14] is an enhanced RNN architecture that mitigates the gradient problem in sequence processing through the use of forget, input, and output gates. The forget gate discards unnecessary old information, the input gate records relevant new information, and the output gate determines how the current memory state is reflected in the output. These gates enable LSTM to effectively retain long-term information, making it ideal for sequence prediction problems. The structure of an LSTM is depicted in Figure 2.
The LSTM network structure consists of the following four steps: updating the forget gate, input gate, cell state, and output gate. Here are the specific four steps introduced below.
f t , i t , and o t represent the forget gate, input gate, and output gate at time t, respectively. W and b represent the corresponding weight coefficients and biases. h t 1 represents the hidden state at time t 1 . x t represents the input at time t, and c t represents the current time step’s cell state. c t ˜ is the candidate value vector. σ denotes the Sigmoid activation function [14].
Update the Forget Gate:
f t = σ ( W f · [ h t 1 , x t ] + b f ) .
Update the Input Gate:
i t = σ ( W i · [ h t 1 , x t ] + b i ) ,
c t ˜ = tanh ( W c · [ h t 1 , x t ] + b c ) .
Update cell state:
c t = f t · c t 1 + i t · c t ˜ .
Update the Output Gate:
o t = σ ( W o [ h t 1 , h t ] + b o ) ,
h t = o t · tanh ( c t ) .
The limitation of LSTM units lies in transferring information only in a single direction, while Bi-LSTM takes into account both forward and backward information, enabling it to capture richer contextual information. The structure of the bidirectional LSTM model is depicted in Figure 3.
To enhance the generalization capability of the Bi-LSTM, we introduced the self-attention mechanism, which allows the model to dynamically focus on important parts while processing sequences. This combination enables the model to better understand and utilize sequential data, thereby improving its performance and effectiveness.
Self-attention mechanism reduces reliance on external information and is better at capturing internal correlations within data or features. Computing attention involves three stages. In the first stage, the computation of the similarity or correlation between the query and each key (In our implementation of the Attention mechanism, the Key is the output obtained after a Bi-LSTM layer passes through a fully connected layer—the query vector comes from the intermediate representation generated by a convolutional layer) is conducted as follows:
The self-attention mechanism reduces reliance on external information and excels at capturing internal correlations within data or features. Computing attention involves three stages. In the first stage, the similarity or correlation between the query and each key is calculated. In our implementation, the key is derived from the output of a Bi-LSTM layer followed by a fully connected layer. The query vector originates from the intermediate representation generated by a convolutional layer. The computation is performed as follows:
s t = tanh ( w h h t + b h ) ,
where s t represents the attention score. w h , b h are the weight and bias of the attention mechanism. Respectively, h t refers to the input of the attention mechanism and also represents the hidden states in both directions of output by the Bi-LSTM.
In the second stage, the scores obtained from the first stage are normalized, and the attention scores are transformed using the softmax function, as shown in the following formula:
exp ( s t ) i = 1 t exp ( s t ) .
The final attention value is obtained by the weighted summation of values as shown in the formula:
s = i = 1 t a t h t .
The Bi-LSTM model with the addition of the Attention mechanism is shown in Figure 4.

2.2.3. Crested Porcupine Optimizer (CPO)

The crested porcupine, a sizable rodent species, is ubiquitous across the globe except for the Antarctic continent. It can be found in a variety of habitats, including forests, arid regions, rocky terrains, and sloping areas. The Crested Porcupine Optimizer (CPO) is an algorithm inspired by the crested porcupine’s defensive tactics, which encompass four levels of aggression: visual, auditory, olfactory, and physical confrontation, escalating in intensity. In the CPO framework, these tactics are mirrored by four separate search domains, each aligning with a specific defensive zone of the porcupine. Zone A represents the initial avoidance behavior, where the porcupine retreats from potential threats. When this initial tactic proves insufficient and predators persist, Zone B is activated, signifying the second line of defense. If the predator remains undeterred, Zone C is engaged, indicating the third level of defense. Finally, if all previous strategies fail, the porcupine resorts to Zone D, its ultimate protective measure, where it resorts to a direct physical confrontation to safeguard itself, potentially neutralizing the threat.
CPO consists of 4 stages:
  • Step 1 Population Initialization: Initialize the population by starting the search from an initial set of individuals (candidate solutions); the optimization problem in this paper consists of three dimension (three parameters to optimize: LSTM Unit, Learning Rate, Dropout Rate). The starting point for each dimension is set by random initialization. This is achieved through a formula, which is as follows:
    X i = L + r × ( U L ) , i = 1 , 2 , , N ,
    where N represents the population size, X i indicates the ith candidate solution in the search space, and L and U are the lower and upper boundaries of the search range, respectively. r is a vector initialized randomly between 0 and 1. The initial population can be represented as follows:
    X = X 1 X 2 X i X N = X 1 , 1 X 1 , 2 X 1 , 3 X 2 , 1 X 2 , 2 X 2 , 3 X i , 1 X i , 2 X i , 3 X N , 1 X N , 2 X N , 3 ,
    where X i , j indicates the jth position of the ith solution, and N represents the number of population size. We only have three network model parameters to optimize, so the dimension is assumed to be 3, meaning that the maximum value for j in x i , j is 3.
  • Step 2 Cycle Population Reduction (CPR) Technique: The CPR technique operates by periodically reducing the population size while preserving diversity to accelerate convergence. This strategy is analogous to the behavior of Cape porcupines, where not all individuals engage their defense mechanisms—only those that perceive a threat do so. In this method, some Cape porcupines are selectively removed from the population during the optimization process to quicken convergence and later reintroduced to maintain diversity. This helps avoid the risk of becoming trapped in local minima. The mathematical model for cyclic reduction in population size is shown in Equation (12), where T represents the number of cycles, t denotes the function evaluation, T m a x is the maximum value of the evaluation function, and N m i n is the minimum number of newly generated population individuals.
    N = N m i n + ( N N m i n ) × 1 t % T m a x T T m a x T .
  • Step 3 Exploration Phase: Utilize the first and second defense strategies for population search.
    • First Defense Mechanism
      When the CP detects a predator, it responds by agitating its feathers. Subsequently, the predator has two options: it can either advance toward the CP, thereby promoting exploration of the vicinity between the predator and the CP to expedite convergence; or it can retreat from the CP, thereby facilitating exploration of more distant areas to identify unexplored territories. This behavior is mathematically modeled using Equation (13):
      x i t + 1 = x i t + τ 1 × 2 × τ 2 × x C P t y i t ,
      where x C P t denotes the best solution of the evaluation function t , y i t denotes the position of the predator at the time of iteration t , τ 1 denotes a normally distributed random value, and τ is a random value in [ 0 , 1 ] .
    • Second defense mechanism
      In this mechanism, the CP makes sounds and threatens the predator. When the predator approaches the CP, the CP’s moans become louder. Mathematically modeling this behavior is achieved in Equation (14):
      x i t + 1 = 1 U 1 × x i t + U 1 × y + τ 3 × x r 1 t x r 2 t ,
      where r 1 and r 2 are two random integers between [ 1 , N ] , and t is a random number between [ 0 , 1 ] [29].
  • Step 4 Exploitation Phase: Utilize the third and fourth defense strategies for population search.
    • Third defense mechanism
      In this mechanism, the CP releases a foul odor that permeates its surroundings, thus deterring predators from approaching. The behavior is modeled using Equation (15):
      x i t + 1 = 1 R 1 × x i t + R 1 × x r 1 t + S i t × x r 2 t x r 3 t τ 3 × δ × γ t × S i ,
      where x i t denotes the position of the ith individual at iteration t , γ t represents the defense factor, r 3 denotes a random value between [ 1 , N ] , and δ controls the search direction. τ 3 is a random value between [ 0 , 1 ] , and S i t signifies the odor diffusion factor.
    • Fourth defense mechanism
      This mechanism is a physical retaliation. When a predator approaches the CP to initiate an attack, the CP responds with physical force. This interaction is modeled as a one-dimensional non-elastic collision, and it is mathematically represented by Equation (16):
      x i t + 1 = x C P t + ( α ( 1 τ 4 ) + τ 4 ) × δ × x C P t x i t τ 5 × δ × γ t × F i t ,
      where x C P t denotes the optimal solution obtained, τ 4 is a random value between [ 1 , 4 ] , α is the convergence rate factor, and F i t represents the average force affecting the CP.
The four defense mechanisms of CPO outlined above fall into two distinct categories: exploration and exploitation phases. During the exploration phase, a trade-off between the first and second defense mechanisms is executed when τ 6 < τ 7 , with τ 6 and τ 7 representing two randomly generated numbers between 0 and 1. In the exploitation phase, the third defense mechanism is employed when τ 8 < T f ; otherwise, the fourth defense mechanism is activated. T f is a constant ranging from 0 to 1, and it determines the trade-off between the third and fourth defense mechanisms. We present the simplified mathematical formula for updating the CP position as follows:
x i t + 1 = A p p l y eq . ( 13 ) τ 6 < τ 7 A p p l y eq . ( 14 ) , E l s e . τ 8 < τ 9 ( E x p l o r a t i o n ) i n e A p p l y eq . ( 15 ) τ 10 < T f A p p l y eq . ( 16 ) , E l s e . τ 9 τ 8 ( E x p l o i t a t i o n ) ,
where τ 6 , τ 7 , τ 8 , τ 9 , and τ 10 are generated within the range of 0 to 1, which is subsequently normalized to derive the desired result x i t + 1 .
In this study, we will treat the number of LSTM units, dropout rate, and learning rate as optimization parameters, constituting the population to be optimized. The neural network’s loss function will serve as the fitness function for iterative optimization [29,30,31].

2.2.4. CPO-CNN-BiLSTM-Attention Model

The model proposed in this paper consists of two main components: a deep learning network and an optimization algorithm. The deep learning network comprises a convolutional neural network (CNN), a bidirectional long short-term memory (Bi-LSTM) network, and a self-attention mechanism. After creating a time series with specific time steps, it is fed into the deep learning network. Initially, the input sequence passes through a CNN layer to extract local features. Subsequently, a dropout layer is applied to prevent overfitting. The sequence then enters a bidirectional LSTM layer to capture long-term dependencies within the input sequence and to output the entire sequence. Next, the attention mechanism function is invoked to perform attention-based weighting on the output of the Bi-LSTM layer. Finally, the weighted output is flattened into a one-dimensional vector through a flattening layer, followed by a fully connected layer to produce a linear value.
As shown in Figure 5, the deep learning network consists of a CNN layer, Bi-LSTM, and an attention mechanism for processing the output vector of Bi-LSTM. Firstly, at the input layer, the model takes a three-dimensional tensor with a shape of (batch size, time steps, input dimension). It then proceeds to the convolutional layer for one-dimensional convolution operation, comprising 64 filters, each with a size 1 and ReLU activation. This layer aims to extract local features of the sequence, while a dropout layer is utilized to randomly dropout some neurons during training to prevent overfitting. Secondly, the input sequence is passed to the Bi-LSTM layer, where it undergoes forward and backward learning to capture long-term dependencies within the sequence. The output is then processed by the attention mechanism, which weights the vector to allow the model to focus on crucial parts of the input sequence. Finally, the output is flattened into a one-dimensional vector using a flatten layer and fed into a fully connected layer, resulting in a linear value for prediction.
The process of applying the CPO algorithm to optimize the neural network model is illustrated in Figure 6. The optimization algorithm iteratively optimizes the parameters of our network model. We treat the LSTM units, dropout rate, and learning rate of the model as the population for the CPO algorithm. The loss value of the model serves as the fitness function, enabling optimization. In practice, this step is performed first to determine the optimal parameters of the model, thus eliminating the need for laborious manual tuning.

3. Results

3.1. Parameters Environment Setup and Loss Function Selection

In our study, the loss function used by the model is the mean squared error (MSE) function, which is expressed as follows:
M S E = i = 1 n ( y i h i ) 2 n ,
Among them, y i represents the true values, h i represents the predicted values, and n represents the length of the sequence. In the formal experiments, based on our observations, we set the number of epochs for traversing the dataset to 100. This decision was made because, after multiple tests, we noticed an increasing trend in the loss function on the validation set after 100 epochs. For other models, we also chose the corresponding number of epochs based on experimentation. We set the batch size to 32 and the time step to 10. The selection of the remaining three parameters, the number of LSTM units, the learning rate, and the dropout rate, will be optimized and discussed in the optimization module. Meanwhile, Adam optimizer was used in the experiments for its fast convergence speed.
The model proposed in this paper was trained on GeForce RTX3080 using Python 3.7 and Keras version 2.3.1 software and modules.

3.2. Choice of Evaluation Criteria

In order to objectively evaluate the temperature prediction capability of the model proposed in this paper, the root mean square error ( R M S E ), mean absolute error ( M A E ), and coefficient of determination ( R 2 ) were adopted as performance measurement metrics. The expressions for RMSE, MAE, and R 2 are as follows:
M S E = i = 1 n ( y i h i ) 2 n ,
M A E = i = 1 n | y i h i | n ,
R 2 = 1 i = 1 n ( y i h i ) 2 i = 1 n ( y i y ¯ ) 2 ,
where y i is the true value, y ¯ is the mean value of the time series, h i is the predicted value, and n is the length of the sequence.

3.3. Experimental Comparison

3.3.1. The Effect of Crested Porcupine Optimizer (CPO)

In this study, We utilized the Crested Porcupine Optimizer (CPO) algorithm on the dataset at the temperature measurement point 1 (because the data at point 1 are one of the few datasets that does not require preprocessing, as no dirty data were generated during sensor operation) to optimize the number of LSTM units, learning rate, and dropout rate. We set the number of iterations to 100 to more fully capture the optimization process, but the results showed that the model had already achieved good convergence around the 50th generation. The optimization results are shown in Figure 7 and Figure 8.
The effect of default parameters and optimized parameters on prediction accuracy was compared. The accuracy was further improved after optimization. As shown in Figure 9 and Figure 10, Figure 9 illustrates the prediction performance of the network model before parameters optimization, while Figure 10 shows the prediction performance after optimization.
After optimization, the number of LSTM units was set to 27, the learning rate to 0.0091, and the dropout rate to 0.3. The commonly used number of LSTM units is 64, but the optimized value of 27 may be due to the periodicity of the weather data, the relatively low complexity of the data, and the modest data volume. Excessive LSTM units could lead to overfitting and increase the computational resource consumption.
We conducted experiments on the models before and after optimization, selecting data from the remaining 30 temperature measurement points at the Xuefeng Lake Bridge for testing. For the ease of presentation, we chose to display the data from the first 15 temperature measurement points using the numbers 1–15 to represent different temperature measurement sites (The complete experimental results are in Table A1 of the Appendix A). The experiment results are shown in Table 1, and it can be observed that the three performance indicators of the optimized model all decreased.
In summary, using optimization algorithms for parameters optimization in deep learning networks not only reduces the workload of manual parameters tuning but also enables more extensive testing of different parameters, resulting in more intuitive results.

3.3.2. Model Evaluation

The model evaluation experiment consists of three stages. In the first stage, we conducted ablation experiments on the pre-optimized model to demonstrate the superiority of the optimized model. In the second stage, we compared different types of neural network architectures commonly used for handling time series data using the same test data as in Section 3.3.1. In the third stage, we performed residual analysis to observe the presence of any outliers. Residual analysis was conducted on five randomly selected datasets out of 30.
Firstly, ablation experiments were conducted on the pre-optimized model to demonstrate the superiority of the optimized model. Similarly, we selected data from the first 15 temperature measurement points for display, as shown in Table 2 (The complete experimental results are in Table A2 of the Appendix A). It can be observed from Table 2 that the R 2 values of all models are around 0.9, indicating that these models all have certain predictive capabilities. The model proposed in this paper achieved the highest R 2 score, while the predictive performance of the remaining models gradually decreased, indicating that optimization of the model was effective.
Secondly, different types of neural network architectures commonly used for handling time series data were compared. Transformer, as an excellent model in natural language processing, also exhibits excellent performance in time series data processing [32]. Meanwhile, GRU, as a variant of LSTM, combines the forget gate and the input gate into a single update gate and also plays a significant role in time series data processing. According to the data in Table 2, both the Transformer and GRU models achieved high levels of performance in temperature prediction. However, the proposed model in this paper achieved even better performance, with R 2 scores all above 0.97.
Table 2. Comparison of R 2 between different models.
Table 2. Comparison of R 2 between different models.
SiteBi-LSTMBi-LSTM-Attention *Transformer *GRU *Our Model
10.874330.888810.963470.965120.98343
20.862450.892090.944560.959240.98281
30.866650.889450.954370.958870.99022
40.865540.897550.948640.964760.98677
50.872210.882350.954320.965430.98043
60.864490.891120.965430.963230.97864
70.874230.878970.945520.948880.98221
80.869990.885110.948970.957320.97431
90.854220.875530.945330.953450.96943
100.861310.885550.953420.948760.97853
110.835110.821320.948860.954430.97432
120.858890.891810.963450.938870.97866
130.864320.878830.939950.963420.97562
140.857640.869940.943370.945430.97786
150.863120.874430.954320.951160.97434
* References [33,34,35] for the experimental model method.
We also conducted experiments to compare MAE and RMSE values. For the RMSE and MAE values of each model in the temperature prediction experiments across 30 temperature measurement points, we still display data from the first 15 measurement points (The complete experimental results are in Table A3 and Table A4 of the Appendix A). Observing Table 3 and Table 4, it is evident that our model has the lowest mean absolute error (MAE) and root mean square error (RMSE) values on average.
To visualize the MAE and RMSE values, we plotted the MAE and RMSE values to show the trend of changes. The Figure 11 and Figure 12 present the trend of MAE and RMSE for six models after conducting experiments on data from 30 temperature measurement points. The models, labeled as Model 1 to Model 6, are BiLSTM, BiLSTM-Attention, Transformer, GRU, CNN-BiLSTM-Attention, and Our model, respectively. From Figure 11 and Figure 12, it can be observed that Models 1, 2, and 3 exhibited significant fluctuations, while Models 3, 4, 5, and 6 showed much smaller fluctuations. Smaller fluctuation amplitudes indicate that the models are less sensitive to different data, have strong robustness against interference, and are better able to adapt to various data sets. Our model, in particular, has the lowest values for both MAE and RMSE, with virtually no fluctuations.
A more intuitive comparison of the various parameters of the models is presented in Table 5, which summarizes the average values for 30 temperature measurement points. Overall, our model performed at a higher level across all indicators, resulting in better predictive performance.
Thirdly, we randomly selected five sets of results for residual analysis. The residual distribution plots for the six models are shown in Figure 13, and the residual histograms are shown in Figure 14. It can be observed that there are no outliers, with all models’ residuals being within ±0.5. Our model and the CNN-BiLSTM-Attention model narrowed the residual range to between ±0.25. The histograms indicate that the residuals of all models are nearly normally distributed. Therefore, we conducted the Anderson–Darling test for normality. The results are presented in Table 6.
Based on the principle of the Anderson–Darling normality test, the models whose residuals are closest to a normal distribution are those with statistics less than the critical values at all significance levels. This indicates that their residuals conform to a normal distribution across all levels. According to the Table 6, the GRU model’s residuals do not conform to a normal distribution at the 15.0%, 10.0%, and 5.0% levels, only conforming at the 2.5% and 1.0% levels. The remaining five models have statistics below the critical values at all significance levels, indicating that their residuals conform to a normal distribution at all significance levels.
Finally, to more clearly demonstrate the effectiveness of each model, we selected data from the temperature sensor points that had the most corrupted data for evaluation, as shown in Figure 15, which displays 500 data points. It can be observed that several basic models performed averagely and exhibited significant fluctuations, indicating high sensitivity to data and inability to adapt to new test data. In contrast, Transformer, GRU, CNN-BiLSTM-Attention, and the proposed model in this paper all achieved relatively good results. Particularly, the proposed model shows a more appropriate prediction of the detailed trend of the data. The results indicate that our proposed model has better generalization performance and practicality.

4. Conclusions

This paper introduced a model for predicting temperature time series, providing a reliable basis for adjusting the elevation of bridge construction sites. The model integrates advanced machine learning techniques, utilizing convolutional neural network (CNN) layers for initial feature extraction and bidirectional long short-term memory (Bi-LSTM) layers to capture temporal dependencies. An attention mechanism enhances the model’s focus during training, allowing it to concentrate on the most relevant parts of the sequence.
The model’s parameters, including the number of LSTM units, dropout rate, and learning rate, were optimized using the CPO algorithm. Experimental results demonstrate that the proposed model outperformed six other models when evaluated on real data from temperature measurement points on the Xuefeng Lake Bridge. Its low sensitivity to data variations enables it to adapt well to different data environments. The model achieved good prediction accuracy and robustness and eliminated the need for manual network parameter tuning, significantly enhancing its practical value in engineering applications. By applying this model to analyze and predict the collected data, the construction or maintenance plans of the bridge can be adjusted in a timely manner. Overall, the model’s ability to accurately predict temperature sequences and its ease of use make it a valuable tool for bridge construction and other engineering applications requiring precise temperature forecasting.
Although this model has shown great potential in practical engineering applications, there is still room for improvement and expansion. Future work can focus on the following areas: first—further optimizing the algorithm to enhance the model’s adaptability to different types of bridges and variable environmental conditions and second—exploring the optimization of more hyperparameters to achieve superior performance.

Author Contributions

Conceptualization, Y.G. and F.G.; Methodology, Y.G., J.W., and F.G.; Software, J.W.; Validation, Y.G.; Formal Analysis, J.W., W.Y., and L.Y.; Investigation, W.Y., L.Y., and F.G.; Resources, W.Y., L.Y., and F.G.; Data Curation, J.W., W.Y., and L.Y.; Writing—Original Draft Preparation, J.W.; Writing—Review and Editing, Y.G.; Visualization, J.W.; Supervision, Y.G.; Project Administration, W.Y. and F.G.; Funding Acquisition, W.Y. and L.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the construction monitoring and technological support unit of the Malukou Zishui Bridge (No: H738012038).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request.

Conflicts of Interest

Authors Wenhao Yu and Lu Yi were employed by the company CCCC Second Harbor Engineering Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Appendix A

Appendix A.1

Table A1. The impact of optimization algorithms on the performance metrics of model prediction results.
Table A1. The impact of optimization algorithms on the performance metrics of model prediction results.
SiteCNN-BiLSTM-Attention CPO-CNN-BiLSTM-Attention
R 2 MAE RMSE R 2 MAE RMSE
10.9660.2190.344 0.9830.1820.266
20.9570.2230.304 0.9830.1940.284
30.9460.1970.307 0.9900.1860.300
40.9550.2310.354 0.9870.1920.274
50.9540.2150.293 0.9800.1860.264
60.9580.1900.345 0.9790.1870.284
70.9610.2120.345 0.9820.1970.267
80.9580.2260.288 0.9740.1920.299
90.9500.2170.298 0.9690.1830.292
100.9530.2290.366 0.9790.1970.284
110.9510.2240.289 0.9740.1810.271
120.9650.2020.338 0.9790.1860.288
130.9400.2100.349 0.9760.1880.276
140.9450.1930.304 0.9780.1870.299
150.9500.2310.320 0.9740.1940.268
160.9640.2180.328 0.9820.2020.277
170.9480.2070.315 0.9880.1910.295
180.9600.2250.341 0.9740.1850.302
190.9520.2200.337 0.9830.1890.282
200.9630.2090.321 0.9850.1960.365
210.9490.2240.357 0.9800.2030.298
220.9640.2020.335 0.9820.1940.274
230.9410.2160.312 0.9820.1880.290
240.9550.2280.348 0.9730.1910.307
250.9460.2070.327 0.9860.2020.272
260.9610.2210.313 0.9820.1850.295
270.9370.1980.340 0.9840.1980.271
280.9520.2300.355 0.9880.1940.396
290.9450.2170.332 0.9730.1880.262
300.9580.2030.319 0.9860.1910.283

Appendix A.2

Table A2. Comparison of R 2 between different models.
Table A2. Comparison of R 2 between different models.
SiteBi-LSTMBi-LSTM-Attention *Transformer *GRU *Our Model
10.874330.888810.963470.965120.98343
20.862450.892090.944560.959240.98281
30.866650.889450.954370.958870.99022
40.865540.897550.948640.964760.98677
50.872210.882350.954320.965430.98043
60.864490.891120.965430.963230.97864
70.874230.878970.945520.948880.98221
80.869990.885110.948970.957320.97431
90.854220.875530.945330.953450.96943
100.861310.885550.953420.948760.97853
110.835110.821320.948860.954430.97432
120.858890.891810.963450.938870.97866
130.864320.878830.939950.963420.97562
140.857640.869940.943370.945430.97786
150.863120.874430.954320.951160.97434
160.859870.887760.952270.961220.98168
170.862290.891850.957880.957580.98758
180.865890.877870.949860.962360.97384
190.871260.889950.961250.958770.98267
200.873680.893690.957580.961680.98547
210.868790.877570.951820.963490.97968
220.873450.890660.953480.961110.98239
230.867760.883450.961110.964860.98204
240.858890.871260.947760.955770.97267
250.872220.898330.959880.963330.98556
260.865550.889950.967770.961110.98222
270.871660.882230.950080.958770.98389
280.864440.896550.962920.964670.98765
290.858890.871260.947760.955770.97267
300.872220.898330.959880.963330.98556
* References [33,34,35] for the experimental model method.

Appendix A.3

Table A3. Comparison of R M S E between different models.
Table A3. Comparison of R M S E between different models.
SiteBi-LSTMBi-LSTM-AttentionTransformerGRUOur Model
12.514262.076630.614280.447540.26617
22.385021.877530.517780.372820.28363
32.507621.88290.636390.394350.30016
42.629751.958320.498560.482520.27366
52.599762.101680.499130.374420.26357
62.437661.929620.659530.432510.28448
72.396121.943320.663990.453680.26728
82.549352.07750.541920.484580.29876
92.615681.919650.599390.484120.29156
102.368671.944530.64740.442030.28403
112.38922.060060.494220.464120.27097
122.522992.072760.596830.397750.28839
132.442842.125220.497360.407450.27639
142.421691.898270.496290.452390.29923
152.515761.943240.503440.413480.26843
162.542892.013650.612470.459760.27654
172.455761.981670.583850.431820.29459
182.639762.047580.573860.492350.30164
192.408261.920470.641470.471620.28153
202.581762.083330.535760.421520.26495
212.475761.952560.602850.441780.29847
222.628762.070330.571250.491330.27444
232.510261.941530.639850.461230.28954
242.381762.014330.559760.431820.30654
252.569761.981230.589760.451230.27153
262.438562.052330.619760.481230.29544
272.541262.034560.589750.462340.27153
282.478891.958750.623850.438560.29567
292.611232.082230.547560.491230.26237
302.385671.945560.612480.473650.28348
Table A4. Comparison of M A E between different models.
Table A4. Comparison of M A E between different models.
SiteBi-LSTMBi-LSTM-AttentionTransformerGRUOur Model
11.646771.23750.396750.244780.18237
21.686441.344720.352360.232030.19445
31.529991.340040.373230.223590.1855
41.48361.123240.375940.289010.19172
51.492711.21690.34780.263260.18556
61.432841.24870.43570.259160.1872
71.493531.313240.493570.286810.19652
81.597241.248480.375780.286810.19235
91.411091.330960.324720.246730.18287
101.413701.124620.324870.231450.19655
111.519001.210410.361830.267010.18123
121.516121.318720.425540.233490.18607
131.445021.147680.391690.261470.18768
141.533191.343340.280660.258410.18694
151.604971.130750.351650.253830.19425
161.563881.251440.401760.277650.20235
171.474441.332250.364870.249480.19116
181.596591.158360.335490.281210.18473
191.422331.269990.395080.252720.18854
201.588751.320550.316940.263930.19642
211.578891.278990.352080.281220.20256
221.452331.324660.385980.262370.19437
231.592661.172240.316970.291560.18758
241.433991.298830.372240.252370.19116
251.576671.311440.342560.272560.20197
261.422331.205990.395980.241230.18474
271.588751.280550.316930.282930.19847
281.451231.324660.385980.262370.19437
291.592661.198830.316970.291560.18758
301.433991.298830.372240.252370.19116

References

  1. Fan, Z.; Huang, Q.; Ren, Y.; Xu, X.; Zhu, Z. Real-time dynamic warning on deflection abnormity of cable-stayed bridges considering operational environment variations. J. Perform. Constr. Facil. 2021, 35, 04020123. [Google Scholar] [CrossRef]
  2. Catbas, F.N.; Susoy, M.; Frangopol, D.M. Structural health monitoring and reliability estimation: Long span truss bridge application with environmental monitoring data. Eng. Struct. 2008, 30, 2347–2359. [Google Scholar] [CrossRef]
  3. Lei, X.; Fan, X.; Jiang, H.; Zhu, K.; Zhan, H. Temperature field boundary conditions and lateral temperature gradient effect on a PC box-girder bridge based on real-time solar radiation and spatial temperature monitoring. Sensors 2020, 20, 5261. [Google Scholar] [CrossRef] [PubMed]
  4. Innocenzi, R.D.; Nicoletti, V.; Arezzo, D.; Carbonari, S.; Gara, F.; Dezi, L. A Good Practice for the Proof Testing of Cable-Stayed Bridges. Appl. Sci. 2022, 12, 3547. [Google Scholar] [CrossRef]
  5. Li, L.; Shan, Y.; Jing, Q.; Yan, Y.; Xia, Z.; Xia, Y. Global temperature behavior monitoring and analysis of a three-tower cable-stayed bridge. Eng. Struct. 2023, 295, 116855. [Google Scholar] [CrossRef]
  6. Cao, Y.; Yim, J.; Zhao, Y.; Wang, M.L. Temperature effects on cable-stayed bridge using health monitoring system: A case study. Struct. Health Monit. 2011, 10, 523–537. [Google Scholar] [CrossRef]
  7. Liu, G.; Yan, D.; Tu, G. Effect of temperature on main beam elevation in construction control of concrete cable-stayed bridge. J. Chang. Univ. Nat. Sci. Ed. 2017, 37, 63–69+77. [Google Scholar] [CrossRef]
  8. Yue, Z.; Ding, Y.; Zhao, H.; Wang, Z. Case study of deep learning model of temperature-induced deflection of a cable-stayed bridge driven by data knowledge. Symmetry 2021, 13, 2293. [Google Scholar] [CrossRef]
  9. Box, G.E.P.; Pierce, D.A. Distribution of residual autocorrelations in autoregressive-integrated moving average time series models. J. Am. Stat. Assoc. 1970, 65, 1509–1526. [Google Scholar] [CrossRef]
  10. Wang, K.; Zhang, Y.; Liu, J.; He, X.; Cai, C.; Huang, S. Prediction of concrete box-girder maximum temperature gradient based on BP neural network. J. Railw. Sci. Eng. 2024, 21, 837–850. [Google Scholar] [CrossRef]
  11. Shi, X.; Huang, Q.; Chang, J.; Wang, Y.; Lei, J.; Zhao, J. Optimal parameters of the SVM for temperature prediction. Proc. Int. Assoc. Hydrol. Sci. 2015, 368, 162–167. [Google Scholar] [CrossRef]
  12. Rumelhart, D.E.; Hinton, G.E.; Williams, R.J. Learning representations by back-propagating errors. Nature 1986, 323, 533–536. [Google Scholar] [CrossRef]
  13. Lipton, Z.C.; Berkowitz, J.; Elkan, C. A critical review of recurrent neural networks for sequence learning. arXiv 2015, arXiv:1506.00019. [Google Scholar]
  14. Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
  15. Chung, J.; Gulcehre, C.; Cho, K.H.; Bengio, Y. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv 2014, arXiv:1412.3555. [Google Scholar]
  16. Siami-Namini, S.; Tavakoli, N.; Namin, A.S. A comparison of ARIMA and LSTM in forecasting time series. In Proceedings of the 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA), Orlando, FL, USA, 17–20 December 2018; pp. 1394–1401. Available online: https://ieeexplore.ieee.org/abstract/document/8614252/ (accessed on 21 May 2024).
  17. Lakshminarayanan, S.K.; McCrae, J.P. A Comparative Study of SVM and LSTM Deep Learning Algorithms for Stock Market Prediction. In Proceedings of the AICS, Wuhan, China, 12–13 July 2019; pp. 446–457. Available online: https://ceur-ws.org/Vol-2563/aics_41.pdf (accessed on 21 May 2024).
  18. Li, Y.; Zhu, Z.; Kong, D.; Han, H.; Zhao, Y. EA-LSTM: Evolutionary attention-based LSTM for time series prediction. Knowl.-Based Syst. 2019, 181, 104785. [Google Scholar] [CrossRef]
  19. Siami-Namini, S.; Tavakoli, N.; Namin, A.S. The performance of LSTM and BiLSTM in forecasting time series. In Proceedings of the 2019 IEEE International Conference on Big Data (Big Data), Los Angeles, CA, USA, 9–12 December 2019; pp. 3285–3292. Available online: https://ieeexplore.ieee.org/abstract/document/9005997/ (accessed on 5 June 2024).
  20. Liu, G.; Guo, J. Bidirectional LSTM with attention mechanism and convolutional layer for text classification. Neurocomputing 2019, 337, 325–338. [Google Scholar] [CrossRef]
  21. Wang, Z.; Zhang, W.; Zhang, Y.; Liu, Z. Temperature prediction of flat steel box girders of long-span bridges utilizing in situ environmental parameters and machine learning. J. Bridge Eng. 2022, 27, 04022004. [Google Scholar] [CrossRef]
  22. Zhang, K.; Huo, X.; Shao, K. Temperature time series prediction model based on time series decomposition and bi-lstm network. Mathematics 2023, 11, 2060. [Google Scholar] [CrossRef]
  23. Bahdanau, D.; Cho, K.; Bengio, Y. Neural machine translation by jointly learning to align and translate. arXiv 2014, arXiv:1409.0473. [Google Scholar]
  24. Chen, Q.; Xie, Q.; Yuan, Q.; Huang, H.; Li, Y. Research on a Real-Time Monitoring Method for the Wear State of a Tool Based on a Convolutional Bidirectional LSTM Model. Symmetry 2019, 11, 1233. [Google Scholar] [CrossRef]
  25. Li, J.; Jin, K.; Zhou, D.; Kubota, N.; Ju, Z. Attention mechanism-based CNN for facial expression recognition. Neurocomputing 2020, 411, 340–350. [Google Scholar] [CrossRef]
  26. Yu, Z.; Yu, J.; Fan, J.; Tao, D. Multi-modal factorized bilinear pooling with co-attention learning for visual question answering. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 1821–1830. Available online: https://openaccess.thecvf.com/content_iccv_2017/html/Yu_Multi-Modal_Factorized_Bilinear_ICCV_2017_paper.html (accessed on 5 June 2024).
  27. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. In Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017; Volume 30. Available online: https://proceedings.neurips.cc/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf (accessed on 5 June 2024).
  28. Jallal, M.A.; Chabaa, S.; El Yassini, A. Air temperature forecasting using artificial neural networks with delayed exogenous input. In Proceedings of the 2019 International Conference on Wireless Technologies, Embedded and Intelligent Systems (WITS), Fez, Morocco, 3–4 April 2019; pp. 1–6. Available online: https://ieeexplore.ieee.org/abstract/document/8723699 (accessed on 5 June 2024).
  29. Zang, J.; Cao, B.; Hong, Y. Research on the Fiber-to-the-Room Network Traffic Prediction Method Based on Crested Porcupine Optimizer Optimization. Appl. Sci. 2024, 14, 4840. [Google Scholar] [CrossRef]
  30. Abdel-Basset, M.; Mohamed, R.; Abouhawwash, M. Crested Porcupine Optimizer: A new nature-inspired metaheuristic. Knowl.-Based Syst. 2024, 284, 111257. [Google Scholar] [CrossRef]
  31. Hou, Y.; Deng, X.; Xia, Y. Precipitation Prediction Based on Variational Mode Decomposition Combined with the Crested Porcupine Optimization Algorithm for Long Short-Term Memory Model. AIP Adv. 2024, 14, 065315. [Google Scholar] [CrossRef]
  32. Li, S.; Jin, X.; Xuan, Y.; Zhou, X.; Chen, W.; Wang, Y.; Yan, X. Enhancing the locality and breaking the memory bottleneck of Transformer on time series forecasting. Adv. Neural Inf. Process. Syst. 2019, 32. Available online: https://proceedings.neurips.cc/paper/2019/hash/6775a0635c302542da2c32aa19d86be0-Abstract.html (accessed on 5 June 2024).
  33. Du, J.; Cheng, Y.; Zhou, Q.; Zhang, J.; Zhang, X.; Li, G. Power load forecasting using BiLSTM-attention. IOP Conf. Ser. Earth Environ. Sci. 2020, 440, 032115. [Google Scholar] [CrossRef]
  34. Zheng, W.; Chen, G. An accurate GRU-based power time-series prediction approach with selective state updating and stochastic optimization. IEEE Trans. Cybern. 2021, 52, 13902–13914. [Google Scholar] [CrossRef]
  35. Zhou, H.; Zhang, S.; Peng, J.; Zhang, S.; Li, J.; Xiong, H.; Zhang, W. Informer: Beyond efficient Transformer for long sequence time-series forecasting. Proc. Aaai Conf. Artif. Intell. 2021, 35, 11106–11115. [Google Scholar] [CrossRef]
Figure 1. One of the temperature sensors and data collection devices on the main girder.
Figure 1. One of the temperature sensors and data collection devices on the main girder.
Applsci 14 07356 g001
Figure 2. The structure of LSTM network.
Figure 2. The structure of LSTM network.
Applsci 14 07356 g002
Figure 3. The structure of Bi-LSTM network.
Figure 3. The structure of Bi-LSTM network.
Applsci 14 07356 g003
Figure 4. The Bi-LSTM model with the addition of the Attention mechanism.
Figure 4. The Bi-LSTM model with the addition of the Attention mechanism.
Applsci 14 07356 g004
Figure 5. The neural network component of the temperature prediction network model proposed in this paper.
Figure 5. The neural network component of the temperature prediction network model proposed in this paper.
Applsci 14 07356 g005
Figure 6. Flowchart of the CPO optimization algorithm applied to optimize the network model.
Figure 6. Flowchart of the CPO optimization algorithm applied to optimize the network model.
Applsci 14 07356 g006
Figure 7. Curve of optimization for number of LSTM units.
Figure 7. Curve of optimization for number of LSTM units.
Applsci 14 07356 g007
Figure 8. Curve of optimization for number of learning rate.
Figure 8. Curve of optimization for number of learning rate.
Applsci 14 07356 g008
Figure 9. Prediction performance before optimization of network model parameters.
Figure 9. Prediction performance before optimization of network model parameters.
Applsci 14 07356 g009
Figure 10. Prediction performance after optimization of network model parameters.
Figure 10. Prediction performance after optimization of network model parameters.
Applsci 14 07356 g010
Figure 11. The MAE value.
Figure 11. The MAE value.
Applsci 14 07356 g011
Figure 12. The RMSE value.
Figure 12. The RMSE value.
Applsci 14 07356 g012
Figure 13. Residual distribution of six models.
Figure 13. Residual distribution of six models.
Applsci 14 07356 g013
Figure 14. Histogram of residual distribution for six models.
Figure 14. Histogram of residual distribution for six models.
Applsci 14 07356 g014
Figure 15. Testing data on different models.
Figure 15. Testing data on different models.
Applsci 14 07356 g015
Table 1. The impact of optimization algorithms on the performance metrics of model prediction results.
Table 1. The impact of optimization algorithms on the performance metrics of model prediction results.
SiteCNN-BiLSTM-Attention CPO-CNN-BiLSTM-Attention
R 2 MAE RMSE R 2 MAE RMSE
10.9660.2190.344 0.9830.1820.266
20.9570.2230.304 0.9830.1940.284
30.9460.1970.307 0.9900.1860.300
40.9550.2310.354 0.9870.1920.274
50.9540.2150.293 0.9800.1860.264
60.9580.1900.345 0.9790.1870.284
70.9610.2120.345 0.9820.1970.267
80.9580.2260.288 0.9740.1920.299
90.9500.2170.298 0.9690.1830.292
100.9530.2290.366 0.9790.1970.284
110.9510.2240.289 0.9740.1810.271
120.9650.2020.338 0.9790.1860.288
130.9400.2100.349 0.9760.1880.276
140.9450.1930.304 0.9780.1870.299
150.9500.2310.320 0.9740.1940.268
Table 3. Comparison of R M S E between different models.
Table 3. Comparison of R M S E between different models.
SiteBi-LSTMBi-LSTM-AttentionTransformerGRUOur Model
12.514262.076630.614280.447540.26617
22.385021.877530.517780.372820.28363
32.507621.882900.636390.394350.30016
42.629751.958320.498560.482520.27366
52.599762.101680.499130.374420.26357
62.437661.929620.659530.432510.28448
72.396121.943320.663990.453680.26728
82.549352.077500.541920.484580.29876
92.615681.919650.599390.484120.29156
102.368671.944530.647400.442030.28403
112.389202.060060.494220.464120.27097
122.522992.072760.596830.397750.28839
132.442842.125220.497360.407450.27639
142.421691.898270.496290.452390.29923
152.515761.943240.503440.413480.26843
Table 4. Comparison of M A E between different models.
Table 4. Comparison of M A E between different models.
SiteBi-LSTMBi-LSTM-AttentionTransformerGRUOur Model
11.646771.237500.396750.244780.18237
21.686441.344720.352360.232030.19445
31.529991.340040.373230.223590.1855
41.483601.123240.375940.289010.19172
51.492711.216900.347800.263260.18556
61.432841.248700.435700.259160.18720
71.493531.313240.493570.286810.19652
81.597241.248480.375780.286810.19235
91.411091.330960.324720.246730.18287
101.413701.124620.324870.231450.19655
111.519001.210410.361830.267010.18123
121.516121.318720.425540.233490.18607
131.445021.147680.391690.261470.18768
141.533191.343340.280660.258410.18694
151.604971.130750.351650.253830.19425
Table 5. The average values of the metrics for each model.
Table 5. The average values of the metrics for each model.
 BiLSTMBiLSTM-AttentionTransformerGRUCNN-BiLSTM-AttentionOur Model
R 2 0.865050.883450.953840.958410.953470.98044
MAE1.519191.256900.366140.261780.214800.19095
RMSE2.498221.996370.579020.433580.327470.28283
Table 6. The Anderson–Darling normality test results for the six models.
Table 6. The Anderson–Darling normality test results for the six models.
ModelStatistic15.0% Level10.0% Level5.0% Level2.5% Level1.0% Level
BiLSTM0.347NormalNormalNormalNormalNormal
BiLSTM-Attention0.245NormalNormalNormalNormalNormal
Transformer0.232NormalNormalNormalNormalNormal
GRU0.871Not NormalNot NormalNot NormalNormalNormal
CNN-BiLSTM-Attention0.410NormalNormalNormalNormalNormal
Our Model0.280NormalNormalNormalNormalNormal
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Gao, Y.; Wang, J.; Yu, W.; Yi, L.; Guo, F. Crested Porcupine Optimizer-Optimized CNN-BiLSTM-Attention Model for Predicting Main Girder Temperature in Bridges. Appl. Sci. 2024, 14, 7356. https://doi.org/10.3390/app14167356

AMA Style

Gao Y, Wang J, Yu W, Yi L, Guo F. Crested Porcupine Optimizer-Optimized CNN-BiLSTM-Attention Model for Predicting Main Girder Temperature in Bridges. Applied Sciences. 2024; 14(16):7356. https://doi.org/10.3390/app14167356

Chicago/Turabian Style

Gao, Yan, Jianxun Wang, Wenhao Yu, Lu Yi, and Fengqi Guo. 2024. "Crested Porcupine Optimizer-Optimized CNN-BiLSTM-Attention Model for Predicting Main Girder Temperature in Bridges" Applied Sciences 14, no. 16: 7356. https://doi.org/10.3390/app14167356

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop