Design and Implementation of Self-Tuning Fuzzy-PID Controller for Process Liquid Level Control 1 Deepa Shivshant Bhandare, 2 Hafiz Shaikh and 3 N. R. Kulkarni 1,2,3 Department of Electrical Engineering, Modern College of Engineering, Pune University, Pune-05, India Abstract - Liquid level control has eventually been an important issue in process industries. Various control techniques are used for improving the dynamics of liquid level control. Conventional PID controller is mostly used for the control of liquid level characteristics. PID controller response can be tuned for obtaining better oscillations, steady state response and reduced error by changing the PID parameters. Fuzzy logic controller gives a promising result when PID parameters are controlled using fuzzy rules. A self-tuning fuzzy PID controller is designed through continuous updating of its output scaling factor. Instead of using a complex three dimensional rule base for obtaining PID action, one and two dimensional rule bases are used in parallel. The output from the Self-Tuning Fuzzy-PID controller is then given to the water tank within the maximum level limit. Online self-tuning mechanism provides improved performance of the proposed fuzzy PID controller compared to conventional PID controller. Keywords - Water tank; Proportional-Integral-Derivative (PID) Controller; Fuzzy system; Self-tuning Fuzzy-PID Controller I. INTRODUCTION In many industrial processes, control of liquid level is required. It was reported that about 25% of emergency shutdowns in the nuclear power plant are caused by poor control of the steam generator water level. Such shutdowns greatly decrease the plant availability and must be minimized. Water level control system is a very complex system, because of the nonlinearities and uncertainties of a system. Currently, constant gain PI controllers are used in nuclear organizations for boiler water level control at high power operations. However, at low power operations, PI controllers cannot maintain water level properly. A need for performance improvement in existing water level regulators is therefore needed. This paper focused PID control and fuzzy control together and showed the performance of the fuzzy-pid control, which uses the signals of feedback as input and deals with them via fuzzy rules and the results of fuzzy inference are the parameters of ΔKp,ΔKi and ΔKd. By modifying these parameters, the PID controller output the control signals. The fuzzy-pid controller contains both merits of PID controller and fuzzy controller, namely fast responding, small steadily error, independent of system model and suitable for nonlinearity systems etc. II. WATER STORAGE TANK SYSTEM A. Storage tank Figure 1. Storage tank Fig.1 shows a storage tank of constant cross sectional area a. The density of the liquid is assumed to be constant. The exit pipe resistance is R. The exit flow qo can be laminar or turbulent (nonlinear).for a laminar flow, qo =h/r, and for a turbulent flow, qo =Kh1/2, where K is the discharge coefficient [1]. B. Model Equation Water enters a tank from the top and leaves through an orifice in its base. The rate that water enters is proportional to the voltage, V, applied to the pump. The rate that water leaves is proportional to the square root of the height of water in the tank [2, 3]. Figure 2. Schematic Diagram for the Liquid-Tank System 131
A differential equation for the height of liquid in the tank, H, is given by where Vol is the volume of liquid in the tank, A is the cross-sectional area of the tank, b is a constant related to the flow rate into the tank, and a is a constant related to the flow rate out of the tank. The equation describes the height of liquid, H, as a function of time, due to the difference between flow rates into and out of the tank. The equation contains one state, H, one input, V, and one output, H. It is nonlinear due to its dependence on the square-root of H. Linearizing the model, using Simulink Control Design, simplifies the analysis of this model. The level is sensed by a suitable sensor and converted to a signal acceptable to the controller. The controller compares the level signal to the desired setpoint and actuates the control element. The control element alters the manipulated variable to change position of the valve so that the quantity of liquid being added can be controlled in the process. The objective of the controller is to regulate the level as close to the set point as possible. III. DESIGNING OF FUZZY-PID CONTROLLER SYSTEM A. Water Tank The simulink block diagram for the water tank may be shown in Fig.3: Figure 3. Block diagram of water tank B. Water tank Subsystem The water tank model consists of The water-tank system itself A Controller subsystem to control the height of water in the tank by varying the voltage applied to the pump A reference signal that sets the desired water level A Scope block that displays the height of water as a function of time Double-click a block to view its contents. The Controller block contains a simple proportional integralderivative controller. The Water-Tank System block is shown in Fig.4. C. Water-Tank System Block The circuitry for the water tank system may be shown in Fig.5 as: Figure 5. Block diagram of water tank system Model equation for the Water-Tank System Block may be shown as: where Vol is the volume of water in the tank, A is the cross-sectional area of the tank, b is a constant related to the flow rate into the tank, and a is a constant related to the flow rate out of the tank. The equation describes the height of water, H, as a function of time, due to the difference between flow rates into and out of the tank. Values of the parameters are given as a=2 cm 2.5 /s, A=20 cm 2, b=5 cm 3 /(s V). D. Controller block The circuitry for the PID controller of water tank may be shown as in Fig.6. For the Fuzzy Controller there are two Inputs. One is the liquid level and the other is the rate of change of liquid level in the tank. The output of the controller governs the opening or closing of the valve. The liquid level is sensed by the liquid level sensors and the rate of change is calculated by the derivative of the level signal after that the limits of which are decided by a saturation nonlinearity. Figure 4. Block diagram of water tank subsystem Figure 6. Block diagram of PID controller E. Structure of Self-Tuning Fuzzy PID Controller Self-tuning fuzzy PID controller means that the three parameters Kp, Ki and Kd of PID controller are tuned by using fuzzy tuner [4, 7]. The coefficients of the 132
conventional PID controller are not often properly tuned for the nonlinear plant with unpredictable parameter variations. Hence, it is necessary to automatically tune the PID parameters. The structure of the self-tuning fuzzy PID controller is shown in Fig.7. simulation on PID controller to obtain a feasible rule bases with high inference efficiency. The range of each parameters are, Kp (3,10), Ki (1.5,2.5) and Kd (3, 4.5). Therefore, they can be calibrated over the interval (0, 1). Hence, we obtain: Kp = 7K p' +3, Ki = Ki ' + 1.5, and Kd = Kd ' + 0.1. The membership functions of these inputs fuzzy sets are shown in Fig.9 and Fig.10. Figure 7. Structure of self tuning fuzzy PID controller The new fuzzy-pid controller takes conventional PID as the foundation, which uses the theory of fuzzy reason and variable discourse of universe to on-line regulate the parameters of PID automatically. From the Fig.7 we can get that the error and error changing rate are used as the input variables in the controller, and the output variables are the parameters of PID control, those are ΔKp, ΔKi and ΔKd. Here, e denotes the system error; ec denotes the system error changing rate. IV. IMPLEMENTATION OF SELF-TUNING FUZZY PID CONTROLLER The rules designed are based on the characteristic of the level control loop and properties of the PID controller. Therefore, the fuzzy reasoning of fuzzy sets of outputs is gained by aggregation operation of fuzzy sets inputs and the designed fuzzy rules. The aggregation and defuzzification method are used respectively max-min and centroid method. Regarding to the fuzzy structure, there are two inputs to fuzzy inference: error e(t) and derivative of error de(t), and three outputs for each PID controller parameters respectively K p, K i and K d. Mamdani model is applied as structure of fuzzy inference with some modification to obtain the best value for Kp, Ki and Kd. Fuzzy inference block of the controller design is shown in Fig. 8 below. Figure 9. Membership functions of e(t) The linguistic variable levels are assigned as NB: negative big; NS: negative small; ZE: zero; PS: positive small; PB: positive big. These levels are chosen from the characteristics and specification of the Level control system. Figure 10. Membership functions of de(t) The ranges of these inputs are between -0.1 to 0.1, which are obtained from the absolute value of the system error and its derivative through the gains. Whereas the membership functions of outputs K p, K i and K d, are shown in Fig. 11. Figure 8. Fuzzy inference block Suppose the variable ranges of the parameters Kp, Ki and Kd of PID controller are respectively (Kp min, Kp max ), (Ki min, Ki max), and (Kd min, Kd max).the range of each parameter was determined based on the Figure 11. Membership functions of K p, K i and K d The linguistic levels of these outputs are assigned as S: small; MS: medium small; M: medium; MB: medium big; B: big, where the ranges from 0 to 1. Generally, the fuzzy rules are depended on the plant to be controlled and the type of the controller and from practical experience. Regarding to the above fuzzy sets of the inputs and outputs variables, the fuzzy rules are perform in rules table as shown in Fig. 12 and composed as follows: 133
Rule i: If e(t) is A1i and de(t) A2i then K p = Bi and K i = Ci and K d = Di. Where i= 1, 2, 3... n, and n is number of rules. From the Fig.12, since we have 5 variables as input and 5 variables as output, hence, in the design we have 25 fuzzy rules. tuning fuzzy-pid controller is presented for the set liquid level of 10 cm and is shown in Fig.15. From the response it is observed that the classical PID controller takes reasonable time to settle Liquid level at set level. On the other hand, the self tuning fuzzy-pid controller output settles quicker without any overshoot and oscillation. Figure 12. Rules of the fuzzy inference V. RESULTS AND DISCUSSION Self-tuning fuzzy PID regulator subsystem block as shown in Fig. 13 consists of Fuzzy and PID block with some modification refers to the formula which is applied to calibrate the value of K p, K i and K d from fuzzy block to obtain the value of Kp, Ki and Kd. Each parameter has it s own calibration [5, 6]. While, the complete Simulink block for whole system including the control design and the plant is shown in Fig. 14. Figure 15. Simulated output response of the Liquid level control system for set Liquid level at 10 cm The online variation of the proportional and integral scaling factor with respect to error scaling factor with respect to error has been studied through simulation and is shown in Fig.16 Figure 13. Simulink Block of Fuzzy PID regulator for level control. Figure 16. Parameters variation in Self tuning fuzzy-pid controller for set Liquid level at 10 cm Table 1. Controllers performance comparison in terms of ISE Figure 14. Simulink Block of the Water tank system and Fuzzy PID controller The value of parameter Kp, Ki and Kd are tuned by using signals from fuzzy logic block based on the changes in the error between reference signals and output signals. The simulated output response of the self The performance comparison of the proposed controller with classical PID controller by using the error criteria is given in Table 1. From this comparison the Self tuning fuzzy PID controller proved to be superior to classical PID controller. The responses of the proposed control design look satisfied. However, the proposed control 134
needs to develop by including disturbance and any others nonlinearity and uncertainties in the design with various frequencies in reference input signals. V. CONCLUSION In this paper we used PID control and Self-tuning fuzzy- PID respectively to control tank system. Self-tuning fuzzy controller was applied to tune the value of Kp, Ki and Kd of the PID controller. The effects show that fuzzy-pid is a synthesized control method with the advantages of PID and fuzzy control. It has better dynamic and steady performances than PID and fuzzy control systems. The on-line scaling factor modification of the PID controller by using an intelligent self tuning fuzzy PID control technique appears superior to the conventional PID controller for liquid level control process. The adaptation of fuzzy mechanism to tune the classical controller for setpoint variations is a suitable and easier method and it will be applicable to all type of real-time complex process. The system responses indicate the performance of the liquid level control system was improved and satisfied compare to conventional PID controller. REFERENCES [1] Process dynamics and control by S.Sundaram,Cengage Learning,India. [2] T. E. Marlin, Process Control: designing processes and control systems for dynamic performance,2nd Ed., McGraw-Hill, 2000. [3] Xinli Fang, Tao Shen, Xiaohong Wang and Zhiqun Zhou Application and Research of Fuzzy PID in Tank Systems 978-0-7695-3304- 9/08,2008 IEEE. [4] SenkaKrivić, MuhidinHujdur, Aida Mrzić and Samim Konjicija Design and Implementation of Fuzzy Controller on Embedded Computer for Water Level Control MIPRO 2012, May 21-25,2012, Opatija, Croatia. [5] Mrs. R. Praveena,Abhinaya.R, Abinaya.S.P, Aishwarya.G, Alekya Kumar Level control of a spherical tank system using conventional & intelligent controllers Chennai, Tamil Nadu, India. [6] Sankata B. Prusty, Umesh C. Pati and Kamalakanta Mahapatra Implementation of Fuzzy-PID Controller to Liquid Level System using LabVIEW 2014 International Conference on Control, Instrumentation, Energy & Communication(CIEC) 978-1-4799-2044- 0/14/$31.00 2014IEEE [7] A.Visioli, Tuning of PID controllers with fuzzy logic IEE Proc.-Control Theory Appl., Vol. 148, No. I, January 2001. 135