1 Introduction

Geotechnical earthquake engineering is recognized as the basis of civil engineering projects, so the study of ground response and its effect on the above structures is essential to soil mechanics and geotechnical engineering [1,2,3,4,5,6]. In addition, variation in soil properties beneath structures and complex geological structure (e.g., soil stiffness, soil-interface interactions, and structural elements) are important to consider into calculations [7,8,9,10,11,12,13,14]. Most traditional methods rely on complex solutions, i.e., using nonlinear seismic response analysis consideration [15] and extensive experimental methods [16]. In most cases, the proposed solutions illustrated how a specific ground motion affects the structures. In this regard, the structural deformations (e.g., located on a homogenous sandy soil layer) caused by earthquake loading have been proven a function in several key factors namely, ground characteristics [e.g., friction angle (φ), dilation angle (ψ), unit weight (γ), soil elastic modulus (E), Poisson’s ratio (v)], structure characteristics [e.g., axial stiffness (EA) and bending stiffness (EI)], and seismic loading (e.g., variation of ground acceleration/velocity/displacement versus dynamic time). Different equations have been developed to compute the horizontal deflection of structures (e.g., for a particular earthquake) (e.g., Hajikhodaverdikhana et al. [17], Men [18], Arulmoli et al. [19], Gulkan and Yazgan [20], Qu et al. [21] and Thomas et al. [22]). The main concern of computing the horizontal displacement of vertical structural elements (e.g., such as columns as used in this study) is to minimize its likelihood of high deformation after real seismic loadings were applied. The most influential factors in calculating a correct value for the seismic response of ground and its effect on structural deformations, i.e., maximum horizontal displacement of vertical columns, are (i) soil properties (e.g., soil stress–strain properties), (ii) structural stiffness (e.g., material properties and flexural stiffness of structural elements) and (iii) earthquake loading applied to the ground. Note that the soil characteristics such as internal friction angle and cohesion, dilation angle, unit weight, elastic modulus, Poisson’s ratio as well as applied seismic loading on the above structures significantly affect the output.

In general, understanding the horizontal deformation of structures in a time of earthquake is a key factor in designing both short and high-rise buildings. For instance, different input parameters such as baseline material properties, foundation flexibility, and type of soil will influence the structural displacement. Numerous researchers such as Funck et al. [23], Pijush [24], Latifi et al. [25] and Uncuoglu [26] as well as Ahmadi and Kouchaki [27] have argued and introduced formulas to provide a reliable approximation of the horizontal deformation of short building structures. However, in reality, all these formulas are not reliable enough since they do not consider all influential parameters into their calculations. Artificial neural network (ANN) solutions are well introduced to support the prediction complex engineering problems [28,29,30,31,32,33,34,35,36] such as of horizontal displacement in structures built on single homogenous soil environments (e.g., Asadizadeh and Hossaini [37], Hasanzadehshooiili et al. [38], Gao and He [39]). In this study, to predict the maximum horizontal deformation of structures (maximum horizontal displacement at the highest level of columns) subjected to an earthquake (e.g., Chi-Chi earthquake), 84 different ANN models (6 iterations each with 14 different number of neurons) and 29 hybrid PSO-ANN models (e.g., helping the ANN to provide a better performance result) were designed.

2 FEM simulation and data collection

