Parameter Estimation of Damped Compound Pendulum Using Bat Algorithm

. In this study, the parameter identification of the damped compound pendulum system is proposed using one of the most promising nature inspired algorithms which is Bat Algorithm (BA). The procedure used to achieve the parameter identification of the experimental system consists of input-output data collection, ARX model order selection and parameter estimation using bat algorithm (BA) method. PRBS signal is used as an input signal to regulate the motor speed. Whereas, the output signal is taken from position sensor. Both, input and output data is used to estimate the parameter of the autoregressive with exogenous input (ARX) model. The performance of the model is validated using mean squares error (MSE) between the actual and predicted output responses of the models. Finally, comparative study is conducted between BA and the conventional estimation method (i.e. Least Square). Based on the results obtained, MSE produce from Bat Algorithm (BA) is outperformed the Least Square (LS) method.


Introduction
A simple pendulum system naturally exhibits a periodic motion due to external forces.This system contain of particle like bob of mass fixed to a string of length hinged at the lower part [1].In most physics courses, pendulum system can be a compulsory topic because it includes some mechanical subjects such as the period of oscillation, the simple harmonic motion the center of mass, , the acceleration of gravity, momentum, the moment of the inertia, etc. [2].One of the popular applications of damped compound pendulum is in aerospace technology i.e.In this area, there are many commercial flight controllers available in markets including those in [3][4][5].
In designing a positioning control of damped compound pendulum, ones need to have a a dynamic modeling of a whole system.One key difficulty, in our view, for theoretical analysis and design of damped compound pendulum systems is to make a proper modeling of a dynamics system [6].This is because a typical damped compound pendulum system composed a propeller, a brushless DC motor, a micro-process based ESC (electronic speed controller), difficult to model with a set of mathematical equations.In order to solve this kind of problem, system identification technique is proposed in this research.This method is performed based on the input-output data measured from the experimental rig of damped compound pendulum, which describes the dynamic behavior of the overall system.
System identification is one of the most rudimentary necessities for many engineering and scientific applications.The aim of system identification is to search for the approximate model that represent the actual system.This technique is implemented by utilising input output data collected via phisycal system or simulation model.The identified model can be used to take care of numerous issues, for example, to design a controller in control system or to predict the future output of a given system under different working conditions [7].
Mainly there are two types of identification techniques which is parametric and nonparametric.This study focuses on system identification based on parameter identification process.Generally, its involve two steps, namely input-output data collection, selection of model structure and estimation of model parameters.Several methods have been considered for parameter estimation such as least square, maximum likelihood and prediction error method.However this method often fail in searching for the global optimum if the search space is not differentiable or linear in the parameters [8].
Nowadays, nature inspired algorithms have been widely applied in system identification [9][10][11].It offers an alternative strategy that works with computational methods inspired by nature and natural ecosystem.These techniques provide more reliable and effective methodology for parametric estimation in system identification.For instance, bat algorithm gets to be one of the prominent algorithm works in optimization processes.It was invented from the echolocation behaviour of bats that also known as captivating creatures.Moreover, bats are great at finding the victims and they can recognize small size of prey and avoid obstacle in the darkness.They are the only mammals with wings and they have a capability of echolocation.They able to identify a prey and its moving speed by utilizing echolocation behaviour.This bat algorithm can see and identify nourishment sources with the assistance of echolocation.Among the bats species, microbats are an example of bat that use echolocation effectively, which is different from megabats.Microbats utilize a kind of sonar, called echolocation, maintain a strategic distance from snags, to recognize prey, and find their roosting crevices in the dark [12].
The utilisation of bat algorithm in optimisation problem has been reported in various applications.Bendjeghaba (2014) applied bat algorithm to search for optimum PID parameters in automatic voltage regulator (AVR) system.Bat algorithm was iterated to achieve optimum or near optimum controller parameters to improve voltage regulator features automatic response measures the simulation showed the effectiveness and efficiency of the proposed approach [13].Marichelvam and Prabaharam 2013 proposed a modified bat algorithm to solve the multistage hybrid flow shop (HFS) scheduling problems.Results showed that the proposed bat algorithm was more efficient than genetic optimization algorithm [14].Santos Coelho and Askarzadeh (2016) proposed a new enhanced differential bat algorithm (DBA) which was a swarm intelligence paradigm for minimising the total electrical power consumption of the multiple chiller systems (MCS) during 24 hours in an air conditioning system.
Their previous studies showed promising results in comparison with other optimization metaheuristics, such as particle swarm optimisation (FA), Artificial Bee Colony Algorithm (ABC), differential evolution (DE), chicken swarm optimization (CSO), and the Social Spider Algorithm (SSA) [15].Furthermore, in the field of system identification and control  2013) applied bat algorithm in optimising the generalised predictive controller for double acting pneumatic cyclinder.The results showed that the controller tuned by bat algorithm produces a better transient response, no overshoot and less steady state error [16].Sambariya and Manohar (2015) have studied the effectiveness of bat algorithm in model order reduction system.The numerator and denominator coefficients of a desired reduced-order system were optimized using integral square error minimization as a fitness function.Comparative study showed that bat algorithm was outperformed in terms of performance indices integral square error (ISE) [17].
In this research, bat algorithm is employed for parameter estimation of damped compound damped pendulum system.Accordingly, experimental rig is set up and prepared for data collection.Then, the information from the experiment was collected, select and satisfy the ARX model to get the model structure of the damped pendulum experiment.Afterwards, bat algorithm method is used to identify the experimental compound damped pendulum system.The estimated model is validated by mean square error and plotting the output predicted by the model and comparing it with the measured output for the validation data set.

