Grey and neural network prediction of suspended solids and chemical oxygen demand in hospital wastewater treatment plant effluent

Size: px
Start display at page:

Download "Grey and neural network prediction of suspended solids and chemical oxygen demand in hospital wastewater treatment plant effluent"

Transcription

1 Grey and neural network prediction of suspended solids and chemical oxygen demand in hospital wastewater treatment plant effluent T.Y. Pai a,, Y.P. Tsai b, H.M. Lo a, C.H. Tsai a, C.Y. Lin a a Department of Environmental Engineering and Management, Chaoyang University of Technology, Wufeng, Taichung 4349, Taiwan, ROC b Department of Civil Engineering, National Chi Nan University, Puli, Nantou 545, Taiwan, ROC Abstract Grey model (GM) and artificial neural network (ANN) was employed to predict suspended solids (SS) and chemical oxygen demand (COD) in the effluent from sequence batch reactors of a hospital wastewater treatment plant (HWWTP). The results indicated that the minimum mean absolute percentage errors (MAPEs) of 3.4% and 5.73% for SS and COD could be achieved using genetic algorithm ANN (GAANN). The minimum prediction accuracy of 3.4% and 55.% for SS and COD could be achieved. Contrarily, GM only required a small amount of data and the prediction accuracy was analogous to that of GAANN. In the first type of application, the MAPE values of SS for model prediction using GM (, N) and GM (, ) lay between 3.4% and 6.67%. The MAPE values of COD using GM (, N) were smaller than those of GM (, ). The results showed that the fitness was good for both GM (, N) and GM (, ) to predict SS. However, only GM (, N) was better for COD prediction as comparing to GM (, ). In the second type application, the MAPE values of SS and COD prediction using GM (, ) and rolling GM (, ) (RGM, i.e., 8 data before the point at which was considered to be predicted were used to construct model) lay between 4 8% and 37 5%, respectively. Furthermore, it was observed that influent ph has affected effluent SS and COD significantly. It suggested that if the influent ph could be adjusted appropriately, a better effluent SS and COD could be obtained. Keywords: Grey model; Artificial neural network; Hospital wastewater treatment plant; Continuous sequence batch reactor. Introduction The activated sludge process (ASP) has long been used for industrial wastewater treatment as well as for hospital wastewater treatment plant (HWWTP). Because the influent quality and quantity in hospital is complex, some problems would be encountered when ASP was adopted in HWWTPs. Literatures have shown that many water quality indices have been investigated to implement detailed study or to valid mechanistic models. So the more the items for wastewater characterization are, the more the reactions in ASP can be understood. In our previous work, different mechanistic models were employed to describe the reactions in ASP (Pai, Ouyang, Su, & Leu, 00a; Pai, Ouyang, Su, & Leu, 00b; Pai, Chuang, Tsai, & Ouyang, 004b). In Taiwan, if the effluent comes from the designated sew- Corresponding author. Tel.: /4465; fax: address: bai@ms6.hinet.net (T.Y. Pai). ers of communities or other residential area, only four effluent characteristics, i.e., suspended solids (SS), biochemical oxygen demand (BOD), chemical oxygen demand (COD) and true color, were regulated according to effluent standard. Meanwhile, in order to save cost, effluent quality investigation from HWWTPs were only carried out to meet regulation standard, so their investigation data were few and incomplete compared with general study cases. Under this situation, the effluent quality trend could not be predicted appropriately using some numerical models, especially mechanism models. Although some soft computation could predict the effluent successfully, a large quantity of data should be screened in advance for further calculation, such as artificial neural network (ANN) (Choi & Park, 00; Cote, Grandjean, Lessard, & Thibault, 995; Gontarski, Rodrigues, Mori, & Prenem, 000; Häck& Köhne, 996; Zhang & Stanley, 999). Due to the fact that only few factors were selected for regulation, it is suggested that it might be reasonable to adopt an appropriate method to best present a complete and informational

