Copyright © IFAC Dynamics and Control of Process Systems, Corfu, Greece, 1998
INTELLIGENT MONITORING FOR QUALITY CONTROL IN A BIOLOGICAL NUTRIENT REMOVAL WASTEW ATER TREATMENT PILOT PLANT
T. Robertson
1 lCl
I,
J. Chen
1,\
J.A. Romagnoli
1,4 and
B. NeweU 2
Process Systems Engineering Laboratory, DepL of Chemical Engineering, University of Sydney, Australia 2 CAPE Centre, Department of Chemical Engineering, Queensland University, Australia 3 CSIRO, Division of Food Science and Technology, Australia 4 Author to whom all correspondence should be addressed,
SUMMARY The conflicting demands for tighter environmental quality control on wastewater treatment plants while striving to lower operating costs has lead Sydney Water Corporation to embark on a 'crusade' to understand biological nutrient removal (BNR) processes and develop novel process control strategies to leverage this knowledge, The GIRD Novel Process Control Project is a collaborative attempt to demonstrate this on a pilot scale. An important feature of developing such technology is the implementation of 'intelligent monitoring'. This paper represents a twopronged approach to an intelligent monitoring strategy, including 1. the successful identification of optimal nutrient sampling locations in order to reduce sensor costs whilst retaining process information, and 2. the premature detection of process abnormalities to prevent uncontrollable operating conditions. PCA is employed to extract features from plant data and a pattern recognition approach is used in the development of fault related training clusters. Copyright © 1998 IFAC
Keywords: Wasterwater Treatment; PCA; Process Monitoring; Quality Control
1. INTRODUCTION
separation) is the use of micro-organisms that naturally occur in the activated sludge process. Biological nutrient removal can be broadly divided into the removal of nitrogen and the removal of phosphorus.
The requirement to remove certain nutrients (principally nitrogen and phosphorus) from wastewater effluent is becoming extremely important to New South Wales Sewage Treatment Plants (STP's). The need to remove nitrogen and phosphorus is apparent, due to their ability to promote eutrophication and associated problems in receiving water bodies. The NSW Environmental Protection Authority (EPA), along with the general public, have expressed their concern regarding the water quality of inland river systems, such as the Australian Hawkesbury-Nepean river system. Nutrient removal is classified as a secondary treatment process. The distinction between biological nutrient removal (BNR) and other removal process (chemical and physical
Whilst the characteristic properties of BNR systems are reasonably well understood, the application of advanced process control tools for performance monitoring is an increasingly important area to sewage treatment providers. Since the advancement of automation and distributed control, intelligent process monitoring has become increasingly important in the chemical process industry. This is due by the now availability of large volumes of plant data which essentially contains a 'blue-print' of the operating status of the plant at any time. This has meant that
559
strategies can now be put into place to utilise this 'wealth' of data and increase the amount of smart (hence intelligent) monitoring. For the GIRD Novel Process Control Project the availability of on-line and off-line historical data has meant that intelligent monitoring is not only an issue, but of great importance. Successful strategies which utilise historical data for early fault detection and optimal nutrient sensor locations fonn the backbone of the projects intelligent monitoring goals.
goal, however, a more desired target is the 'early' detection of process faults. The need for early fault detection is brought about by a number of conditions unique to biological systems:
Davis et al. (1996) have explicitly classified process monitoring, data analysis and data interpretation by numeric-numeric. numericsymbolic and symbolic-symbolic mapping's. A slight deviation from the conventional approach has lead to a consolidated strategy for intelligent monitoring within a pilot scale wastewater treatment plant. Figure 1 shows a schematic representation of the strategy. The newly proposed numeric-numeric 'feature extraction' step involves the Numeric- m of the optimal locat~ons for on• alysers. Numencline 1\T
<>
1'1
umenc
<>
In fault detection tenns, multivariate statistical process control techniques (Kresta et aI., 1991; Ku et al.. 1995; Piovoso and Kosanovich, 1995; Dong and McAvoy , 1994; Negiz and Cinar, 1995; Lewin, 1995) present a possible solution. The basic philosophy of multivariate statistical approaches, is that the behaviours of the process are characterised by data obtained when the process is operating well or in nonnal region. Subsequently, future unusual events can be detected by referencing the measured process behaviour against this normal region model. In other words, the nonnal region can be used as a calibration criteria for the performance of the process. The data bank (historical data) usually contains a wealth of information about the actual behaviour of the process. From this data, it will be possible to build up an empirical model to characterise the nonnal operation of the process. Referring to this model, the performance of the process can be evaluated and monitored on-line, which is essential for safe operation and constant high quality production.
1\T'
1'Iumenc
. . . . ' ....' ..--~:~.~ analysis/
,........- --...... Feature
( ....,,-......!;;:F=e=atu ...re.....-E_XlI_ac_ll_.o·n....J
t
C
Extras!;on
" Feature Extraction
Interpretation
NumericSymbolic
Biological systems typically have large timeconstants, which impact on the degree of appropriate control and implies that a significant 'lag time' could occur between the occurrence of a fault and its detection, in which time other process variables may be affected. A loss of biomass (bacterial component of sludge) means a process down time of approximately 30 days (time required to grow biomass). Any number of process faults could lead to a loss ofbiomass. hence early detection is critical.
=>'V
2. PROCESS DESCRIPTION Modem day wastewater treatment processes are a combination of physical. chemical and biological systems. utilised to breakdown or degrade waste into a safer, more disposable product. In this case the process under investigation, was primarily concerned with the biological removal of both nitrogen and phosphorus from municipal wastewater. The appearance of algal and bacterial blooms and the widespread loss of aquatic life in receiving waterways has initiated the development of such 'nutrient' removal processes. The configuration adopted for the pilot plant is the socalled Johannesburg configuration shown in
Fig 1. The Consolidated Strategy
In Figure 1. X represents the raw plant data. X' represents preprocessed plant data. IV' represents the nutrient sensor locations identified as optimal and IV represents the development of fault-related training clusters and their associated causes. The overall strategy presents a novel approach to process fault detection within the BNR continuous pilot plant. Fault detection alone is an important
560
Figure2.
regeneration and the impact that a loss of biomass can have on the overall process it is apparent that a 'final product inspection' system is not completely adequate. As a result. the economic and environmental benefits from early process fault detection is rather big indeed. This can be achieved by a so-called intelligent process monitoring scheme. Intelligent monitoring in this context refers to a scheme which can automatically utilise (extract) the information contained within the plant data set to quantify the performance of the process and provide possible indications of process abnormalities if required. A step-wise algorithm can be used to understand the method used for intelligent process monitoring.
WAS
Fig. 2. Process flowsheet
Step 1. Data Preprocessing: The raw data
2.1 Zone-by-Zone Process Description
gathered from the pilot plant contained missing points, gross errors and outliers which have the ability to seriously affect the integrity of the data set. Computer tools were developed in MATLABTM to transform the raw measurements into a complete data set. Rossner' s many outlier test was used to detect and remove outliers and simple linear interpolation proved adequate for the missing point replacement and gross error detection and replacement steps.
Fermentation Zone: The fermentation zone is where the Readily Biodegradable Chemical Oxygen Demand (RBCOD) is produced by the break down of organic compounds in order to increase the volatile fatty acids in the sewage to enhance biological phosphate release. Anaerobic Zone: The anaerobic zone is where the phosphorous accumulating organisms (PAO) are able to take up the volatile fatty acids and store them within their cells, thus releasing phosphorous. This zone is characterised by the lack of dissolved oxygen and nitrate.
Step 2. Principal Components Analysis: The preprocesed data collected from the pilot plant is normally high correlated, therefore the direct utilisation of the data for characterising the process can lead to an unstable situation. Principal Components Analysis (peA) (Jackson, 1991) is employed in our approach to summarise and extract information from the data for a multitude of purposes.
Anoxic Zone: The anoxic zone is where the biological denitrification occurs, and must contain an adequate organic food source for nitrates to be reduced to nitrogen gas. This zone is characterised by the presence of nitrate and lack of dissolved oxygen.
In a general problem, process measurements are collected from the plant and arranged in a (nxm) matrix X consisting of n observations on m variables. The objective of PC A is to find a new set of orthogonal bases p 1 , p2 , ... , p d . then J'ust use the
Aerobic Zone: The aerobic zone is where the biological nitrification, oxidation of organic matter and phosphorous uptake occurs. This zone is characterised by the presence of dissolved oxygen.
first q bases p ,p , ... , p (q < d) to represent the 1
Secondary Clarification: The function of the
2
q
original data without losing any important information. This actually tries to capture the main structure of the whole data and represents it in a low dimension subspace (latent variable space). In this way, the dimension of the monitoring space will be greatly reduced and the projected variables will be un-correlated. In fact. this is done by the principal component transformation, which is given by:
clarifier is to produce a clear effluent by separating the solids from the mixed liquor and a thickened sludge for recycle to the anaerobic zone 3. INTELLIGENT MONITORING OF WASTEWATER TREATMENT Like all chemical processes. the successful operation of a wastewater treatment plant requires a reliable on-line monitoring and diagnosis scheme. When considering the time (approximately 30 days) required for biomass
z=pTx where Z is the vector of latent variables, P is the principal component co-ordinate axes.
561
a pseudo-multivariate performance monitoring chart.
Step 3. Identification Of Optimal Nutrient Sampling Locations: The current sampling regime for nutrient measurements involves daily sampling for nutrients from six different locations within the plant. The economics for utilising on-line sampling methods in only three locations ranges from AUS$84,209 to $99,800. Hence to adopt an on-line procedure in the current format would be both 'measurement intensive' and ' cost expensive'; the need to identify the optimal sampling locations thus being apparent. PCA was used to identify those variables and locations which were most affected by small changes in process variations, this was done by looking at the principle loadings (weights) of the transformed data sets. Process plant intuition was then used to verify the identified sites.
To consolidate the normal data points, it is essential that a 'bound' of some sort be constructed to adequately encompass the region. Two approaches have been taken for this case: CASE I - Elliptical Function: A superficial approach to a confidence bound was initially taken using an elliptical function whereby the data set was assumed to be normally distributed and the diagonal elements of the covariance matrix of the data set define the major and minor axis. CASE2 - Probability Density Function: A more advantageous approach, is the use of a nonparametric method to define the normal operation region; in this way, no assumptions are made about the underlying state of the data set. To accomplish this, Chen's et al. (1995) suggest the use of probability density function (PDF) as a way for the construction of normal region. The kernel estimator used as suggested by Chen and Romagnoli is the following:
Step 4. Normal Operation Region Construction: The process of defming and constructing a normal operation region was initially reduced to splitting the available historical data into 'blocks' of good operation and bad operation (a 'startup' block may also exist). For the purpose of biological nutrient removal, the process can be broadly split according to nutrient removal type, ie. nitrogen removal and phosphorus removal. Considering an example of nitrogen removal as the process being considered, the validation criteria for some key nitrogen removal parameters are:
o o o o
ion-
~;:
fex L
_~{(X_(i.I)-XU,l))' + (X_ (i.2 1- XU.2»)'}]
P 2
(hI)'
(h 2)'
Step 5. Fault Training Cluster Development: Fault detection again makes use of the available plant historical data, in some what of a 'blue-printing' fashion . Conditions of poor plant operational status can be extracted from the historical data and used to construct 'training clusters' for a particular known fault. When considering future on-line measurements, if a data point is located within a fault training cluster then the appropriate degree of diagnosis and action can be promptly taken. The first step in process fault detection is the development of these fault training clusters. This step highlights whether or not it is possible to differentiate between normal and abnormal conditions, and furthermore whether it is possible to discriminate between process fault types. The terms 'differentiate' and ' discriminate' are used in a visual sense, ie. is it possible to see (on a performance monitoring chart) the above mentioned conditions.
The task of defining a normal operation region for nitrogen removal involves locating the days in which the above criterion were all met, this is done in order to ensure that the data used to construct the normal operation region does not contain any periods of time where the validation criteria are violated. PCA was again used to transform the measurement variables into the corresponding latent variable space. The validity of each transformation was established by calculating the percentage of variance explained by the first two principle
11 + 12
. ~~
The implementation of the above mentioned methodology was carried out via a MATLABTM routine
Clarifier effluent NH3 - N < 0.5 mgIL Clarifier effluent total N < 10 mgIL Anoxic zone effluent NOx < I mgIL RAS NOx - N < 0.5 mg/L
components ie.
I 2f1n(hl)' (h2)'
I'L Ij , where Ij is the ith
eigenvalue. For the two-dimensional case to be valid a preset lower limit of 90% was required. The first two principle components where then plotted against each other to form the beginning of
Essentially, the mathematical approach used is similar generation of the 'normal' data points, however in this case the eigenvectors used for the
562
transformation are the corresponding 'normal ' data eigenvectors. In doing this, the abnormal status of the plant is directly referenced to the normal status.
Probability Oensity Function Normal Operation Region ..:....... , .............................., ... ... , . ......, ..... .
2 .5
1: :::·:1::··::r:;:1;~::::f:::::~;:···::j::::··I:::::l::::::~ • •.. ~ . . ... o~....~.~.\~ ..~.~ .... . ~ ......~... . .. ~ ..
1
'" ~j .• •!• ot:~t\t06t• f• ",·Ol••• ~
Step 6. Fault Detection And Classification: Once abnormal events have been detected. a cluster analysis technique was used to identify the source of process faults. In this case. the similarity measure used were the cosine of the angle between the latent variable and the centre of the clusters previously defined for particular disturbance conditions. The trigonometric properties of cosine are taken advantage of here.
·2.5
·3
-4
·2
·1
0 PC l
4
Fig. 3. Probability density function normal operation region
2
. . . . . -- --~--- -+. : -~·+:.·.:-~: ::: ~ :·.:.·- ·:.1- ~ ·-.-.-
.
..
(x x y) = IxllYlcos (a) ~
.. ~ .... ... ~
.--- ---- -----.- -' ~ -...:- -- -.:.. - - --
":.
\
\
\.
\\ Internal multiple: x ·l
\\\
\.~.----. --..-\\. .
I r::-:-::r ~ IxlYJ = ",''X· X· • "y . y'
where
~ X =cent er - point of training cluster
and
y
therefor
cos( a) = IxllYl
3
=scaled and transformed new data point (XxY)
5
Fig. 4. Elliptical normal operation region When comparing these two figures, it is seen that the points which are outside the elliptical region are now inside the normal operation region. implying that density estimation technique is a more 'natural' approach for signifying the threshold between normal and abnormal operational status. In practical terms, when using the elliptical approach, special attention should be paid to the assumption that the data is normally distributed. As indicated by Martin and Morris (1996) if the data does not follow the normal distribution as is true for most cases the results could be misleading.
- I < cos( a) < + 1
If the new data point and the training cluster centre-point are located in a similar space then as a ~ 0, cos(a) ~ 1. 4. RESULTS Nutrient measurements were taken daily in an offline manual procedure from six locations. Primitive data analysis including cross-correlation indicated that the data contained enough information to explain the dynamic behaviour of the process. The historical data used to generate the normal operation region and the fault training clusters was taken over a five to six month period of time.
Performa nce Monitoring plot for N- Removal
N
2
The comparative result of using both the elliptical function and the probability density function for the normal operation region are sho\'itl in Figure 3 and 4.
. ~ L-
·10
____
~
______
·5
~
______
0
~
______
5
pnnctpal comp one nt 1
Fig. 5.
563
Performance monitoring plot for Nremoval
~
10
·r1s in 1h! I>«obc Zl:re
operation region for performance monitoring. In the case of faulty operation, training clusters were developed to associate the differentiation of faults within the Cartesian geometry. Following on from the training cluster development, a pattern recognition approach was used for the detection and classification of new plant data. Again this step relied on the use of the probability density previously defined to initially detect a faulty data value .
4
3 2 1 PC2 0 -1
~
-2 -3 -4
::::::::>
... ... ...+ ... ......
... .j;~?+ :t
.-;>Y;.
0.
. :.
+
.....
-2)
-10
0 PCl
10
2)
30
40
REFERENCES
Fig_ 6. Fault points in the aerobic zone
Ch en J., A Bandoni and J.A Romagnoli (1995), A Kernel Approach to Normal Region', Multivariate Statistical Process Monitoring for Gross Errors and Process Fault Detection,
Figures 5 and 6 are examples of combining the normal operation region with the fault training clusters for the cases of nitrogen and phosphorous removal. In Figure 5, the circles represent an abnormal operation status of the anoxic zone, whilst the points are isolated faults within the clarifier. In Figure 6, the circles represent the status of phosphorous removal during the plant start-up period and the crosses indicate either a high nitrate level in the RAS tank or a low RBCOD level in the fermenter.
Proc. of AIChE, Annual Meeting
Davis J.F., K.A. Kosanovich and M. Piovoso (1996), Process Monitoring, Data Analysis and Data Interpretation, AIChE Symposium Series
Dong D. and T. McAvoy (1994), Nonlinear Principal Component Analysis--Based on Principal Curves and Neural Networks, 1994 Proce. Am. Control.
Jackson J.E. (1991), Users Guide to Principal Components, Wiley, New York Lewin D.R. (1995), Predictive Maintenance Using PCA, Control Eng. Practice Kresta J.V., J.F MacGregor and T.E. Marlin (1991), Multivariate Statistical Monitoring of Process Operating Performance, The
It is evident from both figures (and also others not shown here) that the underlying process status can be categorised into different clusters. Furthermore, the classification technique based on the cosine measure can be successfully implemented. However, for different situations a different measure for similarity may be required ie. distance.
Canadian 1. Chem . Engng
Ku W., R.H Storer and C. Georgakis (1995), Disturbance Detection and Isolation by Dynamic Principal Components, Chem. and
5. CONCLUSIONS AND DISCUSSIONS
Intel. Lab. Sys.
This paper presents a method for intelligently monitoring the quality control of a BNR wastewater treatment pilot plant. The procedure initially includes the preprocessing of the data and the selection of the optimal sensor sampling sites to be used for the resulting intelligent monitoring strategy. Baselines from historical data for both normal and faulty plant data were developed. In the case of normal operation conditions, a normal operation region for performance monitoring was produced. Two methods of construction (elliptical and probability density functions) were used to highlight the visual capability of the normal
Martin E.B. and AJ. Morris (1996), Non parametric Confidence Bounds for Process Performance Monitoring, J. Proc. Cony. Negiz A, and A. Cinar (1995), A Parametric Approach to Statistical Monitoring of Processes with Autocorrelated Observations, Proc. of AIChE, Annual Meeting,
Piovoso M. and K.A. Kosanovich (1994), Applications of Multivariate Statistical Methods to Process Monitoring and Controller Design 1nt. J. Control
564