An Explosion Based Algorithm to Solve the Optimization Problem in Quadcopter Control

: This paper presents an optimization algorithm named Random Explosion Algorithm (REA). The fundamental idea of this algorithm is based on a simple concept of the explosion of an object. This object is commonly known as a particle: when exploded, it will randomly disperse fragments around the particle within the explosion radius. The fragment that will be considered as a search agent will ﬁll the local space and search that particular region for the best ﬁtness solution. The proposed algorithm was tested on 23 benchmark test functions, and the results are validated by a comparative study with eight well-known algorithms, which are Particle Swarm Optimization (PSO), Artiﬁcial Bee Colony (ABC), Genetic Algorithm (GA), Differential Evolution (DE), Multi-Verse Optimizer (MVO), Moth Flame Optimizer (MFO), Fireﬂy Algorithm (FA), and Sooty Tern Optimization Algorithm (STOA). After that, the algorithm was implemented and analyzed for a quadrotor control application. Similarly, a comparative study with the other algorithms stated was done. The ﬁndings reveal that the REA can yield very competitive results. It also shows that the convergence analysis has proved that the REA can converge more quickly toward the global optimum than the other metaheuristic algorithms. For the control application result, the REA controller can better track the desired reference input with shorter rise time and settling time, lower percentage overshoot, and minimal steady-state error and root mean square error (RMSE).


Introduction
Over the past few years, the popularity of metaheuristic optimization techniques to solve complex real-life problems has grown among researchers. The main reason for using metaheuristic optimization techniques is that they are relatively simple, flexible, non-transferable, and can avoid local stagnation [1]. The simplicity of the metaheuristic algorithms is derived from straightforward concepts that are typically inspired by physical phenomena, animal behavior, or evolutionary ideas. Flexibility refers to applying metaheuristic algorithms to different problems without any specific structural changes in its algorithm. Metaheuristic algorithms are easily applied to a variety of issues since they usually assume problems as black boxes. Most metaheuristic algorithms have mechanisms that are free of derivation.
In contrast to gradient-based optimization approaches, these algorithms stochastically optimize the problems. This optimization process begins with a random solution(s), and there is no need to calculate the derivative of the search spaces to find the optimum value. This makes metaheuristic algorithms highly suitable for real problems with expensive or unknown information on derivatives.

•
There are multiple possible best solutions. • There is information sharing between the multiple solutions that can assist each other to avoid local optima. • Exploration in the search space of multiple solutions is more significant than a single solution.
Furthermore, these metaheuristic algorithms can be classified further into three classes which are evolutionary-based, physical-based, and swarm-based methods [3], as shown in Figure 1. The first class is a generic population-based algorithm based on biological evolution, such as reproduction, mutation, recombination, and selection. This method often provides close-to-optimal solutions to all types of problems as it does not make any assumptions about the basic fitness landscape. Some of the popular metaheuristic algorithms based on the concept of evolution (EA) in nature are Genetic Algorithm (GA) [4], Differential Evolution (DE) [5], Evolution Strategy (ES) [6,7], Genetic Programming (GP) [8], and Biogeography-Based Optimizer (BBO) [9]. Compared to conventional optimization techniques, metaheuristic algorithms have a superior capability in avoiding local optima. Due to these algorithms' stochastic nature, it is possible to prevent stagnation in local optima and search extensively throughout the search space. The real problem area is usually unknown and complicated with many local optima, so metaheuristic algorithms are excellent for optimizing these challenging problems.
Generally, metaheuristic algorithms can be divided into two categories: single-solution and multi-solution based. On a single-solution basis, the search process begins with one candidate solution improved throughout the iterations. Whereas multi-solutionbased optimization was carried out using an initially random set of population solutions, these populations will be enhanced during the iterations. Multiple solutions (population) based optimization has some advantages over single-solution-based optimization [2]: There are multiple possible best solutions. • There is information sharing between the multiple solutions that can assist each other to avoid local optima. • Exploration in the search space of multiple solutions is more significant than a single solution.
There are two essential components in the metaheuristic algorithms that influence the solution's efficiency and accuracy: the phases of exploration and exploitation [31,32]. The exploration phase ensures that the algorithm moves and explores the other promising regions in the search space. In contrast, the exploitation phase provides the search for the optimal solutions within the promising regions that have been achieved during the exploration phase [33]. The fine-tuning of these two components is crucial to obtain an optimal solution for the given optimization problems. However, due to the optimization problem's stochastic nature, it is not easy to balance these two components. This motivates us to develop a new metaheuristic algorithm and to explore its ability to solve optimization problems.
In this paper, we will present a different metaheuristic algorithm for optimization problems. The main objective of this paper is to develop a robust algorithm. The term robust used in this paper is discussed based on the algorithm's accuracy and consistency in finding the optimal solution for the benchmark function tested in several independent runs. For instance, as we know, a stochastic algorithm will not produce a similar result every time we run the algorithm. Thus, these algorithms will usually need to be run several times to see how many times a good result is achieved. Additionally, the average and standard deviation (typical statistical analysis) of the result can be obtained. This way, the result can be more convincing than a single run's result. If the algorithm can provide a high consistency output result while maintaining its accuracy, then we can say that the algorithm is robust [34][35][36].
Hence, an algorithm based on the explosion of a set of initial particles that will produce a random scatter particle's fragment around the initial particles within the explosion radius has been proposed, namely Random Explosion Algorithm (REA). According to the No-Free-Lunch (NFL) theorem [37], no algorithm can solve all the optimization problems alone, which means that a particular algorithm for a specific problem may show outstanding performance. Still, the same algorithm may give a poor performance on different problems. Therefore, it has led us to develop this robust algorithm.
The rest of this paper is organized as follows: Section 2 introduces the proposed algorithm's concept. In Section 3, the benchmark test functions are presented. Section 4 will discuss the application of the algorithm for quadrotor control. In Section 5, the simulation results and discussion on the algorithm's performance and the controllers and a comparative study with several other well-known existing algorithms are presented. Finally, a concluding remark is presented in Section 6.

