Application of Fuzzy Clustering for Identification of a Nonlinear Industrial Process

Application of Fuzzy Clustering for Identification of a Nonlinear Industrial Process

Copyright ID IFAC Nonlinear Control Systems Design, Enschede, The Netherlands, 1998 Application of Fuzzy Clustering for Identification of a Nonlinear...

935KB Sizes 67 Downloads 47 Views

Copyright ID IFAC Nonlinear Control Systems Design, Enschede, The Netherlands, 1998

Application of Fuzzy Clustering for Identification of a Nonlinear Industrial Process B.Moshiri···· ,and,S.Chaychi Maleki' *Dept of Electrical and Computer Engineering, University of Tehran, Tehran, Iran. **Intelligent Systems Researches Faculty. Tehran. Iran. e-mai/;!v1oshiri(iIlkarun.ipm.ac.ir

Abstract: This paper presents a fuzzy logic approach to nonlinear system identification which is based on fuzzy clustering technique. As compared with other modeling methods, the proposed approach has the advantage of simplicity. flexibility, and high accuracy. Further, it is easy to use and may be handled by an automatic procedure. A nonlinear process example (i.e: Heat exchanger) is provided to illustrate the performance of the proposed approach. Copyright «) 1998IFAC Keywords: Fuzzy. Clustering. Nonlinear Process, Modeling.

excellent in system description and useful for model based control (Takagi, et al.,1985) . However it is difficult to implement and time consuming due to complexity of algorithm. That is. when the number of input variables is large. the number of the possible structure becomes combinationally large.

1. Introduction. There are many reasons why a model of process may be required. It could. for example. be used to simulate the real process or it could be used to design a controller. However. it is not, in general. an easy task to find a global universal structure. as has been done in the conventional modeling techniques. for a complex process. Even if such a structure is available. the order of a model is often unrealistically high, due to non linearity of the process.

In our approach, we have identified dynamic model of the nonlinear process using only input-output data.This stage of modeling is usually referred to as identification. Then, fuzzy clustering approach is investigated, and the following sections will give the main ideas of proposed technique.

In recent years fuzzy logic based modeling . as complement to conventional modeling techniques. has become an active research topic and found successful application in many areas. However. most present models/controllers have been built based only on operator' s experience and knowledge. When a process is complex. there may not be any e>""}Jert who can control the process well. In this kind of situation. it is not possible to use operator's e>"'Perience and knowledge. Instead. it is desirable to build a mathematical model of the process which enables us to derive the control rules theoretically. Further. if there is no reason to believe that the operator's control is optimal. it may be preferable to develop a model based control strategy as in conventional control theory.

2. Fuzzy model. As the expression of a fuzzy model. we use the following equations: Li :

If Xi is Al i and Xt is At i , • •• ,xm is Ami Theny =

i

(2-1)

n

m

Y

k-----

where

.J=

flAj

i

(x/) (2-2)

j-I n

Among different fuzzy modeling approaches. the fuzzy model suggested by Takagi and Sugeno is

where Li (i=1.2 .. ...n) represents i-th implication and Xj (j = 1.2, ... ,m) an input variable and the

i.

369

II (1) =

output from the i-th fuzzy implication. Aj i is membership grade ,n,m are the number of clusters and variables respectively.

1. Select a radius r.

2) Suppose that when we consider the k th inputoutput pair ( X' , /') . k = 2. 3..... there are M clusters with centers at Zl, ZZ ,... , zM and number of elements in each cluster Ne 1, Ne Z , ••• ,NeM. Compute the distance of X' to these M cluster centers. IX'I. 1 = 1, 2 ..... M and let the smallest distance be I X' - Z k I . that is . the nearest cluster to X' is Zk . Then:

The identification of a fuzzy model using inputoutput daUl is divided in two stages: .\"tructure and parameter identification. The former consists of premise structure and the latter consists of consequent parameter identification. The consequent parameters are the outputs of the fuzzy implications. In our approach nearest neighborhood clustering method. have been used for generation of fuzzy clusters (L.X.Wang. 1994). The advantage of this method is that it provides an automatic way of fonning of the reference fuzzy sets and does not require any initial knowledge about the structure in data set.

z

a) If I X' - Z k I> r. establish X' as new cluster center z!"+l = X', set yM+l (le) = l, d'+l (k) = I, and keep Y (le) = Y (le-I) , B' (le) = Ii (k-I) for I=\. 2..... M.

