C OMPARATIVE A NALYSIS OF CONVENTIONAL PID CONTROLLER AND F UZZY CONTROLLER WITH VARIOUS D EFUZZIFICATION METHODS IN A THREE TANK LEVEL CONTROL SYSTEM

All the real systems exhibits non-linear nature, conventional controllers are not always able to provide good and accurate results. Fuzzy Logic Control is used to obtain better response. A model for simulation is designed and all the assumptions are made before the development of the model. An attempt has been made to analyze the efficiency of a fuzzy controller over a conventional PID controller for a three tank level control system using fuzzification & defuzzification methods and their responses are compared. Analysis is done through computer simulation using Matlab/Simulink toolbox. This study shows that the application of Fuzzy Logic Controller (FLC) gives the best response with triangular membership function and centroid defuzzification method.


INTRODUCTION
In most of the industrial applications the liquid level control is of paramount importance, especially in petrochemical industries, pharmaceutical & food processing industries.The quality of the final product depends on the accuracy of the level controller.In industries the level control systems with large dead time are difficult to control [1].The aim of the controller is to maintain the set point and be able to adopt a new set point values automatic ally.The conventional PID controller cannot give corrective action in advance, it can only initiate the control action only after error has developed.The only way to achieve better performance is to use fuzzy logic controller instead of conventional controllers [2].The fuzzy logic controller is developed based on the human skill and experiences about the system.In this paper various fuzzification and defuzzification methods are implemented to a fuzzy controller in three tank water level control system [3].The results are compared and optimization is achieved.

CASE STUDY
Let us consider a 3-tank system used in industrial applications is shown in the fig. 1 Fig. 1 Three tank liquid level system q : Initial inflow rate q o : Final outflow rate h 1 , h 2 and h 3 : Heights of the liquid in the three tanks respectively A 1 , A 2 and A 3 : Area of cross-section of the three tanks respectively The three tank system is modeled and simulated with conventional PID controller & fuzzy logic controller (FLC); their responses are compared with the help of MATLAB/SIMULINK [4]

MATHEMATICAL MODELING
The design and analysis of control systems are based on their precise mathematical models.The mathematical modeling for the given system is as follows [5] For tank-1: The outflow rate is For tank-2: The outflow rate is For tank-3: The outflow rate is Where A 1, A 2, and A 3 are in ft 2 , R 1, R 2 and R 3 are in sec/ ft 2 By solving equations (1),( 3) and ( 5) Therefore, the transfer function of the above three tank system is The transfer function of the three tank system is represented as The mathematical modeling of three tank system has been derived and the analysis is done through Matlab /Simulink tool box with conventional PID and Fuzzy controllers.

PID CONTROLLER DESIGN FOR THREE TANK SYSTEM
The block diagram of closed loop feedback control system is shown in figure (2).The process variable is measured by level sensor and is fed to the error detector where set point and measured variable from sensor are compared and an actuating signal is generated.PID controller involves three tuning parameters K p , K i , and K d (Ziegler-nichols tuning).Here, Proportional gain (k p ) is selected based on the present error, integral gain (K i ) depends on the accumulation of the past errors and Derivative gain depends on the prediction of the future errors, based on the rate of change of error.All together are used to affect the process via a final control element to meet the process requirement.There are several tuning methods such as manual tuning, Ziegler-Nichols, Cohen-Coon etc., commonly used in industries.Among them Ziegler-Nichols tuning is preferred due to its consistent tuning .

Fig.2 Closed loop feedback system
In this paper, the tuning parameters are estimated using Ziegler-Nichols tuning method with the following steps.
Step1: The phase of the transfer function is made equal to -180 degrees Step2: Calculating the amplitude ratio.
Step3: Finding the K c Value.
Step4: Finding T i and T d .
For this application, the Ziegler-Nichols tuning parameters are given below.
The calculated Ziegler-Nichols tuning parameters are used for the simulation of conventional PID controller for three tank system.

FUZZY LOGIC CONTROLLER DESIGN FOR THREE TANK SYSTEM
The Fuzzy logic controller based on the mamdani fuzzy inference model has following steps, namely, fuzzification, fuzzy rule base and defuzzification.The development of fuzzy controller is given clearly based on the earlier approaches in the fuzzy related research [6].

