Improved Beetle Antennae Search Algorithm-Based Lévy Flight for Tuning of PID Controller in Force Control System

To enhance the anti-interference capability of an electrohydraulic force servo control system and increase the efficiency of the PID controller, this paper proposes a LBAS-PID controller. In LBAS, the random step created by the Lévy flight trajectory was used in the original algorithm to enhance the diversity of the population and convergence speed. In the force servo control system, LBASPID can enhance the performance of the system. First, the basic mathematical model of an electrohydraulic force servo control system was built based on theoretical analysis. -e transfer function model was obtained by identifying the system parameters. Second, the introduced Lévy flight beetle antennae search algorithm was introduced and applied to ten benchmark functions, and the results were compared with those of other algorithms.-en, the proposed algorithm was applied in the PID controller to tune PID parameters in the force servo control system. To comprehensively evaluate performances of an electrohydraulic force servo control system that is controlled by the LBAS-PID controller, the frequency response analysis and temporal response analysis were obtained.-e numerical analysis results indicate that an electrohydraulic force servo control system with an LBAS-PID controller could substantially increase the control characteristics of the system and restrain the external disturbances when different interference signals are examined.


Introduction
Electrohydraulic systems (EHSs) have been one of the most sought-after subjects in the industrial and academic fields because of high force/mass ratio, fast linear movement, and large torque/force output capability [1][2][3]. EHSs mainly consist of a servo valve, a hydraulic cylinder, and different kinds of detection sensors and other auxiliary parts [4,5]. An electrohydraulic system (EHS), which includes a position servo control system and a force servo control system, is a typical closed-loop torque control system [6,7], and EHSs also are multidomain energy system integrating characteristic of the mechanics, pattern recognition, digital technology, and control engineering [8,9].
In an electrohydraulic system, force generation and amplification are achieved through the force servo control system. Because of its superior load adaptability in the complex stress environments, the force servo control system plays a major role in engineering fields including electricity generator [10], flight simulator [11], gas turbine [12], robotic arm [13], and vehicles [14]. With the development of the electrohydraulic system, the force servo control system has been one of the hottest topics in engineering research. Due to changes in the loading environments, the interferences from unknown external loads, and the uncertain hydraulic parameters that are produced by variable load stiffness and oil temperature variations, the force servo control system is timevariant and nonlinear. To achieve the desired signal, not only synchronization precision of controllers but also tracking precision for the desired signal should be ensured. However, due to the eccentricity of mass load, cross-coupled characteristic, parameter uncertainty, and environmental interference, systems designed by simple controllers generally have the poor tracking and synchronization precision [15,16].
Among the common control methods in force, servo systems are the robust control method, adaptive control method, and PID control method. e robust control method is suitable for the application of stability as the primary objective and is most commonly used in overload environment [17]. Robust control systems do not have to adjust the parameters of the controller online, and robust control can guarantee good control performances when the dynamic characteristics of systems largely fluctuate [18]. e robust control method is based on some worst cases, so the controlled system does not work in the optimal state. When the prior knowledge of the controlled system is relatively small, the most commonly used control method is an adaptive control method. e adaptive control system can effectively find signal changes in real time by continuously measuring and monitoring controlled systems [19]. When the controlled system is a complex system, the adaptive control method has to identify numerous parameters by the long-running job, which can cause damage in transmission system parts and excessive bearing wear [20]. e PID control system, which is also called the proportional-integral-derivative controller, is the favored control method [21]. Compared with two other control methods, the PID controller only has three parameters, which provides it with easy tuning space to get a better control point [22,23]. It is shown that a rapid response speed and high control ability can be obtained by implementing appropriate PID parameters [24]. erefore, the PID parameter tuning method has become one of the research hotspots in engineering fields. Currently, scientists have found that metaheuristic optimization algorithms are useful for solving professional engineering problems, and these algorithms have become very prevalent and have attracted the attention of many researchers. Several studies have been conducted that have enhanced the ability to obtain reasonable PID parameters, such as genetic algorithm (GA) [25,26], particle swarm optimization algorithm (PSO) [27,28], bat algorithm (BA) [29], water wave optimization (WWO) [30], artificial immune system algorithm (AIS) [31], grey wolf optimization algorithm (GWO) [32], cuckoo search optimization algorithm (CS) [33], and kidney-inspired algorithm (IKA) [34]. PID controller designed by other nature-inspired optimization algorithms is also applied in servo systems. Jaen-Cuellar et al. [35] introduced the GA-PID controller in servo systems of the industrial PUMA robot. Zhang et al. [36] used a differential evolution algorithm to design a PID controller in the pneumatic rotary actuator position servo system. Pršić et al. [37] applied the firefly algorithm to tune three PID parameters in the parallel robot platforms with six degrees of freedom gains. e literature [38] proposed a PID controller based on the selfgrowing Lévy flight salp swarm algorithm in hydraulic systems. e beetle antennae search algorithm (BAS) is a powerful and efficient metaheuristic optimization technique. is was proposed by Jiang and Li in 2017 [39]. e algorithm not only has individual and environment recognition abilities but also can ensure a compatible balance in the exploratory stages. Beetle antennae search algorithm has been used in many engineering fields, such as unmanned aerial vehicle avoidance [40] , path planning and control systems [41][42][43]. Although BAS has been widely used in engineering fields, it still has some shortcomings. Firstly, BAS has a uniformly reduced search step that makes the optimization solution jump from one region to another region, which can cause low search accuracy. Second, the initial fixed-step size search that is set according to artificial experiences can result in slow convergence speed and limited exploration efficiency in the later optimization period.
To further increase the optimization capabilities of BAS while simultaneously strengthening the PID-working abilities of hydraulic force actuator systems, this paper proposes the Lévy flight beetle antennae search algorithm (LBAS) by Lévy random walking type whose step lengths are distributed according to heavy power-law tails, and then, this paper also proposes the LBAS-PID controller whose parameters are tuned by LBAS in force servo systems. e major contributions of this research work are summarized as follows: (1) e Lévy flight beetle antennae search algorithm is proposed. In LBAS, the random step created by the Lévy flight trajectory will replace the fixed-step reduction trajectory of the original algorithm, and the random reduction factor will replace the reduction factor of the original algorithm. (2) For the electrohydraulic system, a LBAS-PID controller is proposed and used in the force control system to enhance system performance. e parameter tuning problem in the PID controller will be converted into an algorithm optimization problem. ree parameters of the LBAS-PID controller will be tuned by LBAS. e remainder of the paper is arranged as follows. Section 2 establishes the mathematical model of the electrohydraulic force servo control system. Section 3 introduces the original beetle antennae and the Lévy flight trajectory. A new algorithm which is called the Lévy flight beetle antennae search algorithm is presented. In Section 4, we not only present the LBAS-PID controller but also select the evaluation function ITAE. Section 5 tests ten benchmark functions by using different algorithms. Section 6 shows the results of ITAE value analysis and the temporal response analysis; the frequency response analysis of the electrohydraulic force servo control system added different PID controllers. Conclusions are given in the last section.

