Prediction method of earthquake response of building structure based on BP neural network optimized by genetic algorithm
Through the method of optimizing BP neural network based on genetic algorithms, the problem of insufficient complexity and accuracy of seismic response analysis in building structures is solved, and rapid and accurate structural seismic response prediction is achieved, supporting seismic design and mitigating the impact of earthquake disasters.
Patent Information
- Application Number
- CN202410569196.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-05-09
AI Technical Summary
The seismic response analysis and prediction of existing building structures is problematic of long time, high complexity and insufficient accuracy, and it is difficult to effectively predict the degree of damage of the structure under different earthquake conditions.
A method of optimizing BP neural network based on genetic algorithm is adopted. By adjusting the number of layers, neurons, initial values and learning rates of the network, and using genetic algorithms to optimize the neural network weights, we establish a model that can quickly and accurately predict structural earthquake responses.
The performance of the neural network is significantly improved, and the prediction error is controlled within 5%, which can effectively evaluate the degree of damage of the structure under different earthquake effects, support reliable seismic research and design, and reduce the impact of earthquake disasters.
Smart Images

Figure CN118410674B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of earthquake engineering and disaster prevention and mitigation engineering, and in particular relates to a method for predicting earthquake response of building structures based on genetic algorithm optimization of BP neural network. Background Art
[0002] As earthquake disasters become more and more frequent, they not only seriously threaten people's lives and property safety, but also cause negative impacts such as social instability. In earthquake engineering research, structural seismic response analysis and prediction is an important topic in structural engineering and earthquake disaster prevention of building structures. Structural seismic response analysis has made great progress in theory, methods, and technology, but it still faces some problems that are difficult to solve well. Since the seismic response analysis and prediction of building structures still have defects such as long time consumption, complex analysis, and lack of accuracy, in order to reduce the losses caused by earthquake disasters to building structures, it is necessary to study the dynamic response prediction method of the structure based on strong earthquake and complex seismic data to avoid accidents.
[0003] Neural network is a mathematical model or computational model that simulates the structure and function of biological neural network, which is suitable for solving some nonlinear problems in structural seismic response analysis. Since neural network can capture and express the complex relationship between input and output in data, trained neural network works well in solving classification and prediction problems, and there is no accurate analysis model. It has become an alternative method and tool for simulating complex phenomena in different research fields and engineering practices. Genetic algorithm draws on the law of genetic mechanism of survival of the fittest in the biological world to find the optimal solution to a problem. The structure of neural network is optimized by genetic algorithm, so that the neural network obtains dynamic structure, and the weight is adjusted by genetic algorithm to obtain faster speed, while avoiding convergence in local optimal situation to a greater extent.
[0004] In view of this, on the one hand, the design of BP neural network is considered from the aspects of the number of layers, the number of neurons in each layer, the initial value and the learning rate, and on the other hand, the genetic algorithm is used to optimize the neural network, which greatly improves the performance of the neural network to predict the structural response. Therefore, a method that can comprehensively predict the seismic response of the structure is urgently needed, in order to provide important practical significance for the realization of reliable seismic research and seismic design, and has certain practical value for the prediction of earthquake response in the future. Summary of the invention
[0005] The purpose of the present invention is to provide a method for predicting the seismic response of building structures based on genetic algorithm optimization of BP neural network. The genetic algorithm is used to optimize the neural network structure model so that the neural network obtains a dynamic structure, and the design is carried out from aspects such as the number of layers, number of neurons, initial value and learning rate of the network. The genetic algorithm is used to adjust the weight, and the performance of the neural network is greatly improved to predict the structural response and reasonably evaluate the degree of damage to the structure under different earthquake motions.
[0006] The method for predicting earthquake response of building structure based on genetic algorithm optimized BP neural network is characterized by comprising the following steps:
[0007] Step 1, based on the earthquake records in the strong earthquake database, draw the response spectrum of each earthquake record, and give the mean spectrum, median spectrum, and 2.5% and 97.5% quantile response spectrum;
[0008] Step 2, establishing a nonlinear finite element analysis model of the building structure, and using the selected earthquake motion record as input, performing nonlinear dynamic analysis on the building structure to obtain engineering demand parameters; the specific method of establishing the nonlinear finite element analysis model of the building structure is: establishing a nonlinear finite element analysis model of the reinforced concrete frame structure based on the OpenSees platform, using concentrated plastic hinge units to model the bending performance of beams and columns; outside the plastic hinge area, using elastic beam-column units to describe the behavior of the material;
[0009] Step 3: According to the nonlinear dynamic analysis results of the building structure, 23 earthquake intensity parameters and 2 engineering demand parameters are selected as training data, and based on the BP neural network training data samples, a seismic response prediction model based on the BP neural network is given;
[0010] Step 4, optimizing the BP neural network based on the genetic algorithm: first, the input and output sample sets of the earthquake response prediction model based on the BP neural network are trained, and the encoding of the network weights is finally determined, the length of the individual bit string is given, and the relationship between a set of weights and the individual bit string in the genetic space is determined by encoding mapping, and genetic operations are performed by setting genetic parameters and adaptive adjustment algorithms, and N initial populations are randomly generated, and each individual bit string of the population is encoded to obtain N groups of network weights; then, the N groups of networks are evaluated according to the fitness function, and the mean square error of the training samples is used as the measurement standard of the fitness function to calculate the fitness value of each chromosome; then, the optimization operation is performed in the genetic space according to the fitness, and according to the principle of survival of the fittest, the individuals with large fitness function values enter the next generation, and the current population is processed by crossover and mutation, and the next generation population is generated. A new round of populations is obtained by iterating the above algorithm until the training target meets the termination condition, that is, a set of optimized weights is obtained; finally, this set of optimized network weights is input into the BP neural network as the new weights of the neural network to obtain the earthquake response prediction model optimized by the genetic algorithm;
[0011] The specific steps of step 4 are as follows:
[0012] 1) Normalize training samples: Use the maximum and minimum normalization method for normalization. The normalization formula is as follows:
[0013]
[0014] 2) Initialize BP neural network: determine the network topology according to the input and output of the sample, and determine the number of hidden layer nodes, activation function, and training function;
[0015] 3) Randomly generate the initial population, randomly generate the initial weights and thresholds; the number of nodes in the input layer of the neural network is n, the number of nodes in the output layer is k, the number of nodes in the hidden layer is m, and the chromosome encoding length L is determined by the following formula:
[0016] L=n×m+m×k+m+k
[0017] 4) Determine the fitness function: Calculate the objective function value of the initial population individuals and the fitness value of each individual; use the mean square error of the training sample as the measure of the fitness function, and its expression is:
[0018]
[0019] In the formula, y j and Represent the actual value and predicted value of the jth training sample, respectively, and N represents the number of training samples;
[0020] 5) Implement genetic operations of selection, crossover and mutation on the population: Use geometric programming to sort and select probability p1 to select a part of individuals as parents, and record the individual code with the highest fitness; use the weights and thresholds of each layer of the network as parents of the crossover operation, and use the real number crossover method to generate new offspring with the selected parents at a crossover probability p2; the newly generated individuals mutate with a certain mutation probability p3 through the non-uniform mutation algorithm, and the weights and thresholds of the mutated individuals change randomly. If the performance is better than the parent, the mutation ends;
[0021] 6) Iterative optimization: If the best fitness of the offspring is better than that of the parent, the best fitness is updated, otherwise, it remains unchanged;
[0022] 7) Iteration termination condition: If it is less than the final number of iterations, a new population is generated, and weights and thresholds are continuously assigned to the BP neural network, and 4) to 6) are repeated; when the termination condition is met, the optimal initial weights and thresholds are obtained;
[0023] 8) Final model generation: If the number of training times or accuracy requirements are met, the algorithm ends successfully and returns the global optimal solution; otherwise, the error is back-propagated to the BP neural network to update the weights and thresholds, and the above steps are repeated until the optimal solution is generated. The final weights, thresholds and related parameters are saved to obtain the optimized BP neural network model;
[0024] Step 5: Use 23 earthquake intensity parameters as inputs to the model to predict two engineering demand parameters of the building structure.
[0025] Furthermore, in step 1, the rules for selecting the seismic motion records are as follows: (1) two groups of horizontal bidirectional seismic motions are selected as input seismic motions, and all seismic motions are from the PEER NGA seismic motion database; (2) two groups of broadband seismic motion records suitable for large magnitude M and short distance R are used, one group predicts a magnitude 7 strike-slip earthquake with a distance of 10 km, and the other group predicts a magnitude 6 strike-slip earthquake with a distance of 25 km; the number of seismic motion records selected is: two groups are selected, with a total of 160 records.
[0026] Furthermore, the engineering demand parameters in step 2 include a maximum inter-story displacement angle MIDR and an overall structural damage index OSDI.
[0027] Furthermore, in step 3, the 23 seismic intensity parameters selected are: peak acceleration PGA, mean square acceleration a sq , square root acceleration a rs , earthquake energy index P a , RMS acceleration a rms , acceleration intensity I a , characteristic intensity I C 、Arias Intensity I A, peak velocity PGV, mean square velocity v sq , square root velocity v rs , earthquake energy index P v , RMS velocity v rms , Speed Strength I v 、Medium cycle parameter I F , Housner spectrum intensity SI, potential damage index P D , peak displacement PGD, mean square velocity d sq , square root displacement d rs , earthquake energy index P d , RMS displacement d rms , displacement strength I d The two engineering demand parameters are: maximum inter-story displacement angle MIDR and overall structural damage index OSDI.
[0028] Furthermore, in step 3, the activation function used in the hidden layer of the BP neural network is the hyperbolic tangent function, and the output layer uses a linear function as the transfer function; the training function uses the LM optimization algorithm.
[0029] The present invention optimizes the BP neural network learning input and output training sample data through genetic algorithm, summarizes the prediction model relationship implicit in the system, greatly improves the performance of the neural network to predict the structural response, and reasonably evaluates the degree of damage to the structure under different earthquake motions.
[0030] Through the above scheme, the structural seismic response prediction method based on genetic algorithm optimization of BP neural network is considered, the influence of multiple seismic parameters and multiple engineering demand parameters on the prediction model is considered, the input and output training sample data are learned based on the neural network method, the neural network structural model is optimized by genetic algorithm, and the performance of the neural network is greatly improved by adjusting the weight through genetic algorithm, so that the error between the predicted seismic response of the optimized model and the actual seismic response is less than 5%. In this way, studying how to quickly and accurately realize the prediction of structural seismic response has important practical significance for realizing reliable seismic research and seismic design, effectively reducing earthquake disasters, protecting people's property safety and sustainable social and economic development. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a flow chart of the structural seismic response prediction method based on genetic algorithm optimization BP neural network described in the present invention.
[0032] Figure 2 The present invention selects two sets of response spectra of earthquake records; (a) set#1A, (b) set#1B.
[0033] Figure 3 It is a building structure elevation layout drawing.
[0034] Figure 4 This is the BP neural network structure used in the present invention.
[0035] Figure 5 It is the earthquake response prediction regression curve of BP neural network.
[0036] Figure 6 It is a seismic response prediction regression curve based on genetic algorithm optimization of BP neural network. DETAILED DESCRIPTION
[0037] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments, but the protection scope of the present invention is not limited thereto.
[0038] Ginseng Figure 1 As shown, this embodiment provides a method for predicting the seismic response of a building structure based on a genetic algorithm to optimize a BP neural network, comprising the following steps:
[0039] Step S1, selecting earthquake records based on the strong earthquake database and drawing the response spectrum of each earthquake record;
[0040] Step S2, establishing a nonlinear finite element analysis model of the building structure, and using the selected earthquake motion records as input to perform nonlinear dynamic analysis on the building structure;
[0041] Step S3, according to the nonlinear dynamic analysis results of the building structure, 23 earthquake intensity parameters and 2 engineering demand parameters are selected as training data, and based on the BP neural network training data samples, a seismic response prediction model based on the BP neural network is given so that it can achieve a convergence effect, and a fitting curve is given when the average normalized error confidence interval is [-10%, 10%];
[0042] Step S4, drawing on the genetic mechanism of survival of the fittest and selection of the fittest in the biological world, optimizing the BP neural network based on the genetic algorithm, and ensuring that the error between the predicted seismic response and the actual structural response is less than 5% by setting network training parameters and controlling the genetic algebra of the termination function;
[0043] The method for predicting the seismic response of a building structure provided in this embodiment is based on a neural network method to learn input and output training sample data, considers the influence of multiple earthquake motion parameters and multiple engineering demand parameters on the prediction model, and optimizes the neural network structure model using a genetic algorithm. It takes into account aspects such as the number of network layers, the number of neurons, the initial value, and the learning rate. The weights are adjusted through a genetic algorithm to greatly improve the prediction ability of the neural network, and the degree of damage to the structure under different earthquake motions is reasonably evaluated.
[0044] The specific steps of this method are:
[0045] S1. Draw the response spectrum of each earthquake record and give the mean spectrum, median spectrum, and 2.5% and 97.5% quantile response spectra.
[0046] Selection of ground motion based on national and international databases.
[0047] (1) Two sets of horizontal bidirectional ground motions are selected as input ground motions. All ground motions are from the PEER NGA ground motion database.
[0048] (2) Two sets of broadband ground motion records suitable for large magnitude M and short distance R are used. One set predicts a magnitude 7 strike-slip earthquake at a distance of 10 km, and the other set predicts a magnitude 6 strike-slip earthquake at a distance of 25 km.
[0049] 160 ground motions were selected by the above selection rules for subsequent analysis in the present invention. Figure 2 The response spectra of the earthquake motions corresponding to these two sets are given.
[0050] S2. Establish a nonlinear finite element analysis model of the building structure, and use the selected seismic records as input to perform nonlinear dynamic analysis on the building structure to obtain the engineering demand parameters.
[0051] S2.1 Design and modeling of reinforced concrete frame structures.
[0052] (1) Design the original model of reinforced concrete frame structure, Figure 3 This is the elevation layout of the 4-story structure.
[0053] (2) A nonlinear finite element analysis model of reinforced concrete frame structure is established based on the OpenSees platform. The lumped plastic unit is used to model the bending performance of beams and columns. Elastic beam-column units are used to describe the material behavior outside the plastic region. The lumped plastic unit is used instead of the fiber model because only the former can capture the strain softening associated with the buckling of steel bars and the spalling of concrete, which is crucial for simulating the collapse of RC frame structures.
[0054] S2.2 Nonlinear dynamic analysis.
[0055] With the selected earthquake motion records as input, the nonlinear dynamic analysis of the building structure is carried out. Based on the results of the nonlinear dynamic analysis, the maximum inter-story displacement angle MIDR and the overall structural damage index OSDI are selected as engineering demand parameters (EDP).
[0056] The maximum inter-story drift angle MIDR is the most commonly used engineering requirement parameter, and its expression is:
[0057] MIDR=max{Δu1,Δu2,···,Δu i-1,Δu i}
[0058] In the formula, Δu i is the inter-story drift angle of the i-th layer.
[0059] The overall structural damage index OSDI is an overall damage index based on deformation and hysteresis energy. The improved Park-Ang damage index based on the cross section is:
[0060]
[0061] In the formula, θ m is the maximum cross-sectional rotation angle; θ r is the recoverable rotation angle of the cross section; θ u is the limit rotation angle of the section; β = 1 is the energy dissipation factor of the component; M y is the section yield moment; E h is the hysteresis energy.
[0062] The local damage index is converted into the overall damage index OSDI of the structure by a weighted method:
[0063]
[0064] In the formula, ω i is the energy weighting coefficient of the ith component, and Ei is the total energy consumption of the ith component.
[0065] S3. Select 23 earthquake intensity parameters and 2 engineering demand parameters as training data, and give a seismic response prediction model based on BP neural network based on the BP neural network training data sample, make it converge, and give a fitting curve when the average normalized error confidence interval is [-10%, 10%];
[0066] S3.1 Selection of earthquake intensity parameters: 23 earthquake intensity parameters and 2 engineering requirement parameters are selected as training data. The selected parameters can almost represent the characteristics of earthquake motion and structure. Specifically, the 23 earthquake intensity parameters (Intensity measure, IM) selected as basic parameters are peak acceleration PGA, mean square acceleration a sq , square root acceleration a rs , earthquake energy index P a , RMS acceleration a rms , acceleration intensity I a , characteristic intensity I C 、Arias Intensity I A , peak velocity PGV, mean square velocity v sq , square root velocity v rs , earthquake energy index P v , RMS velocity vrms , Speed Strength I v 、Medium cycle parameter I F , Housner spectrum intensity SI, potential damage index P D , peak displacement PGD, mean square velocity d sq , square root displacement d rs , earthquake energy index P d , RMS displacement d rms , displacement strength I d The two engineering demand parameters are: maximum inter-story displacement angle MIDR and overall structural damage index OSDI.
[0067] S3.2 gives a prediction model based on BP neural network.
[0068] The basic algorithm of BP neural network is to forward propagate from the input layer through the hidden layer to the output layer. When the output layer cannot achieve the expected output, the output error is back-propagated from the output layer through the hidden layer to the input layer, and the error is distributed among each unit in each layer. The error obtained by each unit in each layer is used as the basis for adjusting the weights and thresholds of each unit. Through repeated learning and training to adjust the weights and thresholds, the error is reduced to the allowable limit along the gradient direction. Figure 4 The BP neural network structure used in the present invention is given. The BP neural network structure includes an input layer, a hidden layer and an output layer. The weights and thresholds from the input layer to the hidden layer are w nm and b 1m , the weights and thresholds from the hidden layer to the output layer are w mk and b 2k The number of hidden layer nodes is determined by the following formula:
[0069]
[0070] Where m is the number of nodes in the hidden layer; n and k are the number of nodes in the input layer and output layer respectively; α is a constant between 1 and 10.
[0071] The BP neural network uses an activation function to realize nonlinear mapping from input to output. The activation function needs to meet the condition of being differentiable everywhere. The activation function used in the hidden layer of the present invention is a hyperbolic tangent function, because this function maps data to a value interval of [-1,1], which can solve the problem of asymmetric output value ranges of other activation functions. The output layer uses a linear function as a transfer function; the training function uses the LM optimization algorithm, which is a method that combines the Newton method and the gradient descent method, and can improve the training speed to obtain higher accuracy when training the neural network; the loss parameter uses the mean square error as a measurement standard.
[0072] The BP neural network structure of the present invention has 23 input layer nodes, 15 hidden layer nodes, and 2 output layer nodes. Figure 5 The seismic response prediction regression curve based on BP neural network is given, and on this basis, the fitting curve when the average normalized error confidence interval is [-10%, 10%] is given.
[0073] S4. Based on the genetic mechanism of survival of the fittest in the biological world, the BP neural network is optimized based on the genetic algorithm. Since the BP neural network converges slowly, it is very sensitive to the initial network weights. Initializing the network with different weights often converges to different local minima. Before training the BP neural network, the weights and thresholds of the network can be optimized to better values by introducing the genetic algorithm, making the training efficiency of the neural network higher.
[0074] The genetic algorithm first solves the coding problem of the network structure, and then obtains the optimal model through selection, crossover, and mutation operations. The input and output sample sets of the above neural network are trained, and the coding of the network weights is finally determined. The length of the individual bit string is given, and the relationship between a set of weights and the individual bit string of the genetic space is determined through coding mapping. The genetic operation is performed by setting genetic parameters and adaptive adjustment algorithms, and then N initial populations are randomly generated, and each individual bit string of the population is encoded to obtain N groups of network weights.
[0075] According to the fitness function, N groups of networks are evaluated, and the mean square error of the training samples is used as the measure of the fitness function. The fitness value of each chromosome is calculated. The larger the error, the smaller the fitness. Then, the optimization operation is performed in the genetic space according to the fitness. According to the principle of survival of the fittest, individuals with large fitness function values are introduced into the next generation. The current group is processed by crossover and mutation, and the next generation group is generated. A new round of groups is obtained by repeating the above algorithm until the training target meets the termination condition, that is, a set of optimized weights is obtained. Finally, this set of optimized network weights is input into the BP neural network as the new weights of the neural network.
[0076] S4.1 The specific steps of optimizing BP neural network with genetic algorithm are as follows:
[0077] 1) Normalize the training samples. Using the maximum and minimum normalization method can improve the training efficiency while retaining the characteristics of the data itself. The normalization formula is as follows:
[0078]
[0079] 2) Initialize the BP neural network. Determine the network topology according to the input and output of the sample, and determine other network parameters such as the number of hidden layer nodes, activation function, and training function.
[0080] 3) Randomly generate the initial population, and randomly generate the initial weights and thresholds. If the number of nodes in the input layer of the neural network is n, the number of nodes in the output layer is k, and the number of nodes in the hidden layer is m, the chromosome encoding length L is determined by the following formula:
[0081] L=n×m+m×k+m+k
[0082] L=n×m+m×k+m+k
[0083] 4) Determine the fitness function. Calculate the objective function value of the initial population individuals and the fitness value of each individual. The mean square error (MSE) of the training sample is used as the measure of the fitness function, and its expression is:
[0084]
[0085] In the formula, y j and Represent the actual value and predicted value of the jth training sample respectively, and N represents the number of training samples.
[0086] 5) Implement genetic operations such as selection, crossover and mutation on the population. Use geometric programming to sort and select probability p1 to select a part of excellent individuals as parents, and record the individual code with the highest fitness; use the weights and thresholds of each layer of the network as parents of the crossover operation, and use the real number crossover method to select the parents to generate new offspring with crossover probability p2; the newly generated individuals mutate with a certain mutation probability p3 through the non-uniform mutation algorithm, and the weights and thresholds of the mutated individuals change randomly. If the performance is better than the parent, the mutation ends.
[0087] 6) Iterative optimization: If the best fitness of the offspring is better than that of the parent, the best fitness is updated, otherwise, it remains unchanged.
[0088] 7) Iteration termination condition. If it is less than the final number of iterations, a new population is generated, and weights and thresholds are continuously assigned to the BP neural network, and 4) to 6) are repeated. When the termination condition is met, the optimal initial weights and thresholds are obtained.
[0089] 8) Final model generation. If the number of training times or accuracy requirements are met, the algorithm ends successfully and returns the global optimal solution; otherwise, the error is back-propagated to the BP neural network to update the weights and thresholds, and the above steps are repeated until the optimal solution is generated. The final weights, thresholds and related parameters are saved to obtain the earthquake response prediction model optimized by the genetic algorithm.
[0090] S4.2 Parameter setting and earthquake response prediction analysis.
[0091] In the genetic algorithm optimized BP neural network model described in the present invention, the error accuracy is set to 1e-5, the population size is 50, the number of iterations is 50, the learning rate is 0.05, the genetic generation is 100, the selection probability is 0.09, the crossover probability is 0.6, and the mutation probability is 0.01. By setting the network training parameters and controlling the genetic generation of the termination function to ensure that the error between the predicted seismic response and the actual structural response is less than 5%, the overall prediction results of the prediction model are analyzed. Figure 6 The seismic response prediction regression curve of the BP neural network optimized by genetic algorithm is given, and the prediction performance of the model of various seismic responses in the building structure system is explored based on the genetic algorithm optimized BP neural network.
[0092] This method extends the traditional earthquake response prediction model of building structures to an earthquake response prediction model based on machine learning, in order to study how to quickly and accurately predict the earthquake response of structures. This has important practical significance for achieving reliable earthquake-resistant research and earthquake-resistant design, effectively reducing earthquake disasters, protecting people’s property safety and sustainable social and economic development.
[0093] The embodiments are preferred implementations of the present invention, but the present invention is not limited to the above-mentioned implementations. Any obvious improvements, substitutions or modifications that can be made by those skilled in the art without departing from the essential content of the present invention belong to the protection scope of the present invention.
Claims
1. A method for predicting the seismic response of building structures based on genetic algorithm optimized BP neural network. It is characterized in that The steps include: Step 1, based on the earthquake records in the strong earthquake database, draw the response spectrum of each earthquake record, and give the mean spectrum, median spectrum, and 2.5% and 97.5% quantile response spectrum; Step 2, establishing a nonlinear finite element analysis model of the building structure, and using the selected earthquake motion records as input, performing nonlinear dynamic analysis on the building structure to obtain engineering demand parameters; the specific method of establishing the nonlinear finite element analysis model of the building structure is: establishing a nonlinear finite element analysis model of the reinforced concrete frame structure based on the OpenSees platform, and using concentrated plastic hinge units to model the bending performance of beams and columns; Outside the plastic hinge region, elastic beam-column elements are used to describe the material behavior; Step 3: According to the nonlinear dynamic analysis results of the building structure, 23 earthquake intensity parameters and 2 engineering demand parameters are selected as training data, and based on the BP neural network training data samples, a seismic response prediction model based on the BP neural network is given; Step 4, optimizing the BP neural network based on the genetic algorithm: firstly, the input and output sample sets of the earthquake response prediction model based on the BP neural network are trained, and finally the encoding of the network weight is determined, and the length of the individual bit string is given. The relationship between a set of weights and the individual bit string in the genetic space is determined by encoding mapping, and the genetic operation is performed by setting the genetic parameters and the adaptive adjustment algorithm, and N initial populations are randomly generated, and each individual bit string of the population is encoded to obtain N groups of network weights; Then, the N groups of networks are evaluated according to the fitness function, and the mean square error of the training samples is used as the measure of the fitness function to calculate the fitness value of each chromosome; then, the optimization operation is performed in the genetic space according to the fitness, and according to the principle of survival of the fittest, the individuals with large fitness function values enter the next generation, and the current group is processed by crossover and mutation, and the next generation group is generated. By repeating the above algorithm for iteration, a new round of groups is obtained until the training target meets the termination condition, that is, a set of optimized weights is obtained; Finally, this set of optimized network weights is used as the new weights of the neural network and input into the BP neural network to obtain the earthquake response prediction model optimized by the genetic algorithm. The 23 earthquake intensity parameters are used as the input of the model to predict the two engineering demand parameters of the building structure. The specific steps of step 4 are as follows: 1) Normalize training samples: Use the maximum and minimum normalization method for normalization. The normalization formula is as follows: 2) Initialize BP neural network: determine the network topology according to the input and output of the sample, and determine the number of hidden layer nodes, activation function, and training function; 3) Randomly generate the initial population, randomly generate the initial weights and thresholds; the number of nodes in the input layer of the neural network is n, the number of nodes in the output layer is k, the number of nodes in the hidden layer is m, and the chromosome encoding length L is determined by the following formula: L=n×m+m×k+m+k 4) Determine the fitness function: Calculate the objective function value of the initial population individuals and the fitness value of each individual; use the mean square error of the training sample as the measure of the fitness function, and its expression is: In the formula, y j and Represent the actual value and predicted value of the jth training sample, respectively, and N represents the number of training samples; 5) Implement genetic operations of selection, crossover and mutation on the population: Use geometric programming to sort the selection probability p 1 Select a part of individuals as parents and record the individual codes with the highest fitness; The weights and thresholds of each layer of the network are used as the parents of the crossover operation, and the selected parents are selected with a crossover probability p through the real number crossover method. 2 To generate new offspring; the newly generated individuals are subjected to a non-uniform mutation algorithm with a certain mutation probability p 3 Mutation occurs, and the individual weights and thresholds after mutation change randomly. If the performance is better than the parent generation, the mutation ends; 6) Iterative optimization: If the best fitness of the offspring is better than that of the parent, the best fitness is updated, otherwise, it remains unchanged; 7) Iteration termination condition: If it is less than the final number of iterations, a new population is generated, and weights and thresholds are continuously assigned to the BP neural network, and 4) to 6) are repeated; when the termination condition is met, the optimal initial weights and thresholds are obtained; 8) Final model generation: If the number of training times or accuracy requirements are met, the algorithm ends successfully and returns the global optimal solution; Otherwise, the error is back-propagated to the BP neural network to update the weights and thresholds, and the above steps are repeated until the optimal solution is generated. The final weights, thresholds and related parameters are saved to obtain the optimized BP neural network model.
2. The method for predicting earthquake response of building structures based on genetic algorithm optimized BP neural network according to claim 1, It is characterized in that In step 1, the rules for selecting seismic motion records are as follows: (1) two groups of horizontal bidirectional seismic motions are selected as input seismic motions, all of which are from the PEER NGA seismic motion database; (2) two groups of broadband seismic motion records suitable for large magnitude M and short distance R are used, one group predicts a magnitude 7 strike-slip earthquake with a distance of 10 km, and the other group predicts a magnitude 6 strike-slip earthquake with a distance of 25 km; the number of seismic motion records selected is: two groups are selected, with a total of 160 records.
3. The method for predicting earthquake response of building structures based on genetic algorithm optimized BP neural network according to claim 1, It is characterized in that The engineering requirement parameters described in step 2 include the maximum inter-story drift angle MIDR and the overall structural damage index OSDI.
4. The method for predicting earthquake response of building structures based on genetic algorithm optimized BP neural network according to claim 1, It is characterized in that In step 3, the 23 seismic intensity parameters selected are: peak acceleration PGA, mean square acceleration a sq , square root acceleration a rs , earthquake energy index P a , RMS acceleration a rms , acceleration intensity I a , characteristic intensity I C 、Arias Intensity I A , peak velocity PGV, mean square velocity v sq , square root speed v rs , earthquake energy index P v , RMS velocity v rms , Speed Strength I v 、Medium cycle parameter I F , Housner spectrum intensity SI, potential damage index P D , peak displacement PGD, mean square velocity d sq , square root displacement d rs , earthquake energy index P d , RMS displacement d rms , displacement strength I d .
5. The method for predicting earthquake response of building structures based on genetic algorithm optimized BP neural network according to claim 4, It is characterized in that In step 3, the activation function used in the hidden layer of the BP neural network is the hyperbolic tangent function, and the output layer uses a linear function as the transfer function; the training function uses the LM optimization algorithm.
