You are on page 1of 12

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/242216864

AN INTELLIGENT DECISION SUPPORT SYSTEM FOR WASTEWATER


TREATMENT PLANT MANAGEMENT

Article · January 2007

CITATIONS READS

0 474

2 authors, including:

Robert E. King
University of Patras
83 PUBLICATIONS   628 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Shallow learning View project

All content following this page was uploaded by Robert E. King on 08 March 2014.

The user has requested enhancement of the downloaded file.


AN INTELLIGENT DECISION SUPPORT SYSTEM
FOR WASTEWATER TREATMENT PLANT MANAGEMENT
Anna STATHAKI and Robert E. KING
Data and Knowledge Engineering Group
Computer Technology Institute, Athens, Greece
E-mail: stathaki@cti.gr

ABSTRACT

The paper describes the design of a finite state automaton which forms the kernel
of an Intelligent Decision Support System that has been implemented and inte-
grated into the existing supervisory control and data acquisition system at a medium
scale municipal Wastewater Treatment Plant. The system provides real-time sup-
port and advice to the operators and the manager of the plant for a wide range of
operating situations by following the policy that the plant manager follows to main-
tain normal operation. The system has proved effective in managing the complex
process in all but extreme environmental conditions and performs equally well and
more consistently than the human operator. The paper describes the emulated
knowledge-based automaton designed in the MATLAB/ Simulink environment.

NOMENCLATURE

WWTP = Wastewater Treatment Plant


ASP = Activated Sludge Process
SCADA = Supervisory Control and Data Acquisition System
IDSS = Intelligent Decision Support System
BOD = Biological Oxygen Demand
COD = Chemical Oxygen Demand
SS = Total Suspended Solids
N = Total Nitrogen concentration
N-NH4 = Ammonium Nitrogen concentration
N NO3 = Nitrate Nitrogen concentration
P = Phosphorus concentration
MLSS= Mixed Liquor Suspended Solids
RASS= Suspended Solids in the Recycled Sludge
ΔO2 = Incremental change in the Oxygen set-point
ΔWSR = Incremental change in Waste Sludge Flow Rate
ΔAnoxic = Incremental change in the Anoxic Bioreactor Aeration Rate
Q = influent flow rate
1. INTRODUCTION

Using only data acquired at irregular intervals from infrequent, unreliable and erratic meas-
urements of the effluent of the Activated Sludge Process (ASP), the task of the plant man-
ager is to maintain performance variables within prescribed limits so that bounds specified
by the European Community are met. The manager specifies the set-points of the desired
performance variables over a future time horizon and the process is allowed to coast until
the next measurements are acquired. It is hoped that nothing unforeseen will occur in the
meantime. Measurements are made once or at most twice a day at which time new set-
points are specified. The ASP is sensitive to changes in the influent parameters caused by
excess rainfall and cold weather as well as abnormal usage by local industries that dump in-
dustrial wastes into the sewage system. These occasions overload the treatment facility and
tax both management and physical plant.

Despite these adverse conditions, plant managers are able to manage the process ‘in the
mean’ making corrections as necessary, using their knowledge, experience, skill and ingenu-
ity. Situations arise that are not foreseen and performance variables drift outside the per-
missible limits, resulting in additional cost in materials and energy to restore normal opera-
tion and sometimes fines.
The ASP is the principal stage of any wastewater treatment plant (WWTP) and is a large-
scale process with large time constants and measurement delays, random exogenous distur-
bances, bounded manipulated variables, multiple and often conflicting objectives and worst
of all, sparse and unreliable measurements. These adverse conditions make the task of con-
trolling such a process automatically almost impossible using any of the classical method-
ologies [1]. While a number of advanced control techniques have been proposed to resolve
this very challenging and important societal problem, few such systems have been commis-
sioned in medium or large scale plants to date. Computational intelligent techniques [2-6]
have of late been migrating to environmental systems and offer great promise in the task of
supporting operators and managers alike in arriving at consistent decisions and some ef-
forts have been made to close the management and control loop.

