An assembled frame structure earthquake response prediction algorithm based on an LSTM algorithm

By constructing a seismic response prediction model for aluminum alloy foamed concrete structures using the LSTM algorithm, the problems of low prediction accuracy and efficiency in existing technologies are solved, enabling rapid and accurate prediction of structural seismic response and supporting seismic analysis and engineering design.

CN122471248APending Publication Date: 2026-07-28INST OF DEFENSE ENG ACADEMY OF MILITARY SCI PLA CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610622054.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-08
Publication Date
2026-07-28

AI Technical Summary

Technical Problem

Existing technologies for predicting the seismic response of aluminum alloy foamed concrete structures suffer from low prediction accuracy and low computational efficiency, especially in high-dimensional complex structures and real-world earthquake scenarios where computational costs are excessively high.

Method used

An LSTM-based seismic response prediction algorithm for prefabricated frame structures is adopted. By establishing a seismic response database, constructing an inter-story displacement prediction model, conducting sensitivity analysis, selecting the model with the minimum verification loss, and using a recursive slicing and stepwise update mechanism for rapid prediction.

Benefits of technology

It enables rapid and accurate prediction of the seismic response of aluminum alloy foam concrete structures without the need for finite element iterative calculations, improving prediction accuracy and efficiency, and is suitable for seismic analysis and engineering design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122471248A_ABST
    Figure CN122471248A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of assembled frame structure earthquake response prediction algorithm based on LSTM algorithm, by establishing full-scale structure model and using ABAQUS to carry out nonlinear time-history analysis, obtain ground motion and inter-story displacement response data, construct structure earthquake response database.Based on the numerical simulation result, establish deep learning architecture, by the sensitivity study of window length, hidden layer and training sample size, use R and RMSE such as index to evaluate model performance, and select the model with minimum validation loss as the final prediction model.In the prediction phase, input any ground motion record can quickly generate complete inter-story displacement time-history through recursive slicing and step-by-step updating mechanism, so as to realize the efficient estimation of aluminum alloy foam concrete structure earthquake response.The present application can replace the high-cost iterative calculation of traditional finite element analysis, and provide fast and reliable decision support for regional seismic risk assessment, structure safety determination and aluminum alloy foam concrete structure seismic design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of structural engineering and intelligent construction, specifically relating to an algorithm for predicting the seismic response of prefabricated frame structures based on the LSTM (Long Short-Term Memory) algorithm, and more particularly to a fast algorithm for predicting the seismic response of aluminum alloy foam concrete structures based on the LSTM algorithm. Background Technology

[0002] With the rapid development of prefabricated and green building concepts, lightweight, efficient, and sustainable structural systems have gradually gained widespread attention in the engineering field. Aluminum alloy foamed concrete composite structures, due to their light weight, convenient construction, strong corrosion resistance, and excellent energy absorption characteristics, are considered a new type of prefabricated structure with broad application prospects. This system utilizes an aluminum alloy skeleton to provide the main load-bearing capacity, while the foamed concrete plays a role in restraint, energy dissipation, and thermal insulation. The synergistic effect of both significantly improves the structure's seismic performance, load-bearing capacity, and ductility. Currently, this type of structure has begun to be used in railway section buildings, training facilities, and emergency housing, demonstrating superior assembly efficiency and economy.

[0003] As a type of prefabricated structure, the seismic performance of aluminum alloy frame-foamed concrete structures is affected by factors such as connection nodes and seismic load characteristics, and its dynamic response mechanism exhibits highly nonlinear and time-varying characteristics. Classical methods for analyzing the dynamic response of prefabricated structures typically utilize nonlinear time-history analysis capabilities based on mechanical principles, such as the finite element method (FEM). However, the long computational steps and fine meshing required for FEM nonlinear analysis lead to excessive computational costs, especially in high-dimensional complex structures and real-world seismic scenarios.

[0004] Therefore, improving the accuracy and efficiency of seismic response prediction for aluminum alloy foamed concrete structures to address the challenge of testing costs is an urgent problem to be solved. Summary of the Invention

