Method for detecting sulfur oxide in flue gas in non-ferrous metal smelting process based on Raman spectrum

By combining Raman spectroscopy technology and data analysis, using S-G convolution, airPLS fitting, SMA dimensionality reduction and SVR regression models, and using whale optimization algorithms, the cumbersome and consumption of flue gas sulfur oxide detection in the non-ferrous metal smelting process in traditional methods is solved. This problem is that fast and accurate quantitative analysis of sulfur oxides is achieved.

CN119202589APending Publication Date: 2024-12-27ANHUI UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411235516.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Traditional methods are used for quantitative analysis of flue gas sulfur oxides during non-ferrous metal smelting, which are complicated, long time and high cost, making it difficult to meet the needs of fast and accurate detection.

Method used

Raman spectroscopy technology combined with data analysis, and through S-G convolutional denoising, airPLS fitting, SMA dimensionality reduction and SVR regression models, the model is optimized using whale optimization algorithm to achieve fast and accurate sulfur oxide detection.

Benefits of technology

The rapid and accurate quantitative analysis of flue gas sulfur oxides in the non-ferrous metal smelting process is achieved, and the cumbersome and time-consuming problems of traditional methods are overcome, and the detection efficiency and accuracy are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202589A_ABST
    Figure CN119202589A_ABST
Patent Text Reader

Abstract

The invention discloses a method for detecting sulfur oxide in flue gas in a non-ferrous metal smelting process based on Raman spectrum. The method comprises the following steps: acquiring a Raman spectrum data set of sulfur oxide gas through a laboratory equipment experiment; dividing the collected spectral data set into a training set and a test set according to a ratio of 7: 3; preprocessing the Raman spectrum data of the data set; carrying out dimension reduction processing of a multiple superposition mapping analysis (SMA) algorithm on the preprocessed data; constructing an SVR regression prediction model of the Raman spectrum; optimizing the SVR model by using a whale optimization algorithm; inputting test set data to test the model; according to the method for detecting the sulfur oxide in the flue gas in the non-ferrous metal smelting process based on the Raman spectrum, the concentration of the sulfur oxide in the flue gas is accurately detected, and the concentration of the sulfur oxide in the smelting flue gas can be monitored and recorded in real time. And an important basis is provided for optimization of the smelting process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of pollutant detection, and in particular to a method for detecting sulfur oxides in flue gas during non-ferrous metal smelting based on Raman spectroscopy. Background Art

[0002] The flue gas generated during the non-ferrous metal smelting process, especially sulfur oxides, is one of the important pollutants in the smelting industry. Quantitative analysis of these pollutants has many meanings: sulfur oxides are one of the main sources of air pollution, which can lead to a series of environmental problems such as acid rain and deterioration of air quality. By quantitatively analyzing the sulfur oxide content in the flue gas, we can understand the emission of pollutants in the smelting process, and then take corresponding control measures to reduce pollution to the environment. The quantitative analysis of sulfur oxides in the flue gas of non-ferrous metal smelting process is of great significance for environmental protection, regulatory compliance, process optimization, health management and scientific research.

[0003] Traditional methods for detecting sulfur oxides in flue gas during non-ferrous metal smelting processes include chemical analysis, spectrophotometry, chromatography, coulometric titration, infrared spectroscopy, etc. Although traditional detection methods can meet the needs of quantitative detection of sulfur oxides to a certain extent, they often have problems such as cumbersome operation, long time consumption and high cost.

[0004] The principle of Raman spectroscopy is a spectral technology based on the Raman scattering effect. When light interacts with matter, the vibration and rotation energy levels of the molecules or crystals of the matter will cause the frequency of light to change, resulting in a scattering spectrum. This technology uses (SG) convolution to denoise the spectral signal, the airPLS fitting method of Raman peak truncation to perform baseline correction, the multiple superposition mapping analysis (SMA) algorithm to reduce the dimension, the SVR algorithm to perform regression prediction, and then the whale optimization algorithm to optimize. This model has the characteristics of non-destructive, high resolution and rapid detection, which makes it unique in the quantitative analysis of flue gas in the non-ferrous metal smelting process. Summary of the invention

