Virtual bat algorithm for the computation of Duhamel ’ s Integral applied to structural systems with one degree of freedom Algoritmo del murciélago virtual en el desarrollo de la Integral de Duhamel para sistemas estructurales con un grado de libertad

Revista Ingeniería de Construcción Vol. 28 No3, Diciembre de 2013 www.ricuc.cl Revista Ingeniería de Construcción RIC Vol 28 No3 2013 http://www.ricuc.cl ....................................................................................................................................................................................................................................................................................


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.

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): When dealing with a system with no damping (x=0), DI becomes: And after a trigonometric change, it yields:

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): 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: where y is the relative movement, that can be defined as: 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 w=√K/m, and the damping ratio,ξ, of the structure.The analytical solution of this differential equation is: 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.

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 υ 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.

(1h)
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.

The intensity varies from an initial value
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 1 ,..., x d ) T .Initialize the virtual bats population x I ( i = 1,2,...,n) and υ i Define frequencies fi at x ί .Initialize the pulse rate r ί and their intensity A ί .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 ί )
Select a solution between the best ones.Generate a local solution around the best solution selected, using a random walk.
Accept the new solutions.Increase r ί and reduce A ί .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): Donde/ where: ß= Valor aleatorio entre 0 y 1/Random value between 0 and 1. f i =Frecuencia para el murciélago virtual i-ésimo)/ Frequency for the i-th virtual bat.f min , f max =Frecuencias mínimas y máximas.Valores recomendados entre 0 y 100 (X.Yang 2010)/Minimum and maximum frequencies.Values between 0 and 100 are recommended (X.Yang 2010).υ t i ,υ t-1 =Velocidad en el paso de tiempo t y t-1, respectivamente, para el murciélago i-ésimo/ Velocity at time step t and t-1, respectively,for the i-th bat.
x i t ,x i t-1 =Posición en el paso de tiempo t y t-1,respectivamente, para el murciélago i-ésimo/ 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): In order to increase r i and A i , Expressions ( 6) and ( 7) are used:

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 (i = 1,2,..., n) and υ i i a given domain (defined between 0 and t-max).

Define frequencies fi at x i (defined between ƒ min =0 and ƒ 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 i ) (for this case, 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: (5) (6) (7) Donde/ where: ϵ =Número aleatorio entre -1 y 1/Random number between -1 and 1. Ᾱ t =Promedio de A i en el actual paso de tiempo/Average of A i at the current time step Donde/ where: α= Valor aleatorio entre 0 y 1. En esta investigación, se escogió el valor 0.9 (X.Yang 2010)/Random value between 0 and 1.
During this research, 0.9 was assumed (X.

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 enhanced.

Experimental results
For analyzing VBA applied to DI, several tests were 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.

Situation N°1. Harmonic function.
The excitation produced into the system with a single degree of freedom, is presented through Expression ( 9).
As a control group, the analytical answer found in (Maldonado & Chio 2004) is used.In this case, the best displacement is u(t)=5.2cm 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.

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 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: 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 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.

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 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.

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