Design and Performance Comparison of Variable Parameter Nonlinear PID Controller and Genetic Algorithm Based PID Controller Mehmet Korkmaz, Ömer Aydoğdu, Hüseyin Doğan Department of Electrical and Electronics Engineering Selcuk University Konya-Turkey
[email protected],
[email protected],
[email protected] Abstract— In this study, design and performance comparison of variable parameter nonlinear PID (NL-PID) and Genetic Algorithm (GA) based PID controller are achieved. To begin with the proposed method, an error function depending on the system input and output are defined to determine variable coefficients of the nonlinear PID controller. A new type non linear PID controller is designed by using defined error function. By this way, the nonlinear PID controller changes its own parameters over time according to the output response. Secondly, genetic algorithm based PID controller are defined to performance comparison of the proposed NL-PID controller and ZieglerNichols PID controller. Simulation results show that the effects of the PID controllers; nonlinear, GA based and Ziegler-Nichols. Keywords- genetic algorithm; variable parameter PID; ZieglerNichols method; gaussian error function (erf).
I.
INTRODUCTION
PID control schemes based on the classical control theory have been widely used for various industrial control systems for a long time [1]. Generally, it is simply to determine parameters and easy to apply them. Thus, PID controller is the most common form of feedback. The controllers consist of in many different forms. However when the system is more complex traditional PID parameters do not efficiency to control system. So this reason, nonlinear PID (NL-PID) controller is thought where the parameters are depending on system error amount. A nonlinear combination can provide additional degrees of freedom to achieve much improved system performance [2-5]. Practically all PID controllers made today are based on microprocessors. This has given opportunities to provide additional features like automatic tuning, gain scheduling, and continuous adaptation [1]. So, to improve the control quality, many scholars use nonlinear characteristics to modify traditional linear PID controller in recent years [6]. The change characteristics of the nonlinear functions accord with the ideal change process of the parameters, so the nonlinear PID (NL-PID) can achieve both good static and dynamic performances and improve the control quality [7,8]. 978-1-4673-1448-0/12/$31.00 ©2012 IEEE
Genetic algorithms have placed a much stronger emphasis than their counter-parts on global, as opposed to local, search and optimization. They could look into not only in local optima but also in global points. GAs were initially formulated as combinatory search algorithms, which required discretization of the search space in order to be applied to problems involving real decision variables. Theoretical arguments based on the building-block hypothesis and the Schema Theorem [9-10] also appeared to support discretization. In this paper, GA based PID parameters and NL-PID parameters allied to change of error are analyzed and nonlinear functions of Proportional (P), Integral (I) and Derivative (D) depending on error and GA-PID parameters are presented respectively. II.
DESIGN OF PID CONTROLLER, PERFORMANCE INDICES AND GENETIC ALGORITHMS
A general body of a PID control system is shown in Fig.1, where it can be seen that in a PID controller, the error signal e(t) is used to generate the proportional, integral, and derivative actions, with the resulting signals weighted and summed to form the control signal u(t) applied to the plant model. A mathematical description of the PID controller is,
⎡ 1 de(t ) ⎤ u (t ) = K p ⎢e(t ) + ∫ e(t )dt + Td ⎥ Ti dt ⎦ ⎣
(1)
where u(t) is control input to the plant model, e(t) is error which is difference between actual output (y(t)) and reference input (r(t)), Kp is proportional gain, Ti is integral time constant and Td is derivative time constant. Due to system response is dependent on controller parameters settling of these parameters is significant. It is presented different approaches to the determination of the constants in the literature by researchers. In addition this, nonlinear or optimization algorithms based convergence are used.
Crossover: In this process, two kinds of chromosomes are combined to obtain new chromosome. After that new chromosomes can be better than both parents. Mutation: It is a genetic operator that alters one or more gene values in a chromosome from its initial state. This can result in entirely new gene values being added to the gene pool. This step is also important by the view of preventing the population local optimal points. Genetic algorithm steps are like this: Figure 1. A typical PID control system
A. PID Controller Design Methods Despite there are many design methods for PID controllers, the most widely used design methods in the literature are Ziegler-Nichols rules, Chien-Hrones-Reswick PID tuning algorithm, Cohen-Coon tuning algorithm, Wang-Juang-Chan tuning formulae. The Ziegler-Nichols design method which was presented in mid-20th century is the most popular methods used in process control to determine the parameters of a PID controller. One of the important specialties of this system guarantees the stabilities [11]. Ziegler-Nichols tuning rule is the first such effort to provide a practical approach to tune a PID controller. Ziegler Nichols method (Z-N) is useful for plants of which mathematical models are unknown or difficult to obtain. There are two ways of implementing Ziegler-Nichols tuning rules and controller parameters get from the Z-N empirical tables [12]. The Chien-Hrones-Reswick (CHR) PID tuning method emphasizes the set point regulation or disturbance rejection. In addition one qualitative specification on the response speed and overshoot can be accommodated. Compared with the traditional Ziegler-Nichols tuning formula, the CHR method uses the time constant T of the plant explicitly [13]. Another tuning method of the PID controller is the Cohen– Coon tuning formula. This method is used a rule table that is obtained empirically like as Ziegler-Nichols rule table. Based on the optimum ITAE criterion, the tuning algorithm proposed by Wang, Juang and Chan is a simple and efficient method for selecting the PID parameters. B. Genetic Algorithms A GA is an optimization technique in which the solution space is searched by generating a population of candidate individuals to find best values [14]. This process is similar to natural evolution of biological individuals. These are generally having global search capability, better robustness and not depending on initial conditions. These algorithms present excellent global optimization points to solve system optimization problem [15]. Generally, GAs consist of three fundamental operators: reproduction, crossover and mutation. Reproduction: It is a process by which the strings with larger fitness values can produce accordingly with higher probabilities large numbers of their copies in the new generation.
•
Randomly population individual.
•
Select populations according to certain rules.
•
Mate the population selected in a certain probability and generate new creatures.
•
Investigate the optimal conditions, at the end of the maximum iteration get the minimum values if they provide bounds.
generate certain amount of initial and calculate the fitness of each
Here, the objective function value is determined by means of mean square of error criteria (MSE). C. Performance Indices In order to select the best controller, we define a cost function. The cost function mainly derives on how the controller reacts to a given disturbance. There are many of cost functions. In fact, we can define in infinitive criterion. It is a quantitative measure of the performance of a system and is chosen so that emphasis is given to the important system specifications. There are many type of performance indices is described in literature. A performance index is criterion measures that are based on the integral of some function of the control error and on possibly other variables (such as time). Having the smaller value of the integral criterion provides the better the performance of the control loop. In this study IAE and ISE indices is used. For example, IAE integrates the absolute error over time. It does not add weight to any of the errors in a systems response. It tends to produce slower response than ISE optimal systems, but usually with less sustained oscillation. The integral of the square error (ISE) penalizes for large errors more than for small errors. It tends to eliminate large errors quickly. The response often has a smaller initial overshoot, but the cycle does not decay rapidly. Basically several small peaks are tolerated to reduce the magnitude of the first peak. This type of behavior is usually not desired in process loops [16]. III.
PROPOSED METHODS
Considering the above classical methods, they present poor robustness, high overlapping, late rise time etc. Thinking of fixed parameters causes this result in steady state and temporary state. In defiance of these explanations, better system response is occurred when the PID parameters are
looked into depending on error function owing to they are variable. Correspondingly, system responds better than traditional PID controller methods when the PID fixed parameters determine with genetic algorithms based on objective functions or designing them as a nonlinear form. Considering the step response of a common control system we need to decrease overlapping and oscillation, accelerate the system response and initialize the steady state error. For these conditions the parameters can be analyzed like this way. The proportional gain (Kp) contribute to accelerate system response, decrease the settling time however increase the oscillation and in the large values system becomes unstable. As a simple we can model the proportional gain parameter (Kp) by this formula (Fig. 2a).
K p = a1 + f (e) * a 2
(2)
Minimum and maximum value of Kp is a1 and (a1+a2) respectively. All parameters are positive real constant that depends on an error function. The derivative gain parameter (Kd) provides to reduce oscillation and exceeding. Counter to this, causes the slowdown the system response. In a similar vein Kd can be formulized in the equation of the (6) (Fig. 2b).
K d = c1 + f (e) * c 2
(3)
Similarly, range of Kd is from c3 to (c3 + c4) and both of value is real positive constant. Integral gain parameter (Ki) yields to zeroize the steady state error but for the big values of this parameter induces the oscillation and higher overshoot (Fig. 2c).
Figure 2. Curves of Kp, Kd and Ki to Absolute of Error
In respect of explanations above, it is formulized this way:
K i = b1 − f (e) * b2
(4)
As it thought from this analysis, we may provide the quick response system without overlapping and short settling time basically if the parameters set like above depending on the change of error with an appropriate function. It is benefitted from “error function” (also called Gaussian error function) to determine NL-PID variable coefficients (see in Fig.3). x
erf ( x) =
Figure 3.
2 2 e −t dt ∫ ∏0
Error Function
(5)
In this study, the absolute of error was used to prevent the negative values of PID parameters. Therefore it was utilized from only positive values of the function. IV.
SIMULATION RESULTS
The control methods mentioned above was examined with the classical common method, Ziegler – Nichols and comparison of some results can be seen on Table I. These methods and Z-N PID values were compared to some criterion and implementing methods values were better than Ziegler – Nichols method. In this study it was benefited from the below MatlabSimulink model in Fig. 4. For this simulation two different plants model tested. The coefficients (ai, bi, ci) shown in the Table II were obtained for both application. Steady state error and performance indices were measured via the block diagram and system response curves were figured for both. Two kind of plant was used in this paper which is third order process and fourth order system (Eq. 6, 7). Output responses and changing of NL-PID parameters were showed in Fig. 5.a - 5.b. and Fig. 6.a - 6.b for both two plant model respectively.
G1 ( s ) =
1 s( s 2 + s + 1)( s + 2)
(6)
G2 ( s) =
1 s ( s + 2)( s + 4)
(7)
Figure 4. Matlab Simulink Mode
TABLE I.
COMPRAMISION VALUES BETWEEN IMPLEMENTED METHODS First Plant
ess
IAE
ISE
Z-N PID NLPID GA-PID Second Plant Z-N PID NLPID GA-PID
-0.0052 -0.0490 -0.0150
6.071 4.791 3.569
3.516 2.417 2.388
-0.00148 -0.01800 -0.00131
1.655 1.180 0.788
0.5768 0.5440 0.5768
TABLE II. COEFFICIENTS FOR THE NONLINEAR PID CONTROLLER PLANTS
(a)
a1
a2
b1
b2
c1
c2
First Plant
0.933
0.233
0.061
0.061
0.897
0.897
Second Plant
28.8
7.2
6.49
6.49
7.97
7.97
V.
(b) Figure 5.
Output Response for Plants Respectively a) Plant-1 b) Plant-2
CONCLUSION
In spite of the fact that controllers designed by the ZieglerNichols rules give a good performance, they create poor robustness and high exceeding. It is obvious that in case of few parameter changes of the plant led to decline of the performance of the conventional PID controller drastically. Thus, it is not enough to control process dynamics swimmingly although it is a good start to tune PID parameters. Therefore, in this paper to slacken the disfavor of classical tuning methods, nonlinear PID approach and PID parameters based on GA were searched. It was thought error function to determine of nonlinear coefficients of the NL-PID. On the other hand, the coefficients of GA-PID parameters were set with idea of the objective function, called mean square error (MSE). As a result of all these above, the methods mentioned in this paper were compared considering the performance indices values and steady state error. The methods presented gave lower exceeds, short settling time and better performance indices than that of classical form for the third and fourth order systems. Especially, genetic algorithm which converge the minimal
points used to obtain the best PID controller parameters. The main advantage of it was to find optimal points of PID parameters and as it seen in the graphics, GA-PID results were the best ones in both plants.
REFERENCES [1] [2]
[3]
[4]
[5] [6] [7] (a) [8]
[9] [10] [11] [12] [13] (b) Figure 6.
[14]
Change of NL-PID Parameters a) Plant-1 b) Plant-2
ACKNOWLEDGMENT This work was supported by Selçuk University scientific research projects coordinate (BAP).
[15]
[16]
K.J. Äström, T. Hägglund, Advanced PID Control, ISA-The Instrumentation, Systems, and Automation Society, 2006. B. Armstrong, D. Neevel, T. Kusik, “New results in NPID control: tracking, integral control, friction compensation and experimental results”, IEEE Trans. Control Syst. Technol., vol. 9(2), pp. 399 – 406, 2001. B. Armstrong, B.A. Wade, “Nonlinear PID control with partial state knowledge: damping without derivatives”, Int. J. Robotics Research, vol. 19(8) , pp. 715 – 731, 2000. W.H. Chen, D.J. Balance, P.J. Gawthrop, J.J. Gribble, J. O’Reilly, “Nonlinear PID predictive controller”, IEE Proc. Control Theory Appl., vol. 146 (6), pp. 603 – 611, 1999. J.Q. Han, “Nonlinear PID controller”, Acta Automatica Sinica, vol. 20(4), pp. 487 – 490, 1994. W. Wang, J.T. Zhang, T.Y. Chai, “A survey of advanced PID parameter tuning methods”, Acta Automatica Sinica, vol. 26(3), pp. 347-355, 2000. J.J. Gu, Y.J. Zhang, D.M. Gao, “Application of Nonlinear PID Controller in Main Steam Temperature Control”, Asia Pacific Power and Energy Engineering Conference, pp. 1-5, Wuhan, Chine, 2009. O. Aydogdu , M. Korkmaz “A Simple Approach to Design of Variable Parameter Nonlinear PID Controller” International Conference on Electrical Engineering and Applications, pp. 81-85, Chennai, India, 2011. J.H. Holland, Adaptation in Natural and Artificial Systems, The University of Michigan Press, Ann Arbor, 1975. D.E. Goldberg, Genetic Algorithms in Search, Optimization and Machine Learning, Addison-Wesley, Massachusetts, 1989. K. Ogata, Modern Control Engineering, 5th ed., Prentice Hall, New Jersey, 2010. J.G. Ziegler, N.B. Nichols, “Optimum Settings for Automatic Controllers”, Trans. ASME, vol. 64, pp. 759-768, 1942. X. Dingyu, Q.C. Yang, P.A. Derek, Linear Feedback Control Analysis and Design with MATLAB, SIAM Press, Philadelphia, 2007. J.Y. Wu, Y.K. Chung, “Real-Coded Genetic Algorithm for Solving Generalized Polynomial Programming Problems”, Journal of Advanced Computational Intelligence and Intelligent Informatics, vol.11(4), pp. 358-364, 2007. Z.W. Ping, D.Y. Chao, Y.D. Zhou, “Small Unmanned Helicopter Longitudinal Control PID Parameter Optimization Based On Genetic Algorithm”, ICACTE 2010, vol. 6, pp. 142-145, Chengdu, Chine, 2010. C. Smith, Practical Process Control: Tuning And Troubleshooting, John Wiley & Sons, New-Jersey, 2009.