You are on page 1of 6

2011 Electronics, Robotics and Automotive Mechanics Conference

Fuzzy Logic Control for a Two Tanks Hydraulic System Model

J. Anzurez-Marin L. A. Torres-Salomao I. I. Lázaro-Castillo


j.anzurez@ieee.org latsalomao@ieee.org ilazaro@ieee-sco.org
Facultad de Ingeniería Eléctrica, División de Estudios de Posgrado, Universidad Michoacana
de San Nicolás de Hidalgo. Fco. J. Mújica S/N, Cd Universitaria, Col. Felicitas del Rio, C.P.
58030, Morelia, Mich., México.

Abstract procedures which require restrictive assumptions such


as linearity. FLC provides a formal methodology for
This paper presents a Fuzzy Logic Control design representing, manipulating and implementing human’s
for a two tanks hydraulic system model. The fuzzy logic heuristics knowledge of how to control a system, thus
control algorithm performance was tested for different simplifying the procedure and allowing direct non-
references as well as perturbation scenarios. The fuzzy linear model use for simulation purposes. [2]
logic control design proves its superiority when In this paper we use a non-linear Two Tanks
compared to classical control algorithms because of its Hydraulic System (TTHS) model [3],[4] for simulation
inherent characteristics to deal with non-lineal of a FLC. The FLC was optimized in order to achieve
systems. It bases its functioning in the principle of the best performance possible without chattering
heuristics so design is natural and easy to achieve. effects in the control signal.
Only a basic knowledge of the system dynamics is On section 2 a description of the TTHS model is
needed for a successful design, and no mathematical presented. Section 3 treats with FLC design procedure
model is needed for the design process. Obtained as well as presenting the proposed FLC design for the
results demonstrate the effectiveness of the proposed TTHS model. Section 4 presents results and section 5
method, achieving a swift response and smoothness conclusions about the simulation made.
characteristics near an error tolerance.
2. Two tanks hydraulic system modeling
1. Introduction
Liquid level control and the flux between liquid
In the past two decades Fuzzy Logic Control (FLC) deposits is one of the most common problems in
approach has been used with many successful industrial processes like paper fabrication,
applications. It is an ideal control strategy for systems petrochemical industry and water treatment. [5]
with an unknown or difficult to obtain mathematical The TTHS consists of two interconnected same
model or nonlinear terms with important parameter sized water tanks. At the bottom of each tank a
variations [1]. It is sometimes said that a FLC does not proportional electro-valve controls the output water
need a system model to operate. This is not entirely flux. Tank 1 is connected to tank 2 which is connected
true because in order to implement a real world to a deposit. A water pump delivers a constant input
application, simulations are always required, and flux of water to tank 1. Industrial ultrasound sensors
simulations at least need a simplified model. However, are used to measure water level on both tanks.
the control design procedure focuses on gaining an The TTHS model parameters were obtained from a
intuitive understanding of the system dynamics in prototype constructed in CINVESTAV-Guadalajara
order to design an appropriate set of rules that can be [3]. A diagram of the TTHS is shown in figure 1.
directly loaded into the fuzzy controller opposed to
“traditional” control approaches (e.g., proportional-
integral-derivative (PID), lead-lag, and state feedback
control) where focus is on modeling and the use of
this model. [2]
Even if a relatively accurate model can be produced,
it is often too complex to use in many control design

978-0-7695-4563-9/11 $26.00 © 2011 IEEE 228


DOI 10.1109/CERMA.2011.43
and possibly postprocessing that is needed for the
outputs, and designing each of the four components of
the fuzzy controller: fuzzification, rule-base, inference
mechanism and defuzzification. [2]
The rule-base is a set of rules obtained via the
knowledge of the plant. This component holds the
knowledge loaded to the FLC.
The inference mechanism weights the relevance of
the control rules at current time and decides what the
input to the plant should be.
The fuzzification interface simply modifies the
inputs so that they can be interpreted and compared to
the rules in the rule-base.
The defuzzification interface converts the
conclusions reached by the inference mechanism into
Figure 1. Two tanks hydraulic system diagram
the inputs of the plant.
A FLC is basically an artificial decision maker that
For simulation purposes the TTHS model was
operates in a closed-loop system in real time as shown
implemented in MatLab Simulink®. The implemented in figure 2.
equations were:

!! !!! ! !! !
           ℎ! ! =
!!
!! !!! ! !! !
             ℎ! ! =