System Model
e basic structure of an electrohydraulic force servo control system includes a link mechanism, an electrohydraulic servo valve, a servo amplifier, a valve-controlled hydraulic cylinder, and a force sensor. e inner loop, which is driven by a hydraulic actuator, is a force closed-loop. e force sensor is modeled as an elastic internal link. e other parts are modeled as rigid links. e equivalent simplified physical model is presented in Figure 1. e transfer function model of the electrohydraulic force servo system can be gained by using system parameter identification. e working principle of the force servo control system is defined as follows. e servo amplifier works by transforming the voltage signal into an electric current signal which is input into the servo valve. e slide valve of the main valve will be shifted by depending on the electric current signal. e piston rod of the hydraulic cylinder will be drawn back or stretched by the movement of the slide valve. e force sensor which is linked with the piston rod works by measuring the load pressure. Finally, the signal will be fed back to the controller to drive the system because of the analog-digital conversion. Parameter identification is a technology that combines the mathematical model and experimental data for prediction. e technology can get system parameters according to the experimental data and the established model. When the error between results calculated by the model and the actual value is too large, the established model is amended, and the parameters are reselected. When the results are closer to the measurement results, the model is reliable. In hydraulic systems, some parameters, which cannot be got by numerical calculation, are time-varying. So the basic system model is applied in parameter identification. e schematic diagram of the valve-controlled hydraulic cylinder is shown in Figure 2. e valve-controlled hydraulic cylinder can be simplified as a double-ended hydraulic actuator with the three-and-four-way servo valve. Q 1 (m 3 /s) represents the oil flow of the servo valve inlet. Q 2 (m 3 /s) represents the oil flow of the servo valve return. p s (Pa) and p o (Pa) represent the inlet oil pressure and the return oil pressure. A (m 2 ) is the piston area. p 1 (Pa) and p 2 (Pa) illustrate the working loads of the rodless cavity and the rod cavity, respectively. p L (Pa) means the pressure drop. x v (m) is the spool displacement of the main valve. y (m) is the displacement of the piston rod. m (kg) is the total equivalent mass referred to the piston. B c (N/(m/s)) means the viscous damping coefficient. K (kN/m) denotes the spring stiffness. F (N) means an external load. y (m) is the displacement of the piston. e inlet oil pressure p s , which is the pressure threshold, is output by the pump. When Q 1 and Q 2 are influenced and throttled by the servo valve, the external load F is compensated by the load pressure p L of the hydraulic cylinder.
To illustrate the model of the valve-controlled hydraulic cylinder, the miniaturized flow equation, hydraulic cylinder flow continuity equation, and the force-balance equation of the hydraulic cylinder need to be calculated. e linearize load flow Q L for the servo valve can be expressed as where K q (m 2 /s) is the flow gain coefficient and K c (m 5 /(N·s)) is the flow pressure coefficient, which can be written as where C d (m 3 /(s·pa)) is the discharge coefficient, w v (m) is the constant area gradient of valve orifices, and ρ (kg/m 3 ) is the hydraulic oil density. e oil compressibility, volume changes in the roadless cavity and the rod cavity, flow equations of the oil flow of servo valve inlet, and the oil flow of servo valve return can be described as where C ip (m 3 /(s·pa)) and C ep (m 3 /(s·pa)), respectively, represent the internal leakage coefficient and the external leakage coefficient, β e (N/(m 2 ·pa)) is the oil effective bulk modulus, and V 1 (m 3 ) and V 2 (m 3 ) are the initial oil-in cavity volume and the initial oil-out cavity volume, respectively. As the piston rod of the actuator is located in the center of the hydraulic cylinder, linearize load flow Q L is the average value of Q 1 and Q 2 . e initial oil-in cavity and oil-out cavity have the same volume. e hydraulic cylinder flow continuity equation can be expressed as where C tp (m 5 /(N·s)) is the total leakage coefficient defined as C tp � C ip + C ep /2 and V t (m 3 ) is the total volume of the cavity. e force-balance equation exerted on the payload of the hydraulic cylinder can be deduced by applying Newton's second motion law in the noninertial reference frame and ignoring the friction of the cylinder and the mass of oil: Equations (1), (4), and (5) are differential equations of dynamics in the valve-controlled hydraulic cylinder model, and their Laplace transform can be written as follows: e electrohydraulic servo valve, which is used as an electrohydraulic transfer apparatus, works by transforming the lower input signal into the useful hydraulic pressure energy to accomplish targets of hydraulic systems.
e transfer function of the servo valve can be expressed by where I (A) is the output current and K sv (m/A) is the noload flow gain. e servo amplifier works by transforming the input voltage and the input power, and it is composed of an electronic tube, the power transformer, and other electrical parts. e transfer function can be seen as the proportion of the current and the voltage. e transfer function can be expressed by where U (V) is the input voltage and K a (A/V) is the amplification coefficient. e force sensor is a measuring device that converts the force signal into an electrical signal. It can measure mechanical characteristics, such as tension, pressure, torque, internal stress, and strain. e force sensor, which is used in the feedback stage, has the advantages of high receiving sensitivity, strong ability of anti-interference ability, and good performance in low-frequency detection. e response frequency of the force sensor is much larger than that of the system, which means that the transfer function can be seen as a pure proportional stage. e transfer function can be expressed by where F g (N) is the input force and K f (V/N) is the force sensor coefficient. e open-loop transfer function of the force servo control system from the servo valve spool displacement to the exerted force can be deduced from (1) to (9). e transfer function can be expressed by