[0005] This invention provides a seismic response prediction algorithm for prefabricated frame structures based on the LSTM algorithm. The technical problem to be solved is: To address the above technical problems, this invention provides a seismic response prediction algorithm for prefabricated frame structures based on the LSTM algorithm, characterized by the following steps: S1. Establish a full-scale prefabricated frame structure model, perform nonlinear time history analysis based on ABAQUS, obtain ground vibration and inter-story displacement response data, construct a seismic response database, and divide the dataset in the database into training set and test set; S2. Construct an inter-story displacement prediction model based on the LSTM algorithm; S3. Sensitivity analysis was performed on the window length, number of hidden layers, and training sample size of the inter-story displacement prediction model. The R² and RMSE indices were used to evaluate the model performance. S4. Select the model with the minimum validation loss as the final prediction model; S5. Based on the final prediction model, when the structure is subjected to any seismic load, the seismic curve is used as the model input, and the inter-story displacement value is output to determine whether the structure is within the safety threshold.

[0006] Furthermore, in step S1, the structural model is a three-layer aluminum alloy foam concrete room with dimensions of 3m×3m×3.5m, a seismic fortification intensity of 8 degrees, a peak ground acceleration of 0.2g, a site category of Class II, a characteristic period of 0.4s, and an input seismic wave of EL-Centro.

[0007] Furthermore, the interlayer displacement prediction model includes an input layer, a hidden layer, a long short-term memory network layer, and an output layer. The long short-term memory network layer includes a forget gate, an input gate, and an output gate, and its calculation method is as follows: (1) (2) (3) (4) (5) (6) , , These are the output values ​​for the update gate, forget gate, and output gate, respectively. for t The input time series vector at each time step; express( t –1) The output vector of the Long Short-Term Memory (LSTM) layer at time step; , , , This is the weight coefficient matrix for each part; , , , This is a matrix of deviation values ​​for each part; σ The activation function is the sigmoid function; This is the new unit input vector obtained through the nonlinear transformation of the tanh function; This is a new cell state vector obtained under the control of the forget gate and the update gate, which combines the memory of the previous time step and the input data of the current time step. This is the final output value under the control of the output gate.

[0008] Furthermore, in step S5, the inter-story displacement prediction model generates complete inter-story displacement values ​​through a recursive slicing and stepwise update mechanism. The recursive slicing and stepwise update mechanism includes: Add a zero matrix at the beginning of the time series as the initial state; Input features are extracted using a sliding window method to predict the displacement response at the next time step; The predicted values ​​are updated to the input sequence, and the complete time history is predicted recursively.

[0009] Furthermore, the model performance evaluation metrics include mean squared error, mean absolute error, mean absolute error ratio, and coefficient of determination.

[0010] Furthermore, the inter-layer displacement prediction model adopts a stacked structure, containing multiple hidden layers, with a discard layer set in each layer to prevent overfitting.

[0011] Furthermore, the algorithm is applicable to seismic analysis, rapid evaluation, and engineering design of aluminum alloy foamed concrete structures.

[0012] Furthermore, the training data comes from shaking table tests and finite element simulations, with the input being the seismic acceleration time series and the output being the inter-story displacement response time series.

[0013] Furthermore, for the n seismic wave data in the training set, the slice data of each seismic wave is integrated to form a three-dimensional array Xt of input features and output label Yt. The data input to the neural network are paired with features Xt and labels Yt to establish a training set database, and the mapping relationship between data features and labels is learned through training.

[0014] Furthermore, the model makes predictions based on the test set data: the acceleration sequence A of the test set is known, the seismic displacement response sequence D of the test set is unknown, and the input to be sliced ​​from the complete test set is X=(A,D). T The model output starts from time w+1. To predict the seismic response up to time w, a zero matrix X1 of length w is added before the complete time series, using the same slicing method as the training set. At time t=1, the corresponding model input is X1, and the model outputs the predicted value. Then, the d1 value is updated to the corresponding response sequence D in X, and the sliding slice is used to extract the input X2 at the next time step, which participates in the prediction of the response Y2 at the next time step. Similarly, the complete time series is predicted by recursion.

