A PID Tuning Strategy Based on a Variable Weight Beetle Antennae Search Algorithm for Hydraulic Systems

,


Introduction
Hydraulic systems, as an important transmission form in the traditional industry, are widely used in various heavy industries, military equipment and engineering vehicles [1][2][3][4][5][6][7][8], which is a high-level signal response closed-loop system. Because the hydraulic system is the time-varying, there are nonlinear and external interferences, uncertain system parameters, and cross load oscillations, and the bandwidth is also required. Under different requirements of the high precision, the fast speed, and the tracking ability, the hydraulic system controller affects the working accuracy in the system [9][10][11]. erefore, the dynamic stability, the responsiveness, and the static control accuracy in the hydraulic system are problems that researchers have been concerned about.
ere are many control methods, such as the nonlinear model predictive control, the robust control, and the adaptive control [12][13][14].
e traditional PID control strategy can complete the automatic control, but it has some shortcomings in the control precision and quality. It is difficult to overcome the nonlinear and uncertain parameters in the hydraulic system. PID parameters affect the dynamic performance of the controlled system, so it is very important to choose a reasonable PID tuning method [15][16][17].
With the rapid development of the electronic information technology and the wide application of intelligent control algorithm, a series of advanced new PID control strategies, such as the neural network PID, the robust nonfragile PID, the fuzzy PID, the sliding mode variable structure PID, and the adaptive PID, are born. Although these control algorithms have some advantages, it is difficult to realize in the actual control process. When the system has a large uncertainty, it cannot meet the control performance requirements of electrohydraulic servo control system in terms of the transient response. In recent years, the metaheuristic algorithm has been widely used in the field of engineering for its advantages of simple implementation, wide application, and strong practicability. It shows a good performance in solving linear and nonlinear problems, constraint functions, multiobjective problems, and so on [18][19][20]. e intelligent algorithm is used to adjust PID parameters, such as future search algorithm, fireworks algorithm, particle swarm optimization algorithm, and crow search algorithm, which greatly improves the PID control performance [21][22][23][24]. e beetle antennae search algorithm (BAS) inspired by beetle living habits was proposed by Jiang and Li in 2017 [25]. e beetle preying habit in nature depends on the symmetry antennae on both sides of the beetle head, and antennae odor cells can find the concentration of food pheromone in the air. BAS is the metaheuristic algorithm with symmetry properties. Because symmetry antennae odor cells can sense the concentration difference between two directions, the beetle will move one side which has a stronger concentration, thereby continuously updating the beetle position. BAS has not only recognition and symmetry abilities. Compared with traditional algorithms, BAS has highly competitive. For PSO, BAS owns a strong jumping ability and a faster convergence speed. GA has a lot of computation because of the binary coding. BAS has less initial parameters than FA algorithm, so it is less affected by parameter sensitivity than FA. e core code in BAS is very short, only four lines, and it is easy to be implement in the computer. For BA and artificial bee colony (ABC), BAS owns a higher efficiency and lower complexity [26,27] and is used in many fields [28][29][30][31][32][33][34][35][36][37].
According to the beetle living habits, the BAS searching steps mainly rely on two manual selection parameters including the orientation and the step size. BAS having the appropriate orientation parameter and the step size parameter can ensure a large searching scope and a fast convergence speed in all searching stages. However, parameters selected by artificial experiences are blind and random, and unreasonable parameters can limit BAS searching efficiencies. To further enhance the BAS optimization abilities, this paper proposed the variable weight beetle antennae search algorithm (VWBAS) which added the exponential equation in basic BAS. VWBAS can increase searching production, reduce labor costs, avoid falling into locally feasible solutions. To further enhance the BAS searching abilities and strengthen the PID control performances in hydraulic systems, this paper used the proposed algorithm to tune PID parameters in hydraulic systems. e rest of this paper is organized as follows: in Section 2, the basic hydraulic system model was established. In Section 3, the proposed VWBAS was described. In Section 4, ten benchmark functions were given, and experiment results were discussed. In Section 5, the PID tuning method was proposed. In Section 6, different response analyses in the hydraulic system were discussed.