2 data. In order to gain consistent results from the monitoring data and predict the complete wastewater effluent trend, the grey system theory (GST) is an appropriate method. The GST proposed by Deng (989) can resolve the problem of incomplete information and data and has gained many significant and effective results. Overall speaking, system behavioral data often does not follow a particular pattern and it changes unpredictably according to its circumstances. For this kind of dispersed data, regression analysis or mathematical statistics are most commonly used to analyze them. The downside of this method is that it requires a very large sum of data. If there is not sufficient amount of data, functions will not be correctly calculated and this statistical summary will not lead to a good result. On the contrary, GST focuses on the relational analysis, model construction, and prediction of the indefinite and incomplete information. It requires only a small amount of data and the better prediction results can be obtained. There are many analysis methods in GST. Grey model (GM) can be used to establish the relationship between many sequences of data and its coefficients can be used to evaluate which sequence of data affects system significantly. In environmental management, there were many environmental indices and monitoring data. If the significant variation trend could be evaluated, a better control strategy could be sought. Chang and Wang (995) used the grey nonlinear programming approach to plan coastal wastewater treatment and disposal systems. Wu and Chang (003a, 003b, 004) adopted GST and applied it on environmental optimization. However, few studies using GM have been done on effluent quality prediction in HWWTPs. The objective of this study is to use GST to establish the effluent SS and COD characteristics of a HWWTP in which the continuous sequence batch reactor (CSBR) process was applied, and then the effluent quality was predicted. For comparison, ANN was also employed to predict the effluent in this study.. Materials and methods.. Treatment process The CSBR ASP was adopted in this HWWTP. The flow rate was 00 cubic meters per day (CMD) and the effective volume of aeration tank was 90 m 3. The influent and effluent quality from 3rd of June 00 to 7th of June 003 was investigated. They were sampled and investigated every 3 days. The influent quality items included ph, temperature, SS and COD. The effluent quality items included SS and COD. All analytical methods used in this study were according to standard method (APHA, 995)... Grey modeling process Solving the differential equation will yield a time response solution for prediction. Through inverse accumulated generating operation (IAGO), the forecast can be transformed back to the sequence of original series. A grey modeling process is described as follows. Assume that the original series of data with n samples is expressed as: X (0) =( (), (),..., (n)), where the superscription (0) of X (0) represents the original series. Let X () be the first-order AGO of X (0), whose elements are generated from X (0) : X () =(x () (), x () (),..., x () (n)), where x () (k) = k i= (i), for k =,,...,n. Further operation of AGO can be conducted to reach the r-order AGO series, X (r) : X {r} =(x (r) (), x (r) (),..., x (r) (n)), where x (r) (k) = ki= x (r ) (i), for k =,,...,n. The IAGO is the inverse operation of AGO. It transforms the AGO-operational series back to the one with a lower order. The operation of IAGO for the first-order series is defined as follows: () = x () () and (k)=x () (k) x () (k ) for k =,3,..., n. After extending this representation to the IAGO of r-order series, we have x (r ) (k)=x r (k) x r (k ) for k =, 3,..., n. The tendency of AGO can be approximated by an exponential function. Its dynamic behavior is like a form of differential equation. The grey model GM (h, N) thus adopts an n-order differential equation to fit the AGO-operational series. The parameters h and N in GM (h, N) denotes the order and the number of variables concerned in the differential equation, respectively. The GM (h, N) can be generally expressed as h d (i) x () a i dt (i) = i=0 N j= b j x () j (k) () where the parameter a is the developing coefficient and b is the grey input. In this study, four different types of GM were adopted, i.e. GM (, N), GM (, ), GM (, ) and rolling GM (, ) (RGM (, )). GM (, N). According to the definition of GM (h, N), GM (, N) is that the order in grey differential equation is equal to and defined as follows: N (k) + az() (k) = b j x () j (k) = b x () (k) j= + b 3 x () 3 (k) + +b Nx () N (k) () where z () (k) = 0.5x() (k ) + 0.5x() (k), k =,3,4,..., n. Expanding Eq. (), wehave In a situation where information is lacking, using fewer (at least 4) systems information, one can create a GM to describe the behavior of the few outputs. By means of accumulated generating operation (AGO), the disorderly and the unsystematic data may become exponentially behaved such that a first-order differential equation can be used to characterize the system behavior. () + az() () = b x () () + +b Nx () N () (3) + az() (3) = b x () (3) + +b Nx () N (3). (n) + az() (n) = b x () (n) + +b Nx () N (n) (3)

