International Journal of Science, Engineering and Technology Research (IJSETR) s1
Total Page:16
File Type:pdf, Size:1020Kb
International Journal of Science, Engineering and Technology Research (IJSETR) Volume 1, Issue 1, July 2012
DESIGN AND SIMULATION OF FUZZY BASED FLUID MIXING SYSTEM
Zar Chi Soe, Myo Maung Maung
II. SYSTEM OVERVIEW Abstract-This paper describes the simulation of fuzzy logic controller for a fluid mixing system using MATLAB Simulink A. Fluid Mixing Process and MATLAB Fuzzy Logic Toolbox. The aim of the system is In the fluid mixing process, there are two auxiliary tanks to study the response when the desired color is changed and as shown in Figure1.The first auxiliary tank contains colored when the output color and flow change. The simulation design water C , while the second one comprises clear water of control system consists of three inputs and two outputs. 1 Error color, Change of error color and Error Height are inputs C2.Two valves control the input flow q to the mixing tanks of Fuzzy Logic Controller. The outputs of the Fuzzy Logic which involves mixed liquid C0 that controlled the output Controller are total flow q and the proportion qr of colored flows q1and q2 from the auxiliary tanks. [1] water in the total flow. In the fuzzy logic control system, the color control, three linguistic variables and 3×3 matrix rules are used for color control and small rule are used for level control. Triangular membership function and Trapezodial membership function will be applied in this system. The Centroid (MAMDANI) method and center of gravity singleton method for defuzzification will be used in the inference engines. Design system has flexibility to easily adjust the input and output parameters according to the mixture requirement.
Index Terms—Fluid Mixing System, Fuzzy Logic Controller, MATLAB SIMULINK, MATLAB Fuzzy Logic Toolbox.
I. INTRODUCTION Fig .1. A Fluid Mixing Process Fluid Mixing system is very useful for the industrial applications such as petro-chemical industries, papermaking The output flow q0 is taken as a disturbance, has the and water treatment industries. The control of color and coloration c of the resulting mix and is a function of the flow in tanks is a basic problem in the process industries. output pipe cross-section ab, of the liquid level h in the Control system for fluid mixing system is the heart of all mixing tank and of a constant Cd associated to the shape and chemical engineering system. Fuzzy Logic Controller is material of the output pipe. used in this system to achieve the best response. In this In order to make simpler the simulation, it has been control system, Fuzzy Logic Controller, a three input two supposed that: output controllers is used as shown in Figure 4 to The auxiliary tanks always contain sufficient liquid manipulate the total flow q and qr thereby controlling h and for the process to keep on running. Co. The basic idea behindhand fuzzy logic control is to integrate the “expert experience” of the human operator in The time required to get a constant mixture is the design of a controller in controlling a process whose ignored. input-output relationship is defined by a gathering of fuzzy control rules that is involved with linguistic variables. This The time delays associated to the fluid flow in the application of linguistic variables, fuzzy control rules, and pipes are ignored. approximate reasoning offers a means to participate human expert experience in designing the controller. Fuzzy Logic The dynamics of the input valves are ignored. Controller has many parameters such as rules, membership functions location, type of membership function and range. The following equations model the plant, In this FLC Controller, there are 9 rules for color control and 3 rules for height control. dV dh 3 -1 q q0 S. cm s (1) dt dt 3 -1 q q1 q2 cm s (2)
Manuscript received Oct 15, 2011. Taking into concern the dynamics of the output valve: Zar Chi Soe, Department of Electronics Engineering, Mandalay Technological University, (e-mail: [email protected]). Mandalay, q Cd.ab. 2gh 3 -1 Myanmar, 09-254236586 0 cm s (3) Myo Maung Maung, Department of Electronics Engineering, Mandalay Technological University, Mandalay, Myanmar, 09-259067361 (e-mail: Where, [email protected]). g = the gravity acceleration,
1 All Rights Reserved © 2012 IJSETR International Journal of Science, Engineering and Technology Research (IJSETR) Volume 1, Issue 1, July 2012
V= the volume of liquid and FLC S = the area of the liquid surface in the mixing tank. By using (3) in (1): Input Parameters Output Rule Fluid Mixing Variable + Fuzzification Defuzzification - Base Process dh Cd.ab. 2gh q dt S S (4)
The mixing process is modeled by:
dh 1 (q1 q2 q0 ) (5) dt S Fig.2.Block Diagram of FLC with a Fluid Mixing Process
d(c0.S.h) dh dc0 c1.q1 c0.q0 S.(c0. h ) (6) dt dt dt Fuzzification Converting the physical values of the current By combining (5) and (6): process signal, the error signal. Rule-Base dc0 1 .(c1.q1 c0 (q1 q2 )) (7) A group of rules may use several variables both in dt Sh the condition and the conclusion of the rules. Defuzzification Equations (4) and (7) designate the system’s dynamics; h Converting all the fuzzy terms created by the rule and c0 are the variables to be used by the controlling base of the controller to crisp terms (numerical system. values) For an sample, study a simple system where each rule The mixing tank properties and values used are as involves two experiences and one resultant .A fuzzy system specified in Table 1.[2] with two non-interactive inputs x1 and x2(experiences)and a single output y(resultant) are described by a collection n of n linguistic if-then propositions. Table 1. Mixing process variables and values (k) (k) (k) (k) IFx1 is A1 and x2 is A2 THEN y is B ,k=1,2…, n.. (8) Variables Description Values
C0 Colorations(no unit) Variable (k) (k) th C1 Colorations(no unit) 1 Where A1 and A2 are fuzzy sets representing the k III (k) C2 Colorations(no unit) 0 antecedent pairs and B are the fuzzy sets representing the 3 -1 q Input flow(cm s ) Variable .D kth resultant. Created on the MAMDANI implication method q1,q2 Output flows from the mixing Variable ESI tanks(cm3s-1) inference, and for a set of disjunctive rules, the accumulated GN q0 Output flow from the mixing Variable output for the n rules will be given by, tank (cm3s-1) h Liquid level in the mixing tank Variable (k) (k) (k) µB (y)=Max-Min[µA1 (input(i),µA2 (input(j))] hink Initial liquid level in the mixing 5 tank (cm) (9)
hmax Maximum allowable height of 100 water in tank(cm) Since the process needs at its input non-fuzzy values, the ab Output pipe cross-section (cm2) 0.1 controller output fuzzy set must be defuzzified, the result S Area of the liquid surface in the 3600 being a value µB. mixing tank(cm2)
Cd Constant related to the shape and 3 Figure 3 shows the design procedure of Fuzzy Logic material of the output pipe. Controller using MATLAB SIMULINK. In the fluid mixing g Gravity acceleration(cms-2) 980 process under concern, the FLC controller controls both the PROCEDURE output coloration C0 and the liquid height h in the mixing tank at desired set point. The fuzzy controller has three inputs Ec, DEc and Eh and B. Fuzzy Logic Controller(FLC) two outputs q and qr .Fuzzy Logic control approach used as shown in Figure 4. In the FLC controller, there are three main parts such as Fuzzification, Fuzzy Logic Rule Base and Defuzzification. Figure 2 shows the block diagram of FLC with a Fluid Mixing Process.
2 All Rights Reserved © 2012 IJSETR
International Journal of Science, Engineering and Technology Research (IJSETR) Volume 1, Issue 1, July 2012
In design of level controller, fuzzy sets N, Z,P are assigned to Eh as specified in Figure 7 . The first output qr represent by fuzzy sets L,M and H and the second output q represent sets Low, Med, Hi illustrated in Figure 8 and 9 respectively. Where: L,Low = Low M,Med=Medium H,Hi=High
D.Fuzzy Logic Rule Base
Table2 and 3 show the fuzzy logic rule base for color control and level control for a fluid mixing process. There are three linguistic variables and 9 rules are used for color control. In level control fuzzy set N,Z,P are used for Eh, while fuzzy set Low ,Med ,Hi are used for controller output Fig.3. Design Procedure of Fuzzy Logic Controller with q. Since only one input and one output used for level MATLAB SUMULINK control, only three rules are applied .The rules are as shown in Table 2.
Fig.4.FIS Editor of Fuzzy Logic Controller for a fluid Fig.5.Membership function Editor of FLC for Ec mixing process
C.Membership Function
The numerical information needed by the control system in order to attain those goal line is set by the coloration error Ec and the change of error DEc and the height error, it is more suitable to choose as output variable the total flow q and the proportion qr of the colored water in the flow, defined as:
q1 qr (10) q1 q2
In design of color controller, fuzzy sets N, Z,P are assigned to Ec and DEc as specified in Figure 5 and 6. Where:
N: Negative Fig.6. Membership function Editor of FLC for DEc Z : Zero P : Positive
3 All Rights Reserved © 2012 IJSETR International Journal of Science, Engineering and Technology Research (IJSETR) Volume 1, Issue 1, July 2012
Table 2: Rule Base for Color Control
No. INPUTS OUTPUTS Ec DEc qr 1 N N L 2 Z N L 3 P N M 4 N Z L 5 Z Z M 6 P Z H 7 N P M 8 Z P H 9 P P H
Table 3: Rule Base for Level Control
No. INPUT OUTPUT Eh q 1 N Low 2 Z Med 3 P Hi Fig.7. Membership function Editor of FLC for Eh The rules of Table 2 are; 1. IF Eh is N THEN q is Low 2. IF Eh is Z THEN q is Med 3. IF Eh is P THEN q is Hi In the height control, the smaller number of rule-base is used because of the necessity of higher precision is required in color control compared to the height control. The main purpose of height control is to prevent an unwanted overflow in that tank.
Fig.8. Membership function Editor of FLC for qr
Fig.10.Rule Editor of FLC for a Fluid Mixing Process
Fig.9. Membership function Editor of FLC for q Fig.11.Function Block Parameter of FLC
4 All Rights Reserved © 2012 IJSETR
International Journal of Science, Engineering and Technology Research (IJSETR) Volume 1, Issue 1, July 2012
IV. SIMULATION RESULT OF FUZZY LOGIC CONTROLLER
The result of the simulation of fuzzy logic based fluid mixing process as shown in Figure 12.There are three input and two output controller is used to achieve desired coloration and height. The three FLC inputs Ec,DEc and Eh are -0.2,-0.1,10 respectively. The two FLC output qr and q are 0.1723 and 522 respectively. In this result,Fuzzy rule are IF Ec is N AND DEc is N THEN qr is L. In this rule Ec is defined -0.2 (N)and DEc is defined -0.1(N).The FLC output qr is 0.1723(L).Figure 13 shows the checking with MATLAB command box for FLC.The rule viewer of FLC as shown in Figure14 whereas the surface viewer of FLC for simulation results as shown in Figure 15 and Figure 16.
Fig.14.Rule Viewer of FLC for a fluid mixing process
Fig.12.Checking with MATLAB SIMULINK
Fig.15.Surface viewer of FLC for Ec,DEcand qr
Fig.13.Checking with MATLAB Command Box
Fig.16. Surface viewer of FLC for Eh and q
5 All Rights Reserved © 2012 IJSETR International Journal of Science, Engineering and Technology Research (IJSETR) Volume 1, Issue 1, July 2012
IV. CONCLUSION [1] Fuzzy and Nero-Fuzzy control of A Fluid Mixer, A .IRIARTE LANASI, R.TANSCHEITI, M.M.VELLASCO1, 2, MA.PACHCO1, 2 1 Dept. of Electrical Engineering Catholic University of Rio de This design system has elasticity to easily adjust the input Janeiro. and output parameters according to the mixing process. This [2] M.S.Mohamed Ali,S.S.Abdullah and M.A.Kasno. “Fuzzy Logic Controller Optimization Using Metamodeling Technique for a Fluid design is very useful for fluid mixing process because it is a Mixing System”Faculty of Electrical Engineering, Universiti Multivariable nonlinear process. It is widely used in Teknologi Malaysia, 81310 Skudai , Johor ,Malysia industrial applications Fuzzy Logic Controller has been [3] Y.Wang,H Deng and Z,Chen ,“Adaptive Fuzzy Logic Controller successfully useful to a variety of plants since the innovative with Rule-based Changeable Universe Of Discourse for a Nonlinear MIMO System”, Proceedings of the 5th International Conference on works of MANDANI and coworkers. In the case of mixing Intelligent Systems Design and Applications(ISDA’05),2005. process, Fuzzy Logic Controller becomes simpler and the [4] Driankov,D;Hellendorn,H;Rheinfrank,M., “An Introduction to control strategy becomes potentially more reliable. Fuzzy Control ”Springer-Verlag,1933. [5] M.Saleem Khan,Khaled Benkrid, “Design of Liquids Mixing Control Sytem using Fuzzy Time Control Discrete Event Model for Industrial Applications”World Academy of Science,Engineering and Technology 48 2010.
REFERENCES
6 All Rights Reserved © 2012 IJSETR