Artificial neural network (ANN) approach for modeling of selected biogenic compounds in a mixture of treated municipal and dairy wastewater

. This paper presents artificial neural network (ANN) model of wastewater treatment plant, which was used for average monthly concentrations of N-NH 4+ , N-NO 3- , N-NO 2- , total Kiejdahl nitrogen (TKN), PO 43- and SO 42- approximation. ANN model was developed for wastewater treatment plant located in Bystre, Poland which treats municipal wastewater with a share of dairy wastewater. The object was chosen because of the unique location, in the Great Mazury Lakes area and the need for its special environmental protection. Input layer of developed ANN model consisted of BOD, COD, concentrations of total nitrogen and total phosphorus, total organic carbon, sulphates, wastewater temperature and pH., The developed model reflected extreme values observed during study period. Average error percentage with which output variables were approximated equalled to 35.35%; 8.99%; 21.23%; 5.08%; 10.99%; 3.02% respectively for N-NH 4+ , N-NO 3- , N-NO 2- , TKN, PO 43- and SO 42- .


Introduction
Chemical composition of surface waters is deteriorating due to discharges of treated wastewater from industry or major urban agglomerations among other reasons [1,2]. The activated sludge method allows the reduction of compounds decomposable through biological and chemical ways with a satisfactory result but does not provide their complete removal from purified medium [3]. More often the design of wastewater treatment plants is based on computer simulations instead of expensive and time-consuming installations or pilot-scales experiments [4], especially those which are using activated sludge as their primary treatment method [5,6]. The degree to which the wastewater will be treated in the classical mechanical-biological system is not constant and depends on factors difficult to estimate some of which are not related to activated sludge technological parameters [7,8].
A high quality representative model can provide a favourable solution in the process control and helps to explain the real process performance and to develop a continuous control strategy for this type of technologies. Because of their reliable, robust and salient characteristics in capturing the non-linear relationships existing between variables (multi-input/output) in complex systems, it has become apparent that numerous applications of ANNs have been successfully conducted in various parts of environmental engineering field [9]. Available activated sludge process modelling software is extensive and allows for accurate description of unit processes that occur during the biological wastewater treatment process [10]. The current models of pollutant removal often concern the municipal and industrial wastewater treatment [11]. Unlike commercial software models, mathematical models created on the basis of empirical research conducted in facilities are usually the most accurate and allow for a fuller change reflection that occur during biological wastewater treatment [12] including biogenic compounds [13], suspensions and micro-pollutants. These play an increasingly important role in the aquatic environment [14] and their disinfection [15,16]. Therefore, mathematical modelling of biological wastewater treatment plants can be one of optimized and novel method for biogenic compound outflow within treated wastewater. Dedicated model also allows to identify the main factors affecting treated wastewater quality, independent from technological parameters [17].
The aim of this study was the development of a model approximating average monthly concentrations of N-NH4 + , N-NO3 -, N-NO2 -, total Kiejdahl nitrogen (TKN), PO4 3and SO4 2in treated wastewater from municipal WWTP with dairy wastewater inflow (23%). Prediction of these selected biogenic compounds in treated wastewater with artificial neural networks is rarely analysed by researchers and it is difficult to find information on this subject in literature. This paper is a continuation of research and results presented in the article by Skoczko et. al 2017.

WWTP in Bystre
The wastewater treatment plant in Bystre, Poland was chosen because of the unique location, in the Great Mazury Lakes area (North Poland) and the need for its special environmental protection. Figure 1 presents WWTP in Bystre technological scheme. WWTP was commissioned in 1995. The facility was modernized in 2002-2003. The maximum daily capacity of the treatment plant is 14,000 m 3 ·d -1 , while the average daily volume of wastewater reaches 6,400 m 3 ·d -1 . The equivalent number of inhabitants (PE) for the facility is 98,615. The municipal wastewater treatment plant accepts dairy sewage from the District Dairy Cooperative in Giżycko. Wastewater delivered to the plant is deposited to a septic tank at the level of about 9,000 m 3 ·year -1 to the catchment point located on site. Annual amount of municipal and dairy wastewater that inflows to WWTP are given in table 1.
Raw wastewater flows into WWTP by a gravity and pressure sewage system. Mechanical wastewater pre-treatment takes place in gratings building. The screenings accumulating on the grating are automatically directed to the auger conveyor. The next stage of mechanical treatment is the sand trap, in which, due to the release of wastewater flow, precipitation and sedimentation of the mineral sediment occurs. In addition, the grit chamber is aerated in order to obtain better float of floating parts. After mechanical treatment, wastewater flows into biological chamber system that performs basic biological treatment. In the first stage, wastewater flows into the defosfatation chamber (anaerobic), then into the denitrification chambers (anoxic), to which the nitrate stream is recirculated from the nitrification chambers (internal recirculation). Wastewater from the denitrification chamber flows to the nitrification (oxygen) chambers. In the denitrification and nitrification chambers, biological wastewater treatment takes place based on activated sludge biomass process. After treatment in biological reactors, the mixture of activated sludge and sewage flows through the overflows into separation chambers and further into two secondary settling tanks. In settling tanks, the activated sludge is separated from wastewater in slow flow conditions. The sludge accumulating on the bottom of the settler is picked up into the sludge funnel, moved to the recirculated and excessive sludge pumping station from where it is pumped to the biological treatment system (external recirculation) or as excessive sludge to the gravitational sludge thickener.