[0015] Beneficial Effects: Due to its superior performance in processing time-series data, the LSTM algorithm is considered an important tool for earthquake response prediction. The LSTM algorithm uses the structural responses under different seismic load curves as a training set, and through multiple iterations, it meets the accuracy requirements for rapid prediction. When a new seismic load curve is input, this method can rapidly predict the response of aluminum alloy frame-foam concrete structures under seismic loads based on a seismic response database and an iterative model, without relying on physical and numerical simulation experiments. R² and RMSE metrics are used to evaluate model performance, and the model with the minimum validation loss is selected as the final prediction model.

[0016] In the prediction phase, any ground motion record can be input to quickly generate a complete inter-story displacement time history through recursive slicing and stepwise update mechanisms, thereby achieving efficient estimation of the seismic response of aluminum alloy foamed concrete structures. This invention can replace the high-cost iterative calculations of traditional finite element analysis, providing rapid and reliable decision support for regional seismic risk assessment, structural safety determination, and seismic design of aluminum alloy foamed concrete structures.

[0017] Compared with the prior art, the advantages of the present invention are as follows: 1. Enhancing Prediction Accuracy and Dynamic Feature Capture: This invention improves prediction accuracy by optimizing the parameters of the machine learning model through algorithm optimization. Simultaneously, it conducts parameter sensitivity analysis of the model architecture to determine the optimal sample input, number of hidden layers, and window size for the LSTM model. This method can systematically evaluate the applicability of different machine learning models in terms of accuracy, computational efficiency, and generalization ability, providing a basis for the rational selection of seismic response prediction models for aluminum alloy foamed concrete frame structures.

[0018] 2. This invention, through its lightweight architecture, can quickly obtain the seismic response of a structure without the need for finite element iterative calculations. LSTM is adapted to the seismic requirements of different structural types, and the model can be directly deployed on edge computing devices to meet the low latency requirements of monitoring scenarios, enabling seismic analysis, rapid evaluation, and engineering applications of aluminum alloy foamed concrete structures. Attached Figure Description

[0019] Figure 1 This is a slice of the training set for the LSTM algorithm of this invention; Figure 2 Recursively predict for the test set; Figure 3 This is a flowchart illustrating the analysis process of the present invention; Figure 4 This is a comparison diagram of interlayer displacements in this invention; Figure 5 Inter-story displacement values ​​- dataset; Figure 6Evaluation metrics for six ML models; Figure 7 The effect of sample size on different indicators, where (a) is R. 2 Evaluation indicators, (b) are RMSE evaluation indicators; Figure 8 The impact of the number of hidden layers on different metrics; Figure 9 The impact of window size on different metrics; Figure 10 The impact of the number of hidden layers on training time; Figure 11 The model is a finite element model of the model, where (a) is a beam member and its skeleton (pure aluminum skeleton), (b) is a beam member and its skeleton (pure aluminum skeleton), (c) is a beam-beam joint member and its skeleton (pure aluminum skeleton), (d) is a beam-column joint member and its skeleton (pure aluminum skeleton), and (e) is a numerical model of the foamed concrete composite structure. Detailed Implementation

[0020] To make the objectives, contents, and advantages of the present invention clearer, the specific embodiments of the present invention will be described in further detail below.

[0021] This invention proposes an LSTM-based seismic response prediction algorithm for prefabricated frame structures. It employs numerical simulation to acquire motion response time history data and establishes a seismic response database for aluminum alloy foamed concrete structures. Furthermore, it constructs multiple machine learning algorithms, dividing the dataset into training and test sets. Based on the accuracy of the test set, the LSTM algorithm is selected as the optimal prediction model.

[0022] An inter-story displacement prediction model is constructed based on the LSTM algorithm. The model includes an input layer, hidden layers, and long short-term memory (LSTM) units. A gating mechanism is used to achieve dynamic mapping between temporal feature extraction and structural response. The LSTM units include... First, a sliding window slice is applied to each ground motion and its corresponding displacement response in the training set. Let the window length be w. At time t, the local sequence X(t) consisting of the ground motion and its response is... w:t 1) As input features, the response Yt at the next time step is used as the output label. The window slides point by point according to the time step to complete the fragmented database construction of the complete time history.