To determine horizontal deformation of the columns (Ux), i.e., subjected to the Chi-Chi earthquake (occurred in Taiwan on 21 September, 1999), we conducted a series of plane strain finite element modeling (FEM) for a building (e.g., a width equal to 1.0 m) located on a single layer soil (Fig. 1). In practical civil engineering projects, the soil layers beneath the building are usually not homogeneous; however, in most scenarios, a single layer of soil with uniform characteristics is used beneath the buildings. A commercial finite element software called Plaxis 2D was used to calculate the effects of earthquake loading on deformation of a short building (e.g., a four-level story) placed on a single sandy layer environment (Fig. 1a). Based on several recommendations (e.g., [40,41,42,43,44,45,46,47,48,49,50,51,52,53,54]), the most influential parameters that affect the maximum displacement of building columns are structural bending and axial stiffness as well as soil properties, [e.g., (i) friction angle (\(\phi\)), (ii) dilation angle (\(\psi\)), (iii) unit weight\((\gamma\)), (iv) elastic modulus (\({\rm E}\)), and (v) Poisson’s ratio (\(\upsilon )\)] (Table 1). It is important to note that cohesion was almost zero (e.g., the minimum possible value was equal to one as taken in the FEM) as the study aimed to predict the Ux in single-layered sandy soil. Needless to say that values of zero for cohesion (soil without any cohesive strength) supply sandy soil condition. Besides, values of H equal to 5 m were used for the distance between the columns. However, for each iteration, only one of the columns (shown in Fig. 2b) was considered. Ten different points (e.g., A–J) were selected as the target points where the maximum displacement occurred. Note that the displacement changes with time during the earthquakes. These changes were recorded for each point. For the dynamic loading, Chi-Chi 1999 in Taiwan, one of the most devastating recorded earthquakes was used. The variation of the acceleration versus time for the 1999 Chi-Chi, Taiwan, Earthquake is presented in Fig. 2. In this study, eight different sandy soils with a considerable difference in their basic characteristics were used in this study. These properties cover almost most of the common types of cohesionless soils. In terms of dilation angle and internal friction angle, ranges of 3.4–11.5° and 32–42° were considered and utilized in the modeling, respectively. In addition, the unit weight, elastic modulus and, Poisson’s ratio varied between 19.0 and 21.1 kN/m3, 17,500–65,000 kN/m2 and 0.333–0.249, respectively. The properties of soils that were considered into network prediction (e.g., shown as a descriptive view of the range of input database) including unit weight, friction angle, elastic modulus, and Poisson’s ratio are shown in Fig. 3. Figure 4 also presents the graphical summary and the range of input data (e.g., axial stiffness and bending stiffness of the structure) versus structural type. To ensure the rigidity of the columns at their lowest points, a rigid footing was considered at the bottom point of each column. Since the footing properties were not changed during the FEM simulations, thus it is not considered as one of the influential parameters.

Fig. 1
figure 1

A view of the model for the short building. a schematic model, b FEM model

Table 1 A small portion of the variables and database applied for modeling purpose
Fig. 2
figure 2

Variation of acceleration (g) versus time (s) of the 1999 Chi-Chi, Taiwan, Earthquake (after Chang et al. [55])

Fig. 3
figure 3

Range of input data versus soil type (shown as a graphical summary)

Fig. 4
figure 4

A graphical description of input data for the structural type

3 Model development for distribution of building response estimation

The FEM simulation database that is used to train the ANN and PSO-ANN models were from a total of 10,403 full-scale models. The measured results from 8323 FEM calculations were chosen randomly to train the network. On the other hand, results from 2080 FEM simulations were used for the validation and testing datasets. The database provided for a short building with four stories rested on a single-layered soil condition. Note that the horizontal displacement values (Ux) varied with dynamic time (e.g., Chi-Chi time domain earthquake). In this study, the structural properties (e.g., column bending and axial stiffness), soil properties such as internal friction angle (φ), soil dilation angle (ψ), unit weight of the soil (γ), soil elastic modulus (E), and dynamic loading such as variation of acceleration with time (t)) selected as inputs and building response to earthquake (i.e., its deformation variation at their highest level) were taken as the output. A descriptive example of a database found from the FEM outputs and influential parameters affecting the Ux, as the model output, employed in ANN modeling is presented in Table 1.

4 Results and discussion

4.1 Measured building response

As stated earlier, short building structure was modeled on a single sandy soil layer. Note that the addition of soil layers will increase the complexity of the problem and multilayered baseline soil conditions are considered as the input database. To simplify the model, a single soil layer is modeled into the FEM calculations. Figure 5 presents the variation of the measured Ux versus time for two points of A and J. Note point A (e.g., highest elevation column no. 1) and point J (e.g., column no. 10). Note that column no. 1 (with point A at its highest level) had the minimum stiffness values where column no. 10 (with point J at its highest level) had the maximum stiffness values. From this figure, it can be seen that point A in column no. 1, (e.g., the most flexible case) the column itself will have fluctuated behaviors rather than a rigid case (e.g., point J) with a smooth deformation.

Fig. 5
figure 5

Variation of the measured Ux versus time for point A in column no. 1 and point J in column no. 10. Note that column A has the minimum stiffness where column J has the maximum stiffness

4.2 Artificial neural network

