In the above equation, i stands for an assayed metal and j for a process unit.
The calculation of these best estimates requires the calculation of the derivatives of S for each of the unknowns, that is, the non-measured solid mass flowrates. The best estimates are those unknown variable values for which the derivatives are all together equal to zero:
(3.37)
It is worth noting that with the obtained best estimates the mass conservation equations are not rigorously verified; essentially, the node imbalances are only minimized. By experience, the estimates obtained by this method are as good as the measured values used for the calculation are themselves (Example 3.10).
The node imbalance minimization method solves two issues with the n-product formula:
However, the method exhibits 2 limitations:
• It is sensitive to measurement errors as can be seen in Example 3.10
• It only provides estimates of the non-measured solid flowrates; measured flowrate values and assay values are not adjusted
An extension of the method aims to decrease the influence of bad measurements. The criterion node imbalance terms are weighted according to the presence or absence of gross measurement errors.
The 2-step least squares minimization method proposes a way to adjust and correct metal assays for the measurement errors that affect them (Wiegel, 1972; Mular, 1979). It is a compromise between the limitations of the node imbalance minimization method (Section 3.6.2) and the complexity of the generalized least squares minimization method (Section 3.6.4).
In the node imbalance method, the deviations to the mass conservation of solids and of metals are considered all together. The obtained estimated flowrate values minimize the deviations to all the mass conservation equations.
In the 2-step least squares method, flowrate values that rigorously verify the mass conservation equations of solids and, at the time, minimize the deviations to the mass conservation equations of metals, are first estimated. In a second step, corrected values of metal assays that rigorously verify the mass conservation equations of metals are estimated.
To achieve, taking Eqs. (3.23) and (3.24) as an example, the mass conservation equations are re-written as:
(3.42)
(3.43)
and the node imbalance equations for metals become:
(3.44)
or:
(3.45)
The general problem can now be stated as: find the best estimate of which minimizes the sum of squared imbalances Ix for all nodes and assayed metals:
(3.46)
By comparison with the node imbalance minimization method, the criterion only contains the node imbalances for metals and the search variables are a set of independent relative solid flowrates. Similar to the node imbalance minimization method, the calculation of the best estimates of the independent relative solid flowrates requires the calculation of the derivatives of S for each of the unknowns, that is, the independent relative solid flowrates. The best estimates are those values for which the derivatives are all together equal to zero. Due to the way the node imbalances for metals are written (Eq. (3.45)), the mass conservation of relative solid flowrates is rigorously verified for the estimated relative solid flowrate values.
Having determined , assuming the feed solid flowrate is measured, it is possible to estimate WC and WT. All these flowrate values rigorously verify their mass conservation equations.
In a second step, it is possible to adjust the metal assay measured values () to values that verify their own mass conservation equations as well. Let us call rx the required adjustment for each metal assay value, then it follows that:
(3.47)
and since:
(3.48)
it follows by difference with Eq. (3.45) that:
(3.49)
The problem is now to find the values of rx which minimize the following least squares criterion:
(3.50)
under the equality constraint K of Eq. (3.49). In Eq. (3.50), i stands for the number of streams (or samples) and j for the number of assayed metals. The problem is best solved using the Lagrange technique where the criterion becomes:
(3.51)
where k is the number of nodes (or mass conservation equations), and λk is the Lagrange coefficient of equality constraint Kk.
The problem is solved by calculating the derivatives of L for each of the unknown, that is, and λi. Criterion L is minimal when all its derivatives are equal to zero, which leads to a set of equations to be solved. Solving the set of equations provides the best estimates of the values, that is, the adjustments to the measured assay values which will make the adjusted assay values coherent from a mass conservation point of view (Example 3.11).
The 2-step least squares minimization method has the advantage over the previous methods of providing adjusted assay values that verify the mass conservation equations. The method remains simple and can easily be programmed (e.g., using Excel Solver) for simple flow diagrams.
Although presenting significant improvements over the previous methods, the 2-step method is not mathematically optimal since the mass flowrates are estimated from measured and therefore erroneous metal assay values. Measurement errors are directly propagated to the estimated flowrate values. In other words, the reliability of the estimated flowrate values depends strongly on the reliability of the measured assay values. The equations could, however, be modified to include weighting factors with the objective of decreasing the influence of poor assays.
The generalized least squares minimization method proposes a way to estimate flowrate values and adjust metal assay values in a single step, all together at the same time (Smith and Ichiyen, 1973; Hodouin and Everell, 1980). There is also no limitation on the number of mass conservation equations.
The mass conservation equations are written for the theoretical values of the process variables. The process variable measured values carry measurement errors and hence do not verify the mass conservation equations. It is assumed that the measured values are unbiased, uncorrelated to the other measured values and belong to Normal distributions, N(µ,σ). The balances can be expressed as follows:
(3.52)
(3.53)
where * denotes the theoretical value of the variable. Since the theoretical values are not known, the objective is to find the best estimates of the theoretical values. With the statistical assumptions made, the maximum likelihood estimates are those which minimize the following generalized least square criterion:
(3.54)
where the ^ denotes the best estimate value and σ2 is the variance of the measured value.
It is evident that the best estimates must obey the mass conservation equations while minimizing the generalized least squares criterion S. Therefore, the problem consists in minimizing a least squares criterion under a set of equality constraints, the mass conservation equations. Such a problem is solved by minimizing a Lagrangian of the form:
(3.55)
where λk are the Lagrange coefficients, and Kk the mass conservation equations.
As seen previously, the problem is solved by calculating the derivatives of L for each of the unknowns, that is, the , and the λ. Criterion L is minimal when all its derivatives are equal to zero, which leads to a set of equations to be solved. Solving the set of equations provides the best estimate values and , which verify the mass conservation equations. It is important to note that even non-measured variables can be estimated, since they appear in the mass conservation equations of the Lagrangian, as long as there is the necessary redundancy.
In Eq. (3.55), the variance of the measured values, σ2, are weighting factors. An accurate measured value being associated with low variance cannot be markedly adjusted without significantly impacting the whole criterion value. In contrast, a bad measured value associated to a high standard deviation can be significantly adjusted without impacting the whole criterion value. Hence, adjustments, small or large, will be made in accordance to the confidence we have in the measured value whenever possible considering the mass conservation constraints that must always be verified by the adjusted values (Example 3.12).
While Example 3.12 presents the calculations in detail for a simple case, there exists a more elegant and generic mathematical solution that can be programmed. The solution uses matrices and requires knowledge in matrix algebra.
The formulation of the generalized least squares minimization method enables resolving complex mass balance problems. The Lagrange criterion consists of 2 types of terms: the weighted adjustments and the mass conservation constraints. The criterion can easily be extended to include various types of measurements and mass conservation equations.
The whole set of mass conservation equations that apply to a given data set and mass balance problem is called the mass balance model. Depending on the performed measurements and sample analyses, the following types of mass conservation equations may typically apply in mineral processing plants:
• Conservation of slurry mass flowrates
• Conservation of solid phase mass flowrates
• Conservation of liquid phase mass flowrates (for a water balance, for instance)
• Conservation of solid to liquid ratios
• Conservation of components in the solid phase (e.g., particle size, liberation class)
• Conservation of components in the liquid phase (in leaching plants, for instance)
There are also additional mass conservation constraints such as:
• The completeness constraint of size or density distributions (the sum of all mass fractions must be equal to 1 for each size distribution)
• Metal assays by size fraction of size distributions
• The coherency constraints between the reconstituted metal assays from assay-by-sizes and the sample metal assays
All these constraint types can be handled and processed by the Lagrangian of the generalized least squares minimization algorithm. As mentioned, all the necessary mass conservation equations for a given data set constitute the mass balance model.
It is convenient to define the mass balance model using the concept of networks. Indeed, the structure and the number of required mass conservation equations depend on the process flow diagram and the measurement types. Therefore, it is convenient to define a network type by process variable type, knowing that the structure of mass conservation equations for solid flowrates (Eq. (3.23)) is different from that of metal assays (Eq. (3.24)), for example.
Not only does a network type mean a mass conservation equation type, but it also expresses the flow of the mass of interest (solids, liquids, metals…).
For the 2-product process unit of Figure 3.33, assuming 3 metals (Zn, Cu, and Fe) have been assayed on each stream, then Figure 3.35 shows the 2 networks that can be developed, one for each equation type (Eqs. (3.23) and (3.24)).
For the more complex flow diagram of Figure 3.34, assuming again 3 metals (Zn, Cu, and Fe) have been assayed on each of the 6 streams, then Figure 3.36 shows the 2 networks that can be developed.
Assuming a fourth metal, Au for example, has been assayed on the main Feed, main Tailings and main Concentrate streams only, then a third network should be developed for Au as shown in Figure 3.37.
Networks are conveniently represented using a matrix (Cutting, 1976). In a network matrix, an incoming stream is represented with a+1, an outgoing stream with a–1 and any other stream with a 0. For the networks of Figure 3.35 and Figure 3.36, the network matrices are, respectively:
(3.56)
and
(3.57)
Each row represents a node; each column stands for a stream. Equations (3.56) and (3.57) expressed in a matrix form become:
(3.58)
(3.59)
where MW and Mx are the network matrices for the solid network and the metal assay network, W is the column matrix of solid mass flowrates, the diagonal matrix of the solid mass flowrates used in the metal assay network, and Xi the column matrix of metal assay i on each stream of the metal assay network (i stands for Zn, Cu and Fe) (Example 3.13).
In the generalized least square minimization method, weighting factors prevent large adjustments of trusted measurements and, on the contrary, facilitate large adjustments of poorly measured process variables. Setting the weighting factors is the main challenge of the method (Almasy and Mah, 1984; Chen et al., 1997; Darouach et al., 1989; Keller et al., 1992; Narasimhan and Jordache, 2000; Blanchette et al., 2011).
Assuming a measure obeys to a Normal distribution, the distribution variance is a measure of the confidence we have in the measure itself. Hence, a measure we trust exhibits a small variance, and the variance increases when the confidence decreases. The variance should not be confused with the process variable variation, which also includes the process variation: the variance is the representation of the measurement error only.
Measurement errors come from various sources and are of different kinds. Theories and practical guidelines have been developed to understand the phenomenon and hence render possible the minimization of such errors as discussed in Section 3.2. A brief recap of measurement errors as they pertain to mass balancing will help drive the message home.
Errors fall under two main categories: systematic errors or biases, and random errors. Systematic errors are difficult to detect and identify. First, they can only be suspected over time by nature and definition. Second, a source of comparison must be available. That is achievable to some extent through data reconciliation (Berton and Hodouin, 2000). A bias can be suspected if a measure over time is systematically adjusted to a lower (or higher) value. Once a bias is detected and identified, the bias source and the bias itself should be eliminated. Remember, the generalized least square method is a statistical method for data reconciliation by mass balancing and bias is a deterministic error, not a statistical variable, and is therefore a non-desired disturbance in the statistical data processing.
Measurement errors can also be characterized by their amplitude, small and gross errors, and by the frequency distribution of the measure signal over time: low frequency, high frequency or cyclical. Although there is no definition for a gross error, gross errors are statistically barely probable. As such, if a gross error is suspected it should be corrected before the statistical adjustment is performed. Typically, gross errors have a human source or result from a malfunctioning instrument.
Measurement errors originate from two main sources: sampling errors, and analysis errors. Sampling errors mainly result from the heterogeneity of the material to sample and the difficulty in collecting a representative sample; analysis errors result from the difficulty to analyze sample compositions. The lack of efficiency of the instruments used for measuring process variables also contributes to measurement errors. Analysis errors can be measured in the laboratory and therefore the variance of the analysis error is estimable. Sampling errors are tricky to estimate and one can only typically classify collected samples from the easiest to the more difficult to collect. Assuming systematic and gross errors have been eliminated, then purely random measurement errors can be modeled using 2 functions: one that represents the sampling error and the other one that represents the analysis error. The easiest model is the so-called multiplicative error model where the analysis error variance is multiplied by a factor (kSE) representing the sample representativeness or sampling error: the higher the factor value, the less representative the sample.
(3.60)
The multiplicative error model can serve as a basis to develop more advanced error models.
The remaining unknown, once a mass balance is obtained for a given set of measured process variables and measurement errors, is: how trustable are the mass balance results or is it possible to determine a confidence interval for each variable estimated by mass balance? That is the objective of the sensitivity analysis.
Assuming systematic and gross errors have been eliminated, and measurement errors are random and obey to Normal distributions, there are two main ways to determine the variance of the estimated variable values (stream flowrates and their composition): Monte Carlo simulation, and error propagation calculation. Each method has its own advantages and disadvantages; each method provides an estimate of the variance of the adjusted or estimated variables.
In the Monte Carlo simulation approach (Laguitton, 1985), data sets are generated by disturbing the mass balance results according to the assumed error model. Each new data set is statistically reconciled and the statistical properties of the reconciled data sets determined.
In the error propagation approach (Flament et al., 1986; Hodouin et al., 1989), the equations through which measurement errors have to be propagated are complex and therefore it is preferable to linearize the equations around a stationary point. Obviously, the obtained mass balance is a good and valid stationary point. The set of linearized equations is then solved to determine the variable variances. This method enables the calculation of covariance values, a valuable feature for calculating confidence intervals around key performance indicators, for instance.
From a set of measured process variables and their variances, therefore, it is possible to determine a set of reconciled values and their variances:
(3.61)
It can be demonstrated that the variance of the adjusted values is less than the variance of the measured values. While the variance of the measured values contributes the most to the variance of the adjusted values, the reduction in the variance values results from the statistical information provided. The data redundancy and the topology of the mass conservation networks are the main contributors to the statistical content of the information provided for the mass balance calculation.
We have seen with the n-product formula that n–1 components need be analyzed on the n+1 streams around the process unit to estimate the n product stream flowrates, assuming the feed stream flowrate is known (or taken as unity to give relative flowrates). The n-product formula is the solution to a set of n equations with n unknowns.
In such a case, there are just enough data to calculate the unknowns: no excess of data, that is, no data redundancy, and the unknowns are mathematically estimable. A definition of redundancy is therefore:
A measure is redundant if the variable value remains estimable should the measured value become unavailable.
It follows from the definition that the measured value is itself an estimate of the variable value. Other estimates can be obtained by calculation using other measured variables and mass conservation equations.
With the n-product formula, determining data redundancy and estimability is easy. In complex mass balances, determining data redundancy and estimability is quite tricky (Frew, 1983; Lachance and Flament, 2011). Estimability and redundancy cannot be determined just by the number of equations for the number of unknowns. It is not unusual to observe global redundancy with local lack of estimability (Example 3.14).
What are the factors influencing estimability and redundancy? Obviously, from Example 3.14, the number of measured variables is a strong factor, but it is not the only one. The network topology is also a factor. In the case of Example 3.14, if one of the product streams of unit B was recycled to unit A, then, with two metals analyzed on each stream, all the metal analyses would be redundant and adjustable.
It is worth noting that analyzing additional stream components does not necessarily increase redundancy and enable estimability. A component that is not separated in the process unit has the same or almost same concentration in each stream sample. The associated mass conservation equation is then similar (collinear) to the mass conservation of solids preventing the whole set of equations to be solved.
Estimability and redundancy analyses are complex analyses that are better performed with mathematical algorithm. However, the mathematics is too complex to be presented here.
It might be tempting to use spreadsheets to compute mass balances. Indeed, spreadsheets offer most of the features required to easily develop and solve a mass balance problem. However, spreadsheets are error prone, expensive to troubleshoot and maintain over time, and become very quickly limited to fulfill the needs and requirements of complex mass balances and their statistics (Panko, 2008).
There exist several providers of computer programs for mass balance calculations for a variety of prices. While all the features of an advanced solution may not be required for a given type of application (research, process survey, modeling and simulation project, on-line mass balancing for automatic control needs, rigorous production and metallurgical accounting), a good computer program should offer:
• An easy way to define, list and select mass conservation equations
• An easy way to define error models
• Visualization and validation tools to quickly detect gross errors
• An estimability and redundancy analysis tool
• Statistical tools to validate the error models against the adjustments made
Furthermore, depending on the mass balance types and application, the program should provide:
• Support for complete analyses (e.g., size distributions)
• Support for assay-by-size fractions
• Connectivity to external systems (archiving databases, Laboratory Information Management Systems) for automated data acquisition
• Automated detection and removal of gross errors
• Automated configuration of mass conservation models
Additional information can be found in Crowe (1996), Romagnoli and Sánchez (1999) and Morrison (2008).
One principal output of the sampling, assaying, mass balancing/data reconciliation exercise is the metallurgical balance, a statement of performance over a given period: a shift, a day, a week, etc. Assuming that the reconciled data in Example 3.12 correspond to a day when throughput was 25,650 t (measured by weightometer and corrected for moisture), the metallurgical balance would look something like in Table 3.3.
Table 3.3
Metallurgical Balance for XY Zn Concentrator for Day Z
Product | Wt (t) | Grade (%) | Distribution (%) | ||
Zn | Cu | Cu | Zn | ||
Feed | 25,650.0 | 3.89 | 0.17 | 100 | 100 |
Zn conc | 1,674.1 | 52.07 | 0.66 | 87.35 | 25.71 |
Tailings | 23,975.9 | 0.53 | 0.13 | 12.65 | 74.29 |
The calculations in the Wt (weight) column is from the solid (mass) split using Eq. (3.25). It should be evident using the reconciled data in Table ex 3.12a that regardless of which metal assay is selected to perform the calculation that the result for solid split is the same (including using Fe), giving WC/WF=0.065. (In checking you will note that it is important to retain a large number of significant figures to avoid “rounding errors”, rounding at the finish to create the values given in Table 3.3.) From the solid split the tonnage to concentrate is calculated by multiplying by the feed solids flowrate (i.e., 25,650×0.065=1,674.1), which, in turn, gives the tonnage to tailings. The recovery to concentrate is given using Eq. (3.27), and thus the recovery (loss) to tails is known; together recovery and loss are referred to as “distribution” in the table. The information in the table would be used, for instance, to compare performance between time periods, and to calculate Net Smelter Return (Chapter 1).
Mass balancing based on metal assays has been described, and used to illustrate data reconciliation. As noted, components other than metal (or mineral) can be used for mass balancing. The use of particle size and per cent solids is illustrated; this is done without the associated data reconciliation, but remember, this is always necessary for accurate work.
Many units, such as hydrocyclones and gravity separators, produce a degree of size separation and the particle size data can be used for mass balancing (Example 3.15).
Example 3.15 is an example of node imbalance minimization; it provides, for example, the initial value for the generalized least squares minimization. This graphical approach can be used whenever there is “excess” component data; in Example 3.9 it could have been used.
Example 3.15 uses the cyclone as the node. A second node is the sump: this is an example of 2 inputs (fresh feed and ball mill discharge) and one output (cyclone feed). This gives another mass balance (Example 3.16).
In Chapter 9 we return to this grinding circuit example using adjusted data to determine the cyclone partition curve.
A unit that gives a large difference in %solids between streams is a thickener (Examples 3.17); another is the hydrocyclone (Example 3.18).
See Example 3.19.
Example 3.19 raises a question as to how to estimate the variance. In this case a relative standard deviation (standard deviation divided by the mean) was taken and assumed equal for all assays. The standard deviation could be broken down into that associated with sampling and that associated with assaying, or some other “error model”. Regardless, there is some questioning of the common use of relative standard deviation as the absolute standard deviation decreases as the assay value decreases and some would argue this is not realistic. Alternative error models which avoid this have been suggested (Morrison, 2010), but none appear to be universally accepted.