Random Explosion Algorithm (REA)
In this section, the basic idea of the proposed REA algorithm is described in detail.

The Fundamental Concept
The concept of the proposed algorithm is based on the phenomena of an explosion. When a particle is exploded, it will produce numbers of fragments randomly scattered around the particle. Each particle's fragments will be landed in a particular location called RF within the explosion radius, r e . In our opinion, the particle's fragments during the explosion are considered the search agent to search the local space around the particle.
After the first explosion occurs, we assume the fragment will become the new particle and continue to explode. This process will be repeated until it can no longer be exploded, in which whether the stopping criteria have been met or the explosion radius, r e , is approaching zero. Based on whichever fragment, we chose the closest to the global best solution to select which fragments will become the next particle.
Since there is n-number of fragments produced during the explosion, the probability of finding the local optima or near local optima solution can be guaranteed. If we consider multiple particles, we can also assure that the global optimum can be found and avoid local optima's stagnation. These particles 1, 2, 3, . . . , m, will search their own local space and update the best fitness so far based on the global optimum. This process will be repeated until all particles reach the only global optimum.

Design of the REA
Suppose that the initial position of the particles is defined in Equation (1) as X P i is randomly generated within the lower and upper boundaries of search space and the current location of a particle is where d indicates the dimension of the variable in the d dimensional search space. Then, for each particle, it will be exploded to produce randomly scattered fragments within the explosion radius, r e , around the initial particle. The location of the fragments is determined as in Equation (2): where R F j is a uniformly distributed random number in the explosion radius, (−r e , r e ). Next, a selection of the new particle must be made to continue the explosion as the next generation. The best fragment in each group must replace the old particle that has been exploded before. A selection strategy based on the shortest distance between the current fragment in the current group and the global best solution is used to determine which fragment is the best. The following Equation (3) calculates the distance between the individual fragment and the global best solution, where GB is the global best solution.
In this algorithm, the explosion radius plays an essential role in determining the performance of the algorithm. To make sure the agent is exploring the search space globally, a high value of explosion radius should be chosen at the beginning of the iteration and gradually decreasing until the end of the iteration. A higher value of the explosion radius will ensure the search agent explores the further search space (better exploration).
A lower value of the explosion radius lets the search agent exploit the potential region better (good exploitation). Furthermore, an appropriate number of fragments also must be chosen so that the chance of finding the best solution is higher. A simple technique to reduce the explosion radius, r e , which is used in this work, is given in Equation (4), where c is a parameter constant, It is the current iteration, and MaxIt is the total number of iterations.

Steps of Implementation of REA
The flowchart of the proposed REA is presented in Figure 2 below. The steps of implementation of REA are summarized as follows: Step 1: Define the parameters of REA (maximum iteration, number of particles, number of fragments, the radius of the explosion, c).
Step 2: Initialize the particle population, X P i , within the lower and upper bound of the search space, where i = 1, 2, 3, . . . , m.
Step 3: Evaluate the fitness value of each particle.
Step 4: Explosion: Generate the location of n-number of random fragments, X F j , within the explosion radius, r e , in each group (in the first explosion, an initial explosion radius is used; particle 1 will be group 1, particle 2 will be group 2, and so on).
Step 5: Evaluate the fitness value of an individual fragment in each group. Step 6: Calculate the distance between individual fragments in each group and the global best solution.
Step 7: Selection: Select the best fragment in each group which is the fragment that is nearest (minimum distance) to the global best solution.
Step 8: Update the new particle with the best fragment in each group obtained in Step 7 to continue the next explosion.
Step 9: Update the new explosion radius (explosion radius will be decreasing from the initial explosion radius to 0/~0).
Step 10: If the stopping criterion is satisfied, then the algorithm will be stopped. Otherwise, return to Step 4.
Step 11: Return the best optimal solution (after the stopping criteria are satisfied).

Steps of Implementation of REA
The flowchart of the proposed REA is presented in Figure 2 below. The steps of implementation of REA are summarized as follows: Step 1: Define the parameters of REA (maximum iteration, number of particles, number of fragments, the radius of the explosion, c).