[0005] The purpose of the present invention is to provide a method for detecting sulfur oxides in flue gas during non-ferrous metal smelting by using Raman spectroscopy technology in combination with data analysis.

[0006] To achieve the above object, the present invention adopts the following technical solution:

[0007] A method for detecting sulfur oxides in flue gas of non-ferrous metal smelting process based on Raman spectroscopy comprises the following steps:

[0008] S1: Raman spectroscopic datasets of sulfur oxides were obtained using laboratory equipment;

[0009] S2: Sample set allocation: divide the spectral information data into training set and test set;

[0010] S3: Spectral data preprocessing: SG convolution was used to remove noise from the original spectral data, and the airPLS fitting method with Raman peak truncation was used for baseline correction;

[0011] S4: Dimensionality reduction is performed on the preprocessed data using the multiple superposition mapping analysis (SMA) algorithm;

[0012] S5: Establish the SVR regression prediction model of sulfur oxides;

[0013] S6: Optimize the SVR model using the improved whale optimization algorithm (WOA);

[0014] S7: Input test set data to test the model;

[0015] Further, in S1, a quantum cascade laser is selected to excite sulfur oxide gas, and a Raman spectrometer is used to obtain a Raman spectrum data set of the sulfur oxide gas;

[0016] Furthermore, in S2, the spectral data is divided into a training set and a test set in a ratio of 7:3:

[0017] Furthermore, in S3, the data collected from the experiment are preprocessed as follows;

[0018] S31: The length of the airPLS signal y is N, which is obtained under equally spaced sampling. At the same time, z is the fitting baseline. The fitting baseline should follow the same trend as y while maintaining smoothness.

[0019] S32: Assuming that y and z are column vectors, z can be determined by finding the minimum value of a least squares function F with a penalty term:

[0020]

[0021] Where i is the index of the signal sampling position; y i and z i are the intensities of the i-th sampling point in vectors y and z respectively; w i is the weight of each sampling position controlling the closeness of the fitted baseline and the signal. The first and second terms represent the fidelity of the spectral signal and the smoothness of z, respectively, and λ is a parameter that balances these two terms.

[0022] S33: It can also be expressed in matrix form as:

[0023] F=(yz) T W(yz)+λz T D T Dz

[0024] In the above formula: W is a diagonal matrix with the weight vector on its diagonal; D is a second-order difference matrix:

[0025]

[0026] S34: By finding the partial derivative vector and setting its value to 0, that is, The minimum solution of the formula is as follows:

[0027]

[0028] z=(W+λD T D) -1 Wy

[0029] S35: The adaptive iterative reweighting process uses different methods to assign weights and add penalties according to the number of iterations to control the smoothness of the fitted baseline. The weight vector w i The change with the iteration step t is obtained by the following formula:

[0030]

[0031] S36: where vector d - consists of the negative elements of yz. In the previous t-1 iterations, the fitted vector z is a candidate for the baseline. If a signal y i Candidate value z greater than the baseline i , it is considered to be part of the peak value and its weight is set to 0. Otherwise, the weight is adjusted according to the above formula. When the number of iterations reaches the maximum value or meets the following termination condition, the iteration stops. In the following formula, ε is the threshold coefficient, which is usually 0.001.

[0032] |d - |<ε×|y i |

[0033] S37: The weighting scheme is the key to airPLS, which determines whether the estimated baseline is consistent with the actual Raman spectrum. However, affected by the intensity of the Raman peak, the fitted baseline will be higher than the theoretical baseline, which will affect the accuracy of subsequent qualitative and quantitative analysis.

[0034] S38: In order to further improve the accuracy of airPLS baseline fitting, a method of airPLS baseline fitting based on Raman peak truncation is proposed. The specific steps are as follows:

[0035] S381: Use Savitzky-Golay (SG) filter to denoise the spectral signal s and obtain y 0 .

[0036] S382: Using the first derivative of y 0Peak search is performed to obtain the Raman frequency shift Peak-positions corresponding to the Raman peak. Taking each Raman peak as the horizontal coordinate, the minimum point Left is searched to the left and right sides respectively. min and R min .

