You are on page 1of 6

Paper presented at FAE Symposium, European University of Lefke, Nov 2002

DESIGN AND IMPLEMENTATION OF A NEURO - FUZZY CONTROLLER


FOR A FLOW SYSTEM
Rajanbabu.N, Sreenadhan.S , Fahid K.A , Mohandas K P
Department of Instrumentation & Control Faculty of Architecture and Engineering
NSS College of Engineering , European University of Lefke, Lefke
Palakkad , Kerala , India Turkish Republic of North Cyprus

Keywords: Neural networks, fuzzy control, neuro-fuzzy, flow system

ABSTRACT:
Proportional Integral Derivative (PID)
controllers are widely used in process control applications, but
they exhibit poor performance when applied to systems, which
are nonlinear, as controller tuning is difficult due to
insufficient knowledge of the parameters of the system. Fluid
flow system is a typical example. In this pape r, we present the
results of the design and implementation of a fuzzy logic based
neural network controller for a flow system.
Fig.1. Block diagram of flow system

1.INTRODUCTION acquisition system. A PID controller is used to control the


changes in set point and load conditions. We replaced the
Control of flow using conventional PID controllers PID controller with the neuro-fuzzy controller.
results in oscillatory response and increased settling time
owing to the nonlinear nature of the process. Further the III.DESIGN & IMPLEMENTATION
tuning of controller parameters is difficult. Here we present OF NEURO-FUZZY CONTROLLER
a neuro -fuzzy controller, which was designed and tested in
a flow control system. The neuro-fuzzy controller gave a Development of the fuzzy rule base from a general second
better performance compared to the PID controller. The order system response
neuro-fuzzy controller is designed with a fuzzy rule base
derived from the step response of a generalized second
order system[1]. The relational table thus obtained for The Fig. 2a shows the step response of a general second
various combinations of the inputs(error e and change in order system. The response curve is divided into four areas
error ce) with output of the controller is used to train a according to the magnitude of e and sign of ce .
neural network[2]. The neural network, which is trained
using back propagation algorithm and implemented in C
language, has two inputs (e and ce) and an output. The
program provides provision for any number of hidden The indices used for identifying response areas are:
layers with any number of neurons so as to enable the user
to optimize the design for best results [3].
a1 :- e > 0 & ce < 0
II.DESCRIPTION OF THE FLOW a2 :- e < 0 & ce < 0
SYSTEM a3 :- e < 0 & ce > 0
a4 :- e > 0 & ce > 0
The neuro-fuzzy controller discussed in this paper
is implemented in a flow system whose simplified block
diagram is shown in Fig.1. Flow is sensed and transmitted
by a differential pressure transmitter to a PC based data
c2 --- ce << 0
c3 – ce < 0

When the response change from


e<0 to e>0 at e=0:

c4 -- ce > 0
c5 --- ce >> 0
c6 -- ce >>> 0

Consider Fig.2c. The magnitude index for representing the


extent of overshoots and under shoots is defined as follows:
Fig.2.a. Step Response of Second Order System
m1 --- e <<< 0
The resolution of the behaviour of the response can be m2 --- e << 0
m3 -- e < 0
further increased around the set point and extremes as given
in Fig. 2b and Fig.2c . m4 -- e > 0
m5 -- e >> 0
C1 m6 -- e >>> 0
C2
C3 ce is taken as zero at the peaks
C(t)

C4 Linguistic Rules:
C5 Linguistic rules are formed by assigning seven terms for e
C6 and ce vectors NB (Negative Big), NM (Negative
Medium), NS( Negative Small), ZE ( Zero), PS( Positive
Small), PM( Positive Medium) and PB(Positive Big).[4][5]
Fig.2b. Set points and extremes

The three different indices, previously mentioned can be


combined as shown in Table 1.

Membership function

Control actions to be taken for different combinations of e


and ce can be summarized as given in Table 2.

Fig.2.c. Magnitudes of the index


The error(e),change in error (ce) and the controlled
Consider Fig.2b. The cross over index cI for identifying the output(cu) are quantized to 13 levels between –6 and +6
and a trapezoidal membership function (Fig 3) is assigned
slope of the response across the set point is defined as
follows: to each of them.

When the response change from


e>0 to e<0 at e=0:

c1 -- ce <<< 0
Table-1
Combination of three indices

eà NB NM NS ZE PS PM PB
ce

NB c1
NM a2 c2 a1
NS c3
ZE m1 m2 m3 0 m4 m5 m6
PS a3 c4 a4
PM c5
PB c6

Table II. Control Actions for different combinations of e and ce

e NB NM NS ZE PS PM PB
ce
NB NB NB NM NM NS NS ZE
NM NB NM NM NS NS ZE PS
NS NM NM NS NS ZE PS PS
ZE NM NS NS ZE PS PS PM
PS NS NS ZE PS PS PM PM
PM NS ZE PS PS PM PM PB
PB ZE PS PS PM PM PB PB

