European Symposium on Computer Aided Process Engineering - 13 A. Kraslawski and I. Turunen (Editors) © 2003 Elsevier Science B.V. All rights reserved.
803
Online HAZOP Analysis for Abnormal Event Management of Batch Process Fangping Mu, Venkat Venkatasubramanian* Laboratory for Intelligent Process Systems, School of Chemical Engineering Purdue University, West Lafayette, IN 47907, USA
Abstract Hazard and operability analysis (HAZOP) is a widely used process hazard analysis method for batch processes. However, even though HAZOP analysis considers various potential accident scenarios and produces results that contain the causes, consequences and operator options for these scenarios, these are not generally available or used when those emergencies occur in the plant. In this work, we describe an approach that integrates multivariate statistical process monitoring and HAZOP analysis for abnormal event management. The framework includes three major parts: process monitoring and fault detection based on multiway principal component analysis, automated online HAZOP analysis module and a coordinator. A case study is given to illustrate the features of the system.
1. Introduction Batch and semi-batch processes play an important role in the chemical industry. They are widely used in production of many chemicals such as biochemicals, pharmaceuticals, polymers and specialty chemicals. A variety of approaches to a safe batch process have been developed. Process Hazard Analysis (PHA) and Abnormal Event Management (AEM) are two different, but related, methods that are used by chemical industry to improve the design and operation of a process. Hazard and operability (HAZOP) analysis is a widely used PHA method. AEM involves diagnosing abnormal causal origins of adverse consequences while PHA deals with reasoning about adverse consequences from abnormal causes. When an abnormal event occurs during plant operation, the operator needs to find the root cause of the abnormality. Since a design stage safety analysis methodology, such as HAZOP analysis, overlaps with many of the issues faced by monitoring and diagnostic systems, it seems reasonable to expect some re-use of information. Henio et al. (1994) provided a HAZOP documentation tool to store safety analysis results and make the results which are relevant to monitor situation available to operators. Dash and Venkatasubramanian (2000) proposed a framework that uses the offline HAZOP results of automatic HAZOP tool HAZOPExpert in assessment of abnormal events. In all of these works, off-line HAZOP results are used in assessment of abnormal events. This approach has two main drawbacks. Firstly, it suffers from the problem related management of HAZOP results and the updating of HAZOP results
Corresponding author. Tel: 1-765-494-0734. E-mail:
[email protected]
804 when the plant is changed. Secondly, the worst-case scenario is considered during offline HAZOP analysis. During on-line application, when abnormal event occurs, lots of on-line measurements are available and these measurements can be used to adapt the hazard models for efficient abnormal event management. The approach based on offline generated HAZOP results ignores online measurements. In this work, we describe an approach to integrate multivariate statistical process monitoring and online HAZOP analysis for abnormal event management of batch processes. The framework consists of three main parts: process monitoring and fault detection, automated online HAZOP analysis module and a coordinator. Multiway PCA is used for batch process monitoring and fault detection. When abnormal event is detected, signal-to-symbol transformation technique based on variable contribution is used to transfer quantitative sensor readings to qualitative states. Online HAZOP analysis is based on PHASuite, an automated HAZOP analysis tool, to identify the potential causes, adverse consequences and potential operator options for the identified abnormal event.
2. Multiway Principal Component Analysis (PCA) for Batch Process Monitoring 2.1. Multiway PCA (MPCA) Monitoring and control are crucial tasks in the operation of a batch process. Multivariate Statistical Process Monitoring (MSPM) methods, such as multiway PCA, are becoming popular in recent years for monitoring batch processes. The data from historical database of past successful batch runs generates a threedimensional array X(IxJxK), where I is the number of batches, J is the number of variables and K is the number of sampling times, in a given batch. The array X is unfolded and properly scaled to a 2-dimensional matrix X(IxJK). PCA is applied to generate the score T, loading matrix P and residual E as X = T P + E (Nomikos and MacGregor 1994). This model can also be used to monitor process performance online. At each sample instance during the batch operation, Xnew(JxK) is constructed by using all the data collected up to the current time and the remaining part of X is filled up assuming that the future deviations from the mean trajectories will remain for the rest of the batch duration at their current values. Xnew is scaled and unfolded to x\ew(lxJK). The scores and residuals are generated as, ? = Pjc , e = jc -t P - Two statistics, *-*
new
"^new^
•^new
new
namely T^ and SPE-statistic, are used for batch process monitoring. The T^-statistic is calculated based on the scores while SPE-statistics is computed based on residuals. When abnormal situation is detected by MPCA model, contribution plots (Nomikos, 1996) can be used to determine the variable(s) that are no longer consistent with normal operating conditions. The contribution of process variables to the T^-statistic can be negative, which can be confusing. In this paper, we propose a new definition of variable contribution to T^-statistic which avoids the negativity problem. Given that j-2 _^rQ-i^ _ 11^-1/2Jp _|U-i/2pjp _L-i/2y« II
I
I
I
^
, we can define the variable
2^j t^ jKX-R J^ II
contribution to T-statistic as Con^' =\s~^'^v-^ ^x-A • Using Box's approximation J
I
* jKxR
jK 11
(Box 1954), its confidence can be estimated as Con^.^ = g^-^zl(h^-^)'
805 where ^J' =trace{b^)ltrace{h\ hf = {trace(b)}^/trace(b^) and b = cow(Xi^jj^)Pjj^^j^S~^Pjj^^j^. X is the data set used to obtain the model. At time instance k, the contribution of variable j to SPE-statistic can be defined as Conf^ =e((k-l)J -i- j)^ and its confidence limits can be calculated fi-om the normal operating data as Con^^^ = ^^'^ Z^(
)" ^^^^^ ^^j and v^j are the mean and
variance of the contribution of variable j to SPE obtained for the data set used for the model developed at time instant k. a is the significance level. 2.2. Signal-to-symbol transformation A knowledge based system, such as PHASuite, takes the inputs as qualitative deviation values such as 'high', 'low' and 'normal'. We can transform signal measurements to symbol information based on variable contributions and shift direction of each process variables at the current sample. If T^-statistic indicates the process to be out of limits at time interval k, the qualitative state of process variable j can be set as, high, if Con^ J > Con^j^ and jc, ^ > 0 0'^ = low, if Conl J > Conl j ^ and x^ • < 0 normal, otherwise If SPE-statistic is out of limit at time interval k, the qualitative state Q^^^of process variables can be set similarly. If both T^- and SPE-statistic are out of limit, we can combine them as.
Qkj =
high, if Qlj = high or Ql'f = high \ low, if Qlj = low or Ql^f = low normal, otherwise
Note that it is not possible for g['. =high while Q^^^ =1OW or g [ ' =low while Q^^^ =high according to the above definition. 2.3. Multistage batch processes Many industrial batch processes are operated in multiple stages. Batch recipe defines the different stages of a batch process. For example, for a batch reaction, the first stage can be a heating stage, and the second can be a holding stage. Usually the correlation structures of the batch variables are different for different stages. For multistage batches, it is natural to use different models for the different stages in order to achieve better results. In this work, separate MPCA models for each stage are used. For online monitoring, one needs to shift from one model to the other when one stage ends and the next stage begins.
806
3. Online HAZOP Analysis 3.1. PHASuite—an integrated system for automated HAZOP analysis PHASuite is an integrated system consisting of HAZOPExpert: a model-based, objectoriented, intelligent system for automating HAZOP analysis for continuous processes, BHE: a model-based intelligent system for automating HAZOP analysis for batch processes based on HAZOPExpert, and iTOPs: an intelligent tool for procedure synthesis. In this system, colored Petri Nets are chosen to represent the HAZOP analysis as well as batch and continuous chemical processes. Operation-centered analysis and equipment-centered analysis are integrated through abstraction of the process into two levels based on functional representation. Causal relationships between process variables are captured in signed directed graph models for operation and equipment. Rules for local causes and consequences are associated with digraph nodes. Propagation within and between digraphs provide the potential causes and consequences for a given deviation. PHASuite has been successfully tested on a number of processes from chemical and pharmaceutical companies (Zhao 2002). Multiway PCA process monitoring Online prsdiclion monitoring I
r
T'-andSPE-slatBtK:
]•-»{
3.Z:
^
OnNne HAZOP anatyait result
Figure 1. Software components of the proposed online HAZOP analysis system. 3.2. Online HAZOP analysis module Based on PHASuite, this module provides the capability to reason about the potential causes and consequences of abnormal event identified by the process monitoring and fault detection module. For online HAZOP analysis, digraph nodes are classified as measured or unmeasured according to the sensor settings. When process monitoring and fault detection module detects an abnormal event, the qualitative states of measured digraph nodes are determined based on signal-to-symbol transformation. Starting from each measured process variable, if the state of the variable is not 'normal', simulation engine qualitatively propagates backward/forward from the corresponding digraph node to determine the states of unmeasured digraph nodes for causes/consequences. The propagation is a depth-first propagation. The backward search is to detect the causes for
807 the abnormal situation while forward search is to generate potential consequences. After all the measured process variables are scanned, the rules for causes and consequences are applied to each digraph node to generate potential causes and consequences for the deviations detected. This is a conservative design choice that favors completeness at the expense of poor resolution. Pure qualitative reasoning can generate ambiguities and possibly generate lots of infeasible situations. Quantitative filtering can be used to filter out some of these infeasible situations. When an abnormal event is detected, process sensors provide the quantitative information, which can be used for quantitative filtering. The quantitative information collected by sensors is sent to online HAZOP analysis module to set the states of corresponding process variables and is used for filtering when the online HAZOP analysis results are generated.
4. Integrated Framework for AEM Using HAZOP Analysis The overall structure of the proposed framework is shown in Figure 1. Client-Server structure is used to design the system where PHASuite is built as a server and process monitoring module is a client. Therefore, PHASuite can be used offline or online depending on the situation. The complete system has been developed using C++ running under Windows system. Object-oriented programming techniques were used for the development of the system.
5. Illustrative Example This example involves a two-stage jacketed exothermic batch chemical reactor based on a model published by Luyben (1990). The reaction system involves two consecutive first-order reactions A —> B —> C . The product that we want to make is component B. The batch duration is 300min, and the safe startup time is lOOmin. Measurements in eight variables are taken every 2 minutes. By introducing typical variations in initial conditions and reactor conditions, 50 normal batches, which are defined as normal operation condition data, are simulated. 5.1. Results According to batch recipe, this process is operated in different stages. The first stage is a heating stage and the second is a holding stage. Usually the variations in the correlation structure of the batch variables are different for different stages. Figure 2 gives the variance-captured information for the whole process by 5 principal components. The two stages are clearly visible and we can define the first 100 minutes as the heating stage and the next 200 minutes as the hold stage. Two multiway PCA models are built for heat and hold stage, separately. Case 1: Fouling of the reactor walls This fault is introduced from the beginning of the batch. T^-statistic, which is not shown here, cannot detect the fault. Figure 3 shows SPE-statistic with its 95% and 99% control limits for the heating stage. SPE-statistic identifies the fault at 12 minutes. At that time, the variable contribution plot for SPE is shown in Figure 4.
808 Variable 3, which is reactor temperature, shows the major contribution to the abnormal event. Its qualitative state is set to be 'low' based on the signal-to-symbol transformation formula and the qualitative states of all other measured variables are 'normal'. Online HAZOP analysis is performed and the results are given in Table 1.
200 Time(minutes)
Figure 2. Cumulative percent of explained variance.
Figure 3. SPE-statistic for heating stage.
Figure 4. Variable contributions to SPEstatistic at sample 6.
Table 1. Online HAZOP analysis results. Deviation Causes Low 1) agitator operated at low speed; temperature 2) fouling induced low heat transfer coefficient; 3) cold weather, external heat sink, or lagging loss
Consequences 1) incomplete reaction
6. Conclusions This paper presents a framework for integrating multivariate statistical process monitoring and PHASuite, an automated HAZOP analysis tool, for abnormal event management of batch process. Multiway PC A is used for batch process monitoring and fault detection. After abnormal event is detected, signal-to-symbol transformation technique based on contribution plots is used to translate signal measurements to symbol information, and is input to PHASuite. PHASuite is then used to identify the potential causes, adverse consequences and potential operator options for the abnormal event.
7. Reference Box, G.E.P., 1954, The annals of mathematical statistics. 25:290-302. Heino P., Karvone, I., Pettersen, T., Wennersten, R. and Andersen, T., 1994, Reliability Engineering & System Safety. 44 (3): 335-343. Dashes, S. and Venkatasubramanian, V., 2000, Proc. ESCAPE. Florence, Italy. 775-780 Luyben, W.L., 1990, Process modeling, simulation and control for chemical engineers. McGraw-Hill, New York. Nomikos, P. and MacGregor, J.F., 1994, AIChE Journal, Vol. 40 No. 8 pl361-1375 Nomikos, P., 1996, ISA Transactions, 35, 259-266. Zhao C , 2002, Knowledge Engineering Framework for Automated HAZOP Analysis, PhD Thesis, Purdue University.