[0037] S383: The area between the two minimum points is cut off as the Raman peak area, and the remaining area signal is retained to obtain L n . n Perform airPLS fitting to obtain a new baseline L n+1 If L n+1 With L n If they are the same, then L n+1 It is regarded as the optimal fitting baseline of the original spectral signal. The signal after baseline correction is s′=sL n+1 ; If L n+1 With L n If they are different, then L n+1 and L n After subtraction, find the absolute value and take L whose absolute value is greater than the threshold P n+1 Truncated to obtain the new signal to be fitted L n Repeat the airPLS fitting until the two fitting baselines are the same, and output L n+1 The baseline-corrected signal is s′=sL n+1 . Where P is L n+1 With L n The mean of the absolute values ​​of the differences, the criterion for the same baseline fits is

[0038]

[0039] Furthermore, in S4, the multiple superposition mapping analysis (SMA) algorithm is used to reduce the dimension of the data, as follows:

[0040] S41: The total number of original samples is M, and the data matrix X m×n =[X 1 ,...,X n ](m rows, n columns).

[0041] S42: First, calculate the nearest neighboring points of all sample points and construct the minimum error function ε(w) about the neighboring points:

[0042]

[0043] where w ij is the sample point x i The weights of all neighboring points.

[0044] S43: The SMA algorithm is to meet the conditions of efficient dimensionality reduction, and the dimensionality reduction mapping matrix can better maintain the reconstruction relationship with the original high-dimensional samples. Therefore, it is necessary to construct an extreme value function ψ(Y) to represent the relationship between the feature matrix after dimensionality reduction and the original high-dimensional data. At the same time, the mathematical conditions of the feature matrix after dimensionality reduction satisfy the following formula.

[0045]

[0046] S44: Finally, the eigenvectors corresponding to the 2nd to d+1th eigenvalues ​​of the matrix P are selected as projection vectors.

[0047] P=(Iw)(Iw) T

[0048] S45: Finally, solve the eigenvector y corresponding to all eigenvalues ​​of the P matrix 1 , select the eigenvalues ​​y from 2 to d+1 2 ,...y d ,y d+1 The corresponding eigenvector is used as the projection vector, and the final output dimension reduction matrix is:

[0049] minψ(Y)=YPY T

[0050] Y * =-λP -1

[0051] Y * =[Y 2 ,Y 3 ...Y d+1 ] T ,Y i ∈R d ,d<<D

[0052] Furthermore, in S5, SVR is used for regression model prediction, as follows:

[0053] S51: For a given sample data {(x i ,y i ),i=1,2,…,n}x i ∈R n ,y i ∈R n , here x i ∈R n is the input value of the i-th sample, y i ∈R n is the output value of the i-th sample, n is the number of training samples, and the regression function is assumed to be:

[0054]

[0055] In the formula is a nonlinear mapping function, ω and b are the parameters to be solved.

[0056] S52: For SVR, there will be a certain error between the sample point and the output value of the prediction model. The insensitivity coefficient g>0 is introduced. When the sample point and the regression model are close enough, the error is controlled within a certain range. At this time, the sample is not counted as a loss. Introduce slack variables The problem to be solved is converted into the following mathematical formula:

[0057]

[0058] ||w|| 2 is the penalty function; C is the penalty factor, and the training error is affected by C; g affects the accuracy of the regression function. Therefore, C and g are important indicators of the evaluation function and are also the two parameters that the WOA algorithm needs to optimize.

[0059] S53: By introducing the Lagrangian factor a i and By constructing the Lagrangian function, the above optimization problem can be transformed into a dual problem:

[0060]

[0061] K(x i ,x j ) is the kernel function.

[0062] S54: Compared with other kernel functions, the radial basis function has small prediction error and high fitting accuracy when dealing with nonlinear problems. Therefore, this paper adopts the radial basis kernel function, and finally obtains the SVR regression estimation model as follows:

[0063]

[0064] Furthermore, in S6, the parameters to be optimized are determined according to the quantitative analysis problem of Raman spectrum of flue gas in non-ferrous metal smelting process, that is, the characteristic Raman information of Raman spectrum of sulfur oxides in flue gas in non-ferrous metal smelting process. The spatial position of each individual in the whale group contains a set of characteristic Raman information. The fitness function is used to measure the advantages and disadvantages of the individual spatial position, and the whale foraging strategy is used to continuously update the individual position of the whale until the best whale spatial position is obtained. It can be seen that the optimal solution to the optimization problem is the prey position information.

