Online Prediction Method of Molten Aluminium Height in Electrolytic Cell Based on Extreme Learning Machine with Kernel Function

An online prediction method of molten aluminium height is proposed based on extreme learning machine with kernel function (K-ELM). Firstly, relevant variables that can be measured online related to aluminium liquid fluctuations were obtained by analyzing the mechanism model of aluminium liquid fluctuations. &en, the online prediction method of molten aluminium height is proposed based on kernel function and ELM, which just use the anode-cathode voltage and the anode rod current data. Finally, the data collection and experiment of 3 sets of anode rods in the 200 kA series aluminium electrolytic cells are carried out on-site. &e results show that the maximum absolute error is only 0.25 cm and relative error is less than 1.4%, which satisfied the production site requirements. Compared with existing methods, it has certain advantages in real-time and prediction accuracy and meets the real-time and accuracy requirements of the actual production process on-site.


Introduction
Aluminium is a soft metal that has good plasticity and ductility, and it is an excellent conductor of electricity and heat. Because of these excellent properties, it is widely used in many fields. Aluminium is widely distributed in nature, and it mainly exists in the form of oxides, silicates, and other compounds. At present, cryolite-alumina molten salt electrolysis is the only method in industrial aluminium smelting. It is an industry that consumes a lot of energy, 95% of which comes from electricity [1][2][3]. In order to improve the energy efficiency of the aluminium electrolysis production process, core parameters such as alumina concentration [4][5][6], anode effect [7][8][9], cell resistance [10,11], and electrolyte temperature [12,13] have been extensively and deeply studied using mechanism, soft sensor, and digital simulation methods.
Stable operation of the electrolytic cell is of great significance for electrolytic aluminium enterprises, as well as the energy saving. e fluctuation of the molten aluminium in the electrolytic cell is also a very important role for the energy utilization rate of the entire electrolytic cell. Accurate and rapid measurement of the molten aluminium height is beneficial to the electrolytic aluminium enterprises. It made controlling the fluctuation within the effective range more effective. e mechanism of molten aluminium fluctuation was first proposed by Sele in [14]. Davidson and Lindsay used a linear system to describe molten aluminium fluctuation in [15]. In [16], Antille et al. found the relationship between anode current fluctuation and molten aluminium flow rate.
e flow of molten aluminium can be directly obtained from the anode current without solving the N-S equation, which saves calculation time and provides the possibility of real-time online display of molten aluminium flow rate. It was found that the frequency of molten aluminium fluctuations and the frequency of anode current fluctuations are consistent; and the anode current fluctuation was used to find out the cause of the diseased cell. ese studies have found the relationship between the anode current fluctuation frequency and the aluminium liquid fluctuation and the flow of aluminium liquid and proved that the anode current can indeed reflect part of the cell conditions. However, the above methods cannot display the measurement results on real time, so the applicability is not strong, and the production cannot be guided. e application scope is narrow, and the problems that can be captured and solved are very limited. In [17], Aureliu Panaitescu et al. proposed that the voltage drop of the anode steel claw can reflect the fluctuation of the aluminium liquid level and established an online display system of the equidistant voltage drop, but this system can only measure the equidistant voltage drop of a single anode steel claw. e synchronization is not good, and the operation is difficult. Cooksey et al. studied the behaviour of bubbles and the turbulent flow caused by gas based on the experiments on a full-scale, three-anode water model electrolyser in [18]. A two-dimensional fluctuation model is established based on the nonlinear shallow water wave equation in [19]. is model improves the linear model that cannot determine the insufficiency of the electrolyte and molten aluminium flow and velocity mode. In [20], Bojarevics et al. studied the fluctuation of aluminium liquid in a 500 kA electrolysis cell based on a shallow water fluctuation model, and the results showed that the change in the distance caused by the deformation of the anode and the cathode would greatly affect the stability of the electrolysis cell. e flow velocity distribution of the molten aluminium is studied based on finite element and finite volume methods on the ANSYS platform in [21]. It obtained that the flow velocity at the edge of the spiral is relatively high. In [22], the steady-state electrolyte and aluminium flow field of 160 kA, 186 kA, and 300 kA electrolysers were calculated based on SIMPLER algorithm. It is shown that the new-type cathode cell has a lower flow rate of aluminium liquid by comparison with the ordinary aluminium electrolyser. In [23], the deformation of the aluminium-liquid interface was calculated with a homogeneous model using ANSYS commercial software. e authors of [24] studied the relationship between changes in anode current and cell voltage and the fluctuation of the aluminium liquid under the anode carbon block. e authors of [25] simulated the influence of the fluctuation of the aluminium-liquid interface on the anode current and cell voltage of the aluminium reduction cell. e authors of [26] studied the effect of composite steady current comprehensive energy-saving technology on the horizontal current in the cathode aluminium liquid during the aluminium electrolysis process through computer simulation.
Although an in-depth study of the mechanism and numerical simulation of molten aluminium fluctuations has been carried out and the internal connection between current and molten aluminium fluctuations has been revealed, the rapid online measurement of molten aluminium height is still a difficult problem due to the high temperature, strong electromagnetic field, and various complicated and harsh environmental conditions such as parameter coupling and nonlinearity. At present, it is impossible to directly detect it by online meters or similar sensors. Most companies can only obtain the height parameters of molten aluminium by manually collecting readings. is also limits the application of advanced control technology in the aluminium electrolysis industry.
With the development of information technology, many methods such as filtering [27,28], estimation [29,30], and online detection [31,32] for industrial processes have been proposed, and most of them involve the soft sensing technology.
e core idea of soft sensing is to establish a mathematical model that characterizes the relationship between auxiliary variables and dominant variables. Now soft-sensing technology has been successfully applied to metallurgy, chemical industry, aerospace, and other fields. erefore, a soft sensing method for online prediction of the height of molten aluminium is proposed in this paper.
e main contributions of this paper are as follows: (1) e relevant variables that can be measured online related to aluminium liquid fluctuations were obtained (2) e online prediction method of molten aluminium height is proposed based on kernel function and ELM, which just use the anode-cathode voltage and the anode rod current data (3) e effectiveness of the proposed method is verified by the data collection and experiment of three sets of anode rods of 200 kA series aluminium electrolytic cells