Hydraulic System Model
e basic structure of the hydraulic actuator system in this paper is composed of the servo valve, a servo amplifier, the hydraulic cylinder, the link mechanism, the sensor, and the spring. e sensor is linked by the elastic connection. Other parts are linked by the rigid connection. e simplified model is shown in Figure 1. e servo valve can output the modulated flow and the pressure after receiving the electrical analog signal and can convert the weak electrical signal into strong hydraulic energy. e servo valve will be input into the electric current signal changed by the voltage signal. en, the electric current signal will drive the slide valve, and the slide valve will draw and stretch the piston rod in the hydraulic cylinder. Finally, the signal will be input into the controller to control the system by the conversion element. In Figure 1, Q 1 (m 3 /s) means the inlet oil flow in the servo valve inlet. Q 2 (m 3 / s) means the return oil flow in the servo valve. P 1 (Pa) means the working loads in the rodless cavity. P 2 (Pa) means the working loads in the rod cavity. B P (N/(m/s)) means the viscous damping coefficient. K (kN/m) denotes the spring stiffness. A (m 2 ) is the piston area.
When Q 1 (m 3 /s) and Q 2 (m 3 /s) flow in the servo valve, the force F (N) will be compensated by the load pressure drop p L (Pa) in the hydraulic cylinder: where β e (N/(m 2 .pa)) is the oil effective bulk modulus, V 1 (m 3 ) is the initial oil cavity volume, is the internal leakage coefficient, C ep (m 3 /(s.pa)) is the external leakage coefficient, and the initial oil-out cavity volume and the initial oil-in cavity have the same volume, so the linearized load flow can be expressed as: where x v (m) means the spool displacement of the main valve, K q (m 2 /s) means the flow gain coefficient, and K c (m 5 / (N·s)) is flow pressure coefficient: where C d (m 3 /(s.pa)) means the discharge coefficient, p s (Pa) means the inlet oil pressure, p o (Pa) means the return oil pressure, w v (m) means the constant area gradient, and ρ (kg/m 3 ) is the hydraulic oil density. e load flow rate continuity is given by where C tp (m 5 /(N·s)) is the total leakage coefficient, and V (m 3 ) is the total volume of the cavity. e dynamic characteristic of hydraulic systems will be affected by the loading performance. Loading forces include the inertial force, the viscous damping force, the elastic force, and the extra force. e force equilibrium equation of the piston is given by 2 Advances in Materials Science and Engineering where y (m) is the displacement of the piston, M (kg) is the total equivalent mass referred to the piston. When the piston is in the middle position, the liquid compression influence is the biggest, and the natural frequency of hydraulic components is the lowest, and the damping ratio is the smallest, and the stability of the system is the worst. So, the middle position of the piston should be taken as the initial position in the analysis of the hydraulic system. e block diagram of the hydraulic cylinder displacement can be given in Figure 2 by the loading pressure. And the block diagram can be used for the simulation analysis when the loading inertia and the leakage coefficient are large, and the dynamic procedure is slow.