!! (1)
!! !! !!! !
!! ! =
!
!! !! !!! !
!! ! =
!

Where !! is the input water flux for tank 1, !! is the


input voltage for proportional valve 1, !! is the input Figure 2. FLC component closed loop
voltage for proportional valve 2, !! and !! are diagram
appropriate lineal constants for proportional valves 1
and 2 respectively, ! is a time constant, !! is the For the proposed FLC scheme the chosen input !(!)
sectional transversal area of the tanks. !! ! and !! ! is the difference between ℎ!! ! and ℎ! ! .
are the opening factors of proportional valves 1 and 2
respectively. The outputs of the system are ℎ! ! and ! ! = ℎ!! ! − ℎ! ! (2)
ℎ! ! , water level on tanks 1 and 2 respectively.
Constants obtained from [3] are: From a simple open loop analysis it was observed
that the system’s dynamics were very slow but because
• !! = !! = 0.03528×10!! the maximum flux that could be drained from tank 1
• ! = 2.6525  ! was relatively small compared to de input flux from the
• !! = 0.16  ! ! water pump, a very quick control response was needed
in order to reach the desired ℎ!! ! value. It is logical
The FLC objective for the TTHS model is to control from a heuristic point of view that to achieve a
ℎ! ! water level by modifying control voltage !! and maximum volume rate increase in tank 1, proportional
leaving !! and !! at constant values. The proposed valve 1 should be completely closed, leaving no input
control scheme can be found in the next section. flux for tank 2. Following a similar reasoning the rule
base to achieve control of water level in tank 1 was
3. Fuzzy logic control design constructed. These rules represented with fuzzy sets
can be found in table 1.
FLC design essentially amounts to choosing the
fuzzy logic controller inputs and outputs, choosing the
preprocessing that is needed for the controller inputs

229
Table 1. Rule – base for the FLC PB. From figure 4, membership functions from left to
right are VS, S, B and VB.
                        Membership functions take part in the fuzzification
process. They determine the degree of pertinence to
    "Valve  1  voltaje"    !!       which the input variables belong to each of the
        appropriate fuzzy sets.
        NB     VB         For the inference mechanism implication and
 
    NS   B       aggregation methods were defined as minimum and
"error"    
    OK   B       maximum respectively. Implication relates the weight
! !    
    PS   S       of each input fuzzy set. Aggregation is the process by
 
    PB   VS       which the fuzzy sets that represent the outputs of each
 
                        rule are combined into a single fuzzy set. [6]
The chosen defuzzification process combines each
NB stands for negative big, NS for negative small, of the outputs of the aggregation process with a
PS for positive small, PB for positive big. VB stands centroid operation. The centroid operation returns the
for very big, B for big, S for small and VS for very center of the area under de curve of the aggregated
small. OK represents an acceptable error tolerance. weights. [6]
The membership functions implemented can be Minimum to maximum voltages applied to
found in figure 3 and 4, input error ! ! and output proportional valve 1 were 0 Volts to 30 Volts. A
control voltage 1 !! respectively. saturation function at these levels was placed after the
FLC. The closed loop diagram of the implemented
FLC system can be observed in figure 5.

Figure 5. Closed loop diagram of the FLC


system

4. Results
Al results were obtained via simulation in MatLab
Figure 3. Input error FLC membership Simulink®. The TTHS model was implemented in its
functions differential equation form. As said previously the
controlled input to the system was proportional valve
voltage 1. Proportional valve voltage 2 was left
constant at a 30 V value. Input flux to tank 1, !! , was
left constant at a 0.0001 m3 value, leaving liquid level
of tank 1, ℎ! ! , the controlled output, with an initial
condition of 0.3 m. Simulation was performed for a 2.5
hours time, 9000 seconds.
A perturbation to the !! TTHS was also simulated
by modeling an abrupt times 5 input flux increase in
order to observe the control response. The simulated
Figure 4. Output voltage 1 FLC membership
input !! signal at t=5500 s with a 510 s duration can be
functions observed in figure 6. x axis is time in seconds and y
axis is water input flux in cubic meters.
From figure 3 membership functions related to each Error signal input to the FLC was obtained from
fuzzy set from left to right are NB, NS, OK, PS and equation (2). Sinusoidal form, square form and
constant value ℎ!! ! signals were tested in