3 Transforming Eq. (3) into matrix form, we have () z () () x() () x() N (3) () a z () (3) x() (3) x() N (3) b =.... (n) z () (n) x() (n) x() N (n) b N Then the coefficients can be estimated by solving matrix, ˆθ = (B T B) B T Y: a b () where ˆθ =., Y = (3),. b N (n) z () () x() () x() N () z () (3) x() (3) x() N (3) B =.. (n) x() (n) x() N (n) z () The ˆθ values represent the weight of comparative series to the referential series. Additionally, the GM (, N) model could be (4) used for prediction and described as ˆ N (k) = β i x () i (k) αx () (k ) (5) i= where a α = + 0.5a, β b i i = + 0.5a When adopting GM (, N), the influent ph, temperature, SS and COD were taken as the comparative series, thus, N was equal to 5. The GM (, N) constructed in this study represented the relationship between single effluent water quality index and all other influent indices, as shown in Fig.. GM (, ). According to the definition of GM (, N) (Eq. ()), if the numbers of comparative series were reduced to (N = ), the model was GM (, ). The utilization of GM (, ) was analogous to that of GM (, N). It also correlated the effluent and influent indices. But in GM (, ), the adopted comparative series was the same as the influent. The structure diagram of GM (, ) was shown in Fig.. GM (, ). If the numbers of comparative series were reduced further, the model was GM (, ). All time series values of one specific effluent water quality index were used to establish GM (, ). Then the constructed GM (, ) was used for prediction. Fig.. The structure diagram of GM.

4 Fig.. The structure diagram of ANN and GAANN. Fig. depicted the relationship between the input and output variables of GM (, ). RGM (, ). In GM (, ), all time series values of one specific index were used to establish GM (, ). While in RGM (, ), traditionally the time series data of specific effluent water quality index used to construct model were the 4 data before the point which was considered to be predicted. That is, the model had to be constructed every time step and only 4 data were used for model construction. In this study, 8 data were used for model construction, as shown in Fig.. In both GM (, ) and RGM (, ), the influent data was ignored..3. ANN and genetic algorithm ANN The ANN modeling approach in which the important operation features of human nervous system is simulated attempts to solve problems by using information gained from past experience to new problems. In order to operate analogous to a human brain, many simple computational elements called artificial neurons that are connected by variable weights are used in the ANN. With the hierarchical structure of a network of interconnected neurons, an ANN is capable of performing complex computations, although each neuron, alone, can only perform simple Fig. 3. Effluent variation.

5 work. The multi-layer perceptron structure is commonly used for prediction among the many different types of structures. A typical neural network model consisting of three independent layers: input, hidden, and output layers. Each layer is comprised of several operating neurons. Input neurons receive the values of input parameters that are fed to the network and store the scaled input values, while the calculated results in output layer are assigned by the output neurons. The hidden layer performs an interface to fully interconnect input and output layers. The pattern of hidden layer to be applied in the hierarchical network can be either multiple layers or a single layer. Each neuron is connected to every neuron in adjacent layers before being introduced as input to the neuron in the next layer by a connection weight, which determines the strength of the relationship between two connected neurons. Each neuron sums all of the inputs that it receives and the sum is converted to an output value based on a predefined activation, or transfer, function. For prediction problems, a supervised learning algorithm is often adopted for training the network how to relate input data to output data. In recent years, the back-propagation algorithm is widely used for teaching multi-layer neural networks. Traditionally, the algorithm uses a gradient search technique (the steepest gradient descent method) to minimize a function equal to the mean square difference between the desired and the actual network outputs. But sometimes, this search technique will find out a local optimum, not a global optimum. This defect can be solved by adopting some techniques, such as genetic algorithms (GAs). GAs which emulate the evolutionary theory are procedures based on the mimetics of mechanics of natural selection and genetics to solve optimization problems (Holland, 975). GA computes a population of individuals evolving through a set of operators constituting the reproduction scheme by which new individuals are generated from parents. If the elements are the most suited in a population, they can survive, generate offspring and transmit their biological heredity to new generations based on the evolutionary theory. The chromosomes of individuals represented in an optimization problem by a specific binary code contain the heredity. The suitability of each element is evaluated using a fitness value directly derived from the objective function based on the optimization problem under consideration. The evolution mechanisms are consisted of three specific reproduction procedures including selection, cross-over and mutation. The computing loop of evolution is continuously repeated until the generation limit is exceeded. The GA procedures are described as follows. () generate an initial population Fig. 4. Prediction results of SS using different GM and ANN.

