Keywords

1 Introduction

Aluminium production is based on the electrolysis of alumina consisting of various forms of Al\(_{2}\)O\(_{3}\). Electrolytes of aluminium electrolysis baths in their composition comprise melts of the senary system Na-Al-Ca-Mg-F-O at a temperature of 930–950 \(^{\circ }\)C. Part of the components continuously evaporates from the baths, which shifts the composition of the electrolyte from the optimum point. It causes a technological need for the regular adjustment of the electrolyte composition by fluoride salts. The amount of fluoride salt for addition into the electrolysis bath is calculated from the results of operational analysis of the chemical composition of crystallized electrolyte samples.

The bath chemistry composition or more exactly the bath ratio (BR is wt. NaF/AlF\(_{3})\) or cryolite ratio (CR is mol. NaF/AlF\(_{3}\), CR \(=\) 2BR) is a principal and fundamental cell parameter to achieve the best performance of electrolytic baths. The CR has a direct impact on the temperature control, alumina solubility, ledge formation and current efficiency. The industrial characterization of the bath electrolyte for process control is generally carried out using two automatic calibrating methods: a combined X-ray diffraction (XRD) analysis of CR and X-ray fluorescence (XRF) analysis of CaF\(_{2}\) and MgF\(_{2}\). The technologically required accuracy of the CR analysis is characterized by standard deviation in 0.02 CR units. The XRD method performs quantitative phase analysis (QPA) of the mineral composition of the electrolyte samples, and then the CR is calculated from the found mineral phase concentrations. Appropriate electrolyte reference samples are required in the XRD and XRF instrument calibration on crystalline phases and on calcium and magnesium, respectively.

Figure 1 shows a scheme of the system of X-ray process control and correction of electrolyte composition, acting on the aluminium smelters.

Fig. 1
figure 1

Shows a scheme of the system of X-ray process control and correction of electrolyte composition, acting on the aluminium smelters

Sampling from the cells is performed manually by certain regulations. The preparation of samples for analysis (grinding and fitting of powder in the cell) is performed automatically, along the sample preparation lines. Pressing quality control is carried out visually, and X-ray phase analysis on an automatic diffractometer. As a result of analysis the mass of fluoride compounds to be added in the bath to adjust the composition of the electrolyte to the optimum is calculated. Reproducibility and accuracy of analysis is periodically randomly checked on routine and reference samples, respectively. In a case of unsatisfactory results, the identification of causes and, if necessary, re-calibration of the X-ray equipment is carried out.

Fig. 2
figure 2

Shows a XRD full powder pattern and a mineral composition one of a number electrolyte samples. Colour sticks are XRD reference standards of identified minerals from data base PDF ICDD [1]

Figure 2 shows the XRD full powder pattern and the mineral composition of one of a number electrolyte samples. The colour sticks are XRD reference standards of identified minerals from the PDF ICDD database.

An alternative standardless XRD method is quantitative phase full-profile analysis by the Rietveld method [2]. The estimation of the CR from XRD data by the Rietveld method is possible with the technologically desired accuracy. In addition, the Rietveld method universally applies to baths from various plants that are sampled with different methods and that are characterized by different crystallinity and very diverse chemical compositions. However, the Rietveld method is interactive and time-consuming, and the industrial electrolyte samples analysis from many hundreds of baths should be fully automatic. Even the best attempts to automate the full-profile CR analysis by the Rietveld method has not yet provided satisfactory accuracy [3]. This is due to the need for automatic refinement not only of the profile parameters of X-ray diffraction patterns, but also of the crystal structure parameters of some fluoride electrolyte phases, which can vary in different samples and critically affect the accuracy of the CR determination.

An automatic method for XRD CR electrolyte analysis is proposed in this article. The method is based on an evolutionary hybrid genetic algorithm, which controls the full-profile analysis by the Rietveld method.

2 The Method and Program of Evolutionary Full-Profile Phase Analysis