[0023] The entire dataset is then integrated to form a three-dimensional tensor input Xt and output Yt, which is used to train a stacked LSTM network to learn the nonlinear mapping relationship between seismic motion and structural displacement. Furthermore, the LSTM algorithm is optimized using a structural model, and the sensitivity of different hyperparameters, structures, and training samples to the prediction results is analyzed to determine the optimal parameters that ensure model accuracy, robustness, and training efficiency.

[0024] In the prediction phase, only the test set ground motion sequence is input, and the response sequence is unknown. To achieve recursive prediction, a zero vector of length w is added at the beginning of the time history as the initial structural state. The model first obtains the predicted displacement d1 using X1 and updates d1 to the input sequence in real time; then the window moves to the right to extract X2 and continues to predict d2, and so on, recursively reconstructing the inter-story displacement response of structures of arbitrary length. This invention can quickly obtain the seismic response of structures without finite element iterative calculations, and is suitable for seismic analysis, rapid evaluation, and engineering applications of aluminum alloy foamed concrete structures.

[0025] In this embodiment, the present invention provides a fast prediction algorithm for the seismic response of aluminum alloy foamed concrete structures based on the LSTM algorithm. The specific steps are as follows: S1. Data Preprocessing: Time series data of input ground motion acceleration of aluminum alloy foam concrete frame structure were obtained, and the time series data were normalized to obtain standardized input data. Specifically, based on a full-scale structural model, a three-story aluminum alloy foamed concrete room with dimensions of 3m × 3m × 3.5m was constructed for nonlinear time-history prediction of seismic response. Simultaneously, combining the seismic design standards for underground structures, the seismic design code for buildings, and the Chinese seismic ground motion parameter table, the seismic fortification intensity was set to 8 degrees, peak ground acceleration to 0.2g, site category to Class II, characteristic period to 0.4s, and seismic resistance type to Level I. A finite element model was established for the foamed concrete composite structure under the selected GM excitation. Nonlinear time-history analysis of the structure was performed using ABAQUS. The ground motion and seismic response outputs were used to train the DL (deep learning) model, with the input load being an EL-Centro wave.

[0026] S2. Short-term time series feature extraction: Based on numerical simulation data, a seismic response database of aluminum alloy foamed concrete structure is established; standardized input data is input into LSTM, and the short-term time dependence features of ground motion data are extracted through the forget gate, input gate and output gate mechanism of LSTM.

[0027] S3, Sliding window slicing: Let the window length be w. At time t, the local sequence X(t) consisting of ground motion and response is given. w:t 1) Using the next time-series response Yt as the output label, the window slides point by point along the time step to complete the fragmented database construction of the complete time history. For example... Figure 1 As shown.

[0028] S4 and LSTM network training: A machine learning architecture was constructed using a response database, and its sensitivity to the number of training samples, the number of hidden layers, and the window size was studied. Training and test sets were separated from the original dataset, and R was used. 2 RMSE is used to evaluate the accuracy of the ML model. Model efficiency is evaluated by recording the training time under different model parameters and architectures.

[0029] All fragments are integrated to form a three-dimensional tensor input Xt and output Yt, which is used to train a stacked LSTM network to learn the nonlinear mapping relationship between seismic motion and structural displacement. Furthermore, the LSTM algorithm is optimized using a structural model, and the sensitivity of different hyperparameters, structures, and training samples to the prediction results is analyzed to determine the optimal parameters that ensure model accuracy, robustness, and training efficiency.

[0030] The prediction effect of the predicted displacement data is evaluated according to the evaluation indicators, which include mean square error, mean absolute error, mean absolute error ratio, and coefficient of determination. The trained model was selected as the one with the minimum validation loss, and inference was performed on the test dataset using the chosen model. The machine learning models employed the architecture and hyperparameters shown in Table 1, with individual parameters changed each time for sensitivity analysis. This analysis helps evaluate the efficiency of different algorithms under varying conditions, particularly when dealing with large amounts of data, and helps in selecting a more suitable model and parameter configuration.

[0031] S5. Structural Response Prediction: Based on the trained model, when the structure is subjected to any seismic load, the seismic curve can be used as the model input. The model can quickly output the inter-story displacement value to determine whether the structure is within the safety threshold, providing certain reference value for engineering research such as regional seismic risk assessment and seismic design of aluminum alloy foam concrete structures.