Beetle Antennae Search
Algorithm. BAS is a new metaheuristic algorithm inspired by the detection and searching abilities of beetles. Two long antennae of one beetle usually contain many odor-receiving cells that can detect the odor for obtaining the sex pheromone of the potential suitable mate. So, beetles find food by their antennae. If the left antennae receive an odor that is stronger than another antenna, the beetle will fly to the left position; otherwise, it will fly to the right position. e beetle can find food effectively through the easy principle. In BAS, the best value of the objective function can be seen as food, and the variable of the objective function can be regarded as the beetle position. In nature, beetles usually randomly search for food in unknown regions. So, BAS uses the following formula to generate a random direction to simulate searching behavior: where rnd means the random function giving a random vector in D dimension searching space. After a beetle determines the head direction, the beetle will move next positions by the odor intensity of two antennae. Left and right antennae positions can be generated as follows: where X t means one beetle position, X t L is the left antennae position, X t R is the right antennae position, and d t represents the antennae length in the t-th iteration. e beetle will find the searching behavior based on the detected odor. So, BAS can judge the next beetle position by the strength of the odor. e next beetle position can be updated with the following formula: where δ t means the searching step, sign(.) indicates the sign function, and f(.) is the objective function. e antennae length and the searching step can be expressed as e iterative process of the beetle antennae search algorithm can be presented as follows: Step 1: define the maximum iteration t max . Set all BAS initial parameters including the initial step size, the initial antennae length, the population size N, and the searching dimension D. Randomly initialize N beetle positions. Set t � 0.
Step 2: update a random vector by equation (6). Update the left-right antennae position by equation (7). Calculate next beetle position by equation (8).
Step 3: update the beetle antennae length by equation (9). Update the beetle searching step by equation (10).
Step 4: compute all function solutions and find the best solution in the current generation. en, compare the best solution in the current generation with the best solution in the previous generation, and update and record the global optimum solution if there is a better solution.
Step 5: calculate t � t + 1. If t is greater than the maximum number of cycles t max , output the current global optimum value. Otherwise, jump to Step 2.

e Proposed Beetle Antennae Search Algorithm.
For basic BAS, the initial sensing length and the initial step size will be selected by human experiences, and the attenuation coefficient is fixed, which can cause that the local searching  Advances in Materials Science and Engineering process and feasible solutions near the local optimum are not sufficient. Parameters selected by natural selection not only have a strong dependence on design experiences but also have a complicated setting process, time-consuming and laborious. In engineering applications, the parameter selection process must consider environments, errors, disturbances, and other factors, so the parameters got by human experiences are still limited in practical engineering. To solve restriction problems and reduce the probability of being trapped in basic BAS. is paper introduces an enhanced beetle antennae search algorithm with the variable weight method, and the proposed algorithm is called the variable weight beetle antennae search algorithm (VWBAS). VWBAS used the exponential equation in BAS to improve BAS exploration abilities, minimize the searching viciousness, and refrain from falling into the local feasible solution.
e variable weight factor r can be expressed as follows: where UB is the upper searching bound and LB is the lower searching bound, and t max is the maximum iteration. e new step size can be seen by where w is a random factor in the range of [− 1, 1]. e new antennae length can be seen by e new left and right positions can be seen by e new next position can be seen by To expand the searching capability, the difference between the upper searching bound and the lower searching bound is set to the searching range. e factor can enhance the searching diversity of feasible solutions for optimization functions. Besides, the proposed algorithm has zero selection factor, which can weaken the blindness and the hysteresis in basic BAS. e VWBAS main step can be summarized in the pseudocode shown in Algorithm 1.

Numerical Testing Parameters.
To comprehensively demonstrate the searching accuracy and the iteration speed of the proposed algorithm, sixteen numerical functions listed in Table 1 were calculated in this paper. Calculated numerical functions include ten low-dimension functions and six high-dimension functions. In Table 1, D indicates the searching dimension space, and the aim indicates the ideal value. Low-dimension functions mainly include one-dimension functions and two-dimension functions, which is easy to find the optimal function value. e searching speed and the calculation efficiency will reduce with the searching dimension increasing when algorithms handle highdimension functions, which enhances the solving of deception. So, low-dimension functions can test algorithm searching speed, and high-dimension functions can test resistance to precocity in algorithms. Compared algorithms include butterfly optimization algorithm (BOA) [38], cuckoo search algorithm (CS) [39], flower pollination algorithm (FPA) [40], simulated annealing (SA) [41], and basic BAS. For BOA, the power exponent was increased from 0.1 to 0.3, factor c was equal to 0.01, and the switch factor p was equal to 0.8. For FPA, parameter p was equal to 0.8, parameter β was equal to 1.5. For FPA, the power exponent was increased from 0.1 to 0.3, factor c was 0.01, and the switch factor p was 0.8. For CS, the parameter pa was equal to 0.25 and the parameter α was equal to 1. For SA, parameter T was equal to 100 and parameter k was equal to 0.95. All algorithm parameters were selected by the original algorithm literature, and all algorithm steps can be found in the original algorithm literature. Each algorithm was independently run ten times in MATLAB (R2014b, the MathWorks, Inc., Natick, MA, USA), the maximum iterations were 500, and the population size was 50. Tables 2-4, MIN, MAX, MED, and STD, respectively, represent the minimum function value, the maximum function value, the median function value, and standard deviation. Table 2 shows the two-dimension calculation results. Tables 3 and 4 separately show ten-dimension and twenty-dimension calculation results. From Tables 2-4, the proposed algorithm can find the best aim value for different functions in comparison with the BOA, CS, FPA, and basic BAS. VWBAS can give the minimum value of f 1 , f 3 , f 4 , f 6 , and f 7 in Table 2. SD is the arithmetic square root of the variance, which can give the data dispersion. For two groups of data with the same mean, the standard deviation may not be the same. VWBAS has the smallest SD in all algorithms, which displays that the calculated values of VWBAS are closest to the average of all function values. All results in Tables 2-4 can show that the proposed algorithm has a good performance for finding the minimum function value.