Evolutionary genetic algorithms simulate the biological processes of natural selection in wildlife and are successfully used in various fields of science and technology [4]. Genetic algorithms are also used in diffraction structural analysis [5, 6] to determine the approximate models of the atomic crystal structure of materials by their X-ray powder diffraction patterns. Crystal structure includes the coordinates of atoms in the symmetrically independent part of the unit cell of crystal material and some additional parameters. This information is accumulated in the Crystal Structure Databases (ICSD, CSD) [7, 8].

The essence of the approach is to generate a random set (population) of trial crystal structures and evolve it using probabilistic formal genetic operations: selection, crossover, mutation, etc.

Evolutionary selection is based on the offspring structure evaluation by fitness function, which represents here the weighted difference between the model profile (calculated from the trial structure) and the experimental diffraction pattern, i.e. one must minimize the profile R\(_\mathrm{wp}\)-factor of the Rietveld method. The crystal structure model found is refined by the Rietveld method based on the nonlinear least squares. The Rietveld method is also used for the quantitative X-ray analysis of multiphase materials. The possibility of refinement of the actual crystal structure of multiphase material phases makes QPA “structurally sensitive” and thereby greatly increases its accuracy.

A two-level hybrid genetic algorithm (GA) of structural analysis [9] is used mainly to analyse the crystal structure of inorganic substances. This GA performs the evolution of profile and structural parameters of the Rietveld method and controls its refinement by the derivative difference minimizing method (DDM) [10] (an analogue of the Rietveld method).

The DDM method is based on the minimization of difference curve derivatives:

$$\begin{aligned} MF=&\sum {w_1 \left( {\frac{\partial }{\partial \theta }\left( {Yo-Yc} \right) } \right) } ^{2}+ \\&\,\sum {w_2 \left( {\frac{\partial ^{2}}{\partial \theta ^{2}}\left( {Yo-Yc} \right) } \right) } ^{2}\rightarrow \min , \nonumber \end{aligned}$$
(1)

where \(Y_{o}\) and \(Y_{c}\) are observed and calculated profile intensities, correspondingly, \(\theta \) is the diffraction angle, w is the weight coefficient and the summation is fulfilled over the entire XRD powder profile.

The calculated profile is

$$\begin{aligned} Yc(\bar{{P}},\theta _j )=K\sum _j {S_i \sum _i {I_{ih} (\bar{{P}}_{str} )\cdot \Omega _i (\bar{{P}}_{prof},\theta _h,\theta _j )} } , \end{aligned}$$
(2)

where K is constant; \(S_{i}\) are scale factors of the calculated diffraction profile for phase i; \(I_{ih}\) is a function of the crystal structure parameters for the phase i; \(\Omega \) \(_{i }\) is the profile function of diffraction reflexes; \(\bar{{P}}=(\bar{{P}}_{prof},\bar{{P}}_{str} )\) is the vector of the profile and crystal structure parameters.

The DDM method includes a refinement of the profile and crystal structure parameters \(\bar{{P}}\) of phases by the nonlinear least squares method (LSM). The initial values of the parameters are determined by the hybrid GA.

The GA fitness function is the R-factor of the DDM, which represents a numerical derivative of the relative difference between the calculated and experimental powder pattern and is computed in a similar way to the usual Rwp-factor of the Rietveld method.

The authors of [11] have shown that it is possible to perform the automated standardless full-profile quantitative X-ray diffraction analysis on the basis of a two-level hybrid GA with the DDM.

The concept of evolutionary XRD QPA is the searching on the first level of the GA for the initial approximation of a profile and refinable structural parameters within given value ranges and then its refinement by the DDM on the second level of the GA. The QPA feature is that the crude initial values of the parameters can be determined in advance. For example, the atomic coordinates of the crystal structures are taken from the Crystal Structure Databases. Therefore, the search for more accurate initial values by the GA can be performed within narrow ranges of parameter values. The flowchart of the GA is shown in Fig. 3.

Fig. 3
figure 3

The flowchart of the two-level hybrid GA

