Abstract

The PID parameters determine the PID controller performance. A reformative artificial bee colony (RABC) algorithm is proposed for the PID parameter optimization problem. The algorithm balances the exploitation capability and exploration capability of the ABC algorithm by introducing a global optimal solution and improving the food source probability. The proposed algorithm is validated by simulation with six benchmark functions, and the results show that the RABC algorithm has higher search accuracy and faster search speed than other variants of the artificial bee colony algorithm. The RABC algorithm-optimized PID controller has better control with minimum overshoot and fast response, as verified by comparison with PSO-PID, DE-PID, and GA-PID methods in three typical systems.

1. Introduction

The PID controller has been the most widely used and mature controller in the industrial production process [1]. Despite the emergence of various new controllers in the control field, PID controllers are still in the dominant position with their simple structure, easy implementation, and robustness. The PID controllers are widely used in chemical, electric power, metallurgy, and other industrial control sites. In the industrial control process, more than 95% of the loops have a PID structure [2]. The suitability of controller parameters has an important impact on the quality of the controller. With the development of modern industry, the traditional PID controller can no longer meet the requirements of control systems with high order, time lag, and nonlinearity. The traditional method of PID parameter optimization can no longer fully adapt to the exploitation of modern industry, so it is very important to study a new and efficient PID parameter optimization technique for engineering practice [3].

For the optimization of the parameters of the PID controller, the researchers used various optimization techniques. Feng et al. [4] proposed an improved genetic algorithm (IGA), to search for the PID controller parameters, for the robotic excavator. Özdemir et al. [5] proposed a new metaheuristic optimization algorithm, optical inspired optimization (OIO) algorithm to optimize PID controllers. The method has better performance in terms of maximum overshoot and stabilization time. Chen et al. [6] proposed a fuzzy PID controller optimized by an improved ant colony algorithm. The improvements of nonlinear incremental evaporation rate and pheromone incremental update were proposed in the IACO algorithm to improve the quality of the solution. Hekimo glu et al. [7] proposed atomic search optimization (ASO) algorithm and chaotic ASO (ChASO) to determine the optimal parameters of fractional-order proportional + integral + derivative (FOPID) controller. Bingul et al. [8] proposed a new time-domain performance criterion for the rectification design of the proportional-integral-derivative (PID) controller in an automatic voltage regulator (AVR) using the cuckoo search algorithm. This performance criterion is chosen to minimize the maximum overshoot, rise time, stabilization time, and steady-state error of the terminal voltage. Ekinci et al. [9] used an improved kidney-inspired algorithm (IKA) and a new objective function. The main objective of the method is to optimize the transient response of the AVR system to obtain the optimal values of the three gains (Kp, Ki, and Kd) of the PID controller by minimizing the maximum overshoot, stabilization time, rise time, and peak time values of the terminal voltage and eliminating the steady-state error. Batiha et al. [10] implemented two optimization algorithms, particle swarm optimization (PSO) and bacteria foraging optimization (BFO) algorithms, for the purpose of tuning the fractional-order PID-controller. Huang and Chuang [11] proposed an artificial bee colony optimization (ABC) algorithm incorporating fuzzy theory to optimize the PID controller by introducing fractional-order proportional-integral-derivative (FOPID) control strategy. Panoeiro et al. [12] optimized PID controller parameters by bionic optimization technique. Optimization of PID parameters based on the Ziegler–Nichols (ZN) rule was proposed in [13] as a fractional-order PID controller optimization method based on radial basis function (RBF) neural network. A fractional-order fuzzy proportional integral differential (FOFPID) controller was proposed by Sharma et al. [14]. The cuckoo search algorithm (CSA) optimization technique was used to optimize all the controller parameters. Chang et al. proposed a new adaptive genetic algorithm for PID controller design, and they found that the fractional-order PID controller significantly reduced the overshoot and stabilization time compared to the optimized conventional PID controller [15]. Bingul [16] used a differential evolution (DE) algorithm for tuning the PID controller for unstable and time-lagged integral processes. The results show that the PID-tuned DE has faster stabilization time, less or no overshoot, and higher robustness. Cao and Cao [17] demonstrated parameter optimization of a fractional-order controller based on improved PSO. The improved particle swarm algorithm has a faster search speed and better solution than the genetic algorithm. Maiti et al. [18] used PSO to design fractional-order PID controllers. They significantly reduced the overshoot percentage, rise, and adjustment time using the FOPID controller compared to the PID controller. Alfi and Modares [19] used a novel adaptive PSO (APSO) algorithm to find the optimal system parameters for unstable nonlinear systems and optimal parameters for PID controllers. Some scholars applied the particle swarm algorithm (PSO) [2022] to optimize the PID controller parameters to improve the search speed. Improving the PID structure is too tedious. The exploitation capability and exploration capability of intelligent algorithms in parameter optimization of PID controllers need further improvement.