[0032] Only the ground motion sequence of the test set is input; the response sequence is unknown. To achieve recursive prediction, a zero vector of length w is added at the beginning of the time history as the initial structural state. The model first obtains the predicted displacement d1 using X1 and updates d1 to the input sequence in real time; then the window moves to the right to extract X2 and continues to predict d2, and so on, recursively reconstructing the inter-story displacement response of structures of arbitrary length. Figure 2 As shown.

[0033] As a preferred embodiment of the present invention, in step S2, the calculation methods for the LSTM forget gate, input gate, and output gate are as follows: (1) (2) (3) (4) (5) (6) In the formula, , , These are the output values ​​for the update gate, forget gate, and output gate, respectively. for t The input time series vector at each time step; express( t –1) The output vector of the Long Short-Term Memory (LSTM) layer at time step; , , , This is the weight coefficient matrix for each part; , , , This is a matrix of deviation values ​​for each part; σ The activation function is the sigmoid function; This is the new unit input vector obtained through the nonlinear transformation of the tanh function; This is a new cell state vector obtained under the control of the forget gate and the update gate, which combines the memory of the previous time step and the input data of the current time step. This is the final output value under the control of the output gate.

[0034] As a preferred embodiment of the present invention, the method further includes a model training step: The training dataset is constructed using shaking table test data and finite element simulation data. The input data is the seismic acceleration time series of the aluminum alloy foam concrete frame structure, and the output data is the inter-story displacement response time series of the frame structure. Using RMSE as the loss function, the model parameters of the LSTM algorithm are optimized through backpropagation. Furthermore, this invention innovatively proposes the following evaluation metrics: (7) (8) (9) (10) (11) (12) In the equation, and Representing the true response of the time series, respectively, and the first... iThe actual response and the actual residual response at each time step. , and Representing the predicted response of the time series, respectively, and the first... i The predicted response and the predicted residual response at each time step. Among the following six evaluation metrics, formulas (7), (8) and (9) describe the prediction quality at the local scale because they focus on the prediction results at a specific time step; while metrics (10), (11) and (12) evaluate the prediction quality at the global scale because they measure the prediction performance as a whole.

[0035] An inter-story displacement prediction model is constructed based on LSTM. Combining the seismic load input and the numerical model, predicted inter-story displacement data is obtained, including: A recursive prediction model is established, and sliding slice processing is performed on the complete time series in the training and test sets. Under the recursive mechanism, the output structural information at one moment will be synchronously used as the input structural information at the next moment. It is necessary to fragment the input of the complete seismic wave to achieve the purpose of local recursive prediction.

[0036] Taking a single seismic wave data point as an example, the time series is sliced: the slice length is expressed as... w ,for t Input features at time step x t With output labels y t Input slice w The length of the time series, which will start from the first t -w Time point to the t -1 time point X Local sequences as input features x t The next moment t Corresponding response Y Local sequences as output labels y t ;for t Input features at time +1 x t+1 With output labels y t+1 This is obtained by sliding the current value window one grid to the right. This process is repeated to complete the slicing of each complete time series.

[0037] For the training set n The seismic wave data is processed by combining slices of data from each seismic wave to form a three-dimensional array of input features. X t and output tags Yt Feature analysis of the data input to the neural network. X t and tags Y t The pairing is used to establish a training set database, and the mapping relationship between data features and labels is learned through training.

[0038] The model makes predictions based on the test set data: the acceleration sequence of the test set is known. A Test set earthquake displacement response sequence D Unknown, the input to be sliced ​​for the complete test set is... X =( A , D ) T As can be seen from the above training set slicing process, the model output results from... w +1 From the moment on, in order to be able to predict the future w The seismic response at each moment, added before the complete time series. w Zero matrix at time length X 1. Use the same slicing method as the training set mentioned above. t At time =1, the corresponding model input is: X 1. At this point, the model outputs the predicted value. Then d Value 1 updated to X Response sequence D In the middle, the sliding slice retrieves the input for the next time step. X 2. Jointly participate in the next moment's response. Y 2. Prediction: Similarly, the complete time series can be predicted by recursion.

