You are on page 1of 4

COMPUTER APPLICATIONS AND PROCESS CONTROL

Computer Adjustment of Metallurgical Balances


H. W. SMITH and N. ICHIYEN,

Department of Electrical Engineering,


University of Toronto,
Toronto, Ont.
ABSTRACT

A convenient method for the calculation of metallurgical


balances, based on statistical treatment of all available
data, is presented. An error analysis is included. Examples
show the advantages of the method, and also that such
balances are less precise than might be supposed.

makes possible the on-line computation of metallurgical balances. Finally, the application of steady-state
process modelsu21 for flotation circuit analysis and
optimization requires, as a first step, the computation
of complete and accurate internal metallurgical balances from experimental data.
This paper describes a numerical procedure for
computing mass balances which minimizes specialpurpose programming effort and computer storage
requirements, and which is suitable for both laboratory and plant (including on-line) use. An error
analysis is included.

INTRODUCTION
THE COMPUTATION of metallurgical balances from imprecise analytical data is a frequently occurring problem in flotation plants. In mill practice, very approximate methods have normally been used, due to the
computational difficulty of more accurate statistical
methods. With the steadily growing availability to
mill staff of computer facilities, more accurate methods are now feasible. In addition, the growing use
of on-line X-ray analysis and control computers now

PROBLEM, STATEMENT
Consider a flotation circuit in which streams 1, .. . ,
n have metallurgical compositions given by the composition vectors

=
C*
l

~fl]

ctn

for metallurgical species i = 1, ... , m. In addition,


there will be a vector of mass flows within the circuit

w*
H. W. SMITH

wT J

~;

N. M. JCBIYEN

HAROLD W. SMITH, a native of Toronto, holds degrees


from the University of Toronto (B.A.Sc., 1950) and
M.I.T. (Sc.D., instrumentation and control, 1961). He
served in the Royal Canadian Navy (1945-1966), resigning
to join the University of Toronto, where he is currently
Professor of Electrical Engineering. His research interests include the application of modelling, control and
estimation theory to the improved control of metallurgical
processes. In addition to his university appointment, he is
a consultant to Falconbridge Nickel Mines Ltd., and a
consulting partner in Urwick, Currie and Partners Ltd.,
Toronto.
NORMAN M. ICHIYEN, a native of Montreal, Quebec,
graduated from McGill University in Montreal with a
Bachelor of Electrical Engineering in 1970. In 1973, he
received an M.A.Sc. in Electrical Engineering from the
University of Toronto. His thesis work involved simulation of a complex zinc flotation circuit. His supervisor was
Professor H. W. Smith. He is currently with Atomic
Energy of Canada Limited.
PAPER SUBMITTED: in November of 1972; revised
manuscript received on June 29, 1973.
KEYWORDS: Computers, Process control, Flotation,
Mass balance, Metallurgical balances, Statistical methods,
Flotation.

(CIM) Bulletin for September, 1973

to be determined from the mass balance equations


for the circuit
f; (c( ,

w*) = 0,

i = 1, .. , m.

However, the data available are not the true composition vectors c:, but rather the measured composition
vectors
Ci =

cf

+ e;

where Eis a vector of sampling and measurement errors.


The adjustment problem is thus to determine estimates c1, i = 1, ... , m, and
which satisfy the mass
balance equations

w,

f;

<2. w) = o

and which are in some sense the " best" estimates of


c7 and w* respectively.
On the assumption that sampling and measurement
errors are Gaussian and unbiased, the maximum likelihood estimate of c,, w is that which minimizes the
objective function

97

00

(Ci -

i=l

C; )

'M"j 1 (Ci -

where
M,

w.

E (e;d )

(i.e. the covariance matrix of sampling and measurement error ) and the prime denotes the transpose of a
vector or matrix.
'Briefly stated, therefore, the problem is: minimize
the objective function

(c, -

i=l .. . -

C;)

'M-;- 1 (C, - ci)

subject to the mass balance constraints


f; ([;, ~) = 0.

METHOD OF SOLUTION

COMPUTATIONAL EXAMPLES

The problem as stated is a standard problem in


nonlinear least-squares analysis, and may be solved
by first-order (Gauss-Newton ) or second-order (Newton-Raphson ) gradient methodsm. However, the computation of the gradient requires significant additional programming which is specific to the circuit
configuration under study. This is undesirable in circuit optimization studies because of the programming
effort involved when many configurations may be
studied. In on-line applications, computer storage is
usually at a premium, and the additional storage requirements of gradient methods are unattractive. For
these reasons, the following direct search method is
proposed:
1. Express the mass balance equations in the form
B (w)c;

4. Using a direct search program, hill-climb on


to find a minimum over
of J, repeating steps 2 and
3 at each iteration. A suitable method is that of Rosenbrockri , which consists of stages having one one-diAt
mensional minimization for each element of
the end of each stage, the directions of search are
rotated, although still remaining orthogonal, so that
the first search in the next stage is in the direction
found to be most successful in the previous stage. The
search terminates when the minimum is located to a
pre-specified accuracy:x
This method permits the use of a standard program; only the program to evaluate B (w ) is specific
to each application, and this program is very simple.
The search method suggested is easily programmed,
a"ud is effective in the ill-conditioned problems which
occur when recycle streams are large.

Ci)