Beetle Antennae Search Algorithm.
Beetles are the richest species of the order Coleoptera. e family contains approximately 35000 worldwide recorded species worldwide. Beetles have two long antennae that are often longer than the body. e two antennae can be used to enlarge the detecting area for detecting food resources and detecting the sex pheromone of a potentially suitable mate. In addition, antennae can also act as an exploration apparatus when exploring unknown areas. e exploration behaviors of beetles using two antennae can be modeled as the metaheuristic algorithm called the beetle antennae search algorithm (BAS). e position of each beetle, respectively, represents an achievable solution, so the optimum solution is regarded as the minimum distance from food. e beetle antennae search algorithm (BAS) can be optimized without the gradient information.
e specific search process can be described as follows: Step 1. Define all beetle antennae search algorithm parameters. Randomly initialize N positions of beetles x n (n = 1, 2, . . ., N). Set the maximum number of iterations K max . Set k = 0.
Step 2. In order to expand the initial exploration environment, initial antennae positions of beetles can be built to be normalized in randomly dimensional space. A random searching direction can be normalized as follows: where rnd (.) denotes a random function whose dim represents dimensions of the solution.
Step 3. Beetles use their antennae to determine the location of food when foraging. When the antenna on one side is closer to food, the food odor that is received by that antenna is stronger, and the individual will move to that same antenna side. e right 4 Mathematical Problems in Engineering antenna and the left antenna can be normalized as follows: where k is the iteration number; x k r and x k l , respectively, denote positions of the right antenna and the left antenna; x k is the position of the beetle; and d k is the sensing length of the antennae.
e beetle determines the next position by detecting the odor; therefore, so we can explore the next location of one beetle according to the strength of the odor. ey will move to the right if the right antenna receives a stronger scent than the left antenna; otherwise, it will move to the left. e beetle's location is updated by where δ k is the step size of searching, f(.) is an evaluation function, and a is the movement direction of the beetle. Sign (.) represents a sign function: Step 5. e sensing length of the antennae d k and the step size of searching δ k can be updated as follows: where w 1 and w 2 represent fixed reduction factors (typically between 0 and 1).
Step 6. Calculate the evaluation function value of each individual using the evaluation function. Compare all feasible solutions to determine the optimal solution. Update the number of iterations k = k + 1 and return to Step 2. Repeat until k = K max .
Step 7. Output the optimal solution.