230
simulation. These signals are presented in figure 7(a),
7(b) and 7(c) respectively. x axis is time in seconds
and y axis is desired liquid level in meters.
Figure 8(a) presents the FLC control performance
for the sinusoidal ℎ!! ! , figure 8(b) the square ℎ!! !
and figure 8(c) the constant ℎ!! ! signal. All figures
show below them a zoom where the disturbance is
located. The dotted line represents the desired value in
accordance to figures 7(a, b and c). The continuous line
denotes the achieved control response. x axis is time in
seconds and y axis is liquid level in meters.

(a)

Figure 6. Simulated input water flux

(a)
(b)

(b)

(c)

Figure 7. Simulated desired signals for the


error input to the FLC. (a) Sinusoidal, (b)
Square and (c) Constant
(c)

Figure 8. Simulated control FLC responses.


(a) Sinusoidal, (b) Square and (c) Constant

From figure 8 FLC demonstrates adaptability to


different operating modes. In all three cases control

231
action follows the desired liquid level value. Even
when the disturbance shown in figure 6 occurs, the
FLC design shows robustness which can be
appreciated in the zooms located below each control
response. These zooms show no important undesirable
behaviors that could affect the accepted error tolerance.
Figures 9(a), 9(b), and 9(c) present !! output FLC
signals for the sinusoidal, square and constant ℎ!! !
signals respectively.

(a)

(a)

(b)

(b)

(c)

Figure 9. FLC !! control outputs. (a)


Sinusoidal, (b) Square and (c) Constant

All control signals in figure 9 demonstrate a smooth


control action without any important chattering effects,
which is an important achievement because of the
boolean type response expected due to quick control
action.
Desired square form liquid level response presented (c)
in figure 7(b) would be the most demanding signal in
terms of control action. Figure 9(b) shows smooth
response except in the places where abrupt changes are Figure 10. FLC ! ! control inputs. (a)
required as well as the simulated disturbance.
Sinusoidal, (b) Square and (c) Constant
Figure 10(a), 10(b) and 10(c) present the input FLC
error signal for the sinusoidal, square and constant
From figure 10(a) it can be observed that an error of
desired signals respectively.
±0.01 m is maintained even when the disturbance
occurs. Figures 10(b) and 10(c) show slightly bigger
errors at some points. However, an error of ±0.01 m is
maintained most of the time.

232
5. Conclusions
A fuzzy logic control algorithm for a two tanks
hydraulic system was successfully tested in simulation
to achieve optimum performance.
The system performance for different desired
signals was tested to validate the adaptability of the
FLC to diverse operating states.
An input disturbance of a 5 times increase to the
TTHS’s input water flux was simulated to show the
FLC’s adaptability to this parameter variation.
Satisfactory performance of the FLC was
demonstrated achieving a rapid response to abrupt
desired liquid level signals with smoothness
characteristics near the desired value. Smooth voltage
response to proportional valve 1 was achieved without
any important chattering effects that could damage the
valve.
From the obtained results it should be assumed that
FLC is a good design approach to solve the control
requirements of non-lineal hydraulic plants and similar
systems with an intuitive heuristic analysis instead of a
mathematically complex one.

6. References
[1] S.K. Hong, and Y. Nam, “An LMI-Based Fuzzy Sate
Feedback Control with Multi-Objectives”, KSME
International Journal, Springer, Korea, 2003, pp. 105-113.

[2] Passino, K.M., and S. Yurkovich, Fuzzy Control,


Addison-Wesley, USA, 1998.

[3] Hernández, C.A., Control de un Sistema de Dos Tanques


para Almacenamiento de Líquidos, master in science thesis,
CINVESTAV, Guadalajara unit, Mexico, 2001.

[4] Anzurez-Marín, J., Diagnóstico de fallas en sistemas no


lineales usando lógica difusa y observadores con modos
deslizantes, doctor in science electrical engineering specialty
thesis, CINVESTAV, Guadalajara unit, Mexico, 2007.

[5] Lázaro-Castillo, I.I., Ingeniería de Sistemas de Control


Continuo, UMSNH, COECyT Michoacán, FIE, Mexico,
2008.

[6] Z. Chen, S.A. Gómez, and M. McCormick, “A Fuzzy


Logic Controlled Power Electronic System for Variable
Speed Wind Energy Conversion Systems”, Proceedings on
Power Electronics and Variable Speed Drivers, IEE, UK,
2000, pp. 114-119.

233

You might also like