neural model for biological and chemical transformation in sewage

14
Prace Naukowe Instytutu Maszyn, Napędów i Pomiarów Elektrycznych Nr 63 Politechniki Wroclawskiej Nr 63 Studia i Materialy Nr 29 2009 Sewage treatment plant, neural networks estimation, process control Krzysztof SZABAT * , Marcin KAMIŃSKI * NEURAL MODEL FOR BIOLOGICAL AND CHEMICAL TRANSFORMATION IN SEWAGE TREATMENT PLANT In the work issues related to modeling of the biological-chemical wastewater treatment plant are presented. A commonly-used control strategy including model predictive control of the wastewater treatment plant are presented. Then a model of biological and chemical transformations AMS1 is de- scribed and its limitations are pointed out. Then the feed-forward neural networks are introduced. The performance of the obtaining models are shown and discussed. The designed models can be used in the model predictive control structure (MPC) of the savage treatment plant and ensure the optimal control of the electrical blowers. 1. INTRODUCTION Control processes in sewage treatment plants is a rapidly growing field of knowl- edge. This follows on the one hand the universality of using urban wastewater treat- ment and industrial processes, striving for continuous reduction of maintenance costs of wastewater treatment as well as a complicated and non-linear model of the trans- formation of compounds in the treatment process. Optimal control strategy should be the one hand, easy to install on the other lead to a reduction of operating costs and prevent exceeding the limits on the outflow of sewage. In the literature there are a number of control structures for control processes used in the sewage treatment plant [1]-[4]. The simplest control strategies based on maintaining constant air flow to the zones of nitrification in the biological reactor. The advantage of this approach is its simplic- ity. It does not require any installed sensors in the bioreactor. Disadvantages of this strategy stem from the constant flow of air from the electrical blowers into the biore- __________ * * Politechnika Wroclawska, Instytut Maszyn, Napędów i Pomiarów Elektrycznych, 50-370 Wro- claw, ul. Smoluchowskiego 19, [email protected], [email protected]

Upload: others

Post on 03-Feb-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: NEURAL MODEL FOR BIOLOGICAL AND CHEMICAL TRANSFORMATION IN SEWAGE

Prace Naukowe Instytutu Maszyn, Napędów i Pomiarów Elektrycznych

Nr 63 Politechniki Wrocławskiej Nr 63

Studia i Materiały Nr 29 2009

Sewage treatment plant, neural networks

estimation, process control

Krzysztof SZABAT∗, Marcin KAMIŃSKI *

NEURAL MODEL FOR BIOLOGICAL AND CHEMICAL

TRANSFORMATION IN SEWAGE TREATMENT PLANT

In the work issues related to modeling of the biological-chemical wastewater treatment plant are

presented. A commonly-used control strategy including model predictive control of the wastewater

treatment plant are presented. Then a model of biological and chemical transformations AMS1 is de-

scribed and its limitations are pointed out. Then the feed-forward neural networks are introduced. The

performance of the obtaining models are shown and discussed. The designed models can be used in

the model predictive control structure (MPC) of the savage treatment plant and ensure the optimal

control of the electrical blowers.

1. INTRODUCTION

Control processes in sewage treatment plants is a rapidly growing field of knowl-

edge. This follows on the one hand the universality of using urban wastewater treat-

ment and industrial processes, striving for continuous reduction of maintenance costs

of wastewater treatment as well as a complicated and non-linear model of the trans-

formation of compounds in the treatment process. Optimal control strategy should be

the one hand, easy to install on the other lead to a reduction of operating costs and

prevent exceeding the limits on the outflow of sewage. In the literature there are a

number of control structures for control processes used in the sewage treatment plant

[1]-[4].

The simplest control strategies based on maintaining constant air flow to the zones

of nitrification in the biological reactor. The advantage of this approach is its simplic-

ity. It does not require any installed sensors in the bioreactor. Disadvantages of this

strategy stem from the constant flow of air from the electrical blowers into the biore-

__________

∗ * Politechnika Wrocławska, Instytut Maszyn, Napędów i Pomiarów Elektrycznych, 50-370 Wro-

cław, ul. Smoluchowskiego 19, [email protected], [email protected]

Page 2: NEURAL MODEL FOR BIOLOGICAL AND CHEMICAL TRANSFORMATION IN SEWAGE