Lévy Flight Trajectory.
e Lévy flight trajectory, which was initially introduced by the French mathematician Lévy in 1925, is a particular type of stochastic random walk whose movements are based on a probability distribution. e Lévy flight trajectory defines a scale-invariance random walk model whose small steps connect longer relocations. e probability density distribution is as follows: where s is the Lévy flight length and β is the power-law exponent, 1 ≤ β ≤ 3.
e Lévy flight walk, which is an optimal search theory, is a finite-velocity random walk whose step length is determined based on a fixed time, and it follows a dynamical motion process. Studies have proven that the flight and predation actions of insects obey the typical characteristics of the Lévy flight trajectory because insects walking paths in nature are considered to be as a random or quasi-random manner in nature. e Lévy flight trajectory is theorized to be the most efficient motion model for locating prey positions when the searching power-law exponent β ∈ (1.5, 2].
e Lévy flight length s can be calculated by Mantegna's algorithm, as follows: where u and v obey normal distribution, and σ u can be described as e two-dimensional Lévy flight trajectory whose steps were 1000 was implemented one independent run in MATLAB when β � 1.5. e result is shown in Figure 3. From Figure 3, we can see that there are numerous shortdistance searching paths and occasional long-distance searching paths. is picture illustrates that the observed movement model across natural landscapes with different expected resource distributions conform to the algorithm optimization path. From the figure, we can see that the length and direction of the searching paths exhibit strong randomizations. e Lévy flight mechanism can enhance the local searching ability and avoid falling into a local minimum.

Lévy Flight Beetle Antennae Search Algorithm.
e beetle search lengths and step sizes are fixed based on natural selection. erefore, it is easy to move from one field to another, which favors the global search in the early optimization stage. However, the high jumping ability makes the local search not a sufficiently thorough optimization procedure, and information near the local optimum is insufficiently utilized. erefore, the BAS has the drawbacks of a poor local search ability, premature convergence, and low optimization precision in later stages. To improve the exploitation ability and convergence velocity of the BAS, this paper proposes the Lévy flight beetle antennae search algorithm.
Lévy flight can help the algorithm conduct efficient global exploration, avoid falling into the local minimum, and minimize the viciousness of the searching agents. To obtain a better optimization result and avoid the stochastic blindness of the heavy-tailed distribution, we introduce a self-learning searching method into the searching path. e self-learning searching method works by regulating the displacement difference between the optimal position and the individual position in each iteration. e searching scope is gradually changed from large to small by using the result of the last local optimization, and the repeating-cycle asymptotic searching is successively adopted. erefore, the searching Mathematical Problems in Engineering path in this paper consists of two parts: one part is the Lévy flight updating strategy, and the other part is the selflearning searching method. e Lévy flight updating strategy can increase the migration speed of other solutions approaching the optimum solution.
e self-learning searching method can enhance the diversity of the predatory individual position, which makes every individual have the self-evolution capability.
e new step size of searching δ can be expressed as follows: where s is the Lévy flight length and x best is the current optimal solution. e new next exploration location of one beetle can be seen by e ideal optimization ability consists of a high searching ability in the early phase and a strong searching accuracy in the later phase. us, the new searching step size makes each individual have a high searching ability in the early phase and strong convergence accuracy in the later phase, which allows the individuals to be able to quickly obtain a better predation position and then conduct more careful and thorough searches around the better predation positions. Based on the above analysis, a random disturbance method that gradually changes the search scope from large to small is added to the sensing length of the antennae.
e new sensing length of the antennae can be updated by e fix reduction factor is replaced by a random reduction factor w 2 which will be chosen randomly in the range of [0, 1] in each iteration. To maximizing the searching capability, the initial value d 0 is set to the upper bound of the search range. Random parameters can greatly improve search accuracy and efficiency. Initially, random parameters, which are created by the Lévy flight trajectory and random reduction factor, can increase the diversity of feasible solutions for continuous nonlinear optimization problems with higher dimensions within shorter computation times compared to the other evolutionary algorithms. In addition, the LBAS has fewer parameters than the BAS to adjust because the Lévy flight trajectory and random reduction factor will automatically select the random parameters in the LBAS. LBAS can be applied in various fields due to the high computational speed obtained by characteristics of random parameters.
e LBAS main step can be summarized in the pseudocode shown as Algorithm 1.