Aluminium Electrolysis Process
Aluminium is a light metal with a variety of good properties and is widely used in the construction and electrical industries [33]. e main method currently selected by aluminium smelters is cryolite-alumina molten salt electrolysis, in which the electrochemical reaction process is carried out in an electrolytic cell. Figure 1 shows the internal structure of the electrolytic cell [34]. At present, the mainstream method used to electrolyze aluminium to produce aluminium is cryolite-alumina molten salt electrolysis, which essentially melts alumina in an electrolyte and uses carbon materials as cathodes and anodes to pass a series of rectified currents. e electrolysis temperature is controlled to remain constant (such as 950 degrees Celsius) by direct current.

Current Flowing into the Anode Rod of the Electrolytic Cell.
e results and discussion may be presented separately, or in one combined section, and may optionally be divided into headed subsections. e direct current input for electrolytic aluminium production is provided after rectification. is current flows through the anode bus and is dispersed in each anode rod of electrolytic cell and finally merges at the cathode. According to the circuit theory, the circuit model of the electrolytic cell is shown in Figure 2.
In Figure 2, the solid resistance includes anode lead resistance, anode steel claw resistance, and anode carbon block resistance. Since the anode carbon block resistance will not change suddenly and will not change significantly in a short time, it is a fixed value [35]. Since the resistance of the molten aluminium is about 10,000 times smaller than the resistance of the electrolyte, its change is completely negligible compared to the overall electrolyte resistance, so the influence factors of the change of the electrolyte resistance mainly include the alumina concentration and the distance between the cathode and bottom of electrolyte layer. e most intuitive influencing factor of the distance between the cathode and bottom of electrolyte layer is the height of the molten aluminium. When the anode bus remains stable, the height of the molten aluminium becomes the only factor that causes the change of the distance between the cathode and bottom of electrolyte layer. erefore, the change in the anode rod current of the electrolytic cell will partly reflect the change in the height of the molten aluminium; that is, there is a certain relationship between the anode rod current and the height of the molten aluminium [36].