actor. Under conditions of low water flow the bioreactor is over-aerated. Even the

slow increase in the flow of pollution can be brought to exceed the limits in the out-

flow. Despite these drawbacks, this strategy is still in use [1].

More advanced control strategy commonly used for small wastewater treatment

plants in Poland consists in controlling the dissolved oxygen level in bioreactor. It

requires the installation of oxygen sensors in the selected parts of the bioreactor. Usu-

ally the PI (in the case of the variable speed drive) or hysteresis (in the case of the

direct switched motors without converter) controllers are applied. Depending on the

value of the control signal the number of the electrical blowers can be set on or off.

This control strategy do not take into consideration the input of the bioreactor which

is it drawback. The large values of the inflow can lead the dissolved oxygen level

below the required value. This may result in exceeding the limit values at the

effluent [1]-[2]. Another strategy, also based on controlling the level of oxygen, introduced into

the system additional information about the state of system input. Usually this is done

by adding to the classic structure the feed-forward controller. Different functions of

the activation of additional controller may be used, such as linear, fuzzy, etc. The use

of the additional information from the system input results in increase the level of

oxygen in bioreactor which prepare a system to adopt more west water. The disadvan-

tage of this strategy is the need to applied the additional sensors at the input of the

system. This strategy can be especially effectively applied in the waste-water treat-

ment plant in the case of the variable-speed electrical blowers driven by the power

converter [1]-[2].

One of the most modern methods of control used at wastewater treatment plants is

MPC [4]-[5]. It ensures the optimal control of wastewater treatment process. This

allows reductions in operating costs for wastewater treatment and avoid the exceed

the limits in the outflow. Its drawback is a very complicated algorithm which require

the information of all state variables and disturbances of the process. These are usu-

ally estimated by the Kalman filter [5]. Based on the current state of the system a

control algorithm (using a model biological transformations of chemical state of the

system) calculate within a specified time horizon the state of the plant. The system

behavior is calculated for various control options and then the optimal strategy is se-

lected (which guarantee the minimal value of the cost function). This requires the

implementation of many simulations in a finite period of time. It is therefore neces-

sary to install a unit for high-power computing. One way to simplify the calculation is

to replace the complex mathematical model of the plant by a simpler and faster neu-

ral model. Also this strategy needs modern electrical drives to be installed in the sew-

age treatment plant.

In the literature many applications of the neural networks to control and diagnosis

of biological-chemical processes in wastewater treatment plants can be found [2], [4],

[6], [7]. Neural networks have been used to predict a variable inflow of sewage treat-

Page 3: NEURAL MODEL FOR BIOLOGICAL AND CHEMICAL TRANSFORMATION IN SEWAGE

ment, model the entire system, estimation of individual parameters or in the control

system application. In the few works issues related to the replacement of the analyti-

cal model by neural network are raised.

The main objective of the work is to present the neural model transformations of

biological chemistry in sewage. After a short introduction the analytical model for

biological-chemical transformation ASM1 is introduced [2]-[4]. Successively the

structure of the feed-forward neural networks are described. Then the training and the

validation data are discussed. Next the obtained results are presented and described.

The scope of future research is clarified. The obtained model can be used in order to

provide the optimal control signal for the electrical machines installed in the waste-

water treatment plant using MPC strategy.

2. ASM1 MODEL

ASM1 model describes the transformation of organic compounds and nitrogen in

sewage treatment plant. Its original form was proposed in 1987 in [8]. It consisted of

eight equations that describe the kinematics of change by manipulating the 13 state

variables. ASM1 model was based on mass balance equations and stoichiometric rela-

tionships of kinematics. Currently used form consists of ten equations which describ-

ing the transformation of the fourteen variables.

ASM1 model operates on the following state variables:

-SS easily degradable organic compounds considered as dissolved ; simple

organic compounds, which are the source of energy and raw materials for the hetero-

trophic growth of microorganisms.

-SI dissolved organic compounds biologically nondegradable treated as dis-

solved organic compounds do not take part in biological processes, their do not

change their composition or character.

-SNH – ammonium nitrogen , expressed as the sum of ammonia (NH3) and am-

monium (NH4+).

-SNO nitrate nitrogen , expressed as an aggregate concentration of nitrates and