PID Controller and Evaluation
Function. PID controllers have a simple structure and high efficiency and thus are the most popular controller type in engineering. ere are three parameters which include the proportional parameter K p , the differential parameter K d , and the integral parameter K i in the PID controller. K p , K i , and K d , respectively, affect the response speed, the dynamic performance, and the steadystate error. It has been shown that a rapid response speed and high controllability can be obtained when three parameters are tuned fittingly. e current PID controller can be mainly divided into two modes: the continuous form and the discrete form. e continuous form can be expressed as follows: where t is the time, K p is the proportional constant, K i is the integral constant, K d is the derivative constant, u(t) is the signal of the PID controller, and e(t) is the error signal. e uninterrupted time is replaced by the sampling instant. e integral item and the differentiation item are discretized. e discrete form of the PID controller is written as follows: where T, K, and m, respectively, represent the sampling period, the sampling number, and the total sampling numbers. e control signal is adjusted by using three parameters for the PID controller, and the signal is sent to the controller module. e PID parameter selection process can actually be converted into an optimization process. e PID parameters can be considered to be the position vector in the threedimensional space. e result of the evaluation function is used to measure the performance of the control system. It is crucial to define the evaluation function before optimization. Evaluation functions of control systems can be mainly classified into two categories: the single objective function and the hybrid objective function. Single objective functions include the integration of the absolute value of error (IAE, integration absolute value error) and the integral of the squared value of error (ISE, integration square value error). Hybrid objective functions include the integral of time multiplied by the absolute value of error (ITAE, integration time absolute value error), and the mean of the square of the error (MSE, mean square error). e IAE, which uses importance to the absolute error, only takes the single factor into account. e single factor cannot thoroughly reflect the true state of the electrohydraulic system, and therefore, this mode cannot satisfy the multi-index analysis. e ISE, which is a single objective function, uses the squared of the error. Because the square of a large error is much larger than smaller errors, large errors are punished more. e accumulated small errors cause poor accuracy in the later stages of systems. e MSE reduces the weaknesses of the ISE by calculating the average of the ISE and time. However, to minimize the shortcomings of the ISE, the system has to run for a long time. e ITAE, which is a great measure of system performance, not only weighs long-term errors but also uses an additional time multiplication, which penalizes accumulated errors. us, ITAE is written as follows:

LBAS-PID Controller.
e working principle of the PID controller that is tuned by LBAS-PID is that the PID controller drives the system by using three parameters that are found by the Lévy flight beetle antennae search algorithm.
e ITAE value will be constantly calculated automatically by LBAS when the controlled system starts running. PID parameters, which are three quantitative values, include k i , k p , and k d . PID gain indicates the increased range of PID parameters when the system reaches critical stability. e minimum ITAE is used to update the optimum PID parameters in each iteration. To obtain optimal parameters when using the LBAS algorithm, the PID parameter optimization process can be modified into the threedimensional optimization question in this paper. e three designed can be seen as coded solutions and beetle positions which are in a three-dimensional space, and each solution and position is represented by a real number. e ITAE is used as the evaluation function. e optimal system performance is regarded as the minimum of the objective function ITAE which is calculated by the LBAS. e beetle position, which minimizes the ITAE, is seen as the optimum PID parameters. e flow chart of LBAS-PID implementation for the force servo control system is shown in Figure 4. Tuning steps of the LBAS-PID controller are shown as follows: Step 2. To make diversities of searching directions maximum, a searching direction in three-dimensional space can be calculated using equation (11).
Step 3. Beetles use their right-left antennae to determine their next position when finding the minimum ITAE value. When the antenna on the one side is closer to the smaller ITAE, the beetle will move to this side. Positions of one beetle right-left antennae are calculated using equations (12) and (13).  1, 2, . . ., N). e search range [c max , c min ]. K max ·k � 0. Initial optimum solution x best . Initial optimum value f best . All initial parameters. Output: x best , f best .
Generate the searching direction by equation (11)  (4) Calculate the right-left antenna position and by equations (12) and (13)  (5) Calculate the Lévy flight length s by equation (19)  (6) Calculate the step size of searching by equation (21)  (7) Calculate the next position of the ith beetle by equation (22)  (8) Calculate the function value f(x k n )of ith beetle. (9) if f(x k n )is better than f best (10) x best � x k n (11) f best � f(x k n ) (12) end if (13) end for (14) Update the sensing length of the antennae d k by equation (23)  (15) k � k + 1 (16) end while ALGORITHM 1: e framework of LBAS.

