## Services on Demand

## Journal

## Article

## Indicators

- Cited by SciELO
- Access statistics

## Related links

- Cited by Google
- Similars in SciELO
- Similars in Google

## Share

## Revista ingeniería de construcción

##
*On-line version* ISSN 0718-5073

### Rev. ing. constr. vol.28 no.3 Santiago 2013

#### http://dx.doi.org/10.4067/S0718-50732013000300005

**Virtual bat algorithm for the computation of Duhamel's Integral applied to structural systems with one degree of freedom**

**Sergio Vanegas*, Iván Amaya ^{1}**, Rodrigo Correa*****

* Estudiante de Maestría en Ingeniería Civil, Escuela de Ingeniería Civil. Universidad Industrial de Santander, Bucaramanga. COLOMBIA

** Estudiante de Doctorado en Ingeniería, Escuela de Ingenierías Eléctrica, Electrónica y de Telecomunicaciones. Universidad Industrial de Santander, Bucaramanga. COLOMBIA

*** Profesor Titular, Escuela de Ingeniería Ingenierías Eléctrica, Electrónica y de Telecomunicaciones. Universidad Industrial de Santander, Bucaramanga. COLOMBIA

*ABSTRACT**The current article presents the use of the virtual bat optimization algorithm, for solving Duhamel's Integral in dynamic systems with one degree of freedom. Some situations are solved, as a demonstrative example, calculating global maxima. The results found were comparable (both, in precision and in accuracy) to those achieved with other calculation approaches. In a similar fashion, acceloremeter data of a Chilean seism (2010) was used to calculate the dynamic response and its maximum displacement. In all cases, the number of virtual bats were varied, noting an influence over the run time.*

*Keywords: Bat algorithm, Duhamel's Integral, dynamic structure, impulsive excitation, earthquake accelerograms*

*1. Introduction**When performing a dynamic analysis of civil structures, it is often found that they are subject to arbitrary excitations, which, in a general case, are not harmonic. The dynamic answer to these excitations (that can be provoked by impulsive excitations or by accelerations of the ground due to seismic activity), can be predicted through the calculation of an integral that can be analytically evaluated when the excitation signal is a simple expression. This integral is known as Duhamel's Integral (DI), and it allows to theoretically calculate the response of a linear system (arbitrary structure) with a single degree of freedom and due to impulsive excitations. The latter, by definition, is an excitation applied for a short time interval. The impulse belonging to it can be defined as the product of a force by its duration (time).*

*A seism, which can also be considered an impulsive excitation, can be analyzed through the aforementioned integral. In this case, information of the telluric movement is required, which is gathered through an accelerogram, and which basically is a data series (accelerations) separated by short time intervals.*

*This article shows, in an exemplary way, how it is possible to analyze (evaluate) Duhamel's Integral through a numeric optimization strategy known as Virtual Bat Algorithm (VBA), to obtain the maximum and minimum displacements of the dynamic response of a system with a single degree of freedom.*

*Metaheuristic optimization algorithms have become popular because of their simplicity and easiness of programming. Moreover, they provide good results (i.e. precision and accuracy) in optimization problems with a relative degree of complexity, and they can operate on systems with restrictions. Among them, Particle Swarm Optimization (PSO) (Parsopoulos & Vrahatis 2010), as well as one of its more recent modifications, i.e. Binary Particle Swarm Optimization (BPSO) (Kennedy & Eberhart 1997), Harmony Search (HS) (Ramos et al., 2011), and the Firefly algorithm (Xing-She Yang 2010), are some of the more outstanding ones. There is also another important approach, i.e. the bat algorithm (BA), which was proposed in 2010. This mimics the behavior of microbats when looking for prey, with the impressive ability of being able to differentiate between obstacles and their target. The current article deals with the use of this algorithm for solving Duhamel's Integral, and focuses on the effect of varying the population size on the capability of finding an appropriate answer.*