6 Fig. 4. (Continued ). of random genomes; () loop through the GA, which produces a new generation every iteration; (3) estimate the fitness of each genome, stopping if a solution is found; (4) generate the next generation through natural selection and reproduction; (5) select two random genomes according to fitness; (6) cross the genomes or leave them unchanged; (7) mutate genes if necessary; (8) delete the old generation and set the new generation to the current population; (9) when a solution is found or the previously defined number of generations is reached, the loop stops and the GA is completed. In this study, the ANN and genetic algorithm artificial neural network (GAANN) were adopted. They both consisted of three independent layers: input, hidden, and output layers. The influent ph, temperature, SS and COD were taken as the input layer variables, meanwhile SS and COD were the output layer variables. The hidden layer was comprised of six operating neurons. The structure diagram of ANN and GAANN are shown in Fig.. Their calculation was carried out using MATLAB..4. Error analysis In order to evaluate the prediction accuracy of GM and ANN, the mean absolute percentage error (MAPE) was employed and described: e(k) = (k) ˆ (k) (k) 00% (6) where e(k) is the MAPE, (k) the investigation value, and ˆ (k) is the prediction value. 3. Results and discussion 3.. Variation trend of water quality The numbers of data investigated from December 997 to June 00 were totally 46, as shown in Fig. 3. In Taiwan, the effluent regulation limits of SS and COD were both 00 mg L. The effluent quality from this HWWTP met the Effluent Standard of Taiwan. 3.. Simulation of SS Fig. 4(a) (f) depicts the prediction results of SS using GM (, N), GM (, ), GM (, ), RGM (, ), ANN and GAANN. The st to 00th values were used for model construction, 0st

7 Table MAPEs between the predicted and investigated values using different GM and ANN Effluent SS Construction of model Prediction of model Effluent COD Construction of model Prediction of model GM (, N) 68.98% 6.67% 40.63% 55.38% GM (, ) 44.8% 3.4% 50.05% 6.% GM (, ) 7.99% 4.87% 37.96% 5.73% RGM (, ) 7.40% 5.% ANN 5.43% 9.8% 38.88% 48.% GAANN 35.05% 8.4% 4.97% 45.04% to 46th values were used to evaluate the fitness. As shown in Table, in the aspect of model construction, MAPEs between the predicted and investigated values were 68.98%, 44.8% and 7.99% using GM (, N), GM (, ) and GM (, ), respectively. They were 5.43% and 35.50% using ANN and GAANN, respectively. In the aspect of model prediction, the MAPEs were 6.67%, 3.4% and 4.87%, respectively when adopting three different GMs. The MAPE was 7.4% when RGM (, ) was adopted. They were 9.8% and 8.4% using ANN and GAANN, respectively. The MAPEs were between 3.4% and 7.40% when adopting GMs for prediction, but they were between 8.4% and 9.8% when using two types of ANN. In GMs, the MAPE of 3.4% was found to be the lowest when using GM (, ) to predict SS. This value was higher than those of ANN and GAANN only by 3.33% and 5%, respectively Simulation of COD Fig. 5(a) (f) shows the prediction results of COD. As shown in Table, in the aspect of model construction, the MAPEs between the predicted and investigated values were 40.63%, 50.55% and 37.96% using GM (, N), GM (, ) and GM (, ), respectively. When adopting ANN and GAANN, they were 38.88% and 4.97%, respectively. In the aspect of model prediction, the MAPEs were 55.38%, 6.% and 5.73%, respectively, based on three types of GMs. The MAPE was 5.% when RGM (, ) was adopted. They were 48.% and 45.04% using ANN and GAANN, respectively. The MAPEs were between 5.% and 6.% when adopting GMs for prediction, but they were between 45.04% and 48.% when using two types of ANN. In GMs, the MAPE of 5.73% was found to be the lowest when using GM (, ) to predict COD. Fig. 5. Prediction results of COD using different GM and ANN.