b) If 1 X' - Z k 1 ~ r do the following: Ne I k = Ne I k + 1 .' . \. Define: At k = ( (Ndk - 1 ) / Ndk »

Given a finite set of objects A={ Xl , X: , •• • ,..'l:m }. where Xj ER. the fuzzy clustering of A into n clusters is a process of assigning grades of membership of each object to every cluster. The recursive steps in the identification of a fuzzy model are as follows (Park. et al..1995) : a- Choice of premise structure b- Premise parameter identification c- Choice of consequent structure d- Consequent parameter identification e- Calculation of membership grades f- Verification of consequent structure e- Verification of premise structure

( 3-1 ) ( 3-2 )

And set:

Zk

=

Atk Zk + (1- Atk ) X'

Zk

=

Atk Zk+(1-Atddiag« X' - Zk)T (X' _Zk»

( 3-3 ) ( 3-4 )

yk

(k) =

B'k

(k) =

Atk yk

(k-I) +

Atk B'k

(l_Atdyk

(le-I) +1-).H

( 3-5 )

( 3-6 )

And keep :

y (le) = Y (le-I) ,B' (le) = B' (le-I) for 1=1. 2..... M with 1,* Ik. Where J; j (j =1 , 2 , ... , M) is the variance vector of the j th cluster.

3. Problem formulation. Suppose that we are given N input-output pairs 1.2 ... ..N and X is input vector. X = ( Xl I, X: I, ••• , Xm I). Our task is to construct a fuzzy logic system g ( X ) which can match all the N pairs to any given accuracy. That is . for any given & >0, we require that Ig pC) -/ I < & for all 1= 1. 2 . .... N.

3) The adaptive fuzzy system at the k th step regarding Gaussian membership function (bell-type) is computed as:

( X ,/ ) . whereL =

M(k)

EY Y

The optimal fuzzy logic system is constructed by equation (2-2) with n=N. This fuzzy logic system uses one rule for one inputoutput data in the training set thus it is no longer a practical system if the number of input-output pairs in the training set is large. For these large -sample problems. various clustering techniques can be used to classify the samples so that each class can be represented by only one rule in the fuzzy logic system. Here we use the simple nearest neighborhood clustering scheme. In this case. the number of classes is unknown and classification by clustering is actually to construct the probability densities from pattern samples. Adaptive sample set construction is one of the approaches commonly used. The whole procedure consists of the following steps (Bow. I 992:Wang. 1994):

(k).J (le)

k-

( 3-7 ) M(k)

E Bj (le)

.J (le)

;-1 m

where .J (le) =

n

Aj i (Xj

( 3-8 )

(le) )

j -1

and

Aj i (Xj

(le) )= exp{-(( Xj (Ie)- t j

where t j and and variances.

O'j i

) / O'j i

/)}

( 3-9 ) are the elements of cluster centers

4) Repeat steps 2 and 3 until all pattern samples have been assigned . There would be some reassignment of X' when again passed through the system. The reason is that the means and variances have been adjusted with each X' assigned to Z . 5 ) After the training is considered to be completed (that means that X' no longer changes the belonging

I) Starting with the first input-output pair. establish a cluster center Zl at X and set Y (1) =/ ,

370

class). we can let the system go freely to do the clustering on a large number of pattern samples. We now make some remarks on this adaptive fuzzy system.

Remark 3.1. Because for each input-output pair a new cluster may be formed . this adaptive fuzzy system performs parameter adaptation as well as stmcture adaptation.