e Wilcoxon Rank-Sum Discussion.
e rank-sum test, also known as the sequence sum test, is a nonparametric test. e rank-sum test does not rely on the distribution form, so it can be applied without considering the research object distribution and type [42]. e rank-sum test can be used in the algorithmic analysis to judge whether an algorithm is statistically significant or not. All calculated values will be arranged from small to large, and each calculated value called the rank will be numbered in order. However, the symbol checking only gives the positive and negative signs of the difference and ignores the absolute value of the difference, which will lead to the loss of some experimental information. For deficiencies of the basic rank-sum test, Wilcoxon introduced an enhanced ranksum test called the Wilcoxon rank-sum test. is method gives not only a different direction but also a different size.
is method gives not only a different direction but also a different size. e Wilcoxon rank-sum test can test whether the distribution of the group testing data is different. e Wilcoxon rank-sum test results are called the p value. If the p value is less than 0.05, the value calculated by the algorithm is a significant difference at a level of 0.05. is paper computed the Wilcoxon rank-sum test to show the algorithm significance analysis, and all results were listed in Table 5. Table 5 shows the proposed algorithm results against those of other algorithms at a 0.05 significance level.
From Table 5, we can find that all results were less than 0.05, which displays that the proposed algorithm can give large searching efficiency and avoid falling into a local optimal solution.

Iteration Discussion.
To describe the searching ability and the iteration speed of the proposed algorithm more intuitively, this paper used the y-logarithmic coordinate system. Logarithmic coordinates refer to the point position corresponding to the logarithm image in the two-Input: define all initial parameters. Set searching dimension and population size. Best position X * . Best function value F.
Set the random searching direction by equation (6). Define the variable weight factor by equation (11). Define the new step size by equation (12). Define new antennae length by equation (13).
Calculate new left and right positions by equation (14).
Calculate the next position of each beetle by equation (15).
Advances in Materials Science and Engineering 5 dimensional rectangular coordinate system, and the curve maximum variation range can be extended to make the figure outline clear in the logarithmic coordinate system. So, this paper used the semilogarithmic coordinate to show function values. Iterations are repeating feedback actions, and each iteration result will be the initial value for the next iteration. Figures 3 and 4 show the different dimension average iteration curves of all algorithms under 10 independent runs. It must be mentioned here that all iteration curves are average convergence curves. In iteration figures, the proposed algorithm owns the largest iteration speed and the best searching accuracy in all iteration curves, which displays that VWBAS can improve the feasible solution diversity. VWBAS owns the good performance to jump out of the local optimum in high-dimension iteration figures and low-dimensional iteration figures. Iteration results determine that the proposed algorithm can not only give an outstanding balance but also can jump from local optimal solution in the searching field.

