Fuzzy auto-tuning for a PID controller Alain Segundo Potts 1, Basilio Thomé de Freitas Jr 2. and José Carlos Amaro 2 1 Department of Telecommunication and Control. University of São Paulo. Brazil. e-mail: alain 2do@yahoo.com 2 Sollwert Industria e Comercio LTDA. São Paulo, Brazil. e-mail: basilio@sollwert.com.br. josecarlos@sollwert.com.br Abstract This paper presents a fuzzy tuning system for realtime industrial PID controllers. The system is tested in an austempering process but can be applied in any industrial process. Besides, an analysis between the response of the process with a PID controller and the system of fuzzy auto-tuning for PID proposed was made. I. INTRODUCTION The fuzzy logic was introduced by Lotfi Zadeh to mediated the 1960s as a theory of fuzzy sets. This theory can be studied as a multi-evaluated logical or like to extension of boolean logic, due to the fact that it admits values intermediate between the logical FALSE (0) and TRUE (1). This means that a fuzzy logic value is any value in the range of values between 0 and 1. The implementations of fuzzy logic allow that indeterminate states can be treated by control devices. Thus, it is possible to evaluate non-quantifiable concepts. This fact was used by Mandani from 1974 in control systems that were too difficult to model [7]. Since then, fuzzy logic has been used as an alternative or complement to the control and modeling of large number of industrial processes, especially in those industrial processes with uncertainties. Although all the advantages of fuzzy logic and the large amount of research on the subject, yet the majority of industrial controllers operating are PID (Proportional-Integral- Derivative). The use of these get to the point that much authors say that they occupy between a 90% to 99% of an industrial process control [1]. Three main factors can be cited about the widespread use of PID controllers: The PID controllers are robust and easy to design. There is a clear relationship between the parameters of PID controller and the control response. There are many techniques of tuning to facilitate the work. Despite this, the PID controllers are not the best solution to all control processes. In very complex processes with nonlinearities, time varying parameters and delays in the process, that are difficult to model analytically, the response of the PID is really very poor. In these cases the control classic methodology can simplify the model of the plant but did not get good performance. By which there must be a human constant supervision of the process. Other problems arise here, because the human control is vulnerable to mistakes and is very dependent on experience and qualifications of the operator. One way to solve this problem would be to automate the process of adjustment and tuning of the PID controller. Conventional techniques such as tuning method of Ziegler-Nichols or the analytical method of setting poles or optimization existed for several decades but they fail when the process can not be modeled accurately or its parameters vary with respect to the time. In those cases we need an automatic real-time tuning of the controller [2]. In this paper is proposed a fuzzy controller as a system auto-tuning in real-time for a PID controller in industrial applications. II. PID CONTROLLER The PID controller used is a basic discrete PID industrial controller. T µ(t) = µ(t 1) + (e(t) e(t 1))K p + e(t)k p T i + T (e(t) 2e(t 1) + e(t 2))K d (1) p T where: K p is the proportional gain. T i is the integral time. T d is the derivative time. T is the sampling period. e(t) = r(t) y(t) is the error between the reference (or setpoint) and the process output. The proportional gain K p, integral time T i, and derivative time T d, represent the strengths of different control action. Larger values of K p typically mean faster response since the larger the error, the larger the proportional term compensation. An excessively large proportional gain will lead to process instability and oscillation. Larger values of T i imply steady state errors are eliminated more quickly. The trade-off is larger overshoot: any negative error integrated during transient response must be integrated away by positive error before reaching steady state. Finally larger values of T d decrease overshoot, but slow down transient response and may lead to instability due to signal noise amplification in the differentiation of the error [1] and [8]. III. FUZZY CONTROL STRUCTURE The fuzzy system was designed by following the standard procedure of fuzzy controller design, which consists of fuzzification, control rule base establishment, and defuzzification.
Fig. 1. Structure of the classic fuzzy system A. Fuzzification Fuzzification is mapping from the crisp domain into the fuzzy domain. In others words, means the assigning of linguistic value, defined by relative small number of membership functions to variable [3]. There are three inputs to the fuzzy controller, the setpoint, the error and the derivative of the error: e(t) = e(t) e(t 1). The election of the setpoint as input the fuzzy system is due to the fact that variations in the setpoint trigger an increase in the output of the system. For all inputs and outputs, were chosen symmetrical triangular membership function, where the triangular curve is a function of a vector, x, and depends on three scalar parameters a, b, and c, as given by: ( ( x a µ(x : a, b, c) = max min b a, c x ) ), 0 c b where a and c form the base of the triangle and b its peak. (2) Fig. 4. B. Rule bases Member ships functions of derivative of error input For the rule bases a classic interpretation of Mandani was used. For the logics operations and and or was used the min and max functions. Then through of a set of IF-THEN rules is possible to implement the fuzzy algorithm. Thats rule bases can be describe by a two dimensional table rules I, II and III. In the system under study the universe of discourse for both e(t) and e(t) may be normalized from [ 1, 1], and the setpoint was normalized according to the maximum allowable value of the process. The linguistic labels are negative big (NG), negative medium (NM), negative small (NP), zero (Z), positive small (PP), positive medium (PM) and positive big (PG). The linguistic labels of the outputs are zero (Z), small (P), medium (M), big (G), and very big (GG). TABLE I RULE BASE FOR PROPORTIONAL GAIN K p Sp e(t) NG NM NP Z PP PM PG Z M M P Z P M M P G G M P M G G M G G G M G G G G GG GG G G G GG GG GG GG GG GG GG GG GG GG Fig. 2. Member ships functions of setpoint input TABLE II RULE BASE FOR INTEGRAL TIME T i e(t) e(t) NG NM NP Z PP PM PG NP Z P P M P P Z NM P M M G M M P NG M G G G G G M Z G G G G G G G PP M G G G G G M PM P M M G M M P PG Z P P M P P Z Fig. 3. Member ships functions of error input These tables of the rule bases could be also represent like the surface formed by the inputs and the outputs of the system in the space. C. Defuzzification The center of area method was used for defuzzification. This method, also called center of gravity method, determines the center of the area of the combined membership functions.
TABLE III RULE BASE FOR DERIVATIVE TIME T d e(t) e(t) NG NM NP Z PP PM PG NP GG GG G M P Z Z NM GG G M P Z Z Z NG G M P Z Z P M Z M M Z Z Z P M PP M P Z Z P M G PM P Z Z P M G GG PG Z Z P M G GG GG where µ(z j ) is is membership value of the element z j, z the output of the fuzzy system and n is number of quantization levels of the output. Fig. 8. Member ships functions of K p output. Fig. 5. Surface of the rule base of K p Fig. 9. Member ships functions of T i output. Fig. 6. Surface of the rule base of T i Fig. 7. Surface of the rule base of T d Fig. 10. Member ships functions of T d output. z = n j=1 z jµ(z j ) n j=1 µ(z j) (3) The output of the fuzzy system is normalized within a range 0 1. Later this output is adjusted to work within the predetermined maximum and minimum values of each parameter of the PID controller.
IV. APPLICATION This system was used to control the temperature in an austempering industrial process. The austempering is a hardening process that is used on iron-based metals to promote better mechanical properties. The metal is heated into the austenite region of the ironcementite phase diagram and then quenched in a salt bath or heat extraction medium that is between temperatures of 300 to 375 C (572 to 707 F). The metal is annealed in this temperature range until the austenite turns to bainite or ausferrite (bainitic ferrite + high-carbon austenite) [6]. By changing the temperature for austenitization, the austempering process can yield different and desired microstructures. A higher austenitization temperature can produce a higher carbon content in austenite, whereas a lower temperature produces a more uniform distribution of austempered structure. The carbon content in austenite as a function of austempering time has been established [4] and [5]. The process also is subject to variations in its working arrangements. These variations of setpoint must be happen in a fixed time, which is usually fast, whereby the response of the system must be as quick as possible. The process is also subject to disturbances product of differential loads from the oven. For all this is necessary a fine adjust of the controller in real time. A. Test with the fuzzy auto-tuning for PID controller The main objective of the test was obtain a faster response for the process without overshooting. Thus the controller optimizes the power consumption in a process with high electrical consumption. Fig. 12. Output system controller by Fuzzy-PID auto-tuning Fig. 13. Tuning of the parameters K p Fig. 14. Tuning of the parameters T i Fig. 11. Structure of the Auto-Tuning Fuzzy-PID system The system was calibrated to work in a range of permissible values. TABLE IV PERMISSIBLE VALUES FOR THE PROCESS K p T i (min) T d (s) min 150 5 0 max 200 15 5 In this test, three continuous variations of the setpoint were given to the oven. Note that the response was an exponential curve relatively quick. The process variable reaches the setpoint without overshooting and the stationary response was good. Fig. 15. Tuning of the parameters T d B. Test with a simples PID controller The same process was now controlled by a simples PID controller. The PID parameters used were the middles values
of the range of permissible values: K p = 175, T i = 10min and T d = 2.5s. Note the differences in the transient and stationary response, for example, the time of establishment was approximately 31% higher. [1] M. M. F. Algreer and Y. R. M. Kuraz, Design Fuzzy Self Tuning of PID Controller for Chopper-Fed DC Motor Drive, Al-Rafidain Engineering Vol.16 No.2 pp 54-66, 2008. [2] K. J. Astrom and T. Hagglund, PID Controllers: Theory, Design, and Tuning, 2nd ed. International Society for Measurement and Con, 1995. [3] Y. Bai, H. Zhuang and D. Wang, Advanced Fuzzy Logic Technologies in Industrial Applications (Advances in Industrial Control), 1st ed. Springer, 2006. [4] U. Batra, S. Ray and SR. Prabhakar, Effect of austenitization on austempering of copper alloyed ductile iron, Journal of Materials Engineering and Performance. Vol. 12 No. 5 pp 597-601 Springer New York, 2003. [5] S. Chupatanakul and P. Nash, Dilatometric measurement of carbon enrichment in austenite during bainite transformation, Journal Mater Science. Vol. 41 No.15 pp 4965-4969 Springer Science and Business Media, 2006. [6] V. Kilicli and M. Erdogan, The Strain-Hardening Behavior of Partially Austenitized and the Austempered Ductile Irons with Dual Matrix Structures, Journal of Materials Engineering and Performance. Vol. 17 No. 2 pp 240-249 Springer New York, 2008. [7] K. M. Passino and S. Yurkovich, Fuzzy Control, 1st ed. Addison Wesley Publishing Company, 1997. [8] K. Ogata, Modern Control Engineering 5th ed. Prentice Hall, 2009. Fig. 16. Output system controller by PID controller V. CONCLUSION Fuzzy auto-tuning system optimized the response of the plant. All rule bases were chosen according with engineers s experience that have worked tuning PID controller for many years. The setpoint was reached quickly and there was not overshooting. The use of this systems is based in processes for which there are large variations of labor characteristics, eg large variations of setpoint, different types of loads or disturbances. Use of Fuzzy-PID auto-tuning system mean a energy savings since the time of establishment (31% minor) and the average of the output control (5% minor) were improved. Another important fact was the stationary response, while the response from PID fluctuated, the fuzzy auto-tuning system for PID controller was more stable. REFERENCES