dTw. j / dt =( NF•.JMw)(Tw,j_J -T...,j)(UA/MwC!",)LJTIm,j

( 4-1 )

dTg ,j / dt =( NFg IMg )(Tg,j+J1g.j )+ (UA/MgCpJATIm,j

( 4-2 )

where: ATIm .j

=----------

Remark 3.2. Because the cluster center and variance may be changed . number of clusters in this case .is less than .the situation of clusters with fixed cellters.

( 4-3 )

Ln-----(Tw,j-J -Tg,j)

ATIm. j is the log mean temperature difference between the water and the gas in the j th stage. M,.. and Mg are the total molar holdups in the water and gas sides of the heat exchanger. respectively. Tg . N+J ( =T ) is the inlet gas temperature and T.... o = T... j is the inlet cooling water temperature to the external heat exchanger. TgJ and TwJ denote the temperature of the gas and coolant. respectively. leaving thej th stage of the heat exchanger. For simulation of this exchanger we have used design data of this exchanger for the same gasphase Poly Ethylene plant. The exchanger is supposed to have two stages . inlet gas temperature is about 82 deg C and water inlet temperature is about 27 deg C. the output of this plant is outlet temperature of the gas.

Remark 3.3. There would be some reassignment of X when again passed through the system. due to changing the center and variance of clusters. Remark 3.4. The parameter A. can be viewed as forgetting factor. in such a case that fast adaptation may be required we can replace this parameter by aA. where O<~l. 4. Application to Nonlinear Process Identification.

i-FLuidized bed reactor The reactor design and model is that studied by (McAlluy eT al. . 1992). As shown in Figure . I. the feed to the reactor consists of ethylen.comonomer. hydrogen. inerts. and catalyst. A stream of unreacted gases flows from the top of the reactor and is cooled by passing through a heat exchanger in countercurrent flow with cooling water. Cooling rates in the heat exchanger are adjusted by instantaneously blending cold and warm water streams while maintaining a constant total cooling water flowrate through the heat exchanger. In this paper .the fuzzy modeling of gas loop heat exchanger is considered. to achieve good control law.

Design data for this exchanger are: M,.. = 405 7 kg. Fw = 286.1 11kg/sec , U = 55 .72 cal/sec.m: .deg C . A =734 m2 . (~... =1000 cal/kg.deg.C .Mc =102 .75kg . Fg =133 .366 kg/sec . (~g =340 cal/kg.deg C .and sampling time is considered to be tU sec. Purge

ii-Heat exchanger modeL Cooling water

The external heat exchanger shown in Figure. I is a single-pass shell and tube gas cooler. Gas flows on tube side. counter-current to cooling water on the shell side. An accurate representation of the heat removal system can be obtained using staged heat exchanger model. An N-stage heat exchanger is jigure.2 . The single-pass heat illustrated in exchanger has been divided into a number of ' lumps' of equal heat transfer area (Luyben. 1990). In this example the conventional log-mean temperature difference (LMTD) driving force model is considered.

Warm Comonomer Jnerts Hydrogen

Figure 1 . Gasphase Poly Ethylene Reactor

11= T:fTW.

Stage 1

iii-LMTD Model

TgJ Tg2

The following energy balance equations can be written for each of the N stage of a single-pass counterflow exchanger ,vith a log-mean temperature difference driving force for heat transfer between the shell and tube sides.

Stage 2

Tgj

Stage N

Tgj+J TgN

T

Figure 2 . N stage gasloop cooler. Using the input and output data generated by real model and the procedure suggested by this paper. the construction of fuzz)' model for the given system is simulated. In this simulation the outlet temperature

371

of gas is the system output. and input vector elements are the temperatures of gas and water in different stages and flow of water which is the control output for this system.

Table 1. Comparison of two clustering method with the same initial variance.

The discrete model of this system in general form can be viewed as l+J = f (X'), where )('=(xJ k, x/, ... , k x m ). 300 simulated data points are generated from the plant model. The first 150 data points are obtained by assuming a random input signal uniformly distributed in the intervall4L82) for the gas inlet temperature and 1143.286 ) for the water flow and 120.27 ) for the water inlet temperature. and the last 150 data points are obtained by using a sinusoid input signal for flow of water. We use the first 150 data to train the system. and to construct the fuzzy model. The performance of the fuzzy model is tested using the remaining 150 data point. Figure 3. shows the output of identified model and the actual model. as well as the identification error. It can be seen that the output of identified model attains rather good match with that of the actual model. not only in the modeling term but also in the testing term. It can be expected that the performance of the identified fuzzy model may be further improved if the number of data points used to build the model is increased.

Real

Tem~ratu~

output of gas loop

::( :.:.:

.........

20L - - - - - - . . . J o 100 200 300 fuzzy IdentiflcllfJon

10Q - - - : - - - - , - - - - ,

aD .. .. ...... .. .. .

60\....... .

o

20L------...J o 100 200 300

·2

o

300

error

. . .... :.... ... ; .......

.": . 100

. 200

This approach

4.397

24

0.96

Wang,L.x.' Training o/fuzzy logic systems using nearest neighborhood clustering. Adaptive Fuzzy Systems and Control. 1st edn.PrinticeHall,l994.

.. ............... . ... .

40 ...... :.. ..

096

Takagi.T. M.Sugeno. 'Fuzzy identification of systems and its Application to Modeling and Control. IEEE Transaction on SYstems,Man.and (vbernetics.Vol.SMC-15,No.l,pp 116-132 1985.

6§d' 4

28

Park.M.K..S.Hwan. 'A new identification method for a fuzzy model. IEEE conference on Fuzzy systems. 1995.

20L----~--1

2

14.1646

.,

40~ \_. . . . . .. 200

Fixed parameters clustering

McAuley,K.B. ·AlCHE .1992.41(4).868

6Or\ " .... . 100

Forgetting factor

of

Luyben, W.L'Process Modeling, S'imulation,and Control for .Chemical engineers. 2nd edn. McGraw-Hill. ~ew York. 1990..49

80 ...................... .

itNmtJrtcabon

clusters

Bow. S. 'Pattern recognition and image processing. 'Dekker_1992.

0 _ of fuzzy identifier

o

Number

idc:ntificatJOn error

References.

10Q---:----,----,

80 ... ...... .. ... .

max

300

Figure 3. Output of the identified model and the actual model. 5. Concluding remarks. This paper developes a fuzzy logic based approach to Ilonlinear system modeling, in which fuzzy clustering technique has played an essential role. This approach is simple in practice. but the resulting outcome is interesting. A great advantage of this approach is simultaneous parameter and structure adaptation. Comparison with fixed parameter clustering method shows that utilizing this approach yields to better accuracy with reduced clusters. as shown in following table:Table 1.

372