8 Fig. 5. (Continued ) This value was higher than those of ANN and GAANN only by 3.5% and 6.69%, respectively. Four GMs were adopted to predict the effluent from the HWWTP in this study. The application could be divided into two types. GM (, N) and GM (, ) belonged to the first type of application, GM (, ) and RGM (, ) belonged to the second type. In the first type of application, the relationship of time series between effluent and influent values was constructed, and the influent indices were taken as the input parameters to predict effluent quality. In the second type of application, only effluent values were used to construct GMs. In the first type of application, the MAPE values of SS using GM (, N) (68.98% for construction and 6.67% for prediction) were higher than those of GM (, ) (44.8% for construction and 3.4% for prediction), but the values of model prediction lay between 3.4% and 6.67%. The MAPE values of COD using GM (, N) (40.63% for construction and 55.38% for prediction) were lower than those of GM (, ) (50.05% for construction and 6.% for prediction). It revealed that the fitness was higher using both GM (, N) and GM (, ) to predict SS but only GM (, N) was higher when predicting COD. In the second type, the MAPE values of SS using GM (, ) was analogous to those of RGM (, ), the values lay between 4% and 8%. When predicting COD, the values were also analogous using both GM (, ) and RGM (, ), the values lay between 37% and 5%. It indicated that the values predicted by both GM (, ) and RGM (, ) have the similar level of error. Two types of ANN were also employed in this study. When constructing models, the MAPE values of ANN (5.43% for SS and 38.88% for COD) were lower than those of GAANN (35.05 for SS and 4.97% for COD) by 9.6% and 6.09% for SS and COD, respectively. When predicting, the MAPE values of GAANN (8.4% for SS and 45.04% for COD) were lower than those of ANN (9.8 for SS and 48.% for COD) by.67% and 3.8% for SS and COD, respectively. Comparable observations were similarly made by Cote et al. (995). Cote et al. (995) compared different types of model by which the effluent from an industrial WWTP was predicted. They found that the MAPEs lay between 37.% and 60% using mechanistic model and 3 69% even using mechanistic model with optimized parameters. When they adopted hybrid model, the MAPEs decreased to % significantly. In the study proposed by Gontarski et al. (000), ANN was used to pre-