REA for the Benchmark Test Functions
Benchmark test functions are a group of functions that can test the performance and characteristics of any optimization algorithms for the various optimization problems, such as constrained/unconstrained, continuous/discrete, and unimodal/multimodal problems. For any new optimization algorithm developed, testing and evaluating the algorithm's performance is very important. Therefore, the common practice to test how these new algorithms are performed compared to other algorithms is to test on the benchmark test functions. Furthermore, such benchmarking is also vital to gain a better understanding and greater insight into the pros and cons of the algorithms under-tested [38][39][40][41].
A total of 23 benchmark test functions are applied to the algorithm to demonstrate the algorithm's efficiency. These benchmark test functions can generally be divided into three main categories, that are unimodal benchmark test functions [42], multimodal benchmark test functions [28] and fixed dimension benchmark test functions [28,42]. These benchmark functions are described in Appendix A in Tables A1-A3, respectively, where Dim indicates the function's dimension, Range is the search space boundary of the functions, and f min is the value of the optimum function.
In the first category of the benchmark test functions, the unimodal benchmark functions (F 1 -F 7 ), there is only one global optimum, and there are no local optima. Thus, that makes it suitable for the analysis of the algorithm's convergence speed and exploitation capability. The second category consists of 9 benchmark functions (F 8 -F 13 ), and 10 benchmark functions (F 14 -F 23 ) are included in the third category. The second and third categories of the benchmark test functions are useful for examining the algorithm's local optima avoidance and exploration capability as these functions consist of many local optima in addition to the global optimum. The 3D plot of all the benchmark functions is illustrated in Figures 3-5 [3].

REA for Quadrotor Control Application
After we have tested our algorithm on the benchmark test functions, the proposed algorithm is implemented for the quadrotor control application. The goal here is to tune the controller's parameters with the proposed algorithm to search for the best performance optimal parameter.

REA for Quadrotor Control Application
After we have tested our algorithm on the benchmark test functions, the proposed algorithm is implemented for the quadrotor control application. The goal here is to tune the controller's parameters with the proposed algorithm to search for the best performance optimal parameter.

Mathematical Model of The Quadrotor
Before we can implement the algorithm, it is necessary to define the quadrotor's dynamic equation first. The dynamics equation of the quadrotor used here is based on the Newton-Euler theory. Several assumptions must be considered to derive these equations, which are [43] (1) the structure of the quadrotor is rigid and symmetrical, (2) the center of gravity of the quadrotor and the origin of the body-fixed frame must coincide, and (3) thrust and drag forces are proportional to the square of the rotor's speed. The complete dynamics equation of the quadrotor is given in Equation (5) below [44]: where I x , I y , I z are the inertia in the x, y, and z-axis, respectively, l is the length of the rotor to the center of the quadrotor, m is the mass of the quadrotor, g is the gravity constant, and U i (I = 1, 2, 3, 4) is the control input to the quadrotor. It can be expressed as in Equation (6) below. The parameters of the quadrotor used are given in Table 1 below [45]:

A Hybrid PD2-LQR Controller
In this study, only four states will be chosen for the control purpose: the altitude (z) and the three Euler angles (φ, θ, ψ). In order to control and stabilize the system, an appropriate control law for the system must be designed to accomplish the desired control performance. The structure of the hybrid PD2-LQR controller is depicted in Figure 6 below:

A Hybrid PD2-LQR Controller
In this study, only four states will be chosen for the control purpose: the altitude (z) and the three Euler angles (ϕ, θ, ψ). In order to control and stabilize the system, an appropriate control law for the system must be designed to accomplish the desired control performance. The structure of the hybrid PD2-LQR controller is depicted in Figure 6 below: Figure 6. The structure of the hybrid PD2-LQR controller. Figure 6. The structure of the hybrid PD2-LQR controller.
Let a state-space representation of a linear system is described as in Equation (7) below: Now, from the above control structure, the control law of the system can be represented as in Equation (8) below: From there, we can see that the gain K T is the total gain of the original LQR controller's gain and the PD2 controller's gain and is defined as Equation (9) below, and Ke is the system's error gain.
E is the error signal between the output y and the reference input defined in Equation (10). Now, combining the Equations (9) and (10), the control input of the system can be expressed as Equation (11) below:

Objective Function
The evaluation of the control performance will be determined based on the objective function. Generally, the typical objective functions that are mostly used to optimize the controller's parameter are Integral Absolute Error (IAE), Integral Square Error (ISE), Integral Time Absolute Error (ITAE), and Integral Time Square Error (ITSE). The IAE objective function was used in this study to optimize the controller's parameters so that the error between input/output of the system is minimum/0.
Hence, the algorithm considers the system's overshoot (which is also related to the rise time) and steady-state error to achieve this. With these interdependent relationships among parameters, we can be sure that the algorithm minimizes all involved parameters (or at least within the acceptable limit), so the input/output of the system is minimal.
Additionally, the objective function has been modified to accommodate some other performance indexes such as the rise time (RT), percentage overshoot (OS), and steady-state error (SSE). This modification was made based on the findings made by [44], who claimed that the system's response shows an improvement where a faster rise time, short settling time, small overshoot, and minimal steady-state error are produced when such objective function is used. The IAE and the new objective function are given in the Equations (12) and (13) respectively:

Experimental Setup
The parameter settings for the proposed algorithm and other selected algorithms are shown in Table 2. These parameters are set according to the literature reported. For our algorithm, the selection of the parameter is made based on several preliminary experiments. We found that our algorithm works quite well with the parameters setting reported in Table 2. However, it is worth noting some guidelines for tuning these parameters. Sooty Tern Optimization Algorithm (STOA) Firstly, for the number of fragments, it is advisable to choose based on the number of populations, the complexity of the problem, and how big the search space is. Suppose the number of populations is less than 10. In that case, it is recommended to use a high value of the number of fragments such as five or more times of population size, while for populations greater than 10, it is sufficient to use only triple times of population size (used in this study).
For a complicated problem, it is recommended to increase the number of fragments instead of the number of the population since it only has a minor effect on the computational time, while increasing the population size will increase the computational time significantly. For a small search space, it is sufficient to use a low number of fragments (triple of populations size), but for a large search space, it is recommended to use a high number of fragments because the search radius will be larger, so low number of fragments is not appropriate to search such large space.
Secondly, for the parameter constant, c, it is advisable to choose based on the maximum number of iterations. In this study, with a maximum iteration of 1000, we use c = 70, but the range can be between 70-100 where the algorithm can still perform sufficiently. Different maximum iteration has a different range of c value. This value must be chosen carefully since it affects the search radius that will indirectly affect the algorithm's exploration and exploitation capability.
Experimentation and algorithms are implemented in the MATLAB R2020a version (MathWorks, Natick, MA, USA), and the simulation was run on the Microsoft Windows 10 with 64-bit on Core i5 processor with 2.4 GHz and 8 GB of memory. The mean and standard deviation of the best fitness achieved until the last iteration is calculated as the performance metrics. For each of the benchmark test functions, the algorithms were run for 10 separate runs, with each run using 1000 times of iterations.

Results and Discussion
The simulation and experimentation to evaluate the performance of the proposed algorithm are presented in this section. The algorithm was tested on 23 benchmark test functions. The performance of the proposed algorithm is also validated by comparing it with eight other well-known algorithms. Particle Swarm Optimization (PSO) [21], Artificial Bee Colony (ABC) [23], Genetic Algorithm (GA) [4], Differential Evolution (DE) [5], Multi-Verse Optimizer (MVO) [46], Moth Flame Optimizer (MFO) [47], Firefly Algorithm (FA) [28], and Sooty Tern Optimization Algorithm (STOA) [48] are the algorithms chosen.
For all algorithms, the number of search agents (population) used is 30, the maximum iteration is set to be 1000, and each algorithm was run for 10 separate runs. Furthermore, the controller's performance using the proposed algorithm is also evaluated similarly to the first part of this study by comparing the result with the different algorithms used. The controller's performance will be assessed in terms of the rise time, settling time, percentage overshoot, steady-state error, and RMSE of a system's response.

Performance Comparison of REA
A comparative study with eight other well-known algorithms on unimodal, multimodal, and fixed dimensional multimodal benchmark test functions was conducted to demonstrate the proposed algorithm's performance. The unimodal benchmark functions consist of one global optimum and are therefore suitable for analyzing the algorithm's exploitation capability. According to the results in Table A4 in Appendix B, REA provided a competitive outcome compared to the others.
In particular, REA outperforms the other algorithms on F 1 , F 2 , F 3 , F 4 , F 6 , and F 7 benchmark functions with the lowest mean and standard deviation. For F 5 only, with the lowest mean and standard deviation, ABC performs better than REA. Based on these results, we can say that REA can provide superior performance in exploiting the optimum with a faster convergence speed than the other algorithms.
Unlike the unimodal benchmark functions, the multimodal benchmark functions consist of many local optima, which increase exponentially with the dimension. For this reason, it makes them suitable for evaluating the algorithm's exploration capability and local stagnation avoidance. Based on the findings reported in Table A4 in Appendix B for multimodal benchmark functions (F 8 -F 13 ) and fixed dimension multimodal benchmark functions (F 14 -F 23 ), we can see that REA has a good exploration capability in finding the global optimum solution for the benchmark functions tested. These results show that out of the 16  In F 18 , all algorithms produced the same results for the average value, but only PSO has the best standard deviation. In F 19 , all algorithms except STOA have the same average value as REA, while only REA has the best standard deviation. In F 21 , REA, ABC, DE, and FA have the same average value, but only DE has the best standard deviation. In F 22 and F 23 , REA, ABC, DE, and FA have the same average value, but only REA has the best standard deviation. These findings show that REA can obtain a very competitive outcome in most multimodal benchmark functions and has good merit in exploration capability and local optima avoidance.

Convergence Analysis
The convergence curve of all algorithms is plotted in Figure 7 to visualize the REA algorithm's evolution over iterations. For this analysis, three distinct benchmark functions were contemplated: F 1 (for unimodal benchmark functions), F 10 (for multimodal benchmark functions), and F 15 (for fixed dimension multimodal benchmark function). These figures are plotted to illustrate the speed at which the algorithms converge and the algorithm's exploration and exploitation capability. From these figures, we can see that REA has a very competitive result compared to the other algorithms.
At the initial stage of the iteration process, we can see that REA can explore the promising region in the search space and quickly converge towards a global optimum compared to other algorithms. After a certain amount of iteration, the REA finally converges towards the optimum when the final iteration is reached. With these findings, we can conclude that REA has a better balance between exploration and exploitation capability to find a global optimum. REA's convergence speed is also faster and more accurate than the other algorithms.