[0039] Example Example 1: Multi-model comparative test based on shaking table test data The data uses an aluminum alloy-foamed concrete structure for nonlinear time-history prediction of seismic response. The input load for the numerical simulation is the EL-Centro wave, with a total of 1500 data sets. The inter-story drift ratio is used as the structural response, serving as a representative indicator for quantifying damage to both structural and non-structural components.

[0040] The EL-Centro wave was selected as the input load for the numerical simulation from the NGA-West2 strong earthquake database. Based on the seismic design standards for underground structures, the seismic design code for buildings, and the Chinese seismic ground motion parameter table, the seismic fortification intensity was set to 8 degrees, the peak ground acceleration to be 0.2g, the site category to be Class II, the characteristic period to be 0.4s, and the seismic resistance type to be Class I.

[0041] Control group: LSTM-1D Algorithm: The process is the same as the LSTM algorithm, but the input is two-dimensional data of time and acceleration response.

[0042] SVM algorithm: By selecting an appropriate kernel function, data is mapped to a high-dimensional space, and regression or classification is completed by solving for the optimal hyperplane. The core steps include feature normalization, parameter setting, model training, and performance evaluation.

[0043] BP neural network algorithm: Construct a multi-layer feedforward network, calculate the output through forward propagation, adjust the weights through backpropagation, and iterate repeatedly until the error converges to achieve nonlinear relationship fitting.

[0044] GA-BP algorithm: It uses a genetic algorithm to optimize the initial weights and biases of a BP neural network, searches for the global optimum through selection, crossover and mutation, and then performs fine training by BP to improve the stability and accuracy of the model.

[0045] PSO-SVM algorithm: It uses the particle swarm optimization algorithm to optimize the key parameters of SVM, obtains the optimal parameter combination through swarm search, and then trains the SVM model to improve prediction performance.

[0046] The evaluation indicators are: (1) (2) (3) (4) (5) (6) In the equation, and Representing the true response of the time series, respectively, and the first... i The actual response and the actual residual response at each time step. , and Representing the predicted response of the time series, respectively, and the first... i The predicted response and predicted residual response at each time step are evaluated. Among the six evaluation metrics, formulas (1), (2), and (3) describe the prediction quality at the local scale, and metric (4) describes the prediction quality. (5) and (6) evaluate the prediction quality at the global scale because they measure prediction performance as a whole.

[0047] The data was then split: 80% of the data was randomly selected from the training set, and 20% was used for the training set. Model parameter settings are shown in Table 1. The final experimental results are shown in Table 1. Figure 4 , 5 As shown.

[0048] Table 1. Hyperparameters and Architecture Settings of the DL Model Figure 6 The probability density function, histogram, and cumulative distribution function curves of six evaluation metrics were compared for 946 test data points. As shown in the figure, for IDR, LSTM performed excellently in predicting peak value, magnitude, and regularization error, with over 80% of prediction errors less than 15%. In contrast, the GA-BP neural network showed the best peak response capability in predicting IDR, with over 90% of prediction errors less than 10%. The R² of all six DL models was around 0.9, and the normalized PDF error curve represents unbiased IDR predictions with small standard deviations.

[0049] Table 2 lists the CDF values ​​for four evaluation metrics (Lresidual, Lpeak, A, and E) exceeding 5%, 10%, and 20% loss. LATM-1D showed better performance in predicting IDR, while BP and GA-BP neural networks performed relatively poorly in medical IDR.

[0050] Table 2 Evaluation Index System for Aluminum Alloy Foamed Concrete Structures Example 2: Parameter Sensitivity Analysis The number of training samples was set to [700, 1100], the number of hidden layers to [160, 240], and the window size to [30, 70]. The figure below shows the evaluation metrics calculated for 500 test samples under each set of hyperparameters.

[0051] like Figure 7 As shown in (a), R increases with the number of training samples. 2 The changes were relatively minor, with SVM showing the best fit, consistently around 0.98. LSTM-2D's fit improved with increasing sample size, reaching approximately 0.98 when the training sample size was 1100. When using the MAE metric for evaluation, SVM had the lowest MAE value, which gradually increased with the number of samples.

