Effect of Gas Forming Compounds on the Vibration of a Submerged Lance in Hot Metal Desulfurization

Hot metal desulfurization is the main process step for removing sulfur in blast furnace‐based steelmaking. A desulfurization reagent is pneumatically injected into the hot metal through a submerged lance causing it to vibrate. The aim of this study is to develop a mechanical vibration measurement‐based method that can detect changes in the gas‐forming properties of the reagent. The detection is performed using Elastic Net regression and eXtreme Gradient Boosting‐based classification models the classification performance of which is compared. The lance aging causes changes in its dynamic characteristics, and the disturbing effect of this is removed from the measured data of the lance vibration prior to classification by means of a developed cleaning algorithm. The best classification performance in detecting changes in the gas‐forming properties, with an area under the receiver operating characteristic curve of 0.916 and Matthews correlation coefficient of 0.699, is achieved using an Elastic Net regression‐based classification model. The results of this work serve as a basis for developing industrial applications in which the effective utilization of the excitation, such as vibrations generated by the gas formation can be utilized for process monitoring and as a soft sensor for predicting the reagent‐induced process variance.


Introduction
Hot metal desulfurization is one of the main process steps in blast furnace-based steelmaking. The main purpose of hot metal desulfurization is to decrease the sulfur content of the hot metal because sulfur has a strong effect on the surface quality and mechanical properties of the end product. [1] Hot metal desulfurization is commonly conducted in a ladle or a torpedo car, [2] where a desulfurization reagent is injected into the metal bath by lance injection or added on top of it. [3] In lance injection, reagent powder is pneumatically fed through a submerged lance. [4,5] The principle of the desulfurization system with lance injection is shown in Figure 1a. An inert gas as such argon (Ar) or nitrogen (N 2 ) is commonly used as a carrier gas in the reagent feed. [6] Reagents typically used in industry are calcium carbide (CaC 2 ), lime (CaO), magnesium (Mg), soda (Na 2 CO 3 ), and mixtures of them. [7] The particle size distribution of the reagent affects the efficiency of desulfurization in two ways: while a small particle size in itself promotes faster reaction kinetics, particles that are too small may not have enough kinetic energy to penetrate the metal-gas interface and are carried away within the gas bubbles. [6] In the industrial conditions of hot metal desulfurization, the composition of the reagent in silos can vary. Samples taken from reagent silos have shown that a separation occurs between the reagent components, i.e., the coarser soda is separated from the finer lime. The purpose of soda is to increase the gas formation that stirs the hot metal and thus improve the mixing conditions in the metal bath. Variation in the reagent coarseness and composition causes variation in gas formation at the bottom tip of the submerged lance and consequently variation in the desulfurization efficiency. The gas formation applies excitation to the structure of the lower section of the lance (see Figure 1) and makes it vibrate. The mechanical vibration in the lower section is transmitted along its structure to the upper section of the lance through the mechanical interface between them and was measured from the top surface of the upper section with an accelerometer. The mechanical vibration of the lance is a promising source of valuable information to be utilized in monitoring the gas formation rate and thus also the desulfurization efficiency.
Some interesting developments have been published regarding vibration-based monitoring of oxygen lances in basic oxygen furnace (BOF) steelmaking. Iida et al. [8] have investigated the use of an accelerometer for vibration measurement from the top end of an oxygen lance to detect slag formation during the BOF process. Based on the magnitude of the horizontal vibration, the height of the lance is adjusted accordingly to control slag formation. Uebber and Odenthal [9] hold a patent where the vibration of the lance is monitored with a water-cooled accelerometer mounted on the bottom tip of the oxygen lance.
The impetus for this work was the idea to study the use of vibration-based monitoring in the context of hot metal desulfurization. Thus, the approach of this work was to study the behavior of the system as a mechanical system. To this end, a measurement campaign was set up to measure the vibration of a submerged lance under industrial conditions. The primary aim of this study was to first establish the most relevant frequencies for distinguishing between gas-forming and non-gas-forming reagents, which could pave the way to the online detection of changes in reagent composition and particle size distribution. A secondary aim was to study how well aging-induced changes in the dynamic characteristics of the lance can be detected and removed from the vibration data. The research questions of this work are as follows: 1) How well it is possible to detect the difference between gas-forming and non-gas-forming reagents during reagent injection? 2) Which vibration frequencies are the most significant in detecting the difference between gas-forming and non-gas-forming reagents? 3) How well it is possible to detect and model the change in the dynamic characteristics of the lance as it ages? 4) How well can the effect of lance aging be removed from the vibration data?

Studied Process
The measurement campaign was carried out in a hot metal primary desulfurization station located between blast furnaces and melt shop at SSAB Europe, Raahe Steel Works. The desulfurization was conducted by injecting the desulfurization reagent in combination with carrier gas (nitrogen) through a submerged lance into the metal bath located in the ladle. The total length of the lance including its upper and lower sections (see Figure 2) was 7.6 m. The inner diameter of the ladle was 2.5 m, and the   depth was 3.6 m. The shape of the bottom of the ladle was hemispherical.