The profile parameters include the width of the diffraction reflexes, their shape, etc. Refinable structural parameters include the coordinates of atoms in the common positions of phase crystal lattices. Along with them, the dimensions of crystalline cell axes and texture parameters (preferred orientation of particles) are refined, as well as the scale factors \(S_{j}\) of calculated diffraction profiles of phases in the powder patterns of the material. The listed parameters are binarized and encapsulated in a string, the GA chromosome. Objects of the evolution in GA2 are bit strings \(\overline{B} \). Each bit set in ‘1’ specifies a corresponding parameter of \(\bar{{P}}\) to be refined by the DDM on the current generation. The better the refining has been, the higher B-type fitness is assigned. Thus genetic operations over B-individuals generate strategies of P-individuals refinement.

The evolution of the parameters in the iterative execution process on both GA levels provides a selection of good initial approximations for the DDM. Periodic refinement of the best parametric strings by DDM leads to a convergence of any of them to low R\(_\mathrm{wp}\)-factor values (less than 10 %). Then, the optimized scaling factors \(S_{j}\) of the calculated diffraction profiles of phases are used to calculate the phase concentrations \(C_{j}\) in the material:

$$\begin{aligned} C_j =S_j Z_j M_j V_j/\mathop {\sum _{j=1}^N {S_j Z_j M_j V_j } } \end{aligned}$$
(3)

where \(V_{j}, Z_{j,} M_{j }\) are, respectively, the cell volume, the number of formula units per cell and the molecular weight of phase j; N is the number of crystalline phases in the samples.

Fig. 4
figure 4

The form for settings for the genetic algorithm

Fig. 5
figure 5

The form for the profile (top) and structural (bottom) parameters with settings for Cryolite

Fig. 6
figure 6

The map of the distribution of Weberite in the electrolyte reference samples; the horizontal axis is the R-factor, the vertical axis is the concentration

The XRD QPA procedure by the GA can be divided into three stages.

  1. (a)

    Search and refinement of profile parameters, optionally together with the parameters of the anisotropic broadening of lines; decomposition of the diffraction pattern and an initial refinement of profile parameters are performed by the Le Bail algorithm built into DDM.

  2. (b)

    Search and refinement of structural parameters together with texture parameters. Search intervals of refinable atomic coordinates are given in the neighbourhood of their positions in the structures, taken from the database.

  3. (c)

    Joint refinement of all parameters by DDM under the control of the second level of the GA.

The precision of the method, estimated on test data from the Round Robin on QPA [12], was shown to be 0.45 wt.% per phase.

This method is implemented in a special computer program with a user-friendly interface. Figure 4 shows the form to specify settings for the genetic algorithm and their optimal empirical values. Figure 5 shows the form to specify the profile and the structural parameters of the mineral phases. The refinable parameters are indicated by the green buttons.

The convergence of the genetic algorithm depends on the magnitude of the range of parameter variation. The ranges are determined automatically by the iterative analysis of a set of electrolyte reference samples [13]. Figures 6 and 7 show the forms of the results of the iterative analysis for one of the mineral phases in Table 1 (Weberite).

Fig. 7
figure 7

The computed interval values of Weberite profile and lattice parameters

Figure 6 shows a map of the distribution of Weberite concentrations in the samples. The concentrations vary from 0.93 to 14.74 % mass in difference samples. The point colour shows the accuracy of parameter values (e.s.u.): red for high accuracy and green for low accuracy. The accuracy significantly depends on the concentration. Figure 7 shows the computed interval values of profile and lattice parameters for this phase. The intervals can be reduced by eliminating some samples with low phase concentrations. Intervals of varying atomic coordinates and other structural parameters are calculated similarly. The calculated intervals may be used by the GA1 to analyse bath electrolyte samples.

3 Accuracy Evaluation of the CR Analysis and Discussion