Box-Plot Chart
Discussion. e box-plot chart is a statistical chart, which can not only exhibit a set of dispersed data but also be applied in several experiments to analyze the data symmetry.
ere are five indexes in a box-plot chart, including the maximum value, the minimum value, the median, the upper quartile, and the lower quartile. Figure 5 gives twodimension box-plot charts. Figure 6 separately shows tendimension and twenty-dimension box-plot charts. Figures 5  and 6 clearly emphasize that VWBAS box-plot charts own the      8 Advances in Materials Science and Engineering smallest form and the fewest outliers, which shows that the proposed algorithm can give a strong searching ability and the approaching efficiency. Compared with different algorithms, the main reason for the proposed algorithm having the best searching ability is that VWBAS has a balance and exponential explosion method in variable weight mechanism. All box-plots can determine that VWBAS has statistically significant and does not happen by accident.

Searching Path Discussion.
To inspect the effectiveness of searching orientation ability, this paper carries on a searching path comparative experiment. Figure 7 gives the contour plot of each function, the optimal BAS searching path, and the optimal VWBAS searching path of low-dimension functions. From Figure 7, we can see that VWBAS searching paths are markedly shorter than BAS searching paths. BAS searching paths have many long, invalid, and repeat distances, and it can be seen that the BAS method searches have a longer path because of the unbalance between exploration and repulsive effect, which is more dangerous in practical applications. rough different experiment analyses, we found that the searching direction of the proposed algorithm has strong random and efficient computing ability. Because the searching path after the leftright exploration is almost the same, a lot of calculated time is weakened. erefore, for the proposed algorithm, all boxplots can determine that VWBAS is statistically significant and has merit in terms of exploration, and it does not happen by accident. A small number of iterations can give a better path, which is profitable for path planning in the nonconvex bounded constraint.

PID Controller.
A PID controller has three parameters including the proportional parameter K p , the differential parameter K d , and the integral parameter K i . e parameter K p can reflect the deviation quickly and can reduce the deviation, K d can reflect the changing trend of deviation signals, and K i is mainly used to eliminate the static error and improve the system accuracy. Selecting appropriate PID parameters makes systems have a perfect response speed and good performance. ere are two models in the current PID controller, including the continuous form and the discrete form.
e PID continuous form can be written as where K p is the proportional parameter, K i is the integral parameter, K d is the derivative parameter, u(t) is the PID control signal, and e(t) is the system error signal. e PID discrete form can be written as where k is the once sampling number, T is the sampling period, and a is the total sampling number.

Evaluation Function.
Before the PID tuning process, a reasonable system evaluation function should be selected. Evaluation functions can be divided into two types including the single objective function and the mixed objective functions. Before the PID tuning process, a reasonable system evaluation function should be selected. Evaluation functions can be divided into two types including the single evaluation function and the mixed objective functions. e single-objective function includes the IAE (integration absolute value error) and the ISE (integration square value error). e mixed evaluation function includes the ITAE (integration time absolute value error), the MSE (mean square value error), and the ITSE (integration time square value error). e IAE only considers a single factor and pays attention to the absolute error, so it is often used in a digital simulation system. And it is difficult to get the absolute error value in the real state of hydraulic systems. Because the square of large error is much larger in the ISE, the large error will be punished more than the small error. Although selecting ISE as the evaluation function will quickly weaken the large error, the system will tolerate small errors for a long time.
e MSE can weaken the disadvantage of ISE by calculating the average value of the ISE, but the system has to run for a long time. A time multiplication is added into the ITAE to punish and weigh the long-term error. e ITSE has extra time to punish errors in ITAE. To obtain a good tuning result, this paper selects a hybrid index with the linear weighted method ITSE: where e(t) is the system error. ITSE can not only avoid a too large signal value that can be beyond the amplitude of the PID controller but also avoid the excessive error rate which can cause the sensor delay in the control system.