nitrites in the model because it does not take into account the fraction of nitrite.

-SND Dissolved organic nitrogen , nitrogen being the combinations of readily

biodegradable organic compounds

-SO dissolved oxygen .

Page 4: NEURAL MODEL FOR BIOLOGICAL AND CHEMICAL TRANSFORMATION IN SEWAGE

-SALK alkalinity .

-XS slowly biodegradable organic compounds , organic compounds of large

size; it is assumed that they are suspended, although some may be present in dissolved

form.

-XI organic compounds in a suspension of biologically non degradable

,

suspensions and colloids of organic compounds that are resistant to biodegradation

biodiversity, they do not change their composition or character.

-XBH – heterotrophic bacteria , microorganisms, which in carry out the bio-

degradation in aerobic and anaerobic zones, as well as the hydrolysis and ammonifica-

tion of XS

-XBA autotrophic bacteria , microorganisms that carry out the process of nitri-

fication - derive energy from oxidation of ammonia; this fraction express at the same

time the microorganisms which oxidizing of nitrite and ammonia

-XP products of biomass death , organic compounds in the suspension result-

ing from the withering away of biomass, resistant to biodegradation.

-XND organic nitrogen in the suspension , Organic nitrogen which is con-

nected with the fraction XS. Together with XS hydrolyzes to dissolved organic nitro-

gen (SND)

-XMIN – mineral slurry , a suspension, which is not included in the COD and do

not undergo any treatment.

The expression (1) describe the change in a particular state vector.

∑=j

jjjr ρν (1)

where: νj- the stoichiometric coefficient [2]-[4], ρj- the kinematics equation.

The following kinematics equations describe the transformation in the ASM model:

(2)

(3)

Page 5: NEURAL MODEL FOR BIOLOGICAL AND CHEMICAL TRANSFORMATION IN SEWAGE

(4)

(5)

(6)

(7)

(8)

(9)

(10)

(11)

The equation (2) determines the rate of increase oxygen assimilation of heterotro-

phy with the transformation of the ammonium as a source of nitrogen. This process is

limited by the availability of organic compounds resulting of maintaining of the sys-

tem a large number of microorganisms (directly proportional to the age of the sedi-

ment). Aerobic growth of heterotrophy (3) with the use of nitrates as a source of ni-

trogen is an alternative to the previous process. Linking between those processes

occurs in the absence of ammonium nitrogen in the zones by a factor , which

seeks to value of one at high concentrations of ammonium nitrogen. Limiting process

is associated with the availability of nitrate. Anoxic increase of heterotrophy (4) with

the assimilation of ammonium nitrogen occurs when oxygen concentration is close or

equal to zero. This process compared to oxygen (2) is slower which is expressed in

the equation by a constant .Anoxic increase of the heterotrophy (5), using nitrate as

nitrogen source take place in a anaerobic conditions or at a minimum concentration

of oxygen. The required condition is the availability of nitrate in the absence of am-

monium nitrogen. Oxygen autotroph growth is described by the equation (6). It is

limited by the concentration of ammonia nitrogen, alkalinity and dissolved oxygen. In

Page 6: NEURAL MODEL FOR BIOLOGICAL AND CHEMICAL TRANSFORMATION IN SEWAGE

the process of dying heterotrophy (7), it is assumed that a part of the biomass is trans-

formed to the fraction - XP. The rest of it is convert to the slowly degradable com-

pounds XS, which contain organic nitrogen in suspension– XND. The equation (7) ex-

press the same process as in (1). The same fractions with the same stoichiometric

ratios are formed; the speed of the process is proportional to the concentration of mi-

croorganisms. Ammonification of the dissolved organic nitrogen (9) is carried out by

the heterotrophy with the speed proportional to the concentrations of organic nitrogen

and microorganisms. It results in the increase in alkalinity. The rate of hydrolysis of

organic compounds (10) is express by (11). The hydrolysis of organic nitrogen in

suspension is described by (12). Tables of the stoichiometric coefficient are provided

in [2]-[4].

3. THE NEURAL MODEL OF THE ASM1

4.1 FEEDFORWARD NEURAL-NETWORKS

A lot of different types of the neural networks can be found in the scientific papers

[9]-[10]. One of the most commonly-used is called a multi-layer perceptron. Networks

of this type are the construction of feed-forward type. It means that in this neural net-