Due to the complexity of the process and the scarcity of well-trained operators, intelligent
decision support systems which can recommend what correcting actions should be taken to
restore the process to its desired state after a disturbance would be extremely useful for
both abnormal as well as normal operating conditions subjected to day to day disturbances.
Intelligent methods combine available knowledge on how to manage the plant expressed in
the form of linguistic rules that human operators understand best, with computational
methodologies that can interpret and manipulate such heuristics. This field involves a di-
verse body of techniques that have proved effective in addressing a host of real large scale
plants. Indeed the process industry embraced intelligent methodologies whether expert,
fuzzy and neuro-fuzzy [7,8] some thirty years ago and considerable experience has been ac-
cumulated on their use, advantages and limitations. Environmental systems pose an even
more significant and urgent challenge, a challenge that must be resolved quickly especially
in large urban areas.

In this paper, we present a simple yet effective, Intelligent Decision Support System (IDSS)
whose kernel is a multi-layered perceptron or automaton [9,10]. The system offers recom-
mended actions to plant operators and managers so as to maintain the plant in the desired
operating state, i.e. an intelligent regulator. The intelligent system, whose emulation is de-
scribed in this paper, has been implemented and clinked to the existing Supervisory Con-
trol and Data Acquisition (SCADA) system at a medium scale municipal waste water treat-
ment plant. The system addresses the problem by forcing the manager to take into account
a multiplicity of factors which he may have ignored before recommending actions. It is
also capable of responding rapidly to ‘what if’ scenarios from which the manager can de-
duce alternative policies. Once sufficient confidence in the system is obtained, decisions
can be applied directly to the plant without human intervention thereby closing the man-
agement loop. It has been found that effecting incremental changes can improve overall
plant performance by speeding recovery from an unforeseen disturbance.

2. THE ACTIVATED SLUDGE PROCESS


The activated sludge process involves three or more bioreactors in series in the forward
path from influent to effluent. In each bioreactor the wastewater undergoes treatment with
the object of removing organic load. The process has an inner loop in which a fraction of
the sludge from the effluent stage is returned to the first and possibly second bioreactors of
the ASP and an outer loop where a fraction of the effluent from the settling tank is re-
turned to the influent. This is essential to maintain the bio-organisms within the process. A
schematic of a typical wastewater treatment plant is shown in Figure 1 while a detailed de-
scription of the various stages can be found in [11-13]. The Activated Sludge Process (or
Secondary Treatment stage) is referred to in the figure as The Biological Filtration stage
and is linked tightly to the Final Settlement, sometimes referred to as the Humus Tank.

Fig.1. A schematic of a typical wastewater treatment plant.

Most WWTP possess supervisory control and data acquisition systems through which plant
managers and operators interact with the process. Field controllers are invariably used at
the executive layer of the control system to enforce the corrective actions whereas the
overall process is invariably controlled manually [1]. Automatic control is rarely if ever
used. Managers and operators can readily adapt to slowly changing weather conditions but
rapid changes can tax even the most experienced. Control is normally effected by changing
the rates of the air forced into the aerobic bioreactors and the waste sludge returns ratio.
3. THE DECISION SUPPORT SYSTEM

Every real-time industrial management and control system using computational intelligence
comprises three components: the real-time database which is the repository for real-time
data acquired from the process, the knowledge base which contains the knowledge and ex-
perience about the process and how it must be managed and finally in the form of linguistic
if-then rules and the inference engine that computes the actions that must be applied to the
process to achieve the desired objective.

Following completion of data acquisition which is a combination of on-line and off-line


measurements and visual observations, the inference engine is executed and searches the
knowledge base exhaustively to determine the degree to which every rule contributes to the
final decision. If the result is unique then this action is proposed. When more than one rule
contributes to a decision, the inference engine must weigh the influence of every rule be-
fore arriving at a crisp action to propose. Here the challenge is one of developing a simple
and robust decision support system whose decisions which will lead to a performance com-
mensurate to that of an expert plant manager. It must be emphasized that the IDSS cannot
be expected to be better than the human whose decision-making process it emulates, but it
can be expected to be more consistent.