Table 3
Decision look up table using Centre of Gravity method of defuzzificatiom
ee -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6
ce
-6 -6 -6 -6 -5 -4 -4 -4 -3 -2 -2 -2 -1 0
-5 -6 -5 -5 -4.5 -4 -3.5 -3 -2.5 -2 -1.5 -1 0 1
-4 -6 -5 -4 -4 -4 -3 -2 -2 -2 -1 0 1 2
-3 -5 -4.5 -4 -3.5 -3 -2.5 -2 -1.5 -1 0 1 1.5 2
-2 -4 -4 -4 -3 -2 -2 -2 -1 0 1 2 2 2
-1 -4 -3.5 -3 -2.5 -2 -1.5 -1 0 1 1.5 2 2.5 3
0 -4 -3 -2 -2 -2 -1 0 1 2 2 2 3 4
1 -3 -2.5 -2 -1.5 -1 0 1 1.5 2 2.5 3 3.5 4
2 -2 -2 -2 -1 0 1 2 2 2 3 4 4 4
3 -2 -1.5 -1 0 1 1.5 2 2.5 3 3.5 4 4.5 5
4 -2 -1 0 1 2 2 2 3 4 4 4 5 6
5 -1 -0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6
6 0 0 2 2 2 3 4 4 4 5 6 6 6
D/ I/P CV PROCESS FT A/
A D

µ (x)

O(k SP
NB NM NS ZE PS PM )
e(k)
Fig. 5 shows the block diagram of the implementation.
NEURAL
NETWORK
e(k -1)

The symbols are defined as:


-6 -4 -2 0 2 4
6 y(k)- Output from the plant , flow
( 0 to 1000 lps)
Fig.3. Membership Functions SP - Set point for flow
( 0 to 1000)
Using the centre of gravity method, a decision e(k) - error at k th instant
lookup table is prepared as given in Table 3. ( -500 to 500)
ce(k)- change in error at the k th instant
Development of Neural Controller. u(k)- controller output at the k th instant
o(k)- value corresponding to current
A neural network with two inputs and one output with an opening of the control valve.
option for any number of hidden layers with any number of
neurons is developed as given in Fig. 4. Here the inputs e
Steps in controller implementation:

hidden layers 1.Set the control valve opening to 50%


2.Get the flow value from ADC.
e 3.Calculate e and ce.
4. Input e and ce to neural network and
get u.
u 5. Give the controller output to the plant.

Results
ce The plant was run with the PID controller (for different
controller parameter setting) and with the designed neuro-
fuzzy controller(for different number of hidden layers and
Fig. 4.Architecture of Neural network hidden neurons) and the results are compared. Fig 6 and
Fig.7 show the best results obtained for PID and neuro-
fuzzy controllers respectively.
and ce and the output cu are taken from the table 3.The
network is trained using back propagation algorithm. For
the system considered, we obtained better performance for Fig. 6a shows the response of the system with PID
2 hidden layers with 5 neurons. The number of data points controller for a set point of 500 lps whereas Fig. 6b-gives
required for training was typically 169.It took 568 epoches the response of the system with PID controller at set point
to stabilize the weights with overall square error less than 500 lps subjected to a disturbance.
0.0002.
In Fig.7a is given the response of the system with nuero- man and sybernetics vol 21,No 4, pp 921-928,July-Aug
fuzzy controller for the set point 500 lps and Fig 7 b- the 1991
response of the system with nuero-fuzzy controller for the [2] Siri Weerasooriya and M.A. El-Sharkwai,”Identification
set point 500 lps with disturbance. and control of DC Motor using back propagation”,IEEE
Transactions on Neural Networks March 1992.
IV. CONCLUSIONS: [3] Richard L Rippman’ “An introduction to computing
with neural nets”,IEEE ASSP Magazine,April 1987.
A neuro-fuzzy controller is developed and implemented on [4] Jong Hwan Kim ,Kwang-Choon Kim and Edwin K.P.
a flow control system whose performance is compared with Chong, “Fuzzy Precompensated PID Controllers”,IEEE
a PID controller . The former gave better performance with Transactions on Control Systems Technology Vol 2,No 4,
reduced oscillations and faster settling time. The controller PP 406-410,Dec 1994
performance can still be improved by training the neural [5] M.Mizumoto,”Realization of PID Controls by Fu zzy
network with more number of input and output Controls methods”, Proc. IEEE Int.Conf.on Fuzzy
combinations. systems,March 1992,pp 709-715

V. REFERENCES :

[1] Chang-Ming Liaw and Jin-Biau Wang, “Design and


implimentation of a fuzzy controller for a high performance
induction motor drive”,IEEE Transactions on systems,

You might also like