Artificial bee colony algorithm is a swarm intelligence optimization algorithm, proposed by Karaboga, to simulate the process of honey bee foraging [23]. The algorithm is easy to implement control with few parameters and has good optimization performance. Therefore, the contributions of this paper are as follows:(1)The RABC algorithm is proposed to improve the exploitation capability and exploration capability of the ABC algorithm.(2)The PID controller is based on the RABC algorithm (RABC-PID). The effectiveness of this controller is verified by comparing it with the controllers optimized by the other three methods.

The rest of this paper is organized as follows. Section 2 introduces the basic artificial swarm algorithm, the modified artificial swarm algorithm, and the superiority of the modified artificial swarm algorithm verified by six benchmark functions. The principle of optimized PID controller parameters and the whole optimization process of the modified artificial swarm algorithm is introduced. Section 3 establishes three typical models, and Section 4 conducts experimental simulations to validate the superiority of the RABC algorithm by comparing it with three other intelligent methods. Section 5 concludes the whole paper.

2. Proposed Method

2.1. Basic Artificial Bee Colony Algorithm

The basic artificial bee colony algorithm divides the population into three types: employed bees, following bees, and scout bees, and sets a search phase for each type of artificial bee, i.e., employed bee phase, following bee phase, and scout bee phase. Initially, the algorithm uses random initialization to generate the initial population, which is shown in the following:where i = 1, …, SN, j = 1, …, D. SN denotes the population size, D denotes the problem dimension, rand (0, 1) is a random number between 0 and 1, and and denote the upper and lower bounds of the jth dimension of an individual, respectively.

In the employed bee phase, the employed bee searches for food sources by performing a random search of the feasible domain by equation (2) and passes the food source multiplication to the following bee waiting in the hive to search for the food source.where k (1, …, SN) is a randomly selected indicator for different i, which means that there is only one randomly selected solution in generating the new candidate solution; j (1, …, D) is a randomly selected indicator, which means that only one dimension has changed between the new candidate solution and the old one. is a random number uniformly distributed on [−1, 1].

In the following bee stage, according to the food source information passed back to the hive by the employed bee, the following bee selects the food source using roulette according to the probability calculated in equation (3) below, and the nectar collection process still uses equation (2) to update the food source randomly.where fiti denotes the adaptation value of the ith food source.

During the scout bee phase, scout bees discard all food sources that have already been mined for honey, exceeding the limit for all food sources. An employed bee on the abandoned food source will then transform into a scout bee, randomly searching for new food sources according to equation (1). Throughout the search process of the algorithm, the food source corresponds to the candidate solution of the optimization problem, and the quality of the food source represents the merit of the candidate solution.

2.2. Reformative Artificial Bee Colony Algorithm

It is well known that the exploration ability [24] and the exploitation ability of an algorithm are two conflicting aspects that affect the performance of an algorithm. In other words, the enhanced exploration ability of the algorithm will inevitably affect the exploitation ability of the algorithm, which may reduce the convergence speed of the algorithm, while the enhanced exploitation ability of the algorithm will also inevitably affect the exploration ability of the algorithm, which may lead the algorithm to fall into local optimum. The artificial bee colony algorithm can be seen to have stronger exploration ability and weaker exploitation ability due to its random search feature. In this paper, a reformative artificial bee colony algorithm (RABC) is proposed. The optimal solution idea is proposed for the problem of the weak exploitation ability of the artificial bee colony algorithm. The algorithm selects the global optimal bee location and its food source location when updating the location of the food source. When the colony is updated, the bees are allowed to refer to the global bee with the best food source and move to the food source with better quality, and the global optimal is updated as the colony is constantly updated, which allows the bees to use the optimal food source as a reference when acquiring food source information and improves the exploration capability of the algorithm to some extent. Equation (2) for searching food sources is changed to the following equation:where is the global current optimal food source.