The complexity of the process leads plant managers to use primitive rule structures to con-
trol it. Most often, the rules are simple cause - effect relationships [4] leading to ‘a one ac-
tion at a time’ policy. Though simple to comprehend and simple to implement, this policy
can lead to long recovery times since every time a corrective action is taken, the manager
must wait for the process to quiesce before applying the next action. Plant managers in
general are very reluctant to apply multiple actions as they have difficulty interpreting the
outcome of multiple actions. The IDSS presented in this paper accordingly follows the
same management policy.

An excerpt of the knowledge base for the specific municipal ASP is shown in Table A in
the Appendix. These cause-effect relationships are typical of the way that plant managers
and operators are trained to control an ASP. It should be obvious that the knowledge base
is very sparse. Of the 11 measurements from process now expressed in symbolic form only
7, are numerical, the remaining being visual. Some of the measurements are obtained from
on-line instrumentation while others are the result of off-line laboratory analysis which
takes time to perform. The BOD for instance, takes 5 days to determine in the laboratory.

A cursory look at the excerpt of the knowledge base in Table A indicates that there are
numerous rules that have identical causes (or antecedents) yet they have very different effects
(or consequents). This apparent paradox appears natural to a plant manager yet it plays
havoc with any computational intelligence technique. What appears contradictory at first
becomes apparent once it is realised that the recent past history of the process plays an im-
portant role. This is not surprising since most industrial regulators and controllers do have
memory to recall recent actions. Thus which of the 31 rules are pertinent at any decision
instant depends on the recurrence of the cause, i.e. how many times have the same conditions
appeared in the last couple of days. Thus, for example, Rules 1 and 2 have identical causes
and yet their effects are very different should the very same causes have occurred earlier.
The same holds true for Rules 3, 4 and 5 as well as Rules 6, 7, 8 and 9 etc. To make this
easier to comprehend, a recurrence index has been added to each rule (e.g. L1, L2, L3 etc.),
to indicate which rules can be used by the automaton at any instant to arrive at a decision.
The causes (or inputs to the IDSS) are the performance variables BOD, SS, N_NH4,
N_NO3, P, MLSS and RASS respectively. The effects (or outputs of the IDSS) are the pro-
posed changes in the Oxygen set-point ΔO2, the change in waste sludge flow rate ΔWSR
and the change in the anoxic bioreactor aeration rate ΔAnoxic as shown in the Table in the
Appendix.

S(mall) M(edium) L(arge)


min max min max min max
BOD mg/l 5 25 25 100 100 ---
SS mg/l 10 35 35 50 50 ---
N NH4 mg/l --- 2 2 10 10 35
N NO3 mg/l 2 8 8 12 12 ---
P mg/l 0.2 1 1 --- --- ---
MLSS g/l --- 2.5 2.5 3 3 ---
RASS g/l --- 7 7 8 8 ---

Table 1: Numeric to symbolic conversion of the precedents.

It is noted that the knowledge base of the IDSS involves a small number of seasonal rule
bases to account for the different seasons of the year plus a rule-base for special occasions
where brute force action is called for to deal with these cases. The plant manager specifies
which rule base the IDSS must use through a graphical user interface.

3.1 The Inference Engine

As noted earlier the kernel of the IDSS is the inference engine which examines all causes
and infers the appropriate effect which it then proposes to the plant manager. Here the
causes are specified in terms of symbolic variables following numeric-to-symbolic conver-
sion for each of the 7 numerical variables as specified in Table 1. This constitutes the nu-
meric-to-symbolic conversion table [9] that relates the numerical to their symbolic equiva-
lents. Thus for example, the key performance measurement is the BOD which is consid-
ered S(mall) if it lies in the range 5<BOD≤25, M(edium) if it lies in the range
25<BOD≤100 and L(arge) when BOD>100. The effects, or recommendations are de-
noted as PS (Positive Small), P (Positive), NS (Negative Small), and N (Negative) respec-
tively and correspond to changes of ±5% or ±10% in the value of the relevant control
variables. Though apparently coarse, this form of quantized control is easy to implement
and adequate. No entry in the consequence part of the rule means that no change is re-
quired.