work there is one direction of flow of data between layers (Fig. 1). The structure of

the network includes interconnected neurons arranged in layers (input and the start-

ing-in, and hidden layers - with no direct connection to external signals). There are no

connections between neurons of the same layer. Layers are arranged in the pattern of

neural networks to each other in series, while the neurons in the layers are arranged in

parallel.

Page 7: NEURAL MODEL FOR BIOLOGICAL AND CHEMICAL TRANSFORMATION IN SEWAGE

Fig. 2. The structure of the feed-forward neural networks

A single neuron carries out the operation of aggregation of input signals multiplied

by the corresponding weighting factors w. This value is determined in the learning

process. The result of this argument is the activation function. In the hidden layer of

the neural networks the bipolar sigmoidal activation function (hyperbolic tangent) is

used. In the output layer a linear functions are applied. The output signal of the indi-

vidual neuron is expressed by the following equation:

∑=

+=N

k

jkjkj wtxwfy1

0 ))(( (12)

)()( utghuf β= (13)

where: f – hypothetical activation function, wjk – weight coefficients, xk – input

signal, β- activation function correction coefficient, u – the argument of the activation

function, wj0 – the value of the bias,

In the case of the classical MLP network is often necessary to processing of input

data for linear scaling. The goal of such action is to adjust the input to the compart-

ments in which there is significant variation in activation function. This allows to

increase the efficiency of the obtained results. Effect of scaling the input vector to the

accuracy of the neural network in the wastewater treatment plant modelling has been

presented in the next part of the work.

4.2 SIMULATION RESULTS

The research with the for feed-forward neural networks with one hidden layer are

Page 8: NEURAL MODEL FOR BIOLOGICAL AND CHEMICAL TRANSFORMATION IN SEWAGE

performed. As the activation function the hyperbolic tangent is adopted. The number

of neurons in the input and output layers depends on the dimensions of the learning

data. Input vector includes: parameters of flow, flow volume and the parameters of the

zone from the previous measurement (total 29). Also the dissolved oxygen level has

been assumed as know due to the fact that this variable is accessible in almost every

sewage treatment plant and can be considered us a control variable (in MPC algo-

rithm). The intensity of the flow is divided by the volume of the zone (195 m3). Dif-

ferent data has been used for the training and testing procedures. The data obtained

from the analytical model ASM1 has been down-sampling (every 100ts sample is

used). Neural networks used in the proposed models were trained using one of the

methods of gradient - Levenberg-Marquardt algorithm. Number of hidden neurons

and the number of iterations of the algorithm has been selected experimentally.

Firstly, the single neural network used to estimated all parameters of the ASM

model has been tested. The input data have been previously scaled in order to mini-

mise the relative difference between the variables of the system. The selected network

structure is (29-5-14). Number of the training period is 30.

a) b)

c) d)

e) f)

Page 9: NEURAL MODEL FOR BIOLOGICAL AND CHEMICAL TRANSFORMATION IN SEWAGE

g) h)

i) j)

k) l)

Page 10: NEURAL MODEL FOR BIOLOGICAL AND CHEMICAL TRANSFORMATION IN SEWAGE

i) j)

Fig. 3. The real and the estimated transients of the state variables and its estimation errors for the case

of single NN used to estimated all variables for the testing data

The transients of the real and estimated variables and the estimated errors is pre-

sented in Fig. 2. The application of the single NN to estimation all state variables of

the system is possible. As can be seen from the transients presented in Fig. 3. the neu-

ral estimator works in a stable way. However, due to the completely different behav-

iour of the selected state variables in some estimates the steady stay level of the error

is relatively high (especially in SS, SNH, SND, SO, SALK and XND). In order to minimise it,

the following modification has been proposed. The state variable has been divided

into two groups. The dynamic behaviour of particular variables has been used as the

criterion. The first group includes the following states: SS, SI, SNH, SNO, SND, SO, SALK,

XS and XI. The second group consists of the following states: XBH, XBA, XP, XND and

XMIN. The structure of the first an the second networks have the following structure

{29-12-9} and {29-4-5} respectively.

The transients of the state variables of the system as well as the estimation error in

the case of the application of the two separate estimators are presented in Fig. 4 (for

the testing data).