Data Acquisition System
Measurement data logging was performed using National Instruments CompactRIO equipment, which is a combination of a National Instruments (NI) cRIO-9024 real-time controller, cRIO-9113 chassis, and three I/O modules. The real-time controller unit has an 800 MHz processor, 4 GB of nonvolatile storage, 512 MB of DDR2 memory, and a USB host port. The signals from an accelerometer were logged with an analog NI 9,234 input module, which has built-in antialiasing filters and constant current supply for Integrated Electronics Piezo-Electric (IEPE) sensors. In addition, a thermocouple NI 9211 module was used for temperature measurements and an analog voltage input NI9215 module for measuring the state information from the bottom valve of a reagent silo. The state information was needed for accurate time synchronization between the data measured with vibration acquisition system and the process variables recorded from the process control system. In addition, the state information of synchronized process variables, i.e., position of the reagent valve (Figure 1c), carrier gas flow (Figure 1d), and position of the lance tip ( Figure 1e) was used to detect the process stages (Figure 1b) that were analyzed in this work. The controller was programmed using LabVIEW software and the measured data were saved to USB hard drives.
The vibration of the lance was measured using a triaxial MMF KS 813B accelerometer installed with a screw mounting to a steel plate, which was welded on the top surface of the upper section of the lance. The nominal voltage sensitivity of the accelerometer was 100 mV g À1 in all directions and the linear (AE3 dB) frequency range was from 0.2 Hz to 10 kHz (Z axis). The operating temperature range was À20 to þ90°C. The accelerometer was mounted so that the Z direction was vertical and parallel with the lance body. The X and Y directions were horizontal and perpendicular to the lance body. The location of the accelerometer on the upper section of the lance and the direction of its axes are shown in Figure 2. The temperature near the accelerometer was measured using a magnetic temperature sensor manufactured by Epic Sensors. The sensor was based on a Type K thermocouple and its measuring range was À40 to þ375°C. Based on the temperature measurement, it was possible to verify that the permissible temperature range for the accelerometer was not exceeded. If necessary, the temperature data could also be used for compensation if temperature changes had a significant impact on the output of the accelerometer. All the signals from the triaxial accelerometer were recorded simultaneously at a measurement frequency (f meas ) of 25.6 kHz. Temperature and process data were measured at a rate of two samples per second. All the data were continuously collected in 1-minute-long binary files and saved to an external hard drive.

Measurement Campaign and Analyzed Process Stages
The measurement campaign lasted two days. On the first day, desulfurization treatments with ID 1À6 were run using a gasforming reagent. On the second day, desulfurization treatments with ID 7À15 were run using a non-gas-forming reagent consisting of lime (CaO) only. The gas-forming reagent consists of lime mixed with 9 wt% soda (Na 2 CO 3 ), which acts as a gas-forming compound and has a grain size larger than that of lime. The non-gas-forming reagent was used as a contrast case to the gas-forming reagent to investigate whether the two could be distinguished from the measured vibration data. Both reagent types contained 0.1 wt% silicone oil to improve the fluidity of the particles. The cumulative weight and normalized composition of the reagents are shown in Table 1.
The principle of the submerged lance injection, process stages analyzed in this work, behavior of the process variables (i.e., reagent valve position and carrier gas flow rate), and position of the bottom tip of the lower section of lance at the beginning of each desulfurization treatment are shown in Figure 1. The slow downward movement of the lance starts at time t = 0 s (Figure 1e). At the same time, the reagent valve ( Figure 1c) is in the closed position and the carrier gas flow (Figure 1d) is at zero. At t = 29 s, the carrier gas flow begins to increase rapidly while the reagent valve is still in the closed position. At time t = 33 s, the downward velocity of the lance increases. At time t = 39 s, the carrier gas flow has reached almost the maximum value. At t = 44 s, the reagent valve starts to open and at the same time, the movement of the lance stops. The reagent valve is fully open at time t = 49 s and the reagent powder is pneumatically fed from the reagent silo into the pipeline and is mixed with the carrier gas. The carrier gas þ reagent mixture flows in the pipeline and is estimated to reach the lance within 5 s of the reagent valve fully opening, i.e., at time t = 54 s. At t = 59 s, the carrier gas flow starts to decrease slightly from its maximum value. At time t = 61 s, the lance starts moving downward again until its bottom tip reaches the hot metal surface approximately at time t = 78 s. The lance reaches its bottom position, i.e., the operating position at time t = 98 s, when the downward movement stops, and the actual desulfurization process begins.
Analyses concerning the research questions were conducted using vibration information from process stages 1À3, as shown in Figure 1b. Process stage 1 represents a situation where the lance hangs freely in the air and only the carrier gas flows through it. The flowing carrier gas excites the lance structure to vibrate at its characteristic frequencies. Process stage 2 represents a situation where the lance hangs freely in the air and the carrier gas þ reagent mixture flows through the lance. Although the flowing carrier gas þ reagent mixture excites the lance structure to vibrate at its characteristic frequencies, the vibration spectrum also contains information from the excitation caused by the flowing reagent powder. Process stage 3 represents the situation where the lance is placed in its bottom position and where the actual desulfurization treatment takes place. During process stage 3, the lance is subjected to excitations from several sources, such as the flow of the carrier gas þ reagent mixture through the lance, carrier gas bubbles in the hot metal, and gas formation in the hot metal caused by soda contained in the gas-forming reagent. Process stage 3 lasts until the desulfurization treatment ends, i.e., the lance starts to move upward. When the lance tip has risen above the hot metal surface, the reagent valve is closed, and the carrier gas flow is stopped. The duration of process stage 3 is typically 10À15 min.

