On-line expert system for odor complaints in a refinery

On-line expert system for odor complaints in a refinery

Computers chem. Engng Vol.20, Suppl..pp. S1449-SI454. 1996 Pergamon S0098-1354(96)00248-7 Copyright© 1996 ElsevierScienceLtd Printed in Great Brita...

456KB Sizes 2 Downloads 45 Views

Computers chem. Engng Vol.20, Suppl..pp. S1449-SI454. 1996

Pergamon

S0098-1354(96)00248-7

Copyright© 1996 ElsevierScienceLtd Printed in Great Britain.All rightsreserved 0098-1354/96 $15.00+0.00

ON-LINE EXPERT SYSTEM FOR ODOR COMPLAINTS IN A REFINERY A.K. KORDON, P.S. DHURJATI AND B.J. BOCKRATH Department of Chemical Engineering, University of Delaware, Newark, Delaware, USA Abstract - On-line capabilities of modern expert systems are of special interest due to the possibility of real-time environmental monitoring and detection of possible rules violations in their early phase of development. One of the most difficult environmental problem for some refineries located in fairly populated areas are released refinery odors. In an attempt to solve this problem, an odor expert system is proposed in this paper. It includes a historical data base with all available odor complaints, real-time monitoring of weather dam and selected process variables, a detailed map, and rules. The rules are based on the developed methodology for quantitavely correlating process variables with odor complaints. The methodology includes threshold values calculations for selected variables at the Waste Water Treatment Plant and their correlation with process variables in different units inside the refinery. The proposed expert system has been implemented in the GENSYM G2 software environment at StarEnterprise refinery in Delaware City, Delaware, USA. INTRODUCTION Although expert system development in some specialties began in the late sixties, in the environmental area it started only about 10 years ago (Hushon, 1990). Expert systems in the environmental area have been relatively slow to develop because the science of dealing with environmental problems is not well understood, and few methods are absolutely agreed upon. Futhermore, few environmental problems can be solved by a single expert. Often there is a need to involve experts from many disciplines to identify an optimal problem solution. Recently, the fast growing aaea of computational intelligence has given a new impulse in expert systems development. Of special interest to environmental problems are neural networks with their capabilities to discover complex relationships and find hidden influences (Haykin, 1994). One of the most difficult problems for environmental detection is released odors. Thousands of odors can be identified by humans from the output pattern of many biological receptors in our olfactory system, each with slightly different characteristics. Humans have a large number of 'simple' sensors in their nose, typically tens of thousands (Fekadu et al, 1993). One approach to detect odors is to create a simular array of simple sensors and then to analyze the output pattern from these sensors. The best results in this direction have been achieved by a combination of neural networks technology and multisensor array technology. The designed electronic nose can detect odors with considerably fewer sensors (typically 12) (Ryman-Tubb, 1995). This approach, however, is not appropriate for detection of released odors under different weather conditions from plants with distributed units. An expert system approach for analyzing odor complaints and predicting the probability for an odor release is proposed in this paper. It combines expert knowledge with neural network modeling. Expert knowledge is used to classify odors and identify potential odor sources. Neural network models are applied as soft sensors to predict critical odor-related process variables from different units. ODOR SOURCES IN A REFINERY This study was conducted at the StarEnterprise refinery in Delaware City, Delaware, USA. The ref'mery is located in a semi-industrial area neithbored by other small chemical companies. The refinery, though, stands as the lone industrial giant and the main potential source of odors of the area and although the plant occupies 5,000 acres of land, the populated communities of Wilmington, Christiana, Newark, Glasgow, and

S1449

S1450

European Symposium on Computer Aided Process Engineering---6. Part B

Delaware City are all within a two to fifteen kin. radius of the site to the north, west, and south. To the east lies the Delaware River, which absorbs most of released odors. The most resonable way to identify possible odor sources in the refinery is by using expert knowledge. An Odor Abatement Team has been formed with members from different operating units. As a first step, lists of possible sources within the refinery were constructed. Units such as the Waste Water Trealment Plant (WWTP), Sour Water Stripper Plant (SWSP), Crude Unit, blenders, and storage tank areas are among those cited. A list of about 150 possible odor producing variables within each of the units was also created. As a second step, a complete analysis of available odor complaints was made. Although a scarce record of odor complaints can be dated back to 1960, consistent odor complaint record can be found only after 1984. Analyzable data containing thoroughly documented information about the odor's description, location, time and date, refinery and weather conditions, and any actions taken by the refinery can only be acquired for complaints dating back to 1991. Naturally, the dam are not purely quantitative. Often odor releases occur and are not recorded. Sometimes a neighbor may smell the odor but not phone in the complaint. Other times, the wind may have been blowing in the east direction, where there are fewer people (because of the Delaware River). Futhermore, odor complaints are hard to quantify. The type of the odor is often inconsistently described. Its strength, moreover, is hard to determine on a purely absolute scale. Therefore, odor classifications for refinery related odors were developed by the experts and validated with a selected set of odor complaints. Based on these classifications, all available complaints between January 1, 1993 and January 15, 1995 were analyzed and possible sources identified. The results are shown on Table 1. Table 1 List of identified odor sources Source Unknown Cat Cracker Coker Flare Not Refinery Refinery Stacks Ship Stack Sour Water Stripper Flare Drum Draininl~ Spent Caustic Leak Sulfur Plant Train Shutdown WWTP Total Complaints

