Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Material balancing-a generalized solution

method
R. I. Mackie

Minerals and Metals Division, Warren Spring Laboratory, Stevenage, Herts, UK

A method for the solution of material balancing problems encountered in mineral processing is de-
scribed. The method makes use of the highly structured nature of the equations encountered, thus
resulting in savings in computer storage space and computation time. One of the key advantages of
the method is that it is presented in a very general way and can therefore be used to solve a wide
variety of balancing problems. In particular, the method enables constraints imposed upon individual
streams (e.g., sum of size distribution must equal 100%) to be handled at very little extra cost, whereas
most other balances tend not to deal with these sorts of constraints.

Keywords: constrained least squares, optimization, mineral processing

Introduction Description of the process


A mineral treatment plant can consist of many inter- A mineral processing plant can be viewed as a system
connected unit processes, and in order to operate the of streams and nodes (Figure I). The nodes can either
plant efficiently it is necessary to have an accurate be unit processes or complete subsections of the plant
picture of what is happening at all parts of the circuit. (e.g., flotation circuit). For each stream some or all of
However, data collection is an expensive task, and the the following data can be measured: total flow rate,
raw data will be contradictory; e.g., the measured mass pulp density, size distribution, SG distribution, and
flow entering the circuit will not equal the measured assays.
mass flow leaving the circuit. Therefore the data have These measurements can be obtained in a variety
to be balanced in order to produce data that are con- of ways, ranging from accurate on-line measurement
sistent. This is a task which lends itself readily to com- and laboratory analysis to an educated guess. To deal
puter methods, and programs to do this have been with this variation in the reliability of the data, we can
available for many years. The first material balances assign confidence values to each data element, higher
were written for mainframe computers, and a useful values being given to measurements believed to be
review can be found in Reid et al. With the advent of very accurate and low values to measurements known
microcomputers these methods are now readily avail- to be subject to large errors. So if x$ (j = 1,n) are the
able to the plant engineer, and Warren Spring Labo- measurements taken for each stream, and if there are
ratory (WSL) has produced balance programs for use N streams, the problem is to minimize the function
on microcomputers.* However, the microcomputer
balances shared the common problem of limitations on
the problem size that can be dealt with. There are also E = 5 WU(xti - x8)
potentially many sorts of balances that can be carried i=l

out, ranging from balancing only the total mass flow


to balancing total mass flow, pulp density, size/specific
where the W, are weighting factors applied to each
gravity (SG) distribution, and assay data. This paper
data element. If Wti is taken to be the confidence factor
describes a method that breaks down the problem into
divided by the square of the measurement, then the
smaller components, thereby reducing the storage space
balance minimizes the percentage change made to each
needed, reducing the time of computation and provid-
data element and tends to make the smallest changes
ing the framework for a much more general solution
to those measurements with the highest confidence
process.
factors. In addition, the data will be subject to certain
constraints; these can be split into two categories:
Addressreprint requests to P. Tucker, Warren Spring Laboratory,
Stevenage, Herts SGl 2BX, UK. (1) stream constraints; e.g., the sum of the size dis-
Dr. R. I. Mackie is now in the Department of Civil Engineering,
The University, Dundee, DDl 4HN, UK. tribution must equal 100%; the sum of the size
assays must equal the total assay.
Received December 1987; revised July 1988 (2) nodal constraints; i.e., the total mass of each com-

0 1989 Butterworth Publishers Appl. Math. Modelling, 1989, Vol. 13, March 149
Material balancing-a generalized solution method: R. I. Mackie

Stream 1 data

Stream n data
Stream constraints 1 Lagrange multipliers

Stream constraints it Lagrange multipliers


Nodal constraints Lagrange multipliers
Once the equations have been set up, they will have
the general structure