Performance Comparison of REA Based PD2-LQR Controller
Since the number of populations affects the algorithms' performance, all algorithm's population size was chosen to be the same. The specific parameters that describe the properties of the algorithm were selected according to the literature stated before. The system's initial condition is set to be (0, 0, 0, 0), and the final state will be (1, 1, 1, 1) for the roll, pitch, yaw, and altitude motions, respectively.
For evaluation purposes, there are five performance criteria used for the comparisons: rise time, settling time, percentage overshoot, steady-state error, and RMSE of the system's response. The system's response using the REA PD2-LQR controller in comparison with various other algorithms is presented in Figure 8 for the roll, pitch, yaw, and altitude motions. It could be evident that from the simulation result obtained in Table 3 and the step response depicted in Figure 8 below, all of the controllers were able to drive the quadrotor to the desired reference altitude and angle and manage to stabilize the system in a very fast period with a good performance.
However, there is still a significant difference in the performance response among these controllers. From these figures and table, we can see that the REA based controller produced the best overall performance in all motion. In contrast, the worst overall performance can be said to be GA based controller in roll, pitch, and altitude motion and DE based controller in yaw motion.
Nevertheless, to properly visualize how much the proposed REA based controller can improve the system's performance, we need to calculate and show the percentage improvement for better understanding. The REA based controller's percentage improvement with respect to the other individual controllers is presented in Table 4 for the roll, pitch, yaw, and altitude motion. ard deviation. These findings show that REA can obtain a very competitive outcome in most multimodal benchmark functions and has good merit in exploration capability and local optima avoidance.

Convergence Analysis
The convergence curve of all algorithms is plotted in Figure 7 to visualize the REA algorithm's evolution over iterations. For this analysis, three distinct benchmark functions were contemplated: F1 (for unimodal    From the table above, we can see that the improvement is very significant and very good in terms of the rise time and settling time for all four motions. The REA based controller seems to outperform all the other controllers. The overshoot and steady-state error of a certain controller is minimal, and thus we can neglect these values or approximate them to zero.
Finally, the value of RMSE for the REA based controller is not likely to have much improvement, but if we look carefully, it only has a small difference; thus, it still can be acceptable. For example, let us take the DE based controller for yaw motion with the highest percentage increase; we can see that it is only 0.03501 indifferent with the REA based controller. Therefore, we can conclude that the REA based controller can produce a better overall result than the other controllers.

Robustness Test of REA Based PD2-LQR Controller
In this section, the REA-based controller's robustness test under the presence of unknown external disturbance and sensor noise will be presented. This simulation was conducted to simulate the real-world application of the quadrotor. When flying in an outdoor environment, the quadrotor is constantly subjected to unknown disturbance such as wind gust [49]. It is also known that when implemented on a real quadrotor system, the feedback data from the sensor are always noisy and distorted due to the mechanical vibration produced by the electronic equipment [50]. Usually, the experimental (disturbance present) data will diverge from the simulation data due to circumstances stated previously [51][52][53][54]. Hence these simulations were conducted with and without disturbance and noise to see how much deviation there would be between the simulation results.
In the first test, it is assumed that the quadrotor is flying in an environment where it was constantly subjected to an unknown external disturbance throughout the flight time. The external disturbance force used for the simulation was modeled using a sinusoidal wave function with the amplitude of 1 and the frequency of 8 Hz, as shown in Equation (14). The use of this type of wind gust profile is because according to [55], this type of wind gust profile and step gust profile occurs relatively often in nature. Both step and sinusoidal functions can be used to construct an arbitrary wind gust profile. The choice of the amplitude and the frequency of the modeled disturbance were based on various researchers' work, as shown in Table A5 in the Appendix C. Based on Table A5, we can see that the amplitude and frequency used were as low as 0.002 and π/100, respectively, while the highest values were up to 60 and 10, respectively. Therefore, an amplitude of 1 and 8 Hz frequency have been chosen for this work, which is within the prescribed ranges mentioned earlier. This model is sufficient to be used for approximating the external disturbance face by the quadrotor [49,56]. The external disturbance was injected into both the altitude and attitude subsystem. The plot of the disturbance's model is presented in Figure 9.
The step response of the system using the proposed REA based PD2-LQR controller subjected to the unknown external disturbance are shown in Figure 10a-d, for the roll, pitch, yaw, and altitude motion respectively.
From these figures, it is observed that there is a little bit of attenuation in the system's response around the desired reference point. This attenuation occurs because of the timevarying disturbance that we have defined earlier. However, the controller could still control and stabilize the quadrotor within the desired reference altitude and angle without any severe degradation in its performance. Suppose we can see from the altitude and attitude error response of the system in Figure 11. In that case, the error produced is not too significant, and the deviation is only around ±0.01 • for roll, pitch, and yaw motion, respectively, and ±0.03 m for the altitude motion.
In the second test, we assume that the system is contaminated with the noisy signal coming back from the feedback loop sensor. White Gaussian noise with a zero mean value and variance of 0.01 was applied [57] to simulate the sensor noise present in the feedback signal. The generated noise was fed into the feedback loop for both the altitude and attitude subsystems. The plot for the generated sensor noise is presented in Figure 12. The step response of the system using the proposed REA based PD2-LQR controller subjected to the unknown external disturbance are shown in Figure 10a-d, for the roll, pitch, yaw, and altitude motion respectively.
From these figures, it is observed that there is a little bit of attenuation in the system's response around the desired reference point. This attenuation occurs because of the timevarying disturbance that we have defined earlier. However, the controller could still control and stabilize the quadrotor within the desired reference altitude and angle without any severe degradation in its performance. Suppose we can see from the altitude and attitude error response of the system in Figure 11. In that case, the error produced is not too varying disturbance that we have defined earlier. However, the controller could still control and stabilize the quadrotor within the desired reference altitude and angle without any severe degradation in its performance. Suppose we can see from the altitude and attitude error response of the system in Figure 11. In that case, the error produced is not too significant, and the deviation is only around ±0.01° for roll, pitch, and yaw motion, respectively, and ±0.03 m for the altitude motion.  In the second test, we assume that the system is contaminated with the noisy signal coming back from the feedback loop sensor. White Gaussian noise with a zero mean value and variance of 0.01 was applied [57] to simulate the sensor noise present in the feedback signal. The generated noise was fed into the feedback loop for both the altitude and attitude subsystems. The plot for the generated sensor noise is presented in Figure 12.  In the second test, we assume that the system is contaminated with the noisy signal coming back from the feedback loop sensor. White Gaussian noise with a zero mean value and variance of 0.01 was applied [57] to simulate the sensor noise present in the feedback signal. The generated noise was fed into the feedback loop for both the altitude and attitude subsystems. The plot for the generated sensor noise is presented in Figure 12. The step responses of the system using the proposed REA based PD2-LQR controller subjected to the sensor noise present in the system are shown in Figure 13a-d for the roll, pitch, yaw, and altitude motion respectively. From these figures, it is observed that the system is a little bit attenuating around the desired reference point since it was constantly exposed to the sensor noise. Nonetheless, the controller could still control and stabilize the quadrotor within the desired reference altitude and angle without a significant deterioration in its performance. Suppose we can see from the altitude and attitude error response of the system in Figure 14. In that case, the error produced is not too large, and the deviation is only around ±0.3 • for roll, pitch, and yaw motion, respectively, and also ±0.3 m for the altitude motion.
Aerospace 2021, 8, x 47 of 31 exposed to the sensor noise. Nonetheless, the controller could still control and stabilize the quadrotor within the desired reference altitude and angle without a significant deterioration in its performance. Suppose we can see from the altitude and attitude error response of the system in Figure 14. In that case, the error produced is not too large, and the deviation is only around ±0.3° for roll, pitch, and yaw motion, respectively, and also ±0.3 m for the altitude motion.