Count 58 1

1 3 6 10 1

3 1

2 1 1

59 147

% of Total 39.5 < 1.0 < 1.0 2.0 4.0 6.8 < 1.0 2 < 1.0 1.4 < 1.0 < 1.0 40.1 100

Obviously the WWTP is the most significant odor source identified, as it represents 40% of all odor complaints and 66% of all complaints with a known source (called incidents). The next closest identifiable source is the refinery gas stacks that are responsible for 7% of the total complaints. However, it is nearly impossible to eliminate stack related odors, since they are weather related phenomena. The task of the odor expert system dealing with this source is to predict the critical weather conditions causing stack gas inversion and possible odor complaints. Most of the other sources ~ less than 1% of all odor complaints and are a result of well-identified-alarm situations in these particular units. Studying the WWTP as a major source of odor complaint in a refinery, however, does not solve the problem of preventing the complaints. The major drawback of correlating variables within the WWTP with odor complaints is that the original source of the odor is not necessarily the WWTP itself. A disturbance in the WWTP often indicates an upset somewhere else in the refinery. Consequently, if a correlation between the value of some variable and odor complaints is obtained in the WWTP, it is possible to either change an operation in the WWTP (adjust the capacity, for example) or search elsewhere in the refinery for the direct

European Symposium on Computer Aided Process Engineering---6. Part B

S1451

odor source of the disturbance (sour water feed from the crude unit, for example). The second approach of predicting WWTP variables from selected process variables is investigated here. ODOR E X P E R T SYSTEM STRUCTURE In principle, a real-time expert system for intelligent odor complaints processing includes a data base part with the historical data, a monitoring part with short-term history of weather and process data, a modeling part with analytical, empirical and dispersion models, and model-based and expert-based rules. The SllUCture of the odor expert system is shown in Fig. 1. Odor Con~laints

Weather Data

Process Data

ODOR EXPERT SYSTEM

t

dorComplaints ataBase

I OdorSource Identification

II

WeatherData Monitoring

ProcessData Monitoring

I Dispersion Model

I NeuralNetworks Model

I ExpertSystemI Rules