(Z3 (;)=(i) (2)

where D is associated with the stream variables, P with


the Lagrange multipliers (the superscript t indicates
the transpose matrix). A signiticant saving over solving
the original system directly can be obtained by solving
this system. This is done as follows: expanding (2)
Figure 1. Flowsheet as streams and nodes gives
DX+PY=A (3)
PX = B (4)
ponent (e.g., each size fraction) entering a node
must equal the total mass of each component leav- Therefore
ing the node. X = D-(A - PY) (5)
These constraints can be introduced into the prob- Substituting into (4) gives
lem by means of Lagrange multipliers. The solution is
then obtained by calculating the gradient vector and (PD-P)Y = PD-A - B (6)
setting it equal to zero. This produces a set of simul- which can be solved to give Y, and then (5) gives X.
taneous equations. Depending on how the problem is The system of equations for Y is substantially smaller
formulated, the equations can be linear or nonlinear. than the original system. Also if the problem is suitably
Details can be found in Cutting.3 linearized, D is diagonal, and so calculating its inverse
The drawback of this technique is that it consider- presents no problem.
ably increases the number of variables and, hence, the Further savings can be obtained by further exam-
problem size. One method of overcoming this problem ining the structure of D, P, A, and B. D has the form
has been developed as a result of recent work, com-
missioned by Warren Spring Laboratory, at Thames
Polytechnic by Simpson er ~1.~ Simpsons approach (7)
views the flowsheet as a set of independent flow paths,
D,
rather than as a set of streams and nodes. The differ-
ence can be seen by comparing Figure 2 with Figure where Di is the matrix associated with stream i. P has
1. The optimization is now carried out on the flows in the structure
the independent paths, and the nodal constraints are
automatically taken care of. This significantly reduces
the size of the problem. An alternative is presented
here which takes account of the highly structured na-
ture of the problem, and the method is formulated in
completely general terms.

Equation structure
It is possible to obtain the solution to the problem by
solving directly the set of simultaneous equations.
El , p3

However, the system of equations is extremely sparse


and highly structured. The method about to be de-
scribed accounts for this, and so reduces the storage
space needed and computation time. The method will
first be described in general terms and then illustrated
by a particular example.
Suppose there are n streams. Then arrange the data
in the following order: Figure 2. Flowsheet as independent paths

150 Appl. Math. Modelling, 1989, Vol. 13, March


Material balancing-a generalized solution method: R. I. Mackie
Li Mi Equation (6) can now be written schematically as

i L, Mr, 1
where Li is the matrix associated with the stream La-
(8)
(15)

grange multipliers for stream i, and M, is the nodal u;.**u:, w z b


Lagrange multiplier matrix associated with stream i.
X can be written as where
X=(Xi,...,X# (9) Vi = L:DD;Li
where Xi is the vector of calculated stream variables Ui = LID; M;
for stream i. Y can be written as W = EMIDiMi
(K, * . . 3 Yn, a* (10) Ui = LID;-Ai - Bi
where Yi is the vector of stream Lagrange multipliers b = EMiD; Ai - BZ (16)
associated with stream i, and Z is the vector of nodal Equation (15) gives
Lagrange multipliers. A has the form
Vi Y; + UiZ = U;, i= 12 . . . 3n (17)
(Ai, * . . ,ArJ (11)
CU:Y/+ WZ=b (18)
where Ai is associated with stream i. B has the form
Therefore equation (17) gives
(Bi, . - . , B,, B-V (12)
Y, = v; (a; - U;Z) (19)
where Bj is associated with the stream Lagrange mul-
tipliers for stream i, and BZ with the nodal Lagrange and so
multipliers. (W - Z U:V;Ui)Z = b - ~ U:V;Ui (20)
Using this decomposition, we can write the left side
of equation (6) as This can be solved to give Z, and then equation (19)
can be used to obtain the Yi.
PD-P Equation (5) can then be written as

= [; . . . Lk)r... f... ; )
(1;)
=ir-.
..,3
M;...@ D- L,,M,
L1D; Al
- (21)
LLD,

kf\D; . . . MLD,
1 .
Mi
.
L Mn
:I which gives
Xi = Di(Ai
[ii All

- LiYi - MiZ) (22)


L:D; L: D, M,
and so the solution is obtained.
The advantages of the above method are that the
L:D, L, LLD, M, system of equations for Z is again smaller than the
system in equation (6). Also with suitable linearization
MrD;L, . . . M,D,L, CM:D; M; the matrices Dj and Vi will often be diagonal, so in-
version is again no problem. Even in the cases when
the Vi are not diagonal, they will be quite small matrices
and the right side as
with few off-diagonal terms.

/ L:D;

Example
M~DD; . . . MLD, In order to clarify the method, consider the following
example: Suppose that there are n streams and m nodes.
For each node estimates are made of the total solids
(14) mass flow and size distribution (d size fractions). Mi
is the total mass flow for stream i, and sii (j = 1, . . . ,
d) is the percent size distribution. The function to be
minimized is

Appl. Math. Modelling, 1989, Vol. 13, March 151


Material balancing-a generalized solution method: R. I. Mackie

Mi has the general form


Wi(Mj - MT)* + C W,(SG - s:)* (23)
L s: . ..s& o...o-s: . ..-s$ .o...o
-MY
where MF and s$ are the measured values and Wi and
wii are the associated weighting factors. There is one
constraint for each stream,

Tti= 1 (24)
where the exact position of the ls and - ls depends
upon which node stream i enters and which node it
and d constraints for each node L, leaves. Xi, Yi, and 2 are given by
Xi = (M;, Sii, . . . ) Sid)t
C Qi,_MiSy = 0 (25a)
I Yi = (Hi) (34)
where Q is the plant matrix, with QiL = 1 if stream i Z = (Gii,. ** 9GNd)t
enters node L, QiL = - 1 if stream i leaves node L, and A, B, and BZ by
and Qil = 0 otherwise. Equation (25) can be linearized
in the following way (WiegeP): Ai = 2 (WiM$ywiisz,. . . ) Wins%)
Bi = (1)
~ Qir.(Mis~ f MPs~ - MPs~) (25b) (35)

where My and s$ are the latest estimates of Mi and sij.


Once the Lagrange multipliers (Hi and GLj) have been The problem is now in the form necessary to apply the
introduced, the minimization function becomes new method.

E = C W;(Mi - M$) + x Wo(S; - Sf)


1 Computational method and storage
The essential steps in the computation are as follows:
~~Hi(~s~- 1) +iGLj
(1) Formulate Liy Diy ML, A, and B.
2 Qi,_ (Miss + M:SG - f?lpSt)
(2) Calculate Did, U,, Vi, W, U, and b.
(26)
(3) Calculate W - XUiV;Ui.
(4) Solve for Z.
This is minimized when grad(E) = 0, and grad(E) is
(5) Calculate Y;s.
given by
(6) Calculate Xis*

$, = 2Wi(M, - MT) + x GLjQiLSt (27) One of the key points is that the solution method is
I Lj now generalized to deal with any sort of bal,ancing
problem. Separate modules will deal with the particular
g, = 2W,(Sc- 5':) + Hi + 2 GLjQiLMP (28) formulation of D, Li, M, A, and B for the problem at
u L hand.
Often the problem can be formulated in such a way
$+j-l that the matrices Vi are diagonal, which means that
.i calculating its inverse is no problem. This was the case
in the above example. It will also be the case whenever
gj = C QiL(Mis& + M:s, - M~s:) (30) each row of Li has only one nonzero entry and D is
I diagonal. For then the elements of Vi are given by
In terms of the decomposition given in equations (7)-( 12), (V;)pg = 2 (Li)kp(D; )k(Li)kq (36)
Di is the diagonal matrix k

which iS nonzero if and Only if (Li)kp and (Li)kq are


/Wi \ nonzero, which is true if and only if p = 4. Therefore
Vi is diagonal. There may be no stream constraints at
(31)
all. This occurs if the only measurement taken apart
from the solids mass flow was one or more metal as-
says, the sum of which need not total 100%. Even if
Li is a column vector with transpose Vi is not diagonal it is likely to be sparse and will also
be small in comparison to W. Therefore inverting it is
(O,I,...,I) (32) unlikely to require an unacceptable computational time.

152 Appl. Math. Modelling, 1989, Vol. 13, March


Material balancing-a generalized solution method: R. I. Mackie

Where total mass flow and size distribution are mea-


sured the problem size is as follows:
Numberofvariablesper stream = 1+ d D,
(37)
Number of constraints per stream = 1 Tl
Number of constraints per node = d
Therefore the total number of variables in the complete
system of equations is n*(l + d) + n + m*d, where
n is the number of streams and m the number of nodes. where the Tis are the sets of transfer coefficients. If
For the partially reduced system in equation (4) the there are no equivalents of the stream constraints for
number of variables is n + m*d and for the fully re- the transfer coefficients, P will have the form
duced system, m*d. L,
For a system with 4 size fractions, 27 nodes, and
54 streams, the complete system has 432 variables, the
partially reduced system 162, and the fully reduced (38)
system 108. To obtain the size of matrix to be stored,
all these figures have to be squared, and this gives
186,624, 26,244, and 11,664, respectively. This high-
lights the saving made. Storage space is not the only The number of nodal constraints may have increased.
saving. The amount of work required to solve a set of PD-P has same form as in (8) except that W is now
simultaneous linear equations is proportional to the given by
cube of the number of variables, so there is also a W = 2 M:D;Mi + x M;+,T;M,+,
considerable saving here as well. In the above example 1 1

using the partially reduced system, the time for one


iteration was 6.6 CPU seconds, whereas the new method If there are some constraints relating the transfer coef-
took 1.O CPU seconds (both times being on a MicroVAX ficients within each group, P will have exactly the same
II computer). The saving is due to solving a smaller form as in (8).
set of equations, and the decomposition generally leads
to a more efficient program.

Conclusion
The equations arising out of material balancing prob-
Combining mass balancing and flowsheet lems are of a highly structured form. A method has
simulation been described that expresses the structure in a form
Obtaining data from a plant is a time-consuming and applicable to a wide variety of problems, and a general
costly exercise. Therefore it will often be that the data solution scheme is presented using this structure. This
are incomplete. One possible solution to this problem method results in a considerable saving in the storage
is to use mathematical models to provide additional space required, and also in the computation time. Both
data. This is already done in SUPERBAL for non- these savings are very significant in the writing of bal-
standard nodes. Nonstandard nodes are found in ancing software for microcomputers. Although the above
grinding or leaching circuits. At a grinding mill the discussion has concentrated upon the fully linear prob-
conservation of mass for each size fraction breaks down lem, the nonlinear problem can usually be linearized
because of the size reduction, and in a leaching circuit in such a way as to enable the above method to be
at certain nodes material will be going into or out of used.
solution. One solution is to ignore the size constraint The method makes full use of the structure of the
in the case of size reduction nodes. However, an al- stream constraint part of the equations, but part of the
ternative solution is to use a simple mathematical model equation structure that has not been fully developed
to represent the degree of size reduction occurring. is that of the matrices M (the nodal constraint matri-
This idea can be extended to normal nodes where no ces). Simpsons method, on the other hand, makes full
size transfer or dissolution occurs, and transfer coef- use of this structure. If the present method and Simp-
ficients can be introduced as additional data elements. sons method could be combined, the result would be
The transfer coefficients can be derived in various ways, an even more efficient method. (This is the key dif-
e.g., using mathematical models, using results of ex- ference between the two methods.) The possibility of
perimental work, using the plant engineers experi- doing this should be investigated.
ence.
Using transfer coefficients introduces additional
variables and constraints into the problem. However,
Notation
as will now be shown, the general solution method
described above still applies. The D matrix now has d number of size fractions
the form D matrix associated with stream variables

Appl. Math. Modelling, 1989, Vol. 13, March 153


Material balancing-a generalized solution method: R. I. Mackie

M;, MI adjusted and measured mass flow for stream References


i 1 Reid, K. J., Smith, K. A., Voller, V. R., and Cross, M. A survey
number of nodes of material balance packages in the minerals industry. Seven-
:Jl number of streams teenth Application of Computers and Operations Research in
P matrix associated with Lagrange multipliers the Minerals Industry, AIME, New York, 1982
2 Tucker, P. Material balancing software-what does the future
sij fraction in size interval j of stream i hold. ht. Mining April 1988
w,w weighting factors 3 Cutting, G. W. Estimation of interlocking mass balances on
x, x* adjusted and measured readings complex mineral benefication plants. Znt. J. Mineral Processing
X vector of adjusted measurements 1976, 3, 207-218
Y vector of Lagrange multipliers 4 Simpson, D. E., Everett, M. G., and Voller, V.R. Reducing the
unknowns in a constrained minimisation problem-an applica-
tion to material balances. App. Math. Modelling 1988, 12(2),
Subscripts 204-212
i stream number 5 Weigel, R. L. Advances in mineral processing material balances.
size fraction Canadian Metallurgical Quarterly 1972, 11(2), 413-424
j

154 Appt. Math. Modelling, 1989, Vol. 13, March

You might also like