The use of the artificial neural network in finding a solution for the highly complex problem is well established [56,57,58,59]. In this study, prediction of the short building response to earthquake loading [i.e., shown as the horizontal deflection of the columns at their highest level (Ux)] is the aim of the current study. As in the first step of the ANN optimization, different testing and training datasets were considered for the proposed models. During the calculation process, we separated two datasets including 80% of the whole dataset for the training dataset and 20% of the whole dataset for the testing dataset. The best structure of the ANN model found after some trial and error processes and by varying the number of neurons and the number of hidden layers [60,61,62,63,64,65,66]. In this regard, we built a total of 84 ANN-Tansig models. The performance of proposed networks was measured to assess their best network outputs. As a final result, we presented the average result from six different ANN model iterations in Tables 2 and 3, for the network performance R2 and RMSE, respectively. Two different ranking systems of total and color intensity ranking were used to rank the obtained outputs from the ANN modeling. Based on the average network result from all 84 ANN constructed networks (i.e., from both of the testing and the training datasets), the proposed model with the highest total ranking values (i.e., 27 and 28 on the R2 and RMSE results, respectively) should designate as the best constructed model. However, after checking all network performance (as illustrated in Figs. 6, 7), the ANN model with eight hidden neurons in a single hidden layer resulted in a better network prediction result. This means the final ANN structure that was chosen for this model should have an 8 × 12 × 1 structure but looking to the small changes in the network performance (as shown in Figs. 6, 7, respectively), the optimum value for the pre-defined number of nodes in a single hidden layer structure can be chosen to be four. In the case of this study and without simplification the best ANN structure for the calculation of the building response to earthquake loading was chosen to be 8 × 12 × 1.

Table 2 R2 outputs for 84 proposed ANN models with a change in the hidden neurons for the estimation Ux
Table 3 RMSE outputs for 84 proposed ANN (LM) models with a change in the hidden neurons for the estimation Ux
Fig. 6
figure 6

R2 outputs for 84 proposed ANN models with a change in the hidden neurons for the estimation Ux

Fig. 7
figure 7

RMSE outputs for 84 proposed ANN models with a change in the hidden neurons for the estimation Ux

4.3 Hybrid PSO-ANN models

To measure the capability of both ANN and PSO-ANN methods, two ranking techniques were utilized (Table 4). These rankings are described well in other studies (e.g., Moayedi and Hayati [67], Moayedi et al. [68], Moayedi and Rezaei [69]). The accuracy results (i.e., shown by statistical indexes of R2 and RMSE) for different values used for PSO influential parameter such as (i) population sizes, (ii) values considered for the acceleration constants of C1 and C2 and (iii) values between 0.2 and 1.0 that are considered for the term called inertia weight are presented in Figs. 8, 9, and 10, respectively. From these figures, it can be seen that the network performance (i.e., based on PSO-ANN model) that used swarm size equal to 400 (e.g., the swarm size that obtained the maximum total ranking), and both of the acceleration constants of C1 and C2 is equal to 2.0 (also in Table 5), respectively. Note that the inertia weight equal to 1.0 (Table 6) leads to the most reliable and accurate predictive PSO-ANN model.

Table 4 PSO-ANN network results for different population sizes
Fig. 8
figure 8

The results of network performance for various population sizes

Fig. 9
figure 9

Performance results for different C1 and C2 values

Fig. 10
figure 10

Performance results for different inertia weight values

Table 5 PSO-ANN network results for different C1 and C2
Table 6 PSO-ANN network results for different inertia weight

Based on the obtained results, although all proposed models have satisfactory approximation results in estimation Ux, the proposed hybrid PSO-ANN model can be presented as a more reliable and better ANN model in this field. Almost in all predictive models, the learning process was acceptable. Figure 11 shows the results of RMSE for different acceleration constants and inertia weight. Based on R2, RMSE and VAF, values of (0.9997, 0.0170 and 99.9293) and (0.9997, 0.0168 and 99.9950) are obtained for randomly selected training and testing of the proposed PSO-ANN models, respectively. Similarly, in ANN, the R2, RMSE, and VAF for both of the training and the testing datasets were (0.99961, 0.01815 and 99.713) and (0.99963, 0.01748 and 99.720), respectively. From all presented models, the PSO-ANN predictive model can provide higher performance results regarding all statistical indices (e.g., RMSE, R2, and VAF) for both training and testing phases compared to the other two methods. Training and testing results of the ANN model in predicting Ux based on the ANN predictive model (e.g., with ten nodes) and PSO-ANN predictive models are presented in Figs. 12 and 13, respectively. This ANN-based equation with the 8 × 4 × 1 structure represents a reliable estimation model in predicting Fult. This equation along with the proposed PSO-ANN structure showed excellent convergence as predictive networks (Eq. 1).