Odor Release Alarm Messages Fig. 1 Odor expert system structure There are three main flows of data at the input of the odor expert system: odor complaints, weather data, and process data. These input flows are processed by the data base and monitoring parts of the expert system. The raw data for an odor complaint are entered during the telephone call of the complainant where the main task is to identify the odor according to the developed odor classification. Then, an assessment of the raw data is made by an expert who identifies the potential source of odors within the refinery. If any is found, it is declared as an odor-related incident. A short-term history (several hours before the odor complain0 with weather data (temperature, humidity, heat index, wind speed, wind direction, etc.) and process data (selected process variables from the identified odor inciden0 is attached to any odor complaint in the data base. The two main modeling blocks in the odor expert system are the dispersion model and neural network models. The dispersion model process has two modes of operation - on-line and off-line. In the on-line mode it gives the current state of the critical weather parameters from which potential odor-related phenomena such as a temperature inversion can be identified. In the off-line mode, the dispersion model is used to analyze the weather conditions for some time period before the odor complaint oconed in order to identify the potential odor source. Recently, neural networks have proven to be a promising approach for

S1452

European Symposiumon Computer Aided Process Engineering---6.Part B

empirical modeling of complex relationships (Haykin, 1994). In principle, it is very difficult to develop an analytical model that relates directly released odors to process variables. It is possible, however, to find critical thresholds of selected process variables at the WWTP above which some probability of an odor complaint exists. Unfortunately, these process variables am an integral indicator of the odor problem but not the real cause of odor release. They reflect some problem that already has happened inside the refinery at some unknown time. The main task of the modeling part of the odor expert system is to locate odor release sources inside the refinery through empirical models. One possible approach to relate selected process variables at the WWTP to process variables inside the refinery are neural networks. The inputs to the neural networks are the process variables at the current time and the outputs are the predicted values of the process variables at the WWTP. The essential part of any expert system are the rules. The odor expert system contains rules both defined by experts and based on modeling. The expert-based rules define some specific process conditions that can cause an odor release. The model-based mles am activated when some specific thresholds am violated. The output of the odor expert system am alarm messages sent via e-mail or other preferred methods to inform the operators that a possibility of an odor complaint exists. An example of such a rule is as follows: If H2SPM > 0.6 Then Start an alarm message Provide a message indieating:"Theconcentration of H2S in the Oil/Water separations process effluent at the WWTP is high. If there has not been an odor complaint in the past one day due to the WWTP, there is a 90% chance that there will be an odor complaint within the next one day.

C O R R E L A T I N G O D O R COMPLAINTS TO PROCESS V A R I A B L E S The correlation between process variables inside the refinery and odor complaints is done in two steps. In step one, critical thresholds of process variables at the WWTP are calculated. In step two, neural networks that correlate process variables inside the refinery to the critical thresholds at the WWTP are developed. In the basis of critical odor-related threshold calculation is the concept of a fuzzy odor incident window for each real incident occurrence. A maximum window size of four days preceding and following the odor incident is choosen first. Next an arbitrary weighting system is selected with a value of 1.0 for the date on which the odor incident occurred, 0.9 for the days before and after the incident, 0.7 for the days two before and after the incident, 0.4 for days three before and after the incident, and 0.25 for days four before and after the incident. An odor rating is calculated according to the following formula:

Rating = 1.0(Co*Io)+ 0.9(c-1"I-1 +cl*I l ) + 0.7(c-2"I-2 +¢2"I2 ) + 0.4(c-3"I-3 4-(;3"I3 ) + 0.25(c-4"I-4 +c4"I4 ) where each I0 denotes the real odor incident value for the subscripted day (a zero or one), the subscript represents the offset in days from the current day, and the values of the constants cn are either zero or one, depending on whether the day is included in the window or not. In determining a best threshold value for each window, a high value is set first. Based on this selection, a column of predicted odor data is calculated. For any variable values over the choosen threshold, a value of one is entered into the predicted odor column. A second column is calculated that determines the number of correct predictions. Any odor prediction that matches with a nonzero value in the odor rating is considered correct, while those predictions that correspond to a zero value in the odor rating are considered inctmect (i.e. any prediction that matches with a one in the real odor data over the designated window of time is considered a correct prediction; those predictions that do not match with an odor incident in the real odor data are considered incorrec0. A percent correct value along with the total number of predictions ~xe calculated. The threshold value is then lowered and the calculations performed again. Once the threshold value produces Ix)or or significantlypoorer results than at higher threshold values, the procedure is halted. In step two of correlating odor complaints to process variables, relationships between the variables at the WWTP with odor-related threshold and selected process variables inside the refinery are searched. The refinery process variables of interest are two types - laboratory measurements and process measurement. Their sampling rates differ in an (xder of magnitude - hours for laboratory measurements and seconds/minutes for process measurements. It is possible to use readily available process measurements to

European Symposium on Computer Aided Process Engineering---6. Part B

S 1453

infer variables that are difficult to measure on-line through inferential sensing, also called soft sensing (Willis,1991). For example, distillation tray temperatures have been used to estimate product compositions (Mejdell, 1991). Developing such soft sensors based on neural networks, however, is still a very complicated task, especially when the closed loops change their setpoints frequently. In this case, the closure of the loop can result in a change in the correlation structure of the input inferential variables that can make the soft sensor inacnmte. That is way the development efforts have been focused on finding a correlation between composition-based variables from the WWTP and different refmery units through neural networks. Using the learning capability of a neural network, the relationship between laboratory measurements of selected process variables in refmery units and laboratory measurements with some time delay at the WWTP can be identified from operation data. After training, the neural network model can be used to predict the WWTP variable after its time delay, and if this predicted value is above the critical threshold an alarm message for possible odor complaint is initiated. ODOR EXPERT

SYSTEM

IMPLEMENTATION

Such a complex system requires various software tools for development and implementation. The Ward System Group NeuroShell2 package was used for neural network development and investigation. BioComp Systems NeuroGenetic Optimizer was used for selection of an optimal neural network structure based on genetic algorithms. The odor expert system itself was implemented in the GENSYM G2 software environment and was linked to the various data sources (Oracle data base, process data, weather data, etc.) through G2 Standard Interface (GSI). G2 combines many advanced software technologies in real-time including role-based reasoning, simulation, object-oriented modeling and a graphical user interface. In addition, an on-line neural network package NEURONLINE is available on this platform that integrates the neural networks within the expert system. The data-base part of the expert system has been in use at StarEnterprise refinery since the end of 1994 and all odor complaints have been entered and analyzed through it. In order to develop the rules of the expert systems based on odor complaints to process variables correlation, a representative set of 147 odor complaints was selected. The calculated thresholds and the percent of correct predictions for the selected WWTP process variables are shown in Table 2. Table 2. Odor-related threshold values for selected process variables at the WWTP WWTP Variable

Threshold

% Correct

Window

Biological Ox},~en Demand Chemical Oxyl~en Demand HzSPM NH~PM Phenol Phosphate Solid contents Total organic content Oil and grease content

400 2000 0.6 30 34 11 650 270 2500

62.5 66.7 90.0 68.6 50.0 28.6 56.5 88.9 71.4

-ld, 4d -ld, 3d -ld, ld -ld r 3d -ld, 3d -ld, 3d -ld, 3d -ld, 2d -2d, 3d

These results show that the Biological Oxygen Demand, Chemical Oxygen Demand, H2SPM , NH3PM , Solid contents, Total organic content, and Oil and grease content threshold values and window sizes predict odor incidents with accuracy greater than 50%. The other WWTP process variables do not show much potential for odor incident correlation, as their success rate is below 50%. The neural network approach for correlating process data inside the refinery with the odor-related thresholds at the WWTP is illustrated with the case of NH3. There are five process variables that could be a direct source of ammonia within the refinery. A representative set of 443 input-output data for training, testing and prediction has been prepared for training the neural nework. This set was used with different neural net structures and training criteria. The results are shown in Table 3.

S1454

European Symposium on Computer Aided Process Engineering~. Part B Table 3. Neural network predictions results for NH3

NN Structure 10inputs-16hidden- loutput 4inputs-16hidden- loutput 4inputs-2hidden- loutput

R2 0.92 0.89 0.91

Mean predicted error (%) 4.6 5.3 4.7

Max predicted error (%) 29.5 27.3 17.7

The first structure includes as inputs the values of the five internal NH3PM for the current and the previous days, 16 neurons in the hidden layer (as recommended by NEUROSHELL2 package), and one output NH3PM at the WWTP the next day. After analyzing the influence of different inputs on the output result, it has been found that three of the inputs have negligible influence and another structure with four inputs has been trained. The performance of this neural network was reduced insignificantly. Finally the data set was processed by an genetic algorithms optimizer that confirmed the rejected inputs and reduced the number of the hidden layer neurons to two. This is the structure that was selected for prediction of NH3PM at the WWTP. CONCLUSIONS An expert system for analyzing odor complaints and predicting possible odor release from a ref'mery was developed. Odor-related thresholds on selected process variables at the WWTP are calculated in order to give maximal prediction of available odor complaints. Fore some process variables inside the refinery a neural network model has been developed that links these variables to the odor-related thresholds. With this approach it is possible to activate an alarm rule one day in advance if the odor-related threshold will be violated. ACKNOWLEDGMENTS The authors would like to thank Frank Doyle and Mike Gritz from StarEnterprise refinery and Jim Bischoff from CIM for their support and cooperation. REFERENCES Davide F., C. Di Natale and A. D'Amico, 1995, Self-organising sensory maps in odour classification mimicking, Biosensors & Bioelectronics, 10, pp. 203-218. Dong D. and T. McAvoy, 1995, Emission monitoring using multivariate soft sensors, Proc. of the ACC, Washington, June 1995, pp. 761-764. Fekadu A., E. Hines and J. Gardner, 1993, Neural tree network based electronic nose, Proc. of the Int. Conf. on Artificial Neural Nets and Genetic Algorithms, Innsbruck, Austria, pp. 112-116. Haykin S., 1994, Neural Networks:A Comprehensive Foundation, MacMillan Hushon J.(Editor), 1990, Expert Systems for Environmental Applications, ACS Symposium Series 431. Karayannis N. and A. Venetsanopoulos, 1994, Decision making using neural networks, Neurocomputing, 6, pp. 363-374. Mejdell T. and S. Skogestad, 1991, Estimation of distillation compositions from multiple temperature measurements using partial least squares, I & EC, 30, pp. 2543-2555. Nakamoto T, A.Fukuda and T. Moriizumi, 1993, Perfume and flavour identification by odour-sensing system using quarz-resonator sensor array and neural network pattern recognition, Sensors and Actuators, 8, pp. 85-90. Ryman-Tubb N., 1995, Computers learn to smell and taste, Expert Systems, 12, 2, pp. 157-161. Tsaptsinos D., 1995, Back-propagation and its variations, in Neural Networks for Chemical Engineers, Elsevier Science, pp. 33-75. Willis M. et al, 1991, Inferential measurements via artificial neural networks, Proc. Symp. on Intelligent Tuning and Adaptive Control, Singapore, pp.311-315.