[0065] S61: In the encirclement phase, the whale position update formula is as follows;

[0066] X(k+1)=X p (k)-AD

[0067] D=|CX P (k)-X(k)

[0068] k is the current iteration number; X P (k) is the position of the whale at the kth iteration and the k+1th iteration; X P (k) is the best current position of the whale. A and C are position movement coefficients.

[0069] S62: Their calculation formula is:

[0070] A=2a·r 1 -a

[0071] C=2·r 2

[0072] Where: X rand (k) are all random numbers, and their value range is [0, 1].

[0073] S63: a is a control parameter, and its value changes with the number of iterations, as follows:

[0074]

[0075] Where: k max is the maximum number of iterations.

[0076] S64: Rotation update stage. In this stage, the whale approaches the prey in a spiral swimming manner and eventually reaches the location of the prey and captures it. The mathematical expression of this stage is:

[0077] X(k+1)=De bl cos(2πl)+X p (k)

[0078] Where b is a constant, which is used to control the spiral shape; l is a random number, and its value range is [0, 1].

[0079] S65: Prey search stage. In order to achieve global search, individual whales use random search to find prey. In order to distinguish it from the encirclement and predation stage, the value range of |A| is used for judgment. If |A|≥1 is satisfied, it means that the individual whale conducts random search while reducing the search area. The advantage of this is that the individual whale can stay away from the current optimal solution, and the algorithm can jump out of the local optimum, improving the optimization accuracy. The mathematical expression of this stage is:

[0080] X(k+1)=X rand (k)-AD

[0081] D=|CX rand (k)-X(k)|

[0082] Where: X rand (k) is the random position of the whale at the kth iteration. If |A|<1, the whale still chooses local search and updates the position in a spiral manner.

[0083] Furthermore, in S7, various parameters in the model are adjusted; the prediction model after parameter adjustment is used to input the test set spectral data for testing, and the sulfur oxide concentration of the flue gas in the non-ferrous metal smelting process is predicted. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] Figure 1 The present invention is a flow chart of a method for detecting sulfur oxides in flue gas of non-ferrous metal smelting process based on Raman spectroscopy; DETAILED DESCRIPTION

[0085] The present invention is described in detail below through specific embodiments and drawings to illustrate the unique advantages of the present invention.

[0086] The present invention proposes a method for detecting sulfur oxides in flue gas during non-ferrous metal smelting process based on Raman spectroscopy. Through Raman spectroscopy technology, the concentration change of sulfur oxides in the flue gas can be monitored in real time, providing an important basis for the optimization of the smelting process and environmental protection control.

[0087] In order to meet the above requirements, this embodiment proposes a method for detecting sulfur oxides in flue gas from non-ferrous metal smelting processes based on Raman spectroscopy, combining the Raman peak truncated airPLS fitting method and the SMA-SVR algorithm with Raman spectroscopy technology, using a laser to excite the gas, using the Raman spectral data obtained by the Raman spectrometer, using SG convolution to remove noise interference, and using the Raman peak truncated airPLS fitting method for baseline correction. The SMA algorithm is used to reduce the dimension and extract the required feature information from the spectral data, and the training set data is used to establish the SVR regression model. In order to make the regression model more accurate, the whale optimization algorithm is used to adjust and optimize the SVR model parameters. The algorithm has a simple structure, few parameter settings, fast convergence speed, and strong global search capabilities.

[0088] As an important branch of spectroscopy, Raman spectroscopy technology is different from traditional spectral detection technology. Raman spectroscopy has the characteristics of cleanliness, non-destructiveness, etc. It overcomes many difficulties of traditional detection methods, ensures practicality and detection accuracy, and is particularly suitable for quantitative analysis of gas detection.

[0089] Combined with Figure 1 As shown, in order to overcome the many difficulties of traditional detection methods and ensure the practicality and accuracy of detection, the embodiment of the present invention provides a method for detecting sulfur oxides in flue gas of non-ferrous metal smelting process based on Raman spectroscopy, comprising the following steps:

[0090] S1: Raman spectroscopic datasets of sulfur oxides were obtained using laboratory equipment;

[0091] S2: Sample set allocation: divide the spectral information data into training set and test set;

[0092] S3: Spectral data preprocessing: SG convolution is used to remove noise interference in the original spectral data, and the Raman peak truncation airPLS algorithm is used for baseline fitting;

[0093] S4: Perform dimensionality reduction processing on the preprocessed data using a multiple overlay mapping analysis algorithm to achieve effective feature space mapping and feature extraction of high-dimensional nonlinear data;

[0094] S5: Establish the SVR regression prediction model of sulfur oxides;

[0095] S6: Optimize the SVR model using the improved whale optimization algorithm;

[0096] S7: Input the test set data to test and verify the model;

[0097] Further, in S1, a quantum cascade laser is selected to excite the sulfur oxide gas, and then a Raman spectrometer is used to obtain a Raman spectrum data set of the sulfur oxide gas;

[0098] Furthermore, in S2, the data collected in the experiment are divided into a training set and a test set in a ratio of 7:3;

[0099] Furthermore, in S3, the data of the training set and the test set are preprocessed, and the spectrum is denoised using Savitzky-Golay (SG) convolution, which can effectively suppress the interference of random noise on the spectral signal and improve the signal-to-noise ratio; then, by identifying the Raman peak position, truncating the Raman peak area, and using the airPLS algorithm for baseline fitting, the fitting baseline rise caused by the sudden change in the intensity of the Raman peak area is reduced;

[0100] Furthermore, in S4, the spectral data after preprocessing is subjected to SMA dimensionality reduction processing, and the high-dimensional nonlinear sample data is subjected to data dimensionality reduction and feature extraction, showing the impact of nonlinear dimensionality reduction on high-dimensional data, especially the relationship and characteristic impact between feature space and original data mapping, improving the classification and recognition effect of high-dimensional data;

[0101] Further, in S5, first, the Raman spectroscopy data set after preprocessing and dimension reduction is divided into a training set and a test set by a cross-validation method, and the SVR model is trained with the training set to determine the parameters of the model to obtain the trained SVR model. The specific steps are as follows:

[0102] S51: For a given sample data {(x i ,y i ),i=1,2,…,n}x i ∈R n ,y i ∈R n , here x i ∈R n is the input value of the i-th sample, y i ∈R n is the output value of the i-th sample, n is the number of training samples, and the regression function is assumed to be:

[0103]

[0104] In the formula is a nonlinear mapping function, ω and b are the parameters to be solved.

[0105] S52: For SVR, there will be a certain error between the sample point and the output value of the prediction model. The insensitivity coefficient g>0 is introduced. When the sample point and the regression model are close enough, the error is controlled within a certain range. At this time, the sample is not counted as a loss. Introduce slack variables The problem to be solved is converted into the following mathematical formula:

[0106]

[0107] ||w|| 2 is the penalty function; C is the penalty factor, and the training error is affected by C; g affects the accuracy of the regression function. Therefore, C and g are important indicators of the evaluation function and are also the two parameters that the WOA algorithm needs to optimize.

[0108] S53: By introducing the Lagrangian factor a i and By constructing the Lagrangian function, the above optimization problem can be transformed into a dual problem:

[0109]

[0110] K(x i ,x j ) is the kernel function.

[0111] S54: Compared with other kernel functions, the radial basis function has small prediction error and high fitting accuracy when dealing with nonlinear problems. Therefore, this paper adopts the radial basis kernel function, and finally obtains the SVM regression estimation model as follows:

[0112]

[0113] Furthermore, in S6, WOA is used to optimize the parameters of SVR, and the parameters to be optimized are determined based on the Raman spectrum data of sulfur oxides in the flue gas of non-ferrous metal smelting process, that is, the characteristic Raman information of the Raman spectrum of sulfur oxides. The spatial position of each individual in the whale group contains a set of characteristic Raman information. The fitness function is used to measure the advantages and disadvantages of the individual spatial position, and the whale foraging strategy is used to continuously update the individual position of the whale until the best whale spatial position is obtained, that is, the penalty parameters and kernel parameters of the support vector machine are optimized. The specific steps are as follows:

[0114] S61: Initialize SVM parameters, set the initial values ​​and search range of penalty coefficient C and kernel parameter σ, and calculate the initial fitness value;

[0115] S62: Set relevant parameters of the WOA algorithm, including the size of the whale population, the maximum number of iterations, etc.;

[0116] S63: Initialize the whale population, take C and σ as whale prey, calculate the fitness values ​​of individual whales and sort them;

[0117] S64: Select the individual with the best fitness value as the current optimal solution, use the whale position update formula to update the individual position, and compare it with the current optimal solution. If it is better, replace it, otherwise keep it unchanged;

[0118] S65: Determine whether the iteration end condition is met. If so, output the optimal solution of the penalty parameter C and the core parameter σ. Otherwise, return to step S64.

[0119] S66: Assign the optimal solution to SVM and perform regression prediction analysis on the sample data in the test set.

[0120] The present invention constructs a regression model of sulfur oxides in flue gas of non-ferrous metal smelting process based on Raman spectroscopy, and proposes a method for detecting sulfur oxides in flue gas of non-ferrous metal smelting process based on Raman spectroscopy. Raman spectroscopy technology has the characteristics of non-destructiveness and high resolution, and can monitor and record the molecular structure and vibration energy level information of sulfur oxides in smelting flue gas in real time. This information helps to gain a deep understanding of the chemical properties and behaviors of sulfur oxides, and provides an important basis for the optimization of the smelting process. Secondly, through Raman spectroscopy technology, the type and content of sulfur oxides in flue gas can be accurately and quickly detected. This is of great significance for evaluating the environmental performance of the smelting process, controlling pollutant emissions, and ensuring production safety. Through real-time monitoring of the sulfur oxide content in smelting flue gas, enterprises can take timely measures to adjust smelting process parameters, reduce the generation and emission of sulfur oxides, and thus reduce pollution to the environment.

[0121] Embodiment 1:

[0122] In step S3, the Raman peak truncation method is used to reduce the influence of sharp Raman peaks on baseline fitting. It not only inherits the good baseline fitting effect of airPLS in the peakless area, but also solves the problem of baseline fitting elevation caused by Raman peak intensity in airPLS baseline fitting, thereby improving the accuracy of baseline fitting. In the comparative experiment of simulated spectra, Raman peak truncation airPLS showed superior baseline fitting performance in a single downward trend fluorescence background and a complex change trend fluorescence background.

[0123] Embodiment 2:

[0124] In step S4, based on the multiple superposition mapping analysis (SMA) algorithm, the neighborhood points of all sample points in the original sample space are first calculated, and the number K of neighborhood points of each sample point is selected to form a new neighbor space. The K value determines the distribution of the feature reconstruction space. The larger the K value is, the more eigenvalues ​​are selected in the reconstructed feature space, and vice versa.

[0125] From the above steps, we can see that each original sample point is selected by K value, and the neighboring points are calculated to form the neighborhood space, which is reconstructed into a new sample space. At the same time, based on the reconstructed sample space, a reconstruction error function with constraints is constructed, and the real number solution of the error function is calculated (mapping the dimensionality reduction projection surface) to form the dimensionality reduction reconstruction weight matrix W.

[0126] According to the characteristics of the original sample number and application requirements, the final dimension of the dimensionality reduction mapping space is selected (set to d), and the optimal projection of the dimensionality reduction reconstruction matrix W is solved. The final dimensionality reduction mapping space and distribution are regulated by the mapping dimension d, and finally the eigenvectors corresponding to the d eigenvalues ​​are selected as the SMA optimal projection mapping vectors.

[0127] Embodiment 3:

[0128] In S5, the Raman spectrum data set after preprocessing and dimension reduction is divided into a training set and a test set by a cross-validation method, and the training set is used to train the SVR model to determine the parameters of the model to obtain the trained SVR model. The specific steps are as follows:

[0129] S51: For a given sample data {(x i ,y i ),i=1,2,…,n}x i ∈R n ,y i ∈R n , here x i ∈R n is the input value of the i-th sample, y i ∈R n is the output value of the i-th sample, n is the number of training samples, and the regression function is assumed to be:

[0130]

[0131] In the formula is a nonlinear mapping function, ω and b are the parameters to be solved.