[0052] As shown in the figure, the fitting performance of several machine learning models improves with the increase of the number of hidden layers, R... 2As the number of hidden layers gradually increases, SVM and LSTM-2D show the best fitting results. When RMSE is used as the evaluation metric, the RMSE of all five machine learning models except BPNN decreases with the increase of hidden layers; while the RMSE value of LSTM-2D remains around 1.73, the RMSE value of SVM decreases from 1.27 to 1.06. Regardless of the number of hidden layers, the RMSE values ​​of PSO-SVM and LSTM-1D change relatively little, remaining around 2.0. The fluctuating increase in RMSE values ​​for BPNN and LSTM-2D with increasing hidden layers may be due to overfitting.

[0053] Window size, as the only adjustable parameter in the prediction phase of an LSTM neural network model, represents the length of the input time sequence during prediction and has a significant impact on the prediction results. Smaller windows improve training efficiency by affecting the amount of training data and training speed, but reduce prediction accuracy due to the shorter time series. Increasing the window size leads to less training data and slower training speed, which also reduces prediction accuracy.

[0054] When R 2 When using RSME as the evaluation metric, increasing the window size of the input data improved the fit of all models except BPNN, with SVM and LSTM-2D showing the best fit. When using RSME as the evaluation metric, as the window size increased from 30 to 70, the RMSE of SVM decreased from 1.51 to 1.05, and the RSME of LSTM-2D decreased from 1.89 to 1.54.

[0055] This section primarily focuses on the impact of various hyperparameters on training time. The following figure analyzes the effect of sample size on training time. The training time of various methods increases with the increase of sample size, specifically as follows: LSTM-2D shows a significant increasing trend, especially when the sample size reaches 1000, the training time increases rapidly, indicating that this method has high computational complexity on large-scale datasets. As the sample size increases, the training time of SVM and BP neural networks increases more slowly and is relatively low, indicating that these methods are not very sensitive to changes in the sample size. PSO-SVM shows a stable increase in training time, although their overall training time is shorter than that of LSTM-2D.

[0056] like Figure 10As shown in (a), training LSTM-2D requires an additional 87 seconds if 100 samples are added to the model; the rates of change (i.e., the time required to add 100 samples) for LSTM-1D, LSTM-2D, SVM, PSO-SVM, BPNN, and GA-BP are 57, 87, 6, 21, 2, and GA-BP, respectively. SVM still requires the least training time when using the same number of samples. LSTM applies the backpropagation algorithm to different layers and the predicted sequences of each hidden layer, which fundamentally prevents the use of parallel computation, thus resulting in a longer training time.

[0057] Figure 10 (b) The impact of the number of hidden layers on training time was analyzed. LSTM-1D and LSTM-2D showed a relatively steep growth trend; as the number of hidden layers increased, the training time increased significantly, indicating that the computational complexity of these methods is high. The BP algorithm showed a relatively gentle growth; although their training time also increased with the number of hidden layers, the increase was relatively slow. The training time of PSO-SVM and SVM changed relatively smoothly; with the increase of the number of hidden layers, the training time hardly changed.

[0058] Figure 10 (c) indicates that as the window size increases, except for LSTM-2D, whose training time increases sharply with the window size, this method may be more dependent on the window size and has a higher computational cost under large windows. SVM and LSTM-1D show a relatively stable growth trend, indicating that these two methods may be less sensitive to changes in window size than other methods. PSO-SVM exhibits a higher training time than the BP method, but its increasing trend is relatively slow, which may indicate that the PSO optimization algorithm is more adaptable to large windows. The training time of SVM increases more slowly with the window size, meaning that it is more adaptable to different window sizes and may be more efficient.

[0059] The comparison of these three figures reveals the varying sensitivities of different machine learning methods to different hyperparameters (number of samples, number of hidden layers, and window size). Overall, the LSTM-2D method exhibits high computational complexity with all parameter variations, especially with large sample sizes and hidden layer numbers, leading to a sharp increase in training time. In contrast, SVM and BP methods have relatively shorter training times and lower sensitivity to parameter changes, demonstrating better efficiency and adaptability. The PSO-SVM method, however, shows relatively stable performance in certain situations, particularly exhibiting good balance when dealing with variations in window size and hidden layer number.

[0060] Some of the data in the above formulas are numerical calculations with dimensions removed, and the contents not described in detail in this specification are all prior art known to those skilled in the art.