Wastewater samples
Analyses of BOD, COD, total nitrogen and total phosphorus, total organic carbon, sulfates, wastewater temperature, pH, N-NH4 + , N-NO3 -, N-NO2 -, total Kiejdahl nitrogen (TKN), PO4 3and SO4 2in raw and treated wastewater were carried out in accordance with APHA [18]. Analyzed samples of mixture of municipal and dairy wastewater were collected monthly in 2014 and 2015.

Mathematical model
The

Fig. 2. Topology of artificial neural network
The best among the tested neural network topologies was 9-13-6 which means that none of the variables selected for calculation had been ruled out. Hidden layer of the model consisted of 13 neurons and the output layer of 6. The overall network learning quality was 0.97, and mean learning error equalled 2.55. Activation functions of the hidden layer and output were respectively the exponential function and sinus. Topology of developed mathematical model was shown in figure 1.
The obtained model had a good representation of predicted values with respect to the observed. Match of each variable was described by correlation coefficients in the range from 0.94 to 0.99. Determination coefficients reflecting the linear fit between actual and predicted values ranged from 0.88 to 0.97. The model in the greatest extent reflected changes of PO4 3-    Among the variables adopted for analysis for the calculation method (tab. 2) of the ANN model, the COD value (37.00) and wastewater temperature were the most significant (25.94). The high impact of these variables on the ANN model can be referred to the specificity of wastewater treatment plant for which the model was developed. In the case of dairy wastewater, the COD value flowing into the treatment plant determines mainly the effectiveness of further wastewater treatment [19,20] whereas the temperature of wastewater affects both oxygen solubility, which is particularly important in oxygen chambers and determines the nutritional efficiency of microorganisms present in activated sludge. The rank of other variables were close to each other and varied from 1.58 to 8.10. The  Baki and Aras [21] used the method of artificial neural networks to predict BOD values in treated wastewater. Input variables in the considered models were sewage flow, COD, TSS, sewage temperature, total phosphorus, total nitrogen and electrolytic conductivity. Depending on the ANN learning method, the authors observed different adjustment of the model to the observed values which varied from 0.65 to 0.84. Picos-Benitez et al [22] developed an artificial neural network model to approximate the COD values flowing from the model anaerobic reactor that purifies saline wastewater. In the created model, the authors used organic matter load, conductivity and wastewater temperature as input variables, while the COD value in treated wastewater was approximated with an absolute error of 9.226%. Good adjustment of the described models to the BOD and COD values in treated wastewater could be due to the fact that it was the only value approximated by the neural network. Szeląg and Studziński [23] used the artificial neural network algorithm to predict the concentration of N-NH4 in wastewater purified from treatment plants with RLM 275,000 and an average daily flow of up to 72,000 m 3 ·d -1 . The absolute mean error obtained by the authors was 2.82% and it was smaller in comparison to the model presented in this work.

Conclusion
Artificial neural networks are used for finding the simplest relation between variables. Most often ANN models are used to predict 1 variable. This approach allows to describe the phenomena and dependencies between the output variable and the input variables on the basis of which the approximation is carried out. A more complex approach to modeling of wastewater treatment plants operation using artificial neural networks is the approximation of many variables at the same time. It allows the observation of general phenomena and allows to identify parameters affecting the whole of such a complex process as wastewater treatment. In the presented model finding such a relation enabled changes reflection in concentration of 6 variables simultaneously. The model of artificial neural network, whose task was the prediction of selected biogenic compounds, allowed for a good reflection of changes occurring during mechanical-biological wastewater treatment. The model did not use technological parameters of activated sludge, nor quantitative characteristics of raw wastewater inflowing to object. The basis for the algorithm development were only the relationships occurring between selected parameters of raw and treated wastewater. Among the input variables considered, the COD and wastewater temperature had the biggest influence on the accuracy of the model. These variables were characterized by significantly higher weights compared to the other parameters placed in input layer. Hence, it can be assumed that just the inclusion of COD and wastewater temperature in the ANN model allowed to obtain a match between observed and approximated values.