e Voltage between the Anode and Cathode of the Electrolytic Cell.
e bipolar voltage is the voltage drop from the anode rod to the corresponding cathode steel bar, as shown in Figure 3.
According to the mechanism of the aluminium electrolysis process and related literature such as [37], the change of the distance between the cathode and bottom of electrolyte layer will cause the fluctuation of the cell voltage, and the amplitude of the fluctuation is basically within 10 mV. From [38], we can get that the cell voltage is the algebraic sum that characterizes the current fluctuations of the anode rod and the resistance fluctuations of the anode carbon block for the entire electrolytic cell. In this work, the bipolar voltage removes the voltage drop from the anode rod to the anode bus and from the cathode steel rod to the cathode bus, which can more quickly, sensitively, and accurately reflect the change in the height of the aluminium liquid under the corresponding anode rod. erefore, it is possible to use the anode rod current and the bipolar voltage, which are easy to measure on the production site, for estimating the height of the molten aluminium.

A Prediction Model of Molten Aluminium
Height Based on K-ELM

ELM Algorithm.
e extreme learning machine (ELM) was proposed by Huang et al. [39]. During its training process, there is no need to adjust the input weight of the network and the closed value of the hidden layer neurons, but there is a need to set the hidden value of the network. e number of layer nodes can output the unique optimal solution. Compared with the BP neural network algorithm, the ELM algorithm has a faster learning speed and better generalization performance. Its structure is shown in Figure 4. e weight matrix α between the input layer and the hidden layer is where α ji is the input weight between the jth neuron in the hidden layer and the ith neuron in the input layer. e weight matrix β between the hidden layer and the output layer can be expressed as where β jk is the input weight between the jth neuron in the hidden layer and the kth neuron in the output layer. e bias of the hidden layer can be expressed as

Mathematical Problems in Engineering
Assuming that the training set has Q samples, the corresponding input matrix X is and the corresponding output matrix Y is Y � y 11 y 12 · · · y 1Q y 21 y 22 · · · y 2Q ⋮ ⋮ ⋱ ⋮ y m1 y m2 · · · y mQ Assuming that the hidden layer activation function is g(x), the output T of the network can be obtained as e above formula can be abbreviated as   where H is the hidden layer output matrix, and the ith column of H represents the output of the hidden layer ith neuron when the input is x i ; that is, Compared with the traditional neural network, the input function approximation theory of the ELM algorithm needs to adjust the weight and deviation value and randomly generates the input weight and the deviation of the hidden node. erefore, this network is equivalent to finding a least-squares solution β of the linear function Hβ � T; that is, β � H * T, where H * is the generalized inverse of matrix H. erefore, for the training sample ( , t i2 , · · · , t iN , ] T ∈ R, the steps of the ELM algorithm with L hidden layer nodes are as follows: Step 1: generate the weight vector ω from the input layer to the hidden layer and the hidden layer node bias value b randomly.
Step 2: calculate the hidden layer output matrix H.
Step 4: get the approximation function of ELM: Compared with the traditional neural network algorithm, the ELM algorithm does not need to repeatedly adjust the input weights and hidden node bias values, nor does it need to manually set a large number of network training parameters. In application, it only needs to set the number of hidden nodes and the type of activation function according to the problem to be processed. During the execution of the algorithm, the input weights and bias values are randomly determined, while the output weights are different, which can be obtained by other methods.
is process can be completed once, and a unique global optimal solution is generated.
erefore, ELM has faster learning speed and better generalization performance and overcomes the shortcomings of gradient descent algorithms that require stopping conditions, low learning efficiency, and being easy to fall into local minimums.