0.

w,

2. For some initial estimate of


compute the adjustment to the composition vector which minimizes
and satisfies the mass balance
J for that value of
equations; this is found, by standard minimum varia nce techniques [3J , to be

oci = - M ,B'(BM,B')- 1Bci.

First consider a flotation circuit having the configuration 8hown in Figure 1. Grab samples were
taken from the eight process streams indicated, and
analyzed to yield the data shown in the first column in
Table 1. The three mass flows indicated in Figure 1
are to be estimated, together with the corrected values
of the twentycfour analyses.

@ ___!!1:.

mi~
R
S

w~
3

FIGURE 1 -

w,c

Zinc Circu it .

3 . Form

c, =

C;

+ OCi

''' FORTRAN and APL versions of this algorithm may be


obtained from the authors at reproduction cost.

:and evaluate J (w ) .

TABLE 1 - Balance for Circuit of Figure I


Experimental Analysis

Adjusted Analysis

Per Cent Adjustment

Stream

Cu

Zn

Fe

Cu

Zn

Fe

1
2
3
4
5
6
7
8

0.163
0.447
0.466
0.140
0.960
0.657
1.020
0.440

3.93
11.63
8.11
0.49
34.64
52.07
42.73
U.86

11.57
12.79
14.35
13.09
14.37
14.67
14.66
13.75

0.170
0.462
0.406
0.136
0.964
0.649
1.009
0.472

3.85
11.73
8.72
0.49
38.85
51.70
37.01
10.75

12.34
13.56
13.45
12.18
14.48
14.56
14.47
13.77

Cu

4.17
3.29
-12.83
- 2.76
0.43
- 1.20
- 1.06
7.38

Zn

- 1.87
0.83
7.48
0.12
12.16
- 0.71
- 13.39
- 9.39

Fe

6.59
6.02
-6.22
- 6.94
0.77
-0.73
- 1.30
0.11

Mass flows (with 503 probable error):

w1=
98

.06563 .00783; w2= 3.781 o.738; wa = o.5238 o.1346.

The Canadian Mtliiug and Metallurgical

Four mass balance equations must be satisfied for


each of the three circuit sections - one each for the
rougher, cleaner and scavenger, and one for the total
circuit. These are:

CD

UNIT
CELLS

l. Circuit:

COPPER
FLOTATION

ZINC
FLOTATION

@)

\J)

WI

w3

2. Scavenger:

FIGURE 2 -

3. Cleaner :
W3C5 -

W1C6 -

W1 +

W2 +~w3) C2 -

(1 -

W1 +

W2)C3 -

W3C5 =

It is easily verified that the values of w obtained


by solving the first three equations are far from satisfying the fourth, and that the results obtained from
the sets of copper, zinc and iron analyses are completely inconsistent.
From the mass balance equations, by inspection,

B (w) =

Flotation Circuit.

W1)C1 =

(w a -

4. Rougher:
(1 -

W2

- (1-wi)

-(1-wi)

TABLE 2 - Balance for Circuit of Figure 2


Experi menta I
Analysis
Stream

Cu

Adjusted
Analysis

Zn

Cu

Per Cent
Adjustment

Zn

Cu

Zn

---1
2
3
4
5
6
7

1.93
0.45
0.13
0.09
19.86
21.44
0.51

3.81
4.92
5.36
0.41
7.09
4.95
52.10

1.91
0.45
0.13
0.09
20.04
21.45
0.52

4.61
4.58
4.38
0.41
6.91
4.92
51.59

-1.02
0.01
-3.78
2.45
0.91
0.03
l.17

20.94
6.82
18.26
0.09
2.55
0.51
0.98

0
Mass flows (with 503 probable error):

wI =

0
-(wa-W1)

-W3

0
0

In this case, no reliable data were at hand regarding


the precision of sampling and analysis. It was assumed
that the relative precision of each measurement was
identical and that errors were uncorrelated . On these
assumptions, except for a scale factor,
M i = diag[c; 1 , ... , cr.,]

.067,

w2

= .459,

wa =

-.058.

The value of ;.,a is nonsensical, and was replaced by


w 3 = 0.1, a guess based on experience. The direct
search program converged in four stages to the solution

iv,

o.06563

w2=

3.781

wa

= o.5238

and to the corrected analyses given in the second colume of Table 1. The third column gives the per cent
change in the original analysis. The r.m.s. sampling
and analytical error may be approximated by the
standard deviation of the corrections, which is
a =

6.56% .

This value is not unreasonable in practice.

(CIM) Bulletin for September, 1973

.06954 .00232;
.07066 .00668.

W2 =

.08964 .00261;

As a second example, consider a metallurgical balance over an entire plant, based on X-ray data. The
plant is shown in Figure 2 and the data in Table 2.
The mass balance equations are:
1. Unit cells
C1 -

(1 -

W1 ) C2 -

W1C5 =

2. Copper section
C1 -

(1 -

W2 ) C3 -

W2C6

= 0

3. Zinc section
(1 -

A starting value for


was obtained by solving the
first three zinc mass balance equations ; this yielded

,v,

wa=

W2)C3 -

(l

- W2 -

W3) C4 -

W3C7

= 0

from which the B(w) matrix is found. In this particular case, the precision of the different X-ray measurements was approximately known from calibration experiments, and the M matrices were based on
these data. A starting value of
was found from
standard two-product formulas:

w,

= o.70, w2 = 0.091,

w3= o.096.

The direct search program converged in five stages


to the solution

iv,

= o.06954,

w2 = o.08964, wa

= o.07066,

and the adjusted analyses are shown in Table 2. It


will be noted that three zinc analyses have very large
adjustments. As noted in the report from which the
data for this example were takenm, it was later discovered t hat some analyses had X-ray calibration
errors which were unknown at the time.

9S

ERROR ANALYS IS

SENSITIVITY OF SOLUTIONS

In fitting models to analytical data, it is frequently


des irable to find not only the estimate,
of mass
flows in a circuit, but also an estimate of its probable
error. This is particularly true when large recycle
streams exist, as mass flow estimates are then very
sensitive to data errors. A linear estimate of the
probable error may be found in the following way.
If the mass balance equations are perturbed, the perturbation equations are found to be

w,

Ai(c,) ow

+ B (w) oci

i = l, ... , m.

B (w) is the matrix previously defined, and A, (c,)


is the matrix of coefficients obtained by writing the
mass balance equations in the form
A;(c;) w ~ = b (c;) ,

1, . ,m.

Then a perturbation in the data, 8c1, yields a mass


flow perturbation
ow= -AtB oc;

where

For the first example given above, the covariance


matrix was computed and found to be
.000135

[(~*-~ ) ~*-~)'] =

.000644 - .000027
.000644 1.197
.1039

-.000027

.1039

.0398

This yields the standard deviations


0

w 1 =

0.01161,

aW2 =

1.094,

wa

= 0.1995,

whiCh are large in comparison with the estimates.


Further, although errors in W1 are nearly independent
of those in W2 and
errors in these last two quantities are strongly correlated (correlation coefficient
0.50). It must be recognized that estimates of mass
flows in large recycle streams are subject to significant error even when sampling and measurement errors are relatively small.
Under these conditions, it is essential to use all
available data, weighted according to precision, and,
in on-line applications, to use time averaging of X-ray
analytical data to reduce random error in the data.

wa,

At = (A:Ai)- 1A:

the pseudo-inverse of A/ 61 The covariance matrix


E[owow'J = At B E[Oc,oc;J (AtB)'.

If, now, the expectation on the right-hand side is


replaced by the measurement covariance matrix, the
covariance matrix of
is obtained;

E[(w* - w) (w* -w)'] = AtBM, (AtB)'.

CONCLUSIONS

The numerical method proposed offers a convenient


method of obtaining the best estimate of metallurgical
balances, based on proper statistical treatment of the
available data. The error analysis presented allows
estimation of the precision of such balances; in general, this precision is lower than is usually supposed.

To use all the experimental data, the m sets of equations must be combined. It is easily verified that this
is done by forming
A' = [A; M ... A,:.]

B=

B 0

0 B

0 0

M1
M

=I

ACKNOWLEDGMENTS

The authors are grateful to the management and


mill staff of the Lake Dufault Division, Falconbridge
Copper Ltd., for allowing plant access and providing
analytical services in gathering the data for one of
the examples used. The work reported was supported
in part by National Research Council Grant A-4165.

. 0

M2

REFERENCES
(1) King, R. P., Model for the Design and Control of

Mrn
(2)

and finding

(3)

E[ (w*-w) (w*-w)'J = A+BM(A+B)'

If more precise data concerning measurement error


covariance are not at hand, the M1 matrices may be
approximated by
Mi ~ a 2 diag

100

[c ..... C; n].
2

(4)

(5)

(6)

Flotation Plants, 10th Annual Symposium on the


Application of Computer Methods in the Mineral hidustry, Johannesburg, R.S.A., April 1972.
Loveday, B. K., and .Marchant, G. R., Simulation of
Multicomponent Flotation Plants, as for (1).
Deutsch, R., Estimation Theory, Ch. 6 (Prentice-Hall,
Inc., Englewood Cliffs, N.J., 1965).
Rosenbrock, H. H., An Automatic Method of Finding
the Greatest or Least Value of a Function, Computer
J., 3, pp. 175-184, October 1960.
Smith, H. W., and Lewis, C. L., Computer Control
Experiments at Lake Dufault, CIM Bulletin, 62, W
109-115, February 1969.
Penrose, R. A., A Generalized Inverse for Matrices,
Proc. Cambridge Phil. Soc., 51, pp. 406-413, 1955.

The Canadian Minin2 and Metallurgical