Research Article | Open Access
Advanced Fireworks Algorithm and Its Application Research in PID Parameters Tuning
Proportional-Integral-Derivative (PID) controller is one of the most widely used controllers for its property of simplicity and practicability. In order to design high-quality performances PID controllers, an Advanced Fireworks (AFW) algorithm based on self-adaption principle and bimodal Gaussian function is proposed, which is built to optimize the PID controller by parameters tuning. Firstly, a compound index of optimization performance is formulated, and then the extremal optimization method of PID control system is proposed. Secondly, a PID parameters tuning model combined with AFW is built. At last, 5 typical transfer functions are simulated to obtain optimal parameters by AFW and contrast tuning method, such as Ziegler-Nichols method, Enhanced Fireworks (EFW) algorithm, and Particle Swarm Optimization (PSO). Simulation results show that AFW are effective and are easily implemented methods to solve PID control problems of different transfer functions.
It is not only the simplest but also the most efficient control strategy to solve many real-world control problems by Proportional-Integral-Derivative (PID) control system . Optimal parameters of PID controller may obtain high-quality performances such as high stability and satisfied transient response, but it is difficult to be tuned to control a complex system [2, 3]. In order to get better parameters of PID controller, more and more researchers pay attention to setting the parameters beyond cut-and-try or Ziegler-Nichols method, which always get low-quality performances and waste a lot of time.
The evolutionary algorithm (EA) principle is a hot research topic in optimization techniques and several of them have been adopted to solve these problems in the past decade, such as PSO (Particle Swarm Optimization) [4–6], GA (Genetic Algorithm) [7, 8], ACO (Ant Colony Optimization) , and BBO (Biogeography-Based Optimization) [10, 11].
A novel evolutionary algorithm named Fireworks Algorithm (FWA) is proposed and enhanced by Tan et al. [12, 13]. And then, Janecek and Tan applied Fireworks Algorithm to nonnegative matrix . Gao and Diao applied Fireworks Algorithm to digital filters design . He et al. used Fireworks Algorithm for spam detection . Du solved nonlinear equations with Fireworks Algorithm and compared it with Artificial Bee Colony (ABC) algorithm . Although nearly all of these applications get effective results, its application to control systems is scarce and rarely found in the published literature .
As a consequence, this paper focuses on PID controller parameters tuning with optimization on Advanced Fireworks (AFW) algorithm in the attempt to obtain better performance. Firstly, compound index of PID optimization performance by analyzing PID controller and several traditional performance indices is built. Then, based on the simulation model combined with AFW, 5 typical transfer functions of control system were simulated to obtain optimal parameters by AFW and compared with Enhanced Fireworks (EFW) algorithm, Particle Swarm Optimization (PSO), and Genetic Algorithm (GA). Results show that AFWA is an effective and easily implemented method to solve PID control problems with different transfer functions.
2. PID Controller and Optimization Performance Index
2.1. PID Controller
A lot of practice showed that every PID controller parameter (proportional gain, integral gain, and derivative gain) has its own effectiveness to control system clearly, which is very easy to operate and also very effective. The structure of standard control system with PID controller is shown in Figure 1, and the transfer function in the Laplace Domain of the PID controller is described as follows:where is the proportional gain, is the integral gain, is the derivative gain, is the complex number frequency, is the filter coefficient, and will be deduced to ideal differentiator when is large enough.
For a typical feedback control system, a continuous form of the PID controller is described as follows: where is the out of the PID control signal and is the system error, , which means the difference between the output value and the target value.
Furthermore, the discrete PID controller is written as follows: where is the sampling interval time.
2.2. Hybrid Index with Linear Weighted Method
There are several indices measuring the performance of the control system, such as the integral of the absolute value of error (IAE), the integral of time multiplied by the absolute value of error (ITAE), the integral of the square value of error (ISE), and the integral of time multiplied by the square of error (ITSE). These indices did not fully express the control performances comprehensively, so we present another novel index which is more reasonable.
The index we proposed is a hybrid index ITUE which is created by the linear weighted method and combined ITSE output of PID controller and rate of system error into a single index by linear weighted method according to the importance of each index. It is defined as follows: where , , and are the weight value of ITSE, output of PID controller, and rate of system error, respectively. Besides ITSE, is applied to avoid exporting too large control value that may be beyond the amplitude of PID controller in engineering and the rate of system error is used to avoid excessive rate of error which may cause the sensor delay in engineering.
Furthermore, the discrete performance index of control system is written as follows:
3. PID Parameters Tuning Model Based on Advanced Fireworks Algorithm
In this section, the methodology for tuning the optimization of PID controllers is described. Firstly, a novel evolutionary algorithm named AFW is proposed, which is constituted of fireworks explosion, mutation explosion, and selection of explosion locations. And then, structure of PID parameters tuning model based on AFW is introduced.
3.1. Simulink Structure of Testing Performance Index on PID Control System
Simulink, developed by MathWorks, is a graphical programming environment for modeling, simulating, and analyzing control systems and offers tight integration with the rest of the MATLAB environment and can either drive MATLAB or be scripted from MATLAB. For Simulink is widely used in automatic control and digital signal processing simulation, testing performance index ITAE and ITUA on PID control system is built as in Figure 2.
3.2. Advanced Fireworks Algorithm
In order to improve computational efficiency of PID parameters tuning, Advanced Fireworks algorithm is proposed.
Advanced Fireworks space is made up by firework devices and -dimensional variable space (arguments space of optimization function), location of elements (fireworks, sparks, or mutation sparks), , and gorgeous degree (objective function value) of elements . Fireworks Algorithm is constituted by three steps (fireworks explosion, mutation explosion, and selection of explosion Locations).
In the beginning, 1st-generation location of firework in dimension is generated randomly as follows: where , are the lower and upper boundary of searching space in dimension and is displacement parameter generated from a standard uniform distribution on the open interval .
3.2.1. Fireworks Explosion
Fireworks explosion is proposed to generate sparks scattered all around the explosion location of father fireworks, which can be viewed as a searching process around a specific spot. High-quality fireworks generate numerous sparks which centralize the explosion center. That is to say, spot closed to the optimal location needs to be well searched. However, low-quality fireworks generate quite few sparks which are scattered in the space. In order to obtain splendid fireworks explosion, it is wise to set sparks number and explosion amplitude according to gorgeous degree (objective function value) of fireworks.
The number of sparks generated by firework is expressed follows: where is constant of total sparks number, is the maximum value of the objective function among the fireworks, and is the machine epsilon. Due to the limitation of manufacturing process, number of the sparks generated by fireworks should be no more than and no less than : that is, should be replaced by if is bigger than , and should be replaced by if is smaller than .
The amplitude of fireworks explosion by firework is expressed as follows: where is constant of the maximum explosion amplitude and is the worst value of the objective function among fireworks.
And then, sparks are generated in the amplitude space randomly. th dimension location of spark generated from firework is defined as follows: where is the location of firework in th dimension coordinate, is changing factor which will be 0 or 1 randomly, and is displacement parameter generated from uniform distribution over . denotes whether th dimension location of spark generated from firework should be different from th dimension location of firework . Once is out of searching space in dimension , will be regenerated as (9) until it is located in the searching space.
3.2.2. Mutation Explosion Based on Bimodal Gaussian Function
In order to keep the diversity of sparks, mutation explosion is proposed to generate mutation sparks which are able to escape from original location. Location of mutation spark is generated from and escape from local extremum area as much as possible. So we define th dimension location of mutation spark generated from firework as follows: where is changing factor of mutation explosion which will be or randomly and is displacement parameter generated from bimodal Gaussian function follows: where and are the mean square error of bimodal Gaussian function, is a random number generated from , and is a MATLAB function which has the value for , for , and for . Once is out of searching space in dimension , is regenerated as (10) until it is located in the searching space.
3.2.3. Selection of Explosion Locations
After fireworks explosion and mutation explosion, we already get the location of fireworks, sparks, and mutation sparks. At the same time, the gorgeous degree (objective function value) can be calculated too. Then, locations are selected to be fireworks in next generation. The element with best gorgeous degree (objective function value) is kept to be firework in next generation and the other fireworks are selected based on their distance to other elements so as to keep diversity. Distance can be measured by any one of Manhattan distance, Euclidean distance, Angle-based distance, and so on. The probability of whether the element is selected to be firework in next generation is expressed as follows: where is the set of all current locations of elements.
3.3. PID Parameters Tuning Model Based on AFW
In order to obtain the optimal performance of PID control system on different transfer function, it is necessary to get a set of PID controller parameters (optimal location of element) which promote minimum performance index ITUE/ITAE. Note that filter coefficient may vary under different physical implementation. Without loss of generality, we set filter coefficient as a constant which is large enough. The model of PID parameters tuning based on AFWA is depicted as in Figure 3.
Step 1. Set parameters of AFW, number of fireworks , maximum number of iterations , and number of mutation sparks.
Step 2. Initialize sets of PID parameters , that is, location of fireworks randomly.
Step 3. Set off fireworks (sets of PID controller parameters) to generate sparks (new sets of PID controller parameters).
Step 4. Generate mutation sparks (the other new sets of PID controller parameters) according to mutation explosion.
Step 5. Check out gorgeous degree of all elements (fireworks, sparks, and mutation sparks). That is to say, simulate PID control system (shown as in Figure 2) with all set of PID controller parameters and then get corresponding performance index ITUE/ITAE.
Step 6. Select elements to be fireworks in next generation. That is to say, select sets of parameters to generate new set of parameters in simulation of next generation.
Step 7. If the performance of PID control system meets the requirement or the generation of searching evolution reaches the maximum number of iterations , fireworks with best gorgeous degree are chosen to be best solution of problem. That is to say, the set of PID parameters with best performance index is chosen to be the optimal PID parameters (, , and ). Otherwise go to Step 3.
4. Simulations and Analysis
4.1. Comparison Tuning Method: Ziegler-Nichols Method
In order to evaluate the PID controller parameters (, , and ) tuned by AFW, the Ziegler-Nichols tuning method (Z-N method) is introduced to be comparison tuning method. Z-N method is a heuristic method of tuning a PID controller which was developed by John G. Ziegler and Nathaniel B. Nichols.
Z-N method is performed by setting the integral gain and derivative gain as zero. The proportional gain is then increased (from zero) until it reaches the ultimate gain , at which the output of the control loop has stable and consistent oscillations. and the oscillation period are used to set the PID controller parameters (, , and ) as follows: , , and .
4.2. The Simulation Environment and Evaluation Standards
With the PID parameters tuning model based on AFW, simulation is carried out to test the performance of PID tuning index ITUE and optimizing capacity of AFW on the problem of PID controller parameter tuning. AFW and several compared evolutionary algorithms are applied to optimize the PID controller performance index (ITAE or ITUE) by parameters (the proportional gain , integral gain , and differential gain ) tuning of PID controller with step response on 5 different typical transfer functions.
In order to fully compare the performance of different evolutionary algorithms and test performance of different PID controller performance index, it is essential to set similar simulation environment as soon as possible. Population size (partial size in PSO, fireworks size in AFW and EFW) was set as 50 and the maximum evaluation number as 100 for all algorithms on all functions. Simulation time of PID control system was set as 20 seconds, filter coefficient of PID controller was 100, and the weights values of the performance index ITUE were , , and , respectively. Besides, other main parameters were chosen as in Table 1.
In order to evaluate the quality of the controller, step response is applied in this section. Step response is the time behavior of the outputs of a general system when its inputs change from zero to one in a very short time. Then several quantities related to time behavior may be obtained, such as overshoot and setting time . Overshoot is the occurrence of a signal or function exceeding its target, which reflects the oscillation behavior of the system transient process. In particular, overshoot reflects the relative stability of the system. Settling time is defined as the time required for the response curve to reach and stay within a range of certain percentage (usually 5% or 2%) of the final value. reflects overall rapidity of control system on step response.
4.3. Simulation and Analysis
Simulate the PID parameters tuning model based on AFWA with 5 typical transfer functions, respectively, in which filter coefficient is set as 100 according to testing benchmarks. Results of best ITAE, best ITUE, and their corresponding PID controller parameters are given as in Table 2. The best results between different methods are drawn in bold writing.
Based on PID control parameters tuned by Z-N method and optimal parameters (, , and ) with best ITAE (ITUA) performance optimized by AFW, EFW, and PSO, step response curves of PID control system on 5 typical transfer functions are drawn in Figure 4 (Figure 5), respectively.
(a) Function 1
(b) Function 2
(c) Function 3
(d) Function 4
(e) Function 5
(a) Function 1
(b) Function 2
(c) Function 3
(d) Function 4
(e) Function 5
It is shown that AFW almost has the best performance index value of 2 different performance indexes ITAE and ITUE in PID parameters tuning with transfer functions as (1) (2) (4) (5) or has little difference with the best performance index value but much better than the other evolutionary algorithms with transfer functions as (2) (3) according to Table 2.
Besides, curves with hybrid performance index ITUE get small overshoot and small rate of curve changing than cures with ITAE in each transfer function or each evolutionary algorithm according to Table 2, Figures 4 and 5.
In this paper, PID control system parameters tuning problem is transformed into a class of 3-dimensional parameter optimization problem based on performance indexes ITUE and ITAE. In order to design high-quality performances PID controller, an Advanced Fireworks (AFW) algorithm is built to optimize the PID controller by parameters tuning. Extremal optimization method of PID control system was got by analyzing PID controller and building compound index of optimization performance. Then build a PID parameters tuning model combined with AFW. At last, 5 typical transfer functions of control system were simulated to obtain optimal parameters by AFW and were compared with Z-N tuning method, Enhanced Fireworks (EFW) algorithm, and Particle Swarm Optimization (PSO). The simulation results show that AFW algorithms are effective and easily implemented methods to solve PID control problems of different transfer functions.
The authors declare that they have no competing interests.
This work is supported by National Natural Science Foundation of China under Grants nos. 71171199 and 61472443.
- K. J. Åström and T. Hägglund, “The future of PID control,” Control Engineering Practice, vol. 9, no. 11, pp. 1163–1175, 2001.
- A. I. Al-Odienat and A. A. Al-Lawama, “The advantages of PID fuzzy controllers over the conventional types,” American Journal of Applied Sciences, vol. 5, no. 6, pp. 653–658, 2008.
- W.-D. Chang and S.-P. Shih, “PID controller design of nonlinear systems using an improved particle swarm optimization approach,” Communications in Nonlinear Science and Numerical Simulation, vol. 15, no. 11, pp. 3632–3639, 2010.
- D.-F. Wang and P. Han, “Proportional-integral-derivative chaotic system control algorithm based on particle swarm optimization,” Acta Physica Sinica, vol. 55, no. 4, pp. 1644–1650, 2006 (Chinese).
- K. Khandani and A. A. Jalali, “PSO based optimal fractional PID controller design for an active magnetic bearing system,” in Proceedings of 18th Annual International Conference on Mechanical Engineering, pp. 1–6, 2010.
- G. Štimac, S. Braut, and R. Žigulić, “Comparative analysis of PSO algorithms for PID controller tuning,” Chinese Journal of Mechanical Engineering, vol. 27, no. 5, pp. 928–936, 2014.
- L. Meng and S. Jiong, “Simulating study of adaptive GA-based PID parameter optimization for the control of superheated steam temperature,” Proceedings of the CSEE, vol. 22, no. 8, pp. 145–149, 2002 (Chinese).
- P.-F. Niu, J. Zhang, and X.-P. Guan, “Research on genetic algorithm optimization based on PID control with two degrees of freedom controller for chaotic system,” Acta Physica Sinica, vol. 56, no. 7, pp. 3759–3765, 2007 (Chinese).
- I. Chiha, N. Liouane, and P. Borne, “Tuning PID controller using multiobjective ant colony optimization,” Applied Computational Intelligence and Soft Computing, vol. 2012, Article ID 536326, 7 pages, 2012.
- G.-Q. Zeng, K.-D. Lu, Y.-X. Dai et al., “Binary-coded extremal optimization for the design of PID controllers,” Neurocomputing, vol. 138, pp. 180–188, 2014.
- M. M. Sayed, M. S. Saad, H. M. Emara, and E. E. Abou El-Zahab, “A novel method for PID tuning using a modified biogeography-based optimization algorithm,” in Proceedings of the 24th Chinese Control and Decision Conference (CCDC '12), pp. 1642–1647, Taiyuan, China, May 2012.
- Y. Tan and Y. Zhu, “Fireworks algorithm for optimization,” in Advances in Swarm Intelligence: First International Conference, ICSI 2010, Beijing, China, June 12–15, 2010, Proceedings, Part I, vol. 6145 of Lecture Notes in Computer Science, pp. 355–364, Springer, Berlin, Germany, 2010.
- S. Zheng, A. Janecek, and Y. Tan, “Enhanced fireworks algorithm,” in Proceedings of the IEEE Congress on Evolutionary Computation, vol. 62, pp. 2069–2077, Cancun, Mexico, June 2013.
- A. Janecek and Y. Tan, “Swarm intelligence for non-negative matrix factorization,” International Journal of Swarm Intelligence Research, vol. 2, no. 4, pp. 12–34, 2011.
- H. Gao and M. Diao, “Cultural firework algorithm and its application for digital filters design,” International Journal of Modelling, Identification and Control, vol. 14, no. 4, pp. 324–331, 2011.
- W. He, G. Mi, and Y. Tan, “Parameter optimization of local-concentration model for spam detection by using fireworks algorithm,” in Advances in Swarm Intelligence, vol. 7928 of Lecture Notes in Computer Science, pp. 439–450, Springer, Berlin, Germany, 2013.
- Z. Du, “Fireworks algorithm for solving nonlinear equation and system,” Modern Computer, vol. 6, no. 2, pp. 18–21, 2013.
- G. J. Ni, P. Wang, and L. Liu, “PID optimization with regulation-based formulas and improved differential evolution algorithm,” Advanced Engineering Forum, vol. 6-7, pp. 261–266, 2012.
- Microstar Laboratories, Ziegler-Nichols Tuning Rules for PID, http://www.mstarlabs.com/control/znrule.html.
Copyright © 2016 Jun-jie Xue et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.