ELM Algorithm with Kernel Function (K-ELM).
K-ELM has absorbed the advantages of SVM [40] based on ELM, and the calculation speed, algorithm accuracy, and generalization ability have all been greatly improved. is algorithm adds parameters 1/C to the main diagonal of the matrix HH T to avoid singularities. e output expression can be directly expressed as e steps of K-ELM are as follows: Step 1: generate the weight vector α from the input layer to the hidden layer and the hidden layer node bias value b randomly.
Step 2: calculate the hidden layer output matrix H.
Step 3: calculate the output weight β � H T (1/C + HH T ) − 1 T. Since g(x)H T and HH T are both forms of matrix inner product, a kernel function satisfying Mercer's theorem can be constructed to replace this inner product, as shown in the following formula: us, the output function of K-ELM can be expressed as e Gaussian kernel function is often used in the regression and classification of actual engineering sample data: Step 4: get the approximation function of ELM by (10).

Prediction Model of Molten Aluminium Height.
According to the aluminium electrolysis production process parameters, the anode rod current and bipolar voltage data are used as the input of the model, and the molten aluminium height data is used as the output, and a prediction model of molten aluminium height based on the K-ELM is established. e steps are as follows: Step 1: collect anode rod current data and bipolar voltage data synchronously, as well as the corresponding molten aluminium height data.
Step 2: data normalization. For anode rod current data, Mathematical Problems in Engineering where x 1i is the original value of the ith sample in the anode rod current data, x 1 min and x 1 max are the minimum value and the maximum value in the current data, respectively, and x 1i ′ is the normalized value of the current data. For bipolar voltage data, where x 2i is the original value of the ith sample in the bipolar voltage data, x 2 min and x 2 max are the minimum value and the maximum value in bipolar voltage data, respectively, and x 2i ′ is the normalized value of bipolar voltage data.
For the height data of molten aluminium, where x 3i is the original value of the ith sample in the molten aluminium height data, x 3 min and x 3 max are the minimum value and the maximum value in molten aluminium height data, respectively, and x 3i ′ is the normalized value of molten aluminium height data.
Step 3: divide the sample set into a training sample set and a test sample set. e training sample is used to learn the prediction model parameters, and the test sample is used to test the prediction effect of the model.
Step 4: set the regularization parameters and kernel parameters of the K-ELM prediction model.
Step 5: make supervised learning by inputting the training sample set into the K-ELM model, and establish a molten aluminium height prediction model.
Step 6: use the test sample set as the input of the trained model, and analyze the prediction effect and prediction time of the obtained prediction results.

Experiment
To verify the effectiveness of the proposed algorithm, experiments were carried out on No. 717 test cell of 200 kA series electrolytic cell. e anode rod current was measured by the anode rod current measuring instrument made by University of Science and Technology Beijing. e bipolar voltage was collected by Advantech PCI-1715U data acquisition card. e molten aluminium height was measured manually. e details are as follows.

Experimental Data Collection.
During training process, there is no need to adjust the input weight of the network and the closed value of the hidden layer neurons, but there is a need to set the hidden value of the network. e number of layer nodes can output the unique optimal solution. Compared with the BP neural network algorithm, the ELM algorithm has a faster learning speed and better generalization performance. Its structure is shown in Figure 4.

Anode Rod Current
Collection. Install a current measuring instrument on the anode rod of the aluminium electrolytic cell. e upper measuring point of the measuring instrument is flush with the lower surface of the bus, and the temperature sensor is close to the surface of the anode rod, as shown in Figure 5.
After the current signal data is collected by the current measuring instrument, it is communicated through the RS485 bus and transmitted to the industrial computer. e industrial computer realizes display online and saves it to the .txt file. e bipolar voltage signal of the electrolytic cell is collected using Advantech's PCI-1715U data acquisition card, plus a voltage protection circuit, and the collected voltage data is saved to a txt file. e current and voltage online collection interface of the experiment is shown in Figure 6.
To ensure the accuracy of the voltage and current data, we have carried out a third-party calibration of the measuring devices, and the calibration result is that the measuring error of anode rod current is less than 1%, which is shown in Figure 7.