Modeling the Dynamic Behavior of the Lance
The lower section of the lance consists of an approximately 4 m long square steel tube with a wall thickness of 8 mm and cross-section dimensions of 100 Â 100 mm. It is implanted in a cylindrical casting mass with an outside diameter of 450 mm. The parts are bound together with steel strips which make them act together mechanically. The dynamic characteristics of the lower section of the lance, such as mass and moment of inertia, become altered during operation in process stage 3. As the lance ages, the body of its lower section becomes thinner, and hot metal residues accumulate at the bottom tip of the lower section. For a cantilever beam with circular cross-section and concentrated mass at free end, the natural frequency is directly proportional to the diameter of the cross-section and inversely proportional to the mass at the free end. Therefore, the natural frequency of the lower section of the lance is expected to be reduced slightly during its lifetime and this was also expected during the measurement campaign. The change in the dynamic characteristics of the lower section interferes with the detection of the reagent type from the measured vibration data. For this reason, the dynamic behavior of the lance must be registered during a registration phase, i.e., at the beginning of each desulfurization treatment, either during the carrier gas flow (stage 1 shown in Figure 1b) or during the flow of the mixture of carrier gas and reagent (stage 2 shown in Figure 1b). According to the results of analysis step 1 presented in Section 3.1, the change in the dynamic behavior of the lance during the measurement campaign can be captured in a transfer function. Therefore, in this work, the dynamic behavior of the lance observed during the registration phase is captured in the transfer function, and this is used to clean the vibration data, i.e., to remove the effect of the dynamic characteristics of the lance from the vibration data and thus to enable reliable detection of the reagent type. The process steps for creating a transfer function and using it to clean the vibration data are shown in the block diagrams in Appendix A. In the calculation of the transfer function, the dynamic behavior of the lance is modeled as a linear system. Excitation, i.e., the flow of carrier gas or a mixture of carrier gas and reagent is considered as the input x t ð Þ to the system, and the vibration measured at the accelerometer as the output y t ð Þ. The frequency response H f ð Þ of the mechanical system is calculated using the Fourier transform X f Þ ð of the input x t ð Þ and the Fourier transform Y f Þ ð of the output y t ð Þ as: The transition of vibrations due to excitation to the response along the lance structure during desulfurization treatment (process stage 3) is illustrated in Figure 3. The linear model means, that the amplitudes and phases of the frequencies in the input may be changed by H f Þ, ð and no new frequencies are created. Generally, we assume mostly dampening of amplitudes to occur because of the distance between the input (carrier gas þ reagent injection into the hot metal) and the acceleration output measurement.
However, a better estimate than Equation (1) is achieved assuming that the input signal x t ð Þ is actually a random signal. Thus, if the input is a wide-sense stationary (WSS) random signal X t ð Þ, then so is the output Y t ð Þ. The power spectral densities of these WSS signals are related to the squared magnitude of the frequency response (gain) [10] With the help of the cross-spectral density S XY , it is also possible to reveal the phase information of the frequency response [10] The challenge in this study is that we do not directly measure the excitation X, but rather must assume its form or generate an approximation of it. We used two methods to this end: Assume that the excitation is white noise with power spectral density ð Þ from the vibration data and thus the magnitude of the frequency response can be calculated as Assume that the excitation is white noise, generate a realization of it and estimate S XY f ð Þ and S XX f ð Þ and finally use Equation (3) to estimate H f ð Þ. The phase information of the result will not be correct since it depends on the realization of the generated input which has random phases.
In both methods, we used either Welch's [11] or Bartlett's [12,13] method or a periodogram [14] for estimating the required power spectral density (PSD) and the cross-spectral density (CSD) from the measured or simulated data. Finally, the estimated transfer function (we use this term for the estimated H f ð Þ or jH f ð Þj from now on) was used to solve the inverse problem of determining the vibration response where the effect of the dynamic behavior of the lance observed in the registration phase is removed from the vibration data recorded in the classification phase, i.e., in the process stage (either stage 2 or stage 3) where the classification of the reagent type takes place. If the cleaning is successful, the result of the inversion should return more or less white noise when applied to a sample vibration spectrum Y f ð Þ measured in the registration phase, and when applied to a spectrum measured in the classification phase, it should return an estimate of the input spectrum characterized only by the novel excitations present at the classification phase. Here, we assume that the spectral shift of the lance, when it is submerged in the liquid metal in process stage 3, is so moderate that the same H f ð Þ can be utilized in the inversion during the classification phase when process stage 3 is studied.
Modeling the dynamic behavior of the lance in the registration phase and removing its effect from the vibration data measured in the classification phase were done with six alternative cleaning algorithms. Depending on the algorithm, the dynamic behavior of the lance in the registration phase is stored via transfer function H f ð Þ or jH f ð Þj according to Equations (3) or (4). The transfer function is calculated using either the whole vibration signal Y R t ð Þ recorded in the registration phase or segments of the vibration signal y R l t ð Þ, l ¼ 1 : : : n R , where the n R denotes the number of consecutive time segments within the vibration signal Y R t ð Þ. The vibration signal Y C t ð Þ recorded in the classification phase consists of consecutive time segments y C k t ð Þ, k ¼ 1 : : : n C , where n C denotes the number of time segments within that signal. The length of segments l and k are defined as follows where f res denotes the size of the frequency bands used to represent the vibration signal, i.e., the frequency resolution defined in Table 3. Taking the discrete Fourier transform of y C k t ð Þ yields Y C k f ð Þ, which is the spectrum of the kth time segment. The vibration signal Y C t ð Þ, the time segments y C k t ð Þ, and the corresponding Y C k f ð Þs also contain information about the dynamic behavior of the lance during the registration phase, which must be removed, i.e., cleaned from represents the cleaned amplitude spectrum of the k th time segment, from which the effect of the dynamic characteristics of the lance has been removed. Thus, X C k f ð Þ is considered to contain information about the reagent type as a real value, i.e., as an amplitude spectrum, and is defined based on Equation (1) as follows where H f ð Þ is estimated using Equations (3) or (4) depending on the algorithm. The resulting cleaned amplitude spectrum X C k f ð Þ calculated for each n C time segment was stacked in columns from left to right to comprise a vibration spectrogram. In this work, the shape rather than absolute vibration intensities in the vibration spectrum was considered a significant factor in classifying the reagent type. Therefore, the shapes of the amplitude spectra of the vibration spectrogram have been scaled to be comparable. The scaling is done by standardizing the columns, i.e., the values of each spectrum (column) are subtracted by the average of the column values, and the result is divided by the standard deviation of the column values. A schematic representation of the use of the cleaning algorithm to generate a standardized vibration spectrogram is depicted in Figure 4. The details of the cleaning algorithms 1À6 are described in the block diagrams in Appendix A.