Mathematical Problems in Engineering
Step 4. Operate the control system. Calculate the displacement difference between the current optimal position which minimizes the ITAE and every beetle position. e step size of searching can be updated using equation (21).
Step 5. Operate the control system. Right-left antennae positions of one beetle are transported into the control system to determine ITAE values. Calculate the ITAE values of right-left antennae positions. Update the next searching position using equation (22). en, new beetle positions, which can be seen as new PID parameters, are carried over into the control system to calculate the ITAE value. Record all ITAE values.
Step 6. By comparing all ITAE values, find the current minimum ITAE and the currently optimal beetle position. After comparing the current minimum ITAE with minimum ITAE of the last iteration, update the global minimum ITAE and global optimum beetle position. en, the global optimum beetle position is seen as the global optimum PID parameters.
Step 7. Randomly select the random reduction factor w in the range of [0, 1] in each iteration. Update the sensing length of the antennae using equation (23).
Step 8. Calculate k � k + 1. Judge k � MAX iteration . If k is not equal to MAX iteration , return to Step 2. If k is equal to MAX iteration , stop.

Experimental Environment.
To test the performance of the proposed LBAS algorithm from different perspectives, ten benchmark functions that have been widely used in engineering are discussed. e detailed information of these functions is summarized in Table 1. In Table 1, dim represents the dimension of each function, the range represents the searching space of each function, and f min represents the ideal minimum of each function.

Operate control system
Step response Time Amplitude Step e (t)  (11)-(13) Initialize all parameters and ranges. Randomly generate N beetle positions X k n (n = 1, 2 ,…, N) k = k +1 To verify the performance of LBAS, this paper also compares the proposed method with other popular artificial intelligence algorithms, including PSO [44], GA [45], BA [46], and beetle antennae search algorithm (BAS). PSO is one of the evolutionary algorithms which is inspired not by the evolutionary mechanism of natural selection, but rather by the social swarm behavior such as birds. Each particle in the particle swarm represents a possible solution. rough the simple behavior and the information interaction of one particle, the problem can be solved. GA is a computational model which imitated the natural selection mechanism and Darwinian biological evolution mechanism. Genetic algorithm starts from individuals which represent potential solutions, and a population is composed of a number of individuals encoded by the gene. e optimal individual in the last population can be decoded as the optimal solution. Bat algorithm is an iterative optimization technique, which imitates catching food behavior of bats in nature. A group of random solutions is initialized in BA, and then, the local new solution is generated by a random flight around the optimal solution, which strengthens the local searching ability. PSO, GA, and BA are classical optimization algorithms which are the research hotspots in engineering fields. ey are all metaheuristics, and they all use an iterative searching mechanism to find the optimal solution. ere are numerous articles and numerous studies about PID controllers based on GA [25,26], PSO [27,28], and BA [29]. So this paper chooses PSO, GA, and BA as the comparison group.
e initial parameter of all algorithms selected optimal parameters by original algorithm literature. For the LBAS, parameters were fixed as the power-law exponent β = 1.5. For the BAS, parameters were fixed as the initial sensing length of the antennae d 0 = 4, the initial step size δ 0 = 4, and w 1 = w 2 = 0.98. For the PSO, parameters were set as learning factors c 1 = c 2 = 1 and the inertia weight w = 1. For the BA, parameters were set as the loudness coefficient α = 0.9, the rate coefficient c = 0.9, and the pulse frequency f select random number uniformly distributed over [0, 1]. For the GA, the selection probability was generated by the elitism roulette wheel selection mechanism; the crossover probability P cross = 0.7, and the mutation probability P m = 0.1. To make a fair comparison, each algorithm was independently run 10 times in MATLAB, the maximum number of iterations was 500, and the population size was 50.

