Documente Academic
Documente Profesional
Documente Cultură
WAT E R R E S E A R C H
Available at www.sciencedirect.com
A B S T R A C T
Article history:
The sequencing batch reactor (SBR) is a widely used process for biological removal of
29 December 2005
switching schedule with ample margin for possible inaccuracies, with the result that the
process operation is highly inefficient. This paper proposes a switching strategy based on
Keywords:
Pattern recognition
and the use of an inferential engine to determine the most appropriate switching schedule.
Fuzzy clustering
In this way the duration of each phase is limited to the time strictly necessary for the actual
Artificial intelligence
loading conditions. Experimental results show that the treatment cycle can be significantly
Wavelet transform
shortened, with the results that more wastewater can be treated. The switching strategy is
Wastewater treatment
Soft computing
including pH, oxido-reduction potential (ORP) and dissolved oxygen (DO). They include
Process control
wavelet filtering for signal denoising and fuzzy clustering for features extraction and
decision-making. The formation of a knowledge-base and its adaptation during the
operation are also discussed.
& 2006 Elsevier Ltd. All rights reserved.
1.
Introduction
ARTICLE IN PRESS
1096
WAT E R R E S E A R C H
1.1.
1.2.
1.3.
ARTICLE IN PRESS
1097
WAT E R R E S E A R C H
Anoxic-anaerobic
Settling
&
Extraction
Aerobic
mg L-1
Loading
20
10
0
DO (mg L-1)
ORP (mV)
pH
60
150
240
300
360
60
150
240
300
360
60
150
240
300
360
60
150
240
300
360
6
4
2
50
0
-50
-100
-150
8.5
8
End of denitrification
End of P-release
Exact
anaerobic
phase
Exact
aerobic
phase
time (min)
Fig. 1 Typical SBR cycle.
End of
denitrification
End of
P-release
Maximum P release
100
30
12
20
Change in
ORP slope
pH kick
-100
NO3-
10
pH levels off
7.5
50
100
-200
150
time (min)
Exact anaerobic phase
Fig. 2 Process behaviour during the anaerobic/anoxic phase.
pH
ORP (mV)
8.5
PO42-
ARTICLE IN PRESS
1098
WAT E R R E S E A R C H
End of
P-uptake
9
End of
nitrification
DO levels off
30
12
20
DO
pH levels off
NO3-
NH4
8
N (mg L-1)
pH
pH inflexion
DO (mg L-1)
8.5
pH
10
NO2PO42-
7.5
150
200
250
time (min)
300
0
350
1.4.
Anaerobic/anoxic patterns
During this phase, including the loading preliminary operation, the pH-influencing processes are denitrification and
P-release, occurring in this order. The end of denitrification is
revealed by a brief pH increase, after which it decreases as a
consequence of phosphorus release. The ORP further decreases as the process gets deeper into anaerobic conditions.
Eventually when all the available nitrate is denitrified and all
phosphorus released, both pH and ORP level off. In Fig. 2 this
phase ends at time 150 min, because of the fixed timing, but
the relevant processes have all ended long before, so there is a
considerable potential for shortening the anaerobic period
without impairing process efficiency. In summary, the
relevant transitions indicating the end of this phase are the
changes in ORP slope and the kick and levelling of pH.
2.
1.5.
Aerobic patterns
ARTICLE IN PRESS
WAT E R R E S E A R C H
Anaerobic
anoxic
Terminated
process
Indicator
Denitrification
P- release
Nitrification
P- uptake
Aerobic
Process data
pH
ORP
DO
Wavelet Denoising
and Differentiation
d pHdn
d ORPdn
d DOdn
dt
dt
dt
(pH)
(ORP)
(DO)
Clustering
Inference
Aerobic/Anaerobic
Switching
ON/OFF
Fig. 4 Overall structure of the fuzzy inference engine. The
output of each block is indicated in the right
column. The suffix dn stands for denoised. From
top to bottom, the on-line process signals are
processed by a discrete wavelet transform, then
the informative process features are extracted by
fuzzy clustering. Based on this information, the
inference engine recognizes the current phase
(aerobic or anaerobic), which eventually yields a
hard ON/OFF switching command.
2.1.
Wavelet processing
1099
1
1
X
X
cjk 2j=2 c 2j t k ,
(2)
j1 k1
where the wavelet functions c2j t k are scaled (by 2j) and
shifted (by k) versions of the original wavelet c(t). The
coefficients cjk contain the information about the signal
behaviour around the scale 2j around time k 2j. The
summation limits in (2) in theory are infinite, but in practice
they can be assumed to be finite, given the limited extension
of the wavelet functions. If the signal is composed of N
samples taken at Ts intervals the DWT consists of successive
decompositions obtained by parallel filtering the signal with a
low-pass filter, yielding the low-frequency component,
named approximation (A1) and the high-frequency component, named Detail (D1). This process can be repeated again
on the approximation A1 to yield A2 and D2 and so on. At each
step, the signal is downsampled by a factor of 2, so the
number of samples is halved at each step, therefore the
process can be iterated log2(N) steps at most, but in practice it
must be stopped long before this limit because as the data
become scarce, the edge effects become important. The signal
decomposition at the k level is fully represented by the
coefficients of the Approximation cAk and of the Detail cDk.
The latter contains most of the noise component which adapt
to the signal behaviour. Therefore, the noise component can
be limited by hard thresholding, i.e., setting to zero the
coefficients with magnitude below the threshold, or by soft
thresholding, where after hard thresholding, the remaining
ARTICLE IN PRESS
1100
WAT E R R E S E A R C H
pH signal
De-noised
pH signal
Low-Pass
A1
Low-Pass
A2
High-Pass
D1
High-Pass
D2
Thresholding
Fig. 5 Schematic representation of discrete wavelet transform (DWT) for filtering and de-noising. In this application a
second-level decomposition (A2, D2) proved adequate. The same DWTwas applied twice: first to the signals and then
to their numerical derivatives. The graphic insets exemplify the decomposition of a noisy pH signal into
approximations (upper row) and details (bottom row), eventually producing the denoised version.
0.04
raw derivative
wavelet derivative
0.03
d (pH)
dt
0.02
0.01
0
-0.01
-0.02
-0.03
-0.04
0
20
40
60
25
20
2.2.
raw derivative
wavelet derivative
15
Fuzzy clustering
dikA zk vi T Ai zk vi ,
i
(4)
d (ORP)
dt
10
5
0
-5
-10
-15
0
20
40
Jgk c; m; Ai
where
PN
m m zk vi zk vi T
F i k1 ikPN
m
k1 mik
i1 k1
i1
mik m dikA
1=p
Ai ri detF i
F 1
i
60
ARTICLE IN PRESS
WAT E R R E S E A R C H
15
0.8
Anaerobic phase
0.7
Hn
0.65
0.6
5
0
-5
Minimum of Hn
0.55
Anaerobic phase
10
Hn x 10-3
0.75
0.5
20
40
60
New data
80
100
120
5
C
Hn x 10-3
0.45
0.4
1101
0.8
2
0
-2
-4
Aerobic phase
0.75
Aerobic phase
50
100
150
200
New data
250
300
0.7
Fig. 8 Entropy variation during adaptive operation. The
general downward trend indicates that during the
experiment cluster adaptation produces a better
defined knowledge basis with less uncertainty, i.e.,
lower Hn. Though there is an undecided spell
around the middle of each transition, with
increasing entropy, the final update rate
approaches zero, denoting a stable partition.
Hn
0.65
0.6
Minimum of Hn
0.55
0.5
0.45
0.4
2
5
C
i
djk
Ai
1
c
1
N
Xc XN
i1
k1
mik logmik ;
c41.
(8)
The rationale behind this choice is that the more order there
is in the partition the lower would Hn be. Applying the GK
clustering method to the anaerobic and aerobic data, the
partitions of Fig. 7 were obtained, indicating that cAN 2 and
cAER 3 were the best partitions. By inspecting the upper part
of Fig. 7, it might be argued that perhaps c 1 (i.e. no clusters)
would be the best solution, but this is not the case because
Eq. (8) holds for c41, so the graph could not be extrapolated
for c 1. From a practical viewpoint it is well known that the
process variables do have significantly different values at the
beginning at the end of the anaerobic phase, hence there
must be at least two clusters. Further, the clustering
algorithm should adapt to process changes due to influent
variability and biomass changes, and yet retain its discriminating power. So, after an initial training phase, cluster
adaptation was introduced using the same entropy criterion
Eq. (8) as described in Marsili-Libelli (1998). Each new data was
classified according to the existing centroids, yielding the new
2=m1
Pc
and the pre-existing
membership mnew 1= j1 dnew =dj
partition matrix Uold [mik] is augmented with this new
membership, i.e., Unew [mik|mnew] only if the relative entropy
variation
DHn
Hn Unew Hn Uold
oE,
Hn Uold
(9)
ARTICLE IN PRESS
1102
WAT E R R E S E A R C H
Training Data
15
0.8
New Data
+++++
10
Data end
0.9
0.8
0
dt
d ORPdn
Centroid Update
0.9
-5
0.9
0.8
-10
0.8
-15
Data begin
-20
-20
-10
d pHdn
dt
-15
-5
x 10-3
New Data
0.04
+++++
0.
0.8
Training Data
0.045
Fig. 9 Adaptive data clustering during the anaerobic/anoxic phase, showing considerable adaptation of the first cluster, near
the beginning of the phase, whereas the other cluster remains substantially unchanged. Two separate runs are
shown, one for training and the other to test the adaptation cabilitity of the algorithm.
Centroid Update
0.
0.035
dt
d DOdn
0.025
0.02
0.
0.8
0.9
0.03
0.8
0.015
0.9
0.01
0.005
0.8
8
0.
Data begin
0.05
0.1
0.15
d pHdn
dt
0.2
0.25
0.3
Fig. 10 Adaptive data clustering duirng the aerobic phase, showing a comparatively higher daptation of the middle cluster,
whereas the terminal clusters are almost unaffected. Two separate runs are shown, one for training and the other to
test the adaptation cabilitity of the algorithm. The meandering of the data around the middle (third) cluster is
evident, justifying the Hn miminum for c 3 shown in Fig. 7.
ARTICLE IN PRESS
WAT E R R E S E A R C H
1103
2.3.
Inferential engine
Time saved
9
0
ORP
7.5
-100
dpH/dt
-200
0.02
0.01
0
-0.01
-0.02
d (ORP)
d (pH)
dt
dt
30
20
10
0
6
N (mg L-1)
0
-1
-2
-3
-4
d (ORP)/dt
pH
100
ORP (mV)
200
pH
8.5
NH4+
4
NO2-
NO3-
0
Air switch
1
On
0.5
Off
0
20
40
60
80
Time (min)
100
120
140
Fig. 12 Fuzzy inference and switching function for the anaerobic/anoxic phase, showing to which extent the phase could be
shortened without impairing the process effectiveness.
ARTICLE IN PRESS
1104
WAT E R R E S E A R C H
Time saved
10
9
8
dpH/dt
DO
DO
0.2
0.1
0
-0.1
-0.2
30
0.04
0.03
0.02
0.01
0
d (pH)
d (DO)
dt
dt
d (DO)/dt
pH
pH
20
10
0
N (mg L-1)
8
6
NO3-
NH4+
NO2-
Air switch
0
1
On
0
Off
100
50
150
Time (min)
Fig. 13 Fuzzy inference and switching function for the aerobic phase. In this case the switching command is reversed with
respect to the inferential output (bottom graph).
2.3.1.
Anoxic/Anaerobic phase
R2OX : IF
d pH dDO
C3OX AND
;
R3OX : IF
dt
dt
t T2OX THEN y3OX 1
d pH dORP
C1AN AND
;
R1AN : IF
dt
dt
t T THEN y1AN 0,
d pH dORP
C2AN AND
;
R2AN : IF
dt
dt
P3
yOX
P2
2.3.2.
i
i
i1 yAN mAN
.
P
2
i
m
i1 AN
Aerobic phase
d pH dDO
C1OX AND
;
R1OX : IF
dt
dt
t T1OX THEN y1OX 0
i
i
i1 yOX mOX
.
P
2
i
i1 mOX
(13)
10
12
1
AN
d pH dDO
C2OX AND
;
dt
dt
(11)
ARTICLE IN PRESS
WAT E R R E S E A R C H
1105
pH
8.5
8
7.5
12
18
24
12
18
24
ORP (mV)
100
50
0
-50
-100
S
EL
An
Ae
EL
An
EL
Ae
An
An
Ae
12
time (h)
Ae
An = Anoxic
Ae = Aeration
L = Loading
E = Extraction
S = Stirring
24
18
Fig. 14 A day-long operation showing the reduced cycle length. Each cycle is completed in less than the standard 6-h period.
8.8
150
8.6
100
8.4
pH
0
8
-50
7.8
ORP (mV)
50
8.2
-100
7.6
ORP
pH
7.4
-150
-200
7.2
day 1
day 2
Cycle legend
day 3
An
day 4
Ae
day 5
S&E
Fig. 15 A 5-day experiment shows that consistent operation can be achieved even in the presence of varying process
conditions, shown here by the changing pH values. It can be seen that each cycle, after the first, is completed in less
than the 6-h reference time.
2.4.
Process implementation
The inferential mechanism just described was first implemented in the Matlab (The Mathworks Inc., Natick, USA)
platform where extensive simulations were run (MarsiliLibelli et al., 2001) and then tested on a 2-l pilot plant at the
ENEA laboratories in Bologna, where the fuzzy algorithm was
implemented in real-time using the LabviewTM 5.1 (National
Instruments, Austin, USA) software platform. The results of
ARTICLE IN PRESS
1106
WAT E R R E S E A R C H
seen that each cycle, after the first, is completed in less than
the 6 h reference time. It can be concluded that the proposed
detection strategy to determine the end of each phase as a
result of the inference process provides a tight switching
control. Thus for each cycle two advantages are achieved: the
timing is adapted to the current process conditions and each
phase does not last more than needed. In this way a shorter
cycle is obtained, with a considerable time saving, which
implies that in a given time more cycles can be performed
and therefore more wastewater can be treated.
3.
Conclusion
Acknowledgements
The cooperation of Dr. Giuseppe Bortone, Dr. Luca Luccarini
and Dr. Alessandro Spagni is gratefully acknowledged in
granting access to the pilot plant located at the ENEA
Wastewater Treatment Division facilities in Bologna (Italy)
ARTICLE IN PRESS
WAT E R R E S E A R C H
1107