Only three support sets for the performance variables are used, viz. S(mall), M(edium) and
L(arge) in accordance with effluent quality standards specified by the EU which are sum-
marised in Table 2. This means that the corresponding fuzzy sets are rectangular or Boolean
whose membership functions take the form μA (x) = 1 if x∈A and μA (x) = 0 if x∉A,
whereupon the linguistic rules can be specified in terms of logical conditional statements of
the form

“if x is A then y is B”, where A and B are Boolean sets.

The simplicity of Mamdani’s implication rule [2,7] thereby permits simple implementation of
the inference engine using a sequential machine (or automaton) which involves simple logi-
cal r statements since most operations are performed with logical operations.

BOD COD
SS mg/lt N mg/lt P mg/lt
mg/lt mg/lt
25 125 35 10 1

Table 2: Maximum Permissible Concentrations of the performance variables set by EU standards

3.2 The Multi-layered Perceptron


Multilayer perceptrons are precursors of neural networks whose history can be traced back
almost half a century to Learning Machines [13]. In this class of sequential machines, a
threshold logic unit replaces the compression function found in multilayer neural networks.
Multilayer perceptrons can be used in our case to implement the rule-based inference en-
gine of the DSS, since every linguistic rule can be translated into a series of logical state-
ments. This fact simplifies implementation of the inference engine significantly by making
use of logical functions. The operator OR and the connective AND found in fuzzy infer-
ence engines are thus replaced by the operations max and min respectively. Delay operators
provide the memory to recall the most recent history of the decisions of the IDSS. A fast
prototype of the perceptron was developed in MATLAB/Simulink and shown in the flow
diagram of Fig. 2. The leftmost blocks in this flow diagram are numeric-to-symbolic con-
verters whose outputs are the logical variables S, M or L expressed in binary form.
Having a parallel architecture, the multi-layer perceptron examines all the rules in the
knowledge base simultaneously to determine which ones are pertinent at every decision in-
stant, given the most recent history of the process. The first layer comprises a set of zone
selectors, whose limits are defined for each cause in accordance with the numeric to sym-
bolic Table 1. These elements in effect convert the numerical inputs to binary form with
three outputs. A ‘Small’ value is defined by the triplet (0 0 1), a ‘Medium’ value as (0 1 0)
and a ‘Large’ value as (1 0 0). The second layer of the automaton acts as the inference en-
gine (min or AND operations) and includes the recurrence index counter that is of para-
mount importance in selecting which rule subset is pertinent at any instant. The reason for
using only a subset of the 17 rules of the total of 31 rules is that the incidence index deter-
mines which of identical precedents must be used at any instant.
The third and final layer of the IDSS performs de-fuzzification using the OR operation to
yield a numerical value for the decision. This is an array of six variables that can take on
values of 0, ±5 or ±10% which are the recommended percentage changes to the pertinent
field controller set-points. In Manual mode these recommendations are displayed on the
plant operator’s or manager’s console and he must make the final decision on the actions
applied. The manager may choose to ignore the recommendation. If the plant operator or
manager approves the recommendations of the IDSS then they are transmitted to the rele-
vant field controllers for immediate action. In Automatic Mode be selected then the rec-
ommendations are transmitted to the field controllers directly without further intervention
from the manager and the actions are logged for historical purposes. It is also noted that all
operations following the first stage of the automaton and until the final stage are performed
very rapidly since Boolean logic instructions are used. These can readily be embeddded on
a PLC for direct automatic regulation.

Fig. 1. The multi-layer perceptron flow graph in MATLAB/Simulink form