Summary
In the previous subsections, the simulation result of the controllers in all four motions, roll, pitch, yaw, and altitude has been presented and discussed. In the first subsection, a comparative study between the proposed algorithm, REA, with eight well-known algorithms like PSO, ABC, GA, DE, MVO, MFO, FA, and STOA has been made in order to demonstrate the effectiveness of the propose algorithm over other algorithms in terms of the exploitation and exploration capability, convergence speed, and the accuracy of the algorithm in finding the optimal solution. The results show that REA delivered a very competitive result compared to the eight other well-known metaheuristic algorithms such as PSO, ABC, GA, DE, MVO, MFO, FA, and STOA.
Next, after we found that the proposed algorithm can provide a satisfactory performance compared to other algorithms when tested on the 23 benchmark test functions as provided in Appendix A, we then implemented all of the algorithm on the proposed PD2-LQR controller. Similarly, a comparative study between the proposed REA PD2-LQR controller and other algorithms based PD2-LQR controller has been conducted. The performance of the controllers was evaluated based on the rise time, settling time, percentage overshoot, steady-state error, and RMSE of the system's response. Based on the findings, we can realize that the proposed controller can give a superior performance than the other controller. Moreover, the proposed algorithm can provide an optimal solution for the controller's parameters which led to a better system's response.  Concerning the steady-state error, the proposed REA based controller only has the best performance in roll and pitch motion with an error of 6.44466E−06, respectively. In contrast, in the yaw and altitude motion, it was dominated by MFO based controller with 9.20977E−05 and FA based controller with 1.92583E−11, respectively. In terms of RMSE, MVO based controller outperformed REA based controller in roll, pitch, and altitude motion with 0.21630, 0.21630, and 0.39700, respectively, while DE based controller in yaw motion with 0.16930.
On evaluating the worst performance, it is observed that in terms of the rise time, GA and DE based controller is the worst with 0.10570 s in roll/pitch motion, and 0.16879s in altitude motion for GA based controller, while 0.11720 s in yaw motion for DE based controller. In addition, the same controller also has the worst settling time with 0.19360s in roll/pitch motion (GA), 0.28837 s in altitude motion (GA), and 0.21080s in yaw motion (DE). The highest overshoot is produced by MFO based controller with 2.32631E−02%, 2.32631E−02%, and 1.55229E−02% in roll, pitch, and yaw motion, while STOA based controller is the highest in the altitude motion with 1.52380E−04%.
As to steady-state error, it is found that PSO based controller has the highest error in roll