Parametric identification
The parametric identification technique is a method used in system identification.This method is commonly used to estimate the parameters of a model from the physical system based on observed input-output data.Typically, system identification constituted of three main parts; data collection, selection of model structure, parameter estimation and model validation.

Model structure
The compound damped pendulum system is a single input single output (SISO).Due to simplicity of the system, an autoregressive with exogenous input (ARX) model was selected as a model structure.The ARX model can be written in the form : where u(t) is the discrete input signal, y(t) is the discrete output signal, e(t) is the noise disturbance.
The following polynomial A and B are given by equation ( 2) and ( 3) where n a and n b are the positive number which define the order of polynomials, The polynomial coefficients of equation ( 2) and equation ( 3) are the parameter to be estimated during estimation process.Therefore, it is necessary to write equation (4) using the backshift operator of ‫ݖ‬ ିଵ and write the equation in the form: where ߠ is the vector of unknown parameters and ‫)ݐ(ܺ‬ is the regression vector comprise of measured input and output variable.
In this experiment an ARX model by equation of transfer function:

BAT Algorithm
Bat algorithm was created by Yang in 2010.It was motivated by the echolocation conduct of microbats, with shifting pulse rates of emission and loudness.The ability of echolocation of microbats is interesting as these bats can discover their prey and segregate diverse sorts of bugs even in dark condition [20].
By looking to the natural behavior of Bats, it can fly randomly with velocity, v at position, x with a fixed frequency ƒ min , changing wavelength λ, and loudness A 0 to search for the prey.The wavelength (or frequency) of their emitted pulses and the rate of pulse emission r ϵ [0,1] can be adjusted automatically, depending upon the closeness of their target.In this study,the loudness is assumed to vary from a large (positive) A 0 to a minimum constant value A min .
Furthermore, for straightforwardness, they also use several assumptions: in general, the frequency ƒ in a range [ƒ min , ƒ max ] relates to a range of wavelengths [λ min , λ max ] .Moreover, they just vary in the frequency while fixed in the wavelength λ and assume ƒ ϵ [0, ƒ max ] in their usage.This is because λ and ƒ are related because of the way that λƒ = ν is constant.
While the algorithm is executed, they utilise virtual bats to update their of their positions, x i and velocities, ν i in a d-dimensional search space [21].The new solutions, x i ᵗ and velocities, ν i ᵗ at time step t are as follows: where β ϵ [0,1] is a random vector coming from a uniform distribution and, x is the current global best location (solution) which is computed after comparing all the solutions among all the n bats.For the local search, once a solution is chosen among the current best solutions, a new solution for each bat is generated locally using random walk: where Ɛ ϵ [-1,1] is a random number, while A t = ‹ A i ᵗ › is the average loudness of all the bats.
Finally, the loudness, A i and the pulse rate, r i will be updated every iteration.This is given by the following equations:  11) where α and are γ constants.