The method of the evolutionary full-profile QPA can be configured for an automatic analysis of multiple samples with the same type of phase composition as a result of the selection of relevant search intervals and settings of genetic operations. Industrial electrolytic samples of aluminium production are suitable for this purpose. The phase composition of the electrolyte samples is shown in Table 1, and the crystal structure of these phases are taken from the database ICSD (Inorganic Crystal Structure Database).

The high-quality industry reference samples (IRS) of chemical and phase composition [13] prepared directly from the industrial electrolyte samples of four large aluminium smelters, containing calcium and magnesium, were used for testing and accuracy evaluation of the method. The search intervals and settings of genetic operations for the automatic analysis of the profile, which were universal for this task, as well as the structural parameters of fluoride phases have been identified in special experiments of preliminary studies. CR values calculation from the found phase concentrations were fulfilled according to the formula:

$$\begin{aligned} CR=\frac{{\text{ total } \text{ NaF, } \text{ mol }}}{{\text{ total } \text{ AlF }_{3}, \text{ mol }}} =2\cdot \frac{{\displaystyle \mathop {\sum }_{i}} {\alpha _i \text{ C }_i } }{{\displaystyle \mathop {\sum }_{i}} {\beta _i \text{ C }_i } } \end{aligned}$$
(4)

where C\(_{i}\) is the concentration of the ith phase (% mass), calculated according to (1); \(\alpha _{i}\), \(\beta _{i}\) are the mass fractions of NaF and AlF\(_{3}\), respectively.

Table 1 The phase composition of the electrolyte samples

An analysis of 26 IRS was conducted. Figure 8 shows an example of a plot of the convergence in the evolutionary full-profile QPA for one of them.

On the 1st level of the GA, the profile and some structural parameter values are searched for in the specified search range including atomic coordinates, allowing variation in a given neighbourhood of its positions in the structures of fluoride phases taken from the structural data base ICSD, as well as texture parameters of the phases. Level 2 of the GA controls the gradual full-profile DDM-based refinement of the best current solutions found on the 1st level of the GA. The sizes of test solution populations were: 30 for the 1st level of the GA and 10 for the 2nd level of the GA. The alternation of GA levels brings the iterative search process to the true solution with R\(_\mathrm{wp} = 5.6\) % after 37 generations of evolution (in this example).

On the first three GA1 cycles, the best solution in the population of the parametric strings gradually improved and the R-factor decreased from 13.7 to 9.7 %. However, a good approximation for the local search has not yet been found and the refinement with DDM cannot reduce the R\(_\mathrm{wp}\) value (even-numbered bands in Fig. 8). Finally, on the 4th GA1 cycle, the R-factor dropped less (from 9.7 to 8.8 % in generations 27–31) and the approximation was found which could be refined with the local search. This approximation was refined with DDM through the choosing of various parameter combinations by the GA2 within the last 4 generations. After refinement, the R-factor decreased from 8.8 to 5.6 % and then was stabilized.

After the final refinement of all parameters by DDM, the R\(_\mathrm{wp}\) was equal to 5.3 % and the phase concentrations calculated by (1) were used for the CR calculation according to (2). The comparison of the experimental and calculated final powder patterns is shown in Fig. 9.

Fig. 8
figure 8

The plot of convergence in the evolutionary XRD QPA from analysis of sample H803 from IRS; the x-axis depicts the evolution generation number, the y-axis depicts the profile R\(_\mathrm{wp}\)-factor; dotted vertical lines show the time of the shift from the level 1 GA to the level 2 GA and back; the red line is the current best fitness value, blue dots show the current worst fitness value, green dots show an average fitness value for the current population

Fig. 9
figure 9

The experimental (red) and calculated (green) diffraction patterns for reference electrolyte sample H803 and the difference between them (blue, contains background from an amorphous phase of alumina); radiation with CuKa wavelength; \(R_\mathrm{wp}\)-factor \(=\) 5.3 %