9 Table Parameters of GM (, N) Input parameters Output parameters Effluent SS Effluent COD Influent ph (b ) Influent temperature (b 3 ) Influent SS (b 4 ) Influent COD (b 5 ) dict the effluent total organic carbon (TOC) from an industrial wastewater treatment plant. Since TOC was the single output layer variable, high fitness was achieved. In this study, the minimum MAPEs of 3.4% and 5.73% for SS and COD could be achieved. The fitness was higher when using ANN and GAANN, but they required a large quantity of data for constructing model. Contrarily, GM only required a small amount of data (at least 4 data) and the prediction results that were analogous to ANN and GAANN can be obtained. Therefore, GM could be applied successfully in predicting effluent when the information was not sufficient Effect of input parameters on effluent In the aspect of GM (, N), the influent ph, temperature, SS and COD were taken as the input parameters to predict effluent SS and COD, respectively. The parameters b, b 3, b 4 and b 5 represented the effects of influent ph, temperature, SS and COD on effluent. According to Table, in the aspect of SS, the values of parameter b to b 5 were 0.080, 0.004, and 0.009, respectively. The effect of influent indices was in the order: b > b 4 > b 3 > b 5. It indicated that influent ph affected effluent SS significantly. In the aspect of COD, the values of parameter b to b 5 were 0.759, 0.83, and , respectively. The effect of influent indices was in the order: b > b 3 > b 4 > b 5. It indicated that influent ph affected effluent COD significantly. Among different influent indices, ph value affected effluent significantly. It suggested that if the influent ph could be adjusted appropriately, the better effluent quality could be obtained. 4. Conclusions Four types of GM model including GM (, ), GM (, ), GM (, N), and RGM (, ) were used to predict the SS and COD effluent from a HWWTP. The ANN was also adopted for comparison. The simulation results can be drawn as follows: The minimum MAPEs of 3.4% and 5.73% for SS and COD could be achieved using GAANN. But it required a large quantity of data for constructing model. Contrarily, GM only required a small amount of data and the prediction results that were analogous to GAANN can be obtained. In the first type of application, the MAPE values of SS using GM (, N) was greater than those of GM (, ), but the MAPE values for model prediction lay between 3.4% and 6.67%. The MAPE values of COD using GM (, N) was smaller than those of GM (, ). It revealed that the fitness was good using both GM (, N) and GM (, ) for predicting SS but only GM (, N) was better for predicting COD. In the second type, the MAPE values of SS using GM (, ) was analogous to those of RGM (, ), the values lay between 4% and 8%. When predicting COD, the values were also analogous using both GM (, ) and RGM (, ), the values lay between 37% and 5%. It indicated that the values predicted by both GM (, ) and RGM (, ) have an analogous degree of error. In our study, the minimum prediction accuracy of 3.4% and 55.% for SS and COD could be achieved when using GMs. Influent ph affected effluent SS and COD significantly. It suggested that if the influent ph could be adjusted appropriately, the better effluent quality would be obtained. GM could predict the hospital effluent variation as its effluent data was insufficient. Acknowledgement The authors are grateful to the National Science Council of Taiwan, R.O.C. for financial support under the grant number NSC94--E References APHA, AWWA, WEF. (995). Standard methods for the examination of water and wastewater (9th ed.). Washington, DC: American Public Health Association/American Water Works Association/Water Environment Federation. Chang, N. B., & Wang, S. F. (995). A grey nonlinear programming approach for planning coastal wastewater treatment and disposal systems. Water Science and Technology, 3(), 9 9. Choi, D. J., & Park, H. (00). A hybrid artificial neural network as a software sensor for optimal control of a wastewater treatment process. Water Research, 35(6), Cote, M., Grandjean, B. P. A., Lessard, P., & Thibault, J. (995). Dynamic modeling of activated sludge process: Improving prediction using neural networks. Water Research, 9(4), Deng, J. (989). Introduction to grey system theory. The Journal of Grey System, (), 4. Gontarski, C. A., Rodrigues, P. R., Mori, M., & Prenem, L. F. (000). Simulation of an industrial wastewater treatment plant using artificial neural networks. Computers and Chemical Engineering, 4, Häck, M., & Köhne, M. (996). Estimation of wastewater process parameters using neural networks. Water Science Technology, 33(), 0 5. Holland, J. H. (975). Adaption in natural and artificial systems. Ann Harbor: The University of Michigan Press. Pai, T. Y., Ouyang, C. F., Su, J. L., & Leu, H. G. (00a). Modeling the stable effluent qualities of the A O process with Activated Sludge Model d under different return supernatant. Journal of the Chinese Institute of Engineers, 4(), Pai, T. Y., Ouyang, C. F., Su, J. L., & Leu, H. G. (00b). Modelling the steadystate effluent characteristics of the TNCU process under different return mixed liquid. Applied Mathematical Modelling, 5(), Pai, T. Y., Tsai, Y. P., Chou, Y. J., Chang, H. Y., Leu, H. G., & Ouyang, C. F. (004). Microbial kinetic analysis of three different types of EBNR process. Chemosphere, 55(), Pai, T. Y., Chuang, S. H., Tsai, Y. P., & Ouyang, C. F. (004). Modelling a combined A O and RBC process under DO variation by using an activated sludge biofilm hybrid model. Journal of Environmental Engineering, ASCE, 30(),

10 Wu, C. C., & Chang, N. B. (003a). Grey input output analysis and its application for environmental cost allocation. European Journal of Operational Research, 45(), Wu, C. C., & Chang, N. B. (003b). Global strategy for optimizing textile dyeing manufacturing process via GA-based grey nonlinear integer programming. Computers and Chemical Engineering, 7(6), Wu, C. C., & Chang, N. B. (004). Corporate optimal production planning with varying environmental costs: A grey compromise programming approach. European Journal of Operational Research, 55(), Zhang, Q., & Stanley, S. J. (999). Real-time water treatment process control with artificial neural networks. Journal of Environment Engineering, ASCE, 5(),