Classification Modeling
In this work, the modeling of the reagent type was done using Elastic Net (Enet) regression [15,16] and eXtreme Gradient Boosting (XGBoost) [17] methods. The binary classification performance of these methods was evaluated using the area under the receiver operating characteristic (ROC) curve (AUC) [18] and the Matthews correlation coefficient (MCC). [19,20] The MCC was calculated using a classification threshold value of 0.5. The reagent type was used as a binary response, and frequency bands in the standardized vibration spectrogram were used as continuous predictor variables in the binary classification model.

Data Partitioning
The classification modeling consists of several rounds, in each of which the input data, i.e., the standardized vibration spectrograms of desulfurization treatments are randomly partitioned and sampled into training data, i.e., data set used in model training, and testing data, i.e., data set used in model testing. The data partitioning described in Figure 5 consists of the following steps: 1) Step 1a (partitioning of treatments into model training): Four out of six desulfurization treatments (ID 1À6) with the gas-forming reagent and four out of nine desulfurization treatments (ID 7À15) with the non-gas-forming reagent are randomly selected and their standardized vibration spectrograms are stacked in columns, 2) Step 1b (partitioning of treatments into model testing): Two remaining treatments with the gas-forming reagent and two treatments out of the remaining treatments with the non-gas-forming reagent are randomly selected and their standardized vibration spectrograms are stacked in columns, 3) Step 2 (stratified sampling of columns of standardized vibration spectrograms): 80% of the columns stacked in step 1 are randomly selected from each treatment when the process stage 2 is used as the classification phase. Respectively, when classification is performed in process stage 3, 500 columns are randomly selected from each treatment. Selected columns are further stacked in columns to create new groups of spectrograms, i.e., standardized vibration spectrograms representing the gas-forming and non-gas-forming reagents, 4) Step 3 Cleaning Algorithm   4 5 6 7 8 9 10 11 12 13 14 15 Treatm ents with gas-form ing reagent Treatm ents with non-gas-form ing reagent S tep 1: P artitioning of treatm ents into m odel training (S tep 1a) and m odel testing (S tep 1b) and stacking their standardized vibration spectrogram s in colum ns.
Step 1a Step 1b S tep 2: S tratified sam pling of colum ns of standardized vibration spectrogram s.   (sampling columns of spectrograms with replacement): A random sample of columns with replacement is taken from each group of spectrograms built in step 2 to create representative vibration spectrograms used for training and testing of the binary classification model. The number of columns in these spectrograms is shown in Table 2.
The data partitioning described in Figure 5 is performed at each round of cross-validation, and therefore random samples are taken in data partitioning steps 2 and 3.
An example of the actual training data, i.e., the standardized vibration spectrogram used to train the binary classification model is shown in Figure 6, where the standardized spectrogram corresponds to the lower left section of Figure 5 called "Training data." Figure 6a,b depicts the spectrograms of the gas-forming and nongas-forming reagents placed side-by-side. The darkness of the pixels in Figure 6 indicates the vibration intensity. The darker the pixels, the greater the values of the vibration amplitude, i.e., the stronger the vibration at the given frequency described on the vertical axis. The behavior of the standardized spectrograms of the gas-forming and non-gas-forming reagents can be studied by comparing Figure 6a,b, especially on the vertical boundary line between them. When switching from a gas-forming reagent to a non-gas-forming reagent, the following are observed: 1) Dark pixels occur less often in the frequency range below 400 Hz, 2) Dark pixels occur more often in the frequency ranges 0.7À2.0, 2.7À3.1, and 5.7À6.3 kHz, and 3) The horizontal band of dark pixels shifts slightly upwards in the frequency range 8.8À9.3 kHz.