Control of the process is achieved by linking the automaton to the existing plant
SCADA and the structure of the IDSS has the advantage that it can be linked to the ex-
isting SCADA system which remains intact, an important consideration when it comes
to commissioning the system.
On completion of exhaustive testing with the MATLAB prototype, a real-time version was
implemented in Visual Basic with the appropriate user-friendly human-machine interface
and commissioned at a medium scale municipal wastewater treatment plant and linked to
the existing plant SCADA system at the Municipal Waste Water Treatment plant. In the
on-line IDSS in Manual mode certain performance variables are obtained from real-time
measurements available in the system SCADA while others, including visual variables are
entered manually from the laboratory. When all relevant information is acquired the IDSS
infers decisions and informs the operator and manager. The system takes action when ei-
ther accepts these recommendations.

4. SIMULATION RESULTS

The operation and effectiveness of the IDSS was demonstrated through simulation with a
dynamic model of the ASP that was implemented in MATLAB/Simulink. The bioreactors
were modelled using the ASM2d model [14] while the settler was approximated using a ten-
layer striated model. It was assumed that the first bioreactor had internal re-circulation and
that the airflow rate supplied to the bioreactors was equally distributed in the last bioreac-
tors. For purposes of this simulation rules that involved visual performance variables were
eliminated. The influent was assumed to have the following nominal values: Q = 25000
m3/d, BOD = 450 mg/l, NH4 = 20 mg/l, COD = 600 mg/l, N = 25 mg/l, P = 7.5 mg/l
and SS = 220 mg/l. To all variables a 10% uniformly distributed random signal was added
to represent measurement noise.
400 25

350

20
300
Ammonium [ mg lt ]

250
BOD [ mg lt ]

15

200

Medium
10
150

Medium
100
5

50
Small
Small
0 0
0 5 10 15 20 25 0 5 10 15 20 25
t [days] t [days]

Fig. 2: Effluent BOD concentration Fig. 3: Effluent N_NH4 concentration

600
25

500
20
Total Nitrogen [mg lt ]

400
COD [mg lt ]

15

300

EU Directive
10
200

EU Directive
5
100
Fig. 4: Effluent CO
0 0
0 5 10 15 20 25
t [ days ]
0 5 10 15 20 25
t [ days ]

Fig. 4. Effluent COD concentration Fig. 5: Effluent N concentration


7 250

6
200

Total Suspended Solids [ mg lt ]


Total Phosphorus [ mg lt ]

150
4

3
100

EU Directive 50
1 EU Directive

0
0 5 10 15 20 25 0
t [ days ] 0 5 10
t [days]
15 20 25

Fig. 6: Effluent P concentration Fig. 7: Effluent SS concentration

0.285

350
0.28

0.275 340

0.27
WSR [ x100 % ]

Qair ⎣⎡ m 3 hr ⎦⎤

330

0.265

320
0.26

0.255 310

0.25
300

0.245
0 5 10 15 20 25 0 5 10 15 20 25
t [ days ] t [ days]

Fig. 8: Excess Sludge Removal Fig. 9: Air Flow Rate Supply

Figs. 2 to 7 show the temporal behaviour of the effluent BOD, N_NH4, COD, N, P and total SS
concentrations for the effluent of the simulated ASP and the manner in which the plant recovers
from an initial offset following the recommendations of the IDSS. The IDSS corrections on the per-
centage excess sludge removal (WSR) and airflow rate supply to the bioreactors are shown in Figs. 8
and 9 respectively. Corrective action appears ten days after plant initialisation due to delays in meas-
uring the BOD and the discrete nature of the corrections is evident. It is observed that all perform-
ance variables are met satisfactorily and about 15 days later the process reverts to an operating state
where all performance variables are within specifications.

5. CONCLUSIONS

For more than 30 years Computational Intelligence techniques have been diffusing into the man-
agement and control of large-scale industrial processes. The management of environmental proc-
esses presents interesting challenges and it is our contention that these techniques can offer simple
solutions to a very difficult problem. The paper presents the design of a simple yet effective intelli-
gent decision support system for the management and control of a medium scale waste water treat-
ment plant. The prototype system was developed in MATLAB/Simulink and tested on a simulator
of the plant. Once exhaustively tested, the software was subsequently recoded into executable form
to execute on a PC that was linked to the plant SCADA system through a local area network. Ap-
plied to the physical plant, the IDSS performed as well as the plant manager and did so consistently.
At no time did the manager disagree with the recommendation of the IDSS and the actions pro-
posed were applied.