*2. Discussion and development*

*2.1 Theoretical foundation*

*Duhamel's Integral is a theoretical equation that allows calculation of the response of a linear system with a single degree of freedom, for arbitrary structures, which are under an external and brief excitation. For the general case of a damped system, DI has the following form (Paz 1992; Maldonado & Chio 2004):*

**(1a)**

*When dealing with a system with no damping* *(*ξ=0*), DI becomes:*

**(1b)**

*And after a trigonometric change, it yields:*

** (1c)**

*Being:*

**(1d)**

**2.1.1** *Spectral response for an excitation at the support (seismic movement)*

*An important problem, from the point of view of the structure, is the analysis of a system under the effect of an excitation at the base (foundation or support) of the structure. The movement equation of the damped oscillator under excitation is (Maldonado & Chio 2004):*

**(1e)**

*for which:*

*This equation can also be written as a function of the relative movement of the mass with respect to the movement of the support, obtaining:*

**(1f)**

*where **y** is the relative movement, that can be defined as:*

**(1g)**

*The solution of this equation to the response of the deformation* **y(t),** *depends, basically, on the acceleration of ground's movement,* **u _{s}"(t),**

*the natural vibrating frequency*ω=VK/m

*and the damping ratio,*ξ

*, of the structure. The analytical solution of this differential equation is:*

**(1h)**

*Due to the fact the seismic acceleration of the terrain varies irregularly with time, an analytical solution of the problem is just impossible. However, numerical procedures, supported on the constantly increasing processing velocity of modern computers, pose an effective alternative for dealing with these situations. Seismic accelerograms are already digitalized and filtered to control and debug initial errors, thus obtaining an appropriate accelerogram of the terrain. The function represents* **u" _{s}(t)**

*the accelerogram defined by the corrected*

*numerical coordinates in some time intervals close enough to provide an appropriate approximation.*

*Having solved the movement equation, a response throughout the time of the accelerogram, is obtained. With it, it is possible to define the maximum response achieved by the system, which represents an important variable for predicting its behavior when facing a seism with similar characteristics.*

*2.1.2 Virtual bat algorithm (VBA)*

*During this article it is proposed to transform the calculation of the maximum displacement through DI, into a maximization problem. Moreover, it was decided to use BA for this task. This algorithm was initially proposed by Yang, and it is based on the approximate description of some bat species given their natural echolocation features, which can be used to locate objects and prey using the echo produced by their ultrasonic squeal, that bounces between the surrounding objects. This system is so developed that they can avoid obstacles as small as a human hair. It is believed that they also generate a 3D scenario using this technique, as well as the time difference between the perception at their ears, and the variation in the intensity of the echoes (X. Yang 2010).*

*In spite of being proposed in 2010, there is already evidence of some variants that strive to improve its behavior as an optimization approach (Xing-She Yang 2010; X.-S. Yang & Gandomi 2012). In order to simplify the algorithm, some ground rules were established regarding the behavior of bats (X. Yang 2010; Gandomi et al., 2012; X. Yang 2011):*

*1. Virtual bats use echolocation to differentiate between obstacles and prey.*

*2. Virtual bats fly randomly with velocity **v _{i}*,

*at a position*

*x*

_{i}*,*

*emitting a frequency between f*

_{min}and f_{max}, varying the*wavelength*λ

*and the intensity A*

_{0}when locating their prey.*They can adjust the wavelength (or the frequency) as well as the emission ratio* *r, r ε [0,1]** depending on the proximity to their target.*

*3. The intensity varies from an initial value* *A _{0}*

*to a minimum of*

*A*.

_{min}*Summarizing, a pseudocode of the algorithm can be expressed as the original proposal of Yang (X. Yang 2010; Gandomi et al., 2012; X. Yang 2011; Nakamura et al, 2012; Ponnapa & Pupong 2012):*