[0132] S52: For SVR, there will be a certain error between the sample point and the output value of the prediction model. The insensitivity coefficient g>0 is introduced. When the sample point and the regression model are close enough, the error is controlled within a certain range. At this time, the sample is not counted as a loss. Introduce slack variables The problem to be solved is converted into the following mathematical formula:

[0133]

[0134] ||w|| 2 is the penalty function; C is the penalty factor, and the training error is affected by C; g affects the accuracy of the regression function. Therefore, C and g are important indicators of the evaluation function and are also the two parameters that the WOA algorithm needs to optimize.

[0135] S53: By introducing the Lagrangian factor a i and By constructing the Lagrangian function, the above optimization problem can be transformed into a dual problem:

[0136]

[0137] K(x i ,x j ) is the kernel function.

[0138] S54: Compared with other kernel functions, the radial basis function has small prediction error and high fitting accuracy when dealing with nonlinear problems. Therefore, this paper adopts the radial basis kernel function, and finally obtains the SVM regression estimation model as follows:

[0139]

[0140] Embodiment 4:

[0141] In step S6, the parameters to be optimized are determined according to the quantitative analysis problem of Raman spectrum of flue gas in non-ferrous metal smelting process, i.e., the characteristic Raman information of Raman spectrum of sulfur oxides in flue gas in non-ferrous metal smelting process. The spatial position of each individual in the whale group contains a set of characteristic Raman information. The fitness function is used to measure the quality of the individual spatial position, and the whale foraging strategy is used to continuously update the individual position of the whale until the best whale spatial position is obtained. It can be seen that the optimal solution to the optimization problem is the prey position information.

[0142] S61: In the encirclement phase, the whale position update formula is as follows;

[0143] X(k+1)=X p (k)-AD

[0144] D=|CX P (k)-X(k)

[0145] k is the current iteration number; X P (k) is the position of the whale at the kth iteration and the k+1th iteration; X P (k) is the best current position of the whale. A and C are position movement coefficients.

[0146] S62: Their calculation formula is:

[0147] A=2a·r 1 -a

[0148] C=2·r 2

[0149] Where: X rand (k) are all random numbers, and their value range is [0, 1].

[0150] S63: a is a control parameter, and its value changes with the number of iterations, as follows:

[0151]

[0152] Where: k max is the maximum number of iterations.

[0153] S64: Rotation update stage. In this stage, the whale approaches the prey in a spiral swimming manner and eventually reaches the location of the prey and captures it. The mathematical expression of this stage is:

[0154] X(k+1)=De bl cos(2πl)+X p (k)

[0155] Where b is a constant, which is used to control the spiral shape; l is a random number, and its value range is [0, 1].

[0156] S65: Prey search stage. In order to achieve global search, individual whales use random search to find prey. In order to distinguish it from the encirclement and predation stage, the value range of |A| is used for judgment. If |A|≥1 is satisfied, it means that the individual whale conducts random search while reducing the search area. The advantage of this is that the individual whale can stay away from the current optimal solution, and the algorithm can jump out of the local optimum, improving the optimization accuracy. The mathematical expression of this stage is:

[0157] X(k+1)=Xrand (k)-AD

[0158] D=|CX rand (k)-X(k)|

[0159] Where: X rand (k) is the random position of the whale at the kth iteration. If |A|<1, the whale still chooses local search and updates the position in a spiral manner.

[0160] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

[0161] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

Claims

1. A method for detecting sulfur oxides in flue gas from non-ferrous metal smelting processes based on Raman spectroscopy, characterized in that: The following steps are involved: S1: Experimental acquisition of Raman spectra of sulfur oxides dataset; S2: Divide the collected spectral data set into a training set and a test set in a ratio of 7:3; S3: preprocessing the Raman spectroscopy data; S4: Dimensionality reduction processing of the preprocessed data using multiple overlay mapping analysis algorithm; S5: Constructing the SVR regression prediction model of sulfur oxides in flue gas from non-ferrous metal smelting process using Raman spectroscopy; S6: Optimize the SVR regression model using the whale optimization algorithm; S7: Input the test set spectral data to test the regression model.