Elastic Net Regression
In the fitting of an ordinary least squares (OLS) regression model, the Enet regularization method in the Enet regression [15,16] linearly combines the L 1 penalty used in the Least Absolute Shrinkage and Selection Operator (LASSO) regression [21] method and L 2 penalty used in the Ridge regression [22] method. The L 1 penalty used in the LASSO regression produces a sparse model, i.e., a model which involves only a small number of predictor variables that are considered the most significant contributors to predicting the response. Therefore, the LASSO regression is often used for variable selection. However, if the predictor variables include a group of variables with high pairwise correlations, the LASSO regression tends to select only one variable from the group and does not care which one is selected. [15] The L 2 penalty used in the Ridge regression has better prediction performance over the LASSO in circumstances when there are high correlations between predictor variables. [15] Unlike the LASSO, the Ridge regression always keeps all predictor variables in the model, [15] so it is not useful for variable selection. The Enet regression [15,16] was introduced to overcome the shortcomings of the LASSO regression and the Ridge regression by mixing L 1 and L 2 penalties by weighting them using λ, with 0 ≤ λ ≤ 1. When λ = 1, the Enet regression is equivalent to the LASSO regression, and when λ = 0, the Enet regression is equivalent to the Ridge regression. The Enet regression has hyperparameters α and λ that are tuned by cross-validation.

eXtreme Gradient Boosting
The XGBoost model is a scalable machine learning system for tree boosting, and it is widely used by data scientists for many machine learning challenges. [17] Due to its speed and accuracy, the method has been widely recognized in some major big data competitions, such as Kaggle and DataCastle. Although the XGBoost model often achieves higher accuracy than other models, the interpretation of the decision trees is challenging due to their large number. However, the importance of the predictor variables can be extracted from the XGBoost model. a) GFR = Gas-forming-reagent; b) NGFR = Non-gas-forming-reagent.

Frequency [kHz]
Gas-forming reagent Non-gas-forming reagent  Overfitting of the XGBoost model is avoided by the additional regularization term used in the model fitting process. XGBoost has several hyperparameters tuned by cross-validation and is therefore computationally more expensive than the Enet regression.

