Beruflich Dokumente
Kultur Dokumente
N
i
i i ij
a x w z
1
1
When,
x
i
= i
th
input node parameter
i = 1, 2, 3........... N
N = no. of nodes in the input layer
w
ij
= weight for i
th
input node to j
th
hidden layer node
j = 1, 2, 3........... M
M = no. of nodes in the hidden layer
a
i
= bias parameter for the i
th
input node
The output of hidden layer (z
h
) representing the input to output layer can be obtained by using
the sigmoidal transfer function as below:
z
h
= f(z
1
)
Similarly, each neuron in the output layer receives the output from hidden layer as below:
M
i
j j jk
b x w z
1
2
When,
x
j
= output parameter from the j
th
hidden node
b
j
= bias parameter for j
th
hidden node
k = 1, 2, 3............L
L = no. of nodes in the output layer
w
jk
= weights for j
th
hidden node to k
th
output node
The outcome of the output layer (z
0
) can be calculated by linear transfer function:
z
o
= f(z
2
)
5
The BP algorithm can be written as
X
w+1
=X
w
-L
w
.G
w
Where,
X
w
= vector of weights and biases
L
w
= learning rate
G
w
= gradient
The Back Propagation (BP) algorithm can be used to calculate the weights. The back
propagation approach denotes the process of finding a gradient vector in the structure of
neural network. In this process the gradient vector is calculated in the direction opposite to
the flow of output of each node resulting to back propagation learning rule. Thus, the basic
learning rule for the network is based on gradient descent method. During the training
process, the algorithm can revise the weights and bias terms iteratively to achieve the
condition of minimal error for the total network. This procedure employs a chain rule to
guide the weight and bias values for movement along the negative gradient of the control
function.
The back propagation MLP is an adaptive network, whose nodes (or neurons) perform the
same function on the incoming signals. The node function is a composite of the weighted sum
and differentiable non-linear activation function known as transfer function. The sigmoidal
function used for activation is given below:
x
x
e
f
1
1
This function provides smooth non-zero derivatives w.r.t input signals. The function can also
be termed as squashing function, while the input to this function is squashed to the range (0-
1). Also, this function is called as sigmoidal function and its s- shaped curve exhibit
smoothness and asymptotic properties.
The Levenberg Marquardt (LM) algorithm can be used in the training process to speed up the
convergence to a network capable of estimating the minimal global error. The squared error
measure for the input-output pair of data can be obtained to reduce the error between the
calculated and the target values by adjusting the interconnection between the layers. In this
6
process, the weights are adjusted using the gradient decent BP algorithm. In the present
study, the ANN Tool Box in MATLAB 7.0 has enabled to import the raw sewage treatment
data for developing the basic network. The network structure has been created based on the
choice of network type, no. of neurons in each layer, training process and transfer function.
Consequently, the trained network is adapted to minimise the errors.
Now, E =
P
p
p
e
1
e
p
=
o
N
k
k k
h o
1
2
When
E = squared error measure for the total data set
e
p
= error for p
th
training pattern
k = 1, 2, 3.................... N
o
N
o
= total number of output nodes
o
k
= predicted output of network at the k
th
node
h
k
= target (observed output) at the k
th
node
Wastewater Treatment System:
Data collection
The influent and effluent data were obtained for a period of two years from the historical data
base of a municipal waste water treatment plant located at the western part of India. The
sewage waste water treatment plant has been operating with full scale UASB reactors. Based
on the influent and effluent parameters e.g. inflow rate, BOD, COD and SS concentration, an
attempt has been made in this paper to predict the effluent BOD, COD and SS level of the
treatment systems. The maximum and minimum values of influent and effluent parameters
along with mean and standard deviation in respective cases have been presented in Table 1.
Results and Discussion
7
All data sets were normalised and divided into three groups namely training, validation and
testing. Since the different parameters have different units, the data was normalised to lie
between 0 and 1, so as to avoid any numerical overflow and underflow. Thus, the data
pertaining to each variable were scaled corresponding to the range of data. MATLAB
(Version 7.0) was used to frame the three layered feed forward network consisting of an input
layer with four neurons, one hidden layer with six neurons and one output layer with one
neuron. In this study, the MLP neural network has been applied to train the input data. The
nodes in hidden layer were varied commensurate with the no. of inputs to understand the
effect of such changes in the network structures. At the outset, training was done with the
same no. of input and hidden layer nodes. This was followed by network training with a
hidden layer having more nodes compared to those in the input layer. The no. of neurons in
the hidden layer were finalised from a series of trial runs considering 1-10 neurons to obtain
the minimal error. The goal of error reduction was achieved by adjusting the interconnection
between the layers; whereas the weights in the process were adjusted with the use of gradient
descent BP algorithm.
Thus, a weight based neural network model was developed to estimate the key effluent
parameters e.g. BOD, COD, SS for the sewage treatment process.
In this context, three alternative models were formulated on the basis of data distribution ratio
i.e. training: validation: testing as below for the prediction of output results:
a. Model 1 (M-I) - 60 : 20 : 20
b. Model 2 (M-II) - 70 : 15 : 15
c. Model 3 (M-III) - 80 : 10 : 10
Each of the above models represented the percentage of training, validation and testing data
points out of the total data set. With the increase in percentage of training data points from
60% to 70% corresponding to the models M-I and M-II, the model performance and
prediction ability was found to improve on an overall basis. However, the performance of
model M-III did not appear to be satisfactory. Further, the variation of no. of neurons in the
hidden layer helped to obtain the optimum results for each of the effluent parameters. A
number of ANN networks having different architecture were trained to arrive at the optimised
model for each of the effluent parameters. This was done on the basis of compatibility of
correlation coefficient and RMSE values.
8
Finally, the ANN model output results were compared with the observed data to validate the
neural network model. Further, the performance of neural network models was judged on the
basis of correlation coefficient (R) and root mean square error (RMSE) as presented in Table
2. The RMSE (%) was reduced with the use of model M-II. The predicted results obtained
from the application of ANN models corresponding to BOD, COD and SS have been
summarised in Table 1. In this analysis, an excellent compatibility of results was obtained
with the incorporation of data distribution ratio of 70:15:15 in the prediction of effluent
parameters e.g. BOD, COD and SS. The correlation coefficients and RMSE vales for
training, validation and testing data sets corresponding to each effluent quality parameter
have been shown in Table 2. The mean values and standard deviations obtained in the
prediction of effluent parameters are highly satisfactory when compared to the respective
observed data sets (Table 3). The average error obtained in the prediction of effluent
parameters wrt observed (or target) data were within the range of + 4.6 to 8.3. Also, the ANN
models with the optimised structure showed standard deviation of errors in the range of + 5.3
to 9.6 when compared to the observed data sets (Table 4) in the prediction of effluent
parameters.
Consequently, the ANN models developed in this exercise have been found to be highly
satisfactory in the prediction of effluent parameter values based on the given input data. This
approach has indicated an excellent performance of the ANN models in the prediction of
effluent parameters. Furthermore, the results of optimised ANN models have demonstrated
the acceptability of correlation coefficients in respective cases for the prediction of effluent
parameters in quantitative terms.
Conclusion:
References:
9
Table 1. Features of ANN Model for Effluent Quality Prediction
Sl.No. Description
Effluent Parameters
BOD COD SS
1. Data distribution ratio 70:15:15 70:15:15 70:15:15
2. No. of iterations 14 6 14
3. No. of hidden neurons 8 6 6
4. R (training) 0.99 0.97 0.99
5. R (validation) 0.89 0.86 0.98
6. R (testing) 0.92 0.84 0.79
7. RMSE (training) 0.011 0.066 0.08
8. RMSE (validation) 0.155 0.08 0.08
9. RMSE (testing) 0.167 0.27 0.14
Table 2. ANN Predicted and Observed Effluent Quality
Sl.No. Description
Effluent Parameters
BOD
(mg/l)
COD
(mg/l)
SS
(mg/l)
1. Predicted mean 32.75
103.11 39.01
2. Predicted Standard Deviation + 5.06 +12.36 + 4.83
10
3. Observed Mean 32.57 102.21 38.96
4. Observed Standard Deviation + 4.78 + 12.35 + 5.32
5. Error % for Mean
6. Error % for Standard Deviation
Error back propagation algorithm is commonly used as the learning algorithm. These
technique applies the input values of a sample data set to be learned as the inputs of neural
network. The process compares the outputs of network with the observed output values to
compute the errors. The errors so obtained can be analysed to identify these synaptic weight
that had to be modified by the network for reducing the error of observed data set. The
algorithm iterates these steps for each data set until the average error reaches below the
predermined threshold.