Tuning Method
Design. PID controller parameters determine the control performance and the control accuracy. So, one of the core problems in the design and application of PID controller is the parameter tuning method. To enhance the control performance of hydraulic systems and the effectiveness and practicability of PID controllers, this paper will design a PID tuning method based on VWBAS to find reasonable PID controller parameters for better driving hydraulic systems. e working principle of the proposed tuning method is to transform the PID parameter selection problem into the algorithm-solving three-dimensional optimization problem. PID controller parameters can be regarded as the individual position in the three-dimensional space. When the controlled system starts to run, the VWBAS automatically calculates the selected system evaluation function value, and the solution of the minimum system evaluation function value is regarded as the best PID controller parameter result. e flowchart of the proposed PID tuning method is shown in Figure 8. e specific search steps in flowchart can be described as follows: Step 1: initialization Initialize VWBAS parameters. e dimension of searching space is defined as the matrix [K p K i K d ]. In Step 2: variable weight beetle antennae search algorithm In the first step, the yellow population can be seen as the old position in Figure 8. In the second step, run the algorithm. In the third step, the pink population can be seen as the new position in Figure 8. All positions can be seen as PID controller parameters.
Step 3: control system Input the control signal to run the control system. Red population positions in Figure 8 will be input into the PID controller as three parameters, and the control system is run to calculate the ITSE value. In Figure 8, step represents the unit step signal.
Step 4: evaluate function Compare all ITSE values and find out the minimum ITSE value in the current iteration. Compare the minimum ITSE value in the current iteration with the minimum ITSE value in the last iteration. e position of the global minimum ITSE value is defined as the global optimal solution. e global minimum ITSE value is selected, and the global optimal solution is updated.
Step 5: determine the iteration stop Judge whether the iteration numbers meet the iteration termination condition K � k. If k is equal to K, stop the iteration. e global optimal solution is taken as the final PID parameter. If K is not equal to k, calculate k � k + 1 and return to Step 2.

System Parameters.
To show the performance of the proposed method, this paper carried out different PID controllers in MATLAB. e analysis object is the semiphysical simulation platform shown in Figure 9. e platform includes the signal acquisition card, the hydraulic oil source, and other hydraulic systems. Hydraulic systems include the actuator cylinder, the force and position sensor, a sliding guide rail, a piston rod, different loading, the hydraulic oil, and so on. is paper compared VWBAS with different algorithms in the above analysis, so testing methods in this paper selected genetic algorithm (GA) [43], particle swarm optimization (PSO) [44], and the Z-N tuning method. For the GA, the crossover probability P cross is equal to 0.8, and the mutation probability P m is equal to 0.1. For the PSO, parameters were set as learning factors are equal to 1 and the inertia weight is equal to 1. All initial algorithm parameters were chosen by the relevant algorithm literature. e range of PID parameters was generated in [0, 10000]. Set maximum iterations 1000. Set population size 50. Each algorithm was implemented in MATLAB (R2014b, e MathWorks, Inc., Natick, MA, USA). All algorithms were conducted on a laptop with Intel (R) Core (TM) i5-4210U CPU, 2.30 GHz, 4 GB RAM. All data and figures were analyzed in similar MATLAB software.

Time Response Analysis.
Under the action of input signals, the changed process of the system output with time is called the system time response. e time response of an actual system usually consists of two parts: the transient response and the steady-state response. Transient response, which is also known as the dynamic response, refers to the system response action from the zero states to the stable state under a certain action. e transient response reflects the stability and the rapidity of the control system. e steady-state response, which reflects the system accuracy, is the system output state when the running time approaches infinity. So, the dynamic performance of the control system can be evaluated by the system time response of the system. e time response depends not only on the system characteristic but also on the output signal form. e time response performance index is based on the system time-varying process under the unit step signal, mainly includes the maximum overshoot M p , the delay time t d , the adjustment time t s , and the steady-state error e ss . e difference value between the maximum peak value and the steady-state value is called the maximum overshoot. at the running time of the response curve reaches the steady-state value from the original working state is defined as the delay time. e upper and lower bounds of the allowable error range are taken as ±5% or 2% under the steady-state of the response Advances in Materials Science and Engineering curve, and that the running time can remain this error range is called the adjustment time. After the system reaches the steady-state, the difference between the steady-state value and the ideal value is called the steady-state error. Table 6 displays ITSE values and indices of the temporal response. e VWBAS tuning method has the lowest ITSE and the smallest M p , t s , and e ss . Because ZN is an artificial experience method, ZN does not have ITSE. Although the delay time of the VWBAS-PID is larger than that of the ZN-PID, ZN-PID has the largest M p , and the error precision is 0.001, which shows that the proposed control method has superior performance.
e system time response analysis shows that the proposed method can make the controlled system have a good tracking performance and a fast response speed. e three-dimension response curve and the twodimension response curve are shown in Figure 10. e ZN-PID has the maximum overshoot, appears the signal chattering phenomenon. PSO-PID has a too large running time and some extent overshoot, which can cause system vibration and shock, and PSO-PID has some extent overshoot. VWBAS-PID can arrive at the steady-state with the smallest overshoot. e system drove by the VWBAS-PID Start Initialize algorithm and control system parameters. Set k=1, K.  can maintain good accuracy and safety, demonstrating large serviceability, applicability, and stability. e response curve confirms that the proposed method can quickly track the steady-state in the running stage.