Summary
In the previous subsections, the simulation result of the controllers in all four motions, roll, pitch, yaw, and altitude has been presented and discussed. In the first subsection, a comparative study between the proposed algorithm, REA, with eight well-known algorithms like PSO, ABC, GA, DE, MVO, MFO, FA, and STOA has been made in order to demonstrate the effectiveness of the propose algorithm over other algorithms in terms of the exploitation and exploration capability, convergence speed, and the accuracy of the algorithm in finding the optimal solution. The results show that REA delivered a very competitive result compared to the eight other well-known metaheuristic algorithms such as PSO, ABC, GA, DE, MVO, MFO, FA, and STOA.
Next, after we found that the proposed algorithm can provide a satisfactory performance compared to other algorithms when tested on the 23 benchmark test functions as provided in Appendix A, we then implemented all of the algorithm on the proposed PD2-LQR controller. Similarly, a comparative study between the proposed REA PD2-LQR controller and other algorithms based PD2-LQR controller has been conducted. The performance of the controllers was evaluated based on the rise time, settling time, percentage overshoot, steady-state error, and RMSE of the system's response. Based on the findings, we can realize that the proposed controller can give a superior performance than the other controller. Moreover, the proposed algorithm can provide an optimal solution for the controller's parameters which led to a better system's response. Concerning the steady-state error, the proposed REA based controller only has the best performance in roll and pitch motion with an error of 6.44466E-06, respectively. In contrast, in the yaw and altitude motion, it was dominated by MFO based controller with 9.20977E-05 and FA based controller with 1.92583E-11, respectively. In terms of RMSE, MVO based controller outperformed REA based controller in roll, pitch, and altitude motion with 0.21630, 0.21630, and 0.39700, respectively, while DE based controller in yaw motion with 0.16930.
On evaluating the worst performance, it is observed that in terms of the rise time, GA and DE based controller is the worst with 0.10570 s in roll/pitch motion, and 0.16879s in altitude motion for GA based controller, while 0.11720 s in yaw motion for DE based controller. In addition, the same controller also has the worst settling time with 0.19360s in roll/pitch motion (GA), 0.28837 s in altitude motion (GA), and 0.21080s in yaw motion (DE). The highest overshoot is produced by MFO based controller with 2.32631E-02%, 2.32631E-02%, and 1.55229E-02% in roll, pitch, and yaw motion, while STOA based controller is the highest in the altitude motion with 1.52380E-04%.
As to steady-state error, it is found that PSO based controller has the highest error in roll (3.20000E-03), pitch (3.20000E-03), and yaw (2.40000E-03), respectively while DE is the highest in altitude motion with an error of 1.92650E-04. Lastly, in RMSE, ABC, REA, and GA based controllers produce the highest error in roll/pitch, yaw, and altitude, respectively. These values are 0.24068 (ABC)(roll/pitch), 0.20431 (REA)(yaw), and 0.40447 (GA)(altitude). If we can notice that the RMSE of the proposed REA based controller is the worst in yaw motion, the highest difference is only 0.03501 with the best controller, which is very minimal; thus, it can still be accepted.
Finally, in order to test the robustness of the proposed controller, a simulation with the present of the unknown external disturbance such as wind gust and sensor noise was conducted to simulate the real-world condition. The external disturbance was modeled using a sinusoidal wave function with the amplitude of 1 and a frequency of 8Hz. The sensor noise was modeled using white Gaussian noise with a zero mean value and variance of 0.01. The external disturbance and the sensor noise were applied for the simulation period. The simulation result shows that the proposed controller can still work effectively even under these condition with minimal error produce.
This study only conducted a simulation work to prove the REA PD2-LQR controller's superior performance. According to several studies that compare simulation and experimental work, it is found that the performance has some differences when a real implementation is done. Still, the differences between these two works are not too significant. Therefore, we present some references that work on simulation and experimental study of the quadrotor control and stabilization to support our findings further.
Raza and Gueaieb [51] presented their findings that the pitch and roll angle are within (−3, +4) • for simulation, while (−8, +7) and (−6, +12) • in pitch and roll, respectively, for experimental work. Li and Li [58] found that the quadrotor's attitude angle fluctuated at ±5 • from a 0.1 • reference angle. In work done by Burggräf, Pérez Martínez [52], the stabilization time for the attitude angle is around 1.3 s for simulation, while for an experiment, it takes 2.2 s to stabilized. Rich and Elia's [53] results show that simulation and experimental work is almost the same, with approximately less than 10 s to settle at the desired altitude. Hong and Nguyen [54] did the position control of the quadrotor using a gain-scheduling PD controller. They found that the time taken to reach the desired reference is 9.55 s for simulation while 17.5 s for experimental.
Fang and Gao [59] found that all the attitude angles are within ±0.1 radian and the steady-state error of the altitude is ≈0 for the simulation, while the experimental results show that the attitude is almost the same as the simulation, which is also within ±0.1 radian and the altitude has maximum 5 cm deviation. Mohammadi and Shahri [60] found that all the attitude angles are within ≈±1 • . The steady-state error of the altitude is within ≈0.1 m for the simulation. At the same time, the experimental results show that the roll angle is within ≈(+2, −1) • , the pitch, and yaw angle is within ≈(+1.5, −1) • , and the altitude is within ≈(−0.03, +0.04) meter.
In Tan and Lu [61], findings show that the roll and pitch angles are stabilized within ≈0 • , and the yaw angle is within ≈±0.05 • for the simulation, while the experimental results show that the roll and pitch angles are stabilized within ±1 • , and the yaw angle is within ±3 • . Kim and Nguyen [62] presented findings which show that all the attitude angles are stabilized within ≈0 radians for the simulation, while the experimental result shows that the roll angle is stabilized within ≈±0.02 radian, the pitch angle is within ≈±0.05 radian, and the yaw angle is less than ≈0.1 radian.
Abbasi [63] presented that all the attitude angle are stabilized within ≈0 radians for the simulation, while the experimental results show that the roll angle is stabilized within less than ≈±5 • (0.09 radian) and the pitch angle is within less than ≈±3 • (0.05 radian). In Xuan-Mung and Hong [64], the altitude error converges to zero within ≈21 s after step input is commanded at 5 s for the simulation. The experimental results show that the quadrotor reaches the desired altitude within ≈45 s after step input is commanded at 10 s. There is a 19 s difference between the simulation and experiment.
In Martins and Cardeira [65], the root mean square error of the x/y/z position and yaw angle are 0.0865 m, 0.0714 m, 0.0556 m, and 0.0095 • respectively for the simulation, while the experimental results are 0.1010 m, 0.0781 m, 0.0570 m, and 0.2244 • respectively. Wu and Hu [66] presented that all the attitude angles are stabilized within ≈0 radians for the simulation. Simultaneously, the experimental results show that the roll angle is stabilized within less than ≈(+0.4, −0.3) radian, the pitch angle is within less than ≈(+0.1, −0.5) radian. The yaw angle is less than ≈±4 radian.
Choi and Ahn [67], found that the position and attitude angle are stabilized within ≈0 m and degree error respectively for the simulation, while the experimental result show that the x/y position has maximum peak error of less than ≈1.5 m, the altitude error is less than 0.1 m, the roll angle is stabilized within less than ≈(+3, −5) • , and the pitch angle is within less than ≈±0.3 • . Lu and Liu [68] found the quadrotor successfully tracks the desired trajectory with almost zero tracking error for the simulation. Simultaneously, the experimental results show tracking error is produced but still within the acceptable range.
Feng [69] found that the roll and pitch angles are stabilized within ≈0 radians for the simulation, while the experimental results show that the roll and pitch angles are stabilized within less than ≈±0.05 and ≈±0.02 radians respectively. In summary, based on these references that work on both simulation and experimental studies, we can conclude that the deviation between the performance in simulation and experiment is not too significant or too severe. Hence, when the proposed controller based on a simulation work implemented on a real platform, it can still be stable even with marginal degrees/meters of error.