A feature of the method is the refinement of the crystal structure of the electrolyte main phases. The crystal structure of cryolite, chiolite and calcium cryolite may vary slightly from sample to sample. This is caused by the nonequilibrium crystallization of sample dew, its sampling from the bath and variable sampling factors such as the electrolyte composition and temperature, mold mass and temperature, weight of the sample, time since loading the bath with alumina, etc. Figure 10 shows the atomic crystal structure of cryolite and identifies its main differences in two reference samples (C363 and C460).

Fig. 10
figure 10

Structure of cryolite and the main differences in the samples C363 and C460, respectively: inclination angle of octahedras axis relative to the c-axis: 18.69\(^{\circ }\) and 19.51\(^{\circ }\); edges and the angle of parallelogram in the base of the octahedras: 2.484 Å, 2.727 Å, 88.50\(^{\circ }\) and 2.513 Å, 2.569 Å, 89.04\(^{\circ }\); Na2–Na1 distance: 3.249 and 3.188 Å

The main structural variations are in the change of the inclination angle and the geometric dimensions of [AlF6]\(^{-3 }\) octahedras, and in the corresponding shifts of Na atoms, located in the common position for (Na2). This is reflected in the variation of the lattice parameters, in particular, with the c-axis size and the value of monoclinic angle \(\beta \), same as its intensity value. The difference in lattice parameters leads to a perceptible shift of the analytical diffraction reflexes of cryolite to about 2\(\Theta \sim \) 0.02\(^{\circ }\)–0.03\(^{\circ }\), and the difference in the coordinates of the atoms leads to a relative change in the integrated intensity of the reflexes of up to 4 %. Neglect of these distortions of the crystal structure significantly affects the accuracy of the electrolyte analysis and the corresponding errors of the CR determination are about 0.01–0.02.

Fig. 11
figure 11

Regression charts for the estimation of the full-profile analysis accuracy: a for CR values, calculated by the data of evolutionary XRD QPA, to the certified CR values for electrolyte IRS, b for BR values (BR \(=\) CR/2), calculated by the automatic Rietveld analysis, to the certified BR values for electrolyte reference samples (Alcan International Ltd, 2005) [14]

The left side of Fig. 11 shows the regression graph of the corresponding calculated and certified CR values for a set with 26 IRS of industrial electrolyte. The calculated CR values correspond to the certified CR values with precision, characterized by a standard deviation (SD) in 0.019 CR units. The achieved accuracy completely satisfies the technological requirements of the production.

The advantages of determining the CR by the evolutionary XRD QPA method of relatively automatic full-profile CR analysis by the Rietveld method can be estimated by comparing the results with the data of [15]. It should be remembered that many of the aluminium factories, instead of the cryolite ratio, apply its counterpart—the bath ratio (BR), which is related as BR \(=\) CR/2.

The right side of Fig. 11 shows the regression graph of the corresponding BR values, calculated according to the automatic full-profile BR analysis by the Rietveld method, to the certified values for the standard electrolyte samples of the company ALCAN International Ltd [14], taken from [15]. Unfortunately, the standard deviation value for the BR graph in Fig. 11 in [15] was not provided. To compare the graphs for BR and CR on the same scale, all values along each of the axes on the right graph should be doubled. After performing this procedure it becomes apparent that the standard deviation of the evolutionary XRD QPA is at least twice as good.

4 Conclusions

The increased accuracy of the analysis by the evolutionary QPA method can be explained through the fact that the genetic algorithm searches various variants of the approximate values of profile and structural parameters (i.e. adapts them to a particular sample) as well as periodically refining the best ones on the 2nd level of the GA by the DDM—full-profile analysis method. However, a variant of full-profile analysis by the Rietveld method automatically specifies the pre-selected initial values (i.e. does not adapt to a particular sample) of the profile and structural parameters.

The disadvantage of the current version of the evolutionary QPA method is that the amount of computational time is significantly higher than for the existing calibration XRD methods of CR process control. However, the development and optimization of the evolutionary method certainly will increase the processing speed of CR full-profile analysis and bring it to a comfortable level. Thus, this approach opens up new prospects for electrolyte CR automatic standardless determination by XRD data for chemical control on aluminium smelting baths.