Molten Aluminium Height Measurement.
We choose B1, B2, and B3 rods as the measurement object. Firstly, a hole with a diameter of about 15 cm between each pair of anodes at the measurement location was opened. Secondly, an iron rod with a spirit level was put into the cell vertically with the level remaining horizontal for about 10 seconds. irdly, the iron rod is taken out quickly and the dividing line between the electrolyte and the molten aluminium is observed. Finally, the height of the molten aluminium was measured and recorded in units of 0.5 cm with the reading time. e operating scenario is shown in Figure 8.
Based on the above data collection, the anode rod current and the bipolar voltage data were selected at the corresponding time. en a prediction model for the height of the molten aluminium was established.

Experimental
Results. First, the three sets of data are normalized and transformed into a distribution between 0 and 1 by a linear function. en, the first 102 sets of data samples are selected as the training samples, and the last 40 sets of data samples are used as the test samples. Finally, the regular parameter of K-ELM is set to 20 according to the cross-validation method and σ 2 is set to 1. e prediction results are shown in Figure 9. In Figure 9, the blue curve is the actual value of the molten aluminium height, and the red star line is the predicted value.
It can be seen from the figure that the height of the molten aluminium (range of height is 18-20 cm) predicted by the K-ELM model can achieve a good prediction effect in accuracy, the maximum absolute error is 0.25 cm, and the relative error is less than 1.4%. It verifies the effectiveness of this algorithm.
In order to verify the prediction effect of the proposed algorithm, the sample set was input into the K-ELM model, the BP neural network model, and the least-square support vector machine (LSSVM) model. e model parameters are selected as follows: e BP model selects the number of hidden layer neurons as 25, and the activation function is the Sigmoid function. e kernel parameters in LSSVM are consistent with the parameters of the K-ELM model.  RMSE value is selected as the prediction effect evaluation index to evaluate the prediction effect of different models; they are shown in Table 1.
It can be seen from the table that the prediction effect of the K-ELM model is obviously better than that of the BP model and that of the LSSVM model; the K-ELM model also has obvious advantages in terms of model training and prediction time.
In actual producing process, the frequency of molten aluminium fluctuation is between 0.05 and 0.1 Hz under normal working conditions. When the balance is broken, the frequency of molten aluminium fluctuation can reach 5 Hz.
According to Shannon's sampling theorem, if we want to obtain the fluctuation information accurately, the sampling frequency of the acquisition system should be greater than 10 Hz. In order to approximate the actual situation more  accurately, the sampling frequency should be set to more than 10 times the highest frequency of the signal, that is, 50 Hz. In this case, the acquisition time of the sampling system must be less than 0.02 s.
From Table 1, it can be seen that the three algorithms all meet the actual production requirements under normal operating conditions, and the algorithm proposed in this paper has more advantages under abnormal conditions.

Conclusions
An online prediction method of the height of the molten aluminium is proposed, aiming at the problem that the height of the molten aluminium cannot be measured online in the aluminium electrolysis process. First, the online measurable variables closely related to the molten aluminium fluctuation are obtained, which are the bipolar voltage and the anode rod distribution current, based on the analysis of the molten aluminium fluctuation mechanism model. en, K-ELM model for predicting molten aluminium height is established by combining the extreme learning machine with kernel functions. Finally, the effectiveness of the proposed method is verified by data collection and experiments of three groups of anode rods on production line. Compared with the existing methods, the proposed algorithm has better real-time performance and prediction accuracy and meets the real-time performance and accuracy requirements of the actual producing process.
However, the results are only based on the data of three anode rods where the correlation between adjacent anode rods is not considered. It will be the focus of future work.

Data Availability
e data used to support the findings of this study are included in the article.