Analysis Steps
The data analysis concerning classification modeling consists of four main steps and it was performed using all combinations of the factors listed in Table 3. The frequency resolution ðf res Þ, i.e., width of the frequency band has four levels. A coarser resolution, e.g., 100 Hz, enables a smaller number of frequency bands as predictor variables, which makes the classification model lighter.
An upper-frequency limit, denoted as f max: , consists of the Nyquist frequency, [23] i.e., 12.8 kHz. As another option, 5.0 kHz was used as the upper-frequency limit, because its sampling frequency of 10 kHz enables the use of the cheaper and wider range of accelerometers. In addition, the observation of vibration is less sensitive to disturbances in industrial conditions. The analysis steps were as follows: 1) Evaluation of the capability of the transfer functions defined in Equation (3) and (4) to describe the change in the dynamic characteristics of the lance using the vibration data recorded in process stage 1 of desulfurization treatments with ID 1À15, a) A real-valued transfer functions calculated from time segments of the process stage 1 are stacked in columns from left to right, forming a matrix of which rows describe frequency bands, and columns describe time segments, b) A time vector (in seconds) was created that represents the accumulated operating time of the lance in the process stage 3 by the time corresponding to each column of the matrix created in the analysis step 1a, c) The capability was calculated for each frequency band, i.e., row of the matrix created in the analysis step 1a by performing Kendall's rank correlation test [24] that measures the Kendall rank correlation coefficient, i.e., the Kendall's τ [25] and its statistical significance. [24] Kendall's τ, range -1 to 1, measures the ordinal association between the lance age, i.e., the time vector created in the analysis step 1b and values within a row of the matrix created in the analysis step 1a. Thus, Kendall's τ is calculated for each frequency band. All insignificant Kendall's τ values, i.e., cases where the p-value of the association test is greater than 0.05, are set to zero. A positive Kendall's τ means that values of the transfer function within the given frequency band increase as the lance ages. A negative Kendall's τ indicates decreasing values as the lance ages. Table 3; 2) testing the capability of six alternative cleaning algorithms to remove the dynamic characteristics of the lance from the vibration data. The testing was performed using only data from process stages 1 and 2 at a time, including all combinations of factor levels shown in Table 3. Analysis steps 2b-d in the following steps are repeated ten times: a) Cleaning the vibration data and converting the results into standardized vibration spectrograms using the cleaning algorithms 1À6 described in Appendix A. In testing the cleaning algorithms, the registration phase and the classification phase are considered the same, i.e., either process stage 1 or 2. Therefore, Y C ðtÞ ¼ Y R t ð Þ and n C ¼ n R , b) partitioning of the standardized vibration spectrograms and the corresponding reagent type into the training and testing data as shown in Figure 5. Although the reagent is not present in the process stage 1, the reagent type was determined based on the treatment number so that treatments with ID 1À6 belong to the gas-forming reagent type and treatments with ID 7À15 belong to the non-gas-forming reagent type, c) training of Enet and XGBoost binary classification models using training data. The AUC was used as a scoring metric for tuning the hyperparameters in the model training, d) testing of the Enet and XGBoost binary classification models using testing data. The prediction results, i.e., probabilities of the gas-forming reagent type were recorded for the subsequent analysis of classification performance, e) calculation of the performance of the binary classification models. The performance is quantified by the AUC and its 95% confidence limits are calculated using DeLong's method. [26,27] The confidence limits of the AUC are denoted as follows: lower 95% confidence limit ! AUC LCL , upper 95% confidence limit ! AUC UCL . 95% confidence limits are typically used to indicate uncertainty, f ) selection of evaluated factor combinations satisfying the condition AUC LCL < 0.5 < AUC UCL , where AUC ¼ 0.5 denotes a random classification, i.e., the classification corresponds to a random guess. In the selected combinations, the cleaning algorithm has successfully removed the effect of the change in the dynamic characteristics of the lance from the vibration data, and consequently, the binary classification model is not able to distinguish between reagent types, i.e., the model performs a random classification, and g) the list of selected factor combinations defined in the analysis step 2f contains a column for the process stage used as the registration phase. Since the following analysis steps are based on this list, it was expanded by adding a column for the process stage used as the classification phase in the subsequent analysis steps. Thus, each row in the list where process stage 1 was used as the registration phase was assigned two identical rows where the process stages 2 and 3 were defined as the classification phase. Additionally, for the rows in the list where process stage 2 was used as the registration phase, process stage 3 was assigned as the classification phase. This procedure generated a list of 110 combinations that were analyzed in subsequent analysis steps. The results of analysis step 2, i.e., the list of factor combinations, are presented in Appendix B. The list provides an answer to research question 4: The effect of lance aging can be successfully removed from the vibration data; 3) modeling the reagent type using the partitioned data from the classification phase. The modeling steps are described in analysis steps 3a-e and were performed using the factor combinations defined in the analysis step 2g and presented in Appendix B. The procedures described in analysis steps 3b-d were repeated 14 times when process stage 2 was used as a classification phase and 40 times when process stage 3 was used as a classification phase, a) registration of the dynamic characteristics of the lance in the registration phase, cleaning the registered effect from the vibration data of the classification phase and converting the results into standardized vibration spectrograms are performed using cleaning algorithms 1À6 presented in Appendix A, b) partitioning of the standardized vibration spectrograms and corresponding reagent types into the training and testing data as illustrated in Figure 5, c) training of Enet and XGBoost binary classification models using training data. The AUC was used as a scoring metric for tuning the hyperparameters of the classification models by using cross-validation. The hyperparameters of the optimal Enet and XGBoost models and the importance of predictor variables are recorded in each training round. When using the Enet model, the importance of the predictor variables is determined based on the absolute values of their coefficients. When using the XGBoost model, the importance of the predictor variables is determined using the SHapley Additive exPlanations (SHAP) [28] method, d) testing of Enet and XGBoost binary classification models using testing data. The prediction results, i.e., probabilities of the gas-forming reagent type, were recorded for the subsequent analysis of the classification performance, e) the performance of the binary classification models was calculated based on the results obtained from the analysis steps 3b-d, and they were assigned to the analyzed factor combination. The classification performance was depicted by the ROC curve and quantified using an AUC and its 95% confidence limits. The MCC and its 95% confidence limits are calculated using the nonparametric bootstrap method by Efron. [29] In the bootstrap method, the total number of records used to calculate the MCC estimate is drawn repeatedly (N = 10 4 ) with replacement, and from each of these resampled, i.e., bootstrapped datasets, the MCC estimate is calculated and stored. The 2.5th and 97.5th percentiles calculated from the stored MCC estimates constitute the 95% confidence limits of the MCC, f ) the combination list defined in analysis step 2g was grouped according to the combinations of the factors f max: , registration phase, classification phase, and vibration direction. From each group, the combination with the highest AUC value was selected and the results of the analysis step 3 were summarized and presented in Table 4; and 4) determination of the most significant vibration frequencies in the reagent type classification. These frequencies have the greatest contribution to detecting the difference between reagent types. The orders of variable importance determined in analysis step 3c were compiled and scaled between 0 and 1 to obtain the scaled importance of the vibration frequency.

Detection of a Change in the Dynamic Characteristics of the Lance
The results of the capability evaluation of the transfer functions (step 1) are shown in Figure 7. The Kendall's τ values were estimated using an association test. [24] Red vertical lines with   (3), they are statistically significant, i.e., the p-values of the association tests are less than or equal to 0.05. All subfigures in Figure 7 demonstrate that the transfer functions described in Equations (3) and (4) successfully capture the change in the dynamic behavior of the lance during the measurement campaign for all vibration directions and frequency resolutions. Based on this, it can be concluded that the methodology of using the transfer functions described in Equation (3) and (4) to preserve the dynamic behavior of the lance has proven to be feasible. Therefore, the change in the dynamic characteristics of the lance due to its aging can be successfully detected and modeled; this answers the third research question.