Frequency Characteristic Analysis.
e frequency characteristic analysis is to study the system steady-state response under different sinusoidal signals. In the mechanical engineering field, there are many problems to study the system response characteristic and process under different frequency signals. e frequency characteristic reflects the system self-excited vibration, resonance characteristics, mechanical impedance, dynamic stiffness, and antivibration stability. e machining accuracy, the surface quality, and the self-excited vibration are closely related to the system frequency characteristic in the machining process. erefore, the frequency characteristic is very important for the analysis and design of mechanical systems. For an ideal system, when a sinusoidal signal is an input, the system output response is still the sinusoidal signal having the same frequency after a long enough time. To further show the frequency characteristic of the system droved by the proposed method, different four sinusoidal signals were input. For different sinusoidal signals, the angular velocities were, respectively, set as 15 and 25, the initial phase was zero, and the amplitude was set to 40 and 80. e response results and the local amplification are presented in Figures 11-14. As we can see in all figures, except for the VWBAS-PID, the other three PID controllers have amplitude outstripping phenomena under different frequency response curves. e system drove by the PSO-PID owns the largest amplitude difference value between the response amplitude and the ideal amplitude. e system controlled by the VWBAS-PID owns the smallest amplitude difference value between the response amplitude and the ideal amplitude, and response curves of the VWBAS-PID controller are closest to the ideal amplitude. Sinusoidal response curves display that the proposed controller can enhance the control accuracy and robustness and owns a favorable ability to return its original equilibrium or give a new equilibrium. erefore, we can analyze that the proposed method controller has the reinforced ability, the antivibration performance, and a high efficiency in unknown environments.

Conclusions
In this paper, an enhanced beetle antennae search algorithm with variable weights (VWBAS) was introduced for selecting reasonable PID controller parameters and using the PID controller in the hydraulic system to enhance the hydraulic system performance. For VWBAS, variable weights were added to the searching procedure. To weaken the probability of being trapped in a local solution, an exponential equation was introduced, which can be declined exponentially from the difference of the searching scope. e proposed algorithm can be used to find the global optimal solution in complicated and complex problems due to its fewer selected parameters, the simplicity, and quick convergence speed. en, different function testing experiments were carried out to show good performances of the proposed algorithm. eoretical analysis, mathematical statistics, and experimental results show the effectiveness of VWBAS. Experiments with different testing functions reveal that the proposed algorithm can increase the efficiency of the proposed algorithm.
e Wilcoxon rank-sum test result lots further reveal the superiority of VWBAS over the basic BAS. Different results for different multidimensional problems reveal the competition and superiority of the proposed algorithm. For the hydraulic system, the control system model was established. en, the system evaluation function ITSE was selected. Finally, the temporal response characteristic and the frequency response characteristic were given in this paper. e system analysis results display that the proposed method can select reasonable PID parameters, and the designed PID controller can make the hydraulic system achieve good performances.
In the future study, we will design a new algorithm based on the basic BAS and other algorithms to enhance the searching speed and accuracy in the basic BAS. en, we will further expand the application field of swarm intelligence algorithms and use the proposed algorithm in different industrial optimization problems. Finally, we will propose a new controller based on PID and other controllers to increase performances in the hydraulic systems.

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.