ACKNOWLEDGMENT

The work described here formed part of Project ‘CENTAUR’ 00ΒΕ348 that was funded by the
Greek Secretariat for Research and Science and Technology of the Ministry of Development and the
Municipal Water Authority of the City of Volos, Greece.

REFERENCES

[1] Vrecko D., Hvala N. and Kocijan J.: "Wastewater treatment benchmark: What can be achieved with
simple control?" Proc. IWA Conference on Instrumentation, Control and Automation, Malmo, pp.
221-228, 2001.
[2] King R E.: Computational Intelligence, Marcel Decker, N.Y., 1999.
[3] Passino K. M.: “Intelligent Control: An overview of techniques”, Chapter 5 in Perspectives in Con-
trol Engineering – Technologies, Applications and New Directions, (Ed) Tariq Samad, IEEE Press, N.Y.
2000.
[4] Tong R. M., Beck M. B. & Latten A..: “Fuzzy Control of the Activated Sludge Wastewater
Treatment Plant”, Automatica, Vol. 16, 6, pp 695-701, 1980.
[5] Manesis S. A., Sapidis D. J. and King R. E.: "Intelligent Control of Wastewater Treatment
Plants", Artificial Intelligence in Engineering, Vol. 12, No. 3, pp. 275-281, 1998.
[6] Lu Y-Z.: Industrial Intelligent Control, J. Wiley, N.Y., 1996.
[7] Patyra M. J. and Mylnak D. M.: Fuzzy logic implementation and application, J. Wiley-Teubner, 1996.
[8] Kalogirou S. A. : “Application of artificial neural networks for energy systems”, Applied Energy
Journal, Vol. 67, No, 1-2, pp 17-35, 2000.
[9] Passino K. M., Sartori M. A. & Antsaklis P. J.: “Neural computing for numeric-to-symbolic con-
version in control systems”, IEEE Control Systems Magazine, pp 44-52, April 1989.
[10] Nilsson N. J.: Learning Machines, McGraw Hill, N.Y., 1965.
[11] Olsson G. & Newell B.: Wastewater Treatment Systems, IWA Publishing, London, 1999.
[12] – Wastewater Sludge (Manual of Practice No Om-9, Operations and Maintenance), Water Environment
Federation, 1989.
[13] Nielsen M. K., Madens H. & Carsetensen J.: “Identification and Control of Nutrient Removing
Processes in Wastewater Treatment Plants”, Proc. IEE Conference on Control Applications, Glasgow,
pp. 1005-1010, 1994.
[13] Miller R.M., Itoyama K., Uda A., Takada H. and Bhat N.: “Modelling and control of a chemical
waste water treatment plant”, Computers & Chemical Engineering, Vol. 21, pp. 947-952, 1997.
APPENDIX A
Excerpt from the knowledge base elicited from the plant manager. The numeric accompanying every
linguistic variable specifies the incidence index. No entry implies a null. The first 11 columns are the
cause while the last 4 are the effects. The linguistic variables in the Table are defined as S(Small),
M(Medium), L(Large), SN(Small Negative), SP(Small Positive), N(Negative), P(Positive).

Bulk- Bulking Blan-


Rising
BOD SS N NH3 N NO3 P MLSS RASS ing (visual) ket ΔO2 ΔRAS ΔWSR ΔΑnoxic
(vis-
mgl mg/l mg/l mg/l mg/l g/l g/l (visual) non- (vis- set % m3/d m3/d
ual)
fibrous fibrous ual)
R1 S1 S1 S1 S1 S1 M1 M1 L1 SN
R2 S2 S2 S2 S2 S2 M2 M2 L2 SP
R3 M1 SP
R4 M2 SP SN
R5 M3
R6 L1 P
R7 L2 P N
R8 L3
R9 L4 P N
R10 M1
R11 M2 SP
R12 M1
R13

Table A. Excerpt from the knowledge base

View publication stats

You might also like