Page 11: NEURAL MODEL FOR BIOLOGICAL AND CHEMICAL TRANSFORMATION IN SEWAGE

The used of the two parallel NN for the estimation of the state variables of the

ASM1system increase the accuracy of the neural models significantly. The level of

the errors of almost all variables decreased. For example for the variable SS the error

has been reduced from about 0.8 to almost 0 value.

a) b)

c) d)

e) f)

Page 12: NEURAL MODEL FOR BIOLOGICAL AND CHEMICAL TRANSFORMATION IN SEWAGE

g) h)

i) j)

k) l)

Page 13: NEURAL MODEL FOR BIOLOGICAL AND CHEMICAL TRANSFORMATION IN SEWAGE

i) j)

Fig. 4. The real and the estimated transients of the state variables and its estimation errors for the case

of two parallel NN used to estimated separate variables for the testing data

4. CONCLUSIONS

The characteristic property of the ASM1 model is its large computational effort. It

requires a relatively small step calculation to ensure its correct operation. An addi-

tional problem is its high dependence on the hard-identifiable parameters. These con-

straints of the ASM1 model lead designers to search for better models of biological

and chemical transformations. One of them are the neural models. The neural net-

works have the ability of generalization which allows the optimal modeling of proc-

esses in terms of parametric uncertainty. They can also work with the increased com-

putational step, which accelerates the execution of the simulation. Reduce the amount

of calculation is very important in the MPC control strategy. It requires the implemen-

tation of a series of calculations for various values of the control signals in a relatively

small unit of time. Reduce the complexity of the model enables the use of cheaper

computing unit which facilitates the implementation of the real object.

The neural models presented in the paper can be used in the MPC control struc-

Page 14: NEURAL MODEL FOR BIOLOGICAL AND CHEMICAL TRANSFORMATION IN SEWAGE

ture. This control strategy allows the optimal way to control electrical blowers. This

enables reductions of the electrical energy consumed the sewage treatment plant and

the greater security of the crossing limits in the effluent. The future works will be

concern of the application of the designed neural networks in the MPC strategy. Also

the application of the different types of the neural networks (e.g. recurrent, neuro-

fuzzy) to model of the ASM1 will be investigated.

REFERENCES

[1] STARE A., VRECKO D., HVALA N., STRMCNIK S., Comparison of control strategies for nitro-

gen removal in an activated sludge process in terms of operating costs: simulation study, Water re-

search, vol. 41, pp 2004-2014, 2007.

[2] OLSSON G., NEWELL B., Wastewater Treatment Systems, Modeling, Diagnosis and Control

ISBN: 9781900222150, IWA Publishing, 1999.

[3] SZETELA R. W., Model dynamiczny oczyszczalni ścieków z osadem czynnym, Prace Naukowe

Instytutu Ochrony Środowiska Politechniki Wrocławskiej, Nr 64, Monografie, Nr 32, Wydawnictwo

Politechniki Wrocławskiej, Wrocław 1990

[4] URBAN R., Algorytmy genetyczne i sieci neuronowe w modelowaniu osadu czynnego, rozprawa

doktorska, Wrocław 2005 [5] MACIEJOWSKI J., Predictive control with constraints. Prentice Hall, 2002.

[6] BOROWA A., BRDYS M. A., MAZUR K., Modeling of wastewater treatment plant for monitoring

and control purposes by state-space wavelet networks, International Journal of Communications &

Control, vol. 2, pp 121-131, 2007.

[7] CINAR O., New tool for evaluation of performance of wastewater treatment plant: artificial neural

network, Process Biochemistry, vol. 40, pp 2980-2984, 2005.

[8] HENZE M., GRADY C. P. L. JR, MARAIS G. V. R., MATSUO T., Activated Sludge Model No. 1,

IAWPRC Scientific and Technical Reports No 1., IAWPRC, London. IWA Task Group on Mathe-

matical Modelling for Design and Operation of Biological Wastewater Treatment. London, Activated

sludge models ASM1, ASM2, ASM2D and ASM3, IWA Publishing, 2000.

[9] C. M. BISHOP, “Neural Networks for Pattern Recognition”, Oxford University Press, 1995.

[10] OSOWSKI S., Sieci neuronowe do przetwarzania informacji, Oficyna Wydawnicza Politechniki

Warszawskiej, Warszawa 2006.