*Define the objective function* *f(x), x = (x ,...,x _{d })^{T}.*

*Initialize the virtual bats population** x _{¡}(i = 1,2,...,n)* y

*v*

_{i.}*Define frequencies* *fi* at *x _{i}.*

*Initialize the pulse rate* *r _{i.}*

*and their intensity*

*A*

_{i.}**while** *(t**<Max. iteration number)*

*Generate new solutions by adjusting the frequencies, and update each bat's velocity and position, using equation. (1) to equation (3).*

*if**(rand >r _{i })*

*Select a solution between the best ones. *

*Generate a local solution around the best solution *

*selected, using a random walk.*

*end if*

*if**(rand A, & f(x _{i})<f(x))*

*Accept the new solutions. *

*Increase* *r _{i}*

*and reduce*

*A*

_{i}.*end if*

*Classify bats and find the actual best* *x,*

**end while**

*During simulations, the initialization of the frequencies, as well as the position and velocity of each bat, is defined using Expressions (2) to (4):*

**(2) **

**(3) **

**(4)**

*where:*

*β= Random value between 0 and 1.*

*f _{i}= Frequency for the i-th virtual bat.*

*f _{min}* y

*f*

_{max}*= Minimum and maximum (X. Yang 2010)*

*frequencies. Values between 0 and 100 are recommended (X. Yang 2010).*

*v ^{t}_{i},v^{t-1}= Velocity at time step t and t-1, respectivelyfor the i-th bat.*

*x _{i}t,x_{¡}^{t-1}= Position at time step t and t-1, respectively, for the i-th bat.*

*x _{*}= Mejor posición en el actual paso de tiempo/ Best position at the current time step.*

*The local search in the algorithm is carried out using a random walk, that is given in Equation (5):*

**(5)**

*where:*

*ε = Random number between -1 and 1. *

*A ^{t} = Average of A. at the current time step*

*In order to increase r _{1} and A_{t } Expressions (6) and (7) are used:*

**(6) **

**(7)**

*where:*

α= *Random value between 0 and 1. **During this research, a value of 0.9 was chosen (X. Yang 2010).*

Y= Constant *value bigger than zero. **During this research, 0.9 was assumed (X. Yang 2010).*

*2.1.3 Virtual bat for Duhamel's Integral*

*In order to implement VBA for solving DI, it was necessary to modify the demo provided by (Matlab Central n.d.), with the following one:*

*Objective Function (Expression (1))*

*Initialize virtual bats population x _{¡}(i = 1,2,..., n) and v_{i} i a given domain (defined between 0 and t-max).*

*Define frequencies fi at x _{i} (defined between f_{min}=0 and f_{max} =2).*

*Initialize pulse rate r _{i} = 0.5 and their intensity A_{i}= 0.5 (constants for *

*each time step).*

*Define an error E =∞.*

*Define a tolerance for stop criteria, Tol=0.01*

**while** (t *<Max iteration number &&* E> *Tol)*

*Evaluate the function (Equation (1)) and calculate f(x*^{t})*(for this case,* u(t)*).*

*Look for the maximum or minimum (x _{*}) on the previously evaluated values.*

*Generate new solutions by adjusting frequencies, and update velocities and position [Expressions (1) to (3)]. If the new solutions, x ^{t}_{i}, are out of bounds, then bring them back. if (rand > r_{i})*

*Generate a new local solution around the best solution selected, x _{,}, through a random walk:*

**(8)**

*end if*

*Evaluate x _{new} in the function, f(x_{new} ).*