Results of the Benchmark Function Experiments.
Calculation results that contain best, worst, mean, and std are listed in Table 2. In Table 2, best, worst, mean, and std represent the optimal function index, the worst function value, the average value obtained by 10 independent runs, and the standard deviation of values obtained by 10 independent runs. We can find that the values that are calculated by the LBAS are much closer to the ideal values. In addition, when the functions become more complex as the dimension increases, it is obvious to notice that the LBAS algorithm can obtain the best indices in Table 2. Testing can prove that the LBAS and BAS have the ability to provide a consistent and reliable optimal solution, but the solution quality of the LBAS is obviously better than that of the BAS in any environment. erefore, it can be speculated that the LBAS algorithm has stronger computing power. e average convergence curves of different algorithms when addressing all functions over 10 independent runs are shown in Figures 5-14. It must be mentioned here that all the curves in Figures 5-14 are the average convergence curves. e LBAS has the fastest convergence speed in all algorithms, showing that it has the best performance when finding the global optimum. For the compared algorithms, the BA and PSO have poor performances for all functions, and they clearly cannot jump out of the local optimum in the last iteration stage. With respect to the five kinds of algorithm iteration curves, the LBAS achieves a distinguished convergence balance and the ability to jump out of the local optimum. It is certain that the LBAS has the fastest convergence rate in the early optimization stage and the highest searching accuracy in the later optimization stage. e underlying reason for the excellent performance of the proposed LBAS is that the step size and the orientation of the LBAS searching route are highly random based on the Lévy flight mechanism; therefore, the LBAS can easily to jump out of the local optimum when falling into local convergence, and it more quickly reaches the optimal value Mathematical Problems in Engineering 9 soon after the iterations start. us, we can conclude that the LBAS can absolutely obtain optimal solutions. e box plot chart, which is also known as a box-andwhiskers chart or a box-line chart, is a statistical chart that can represent a set of dispersed data. It can be used to compare several samples, and it can analyze the symmetry and the distribution of data. e box plot chart includes the maximum value, the minimum value, the median, the upper quartile, and the lower quantile. e stability and optimization ability of algorithms can be confirmed by evaluating the median, upper quartile, and lower quantile in the box plot chart. We can also deduce the performance of an algorithm using a box plot chart. e box plot charts of the values that were calculated by the 5 algorithms after 10 independent runs are shown in Figures 15-24. It must be mentioned here that all values of the box plot charts are the values that are obtained from 10 independent runs. It is clear that the values that are calculated by the LBAS result in a narrowest box plot chart with the fewest outliers and the weakest dispersion, which proves that the LBAS has a stable convergence ability and the powerful optimization precision when dealing with different functions. e median, upper quartile, and lower quantile of the LBAS computing are lower than others, which also proves that the LBAS has an admirable optimization capability.

Parameter Identification of the Force Servo Control
System. e electrichydraulic servo valve is FF102-30 whose all parameters in the model are obtained from the servo valve product book, numerical derivation, and the experimental test. Inherent parameters were taken from the product book of the FF102-30, including effective the piston rod area, total stroke of the cylinder piston, and the total volume of the cavity. Working parameters were taken from the experimental and test numerical derivation, including no-load flow gain, the amplification coefficient, and the sensor coefficient.  Figure 25.
To illustrate the ability of the LBAS-PID controller, the PID controllers that use other algorithms were compared. PID controllers based on different tuning methods include GA-PID, PSO-PID, BA-PID, and BAS-PID. e parameters of all algorithms were the same as those in the test function environment. ree parameters of each PID controller were delivered by [0,200]. In other words, initial population positions of all algorithms were generated in the range of [0, 200]. e total sampling number was 100, and the sampling period was 0.01s. Select discrete ITAE as the evaluation function. e disturbance signal was the step signal. e population size and total iterations were selected as 50 and 500 for all algorithms. Each optimization method was implemented for one independent run using the MATLAB software (MathWorks, Natick, MA, USA). e frequency response analysis and the temporal response analysis were all calculated by MATLAB.

Temporal Response Analysis.
Optimal parameters of PID controllers and minimum ITAE values obtained with different algorithms can be seen in Table 3. In Table 3, the LBAS-PID controller has the lowest ITAE. e simulation result evidence that the LBAS-PID controller has a more stable performance. When the input signal is the step signal, the time-varying process of the output signal is known as the temporal response of the system. e temporal response of the system is made up of the transient response and the steady-state response. e transient response, which reflects the system stability and speed, refers to the response process of the output signal from the initial state to the stable state. e transient response indices include overshoot M p which reflects the balance capability and the settling time t s which reflects the ability to maintain stability ability. e overshoot indicated the difference value between the maximum value and the steady-state value. e settling time is the running time when the steady-state value of the response curve is within five percent of the ideal value. To determine the stability and the effectiveness of the temporal response of the proposed LBAS-PID controller, we compared the step response curves and the values of the temporal response indices for the different PID controllers when the input signal is the step signal. e results are also given in Table 3. As can be clearly seen from Table 3, temporal response indices using the LBAS-PID controller has the lowest overshoot M p and the fastest settling time t s . e results can show that the system using the LBAS-PID controller can still achieve continue excellent dynamic characteristics and stability when subject to external interference signals.
To determine the stability and the effectiveness of the temporal response of the proposed LBAS-PID controller, we compared the step response curves and the values of the temporal response indices and steady-state response indices for the different PID controllers when the input signal is the            Mathematical Problems in Engineering step signal. e comparison of the response curves that were derived from the step signal is shown in Figure 26. reedimensional curves are shown in Figure 27. As seen from Figures 26 and 27, the LBAS-PID controller that is designed for an electrohydraulic servo system has the least overshoot, reflecting perfect robustness. e overshoots of the systems that were controlled by the GA-PID and the PSO-PID are too large. e response curve of BA-PID has zero overshoot, but it requires more time than the LBAS-PID to reach system stability. ough the response curves of the system that was controlled by the BAS-PID have less zero overshoots, there are still oscillations when the system starts to run.