Fig. 11
figure 11

RMSE results for different a acceleration constants and b inertia weight

Fig. 12
figure 12

Training and testing results of the ANN model in predicting Fult (e.g., with ten nodes)

Fig. 13
figure 13

Training and testing results of the PSO-ANN model in predicting Fult

$${F_{{\text{ult}}}}={\text{ }}\left( \begin{gathered} \left( {9.5121 \times {\text{ }}{Y_1}} \right){\text{ }}+{\text{ }}\left( {0.2299{\text{ }} \times {\text{ }}{Y_2}} \right){\text{ }}+{\text{ }}\left( {{\text{ }} - 7.7751 \times {\text{ }}{Y_3}} \right) \hfill \\ +\left( {8.0928{\text{ }} \times {\text{ }}{Y_4}} \right)+\left( { - 0.0512{\text{ }} \times {\text{ }}{Y_5}} \right)+\left( { - 0.5861{\text{ }} \times {\text{ }}{Y_6}} \right) \hfill \\ +\left( {0.4709{\text{ }} \times {\text{ }}{Y_7}} \right)+\left( {0.0545{\text{ }} \times {\text{ }}{Y_8}} \right)+\left( {0.1161{\text{ }} \times {\text{ }}{Y_9}} \right) \hfill \\ +\left( {0.0158{\text{ }} \times {\text{ }}{Y_{10}}} \right)+\left( {8.9937{\text{ }} \times {\text{ }}{Y_{11}}} \right)+\left( { - 2.4076 \times {\text{ }}{Y_{12}}} \right)+\left( { - 1.4402} \right) \hfill \\ \end{gathered} \right),$$
(1)

where