Conclusions
This paper presented an optimization algorithm called a Random Explosion Algorithm (REA). This algorithm's fundamental idea is based on a simple concept of an explosion that will produce a randomly dispersed fragment around the initial particle within the explosion radius when a particle is exploded. The algorithm was tested on the 23 benchmark test functions to evaluate the algorithm's performance in exploration, exploitation, local optima avoidance, and convergence behavior. The results show that REA delivered a very competitive result compared to the eight other well-known metaheuristic algorithms such as PSO, ABC, GA, DE, MVO, MFO, FA, and STOA. About the first benchmark functions (unimodal benchmark functions), REA has a superior exploitation capability to exploit the optimum value of the functions. The second benchmark functions (multimodal and fixed dimensional multimodal benchmark functions) have confirmed that REA could explore the promising region in the search space and escape the local optima and seek the global optimum. The convergence analysis has proved that the REA could converge faster and accurately toward the global optimum than the other algorithms. Besides that, we also implemented the algorithm for the quadrotor control application. The proposed REA based controller's performance in terms of the rise time, settling time, percentage overshoot, steady-state error, and RMSE of a system's response has been compared and evaluated with the other optimization-based controller stated before. The simulation result shows that the proposed REA based controller gives the best control performance in terms of the rise time, settling time, and percentage overshoot in all four motions (roll, pitch, yaw, altitude), while producing small steady-state error and RMSE as other controller. Finally, the proposed controller's robustness test has also been conducted to simulate the real-world application where the quadrotor is always subjected to an unknown external disturbance and suffers from the sensor noise coming from the mechanical vibration in the electronic part. The external disturbance was modeled using the sinusoidal wave function with an amplitude of 1 and a frequency of 8 Hz. The sensor noise was modeled using white Gaussian noise with a zero mean value and variance of 0.01. Under this set of conditions, the simulation result shows that the proposed controller can still work effectively with only minimal error produces. The errors are ±0.01 • for the roll, pitch, and yaw motion and ±0.03 m for the altitude motion under the presence of external disturbance, while ±0.3 degrees/meters in all four motion when subjected to the sensor noise. In conclusion, based on these findings, we can say that the proposed REA algorithm and REA based controller are suitable and can be used for the controller's parameter tuning and quadrotor control and stabilization. More so since it can provide a further improvement to the quadrotor's system performance in all four motion with an excellent overall result.

Data Availability Statement:
The authors confirm that the data supporting the findings of this study are available within the article.

Acknowledgments:
The authors thank the editor and anonymous reviewers for their helpful comments and valuable suggestions.

Conflicts of Interest:
The authors declare no conflict of interest. Table A1. Unimodal benchmark function.