[0061] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A seismic response prediction algorithm for prefabricated frame structures based on the LSTM algorithm, characterized in that, Includes the following steps: S1. Establish a full-scale prefabricated frame structure model, perform nonlinear time history analysis based on ABAQUS, obtain ground vibration and inter-story displacement response data, construct a seismic response database, and divide the dataset in the database into training set and test set; S2. Construct an inter-story displacement prediction model based on the LSTM algorithm; S3. Sensitivity analysis was performed on the window length, number of hidden layers, and training sample size of the inter-story displacement prediction model. The R² and RMSE indices were used to evaluate the model performance. S4. Select the model with the minimum validation loss as the final prediction model; S5. Based on the final prediction model, when the structure is subjected to any seismic load, the seismic curve is used as the model input, and the inter-story displacement value is output to determine whether the structure is within the safety threshold.

2. The algorithm according to claim 1, characterized in that, In step S1, the structural model is a three-story aluminum alloy foam concrete room with dimensions of 3m×3m×3.5m, a seismic fortification intensity of 8 degrees, a peak ground acceleration of 0.2g, a site category of Class II, a characteristic period of 0.4s, and an input seismic wave of EL-Centro.

3. The algorithm according to claim 1, characterized in that, The interlayer displacement prediction model includes an input layer, a hidden layer, a long short-term memory (LSTM) network layer, and an output layer. The LSM network layer includes a forget gate, an input gate, and an output gate, and its calculation method is as follows: (1) (2) (3) (4) (5) (6) , , These are the output values ​​for the update gate, forget gate, and output gate, respectively. for t The input time series vector at each time step; express( t –1) The output vector of the Long Short-Term Memory (LSTM) layer at time step; , , , This is the weight coefficient matrix for each part; , , , This is a matrix of deviation values ​​for each part; σ The activation function is the sigmoid function; This is the new unit input vector obtained through the nonlinear transformation of the tanh function; This is a new cell state vector obtained under the control of the forget gate and the update gate, which combines the memory of the previous time step and the input data of the current time step. This is the final output value under the control of the output gate.

4. The algorithm according to claim 1, characterized in that, In step S5, the inter-story displacement prediction model generates complete inter-story displacement values ​​through a recursive slicing and step-by-step update mechanism. The recursive slicing and step-by-step update mechanism includes: Add a zero matrix at the beginning of the time series as the initial state; Input features are extracted using a sliding window method to predict the displacement response at the next time step; The predicted values ​​are updated to the input sequence, and the complete time history is predicted recursively.

5. The algorithm according to claim 1, characterized in that, The model performance evaluation metrics include mean squared error, mean absolute error, mean absolute error ratio, and coefficient of determination.

6. The algorithm according to claim 3, characterized in that, The inter-layer displacement prediction model adopts a stacked structure, containing multiple hidden layers, with a discard layer set in each layer to prevent overfitting.

7. The algorithm according to claim 1, characterized in that, The algorithm is applicable to seismic analysis, rapid evaluation, and engineering design of aluminum alloy foamed concrete structures.

8. The algorithm according to claim 1, characterized in that, The training data comes from shaking table tests and finite element simulations. The input is the seismic acceleration time series, and the output is the inter-story displacement response time series.

9. The algorithm according to claim 1, characterized in that, For n seismic wave data in the training set, the slice data of each seismic wave is integrated to form a three-dimensional array Xt of input features and output label Yt. The data input to the neural network is paired with features Xt and labels Yt to establish a training set database, and the mapping relationship between data features and labels is learned through training.

10. The algorithm according to claim 9, characterized in that, The model makes predictions based on the test set data: the acceleration sequence A of the test set is known, the seismic displacement response sequence D of the test set is unknown, and the input to be sliced ​​from the complete test set is X=(A,D). T The model output starts from time w+1. To predict the seismic response up to time w, a zero matrix X1 of length w is added before the complete time series, using the same slicing method as the training set. At time t=1, the corresponding model input is X1, and the model outputs the predicted value. Then, the d1 value is updated to the corresponding response sequence D in X, and the sliding slice is used to extract the input X2 at the next time step, which participates in the prediction of the response Y2 at the next time step. Similarly, the complete time series is predicted by recursion.