Detection of the Reagent Type
The results of the analysis step 3 are summarized in Figure 8 and 9, and Table 4. Figure 8 illustrates the performance of the reagent-type classification models depicted by ROC curves and quantified by AUC. The rows of subfigures in Figure 8 represent analysis cases where the maximum frequency f max: was 5.0 or 12.8 kHz. The columns in Figure 8 represent process stages whose information was used for the registration of the dynamic characteristics of the lance and in the classification of the reagent type. Figure 9 shows the results of the analysis step 3 with AUC values with a 95% confidence interval and the corresponding MCC values with a 95% confidence interval. As a result of analysis step 3f, Table 4 shows a numerical summary of the results shown in Figure 8 and 9, as well as the used cleaning algorithms, classification models, and frequency resolutions. Figure 8a,d summarizes the performance of the binary classification model for the reagent type classification in process stage 2, when the registration of the dynamic characteristics of the lance has been performed in the process stage 1. In both subfigures, the ROC curves for all three vibration directions are reasonably close to the black diagonal line, indicating poor or near-random classification, which can also be inferred from the corresponding AUC values. The same can also be concluded from Figure 9b,h, and rows 1À3 and 10À12 in Table 4, where the MCC estimates are À0.197 to þ0.174, i.e., close to zero, which represents a nearrandom classifier. From this we can conclude an answer to research question 1: It may be possible to detect the difference between gas-forming and non-gas-forming reagents in process stage 2, i.e., when the lance is in its upper position and the carrier gas þ reagent mixture flows through the lance, but the probability of correct classification is low in this specific process stage.
The performance of the binary classification model for the reagent type classification in process stage 3 is summarized in Figure 8b,c,e,f, Figure 9cÀf,iÀl, and in rows 4À9 and 13À18 of Table 4. When comparing the ROC curves and the corresponding AUC values between the middle and right columns of Figure 8, it can be observed that a better performance in the reagent type classification is achieved when the registration of the dynamic characteristics of the lance has been performed in the process stage 1. When comparing the ROC curves and the corresponding AUC values of the rows formed by Figure 8b,c,e,f, it can be noticed that a better performance in the classification of the reagent type is achieved especially in the Y and Z directions when using the maximum frequency (f max: ) of 12.8 kHz. Based on the ROC curves and the corresponding AUC values in Figure 8e, it can be concluded that the best performance in the reagent type classification is achieved when using vibration directions Y and Z, a maximum frequency (f max: ) of 12.8 kHz and registering the dynamic characteristics of the lance in process stage 1. The same conclusion can also be  Table 4 and from the location of black dots related to the vibration directions Y and Z shown in Figure 9i,j, where they stand out clearly from other dots in those subfigures. These results strongly suggest that the difference between gas-forming and non-gas-forming reagent can be successfully detected under the conditions described above (see the research question 1).
The results summarized in Table 4 (rows 14 and 15) indicate that the difference between gas-forming and non-gas-forming reagents during the desulfurization process can be successfully detected. A classification performance of AUC = 0.913, MCC = 0.707, and accuracy = 0.852 is achieved when 1) using the vibration in the Y direction, 2) using a maximum frequency (f max: ) of 12.8 kHz, 3) using a frequency resolution (f res ) of 12.5 Hz, 4) registering the dynamic characteristics of the lance in process stage 1, 5) using cleaning algorithm 4 (the transfer function according to Equation (4)), and 6) using the XGBoost model for the reagent type classification.
A classification performance of AUC = 0.916, MCC = 0.699, and accuracy = 0.849 is achieved when 1) using the vibration in the Z direction, 2) using a maximum frequency (f max: ) of 12.8 kHz, 3) using a frequency resolution (f res ) of 12.5 Hz, 4) registering the dynamic characteristics of the lance in process stage 1, 5) using cleaning algorithm 1 (the transfer function according to Equation (4)), and 6) using the Enet model for the reagent type classification.

Determination of the Most Significant Vibration Frequencies
As shown in Table 4 (row 15), the best performance for binary classification was AUC = 0.916 and was achieved by the Enet model. The average of the λ values recorded in the analysis step 3c, i.e., in the training of the Enet binary classification model, was 0.19. This indicates that the estimated Enet models are, on average, nearly equivalent to the Ridge regression, for which λ = 0. The horizontal band of dark pixels in Figure 6 reveals that the correlation between the adjacent frequency bands can be high in certain frequency ranges. For these reasons and due to the shortcomings of the Ridge regression explained in Section 2.5.2, the Enet model cannot in this case determine a sparse model and thus also identify the most significant frequencies. Thus, the most significant vibration frequencies are determined based on the XGBoost model, as it is robust against the correlation between predictor variables. [17,30] The second highest performance for binary classification is AUC = 0.913 and is achieved by the XGBoost model (see Table 4, row 14). Thus, the most significant vibration frequencies in the Y (horizontal) direction are determined based on that analysis case. The most significant vibration frequencies along the lance direction, i.e., in the Z (vertical) direction are determined using the XGBoost model and the same registration phase, classification phase, f max: and f res (see Table 4, row 14). The analysis cases for which the most significant vibration frequencies are determined are presented in Table 5.
In response to research question 2, the scaled importance of the vibration frequencies of the analyzed cases presented in Table 5 is illustrated in Figure 10. Figure 10a,b shows that the scaled importance of the ten most significant vibration frequencies is clearly greater than other frequencies. These subfigures also reveal that the frequencies with the greatest scaled importance are concentrated near 9 kHz, except that the 100 Hz frequency, as shown in Figure 10d, has the third largest scaled importance in the Z direction. According to Figure 10c, five of the 10 most significant frequencies in the Y direction are in the frequency range 8,900.0À8,987.5 Hz and four of these are adjacent frequency bands. Figure 10d shows that five of the ten most significant frequencies in the Z direction are in the frequency range 8900.0À9000.0 Hz and four of them are adjacent frequency bands. Figure 10d also reveals that the third most significant frequency is 100 Hz.