The following probability of following bees is determined by the proportion of the current food source’s fitness among all food sources. When some better food sources do not differ much from the optimal food source, it will lead to a lower probability of following the optimal food source by the following bees. For some bad food sources, due to the random selectivity of the following bees, they have the opportunity to follow them instead, which leads to a slower speed of finding the optimal food source and shows a slow convergence speed in the algorithm. Because of this, this paper proposes to take the current optimal food source of the colony as a reference, so that the following bees are more inclined to choose the food source with high quality and improve the speed of the colony to find the optimal food source. Thus, the probability Pi of following bees following the hiring bees is changed to the following equation:where max fiti is the fitness value of the highest solution.

Both employed and following bees use equation (4) to update the food source location, which allows a portion of the bee’s information to be exchanged with the globally optimal bee, ensuring that the bee is not disturbed by the locally optimal bee, but also that the bee moves to a better food source led by the globally optimal bee. Using equation (5) to judge the quality of food sources, following bees are more likely to follow honey-harvesting bees that have high-quality food sources and thus exploit high-quality food sources.

2.3. Benchmark Function Simulation Verification

To check the optimization performance of the RABC algorithm, the same ABC, GABC [25], and GBABC [26] algorithms are tested for comparison experiments on six benchmark functions. The basic characteristics of the test functions are given in Table 1. The test dimension of the test function is D = 50. In the experiments, the population number SN is 100, the limit is 50, the maximum cycle number MaxCycle is set to 5000, and the algorithm is run 30 times independently. The experimental results are shown in Table 2.

Table 2 gives the experimental results of the six benchmark functions, including the mean and standard deviation. From the table, we can see that the RABC algorithm has the smallest standard deviation among the six benchmark functions, which proves that the RABC algorithm has the best stability. The mean value is closest to the optimal value, which proves that the RABC algorithm has the highest search accuracy.

Figure 1 gives the benchmark function convergence curve graph. From the figure, it can be seen that the RABC algorithm outperforms both the basic artificial bee colony algorithm and the other two improved artificial bee colony algorithms in terms of convergence speed performance and search accuracy. The experimental results indicate that RABC has better optimization performance.

2.4. PID Controller Based on RABC (RABC-PID)

The RABC algorithm is used to optimize the PID parameters, which is essentially a parameter optimization problem based on a certain objective function, i.e., finding the optimal values in the parameter space of Kp, Ki, and Kd variables to optimize the control performance of the system. The control block diagram is shown in Figure 2.

The RABC algorithm optimizes the PID parameters by taking the error on the system as the evaluation function of the RABC, i.e., the fitness function input, calculating the value of the fitness function, and then adjusting the three PID parameters according to the fitness of the function to make the control performance of the system optimal.

The selection of the objective function is an important process. To achieve the optimal comprehensive performance of the whole system, we need to use some indicators that can reflect the comprehensive performance. At this stage, the common comprehensive performance evaluation criteria are mainly based on the connection between the deviation of the system e (t) = r (t) − y (t) and time t. There are four main comprehensive performance evaluation criteria: integral of squared error (ISE), integral of time-weighted squared error (ITSE), integral of absolute error (IAE), integrated time absolute error (ITAE) [27].

Integrated time absolute error (ITAE), which integrates the speed, stability, and accuracy of the system, is widely used to optimize the comprehensive performance index of the PID controller. ITAE can be expressed as

To prevent the control from being too large, the weighted integrated time absolute error (WITAE) is proposed. The ITAE performance index is used as the minimum adaptation function for parameter selection, and the squared term of the control input is added to the objective function. WITAE can be expressed aswhere J1, J2 are the weights and WITAE is the adaptation value. Once the overshoot is generated and the penalty function is applied [28], equation (8) is used as the performance evaluation criteria.where J3 is the weight value, . Usually, J1 = 0.999, J2 = 0.001, and J3 = 100. The fitness function is expressed as

The higher the value of fiti is, the higher the probability that the food source will be selected for search. The RABC algorithm optimizes the PID controller parameters flow as shown in Figure 3.

3. Three Typical Models

3.1. DC Motor Modeling