$$Y1{\text{ }}={\text{ Tansig}}\left( {1.6090{\text{ }} \times {\text{ }}A+\left( {{\text{ }}0.1264{\text{ }}} \right) \times {\text{ }}B+\left( {{\text{ }} - 0.0121{\text{ }}} \right){\text{ }} \times {\text{ }}C+\left( {{\text{ }}2.0575{\text{ }}} \right)} \right)$$
(2)
$$Y2{\text{ }}={\text{ Tansig}}\left( {3.6824{\text{ }} \times {\text{ }}A+\left( {{\text{ }} - 0.5746{\text{ }}} \right) \times {\text{ }}B+\left( {{\text{ }} - 0.5475{\text{ }}} \right){\text{ }} \times {\text{ }}C+\left( {{\text{ }} - 1.4195{\text{ }}} \right)} \right)$$
(3)
$$Y3{\text{ }}={\text{ Tansig}}\left( { - 5.1603{\text{ }} \times {\text{ }}A+\left( { - 1.2555{\text{ }}} \right) \times {\text{ }}B+\left( {{\text{ }} - 0.4726{\text{ }}} \right){\text{ }} \times {\text{ }}C+\left( {{\text{ }} - 8.9539{\text{ }}} \right)} \right)$$
(4)
$$Y4{\text{ }}={\text{ Tansig}}\left( { - 5.6652{\text{ }} \times {\text{ }}A+\left( { - 1.1423{\text{ }}} \right) \times {\text{ }}B+\left( {{\text{ }} - 0.4409{\text{ }}} \right){\text{ }} \times {\text{ }}C+\left( {{\text{ }} - 13.7946{\text{ }}} \right)} \right)$$
(5)
$$Y5{\text{ }}={\text{ Tansig}}\left( {1.6469{\text{ }} \times {\text{ }}A+\left( {{\text{ }}0.9256{\text{ }}} \right) \times {\text{ }}B+\left( {{\text{ }}0.6186{\text{ }}} \right){\text{ }} \times {\text{ }}C+\left( {{\text{ }}0.3377{\text{ }}} \right)} \right)$$
(6)
$$Y6={\text{ Tansig}}\left( {0.5167{\text{ }} \times {\text{ }}A+\left( {{\text{ }} - 0.1137{\text{ }}} \right) \times {\text{ }}B+\left( {{\text{ }} - 0.1865{\text{ }}} \right){\text{ }} \times {\text{ }}C+\left( {{\text{ }} - 0.6806{\text{ }}} \right)} \right)$$
(7)
$$Y7={\text{ Tansig}}\left( { - 4.7088{\text{ }} \times {\text{ }}A+\left( {0.4517{\text{ }}} \right) \times {\text{ }}B+\left( {{\text{ }} - 0.0639{\text{ }}} \right){\text{ }} \times {\text{ }}C+\left( {{\text{ }} - 15.4673{\text{ }}} \right)} \right)$$
(8)
$$Y8={\text{ Tansig}}\left( {1.5396{\text{ }} \times {\text{ }}A+\left( {{\text{ }}1.3974{\text{ }}} \right) \times {\text{ }}B+\left( {{\text{ }} - 0.0858{\text{ }}} \right){\text{ }} \times {\text{ }}C+\left( {{\text{ }} - 0.6297{\text{ }}} \right)} \right)$$
(9)
$$Y9={\text{ Tansig}}\left( { - 15.6196{\text{ }} \times {\text{ }}A+\left( { - 0.3360{\text{ }}} \right) \times {\text{ }}B+\left( {{\text{ }}0.2663{\text{ }}} \right){\text{ }} \times {\text{ }}C+\left( {{\text{ }} - 6.2506{\text{ }}} \right)} \right)$$
(10)
$$Y10={\text{ Tansig}}\left( { - 3.9240{\text{ }} \times {\text{ }}A+\left( { - 0.0452{\text{ }}} \right) \times {\text{ }}B+\left( {{\text{ }} - 0.6381{\text{ }}} \right){\text{ }} \times {\text{ }}C+\left( {{\text{ }} - 0.5206{\text{ }}} \right)} \right)$$
(11)
$$Y11={\text{ Tansig}}\left( { - 1.4065{\text{ }} \times {\text{ }}A+\left( { - 0.1150{\text{ }}} \right) \times {\text{ }}B+\left( {{\text{ }}0.0230{\text{ }}} \right){\text{ }} \times {\text{ }}C+\left( {{\text{ }} - 1.1835{\text{ }}} \right)} \right)$$
(12)
$$Y12={\text{ Tansig}}\left( { - 0.9161{\text{ }} \times {\text{ }}A+\left( {0.2858{\text{ }}} \right) \times {\text{ }}B+\left( {{\text{ }}0.3287{\text{ }}} \right){\text{ }} \times {\text{ }}C+\left( {{\text{ }}0.3103{\text{ }}} \right)} \right)$$
(13)

where in Eqs. 2 to 13, the letters A to H are as follows:

A time (s), B friction angle, C dilation angle, D unit weight (kN/m3), E elastic modulus (kPa), F Poisson’s ratio (v), G EA, and H EI.

5 Conclusions

In the present study, the main objective was to find a reliable predictive method to estimate the horizontal displacement of short building subjected to a Chi-Chi 1999 earthquake. Therefore, results from a total of 10,395 FEM simulations were used as the input database. After presenting the applied solutions in this study, the obtained results from each technique compared and evaluated the effect of each influential parameter. To measure the applicability of the presented technique, we used two different ranking systems. Note that the results from developed networks provided for both testing and training datasets. The obtained results proved that both proposed models have acceptable approximation results in estimation Ux with time. However, the hybrid PSO-ANN model can present as a better and more reliable ANN model in this field. The learning process was acceptable in both predictive models. In the ANN predictive model, the R2, RMSE, and VAF for both of the training and testing datasets were (0.99961, 0.01815 and 99.713) and (0.99963, 0.01748 and 99.720), respectively, while values of (0.9997, 0.0170 and 99.9293) and (0.9997, 0.0168 and 99.9950), respectively, were obtained for training and testing of the optimized PSO-ANN predictive models. From both presented models, i.e., to estimate the horizontal deformation of short structures subjected to massive ground motion such as Chi-Chi 1999 earthquake, the PSO-ANN predictive model can provide higher performance result (e.g., lower RMSE and higher R2 and VAF) in terms of all statistical indices for both training and testing phases compared to ANN method.