Artifcid Inrelligence in Engineering 11 (1997) 357-344 0 1997Elsevier Science Limited. All rights reserved Printed in Great Britain. 09%1810/97/$17.00
Data reconciliation for simulated flotation process Yang-Guang Du,’ Jules Thiba&* aDepartment of Mining and Metallurgy,
& Daniel Hodouin”
bDepartment of Chemical Engineering, Lava1 University, Sainte-Foy, Quebec, Canada GIK 7P4
(Received for publication
2 January 1997)
This paper introduces a novel neural network-based technique called system balance-related autoassociative neural networks (SBANN) for steady state data reconciliation. This neural network has the same architecture as traditional feedforward neural networks but the main difference lies in the minimization of an objective function that includes process material and/or energy imbalance terms in addition to the traditional least-squares prediction term. Accordingly, this neural network with the system balance-related objective criterion is able to perform the two basic functions necessary for proper steady state data reconciliation: data smoothing to reduce the data variance and data correction to satisfy material and/or energy balance constraints. This novel technique is illustrated for data reconciliation of a simulated flotation circuit that is widely used in mineral processing. 0 1997 Elsevier Science Limited. Key worcIs: neural networks, balances, mineral processing.
PROCESS DATA RECONCILIATION
Process data reconciliation has been studied extensively. Conventional methods based on nonlinear programming, with system balance equations as the constraints, are commonly used for this data processing task. However, these methods are computationally intensive and may not always be suitable for real-time applications in some complex systems. The use of neural network techniques, autoassociative neural networks (ANN) for example, for data reconciliation seems to be a promising option. It was found, however, that the use of ANN is able to remove the uncorrelated measurement noise quite efficiently but it is not always able to reduce significantly the system imbalances. This study is thus concerned with the development and application of a novel neural network technique called system balancerelated autoassociative neural network (SBANN) which has the same ability as the ANN but with the additional advantage of being able to reduce simultaneously the system imbalances. This paper presents the basic algorithm used to train this novel neural network and
Measurements of process variables may be contaminated with several types of errors: (1) small random errors, (2) systematic biases, and (3) gross errors.’ Data reconciliation is an on-line optimization method commonly used to reduce these errors in order that the adjusted values of the process measurements around a system obey conservation laws and other types of constraints. Note that, to correct and adjust process measurements, the data must be redundant, that is, there must exist more measured data than truly needed to completely satisfy system balances.* Without data redundancy, data reconciliation cannot be done. Accordingly, a process model is mandatory for performing data reconciliation. A large amount of research work has been devoted to data reconciliation problems, especially in steadystate data reconciliation,‘J-7 in which steady-state system balances, such as material and energy balances, are used as the constraints. In simple cases, these constraints may be linear but they are in general bilinear or nonlinear. Linear steady-state data reconciliation problem has a closed form solution. However, no general analytical solution is available for nonlinear data reconciliation problems and optimization methods may have to be used to solve the reconciliation problem. In many practical situations, steady-state of the system
the results obtained from the application of this neural network-based emulator for on-line data reconciliation of a simulated flotation process.
*To whom correspondence
should be addressed. 351
Yang-Guang Du et al.
is never truly reached. In such cases, dynamic data reconciliation has to be considered. The work on better nonlinear and dynamic data reconciliation is becoming an active area of research.* As a constrained minimization problem, data reconciliation may be classified into the following two categories: (1) On-line model-based estimation
Two kinds of model-based on-line optimization computing techniques have been most commonly applied for process data reconciliation: extended Kalman filtering and constrained nonlinear programming. The objective of a Kalman filter, as a recursive estimation scheme, is to minimize the variance of the estimation error of all the variables of a dynamic system. Such filters were developed for linear systems, although they can be extended to deal with nonlinear systems. The use of the Kalman filter requires a process dynamic model, and the covariance matrices of the system noises are also assumed to be known. Constrained nonlinear programming is able to solve more general and highly nonlinear dynamic data reconciliation problems. This method optimizes an objective function and, at the same time, attempts to satisfy some system constraints expressed in the form of differential and/or algebraic equalities and inequalities. A significant advantage of using nonlinear programming over traditional steady-state data reconciliation methods is its robustness and the ease with which state, input and parameter estimation can be included.’ Nevertheless, the nonlinear programming approach may not always be suitable for on-line applications of complex nonlinear systems because it is in general computationally intensive. Taking into account both the measurement and process modeling errors, a general criterion for process data reconciliation can be defined.4>*Y9A simplified version of this criterion for a general mineral processing system is given as
where the first term of the equation is concerned with the weighted squared imbalances, whereas the second term contains the weighted squared residuals in a moving window. The variable e refers to the imbalances or the constraint residuals for the mass or energy conservation equations. For instance, for a general flotation system, the conservation constraints are written for the main phase (the ore for the flotation case, m = 0) and the species (m = 1 to M) which are the various mineral present in the ore. In the bilinear case of flotation, they are defined as I+,&,
where I is the plant incidence matrix, P, the vector of
reconciled ore flow rates at time t and irnt the reconciled composition vector at time t (iOt = 1 for the ore phase). The variable r is the measurement residuals and determined in a moving window, i.e. rmjt = Fj - Pt * rmjt = xmj - %t
form = 0 form=
where Fj and Xmjare the measured values of flow rates and the compositions at time j. The tuning parameters of the criterion are the weights (P,,, and Q,J and the length of the filtering horizon J. The larger the value of J, the more stationary the process variables are assumed to be. Nonlinear programming methods can be used to solve this type of problem. The use of a recursive algorithm, however, can only lead to an approximate solution to the data reconciliation of a nonlinear system based on this criterion. (2) Neural network-based emulator Artificial neural networks, as an alternative method, have been recognized as useful tools for modelling and process control.” In recent years, neural network techniques have also found applications in the area of data reconciliation’1-‘3 mainly due to the fact that they are able to deal with complex systems and rapidly perform nonlinear estimation or prediction solely on the basis of historical data. The procedure of data reconciliation using the neural network techniques normally consists of two steps. First, a neural netbased model is built through proper design and training of the network; the trained neural model is then used in a straightforward manner as an emulator to perform the task of data reconciliation. The training procedure is normally carried out off-line, while the utilization of the neural net-based emulator for estimation is in real-time. The main difficulty of this approach seems to be the acquisition of representative reconciled data patterns for the training. In general, the correct or true values of the process variables are not known and they have to be estimated by an appropriate reconciliation procedure. To circumvent this problem, KramerI has proposed a method of using autoassociative neural networks for data treatment including data noise filtering and missing data replacement. The autoassociative neural network (ANN), used in his work, consisted of an input layer, three hidden layers (mapping, bottleneck and demapping layers) and an output layer. The activation function is normally assumed to be sigmoidal but other types of transfer functions could be used. The unique feature of the ANN is that the same measured data sets are used as both input and output data vectors for training. This provides a great deal of convenience in building the neural network since the desired output patterns are not required. In fact, the ANN simply attempts to replicate the input vector by minimizing the sum of squares of the deviations between the input and the output vectors.
Fig. 1. Architecture of the feedforward neural network.
Note that it is the bottleneck layer of the ANN that makes it possible to obtain a compact representation of the original data patterns. Consequently, the underlying correlation and redundancies in the input data are captured and the reduction in measurement noises is achieved.i3 It must be pointed out, however, there is no guarantee that the use c.’ the ANN for data reconciliation can significantly reduce the system imbalances because its learning criterion does not explicitly contain any information pertaining to the system balances. To improve the ANN in this account, a novel neural network technique called system balance-related autoassociative neural network (SBANN) is developed and used in this study.
the number of process measurements to be reconciled, that is the length of the measurement vector, y, i is the output vector of the network that is, the reconciled vector, g, (+) is the constraint equation which is in general nonlinear. Parameters Q and /I,,, are weighting factors. The first term of eqn (4) therefore represents the sum of squares of the differences between the estimated and measured process variables. The second term represents the sum of squares of the conservation mass and/or heat imbalances. The objective function defined in eqn (4) assumes that all process variables are measured. The SBANN can also be used for an incomplete but redundant data vector. In that case, the neural network inputs consist of the measured process variables whereas the network outputs would include the measured and unmeasured process variables. The first term of eqn (4) would then be evaluated with only the measured variables whereas the second term would use all estimated process variables to obtain the correct weights of the neural network. The neural network (SBANN) uses the generalized delta rule for weight correction. First, a set of input patterns is presented to the network’s input layer. The network’s output is calculated and compared with the desired output. If the error is not zero, it is propagated backward through the intermediate layers toward the input layer. As the error backpropogates, the network’s weights are modified. For simplicity, consider a threelayer neural network as shown in Fig. 1. The weighted sum of each neuron in the hidden and output layers are calculated respectively for each pattern p: ,_I
WijYpi + Wo
The novel neural network (SBANN) introduced in this study is nothing new in terms of neural network architecture. It consists of an input layer, an output layer and the hidden layer(s) in between. What makes it unique is the form of its learning criterion. The criterion for an ordinary neural network is merely to minimize the deviation between the network output and the desired output in the least-squares error sense. To render the neural network able to reduce the system imbalance terms significantly, the criterion must be modified. The learning criterion of the SBANN for data reconciliation contains both the properties of a minimum-error between the measured input and the network output vector and data adjustment to minimize imbalances. A general objective function may be defined as:
= c j=l
where WV is the connection weight from neuron i to neuron j whereas Wjk is the weight from neuron j to neuron k, Spj and Zpk are the output of neuron j in the hidden layer and neuron k in the output layer respectively for each pattern p, ypi is input to neuron i in the input layer for each pattern p. For the sigmoid activation function used in this study, the outputs of the hidden layer are calculated as fCspi)
. . ,~pK,,2
1 + e - Spj
and the outputs of the neural network as
&Ep=;f: a~(jp,-ypk)2 p=l
where P is the total number of training examples, K is
1 + e-Q
The learning rule for multilayer feedforward neural networks is generally the well known backpropagation algorithm’4 that is used in this study by differentiating the least squares objective function (eqn (4)) with respect
Du et al.
100 150 Test number
m ? N ? 5
100 150 Test number
Fig. 2. Reconstructed data using the SBANN for a deterministic process (-, to each weight in the neural
reconstructed data; l, original data).
parameter 17in eqns (9) and (10) is the learning rate. In eqns (9) and (lo), f!jpkis the output error and Spj the propagated error at the hidden layer. Note that even though these equations were defined for a three-layer neural network, similar equations can also be obtained in a similar fashion for a neural network with more than three layers.
(9) A SIMPLE ILLUSTRATIVE
.y PI P’
_ ~-t3E a&k
yi = 0.8 sin(e) + cl
y2 = 0.8 cos(8) + e2
y3 = _YI + y2 + 0.2
time I thit will pre&l
A simple illustrative example is first given to demonstrate the ability of SBANN to perform data reconciliation. Consider a data set, comprised of 200 values of y, , y2 and y3, generated by the following three equations:
7. . . 7jpk)
the weights evaluated at from iteration t to (t + 1). The
The three variables yi, y2 and y3 are calculated using a uniformly distributed value of 0 E [0, 24 and tl, ~2 and e3 are measurement noises. Two cases will be considered: without and with noise. Note that the variable y3 is simply the sum of y1 and y2 with a constant systematic bias of 0.2. The neural network used to reconcile the data sets described above consists of three neurons in both the input and output layers and a single hidden layer containing five neurons (not including the neurons for the bias in the input and hidden layers). The specific SBANN learning criterion for this problem can be
Simulated flotation process
(d) 0.4 1 0.5 %
0 -0.5 -1 -1.5
50 100 150 Test data number
where the following weighting factors were used: al = 0.5, a2 = O-5, a3 = 0.1 and p = 0.5. The choice of these weighting factors is based on the confidence that is placed on each measurement and prior information that is available on the process. In this problem, it was assumed that variable y3 is much less reliable than the other two variables because of the presence of the bias. Hence, much less weight is placed on the term of (jp3 - jjp3)2 compared to the other two terms. Figures 2(a)-2(d) show the original training data and the estimated data predicted by the trained SBANN for the three variables yl , y2 and y3. It is not surprising to observe that the reconstruction of yi and y2 are very close to their original value whereas y3 is adjusted significantly such that the absolute value of the material imbalance, yl + y2 - y3, becomes very small (Fig. 2(d)). It is obvious from this example that the SBANN was able to significantly reduce the bias on y3. This was possible because less weight was placed on the estimation of y3. If equal weights would have been used for the three process variables, the imbalance would have been distributed equally on the three process variables. Figures 3(a)-3(d) present identical results for the case where the three process variables were corrupted with random errors, having a Gaussian distribution with a
100 150 Test data number
Fig. 3. Reconstructed data using the SBANN for a random process (-
, reconstructed data; -, original data).
standard deviation of 10%. The SBANN data reconciliation procedure was able to reduce the system imbalance term of eqn (16) from 16.26 (/3 = 0) to 0.06 (p = 0.5). It is clear that this neural network technique is able to correct the systematic bias and also partly eliminate the random noise for this particular situation. To implement the neural network-based emulator for data reconciliation, it is important to evaluate the sensitivity of the weighting factors crl, 02, a3 and /3 through extensive simulations. Figure 4 shows the neural network’s training results in terms of the total mass imbalance and the sum of the squares of the errors for the three variables when the parameter ,f3was varied from 0.0 to 1.2 while parameters aI, a2 and o3 were kept constant and respectively equal to 0.5, 0.5 and 0.1. It is obvious that the imbalance is significantly reduced when
0.4 0.6 0.8 Weighting factor
Fig. 4. Effect of the weighting factor p on the neural network performances (- - . - -, squared error; - -
Yang-Guung Du et al.
the weighting factor for the imbalance is increased to 0.2. In general, the selection of the weighting factors is subjective. It depends on the level of confidence about the model and the measurement accuracy. For the present example, the value of parameter /3 would be chosen between 0.02 and 0.3.
minimized for the SBANN is x(%k(kpk
STEADYSTATE CASE STUDY
In the previous simple illustrative example, the threelayer SBANN was shown to be able to reduce the system imbalance with some improvement in the data variability. Further reduction in the data variability could be generally achieved with three hidden layers comprised of a mapping layer, a bottleneck layer with a significantly reduced number of neurons and a demapping layer.13 Such a five-layer SBANN is used in this section to reconcile the data of a simulated industrial flotation bank.
(1) Brief description of the flotation system
Flotation is a process which separates particles with respect to their mineral composition. Consider a simple flotation bank with four cells used for copper flotation. It has one inlet flow, Fr, the feed flow, and two outlet flows, F2 and F3, the concentrate and the tails flow. Associated with each flow are the copper compositions, xl, x2 and x3, respectively. To evaluate the performance of the SBANN for data reconciliation of this process, a mechanistic model with empirical kinetics was developed15 and used to produce the simulation data. For the development of the model of the flotation system, it was assumed that: (1) the pulp in the flotation cells are well mixed, (2) the mechanisms of flotation and entrapment follow first-order kinetics, (3) a binary mineral composition prevails, and (4) each class of particle is made of slow and fast floating particles. The measured process variables were assumed to consist of the mass flow rate, R, F2 and F3, along with their respective copper composition, xl, x2 and x3. Gaussian random noise with a standard deviation of 15% of the mean value was added to each of the flow rate measurement, whereas Gaussian noise with a standard deviation of 5% was added to the mineral composition. In addition, the mean value of the flow rate was submitted to a small drift with time. A total of 200 sets of measurements were generated and split equally for the training and validation data sets.
+ %[email protected]
where Fpl, Fp2, Fp3 and xpl, xp2, xp3 represent the measured flow rates and the copper compositions, for the training data set p, whereas ppl, pp2, kp3 and ipl, ip2, ip3 stand for the corresponding reconciled values. Parameters (Ylk,ozk, POand 0, are the weighting factors that are determined based on the confidence placed on each measured value and the desired accuracy of the two material balances. Note that the objective criterion, defined in eqn (17), is not the same as that of eqn (1) even though the main objective is the same. In eqn (1) filtering is achieved by the summation over a window of length K + 1. In SBANN, however, the same horizon P is applied to both the residuals and the imbalances. Moreover, the filtering ability of the neural network depends not only on the objective criterion but also on the network’s topology, especially the number of neurons in the bottleneck layer. Accordingly, the SBANN is an empirical model, for which the tuning is heuristic. This is not different, however, from all the other data reconciliation methods where suitable weighting factors have to be specified for the measurement errors and the imbalances. To better assess the performance of the data reconciliation of the SBANN, the following indicators were used:
g(k,,i,, - &pi2p- i3pi3p)2.
(2) Steady-state data reconciliation The specific objective function of this case study, to be
Criteria Cl and C2 account for the deviation between the corrected flow rates and compositions and their measured values. These are the two criteria normally
Simulatedflotation process Table 1. Simulation results (T: Training, V: Validation)
SBANN NonOpt. Average
146.4 145.1 163.1
140.6 121.7 136.6
41.62 60.46 77.62
52.53 78.50 105.6
0.083 0.042 0.03 1
0.076 0.035 0.018
0.68 0.04 0.08
0.75 0.16 0.04
used for an ordinary neural network. Criteria Cs and C,_t are the performance indices that measure the ability to estimate true process values. The closer these indicators are to zero, the closer the estimated values are to their true values. Note that C, and C4 can only be calculated when simulated data are used to evaluate the SBANN. In an industrial context, true values would of course not be available. Finally, criteria C, and C, provide an appreciation of the ability of the data reconciliation methods to correct flow rate and composition imbalances, respectively. For a better assessment of the data reconciliation performance using the SBANN, a comparison study was performed using the following four techniques (1) a SBANN with a (6-4-l-4-6) topology, trained with the criterion of eqn (17) in which the weighting factors alk and auc were both equal to O-1 and /3,,and pi were both equal to 0.6; (2) an ANN with an identical topology; (3) an unconstrained nonlinear optimization designed to minimize the objective function of eqn (1). For simplicity the same weighting factors, as for the SBANN, were used, and the length of the data window was equal to 10; (4) since steady-state conditions were assumed, it is interesting to see the data reconciliation performance using a simple average of all measured variables over the length of the entire data set, that is the 100 values of each flow rate and the copper composition. Table 1 presents the simulation results from the four methods. It is observed from Table 1 that the performance using the SBANN for data reconciliation is quite satisfactory. The nonlinear optimization method is the best one in terms of estimation accuracy. However, it is important to note that for the SBANN only one set of data was considered at each data reconciliation step for estimation whereas a series of data was used in the nonlinear optimization method. Since the SBANN works as an emulator without involving any iterative optimization procedure in performing data reconciliation, its computation is comparatively faster than the methods based on the nonlinear optimization. It is also observed that the material balance indices C, and C, are more significantly reduced using the SBANN compared to the ANN and the average method. As expected, the ANN is able to significantly reduce the measurement noise, but fails to reduce the indices C5 and C, significantly in this particular case. It can be seen from Table 1 that the predicted flow rates and the compositions using the
T 15.05 0~001 0.254 8.60
V 113.7 0.02 1 0.227 1.382
t2min2 (%Cu)2 T 364.3 0.122 0.041 3.47
V 771.0 0.346 0.002 1.351
average method are the closest to their true values according to the criteria Cs and Cd whereas the material balance performance indices are much higher than those obtained with the SBANN and the nonlinear optimization method. The results obtained with the simple average point out the importance of selecting the weighting factor with care since the estimation of true values of the process variables is not necessarily achieved when criteria Ci, C,, C5 and C, are a minimum.
To perform process data reconciliation, a novel neural network-based technique, called system balance-related autoassociative neural networks (SBANN), was developed. The simulation results obtained using the SBANN for a simple flotation bank system show that the SBANN is able to reduce the material imbalances and the measurement noise simultaneously and satisfactorily. The additional advantage of using the SBANN for data reconciliation is that, just like the ANN, it can also perform many other data processing tasks including the missing data replacement, gross error detection and correction’3 because the SBANN employs the same network topology as the autoassociative neural network (ANN). Since the SBANN works as an emulator without requiring any optimization procedure in performing data reconciliation, it can produce the results in realtime when the trained neural network is available no matter how complex the system is. To cope with the time-varying nature of real industrial processes, however, an off-line training of the SBANN in a moving window of past measurements for adaptation may be required.
REFERENCES 1. Leibman, M. J., Edgar, T. F. and Lasdon, L. S., Efficient
data reconciliation and estimation for dynamic processes using nonlinear programming techniques. Comput. Chem. Engng, 1992, 16(10/l l), 963-86. 2. Crowe, C. M., Observability and redundancy of process data for steady state reconciliation. Chem. Engng Sci., 1989,44,2909-17.
C. M., Data reconciliation progress and challenges. J. Proc. Con?., 1996, 6(2/3), 89-98. 4. Hodouin, D., Bazin, D. and Makni, S., On-line reconciliation of mineral processing data. In Proceedings of the AIME/SiUE Symposium ‘Emerging Computer Techniques for the Mineral Industry’. Reno, Nevada, Feb. 1993.
5. Meyer, M., Koehret, B. and Enjalbert, M., Data reconciliation on multicomponent network process. Comput. Chem. Engng, 1993,17,807-817. 6. Mah, R. S. H., Chemical Process Structures and Information Flows. Butterworths, Boston, 1990.
7. Hodouin, D. and Everell, M. D., A hierarchical procedure for adjustment and material balancing of mineral process data. International Journal Mineral Processing, 1980, 7(2), 91-116. 8. Hodouin,
D., Bazin, balance algorithm: circuits. SME/AIME March, 1996. 9. Makni, S., Hodouin, imbalance method
C. and Makni, S., Dynamic material application to industrial flotation Annual Meeting, Phoenix, Arizona, D. and Bazin, C., A recursive node incorporating a model of flowrate
Du et al.
dynamics for on-line material balance of complex flowsheets. Mineral Engineering, 1995, R(7), 753-766. 10. Thibault, J. and Grandjean, B. P. A., Process control using feedforward neural networks. J. Syst. Engng, 1992,2,198212.
11. Karjala, T. W. and Himmelblau, D. M., Dynamic data rectification by recurrent neural networks vs. traditional methods. AZChE, 1994, 40(11), 1865-1875. 12. Terry, P. A. and Himmelblau, D. M., Data rectification and gross error detection in a steady-state process via artificial neural networks. Ind. Engng Chem. Res., 1993,32, 3020-3028. 13. Kramer, M. A., Autoassociative neural networks. Comput. Chem. Engng, 1992, 16(4), 313-328. 14. Rumelhart, D., Hinton, G. and Williams, R., Learning internal representations by error propagation. In Parallel Distributed Processing. MIN Press, Cambridge, MA, 1986. 15. Blakey, B., Internal report on Mount Isa Mines Simulator, Part 1: Steady State Results. Department of Mining and Metallurgy, University Laval, Canada, 1995.