The motor circuit structure is shown in Figure 4. The air-gap flux is constant, and the control of the motor is realized by adjusting the voltage of the armature circuit, to realize the regulation of the motor speed. For such a motor object, some of its parameter characteristics such as torque constant and viscous friction coefficient are not available, so it can be regarded as a black box in modeling, and the modeling can be completed by using input and output data and using system identification.

First, determine the object model structure, and the air-gap flux is known, so its electromagnetic torque Ti is proportional to the armature current ia:where Ki is the torque constant of the motor.

The armature circuit voltage balance equation can be expressed aswhere Ra and La are the resistance and inductance of the armature circuit, respectively.

The relationship between the motor’s counter-electromotive force ea and its angular velocity is as follows:where Ke is the counter-electromotive force constant. The equation of torque balance on the motor shaft can be expressed aswhere J is the equivalent rotational inertia, b is the equivalent viscous friction coefficient, and TL is the load torque. With ua as input voltage and as output speed, the following differential equation is obtained by eliminating ia, ea, and Ti:

The term of can be ignored without participating in the calculation. Therefore, differential equation (14) can be transformed into the following transfer function (15) according to the Laplace transformation.

At this point, the armature-controlled DC motor can be viewed as an oscillating link. Usually, the inductance La in the armature circuit is small, and if its effect is neglected, transfer function (15) can be approximated as a first-order transfer function, which can be expressed as follows:where is the gain constant of the motor and is the time constant of the motor.

3.2. Mathematical Model of Double Capacity Water Tank (DCWT)

The double-volume tank is a typical second-order time-lag system, which is schematically shown in Figure 5.

In Figure 5, A1 and A2 represent the bottom area of the tank, q1, q2, and q3 represent the water flow, R1 and R2 represent the resistance of the valves and , which is called liquid resistance of valve resistance, and . According to the material balance on tank 1, there is the following equation:

Therefore, differential equations (17) and (18) can be transformed into the following transfer functions (19) and (20) according to the Laplace transformation.

Similarly, the differential equation and transfer function of tank 2 can be obtained:

The transfer function of DCWT can be expressed as follows:where is the time constant of tank 1, is the time constant of tank 2, and K is the amplification factor of the dual-capacity object. If the system also has a pure delay, transfer function (22) can be changed as follows:

3.3. Position Control System for the Sliding Table (PCSST)

The schematic diagram of the PCSST is shown in Figure 6. In the figure, is the given input signal; Ka is the given link; is the output signal; and B(s) is the sensor detection link. e(s) is the error signal, which is converted to a voltage signal to drive the servo motor after the amplification link Kb. The modeling process of the PCSST is explained as follows.

3.3.1. Position Closed-Loop Model

The schematic diagram of the electro-hydraulic servo slide table position control system in this study is shown in Figure 6. There are photoelectric sensors installed on both sides of the x-axis direction of the machine slide, which detect the slide motion position in real time and use the position closed-loop control to continuously correct the position error e (s) to achieve zero-error position closed-loop control. Therefore, the closed-loop position control model is established as follows:where is the position loop voltage; is the position amplification factor; represent the position loop initial pulses; represent the position loop sensor feedback pulses; is the position gain factor; and is the slide table movement.

3.3.2. Servomotor Model

The servomotor drive model can be expressed as follows:where J1 is the servomotor inertia; is the motor magnetic field coefficient; l is the inductance coefficient; pk is the pole logarithm; i is the current value; is the rotation angle; and T is the servomotor torque, and it can be expressed as follows:where KT is the torque coefficient.

3.3.3. Working Slide Drive Model

The machine slide completes the movement along the X-axis direction under the ball screw thread drive, and the slide position movement model can be simplified to a ball screw linear motion model as follows:where is the displacement of the table; i is the ratio of the ball screw; is the total ball screw travel; and is the turning angle of the screw.

3.3.4. Closed-Loop Total Transfer Model of Table Position

From the above three models, closed-loop series connection to form the total transfer function of the electro-hydraulic position closed-loop control system of the working slide of the combined machine tool can be obtained.

4. Simulation Validation

The RABC balances the exploitation capability of the basic artificial bee colony algorithm with the exploration capability. In this paper, we verify the superiority of the RABC algorithm to optimize PID parameters by four intelligent algorithms.

4.1. Performance Indicators of the Control System