Frequency Response Analysis.
e frequency response is the response of the system under the sinusoidal signals. We use the amplitude-frequency characteristic which can reflect the resonance frequency, mechanical impedance, and dynamic stiffness in the system. e amplitude-frequency characteristic is defined as the amplitude ratio of the input signal to the ideal signal. To further prove the reliability of the LBAS-PID controller, the response results of the PID controllers based on the different algorithms are presented in Figures 28-33 when the disturbance signals are six sinusoidal signals. For different sinusoidal signals, the angular velocity was, respectively, set as 2π, 4π, 5π, 6π, 8π, and 10π, the initial phase was zero, and the amplitude was set to 1, 10, and 20, respectively. amplitudes of the systems that were controlled by other PID controllers are lower than the ideal amplitude. e system controlled by the GA-PID has the maximum amplitude overshoot.
e system controlled by BA-PID has the maximum amplitude difference between the output amplitude and the ideal amplitude. Amplitude differences increase as angular velocity increase. Local enlarged drawings for the LBAS-PID controller are closest to the ideal amplitude, and the response curves for the LBAS-PID controller have the smallest distance between the ideal amplitude and the actual amplitude. Local amplification figures apparently display that the LBAS-PID controller has the performance of suppressing interference signals and reducing overshoot. For unusual signals combined with interference, the proposed PID controller can keep reliable inspection and eliminate the error. erefore, we can deduce  that the LBAS-PID controller has remarkable shock resistance and interference-resistant property under different signals.
e Bode plot is composed of a magnitude characteristic plot and a phase characteristic plot. Bode plot is used to show the stability of a system in the frequency domain by observing its phase margin. e phase margin can be regarded as the phase changing before the system enters the unstable state. If the phase margin is greater than zero, the system is stable. e Bode plot for the proposed approach is shown in Figure 34. In Figure 34, the blue dot represents minimum stability margins. In addition, the phase margin and delay margin obtained from Bode analysis are 85.9 and 0.0503, respectively. According to these results, the system is stable and has very good robustness.

Conclusions
To enhance the control performance and efficiency of the electrohydraulic force servo control systems, the LBAS-PID controller, whose PID parameters are tuned by the LBAS algorithm, has been incorporated into a force servo control system. e LBAS technique that is inspired by the Lévy flight trajectory, which is an advanced form of the basic beetle antennae search algorithm, has better convergence capabilities and can also compensate for the weak local search problem. en, the basic mathematical model of an electrohydraulic force servo control system was systematically discussed using theoretical analysis and study. e transfer function model was calculated by system parameter identification. In order to demonstrate the effectiveness of the proposed LBAS-PID controller, the performance of the LBAS-PID controller was assessed using the ITAE and compared with that of BAS, GA, PSO, and BA. Finally, in this paper, the frequency response analysis and the temporal response analysis were carried on for electrohydraulic force servo control system in this paper. e comparative analysis results showed that the system with the LBAS-PID controller had the smallest temporal response indices and frequency response indices, which demonstrated that the system that was controlled by the LBAS-PID controller had the high robustness, the strong antiload disturbance ability, the quick reaction capability, and the strong parameter recognition characteristic when different jamming signals were received. Moreover, the performance of the LBAS computing ability was also tested using 10 benchmark functions and compared with the functional values that were calculated by the BAS, GA, PSO, and BA. e calculation results clearly proved that the LBAS had better identification performance and better global search competency than other metaheuristic algorithms. To obtain a more accurate solution when the LBAS is used to deal with complicated optimization problems, we would like to develop new metahybrid versions that fully use the advantages of other metaheuristic algorithms. In future work, we will study potential applications of the LBAS, including the optimal tuning of the fractional-order PID controllers in dynamic and heterogeneous environments. e FO-PID controller, which has two additional fractionalorder operators, is a generalized expansion of the traditional PID controller. e FO-PID controller can be applied to increase the robustness to gain variations in plants and to obtain good output disturbance rejection.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.