FUZZIFICATION
The fuzzification which determines the inputs and outputs of the three tank level control system.We have defined two inputs (error and feedback) and one output for this application.Based on the error and feedback we estimated the system response [7].
The next step in the fuzzification is selection of appropriate membership functions for both inputs and output.The process of converting a real number in to fuzzy number is called fuzzification.This is done through different fuzzifiers.They are 1.Singleton fuzzifier 2 .Gaussian fuzzifier 3. Trapezoidal or Triangular fuzzifier.
All these fuzzifiers are useful in simplifying the computations involved in the fuzzy system.We observed that compared to singleton fuzzifier the other fuzzifiers can suppress the noise effectively.For fuzzification, in this application, we selected the triangular and trapezoidal membership functions because of their shapes are easy to represent and they have low computation time.Here, we specified the range for input and output membership functions.We have seen that for better control resolution the area of membership functions are narrower whose regions are near zero error.On the other hand, for faster control response the area of membership function is made wider, which are far from zero error regions [8].
The next step in this fuzzification process is the selection of correct labels for each fuzzy set.The linguistic variables for error are error low (el), error medium (em) and error high (eh).The quantized range for error is 0 to 0.4.The linguistic variables for feedback are feedback low (fl), feedback medium (fm) and feedback high (fh).The range of the feedback is 0 to 0.7.Finally the linguistic variables for output are output low (ol), output medium (om) and output high (oh).The output is quantized in the range of 0 to 0.7.

FUZZY RULE BASE
The fuzzy rules represent the level of knowledge and abilities of human who adjusts the system for minimum error and fast response.The objective of the fuzzy controller will depend only on the rule base and this is composed of IF-Clause and THEN-clause.For optimum response of the three tank level system is possible with effective rule base [9].Here, the final modified rule base as shown in the

DEFUZZIFICATION
The process of conversion of fuzzy set in to a real number is called defuzzification.Several methods have been developed to generate real values as outputs.In this application, earlier we employed triangular and trapezoidal fuzzification techniques and with various defuzzification methods [10].
The defuzzification methods are given below The selection of defuzzification method depends on the context of decision for calculating with the fuzzy logic controller.For quantitative decisions like prioritization etc., we prefer the centroid defuzzification method.For qualitative analysis like evaluation of single variable worthiness, then we prefer MOM.Important consideration in defuzzification method is continuity of the output.For example, a fuzzy system consists of effective rule base with overlapping membership functions then if a small change in the input value never create an abrupt change in the output.So, this is the reason for selecting the membership functions overlapped each other.
First, we considered the centroid which is continuous because, assume it consists the overlapping output membership functions.So, it does not jump to a abrupt value as a output if any small change in the input.In case of MOM is discontinuous, then if any small arbitrary change causes abrupt change in the output.Especially, the centroid defuzzification method results a continuous controller characteristics, in between the intervals of input values some of the values are active simultaneously [11].So, with this result achieved by averaging methods of defuzzification.From this application, we can conclude that the assessment of centroid defuzzification results very high computational effort and we can employ to closed loop and decision making applications.In case of bisector, MOM and SOM are having low computational effort and not suitable for closed loop systems.The various defuzzification methods are applied to this application and results are shown in the results section The simulink model of three tank system with conventional PID controller for unit step input is shown in Fig. 3 and its response is shown in Fig. 4.The rise time (t r ), settling time (t s ) and peak overshoot are observed from the graph.The results are tabulated in table 1 for comparison purpose.

IMPLEMENTATION OF FUZZY LOGIC CONTROLLER
The simulink model of three tank system with fuzzy controller shown in Fig. 5.Mamdani type fuzzy logic controller is developed for three tank system shown in Fig. 6, the inputs (error and feedback) and output with triangular membership functions are shown in Fig .7, Fig. 8 and Fig. 9.The unit step response of the three tank system using fuzzy logic controller with Centroid Defuzzification, Triangular Fuzzification and Trapezoidal fuzzification [12] as shown in Fig. 13 and Fig. 14.Time domain specifications are observed from the response graphs and tabulated in table .1.With the use of a FLC, the overshoot is removed and rise-time and settling time are less compared to the conventional PID controller response.In triangular and trapezoidal fuzzification methods, the response of triangular Fuzzification method gives fast response compared to trapezoidal fuzzification method because settling time is less(Ref.table 1) Hence, triangular fuzzification is generally preferred in Fuzzy controllers due to its fast response.
Then three tank system with fuzzy controller (Triangular Fuzzification) with different defuzzification methods such as centroid, bisector, MOM and SOM are simulated [13].The responses in each case is observed as shown in Figures 15 (a

CONCLUSION
In this paper, we developed the three tank system mathematical model and simulated with conventional PID controller and Fuzzy controller using Matlab/Simulink.From the analysis we conclude that three tank system with conventional PID controller gives relatively slow response with peak overshoot for unit step input.In order to achieve an optimum response without overshoot, we simulated the three tank system with fuzzy logic controller with different fuzzification (Triangular & Trapezoidal) and defuzzification (Centroid, Bisector, MOM and SOM) techniques.The comparative analysis based on the simulation for three tank system with fuzzy controller is tabulated which shows the superiority of the fuzzification with triangular membership function with centroid defuzzification.This analysis is useful especially for optimum level control in industries like food processing, petro chemical industries.
Fig 10 which consists of 11 rules.The rules are framed based on the frequent checking of the output response.

Table 1 :
Comparison between conventional PID controller and Fuzzy controller with various Fuzzification and defuzzification methods