The performance indicators of control systems are divided into transient performance indicators and steady-state performance indicators. Transient performance refers to the transient behavior of the output of a control system during the transition process, which is the so-called transition process in which the system is transferred from one steady state to another under the action of an external input signal. In control systems, the unit step response of the system is generally used to define the indicators of the transient performance of the system, which are usually rise time tr, peak time tp, peak time tp, and overshoot σ %.

4.2. Simulation Verification

After simulation verification in Matlab, three typical mathematical model transfer functions are shown in Table 3.

To verify the optimization performance of the RABC algorithm, the comparison with three intelligent algorithms PSO, DE, and GA is verified. After the simulation verification in Matlab, the optimal parameter setting of each algorithm is obtained. The parameters of each algorithm were set as follows: PSO algorithm C1 = C2 = 2, initial value of is 0.9,  = 0.9,  = 0.4,  = 1,  = −1, population size SN = 50, and iterations = 50. DE algorithm crossover probability Pcr = 0.8, scaling factor F = 0.85, population size SN = 50, and iterations = 50. GA algorithm crossover probability Pc = 0.7, variation probability Pm = 0.3, population size SN = 50, iterations = 50. RABC algorithm population size SN is set to 50, limit number of iterations is 50, and iteration number is set to 50.

The simulation time for DC and PCSST is set to 1 s. The simulation time for DCWT is set to 1000 s, since DCWT is a time-delay system. The experimental results are shown in Table 4.

From the unit step response curve in Figure 7, it can be seen that the RABC algorithm has no overshoot amount in the dual-capacity tank system, and the rise time, regulation time, and peak time are the shortest. The RABC algorithm has almost no overshoot in the other two systems, and the rise time, regulation time, and peak time are also the shortest. This indicates that the RABC algorithm optimizes the PID controller parameters best. From the unit step response convergence curve in Figure 7, it can be seen that the RABC algorithm has the fastest convergence speed and the highest convergence accuracy among the three systems. This also proves that the RABC algorithm optimizes the PID controller parameters best.

From Table 5, it can be clearly seen that the adaptation values obtained by the RABC algorithm in optimizing the PID controller parameters are smaller than those of the other three optimization algorithms for the DC motor, dual-capacity water tank, and machine tool control systems. This also fully illustrates that the RABC algorithm is more accurate than the other three intelligent algorithms. From Table 5, it can be also seen that the PID controller of the dual-capacity water tank system optimized by the RABC algorithm has a fast response, no overshoot, and short regulation time and can enter the steady-state zone quickly, which reflects a better control effect. The PID controller of the other two systems optimized by the RABC algorithm has almost no overshoot, and the rise time, regulation time, and peak time are also the shortest. In summary, RABC algorithm-optimized PID controller has a better control effect.

A good controller has some robustness to cope with changes in parameters. For DC model, the parameter T is set to 10, 15, and 20, respectively. For DCWT model, the parameter T1 is set to 5, 10, and 15, respectively. For PCSST model, the parameter is set to 15, 20, and 25, respectively. The simulation results are presented in Figures 810 and Tables 68. It can be seen from Figures 810 that the method still yields better results in the case of variation of model parameters. From Tables 68, we can see that the RABC-PID method still outperforms the other three methods in terms of overshoot, rise time, regulation time, and peak time when the parameters are changed through simulation experiments, which also proves that the RABC-PID has stronger robustness.

5. Conclusions

In this paper, we propose an RABC algorithm to optimize the PID controller, to address the defects of the traditional ABC algorithm that the following bees follow the employed bees with too much randomness and the bee colony is not easy to approach the optimal food source, resulting in slow convergence and low accuracy, to increase the probability of following the employed bees that have a higher quality food source, and to introduce the global optimal bees to lead the other bees to move to a better food source. The RABC algorithm can quickly obtain the optimized value of the theory and improve the convergence speed and convergence accuracy. The PID controller optimized by the RABC algorithm has the characteristics of no overshoot and fast response and has a better control effect.

Data Availability

No data were used to support this study.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This study was fully supported by the Liaoning Provincial Department of Education Basic Research Projects for Higher Education Institutions, China (no. LJKZ0301), the Scientific Research Foundation of the Education Department of Liaoning Province, China (no. 2017LNQN22), and the Young Teachers Foundation of University of Science and Technology Liaoning, China (no. 2017QN04).