Custom tank is one of the common vessels being used in chemical or plant process
industry (Prakash, 2007). The study aims to build a
simulation program to predict the flow rate and level of the fluid inside the
custom tank which will enhance the controllability of the system. System identification
(Ljung, 1987) will be carried out on a v-shaped custom
tank as a nonlinear benchmark problem with the implementation of different prediction
The estimation of state variables (fluid level and flow rate) is very essential
to produce a reliable controlling system for the v-shape custom tank. In order
to control such a process and to keep level and flow rate at desired set point,
an efficient control strategy is required. Also the suggested techniques such
as Recursive Least Square, Recursive Kalman Filter (Haykin,
2001) and Multilayer Neural Network (Norgaard et al.,
2000) need to be implemented under specific conditions. All the above will
help in building a reliable system that can be used in the real application.
The objectives of the research are to do system identification model for the
variables that describes the dynamics of the v-shaped custom tank. The model
obtained can predict the flow rate and level of the fluid inside the tank using
several linear and nonlinear training algorithms.
Many criteria such as computation time, memory usage and the prediction error
can be used to compare between the results obtained by the used algorithms.
The obtained results showed a comparison between the training algorithms taking
the obtained percentage mean of squared error (%MSE) into consideration. The
result obtained shows the improvement in the optimization performance by using
the new derivative free approach in comparison with the traditional way of the
finding the derivative of the error function using back propagation (Simandl
and Dunik, 2009).
MATERIALS AND METHODS
Figure 1 shows a custom tank block with two input flow and
one output flow. It is generally used for mixing fluids; however it may has
other functions depending on the purpose of facility (Prakash,
|| Custom tank block diagram
Eq. 1-3 have been derived from Fig.
1 which represents the custom tank or the v-shaped custom tank system. The
equations are derived based on the total energy balanced in the system. The
k1, k2 and k3 are constants assumed to be equal to a value of one, and it represent
all other variable that might affect the performance of the system except fluid
level and flow rate outlet which both are investigated. A1, A2 and A3 are the
area cross-section which also assumed to be equal to 1 m2. These
equations have been used to build the tank into SIMULINK to simulate the benchmark
System identification steps have been carried out in part selection of prediction
algorithm in the flow chart in Fig. 2.
Initial work involved linear estimation algorithms including Recursive Least
Square and Recursive Kalman Filter. Both have bee n tested and showed good performance
(low prediction error). Then the main focus was in implementing nonlinear estimation
using MLP neural network with different training algorithms.
In both cases a blac box modeling (Norgaard et al.,
2000) has been chosen, which mean that we derive the mathematical model
for the prediction using only measurements taken from the system. These measurements
are the applied inputs to the system and the corresponding outputs related using
Autoregressive external input model (ARX) (Ljung, 1987;
Norgaard et al., 2000) as in Eq.
|| Methodology flow chart
The measurements are taken and applied in a form of pairs as an input to a
MLP (4, 2, 1), which mean 4 inputs, two hidden neuron and one linear output.
One type of neural network architectures is the feedforward or multilayer perceptron
(MLP). The general structure of an MLP is shown in Fig. 3
(Haykin, 2001). Basically neural network are meant to
behave like human nervous system where the process is distributed among the
small neuron that contains one type of activation function acting like a human
Figure 3 shows a general MLP structure. MLPs are usually
used for prediction and classification using suitable training algorithms for
the networks weights. The MLP output formula in Eq. 5 and
the activation function is represented Eq. 6 used in the MLP
eurons (Norgaard et al., 2000; Alsaade,
In SIMULINK, S-function (user defined function) block has been implemented
in the design where measurements are taken and the specified algorithm is applied.
Note that all predictions are done on-line or instantaneously.
The linear weights are the weights connecting the output neuron and the hidden
neurons while the weights connecting the input with hidden neurons are the nonlinear
weights. The aim is train the MLP network with suitable learning algorithm to
produce an estimation of the height of the fluid and flow rate in the tank recursively.
Back propagation (BP) algorithm is the classical way of training the MLP network
weights with strong stability. In approaching any nonlinear dynamic system BP
can be used to train MLP weights in s stochastic or on-line way by feeding the
network with measurements of input-output data taken from the tank model (Shi
et al., 2009). Recent approach is the hybrid training where two different
algorithms are combined to training the network weights. In this work the linear
weights are trained using RKF where the nonlinear weights are trained using
EKF (Mao et al., 2009; Asseu
et al., 2010).
This method is used to predict the fluid height H2 and the outlet flow Q5 as
shown in Fig. 1 (Kadirgama et al.,
The recursive algorithms are used for both linear and nonlinear networks (Ljung,
1987; Andryani et al., 2009). The recursive
Kalman filter (RKF) is described in Eq. 7-10
|| MLP (Ni, Nh, 1)
is the regressor vector Kk, is Kalman gain, εk is
the error, is the covariance matrix, R2 is set to 1.45 and R1 to zero. RKF is
used to training the linear weights while nonlinear weights have been fixed
to the initialized value, this process is known as extreme learning machine.
Extended Kalman Filter (EKF) is the nonlinear version of RKF (Ljung,
1987; Andryani et al., 2009; Haykin,
2001). The equations are the same as RKF except input x is replaced by the
change in the output to the change in the gradient of network weight (Eq.
11-15). EKF is used for the nonlinear weights while the
linear weights are still trained using RKF (Hybrid Training). The gradient in
Eq. 11 is either computed analytically or using derivative
free as in Eq. 12 (Freitas et al.,
2000; Simandl and Dunik, 2009).
RESULTS AND DISCUSSION
The simulation is performed on v-shaped custom tank to evaluate the performance
of derivative free technique with recursive training algorithms.
Figure 4 shows the prediction for height of the fluid in
the v-shaped custom tank with the settings mentioned in the previous section.
The result in Fig. 6 has been obtained using MLP with RKF
training for the linear weights while the nonlinear weights are fixed (extreme
learning machine). The simulation was for 5000 iteration, the graph shows the
measured output with the predicted output from iteration 4500 until 5000 only
for demonstration purpose.
Figure 5 shows a comparison between MLP with derivative free
approach and analytical approach for prediction of fluid height in the tank.
Table 1 shows error comparison between the algorithms applied
with 5000 samples (iteration) in the simulation which depicts the derivative
free approximation overall performance compared to other techniques which includes
the real gradient estimate.
|| Error comparison
||MLP with RKF prediction for height
||Comparison using derivative free and analytical approach
||Improvement using derivative free
||Flow rate estimation
||Estimation MLP (Analytical) for noisy data
||MLP derivative free estimation for noisy data
|| MLP with RKF estimation for noisy data
Figure 6 illustrates the performance of extended Kalman filtering
technique iteration using derivative free approach for 50 iterations. The central
difference technique uses derivative free methods which bypass the need for
the knowledge of the physics of nonlinear process plant.
Figure 7 shows the overall flow rate estimation for v-Shape
custom tank. Using recursive training technique the neural network modeler show
small level of difference at initial stage and started to fit well at the later
Figure 8, 9 and 10 shows
the estimation results for each algorithm where a noisy input were applied to
the v-shaped custom tank block. Figure 11 illustrate the
behavior of the squared error between the estimated and the true output between
the 2700 and the 3000 iteration.
For more comparison Fig. 12 depicts a zoom in to compare
the smoothness of both estimation using free derivative and analytical method.
From the figure it is clearly shown that free derivative has better smoothness.
From the results obtained we observed the differences between different training
algorithms for the MLP training. Generally the MLP architecture has shown great
ability to predict the desired output with good accuracy. The variance R2 has
been set to 1.45 and R1 to zero, however R2 can be calculated from offline data
and inserted to the system. From the graphs and the error table it can be shown
that MLP with hybrid training has demonstrated better performance. However MLP
architecture requires longer time to learn the function especially in the case
of derivative free.
|| Squared error (2700-3000 iteration)
|| Smoothness comparison
The evaluation of the different algorithms was based on the error between the
estimated and measured outputs. MLP with Hybrid training with cantered derivative
free approach showed better perform in terms error is a new approach which can
form basic understanding of particle filter.
In conclusion, the model is able to predict the fluid heights and outlet flow
using the derivative free approach with less error comparing to analytical approach
due nonlinearity of the system. The dynamics of custom tank have been predicted
using the multilayer perceptron (MLP) with different training algorithms derived
based on derivative free gradient estimate. MLP has shown better performance
especially with centered derivative free gradient estimate compared to analytical
which is cumbersome to derive in real world. The stochastic behavior of derivative
free estimates method can be compared with particle free techniques which will
be subject to investigation Simandl and Dunik (2009).
Regularized form of recursive learning (Asirvadam, 2008)
will be something interesting to look into for the case of derivates gradient