Decision tree and first-principles model-based approach for reactor runaway analysis and forecasting

10
Decision tree and first-principles model-based approach for reactor runaway analysis and forecasting Tamas Varga , Ferenc Szeifert, Janos Abonyi Department of Process Engineering, University of Pannonia, P.O. Box 158, H-8201 Veszprem, Hungary article info Article history: Received 26 July 2007 Received in revised form 31 October 2008 Accepted 6 November 2008 Available online 3 January 2009 Keywords: Operating regions Decision tree Operating strategies Reactor runaway Heterocatalytic tube reactor abstract Decision trees (DTs) are effective in extracting linguistically interpretable models from data. This paper shows that DTs can also be used to extract information from process models, e.g. they can be used to represent homogenous operating regions of complex process. To illustrate the usefulness of this novel approach a detailed case study is shown where DTs are used for forecasting the development of runaway in an industrial, fixed bed, tube reactor. Based on first-principles knowledge and historical process data the steady-state simulator of the tube reactor has been identified and validated. The runaway criterion based on Ljapunov’s indirect stability analysis has been applied to generate a data base used for DT induction. Finally, the logical rules extracted from the DTs are used in an operator support system (OSS), since they are proven to be useful to describe the safe operating regions. A simulation study based on the dynamical model of the process is also presented. The results confirm that by the synergistic combination of a DT based on expert system and the dynamic simulator a powerful tool for runaway forecasting and analysis is achieved and it can be used to work safe operating strategies out. & 2008 Elsevier Ltd. All rights reserved. 1. Introduction Usually information for solving engineering problems, like identification, optimization, process monitoring can be extracted from different sources: mechanistic knowledge obtained from first-principles (physics and chemistry), empirical or expert knowledge, expressed as linguistic rules, measurement data, obtained during normal operation or from an experimental process. Different modeling paradigms should be used for an efficient utilization of these different sources of information (Kavli and Lines, 1996; Dourado, 2000, 2008). According to the type of information that is available, three basic levels of model synthesis approaches can be defined. Integral–differential paradigm or first-principle modeling: A complete mechanistic model is constructed from a priori knowledge and physical insight (Cott et al., 1989). Here, the system observations are used only for model validation. Data paradigm or empirical modeling: No physical (a priori) knowledge is used to construct the empirical model (Ljung, 1987). Linguistic paradigm: E.g. fuzzy logic-based heuristic and other qualitative modeling. Linguistically interpretable rule-based model is formed based on the available expert knowledge (Klir and Yuan, 1995). This means, if we have good mechanistic knowledge about the process, this can be transformed into integral–differential para- digm described by analytical (differential) equations. If we have information like human experience has described by linguistic rules and variables, the mechanistic modeling approach is useless and the application of rule-based approaches, like fuzzy logic, is more appropriate (Mamdani et al., 1992; Mendel, 1995). Finally, there may be some situations, where the most valuable informa- tion comes from input–output data collected during the opera- tion. In this case, the application of data paradigms is the best choice. These data models are especially valuable, when an accurate model of the process dynamics is needed. Therefore, the nonlinear black box modeling is a challenging and promising research field (Bhat and McAvoy, 1990; Bhat et al., 1990; Hernandez and Arkun, 1993; Ydstie, 1990; Sjo ¨berg et al., 1995). Unfortunately, the real situation is not clearly one of the previously mentioned approaches. This means the modeler has only a small amount and different type of information to build the model. Therefore, in order to be able to employ as much knowledge as possible, there is a need for the grey box (Tulleken, ARTICLE IN PRESS Contents lists available at ScienceDirect journal homepage: www.elsevier.com/locate/engappai Engineering Applications of Artificial Intelligence 0952-1976/$ - see front matter & 2008 Elsevier Ltd. All rights reserved. doi:10.1016/j.engappai.2008.11.001 Corresponding author. Tel.: +36 88 424 447. E-mail addresses: [email protected] (T. Varga), [email protected] (F. Szeifert), [email protected] (J. Abonyi). URL: http://www.fmt.uni-pannon.hu/softcomp Engineering Applications of Artificial Intelligence 22 (2009) 569–578

Transcript of Decision tree and first-principles model-based approach for reactor runaway analysis and forecasting

Page 1: Decision tree and first-principles model-based approach for reactor runaway analysis and forecasting

ARTICLE IN PRESS

Engineering Applications of Artificial Intelligence 22 (2009) 569–578

Contents lists available at ScienceDirect

Engineering Applications of Artificial Intelligence

0952-19

doi:10.1

� Corr

E-m

szeifert

URL

journal homepage: www.elsevier.com/locate/engappai

Decision tree and first-principles model-based approach for reactor runawayanalysis and forecasting

Tamas Varga �, Ferenc Szeifert, Janos Abonyi

Department of Process Engineering, University of Pannonia, P.O. Box 158, H-8201 Veszprem, Hungary

a r t i c l e i n f o

Article history:

Received 26 July 2007

Received in revised form

31 October 2008

Accepted 6 November 2008Available online 3 January 2009

Keywords:

Operating regions

Decision tree

Operating strategies

Reactor runaway

Heterocatalytic tube reactor

76/$ - see front matter & 2008 Elsevier Ltd. A

016/j.engappai.2008.11.001

esponding author. Tel.: +36 88 424 447.

ail addresses: [email protected] (T. V

@fmt.uni-pannon.hu (F. Szeifert), abonyij@fm

: http://www.fmt.uni-pannon.hu/softcomp

a b s t r a c t

Decision trees (DTs) are effective in extracting linguistically interpretable models from data. This paper

shows that DTs can also be used to extract information from process models, e.g. they can be used to

represent homogenous operating regions of complex process. To illustrate the usefulness of this novel

approach a detailed case study is shown where DTs are used for forecasting the development of

runaway in an industrial, fixed bed, tube reactor. Based on first-principles knowledge and historical

process data the steady-state simulator of the tube reactor has been identified and validated. The

runaway criterion based on Ljapunov’s indirect stability analysis has been applied to generate a data

base used for DT induction. Finally, the logical rules extracted from the DTs are used in an operator

support system (OSS), since they are proven to be useful to describe the safe operating regions.

A simulation study based on the dynamical model of the process is also presented. The results confirm

that by the synergistic combination of a DT based on expert system and the dynamic simulator a

powerful tool for runaway forecasting and analysis is achieved and it can be used to work safe operating

strategies out.

& 2008 Elsevier Ltd. All rights reserved.

1. Introduction

Usually information for solving engineering problems, likeidentification, optimization, process monitoring can be extractedfrom different sources:

mechanistic knowledge obtained from first-principles (physicsand chemistry), � empirical or expert knowledge, expressed as linguistic rules, � measurement data, obtained during normal operation or from

an experimental process.

Different modeling paradigms should be used for an efficientutilization of these different sources of information (Kavli andLines, 1996; Dourado, 2000, 2008). According to the type ofinformation that is available, three basic levels of model synthesisapproaches can be defined.

Integral–differential paradigm or first-principle modeling: Acomplete mechanistic model is constructed from a priori

knowledge and physical insight (Cott et al., 1989). Here, thesystem observations are used only for model validation.

ll rights reserved.

arga),

t.uni-pannon.hu (J. Abonyi).

Data paradigm or empirical modeling: No physical (a priori)knowledge is used to construct the empirical model (Ljung, 1987). � Linguistic paradigm: E.g. fuzzy logic-based heuristic and other

qualitative modeling. Linguistically interpretable rule-basedmodel is formed based on the available expert knowledge (Klirand Yuan, 1995).

This means, if we have good mechanistic knowledge about theprocess, this can be transformed into integral–differential para-digm described by analytical (differential) equations. If we haveinformation like human experience has described by linguisticrules and variables, the mechanistic modeling approach is uselessand the application of rule-based approaches, like fuzzy logic, ismore appropriate (Mamdani et al., 1992; Mendel, 1995). Finally,there may be some situations, where the most valuable informa-tion comes from input–output data collected during the opera-tion. In this case, the application of data paradigms is the bestchoice. These data models are especially valuable, when anaccurate model of the process dynamics is needed. Therefore,the nonlinear black box modeling is a challenging and promisingresearch field (Bhat and McAvoy, 1990; Bhat et al., 1990;Hernandez and Arkun, 1993; Ydstie, 1990; Sjoberg et al., 1995).

Unfortunately, the real situation is not clearly one of thepreviously mentioned approaches. This means the modeler hasonly a small amount and different type of information to build themodel. Therefore, in order to be able to employ as muchknowledge as possible, there is a need for the grey box (Tulleken,

Page 2: Decision tree and first-principles model-based approach for reactor runaway analysis and forecasting

ARTICLE IN PRESS

Nomenclature

A cross section of tubes (m2)A� transport area (m2)B� volumetric velocity (m3 s�1)c�i concentration, where i ¼ fA;B;C;X componentsg

(m3 s�1)c�p heat capacity of the phase (J mol�1 K�1)dp mean diameter of catalyst particles (m)E�A activation energy (J mol�1)jGSM;i mass transfer flux density, where i ¼ fA;B;Cg

(mol s�1 m�2)j�Q heat transfer flux density (J s�1 m�2)k� reaction and adsorption rate coefficient ¼ k0 exp

ð�EA=R � TGÞ (m3

cat s�1 mol�1)k0� pre-exponential factor (m3

cat s�1 mol�1)Kad;i adsorption equilibrium constants of components

(m3cat mol�1)

Kreac equilibrium constant of the reaction ( )L length of reactor (m)p� pressure (Pa)r� reaction rate (mol s�1 m�3)R gas constant ¼ 8:314 (J mol�1 K�1)Re� Reynolds number ¼ BG

� rG � d=A � eG � mG ( )t time (s)

T� temperature (K)x position in the reactor (m)V� volume (m3)Greek letters

b� mass transfer coefficient (m mol�1 s�1)DH� heat of mass transport processes and the reaction

(J mol�1)e� void fraction of gas phase in the catalyst bed

(m3gas m�3

cat:bed)m� dynamic viscosity (Pa s)ni stoichiometric coefficient, where i ¼ fA;B;Cg ( )r� density (kg m�3)Superscripts

G gas phaseGS transport from the gas to the solid phaseSG transport from the solid to the gas phaseGW transport from the gas to cooling mediaS solid phaseW cooling mediaSubscripts

ad adsorptioncorr correctionreacd reaction in the detailed processreacs reaction in the simplified process

T. Varga et al. / Engineering Applications of Artificial Intelligence 22 (2009) 569–578570

1993; Bohlin, 1994) and the semi-mechanistic (Thompson andKramer, 1994) modeling environments, where different modelingparadigms can be used simultaneously to attack different sides ofthe problem.

The second and sometimes more important problem is that theinformation is needed in a different from that it is available. E.g. atthe development of an operator support system (OSS) theinformation in rule-based form is desired, although most of theinformation of building such system is available in the form offirst-principles models and historical process data. The question ishow to extract information from process models and in which waythe first principles can be transformed into a rule base. The aim ofthis paper is to present a novel approach that can handle suchproblems. The key idea is the application decision tree (DT)induction algorithms to extract rules from process models.

The development of this approach has been motivated by thefact that data-mining techniques, such as DTs, are powerful toolsfor transforming process data into easily interpretable rule-bases.DT techniques are applicable in monitoring systems and faultdiagnosis (Assaf and Dugan, 2008; Wang, 2008; Sun et al., 2006).In the classical approach of data mining the DT is directlyinducted from the collected process data. In the proposed schemehistorical process data are applied only to validate and fine-tune aprocess model which is used to generate the necessary learningsamples needed for the induction of the DT.

To illustrate the usefulness of this novel approach a detailedcase study is shown where DTs are used for forecasting thedevelopment of runaway in an industrial, fixed bed, tube reactor.Based on first-principles knowledge and historical process datathe steady-state simulator of the tube reactor has been identifiedand validated. The runaway criterion based on Ljapunov’s indirectstability analysis has been applied to generate a data base used forDT induction. Finally, the logical rules extracted from the DTs areused in an OSS, since they are proven to be useful to describe thesafe operating regions.

The development of the case study has been motivated by anindustrial problem. Runaway means a sudden and considerable

change in the process variables, hence it is a serious problem inmany chemical industrial technologies where exothermic reac-tion(s) takes place, like oxidation processes and some polymer-ization technologies (van Woezik and Westerterp, 2001; Albertand Luft, 1998; Kao and Hu, 2002). In case of a highly exothermicreaction the thermal runaway occurs when the reaction rateexcesses due to a temperature increase, causing a furthertemperature increase and hence a further increase in the reactionrate. It has contributed to the most serious industrial chemicalaccidents most notably, the 1984 explosion of a Union Carbideplant in Bhopal, India, that produced methyl isocyanate and thedisaster in Seveso, Italy, in 1976 which raised and stiffenedindustrial safety regulations. Thermal runaway is also a concern inhydrocracking, an oil refinery processes. Detection of runaway hastwo main important aspects. On one hand, the runaway forecasthas a safety aspect, since it is important for avoiding the damageof constructional material or in the worst case the explosion of thereactor. On the other hand, it has a technology aspect, since theforecast of the runaway can be used for avoiding the developmentof hot spots in catalytic bed, which speed up the ageing of catalyst,or for preventing the production of byproducts in huge mass likeat the synthesis of 2-octanone from 2-octanol (van Woezik andWesterterp, 2000, 2001; Eizenberg et al., 2006). A control systemthat is able to modify accordingly the operating conditions of thereactor in time decreases the costs and increases the operationsafety. The first step to develop such control system is thegeneration of a reliable runaway criterion. Runaway criteria can bebased on historical process data or process model (Barkelew,1959; Adler and Enig, 1964; Lacey, 1983). The application of data-based criterion requires measured data. This means there has tobe restrictions on the forecasting the development of runaway.Other problem with data-based methods is found in measurementconditions, e.g. measurement noise can result in false forecast.Model-based criteria require parameter sensitivity and/or stabilityanalysis, so for the application of these kinds of criteria it isnecessary to have an exact process model with correct modelparameters.

Page 3: Decision tree and first-principles model-based approach for reactor runaway analysis and forecasting

ARTICLE IN PRESS

T. Varga et al. / Engineering Applications of Artificial Intelligence 22 (2009) 569–578 571

This work presents a novel approach of runaway criteria basedon data-mining tools (Section 3). To generate the necessarylearning samples for inducting the DT the steady-state model isworked out (Section 3.1). In order to solute the dynamic model,the kinetic constants of material transfer processes and reactionswhich take place in solid phase are also needed. The identificationof these parameters is based on process data collected during theoperation of the technology. Ljapunov’s indirect method is appliedto study the stability of the system under a set of pre-definedoperating conditions (Section 3.2). The obtained tool is suitablefor forecasting reactor runaway based on measured feed para-meters (Section 3.3). In addition to development of steady-statemodel the paper also proposes a detailed dynamic model tosupport further investigations of runaway (Section 3.4). Theresults will illustrate that the developed dynamic simulator andrunaway criteria are applicable for the sophisticated analysis ofthe runaway behavior of the studied industrial reactor (Section 4).

2. DT-based characterization of operating regions of complexprocesses

2.1. Operating regime-based models

Complex nonlinear processes have different dynamical beha-viors around different operating regions. Every process model orcontroller, even models applied in on-line diagnostic systems, hasa limited range of validity. This range may be restricted by severalfactors such as validity of linearization, modeling assumptions orstability properties. A model that is not able to describe the stateof system at every operating condition is called local model andthey are valid only in each operating regime, as opposed to aglobal model that is valid in the full range of operation. Of course,the final goal is to create a global model in every modeling task.The fundamental consideration is that a unique local model orcontroller is applied in each unique operating regime (Johansenand Foss, 1997; Rodriguez et al., 2003). These local models arethen combined in such a way to yield a global model. Hence, themodel development within this framework typically consists ofthe following steps:

decompose full operation range of the system into operatingregimes; � select local model/controller structures within each operating

regime;

y1< 0.5

y2< 0.51

1

2 1

y2< 0.80.

1.

0.0.0.0.

0.0.0.

0.

y2

Fig. 1. (a) Example of a binary decision tree;

the local model or controller structures are usually parameter-ized by certain variables that must be determined, e.g. usingnonlinear parameter identification.

A lot of possible methods exist to determine the boundaries ofoperating regimes based on the expertise of the operators orapplying different kinds of machine learning algorithms (Gugaliyaet al., 2005).

Learning from examples, i.e. concepts acquisition, is oneof the most important branches of machine learning that hasbeen generally regarded as the bottle-neck of expert systemdevelopment. For this purpose a wide range of models andidentification algorithms have been developed. Among thesea hierarchial model is applied, in this paper, because of itscapability of a compact and interpretable representation ofcomplex knowledge.

DTs are such hierarchial models, so they are widely used inpattern recognition, machine learning and data-mining applica-tions thanks to the interpretable representation of the detectedinformation. A binary DT consists of two types of nodes:(i) internal nodes having two children and (ii) terminal nodeswithout children. Each internal node is associated with a decisionfunction to indicate which node to visit next. Each terminal noderepresents the output of a given input that leads to this node,i.e. in classification problems each terminal node contains thelabel of the predicted class (Abonyi, 2005; Abonyi et al., 2003; Hanand Kimber, 2000) (see Fig. 1a).

2.2. Construction and interpretation of DTs

The DT construction algorithms generate DTs from a set D ofcases. These algorithms partition the D data set into subsetsD1;D2; . . . ;DM by a set of tests K with mutual outcomesK1;K2; . . . ;KM , where Di contains those cases that have outcomeKi. The key idea of this paper is that this kind of partitioning canalso be used to determine the operating regimes of complexprocess systems.

The utilized C4.5 (Quinlan, 1996) is such a binary DT generatingalgorithm and is applied in the following. For numeric(continuous) attributes the attribute test is written as yjot.The t-thresholds are selected based on a splitting criterion.The default splitting criterion used by C4.5 is the gain ratio, as aninformation-based measure that takes into account differentprobabilities of the outcomes. The gain ratio is explained asfollows. The residual uncertainty about the class to which a case

Class 1.

Class 1.

Class 1.

Class 2.

0

5

0

6789

123

4

y1

0 0.5 1.00.60.1 0.2 0.3 0.4 0.7 0.8 0.9

and (b) the decomposed feature space.

Page 4: Decision tree and first-principles model-based approach for reactor runaway analysis and forecasting

ARTICLE IN PRESS

T. Varga et al. / Engineering Applications of Artificial Intelligence 22 (2009) 569–578572

in D belongs can be expressed as

InfoðDÞ ¼ �XMj¼1

pðD; jÞ � log2ðpðD; jÞÞ, (1)

where pðD; jÞ denotes the proportion of classes in D that belong tothe jth class. The information obtained by doing a test is stronglyeffected by the number of outcomes and is maximal when there isone class in each subset Di:

GainðD;KÞ ¼ InfoðDÞ �XMi¼1

jDij

jDj� InfoðDiÞ, (2)

where jDij denotes the cardinality of the Di data set.On the other hand, the potential information obtained by

partitioning a set of cases is based on knowing the subset Di intowhich a case falls. This split information,

SplitðD;KÞ ¼ �XMi¼1

jDij

jDj� log2

jDij

jDj

� �, (3)

tends to increase with the number of outcomes of a test. The gainratio criterion assesses the desirability of a test as the ratio of itsinformation gain to its split information. The gain ratio of everypossible test is determined and, among those with the leastaverage gain, the split with maximum gain ratio is selected(Quinlan, 1996). The recursive partition strategy results in treesthat are consistent with the training data. In practical applica-tions, data contain often noise, which leads generally to toocomplex trees. Hence, most DT construction methods prune theinitial tree by identifying sub-trees that contribute only a little tothe predictive accuracy by replacing these by a leaf.

Binary trees can be represented in terms of crisp logical rules,where each concept is represented by one disjunctive normalform, and where the antecedent consists of a sequence of attributevalue tests, e.g. yjo0:5. As attributes can appear more than once ina tree, the attribute value tests partitions the input domains of theclassifier into intervals. These intervals can be represented bycrisp characteristic sets, and the operating region of the rules areformulated by and connective of these domains.

These crisp characteristic sets are a special case of trapezoidalfuzzy membership functions, mij, that are often used to describefuzzy sets AijðyjÞ:

mijðyj; a; b; c; dÞ ¼ max 0;miny� a

b� a;1;

d� y

d� c

� �� �. (4)

Thus, DTs can be represented by fuzzy rules with trapezoidalmembership functions. For example, the rectangular region ofclass 2, defined by the depicted DT (Fig. 1b), can be represented bythe fuzzy rule

R1: If y1 is A11 and y2 is A12 then g1 ¼ 0:5, (5)

where A11 and A12 are defined as m11fy1;0:5;0:5;1;1g andm12fy2;0:5;0:5;0:8;0:8g, respectively.

The previous considerations can be generalized to form analgorithm that can be used for the transformation of DTs intoinitial fuzzy systems:

1.

i ¼ 1; . . . ;M. 2. Select a terminal node of the DT defines Di data set. 3. Collect the attribute value tests Ki related to the chosen

terminal node.

4. The Ki attribute value tests define a hypercube that contains

the Di data set and can be used to formulate the ith rule anddefine the characteristic points of the fuzzy sets.

The resulting knowledge shown by DTs is easily comprehensible.This is attractive for a wide range of users who are interested in

domain understanding, classification capabilities or the symbolicrules that may be extracted from the tree and subsequently usedin a rule-based decision system. E.g. rule bases are often neededwhere the process is operated by human operators and someinformation is needed to support their work.

3. Runaway forecast based on DTs

The proposed approach is different from the classicaldata-mining approach because the process data are appliedto validate the model. The simulated, validated and labeleddata are generated by solving the process model and applied toinduct the DT. By a detailed analysis of models labeled datacan be obtained. In our case Ljapunov’s indirect stability analysiswas used to examine the stability of models. So, the threemain steps of the suggested approach are the stability analysis ofthe process model, the generation of the learning samples andthen a DT can be inducted and analyzed in detail and the final stepis the further analysis of the dynamical process model. The laststep is beneficial for checking the results of the analysis ofgenerated DT.

3.1. Model building and validation

In model developing a modeling purpose is needed todetermine the type of model parameters and the complexity ofthe model before even the first equation would be described.All the information about the investigated object must becollected and systemized in order to determine the variablesand develop the model structure. To obtain this necessaryinformation critical laboratory experiments must be designedand performed. Based on the aim of modeling task some decisionsmust be made to determine which effects are important andwhich ones can be neglected. It is inevitable that in solving themodel and analyzing the results the assumptions made in thedevelopment of the mathematical model cannot be forgottenbecause these simplifications define the validity range of theworked out model.

3.2. Runaway forecast based on stability analysis

Generation of the Jacobian-matrix of first-principles model isthe first step in the application of Ljapunov’s indirect method toinvestigate the stability of the model. It is followed by theexamination of eigenvalues of the Jacobian-matrix. In case all ofthe eigenvalues are negative the model is stable but if one of theeigenvalues is over zero then the model is unstable at theinvestigated point of reactor.

To check the applicability of Ljapunov’s indirect method indetecting reactor runaway a set of randomly generated inletconditions were investigated. At each condition all profiles ofstate-variables were calculated solving the steady-state modeland in every simulated point along the reactor the choosingstability analysis method was applied to examine the stability ofthe model. In case instability is detected at least in one point ofreactor then the investigated inlet condition is labeled as runawayoccurs, but if the criteria does not sign the inlet condition islabeled as runaway does not occur.

Ljapunov’s stability analysis method is suitable fordetecting the development of runaway and the algorithmbased on this stability analysis can separate the caseswhether the runaway occurs in the reactor or not. However, it isquite difficult to implement this criterion in an industrialenvironment.

Page 5: Decision tree and first-principles model-based approach for reactor runaway analysis and forecasting

ARTICLE IN PRESS

T. Varga et al. / Engineering Applications of Artificial Intelligence 22 (2009) 569–578 573

3.3. DT-based induction on results of stability analysis

Learning from examples, i.e. concepts acquisition, is one of themost important branches of machine learning that has beengenerally regarded as the bottle-neck of expert system develop-ment. For this purpose a wide range of models and identification

product

x = Lcoolantout

coolantin

reagents

x = 0

TW,out, BW

TW,in , BW

TG,out , BG,out, ciG,out, pG,out

TG,in , BG,in , ciG,in, pG,in

TS, ciS, cX

S

x

Fig. 2. Scheme of the reactor.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.80.5

0.550.6

0.650.7

0.750.8

0.850.9

0.951

TG/T

Gm

ax [

]

x [m]

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.80.5

0.550.6

0.650.7

0.750.8

0.850.9

0.951

TG/T

Gm

ax [

]

x [m]

Fig. 3. Comparing the measured ð

algorithms have been developed. Among them, through the paperbinary DTs are applied to create rule base of the classifier. Anillustrative example for a DT is given in Fig. 1. As this figureillustrates, such model is easily interpretable, so it can be easilyintegrated into an OSS.

3.4. Further analysis in geometric space

At this point only the steady-state of the reactor is analyzedbut avoiding runaway the knowledge about the development rateof runaway can be advantageous. Hence, the dynamic model ofthe system is also analyzed. The results of analysis are also usefulfor checking rules extracted from the DT, e.g. which inletparameter has the main impact in occurrence of runaway andwhich one has not. It is obvious that the operator must change thevalue of that parameter which has the main impact but it can looklike a question that still remains, which is the correct rate of thechange? But it has already an answer, hence, the obtained DTdetermines the value range of all inlet parameters where thereactor is stable.

4. Results

4.1. Model building and validation

Firstly, the industrial tube reactor and developed models areintroduced. The studied vertically built up reactor contains a greatnumber of tubes with catalyst as it is shown in Fig. 2. The highlyexothermic reaction occurs as the reactants that rise up the tubepass the fixed bed of catalyst particles and the heat generated bythe reaction escapes through the tube walls into the cooling water.Only the properties of inlet and outlet streams are measuredcontinuously to monitor the reactor. The steady-state temperatureprofile is collected in every 3–6 month. To track the developmentof stability boundaries the detailed dynamic model was devel-oped. The worked out model calculates with all the transport

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.80.4

0.5

0.6

0.7

0.8

0.9

1

TG/T

Gm

ax [

]

x [m]

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.80.4

0.5

0.6

0.7

0.8

0.9

1

TG/T

Gm

ax [

]

x [m]

�Þ and the calculated data (-).

Page 6: Decision tree and first-principles model-based approach for reactor runaway analysis and forecasting

ARTICLE IN PRESS

TW,in <= 306.6 : | TW,in <= 298.4 : 1 (331.0/10.8) | TW,in > 298.4 : | | pG,in <= 1.37 : | | | BG,in·cA

G,in > 4.26 : 1 (86.0/5.1) | | | BG,in·cA

G,in <= 4.26 : | | | | pG,in <= 1.26 : 1 (14.0/5.5) | | | | pG,in > 1.26 : | | | | | BG,in·cB

G,in <= 3.02 : 2 (8.0/2.5) | | | | | BG,in·cB

G,in > 3.02 : 1 (3.0/1.9) | | pG,in > 1.37 :

G,in

T. Varga et al. / Engineering Applications of Artificial Intelligence 22 (2009) 569–578574

processes between each of the connected phases. Let us show thestructure of the dynamic model in Fig. 7 with notation of theconnection at each hierarchy level.

Besides this purpose, obtaining an easily comprehensiblerunaway criterion by using data-mining technique such as DTmethod is the aim of our work. This novel approach of therunaway criterion is based on the reactor steady-state model andthe stability analysis of the model. In case the model is valid thenthe stability analysis is able to detect the development ofinstability in the investigated object.

A one-dimensional two phase dynamic model was worked out.This model complexity is applicable to observe how theboundaries of the stability are moving as it will be shown laterin this article. The dynamic behavior of the reactor can beobtained by solving the mass and energy balances. The dynamicmodel contains partial differential equations (PDEs) besides theordinary and scalar expressions. The PDEs in the dynamic modelare dependent on t and x independent variables which correspondto the time and the position in the catalyst bed along thesymmetric axis. The dynamic model is able to couple heat, masstransport and chemical reactions occurring in the catalyst bed.The mathematical simulations were achieved by applying thefinite differences method to solve the model equations. Theexplanation of model parameters is given in the Nomenclature,

Tube-reactor

Tube(s) Jacket

Solidphase Gasphase Liquidphase

A B C X A B C W

Qj

Qj

-onlyheattransport -heatandmaterialtransport

TGTSjQTWTGjQ

GSi Ka,i

cicXcijM,i-chemicalreaction

Kr

cXcCkr,erSA;B;Ci

jM,i

GW

cA cB

SG

GS

GW

SG

GS

GW

S SS S

SG

G SS

Fig. 4. Structure of the detailed dynamic model, where X means the active spots

on catalyst surface.

0.1 0.2 0.3 0.4 0.5 0.6 0.7

0.5

0.6

0.7

0.8

0.9

1

x [m]

TG/T

Gm

ax [

]

Fig. 5. Calculated (a) steady-state temperature profiles at every generated inlet cond

unstable point at each case.

while a well-detailed introduction of model equations can befound in the Appendix.

In the steady-state model, rcorr is the only unknown parameter.An average reaction rate correction factor was identified by usinga part of the measured temperature profiles from the industrialreactor. The other part of the profiles were used to test theperformance of the learned model in order to make a crossvalidation. Each profile consists of only 30–40 temperature values.The distance between two values is 1 cm. Both models were

0.1 0.2 0.3 0.4 0.5 0.6 0.7

0.5

0.6

0.7

0.8

0.9

1

x [m]

TG/T

Gm

ax [

]

itions and profiles when runaway occurs (b). Vertical lines in (b) show the first

| | | T > 292.2 : 2 (28.0/4.8) | | | TG,in <= 292.2 : | | | | TW,in <= 300.4 : 1 (3.0/1.9) | | | | TW,in > 300.4 : | | | | | BG,in·cB

G,in <= 1.26 : 1 (2.0/1.6) | | | | | BG,in·cB

G,in > 1.26 : 2 (4.0/2.1) TW,in > 306.6 : | pG,in > 1.22 : 2 (165.0/9.4) | pG,in <= 1.22 : | | TW,in <= 311.7 : 1 (30.0/8.6) | | TW,in > 311.7 : | | | pG,in > 1.14 : 2 (34.0/2.9) | | | pG,in <= 1.14 : | | | | TW,in > 317.9 : 2 (15.0/2.7) | | | | TW,in <= 317.9 : | | | | | BG,in·cA

G,in > 8.35 : 1 (6.0/2.4) | | | | | BG,in·cA

G,in <= 8.35 : | | | | | | BG,in·cB

G,in <= 3.23 : 2 (17.0/5.7) | | | | | | BG,in·cB

G,in > 3.23 : 1 (4.0/2.1)

Fig. 6. The generated decision tree to forecast the reactor runaway.

Page 7: Decision tree and first-principles model-based approach for reactor runaway analysis and forecasting

ARTICLE IN PRESS

Fig. 7. The movement of maxima (a) and the first unstable point (b) along the catalyst bed at different cooling water inlet temperatures.

T. Varga et al. / Engineering Applications of Artificial Intelligence 22 (2009) 569–578 575

Page 8: Decision tree and first-principles model-based approach for reactor runaway analysis and forecasting

ARTICLE IN PRESS

T. Varga et al. / Engineering Applications of Artificial Intelligence 22 (2009) 569–578576

solved by using MATLAB. The measured and calculated tempera-ture profiles give a good correspondence as shown in Fig. 3 atdifferent inlet conditions, so the developed steady-state model isvalid and it can be used to investigate the stability of the reactor.

4.2. Stability analysis of the model

To check the applicability of Ljapunov’s indirect method indetecting the reactor runaway a set of randomly generated inletconditions were investigated. One condition is determined by fiveparameters: BG;in

� cG;inA ; BG;in

� cG;inB ; TG;in; pG;in; TW ;in. At each

condition all profiles of state-variables were calculated solvingthe steady-state model and in every simulated point along thereactor the choosing stability analysis method was applied toexamine the stability of the model. As Fig. 4 illustrates Ljapunov’sstability analysis method is suitable for detecting the develop-ment of runaway and the algorithm based on this stabilityanalysis can separate the cases whether the runaway occurs in thereactor or not. However, it is quite difficult to implement thiscriterion in an industrial environment.

4.3. DT induction

To obtain the necessary quantity of learning samples forinducting a DT at a bigger set of inlet conditions must beinvestigated in Section 4.2, where only 15 parameter combina-tions are examined to visually confirm the applicability ofLjapunov’s stability analysis. Using C4.5 algorithm and basing onthe obtained learning samples to generate the DT an easilycomprehensible tool can be developed for forecasting the reactorrunaway based on only the measured feed condition.

In Fig. 5 moving from left to right one can get from root to theleaves of the tree. As it can be seen the algorithm found that theinlet temperature of cooling media (TW ;in) has the main impactand reagent inlet temperature (TG;in) has the least in thedevelopment of runaway in the investigated reactor. It is easilyexplained with the huge difference between the heat capacity oftwo phases. DT can be used to develop such an operating strategythat the reactor can be operated in the stable regime during thewhole operation since it determines the value range of all inletparameters when the reactor is stable.

4.4. Movement of the boundary of the stability

To investigate the development of runaway in geometric spacethe detailed dynamic model must be solved and the stabilityanalysis must be applied at every time step. It is presented earlierthat the cooling water inlet temperature has the main impact onthe development of reactor runaway. The obtained results shownin Fig. 6 have a good correspondence with this conclusion sincethe same changes in the inlet temperature of reagents have lesseffect than in the inlet temperature of the cooling media, althoughin both cases the boundary of the stability is coming closer andcloser to the front of the reactor and it develops earlier in time dueto the temperature rising (see Fig. 7).

5. Conclusions

This work has demonstrated a new method using a data-mining technique to detect runaway in a heterocatalytic reactor.The results show that the proposed DT-based approach is able todistinguish between runaway and non-runaway situations based

on a set of linguistic rules extracted from data obtained by theanalysis of the steady-state model of the process. The result of thisanalysis can be easily incorporated into an operating supportsystem and can be applied for the selection of the criticaloperating variables. Besides the identification of critical variablesthe generated DT is useful in characterizing the range of thesevariables when the reactor can be operated without the develop-ment of reactor runaway. From a broader point of view, this paperhas demonstrated that data-mining techniques are not only usefulto extract applicable and potentially useful information from largehistorical data bases, but they can be used for the analysis of first-principles models, e.g. they can be used to characterized theoperating regions of complex processes.

The main contribution of this paper is the formulation of therunaway forecast as a classification problem. Among the widerange of tools used for data classification, one of the mostadvanced classifier, the C4.5 DT induction algorithm, has beenapplied. The comparison of different classifiers could be also aninteresting topic of future research and development, but sincethe interpretability of the rules of the classifier model is alsoimportant in this specific application, it would be useless to studyother classifier systems than DT induction algorithms. In thecurrent literature of machine learning there is a wide range ofresearch reports related to the enhancement of the C4.5algorithms, but these results are independent from the maincontribution of this paper.

This research has been motivated by a real, industrialapplication problem. All the programs developed for the related‘‘feasibility study’’ and calculations have been made in MATLAB.Since our industrial partner has not got license for this tool, tosupport the operators a graphical user interface (GUI) over theMATLAB has been developed and the whole package has beencompiled to Cþ and a stand alone application, to make possiblethe applications in the industrial environment. The simulator ofthe process has been validated to industrial data, so the results ofthe simulator are applicable to the industrial process, e.g. it hasbeen used to explore the hidden capacity of the reaction system.

Acknowledgments

The authors would like to acknowledge the support of theCooperative Research Centre (VIKKK) (project III/2) and HungarianResearch Found (OTKA T049534). Janos Abonyi is grateful for thesupport of the Bolyai Research Fellowship of the HungarianAcademy of Sciences and the Oveges Jozsef Fellowship.

Appendix A

A.1. Dynamical model of the reactor

Gas phase:

All the different shapes of catalyst particles in the reactorwere replaced with spheres which have equal mean diameterto calculate the mass and heat transfer surface between thegas and solid phases. So component mass balances applyingthe common balance equations:

qðVS� cG

i Þ

qtþqðBG� cG

i Þ

qx¼ �AGS

� jGSM;i. (6)

Due to the pressure drop caused by the fixed catalyst bed andthe reaction (because of the change in number of moles),

Page 9: Decision tree and first-principles model-based approach for reactor runaway analysis and forecasting

ARTICLE IN PRESS

T. Varga et al. / Engineering Applications of Artificial Intelligence 22 (2009) 569–578 577

volumetric velocity of gas phase is decreasing significantlywhile gas phase is moving through the reactor:

qBG

qx¼ �AGS

Pi¼fA;B;Cgj

GSM;iP

i¼fA;B;CgcGi

þAGS� jSG

Q � AGW� jGW

Q

TG� cG

p

�BG

pG�qpG

qx.

(7)

Energy balance:

VG� rG � cG

p �qTG

qtþ BG

� rG � cGp �

qTG

qx¼ AGS

� jSGQ � AGW

� jGWQ . (8)

Momentum equation (Berty, 1999):

qpG

qx¼ �2 � f �

rG � ðBGÞ2

dp � A2� L � f c , (9)

where f ¼ ð1� eGÞ=ðeGÞ3� ð1:75þ 150 � ð1� eGÞ=ReG

Þ.

� Boundary conditions:

at x ¼ 0; cGi ¼ cG;in

i ; BG¼ BG;in; TG

¼ TG;in; pG ¼ pG;in.

(10)

The jGSM;i mass flux densities are evaluated as the adsorption

process is a reaction between the adsorbent and adsorbingcomponents:

jGSM;i ¼ bGS

i � cGi � c

SX �

cSi

Kad;i

!, (11)

where bGSi is calculated with an Arrhenius-type equation:

bGSi ¼ k0;ad � exp �

EA;ad

R � TG

� �. (12)

In the opposite direction there is a heat transport process. ThejSGQ heat flux density between the solid and gas phases is

calculated with the following correlation:

jSGQ ¼ aSG � ðTS

� TGÞ, (13)

while the produced heat in the reactor is removed through thewall of tubes into the cooling media and it is evaluated by the nextexpression:

jGWQ ¼ aGW � ðTG

� TWÞ. (14)

Solid phase (catalyst bed):

Component mass balances:

qðVS� cS

i Þ

qt¼ AGS

� jGSM;i þ ni � V

S� rS, (15)

qðVS� cS

qt¼ �

Xi¼fA;B;Cg

AGS� jGS

M;i þ VS� rS. (16)

In the solid phase rS reaction rate is calculated using thefollowing equation:

rS ¼ kreacd � cSA � c

SB �

cSC � c

SX

Kreac

� �. (17)

Energy balance:

VS� rS � cS

p �qTS

qt¼

Xi¼fA;B;Cg

AGS� jGS

M;i � ð�DHa;iÞ

þ VS� rS � ð�DHrÞ � AGS

� jGSQ . (18)

Cooling media:

Energy balance:

VW� rW � cW

p �qTW

qtþ BW

� rW � cWp �

qTW

qx¼ AGW

� jGWQ . (19)

Boundary conditions:

at x ¼ 0; TW¼ TW ;in. (20)

A.2. Steady-state model

The steady-state model could be obtained easily from dynamicmodel by substituting the time derivative terms with 0. Further tothis elimination the following assumptions were made:

the reaction takes place in gas phase; � the temperature of the solid and gas phases is equal in every

position of the catalyst bed;

� temperature distribution of the jacket is constant.

Applying these assumptions the following concentrated para-metric model can be obtained:

dðBG� cG

i Þ

dx¼ ui � V

G� rG, (21)

BG� rG � cG

p �dTG

dx¼ VG

� rG � DHr � AGW� jGW

Q , (22)

x ¼ 0; cGi ¼ cG;in

i ; TG¼ TG;in. (23)

An experimentally measured reaction rate by Potter and Baron(1951) is modified with the reaction equilibrium and it is appliedin the calculation of overall rate of the process:

rG ¼ 9477 � eð�18250=R�TGÞ � pG �

ðcGAÞ

0:75� ðcG

B Þ0:25P

i¼fA;B;CgcGi

. (24)

All the missing model parameters were identified comparingmeasured and calculated temperature profiles. The simulatorswere developed in MATLAB and they can be downloaded fromhttp://fmt.uni-pannon.hu/softcomp/. For every operation andreactor parameter which is characterized the industrial reactorwas changed.

References

Abonyi, J., 2005. Adatbanyaszat—a hatekonysaga eszkoze. ComputerBooks kiado,pp. 12–34.

Abonyi, J., Roubos, J., Szeifert, F., 2003. Data-driven generation of compact,accurate, and linguistically sound fuzzy classifiers based on a decision-treeinitialization. International Journal of Approximate Reasoning 32, 1–21.

Adler, J., Enig, J., 1964. The critical conditions in thermal explosion theory withreactant consumption. Combustion and Flame 8, 97–103.

Albert, J., Luft, G., 1998. Runaway phenomena in the ethylene/vinylacetatecopolymerization under high pressure. Chemical Engineering and Processing37, 55–59.

Assaf, T., Dugan, J.B., 2008. Diagnosis based on reliability analysis using monitorsand sensors. Reliability Engineering and System Safety 93, 509–521.

Barkelew, C., 1959. Stability of chemical reactors. Chemical Engineering ProgressSymposium Series 25, 37–46.

Berty, J., 1999. Experiments in Catalytic Reaction Engineering. Elsevier, Amsterdam.Bhat, N., McAvoy, T., 1990. Use of neural nets for dynamic modelling and control of

chemical process systems. Computers and Chemical Engineering 4/5, 573–585.Bhat, N., Minderman, P., McAvoy, T., Wang, N., 1990. Modelling chemical process

systems via neural computation. IEEE Control Systems Magazine April, 24–30.Bohlin, T., 1994. A case study for grey box identification. Automatica 30 (2),

307–318.Cott, B., Durham, R., Sullivan, G., 1989. Process model based engineering.

Computers and Chemical Engineering 13, 973–984.Dourado, A., 2000. About systems and control curricula based on learning

techniques. Preprints of ACE 2000, Preprints of IFAC/IEEE Symposium onAdvances on Control Education.

Dourado, A., 2008. A challenge for a new organization in systems and controlcurricula. In: Proceedings XVII IFAC World Congress.

Eizenberg, S., Shacham, M., Brauner, N., 2006. Combining HAZOP with dynamicsimulation—applications for safety education. Journal of Loss Prevention in theProcess Industries 19, 754–761.

Page 10: Decision tree and first-principles model-based approach for reactor runaway analysis and forecasting

ARTICLE IN PRESS

T. Varga et al. / Engineering Applications of Artificial Intelligence 22 (2009) 569–578578

Gugaliya, J., Gudi, R., Lakshminarayanan, S., 2005. Multi-model decomposition ofnonlinear dynamics using a fuzzy-cart approach. Journal of Process Control 15,417–434.

Han, J., Kimber, M., 2000. Multi-model decomposition of nonlinear dynamics usinga fuzzy-cart approach. Journal of Process Control 15, 417–434.

Hernandez, E., Arkun, Y., 1993. Control of nonlinear systems using polynomialARMA models. AICHE Journal 39 (3), 446–460.

Johansen, T., Foss, B., 1997. Operating regime based process modeling andidentification. Computers and Chemical Engineering 21, 159–176.

Kao, C., Hu, K., 2002. Acrylic reactor runaway and explosion accident analysis.Journal of Loss Prevention in the Process Industries 15, 213–222.

Kavli, T., Lines, G., 1996. A unifying framework for mechanistic: fuzzy and datadriven modelling. In: EUFIT’96, September, Aachen, Germany, pp. 1241–1246.

Klir, G., Yuan, B., 1995. Fuzzy Sets and Fuzzy Logic; Theory and Applications.Prentice-Hall, Englewood Cliffs, NJ.

Lacey, A., 1983. Critical behaviour of homogenous reacting systems with largeactivation energy. International Journal of Engineering Science 21, 501–515.

Ljung, L., 1987. System Identification, Theory for the User. Prentice-Hall, EnglewoodCliffs, NJ.

Mamdani, E., Teraqno, T., Asai, K., Sugeno, M., 1992. Fuzzy-systems theory and itsapplications. Nature 359, 788.

Mendel, J., 1995. Fuzzy logic systems for engineering: a tutorial. Proceedings of theIEEE 83, 345–377.

Potter, C., Baron, S., 1951. Kinetics of the catalytic formation of phosgene. ChemicalEngineering Progress 47 (9), 473–515.

Quinlan, J., 1996. Improved use of continuous attributes in c4.5. Journal of ArtificialIntelligence Research 4, 77–90.

Rodriguez, J., Romagnoli, J., Goodwin, G., 2003. Supervisory multiple regimecontrol. Journal of Process Control 13, 177–191.

Sjoberg, J., Zhang, Q., Ljung, L., Benveniste, A., Deylon, B., Glorennec, P.-Y.,Hjalmarsson, H., Juditsky, A., 1995. Nonlinear black-box modeling in systemidentification: a unified overview. Automatica 31, 1691–1724.

Sun, W., Chen, J., Li, J., 2006. Decision tree and PCA-based fault diagnosis of rotatingmachinery. Mechanical Systems and Signal Processing 21, 1300–1317.

Thompson, M., Kramer, M., 1994. Modeling chemical processes using priorknowledge and neural networks. AIChE Journal 40, 1328–1340.

Tulleken, H., 1993. Gray-box modelling and identification using physical knowl-edge and Bayesian techniques. Automatica 29, 285–308.

van Woezik, B., Westerterp, K., 2000. The nitric acid oxidation of 2-octanol. Amodel reaction for heterogeneous liquid–liquid reactions. Chemical Engineer-ing and Processing 39, 521–537.

van Woezik, B., Westerterp, K., 2001. Runaway behavior and thermally safeoperation of multiple liquid–liquid reactions in the semi-batch reactor, thenitric acid oxidation of 2-octanol. Chemical Engineering and Processing 41,59–77.

Wang, C., 2008. Recognition of semiconductor defect patterns using spatialfiltering and spectral clustering. Expert Systems with Applications 34,1914–1923.

Ydstie, B., 1990. Forecasting and control using adaptive connectionist networks.Computers and Chemical Engineering Journals 15 (4/5), 583–599.