^{1}

^{1}

^{1}

^{1}

^{1}

^{1}

^{1}

In industrial process control, fluid level control is one of the most basic aspects. Many control methods such as on-off, linear and PID (Proportional Integral Derivative) were developed time by time and used for precise controlling of fluid level. Due to flaws of PID controller in non-linear type processes such as inertial lag, time delay and time varying etc., there is a need of alternative design methodology that can be applied in both linear and non-linear systems and it can be execute with fuzzy concept. By using fuzzy logic, designer can realize lower development cost, superior feature and better end product. In this paper, level of fluid in tank is control by using fuzzy logic concept. For this purpose, a simulation system of fuzzy logic controller for fluid level control is designed using simulation packages of MATLAB software such as Fuzzy
*Logic Toolbox* and
*Simulink*. The designed fuzzy logic controller first takes information about inflow and outflow of fluid in tank than maintain the level of fluid in tank by controlling its output valve. In this paper, a controller is designed on five rules using two-input and one-output parameters. At the end, simulation results of fuzzy logic based controller are compared with classical PID controller and it shows that fuzzy logic controller has better stability, fast response and small overshoot.

Fluid level control system is a very complex system. It has many applications like chemical process, boilers, nuclear power plants etc. Emergency shut downs in the power plant is caused by poor control of the steam generator fluid level, which greatly affects the plant efficiency, consumption of time, maintenance of system and quality of material [

The automatic controlling of fluid level is an old technique but the technology adopted to do so is continuously advancing day by day [

In 1965, Lotfi Zadeh, a computer scientist at the University of California [

・ Input/output membership functions;

・ Rules;

・ Decision making (Interpretation of rules);

・ Defuzzification.

Fuzzy logic is perfect for such applications that resemble human decision making with an aptitude to generate particular solutions from definite or approximate data. Fuzzy logic does not require exact, detailed or noise free inputs. Despite a wide range of input variations, output control is a smooth function. Because of the rule based operation, any sound number of inputs can be processed and several outputs generated [

In fuzzy set theory based on fuzzy logic, a specific object has a degree of membership in a given set that lies in the range between 0 (completely not in the set) and 1 (completely in the set).

A linguistic variable has a label and meaning. Label may be a symbol or sentence in a language and meaning

means fuzzy subset of a universe of discourse [

A membership function (MF) is a curve that defines how the value of a fuzzy variable in a certain region is mapped to a membership value (or degree of membership) between 0 and 1 [

An MF can have different shapes. The simplest and most commonly used MF is the triangular-type, trapezoidal, Gaussian distribution curve, two-sided Gaussian, generalized bell, sigmoidal-type Polynomial-based curves e.g. Polynomial-Z and its mirror image, Polynomial-S and one that is zero at both ends but has a rise in the middle, Polynomial-Pi [

There are several methods to implement fuzzy logic controller such as Mamdani method, Sugeno method and Lusing Larson method [

First input is defined as E (Error). It has three membership functions, shown in

The second input is CE (Change in Error) has two membership functions, shown in ^{st} membership function is “negative” which has range from −0.1 to 0. 2^{nd} membership function is “positive” range from 0 to 0.1.

The output is named as OV (Output Valve). It has five membership functions, shown in ^{st} membership function is “close fast” range from −1 to −0.8. 2^{nd} membership function is “close slowly” range from −0.6 to −0.4 3^{rd} membership function is “no change” range from −0.1 to 0.1. 4^{th} membership function is “open slowly” range from 0.4 to 0.6. 5^{th} membership functions; open fast ranges from 0.8 to 1.

The design of fuzzy logic controller is based on the rules that are defined in the MATLAB/fuzzy rule editor, shown in

If there is no difference between inflow and outflow of fluid in tank then error is ok and there will no change in the position of the valve.

IF error (E) is OK and change in error (CE) is zero (ZE) then output valve (OV) is negative small (NC).

If the difference between outflow and inflow of fluid in tank is positive i.e. the water is flowing out more than it is being entered in the tank so the valve will be opened fast to balance the inflow and outflow.

IF E is positive (P) and CE is ZE then OV is open fast (OF).

If the difference between outflow and inflow of fluid in tank is negative i.e. more water is being filled in the tank as compared to its outflow so the valve will be closed fast to reduce the inflow and balance the difference.

IF E is negative (N) and CE is ZE then OV is close fast (CF).

If there is no difference between outflow and inflow of fluid in tank but slightly difference between entering and leaving of water, then valve will be closed slowly to balance the flow.

IF E is OK and CE is P then OV is close slow (CS).

If error between outflow and inflow of fluid in tank is fine but water is leaving the tank a little more than that its inflow, the valve will be opened slowly to balance the flow of water.

IF E is OK AND CE is N then OV is open slow (OS).

The above rules can also be written in tabular form shown in

The rule viewer shows how the shape of certain membership functions influences the overall result, shown in

Let us consider two points from rule viewer, 0.3486 on 1^{st} input and 0.7545 on 2^{nd} input.

In 1^{st} rule, index of “e(t)” is at 0.38

Error | Change in error | Output Valve |
---|---|---|

ZE | OK | NC |

ZE | P | OF |

ZE | N | CF |

P | OK | CS |

N | OK | OS |

In 2^{nd} rule, index of “e(t)” is at 0.38

In 3^{rd} rule, index of “e(t)” is at 0.

In 4^{th} rule, index of “e(t)” is at 0.38 and that of “change” is 1.

In 5^{th} rule, index of “e(t)” is at 0.39 and that of “change” is 0.

Integrating all DOFs using Mamdani method:

Fuzzy Inference System is knowledge and a rule based system. By assigning appropriate membership functions, the fuzzifier converts inputs, outputs and physical constraints into fuzzy variables. Fuzzy rules are mounted accordingly in the inference engine and fuzzy inference system of fluid level controller is implemented in the fuzzy logic controller and simulated to get the response of the controller to the given parameters. A MATLAB Simulink block diagram for fuzzy logic based fluid level controller is shown in

First of all, a same input is applied to fuzzy and PID controller. The rules are implemented in fuzzy controller and the controller performs the operation on valve according to the input condition. The valve will be opened or closed depending upon the level of fluid present in tank. An overflow flag will be raised if the fluid reached to the desire level. The output of fluid tank is sent back to input, the rate of change of error between outflow and inflow is fed to the mux with the input and the above process is repeated again. The response of fuzzy controller is then observed through fuzzy oscilloscope. Similarly PID controller controls the operation of fluid tank valve and its response is observed via PID oscilloscope.

It is clear from

The observed parameters of Fuzzy and PID controllers from the graph are:

・ The output curve of FLC system stabilizes in 4 sec only, whether that of PID stabilizes in 15 sec.

・ The peak value of PID is 1.17 and that of fuzzy is 0.95.

・ The rise times of fuzzy and PID are 4.4 sec and 3.1 sec respectively.

In this paper, fuzzy logic controller is simulated on a level control problem with promising results. There is significant improvement in performance of controller over widely used PID in terms of oscillations, overshoot and settling time, as shown in

The proposed fuzzy logic controller provides smooth operation in transient period. The output of PID controller stabilizes in 15 seconds while that of fuzzy logic controller in 4 seconds only. Hence, it is concluded that the conventional PID controller could not be used for the control of non-linear processes like level control. The fuzzy output can be made more accurate by fine tuning i.e. by adjusting parameters and range.

Hina Shahid,Sadia Murawwat,Intesar Ahmed,Sana Naseer,Rukhsar Fiaz,Ayesha Afzaal,Shumaila Rafiq, (2016) Design of a Fuzzy Logic Based Controller for Fluid Level Application. World Journal of Engineering and Technology,04,469-476. doi: 10.4236/wjet.2016.43047