Experimental setup
Experiment setup of the whole system is shown in Figure 1.The system was driven by a brushless DC motor, a propeller, and electronic speed controller (ESC).The motor and its propeller were attached at the tip of the pendulum.The position of the pendulum was measured with a potentiometer sensor mounted at the suspended point of the pendulum.The data acquisition system (NI PCI-6221) was used as an interface between MATLAB program in PC with sensor and actuator.Selection of the input signal is the most prominent.It will influence the accuracy of the estimated model.The input signal should be selected in such a way that modes are effectively excited.In this study, PRBS signal was chosen as excitation input and sensor voltage as an output of the system.The position of the pendulum was displayed on the computer display panel.output and its predicted output.The mean square error is used to evaluate the performance of BA in searching the best parameter values for ARX model.

Estimated Parameter
The design parameters of the bat algorithm used are presented in Table 1.In this study, minimum mean square error (MSE) is used as a fitness function, while number of generation is used as stopping criterion.The MSE is calculated from the error between actual output and predicted output.
where ܰ is the number of sampled data.
A vital approach is then conducted to get the best estimated model as the predicted output, ො(‫)ݐ‬ must fit the actual output, ‫)ݐ(ݕ‬ with minimum error as best as possible.Thus, BA is executed in several generations during the optimization process to get minimum MSE.It is expected that, MSE will improve gradually for every generation.shows the minimum fitness function evaluating process using the BA method.BA converges at generation of 90 with MSE value of 0.00038285.The lower the MSE value the model is good enough to present the actual system.Figure 5 shows the error between actual and predicted output and comparison actual and predicted output.The model error is significantly reduced as BA has effectively identified the dynamic behaviour of the estimated model close to the actual output.

Conclusion
This study shows that bat algorithm is easy to implement, and able to estimate the model of the damped pendulum system from a given input-output data.From the results, BA has been demonstrated to outperform least square method in minimizing the prediction error and resulting in a dependable level of accuracy of the approximated model.The value of MSE for Bat Algorithm method is 0.00019057 compared Least Square method is 0.0026398.

Figure 2
Figure 2 and 3 show input-output that consists of the input voltage fed to ESC and output voltage from the potentiometer.There are 500 samples of data have been collected.It is important to make sure that data has been filtered and pre-process in order to remove any unwanted noise.Then the input-output data are divided into two parts, for estimation and validation process.During the estimation process, BA is used to search for the optimum model parameters.Then, these parameters are validated by comparing between the actual 4, parameter a1 and a2 start converge at generation of 90 and 93.Meanwhile, parameter b1 and b2 start converge at generation of 84.The final parameters values are taken at generation 100.At this generation, all parameters are stable.Figure 4(b)

Fig. 6 .
Comparing the model structure LS and BA

Table 1 .
Parameters of bat algorithm.

Table 2 .
MSE train is the value obtained during optimisation process with BA, while MSE Test is the value obtained from model validation process.

Table 2 .
Estimated parameter and MSE

Comparison the model structure LS and BA method
Comparative study is conducted to compare the performance between BA and conventional estimation technique, i.e. least square (LS).Figures 6 shows the comparison between measured output and model predicted output in terms of MSE.From the observation, the value of MSE for BA method is 0.00019057 lower than LS method.It has been shown that, the model obtained using BA has captured the dynamic characteristics of the system well.This condition proved that BA able to search for the global optimum of the given fitness function.