Implications of the Results and Future Work
The classification results summarized in Table 4, rows 14 and 15 indicate that the reagent type can be detected from the vibration data measured at the top surface of the upper section of the lance in process stage 3. As for further work, it is recommended that future studies focus on detecting the intensity of reagent gas formation on a continuous scale rather than a discrete (gas-forming/ non-gas-forming) scale. The inclusion of acoustic measurements in future studies is recommended, as their use in monitoring gasblowing processes has shown promising results. [31] According to Figure 10, ten of the most significant vibration frequencies in the reagent type classification occur in the frequency range 100 HzÀ9 kHz. The vibrations occurring in this frequency range can be measured with conventional piezoelectric accelerometers used in industrial applications, whose linear (AE3 dB) frequency range is wide enough, for example, 5 HzÀ10 kHz. However, great attention must be paid to the installation of the accelerometer to avoid vibration signal interference caused by poor mounting.    Although the most significant vibration frequencies in the classification of the reagent type were determined, due to the limited scope of the experiment, it is not possible to conclude whether the magnitude of these frequencies was directly affected by the change in gas formation or indirectly by some unknown factor that was affected by the change in gas formation. A possible source of the most significant frequencies is the mechanical interface between the lower and upper section of the lance, where the mechanical vibration transmitted from the lower section to the upper section of the lance causes small relative motion and friction in the interface between the sections, which can generate some significant high frequencies that vary in magnitude as the gas formation changes. This phenomenon can be seen in Figure 6 where the horizontal band of dark pixels shifts slightly upward in the frequency range 8.8À9.3 kHz when switching from gas-forming reagent to non-gas-forming reagent.
One of the most significant vibration frequencies in the classification in the Z direction is 100 Hz as shown in Figure 10b,d. A probable reason for this is a change in the gas formation, and consequently a change in excitation applied to the structure of the lower section of the lance, while another possible reason for the observed frequency of 100 Hz could be the first harmonic multiple (100 Hz) of the electric current, which has a frequency of 50 Hz. To clarify the sources of the most significant frequencies shown in Figure 10, a more extensive measurement campaign should be conducted. In future studies, it is also recommended to explore whether the most significant vibration frequencies are stable, i.e., whether they remain approximately the same when the worn lower part of the lance is replaced with a new one, as is done under normal production conditions.

Conclusion
In injection-based hot metal desulfurization, it is important to keep the reagent-induced process variance under control to guarantee a desired sulfur level for further processing at the melt shop. Having identified the vibration induced by the reagent injection as a potential source of information for process monitoring, this  Table 5. The 10 most significant frequencies in c) the Y direction and in d) the Z direction are shown in order of their scaled importance. article aimed at devising a new mechanical vibration measurement-based method capable of detecting changes in the gas-forming properties of the reagent in hot metal desulfurization.
To collect data, a measurement campaign was carried out at an industrial-scale hot metal desulfurization station. More specifically, an accelerometer was mounted at the upper end of the lance, where the vibration caused by gas formation was transmitted along the body of the lance from its submerged lower end. The reagent detection was performed using two alternative classification models based on Enet regression and XGBoost methods, which were compared based on their classification performance measured by the AUC and MCC. A transfer function was used in the developed cleaning algorithm, which successfully removed the interfering effect of the lance aging from the vibration data and thereby improved the reliability of detecting changes in gas-forming properties of the reagent.
The highest classification performance between gas-forming and non-gas-forming reagents in the desulfurization stage was obtained using the Enet regression method, with an AUC of 0.916 and corresponding MCC of 0.699. This applies to the process stage where the lower end of the lance was submerged in the hot metal, and the dynamic characteristics of the lance were preserved in the process stage where the lance hangs freely in the air and the carrier gas flows through the lance. In parallel (vertical) and perpendicular (horizontal) vibration directions to the body of the lance, five of the 10 most significant vibration frequencies in the classification between gas-forming and non-gas-forming reagents were concentrated near 9 kHz while one of the most significant frequencies in the parallel direction was 100 Hz. Future studies should explore whether the most significant vibration frequencies remain approximately the same when the worn lower part of the lance is replaced with a new one, as is done under normal production conditions. The results of this work serve as a basis for developing industrial applications in which the effective utilization of the excitation, such as vibration generated by the gas formation can be used for process monitoring and as a soft sensor for predicting the desulfurization efficiency.
Appendix A