2. In S3, the data of the training set and the test set are preprocessed, and the spectrum is denoised by Savitzky-Golay (SG) convolution. Savitzky-Golay (SG) smoothing is a mathematical processing technique used to smooth data while retaining the high-frequency characteristics of the data. The core idea of ​​SG smoothing is to estimate the local trend of the data point by fitting a polynomial in a small window around the data point. Then, the value of the original data point is replaced by the value of this polynomial to achieve a smoothing effect. After denoising is completed, the Raman peak position is identified, the Raman peak area is truncated, and the airPLS algorithm is used for baseline fitting to reduce the rise of the fitting baseline caused by the sudden change in the intensity of the Raman peak area.

3. The method for detecting sulfur oxides in flue gas from non-ferrous metal smelting process based on Raman spectroscopy according to claim 1, characterized in that: In S4, the spectral data is subjected to dimension reduction, and the multiple superposition mapping analysis (SMA) algorithm is used for dimension reduction. The high-dimensional nonlinear sample data is subjected to data dimension reduction and feature extraction, which shows the influence of nonlinear dimension reduction on high-dimensional data, especially the relationship and characteristic influence between feature space and original data mapping, thereby improving the classification and recognition effect of high-dimensional data.

4. The method for detecting sulfur oxides in flue gas from non-ferrous metal smelting process based on Raman spectroscopy according to claim 1, characterized in that: In S5, a quantitative analysis model of sulfur oxide gas based on Raman spectroscopy is constructed, which is characterized by constructing a prediction model. The core idea of ​​SVR is to use kernel techniques to map data to a high-dimensional space, and find an optimal hyperplane in this high-dimensional space so that the data points fall as close to the hyperplane as possible while maintaining the generalization ability of the model. SVR usually has two forms: ε-insensitive loss function and kernel technique. S351: ε-insensitive loss function: SVR introduces the concept of ε-insensitive band, that is, if the error between the predicted value and the true value is within ε, this part of the error will not affect the value of the loss function. This allows the model to tolerate prediction errors to a certain extent, thereby improving the generalization ability of the model. S352: Kernel Techniques: SVR uses kernel functions to handle nonlinear problems. Common kernel functions include linear kernels, polynomial kernels, radial basis function (RBF) kernels, etc. Kernel functions can map raw data to a higher-dimensional feature space and find solutions to linear regression in this space.

5. The method for detecting sulfur oxides in flue gas from non-ferrous metal smelting process based on Raman spectroscopy according to claim 1, characterized in that: In S6, WOA is used to optimize the parameters of the SVR regression prediction model. The algorithm has a simple structure, few parameter settings, fast convergence speed and strong global search capability. According to the quantitative analysis of Raman spectra of flue gas in non-ferrous metal smelting process, the parameters to be optimized are determined, namely the characteristic Raman information of Raman spectra of sulfur oxides in flue gas in non-ferrous metal smelting process. The spatial position of each individual in the whale group contains a set of characteristic Raman information. The fitness function is used to measure the advantages and disadvantages of the individual spatial position, and the whale foraging strategy is used to continuously update the individual position of the whale until the best whale spatial position is obtained. It can be seen that the optimal solution to the optimization problem is the prey position information. Simulating whale hunting behavior, the algorithm simulates the group behavior of whales when searching for prey, including hunting, chasing, surrounding and attacking. S61: Position update: Each whale in the algorithm represents a solution, and the optimal solution is found by updating its position. The position update rule is based on the relative position relationship between the whale and the prey. S62: Social behavior: Whales cooperate with each other during the hunting process, and social behavior is also introduced into the algorithm, that is, whales will influence each other and move closer to the optimal solution together. S63: Cognition and Memory: Whales have cognitive and memory abilities. Each whale in the algorithm has its own optimal position memory, which is continuously updated during the search process. S64: Randomness: WOA introduces randomness in the search process to avoid falling into the local optimal solution.

6. The method for detecting sulfur oxides in flue gas from non-ferrous metal smelting process based on Raman spectroscopy according to claim 1, characterized in that: In S7, various parameters in the model are adjusted; the prediction model after parameter adjustment is used to input the test set spectral data for testing, and the sulfur oxide concentration in the flue gas of the non-ferrous metal smelting process is predicted and analyzed.