*if (rand < A, && f**(x*_{new}*j < f (x ^{t}_{i}) *

*— find min f(x*

_{ne}J > f (x'J — find max*Update solutions x to x. ^{t+1}*

*Calculate error E. *

**end while**

*Some of the changes performed on the algorithm are related to the random walk defined by equation (5), which becomes equation (8). It was observed that by using this new equation, the search process is enhanced.*

**2.2 Experimental results**

*For analyzing VBA applied to DI, several tests were run, but only some of them are reported due to space limitations. A couple examples shown in (Maldonado & Chio 2004) are used, in order to observe the algorithm's ability to find an appropriate answer. Following that, an analysis on a real-life seism is performed, using data of an accelerometer set in Chile, which registered a seism from 2010 (Facultad de Ingeniería Civil -Universidad de Chile n.d.). For each situation, the run time is reported, using a computer with the following specifications: AMD Phenom II X6 @ 2.8 GHz, 8 GB RAM, working under Windows 7 Professional. For each experiment, the number of virtual bats were varied, in order to see its effect on the answer.*

**2.2.1** *Situation**N°1.**Harmonic function.*

*The excitation produced into the system with a single degree of freedom, is presented through Expression (9).*

**(9)**

The data given to the software is as follows:

*Mass= 7.6 Ton *

*K= 30000 KN/m*

ξ= 5%

*As a control group, the analytical answer found in (Maldonado & Chio 2004) is used. In this case, the best displacement is* *u(t)=5.2 cm manifested at a time of 0.085 seconds. The last column of Table 1 shows the time required to finish the process. The plot of the dynamic response is generated using 200 points. Table 1 summarizes the results for simulations with different number of bats.*

*Figure* *1* *shows the behavior of displacement through time, provided by the algorithm.*

Table 1.Summary of the number of simulations for the first situation |

Figure 1.Situation 1 with 100 bats. Displacement in [m] and time in [s] |

*2.2.2 Situation N° 2. Triangle function*

*In this case, a function defined by sections is used to excite the system. Its definition can be seen in equations (10), and it is plotted in Figure 2.*

**(10)**

Figure 2.Excitation signal for the second situation |

*Once again, answers from (Maldonado & Chio 2004) were used as a control group. In this case, the best displacement was* *u(t)=0.293* cm *for a time of 0.6 seconds, approximately. Table 2 summarizes the results achieved with the algorithm, finding in the last column the time it took to converge to an answer. A plot of the response, with 100 dots is shown in Figure 3. The data fed to the algorithm was the following:*

*Mass= 12 Ton *

*K= 50000 KN/m*

*ξ= 0%(Sin amortiguación)/(no damping).*

Table 2. Summary of the results for Situation N° 2 |

Figure 3. Situation Nº2 with 100 bats. Displacement in (m) and Time in (s) |

*2.2.3 Situation N°3. Earthquake accelerogram. Seism in Chile (Maule's earthquake)*

*The excitation used in this situation is taken from data of an 8.8 quake, known as Maule's earthquake, which happened on February 27th, 2010. Some of the specifications of this seismic event are: peak acceleration of 465.484 cm/s2, peak velocity of 27.707 cm/s and a peak ground displacement of 7.001 cm. The algorithm is fed with a file containing the accelerations reported by (Facultad de Ingeniería Civil - Universidad de Chile n.d.), and the following structural values:*

*Mass= 7.6 Ton *

*K= 30000 KN/"*

*ξ=* *5% *

*Since this situation does not have comparative data, BA was used to observe the response and to check the run time required for calculating the maximum displacement. Figure 4 shows the seismic data, as well as the algorithm's response for time displacement as a function of time. Once again, Table 3 summarizes the results for different number of bats*

Table 3.Summary of the results for situation N° 3 |

Figure 4.Situation N° 3 with 2000 virtual bats. Displacement in [m] and time in [s] |

*3. Conclusions*

*During this research, it was possible to observe that for all of the three exemplary cases with Duhamel's Integral, highly satisfactory results were achieved when calculating the maximum displacement of a structure with a single degree of freedom. The virtual bat algorithm is quite precise when finding the maximum and minimum of a function, so it can be used as a particular problem requires it. The run times of the algorithm were relatively short for the number of bats used during the tests.*

*It was observed that the algorithm tends to remain in local extremes when the search domain is big in comparison to the number of bats used (i.e. the bat algorithm works better, at least for this application, when searching in packs). In any case, and thanks to it being a stochastic metaheuristic, the algorithm finds the optimum, in this case Duhamel's Integral, very quickly. The results summarized in the tables show that the answer reported by the algorithm does not differ too much, and that it stabilizes around an answer in a short time. Because of this, it is recommended to keep working on it, using it for solving problems with a relatively high mathematical complexity.*

**4. References**

** Facultad de Ingeniería Civil - Universidad de Chile (2012),** Base de Datos Sismo de Chile. Available at: http://terremotos.ing.uchile.cl/ [Accessed November 1] [ Links ].

** Gandomi A.H. et al., (2012),** Bat algorithm for constrained optimization tasks. Neural Computing and Applications. Available at: http:// www.springerlink.com/index/10.1007/s00521-012-1028-9 [Accessed November 24, 2012] [ Links ].

** Kennedy J. and Eberhart R.C. (1997),** A Discrete Binary Version of the Particle Swarm Algorithm. In 1997 IEEE International Conference on Systems, Man, and Cybernetics. Computational Cybernetics and Simulation. IEEE, pp. 4104-4108. Available at:http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=637339[Accessed December 11, 2012].

** Maldonado E. and Chio C.G. (2004),** Análisis Sísmico de Edificaciones 1st ed., Ediciones Universidad Industrial de Santander. [ Links ]

** Matlab Central, Bat Algorithm (demo) (2012),** Available at: http://www.mathworks.com/matlabcentral/fileexchange/37582-bat- algorithm-demo [Accessed November 1] [ Links ].

** Nakamura R.Y.M. et al. (2012),** BBA: A Binary Bat Algorithm for Feature Selection. In XXV SIBGRAPI - Conference on Graphics, Patterns and Images. Ouro Preto, pp. 291-297. Available at: http://www.decom.ufop.br/sibgrapi2012/eproceedings. [ Links ]

** Parsopoulos K.E. and Vrahatis M.N. (2010),** Particle Swarm Optimization and Intelligence: Advances and Applications, [ Links ]

** Paz M. (1992),** Dinámica Estructural 3rd ed., Editorial Reverté, S.A. [ Links ]

** Ponnapa M. and Pupong P. (2012),** Solving Multi-Stage Multi-Machine Multi-Product Scheduling Problem Using Bat Algorithm. In 2nd International Conference on Management and Artificial Intelligence IPEDR. Singapore: IACSIT Press, pp. 98-102. [ Links ]

** Ramos C.C.O. et al. (2011),** A Novel Algorithm for Feature Selection Using Harmony Search and its Application for Non-Technical Losses Detection. Computers & Electrical Engineering, 37(6), pp.886-894. Available at: http://linkinghub.elsevier.com/retrieve/pii/ S0045790611001479 [Accessed December 11, 2012] [ Links ].

** Yang X. (2010),** A New Metaheuristic Bat-Inspired Algorithm. In International Workshop on Nature Inspired cooperative Strategies for Optimization (NICSO 2010). Granada: Springer, pp. 65-74. [ Links ]

** YangX. (2011),** Bat Algorithm for Multiobjective Optimization. International Journal of Bio-Inspired Computation, 3(5), pp.2 67-274. [ Links ]

** Yang X.-S. and Gandomi, A.H. (2012),** Bat Algorithm: A Novel Approach for Global Engineering Optimization. Engineering Computations, 29(5), pp.464-483. [ Links ]

** Yang Xing-She. (2010),** Nature-Inspired Metaheuristic Algorithms 2nd ed., United Kingdom: Luniver Press. [ Links ]

E-mail: ivan.amaya2@correo.his.edu.co

Fecha de Recepción: 12/12/2012 Fecha de Aceptación: 06/06/2013