Ftir concentration inversion method and system based on lstm cascade pso optimized svr
Patent Information
- Application Number
- CN202611393519.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-09
- Publication Date
- 2026-10-13
AI Technical Summary
[0004]本发明所要解决的技术问题在于如何提高复杂混合气体FTIR浓度反演的精度和抗干扰鲁棒性
(1)本发明引入堆叠式LSTM作为前端特征提取器,使其利用门控记忆机制沿波数方向对连续光谱信息进行逐层编码和重构。将原始、混叠严重的光谱空间转换为更加突出浓度相关变化的深层特征空间,使原先隐藏在重叠谱带中的有效信息得到重新组织和强化,从而显著降低后续浓度回归所面对问题的复杂程度。
Smart Images

Figure CN122904740A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of interdisciplinary technology of optical detection and artificial intelligence algorithms, specifically to a method and system for FTIR concentration inversion using LSTM-cascaded PSO-optimized SVR. Background Technology
[0002] In complex environmental monitoring and industrial process control, high-precision quantitative analysis of multi-component gases is of paramount practical significance. Fourier transform infrared spectroscopy (FTIR), with its advantages of non-destructive operation, continuous multi-component measurement, and wide spectral coverage, has been widely applied in industrial emission monitoring and environmental gas sensing, providing solid hardware support for the online sensing of complex gases. However, in actual industrial monitoring scenarios, the accuracy and robustness of FTIR gas quantitative analysis face severe challenges due to the complexity of the measurement environment; in particular, spectral overlap caused by complex components and nonlinear distortion due to high concentrations have become key interference factors restricting the achievement of high-precision inversion. First, complex multi-component gas mixtures are prone to severe spectral overlap. The absorbance of a single wavenumber is usually a mixed contribution of absorption characteristics from multiple gases. This deep feature aliasing leads to an exponential increase in spectral complexity and masks weak absorption features, easily causing severe cross-interference in the qualitative and quantitative analysis of mixed gases. In fact, this cross-interference caused by spectral overlap is not only a challenge in FTIR gas analysis, but also prevalent in optical gas sensing technologies such as photoacoustic spectroscopy (PAS) and tunable diode laser absorption spectroscopy (TDLAS), making it difficult for traditional quantitative analysis models to establish stable and accurate concentration mapping relationships. Secondly, in industrial field detection, to balance the needs of high-concentration gas monitoring and detection sensitivity, FTIR systems typically employ absorption cells with long optical paths. For high-concentration mixed gases, long optical paths can easily cause absorption saturation of the main absorption peak of the target gas, weakening the effective quantitative information in the strong absorption region. Simultaneously, due to the limited spectral resolution of the instrument, the actual acquired absorption lines cannot completely distinguish adjacent absorption features. Under conditions of strong absorption and spectral band overlap, the nonlinear deviation in the logarithmic calculation of absorbance further increases, causing the mapping relationship between spectral response and gas concentration to deviate from the linear relationship described by the classical Beer-Lambert Law. Even more serious is the fact that in real industrial emission scenarios, the concentration levels of different gas components often differ significantly. The strong absorption response of high-concentration components can easily mask the low-concentration components or weak absorption characteristics in overlapping bands, thereby further aggravating the spectral cross-interference between multi-component gases and making the FTIR gas analysis in industrial fields face more complex spectral analysis scenarios.
[0003] To resolve severely overlapping spectra, researchers initially employed linear chemometric methods such as principal component regression (PCR) and partial least squares (PLS). However, recent studies have shown that when faced with spectral nonlinear distortions caused by drastic fluctuations in real gas concentrations, the prediction accuracy of traditional PLS models significantly declines due to their inability to handle high-dimensional nonlinear mappings. Recent research on FTIR quantification of complex gas mixtures further confirms that when faced with highly collinear and deep overlap of characteristic absorption bands, traditional linear regression models struggle to effectively decouple complex mapping relationships due to their inability to handle large concentration differences and nonlinear interference from bottom-level absorption saturation, easily leading to systematic quantification biases. Summary of the Invention
[0004] The technical problem to be solved by this invention is how to improve the accuracy and robustness against interference in FTIR concentration inversion of complex mixed gases.
[0005] The present invention solves the above-mentioned technical problems through the following technical means: This invention provides an FTIR concentration inversion method for SVR optimized by LSTM-cascaded PSO, comprising: selecting target bands containing overlapping absorption features from the FTIR absorbance spectra of multi-component gases; performing standardized preprocessing on the absorbance data of the target bands and dividing them into training and testing sets; training a stacked long short-term memory network (LSTM) using the training set as input and the corresponding gas concentration value as the supervision label; removing the fully connected regression layer of the LSTM network and replacing it with a support vector regression (SVR) model; extracting the deep spectral features and corresponding gas concentrations output by the last LSTM layer at the last time step as training samples and using a particle swarm optimization (PSO) algorithm with the mean square error of 5-fold cross-validation as particle fitness to jointly optimize the hyperparameters of the SVR model; and performing regression mapping on the deep spectral features of the tested FTIR absorbance spectrum based on the optimized SVR model to output the concentration inversion results of the multi-component gases.
[0006] Furthermore, the FTIR concentration inversion method of LSTM-cascaded PSO-optimized SVR also includes comprehensively evaluating the concentration inversion accuracy and anti-interference robustness of the overall model under overlapping absorption spectral conditions by calculating four indicators: root mean square error, coefficient of determination, mean absolute error, and mean absolute percentage error, based on the concentration prediction results of the test set and the corresponding real concentration data.
[0007] Furthermore, the absorbance data of the target band, after standardization preprocessing, is divided into a training set and a test set, including: The raw FTIR absorbance spectra were normalized using the Z-Score method. The processing is as follows:
[0008] in, The spectral data is after standardization and preprocessing. and Let be the mean and standard deviation of absorbance for the corresponding wavenumber feature dimension in the dataset, respectively; the processed dataset is randomly divided into training and testing sets in an 8:2 ratio.
[0009] Furthermore, the stacked LSTM network includes: a dimension of The input layer consists of a stacked 3-layer hidden layer architecture, with 128 neurons in each layer. The number of spectral data points for the selected target band.
[0010] Furthermore, the training of the stacked long short-term memory network LSTM includes: A fully connected layer is added on top of the LSTM, and supervised training is performed using mean squared error as the loss function; the RAdam optimizer is used; the initial learning rate is set to... A ReduceLROnPlateau dynamic learning rate adjustment mechanism is introduced. When the test set does not show a significant decrease within 50 epochs, the learning rate is adjusted accordingly. Automatic rate decay; introduced in the optimizer Weight decay implementation Regularization limits excessive weight growth and sets a gradient clipping threshold. .
[0011] Furthermore, the deep spectral features include: At any moment Given the current spectral features as input And the hidden state of the previous moment. and unit state The LSTM network updates its state through the following operations: Forgotten Gate Used to control the state of the unit in the previous time step. The proportion of historical spectral information retained, input gate Combine candidate states The following formula determines how much new information about the current wavenumber should be written to the main state:
[0012]
[0013]
[0014] in, Indicates the hidden state from the previous time step. Spectral feature input at the current time The joint input vector is formed by concatenating features along their dimensions. , , The weight matrices representing the forget gate, input gate, and candidate unit states are used to perform a linear transformation on the joint input vector. , , These represent the bias vectors corresponding to the states of the forget gate, input gate, and candidate units, respectively, and are used to adjust the activation offset of the corresponding gated units; and These are the Sigmoid and hyperbolic tangent activation functions, respectively. A gating mechanism filters out random noise in the original spectrum and enhances the information of key feature peaks, forming a core memory carrier that runs throughout the entire sequence. As shown in the following formula:
[0015] Output gate Control the final feature representation and generate the hidden state at the current time step. As shown in the following formula:
[0016]
[0017] In the formula, and These are the Sigmoid and hyperbolic tangent activation functions, respectively. It represents the Hadamardi (or Hadama) stack; and The weight matrix and bias term represent the output gate.
[0018] Furthermore, the deep spectral features and corresponding gas concentrations are used as training samples, and a particle swarm optimization algorithm (PSO) with the average root mean square error of 5-fold cross-validation as particle fitness is used to jointly optimize the hyperparameters of the SVR model, including: The core hyperparameter set of the SVR model in a continuous high-dimensional space Adaptive global optimization is performed, and the optimized solution space is defined as three dimensions, where the penalty coefficient is... C The search range is [1, 1000], and the kernel function parameters are... The search range is [1e -4 [1], Insensitive loss parameter The search range is [1e -4 [1], the population consists of The system consists of 3 particles; the position vector of each particle represents a set of candidate SVR hyperparameter combinations; when any parameter exceeds the corresponding search boundary after particle update, boundary correction is performed on the out-of-bounds parameter; in the 1st... In the nth iteration, the 1st The position vector of each particle Let represent a set of candidate hyperparameter solutions, whose flight velocity vector is denoted as . , representing the velocity vector of the particle in the corresponding three-dimensional parameter space; the particle tracks its own historical best position. and the global optimal position of the group To dynamically update speed and position, as shown in the following formula:
[0019]
[0020] In the formula, Inertial weights are used to balance global exploration and local development capabilities; and For learning factors; and The values are random numbers between [0,1]. After algorithm initialization, the deep spectral features of the LSTM output are extracted to evaluate the current parameter solution of each particle, and the average root mean square error of 5 validations is used as the particle fitness. During the iteration process, the optimization algorithm updates the value in real time according to the particle fitness. and A boundary check mechanism is introduced to correct out-of-bounds particles; the optimization terminates when the preset number of iterations is reached, and the globally optimal hyperparameter solution of the SVR model is output. ,in The optimal penalty coefficient is... For the optimal kernel function parameters, This represents the optimal insensitive loss boundary.
[0021] Furthermore, the optimized SVR model is used to perform a regression mapping on the deep spectral characteristics of the FTIR absorbance spectrum under test, and the regression function is as follows:
[0022]
[0023] in, For the first Deep spectral feature vectors obtained by LSTM feature extraction from training samples; x The deep spectral feature vector is obtained by LSTM feature extraction of the sample to be predicted; and For Lagrange multipliers; For bias terms; It is the radial basis function kernel.
[0024] Furthermore, the root mean square error, coefficient of determination, mean absolute error, and mean absolute percentage error are respectively expressed as follows:
[0025]
[0026]
[0027]
[0028] in, The root mean square error, As the coefficient of determination, The mean absolute error, Mean absolute percentage error This represents the actual concentration value. The predicted value of the model. This is the average of the actual concentration values. This represents the number of samples.
[0029] This invention also provides an FTIR concentration inversion system for LSTM-cascaded PSO-optimized SVR, which executes the above-described method during system operation and includes the following modules: The dataset construction module is used to select target bands containing overlapping absorption features from the FTIR absorbance spectra of multi-component gases. After standardization and preprocessing, the absorbance data of the target bands are divided into training and testing sets. The LSTM network training module is used to train the Stacked Long Short-Term Memory (LSTM) network. The prediction model building module is used to remove the fully connected regression layer of the LSTM network and replace it with a support vector regression (SVR) model. The hyperparameter optimization module is used to extract the deep spectral features and corresponding gas concentrations output by the last LSTM network at the last time step as training samples and to jointly optimize the hyperparameters of the SVR model using the particle swarm optimization algorithm (PSO) with the average root mean square error of 5-fold cross-validation as the particle fitness. The output module is used to perform regression mapping on the deep spectral characteristics of the FTIR absorbance spectrum under test based on the optimized SVR model, and output the concentration inversion results of multi-component gases.
[0030] The advantages of this invention are: (1) This invention introduces a stacked LSTM as a front-end feature extractor, which uses a gated memory mechanism to encode and reconstruct continuous spectral information layer by layer along the wavenumber direction. The original, heavily aliased spectral space is transformed into a deeper feature space that highlights concentration-related changes, so that the effective information originally hidden in the overlapping spectral bands is reorganized and enhanced, thereby significantly reducing the complexity of the problem faced by subsequent concentration regression.
[0031] (2) In this invention, the fully connected regression layer of the LSTM network originally used for concentration output is removed, and the final concentration regression is completed by SVR. The two functions of complex spectral characterization learning and small sample robust regression are decoupled, which avoids sacrificing the feature expression ability of LSTM in order to prevent overfitting, and reduces the risk of overfitting of traditional fully connected regression layers with limited samples. The cascade of LSTM and SVR forms a clear functional complementarity relationship, which can simultaneously retain the high expressive power of the front end and the high generalization ability of the back end.
[0032] (3) This invention transforms the selection of SVR parameters from a manual adjustment problem into a multi-parameter joint optimization problem. Furthermore, to prevent PSO from solely pursuing minimum training error and thus exacerbating overfitting, a 5-fold cross-validation average RMSE is used as the particle fitness. This ensures that PSO optimizes not just the simple training fitting ability, but a parameter combination that maintains stable predictive performance under different data partitions. PSO and cross-validation are not repetitions of the first two steps, but rather address the remaining bottleneck of how the regressor adaptively obtains the most suitable parameters, after LSTM has solved how to represent features and SVR has solved how to regress finite samples. The complete model ultimately greatly improves the accuracy and robustness against interference in the FTIR concentration inversion of complex mixed gases. Attached Figure Description
[0033] Figure 1 This is a schematic diagram of the FTIR concentration inversion method for SVR optimized by LSTM cascade PSO according to an embodiment of the present invention. Figure 2 This is a schematic diagram of spectral data acquisition and characteristic band selection in an embodiment of the present invention, wherein (a) is the measured single-beam spectrum and background spectrum of the gas mixture; (b) is the processed full-band FTIR absorption spectrum; and (c) is the spectrum at 2210-2250 cm⁻¹. -1 Within the range, overlapping absorption characteristic bands are selected, with a fixed CO concentration of 5000 ppm and a variable CO2 concentration; (d) is a selected overlapping characteristic band, with a fixed CO2 concentration of 10000 ppm and a variable CO concentration. Figure 3 This is a schematic diagram comparing the prediction accuracy of different LSTM layer configurations in an embodiment of the present invention, wherein (a) is for CO2; (b) is for CO; Figure 4 This is a schematic diagram comparing the prediction residual distributions of the standard SVR model and the LSTM-SVR model in an embodiment of the present invention, wherein (a) is for CO2; and (b) is for CO. Figure 5 This is a schematic diagram comparing the predicted residual distribution of grid search and independent PSO optimization strategies in an embodiment of the present invention, wherein (a) is for CO2; (b) is for CO; Figure 6 This is a schematic diagram of the RMSE verification results of the LSTM-PSO-SVR model in the 5-fold cross-validation of this embodiment of the invention, where (a) is for CO2; (b) is for CO. Figure 7 This is a schematic diagram comparing the concentration prediction accuracy of different evaluation models in embodiments of the present invention, wherein (a) is for CO2; (b) is for CO; Figure 8 This is a schematic diagram comparing the linear fitting and coefficient of determination of different evaluation models in embodiments of the present invention, wherein (a) is for CO2; (b) is for CO; Figure 9 This is a schematic diagram of the residual piecewise linear dynamic tracking of the LSTM-PSO-SVR model in an embodiment of the present invention, wherein (a) is for CO2; (b) is for CO; Figure 10 This is a histogram of the prediction error frequency of the LSTM-PSO-SVR model in an embodiment of the present invention, where (a) is for CO2; and (b) is for CO. Figure 11 This is a schematic diagram comparing the CO2 concentration inversion performance of the LSTM-PSO-SVR model and the traditional FTIR gas analysis method in this embodiment of the invention, wherein (a) is a comparison of prediction errors; and (b) is a comparison of linear fitting. Figure 12 This diagram illustrates the comparison of CO concentration inversion performance between the LSTM-PSO-SVR model and traditional FTIR gas analysis methods in this embodiment of the invention. (a) shows the comparison of prediction errors, and (b) shows the comparison of linear fitting. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0035] Example 1 This embodiment provides an FTIR concentration inversion method using LSTM-cascaded PSO-optimized SVR, proposing an intelligent quantitative analysis hybrid framework model (LSTM-PSO-SVR) that integrates deep temporal feature extraction and global adaptive regression. The core motivation for building this hybrid framework model lies in deeply deconstructing the underlying characteristics of FTIR data and fully leveraging the complementary advantages of different algorithms in dealing with specific physical interferences. Firstly, FTIR spectra are essentially high-dimensional sequence data continuously distributed along wavenumbers. Long Short-Term Memory (LSTM) networks, with their unique gating mechanism, possess natural architectural advantages in extracting the contextual physical dependencies of such strongly serialized signals and filtering local noise. However, industrial gas calibration scenarios generally face the constraint of "small sample size" due to the high cost of obtaining high-precision samples. If pure end-to-end deep networks, such as fully connected layer regression, are directly used for high-concentration nonlinear mapping, severe overfitting and local optima are easily induced, leading to a sharp drop in generalization performance. Therefore, this embodiment uses a Support Vector Regression (SVR) model based on the principle of minimizing structural risk as an alternative after feature extraction. The architecture of deep feature extraction combined with SVR can greatly enhance the model's nonlinear generalization and distortion resistance under small sample conditions. Furthermore, faced with extremely complex deep spectral overlap and cross-coupling interference, the empirical parameter tuning of conventional SVR is prone to failure. Therefore, based on this, the Particle Swarm Optimization (PSO) algorithm is introduced to adaptively optimize the core hyperparameters of the SVR model globally in continuous space. By fusing multiple algorithms to process complex spectra, an efficient collaborative mechanism is established, constructing an integrated analysis framework that combines intelligent spectral decoupling and highly robust quantitative analysis. The specific implementation process of the method is as follows: Figure 1 As shown, it includes the following steps: S1. Select target bands containing overlapping absorption features from the FTIR absorbance spectra of multi-component gases. After standardizing and preprocessing the absorbance data of the target bands, divide them into training and testing sets. Specific implementation methods include: The raw FTIR absorbance spectra were normalized using the Z-Score method. The processing is as follows:
[0036] in, The spectral data is after standardization and preprocessing. and Let be the mean and standard deviation of absorbance for the corresponding wavenumber feature dimension in the dataset, respectively. The processed dataset is randomly divided into training and test sets in an 8:2 ratio. The training set is used for constructing the LSTM feature extractor and for cross-validation optimization of SVR parameters, while the test set is only used for evaluating the generalization ability of the final model to ensure the objectivity of the results.
[0037] S2. There is an implicit nonlinear sequence correlation between absorbance values at different wavenumbers in Fourier Transform Infrared (FTIR) spectral data. Traditional linear dimensionality reduction methods (such as PCA) struggle to capture the complex dynamic changes in overlapping spectral regions. Given the high dimensionality and sequence correlation of FTIR spectral data, this embodiment constructs a stacked LSTM network as a feature extractor, aiming to decouple and extract high-order abstract feature representations with high sensitivity to target gas concentration from high-dimensional spectra and noisy backgrounds. Using the training set as input and the corresponding gas concentration values as supervision labels, the stacked Long Short-Term Memory (LSTM) network is trained. The stacked LSTM network includes: a dimension of... The input layer consists of a stacked 3-layer hidden layer architecture, with 128 neurons in each layer. The number of spectral data points for the selected target band.
[0038] The training of the stacked long short-term memory (LSTM) network includes: A fully connected layer is added on top of the LSTM, and supervised training is performed using mean squared error as the loss function. The RAdam optimizer is employed, utilizing its rectification mechanism to mitigate variance fluctuations in the early stages of training and effectively address the sparse gradient problem commonly found in high-dimensional spectral data. The initial learning rate is set to... A ReduceLROnPlateau dynamic learning rate adjustment mechanism is introduced. When the test set does not show a significant decrease within 50 epochs, the learning rate is adjusted accordingly. Automatic rate decay ensures finer global convergence in the later stages of model training; [this is] introduced in the optimizer. Weight decay implementation Regularization limits excessive weight growth and sets a gradient clipping threshold. This effectively suppresses gradient explosion during backpropagation and improves the stability of model training.
[0039] S3. Support Vector Machine Regression (SVR) is based on the principle of minimizing structural risk and has good generalization ability when dealing with small sample sizes, high dimensions, and nonlinear regression problems. In this embodiment, given the significant nonlinearity of the 128-dimensional depth spectral features extracted by LSTM, SVR is used as the terminal regressor to establish a stable mapping relationship between the feature space and the target gas concentration. The fully connected regression layer of the LSTM network is removed and replaced with a Support Vector Regression (SVR) model; that is, after the network training converges in step S2, the top fully connected regression layer is removed, and the output of the last layer of the LSTM at the last time step is directly extracted and used as the decoupled high-order abstract feature vector, which is then input to the downstream module. During the model construction process, SVR introduces a penalty coefficient. Kernel function parameters and insensitive loss boundary To jointly regulate the model's fitting ability and generalization performance. Among them, Used to balance training error and model complexity The range of nonlinear mapping for controlling the kernel function, and This defines the tolerance range for regression error, thus achieving a balance between accuracy and robustness. To find the optimal regression hyperplane in the high-dimensional feature space, SVR introduces... - Insensitive loss function, constructing a width around the regression function. "pipeline" -tube). For the training sample set (in For depth spectral characteristics, The loss is not calculated as long as the deviation between the predicted and the true values falls within the pipe; the final position of the hyperplane is determined only by the sample points (i.e., support vectors) that fall outside the boundary or pipe.
[0040] Considering the complex nonlinear relationship between spectral characteristics and target component concentrations, SVR implicitly maps the input space to a high-dimensional Hilbert space using a kernel function, and its regression function is as follows:
[0041]
[0042] in, For the first i Deep spectral feature vectors obtained by LSTM feature extraction from training samples; x The deep spectral feature vector is obtained by LSTM feature extraction of the sample to be predicted; and For Lagrange multipliers; For bias terms; It is the radial basis function kernel.
[0043] As can be seen from the above model, the parameters , and There is a significant nonlinear coupling relationship among these three parameters, and their values directly affect the distribution of support vectors and the model's generalization ability. Traditional grid search methods are computationally expensive in continuous parameter spaces and are prone to getting trapped in local optima. Therefore, this paper introduces the particle swarm optimization algorithm (PSO) to jointly optimize the three parameters globally, thereby further improving the model's prediction accuracy and stability in quantitative analysis of mixed gases.
[0044] S4. Extract the deep spectral features and corresponding gas concentrations output by the last LSTM network at the last time step as training samples, and use Particle Swarm Optimization (PSO) algorithm with the mean root mean square error of 5-fold cross-validation as particle fitness to jointly optimize the hyperparameters of the SVR model. In this embodiment, the extracted deep spectral features are fed into the SVR model for nonlinear regression prediction. To avoid the blindness of manual parameter tuning, PSO algorithm combined with 5-fold cross-validation is introduced to optimize the core hyperparameters (C, γ, ...) of the SVR model. Global joint optimization is performed. The average root mean square error of cross-validation is used as the particle fitness to guide the population in dynamically searching for the optimal parameter configuration in the solution space. The aforementioned deep spectral features include: At any moment Given the current spectral features as input And the hidden state of the previous moment. and unit state The LSTM network updates its state through the following operations: Forgotten Gate Used to control the state of the unit in the previous time step. The proportion of historical spectral information retained, input gate Combine candidate states The following formula determines how much new information about the current wavenumber should be written to the main state:
[0045]
[0046]
[0047] in, Indicates the hidden state from the previous time step. Spectral feature input at the current time The joint input vector is formed by concatenating features along their dimensions. , , The weight matrices representing the forget gate, input gate, and candidate unit states are used to perform a linear transformation on the joint input vector. , , These represent the bias vectors corresponding to the states of the forget gate, input gate, and candidate units, respectively, and are used to adjust the activation offset of the corresponding gated units; and These are the Sigmoid and hyperbolic tangent activation functions, respectively. A gating mechanism filters out random noise in the original spectrum and enhances the information of key feature peaks, forming a core memory carrier that runs throughout the entire sequence. As shown in the following formula:
[0048] Output gate Control the final feature representation and generate the hidden state at the current time step. As shown in the following formula:
[0049]
[0050] In the formula, and These are the Sigmoid and hyperbolic tangent activation functions, respectively. It represents the Hadamardi (or Hadama) stack; and The weight matrix and bias term represent the output gate.
[0051] The deep spectral features and corresponding gas concentrations are used as training samples, and a particle swarm optimization algorithm (PSO) with the mean root mean square error of 5-fold cross-validation as particle fitness is used to jointly optimize the hyperparameters of the SVR model, including: The core hyperparameter set of the SVR model in a continuous high-dimensional space Adaptive global optimization is performed, and the optimized solution space is defined as three dimensions, where the penalty coefficient is... C The search range is [1, 1000], and the kernel function parameters are... The search range is [1e -4 [1], Insensitive loss parameter The search range is [1e -4 [1], the population consists of The system consists of 3 particles; the position vector of each particle represents a set of candidate SVR hyperparameter combinations; when any parameter exceeds the corresponding search boundary after particle update, boundary correction is performed on the out-of-bounds parameter; in the 1st... In the nth iteration, the 1st The position vector of each particle Let represent a set of candidate hyperparameter solutions, whose flight velocity vector is denoted as . , representing the velocity vector of the particle in the corresponding three-dimensional parameter space; the particle tracks its own historical best position. and the global optimal position of the group To dynamically update speed and position, as shown in the following formula:
[0052]
[0053] In the formula, Inertial weights are used to balance global exploration and local development capabilities; and For learning factors; and The values are random numbers between [0,1]. After algorithm initialization, the deep spectral features of the LSTM output are extracted to evaluate the current parameter solution of each particle, and the average root mean square error of 5 validations is used as the particle fitness. During the iteration process, the optimization algorithm updates the value in real time according to the particle fitness. and A boundary check mechanism is introduced to correct out-of-bounds particles; optimization terminates when a preset number of iterations is reached; in this embodiment, the optimization termination parameter is determined based on the changing trend of the average RMSE of cross-validation under different iteration numbers, with a preset number of iterations of 15. The globally optimal hyperparameter solution of the SVR model is output. ,in The optimal penalty coefficient is... For the optimal kernel function parameters, This represents the optimal insensitive loss boundary.
[0054] S5. Based on the optimized SVR model, the deep spectral characteristics of the FTIR absorbance spectrum to be measured are regressed and mapped to output the concentration inversion results of the multi-component gas.
[0055] The FTIR concentration inversion method for SVR optimized by LSTM cascade PSO also includes: S6. Based on the concentration prediction results of the test set and the corresponding actual concentration data, the overall model's concentration inversion accuracy and robustness against interference under overlapping absorption spectroscopy conditions are comprehensively evaluated by calculating four indicators: root mean square error, coefficient of determination, mean absolute error, and mean absolute percentage error. The root mean square error, coefficient of determination, mean absolute error, and mean absolute percentage error are respectively expressed as follows:
[0056]
[0057]
[0058]
[0059] in, The root mean square error, As the coefficient of determination, The mean absolute error, Mean absolute percentage error This represents the actual concentration value. The predicted value of the model. This is the average of the actual concentration values. This represents the number of samples.
[0060] To verify the effectiveness of the proposed LSTM-PSO-SVR framework in mitigating FTIR spectral overlap and nonlinear effects, this embodiment selects a typical CO (500-10000 ppm) and CO2 (5000-27500 ppm) mixture, highly representative of actual industrial emissions, as a typical verification object. Given that the main absorption peak of high-concentration CO2 is prone to falling into the physical saturation "dead zone" and losing quantification information, this embodiment adopts a precise avoidance strategy, focusing model verification on the 2210-2250 cm⁻¹ range. - ¹Feature Bands. To address the deep feature aliasing and cross-distortion induced by high concentrations in adjacent bands, this framework first constructs a three-layer Long Short-Term Memory (LSTM) network, utilizing its sequence extraction capabilities to map high-dimensional spectra to a 128-dimensional deep feature space to decouple overlapping interference. Second, conventional fully connected layers are discarded, and Support Vector Regression (SVR) is used to accurately correct nonlinear effects. Simultaneously, the Proof-of-Stake (PSO) algorithm combined with 5-fold nested cross-validation is introduced to achieve globally adaptive joint optimization of SVR hyperparameters. Finally, the high-precision inversion capability of the proposed framework is comprehensively evaluated based on 200 sets of measured wide-range mixed samples.
[0061] To obtain high-quality samples for training and evaluating the LSTM-PSO-SVR hybrid model, a customized extractive FTIR experimental system was built. This platform was designed to provide a controlled mixed-gas testing environment to verify the quantitative analysis accuracy and generalization ability of the algorithm model when dealing with severe spectral overlap interference.
[0062] The core components of the FTIR system include a silicon carbide infrared light source and a dual-axis scanning interferometer. The coherent beam modulated by the interferometer is collimated and then incident on a long-path multi-pass gas absorption cell. This cell features a corrosion-resistant inner wall and an effective optical path of 5.3 m, significantly increasing the probability of collisions between infrared radiation and target gas molecules, thereby improving detection sensitivity at extremely low concentrations. To effectively prevent potential water vapor condensation interference and maintain the stability of gas molecules, the entire absorption cell is completely enclosed in a temperature-controlled jacket, and the temperature is strictly locked at 180°C during the experiment (with a control accuracy of ±2°C). Before each formal experiment, the system is deeply purged with high-purity nitrogen (N2) for at least 10 minutes to remove residual gas, and the current background spectrum is recorded.
[0063] Using a high-precision dynamic gas dilution instrument (such as the FD-HQ04 manufactured by Suzhou Fuyou Experimental Equipment Co., Ltd.), pure CO and CO2 standard gases are precisely mixed according to the concentration gradient designed in the experiment, and continuously injected into the high-temperature gas chamber at a constant flow rate. The instrument can only execute the spectral acquisition command after the concentration of the mixed gas inside the chamber reaches a dynamic equilibrium state.
[0064] To ensure the high numerical stability and signal-to-noise ratio of the spectral matrix input to the algorithm, the spectral sampling parameters were standardized and fixed: the spectral scanning range covered 1000 to 4000 cm⁻¹. -1 The wideband frequency band is used to fully encompass the target fingerprint area, with a spectral resolution set at 0.5 cm⁻¹. -1 To address the common random high-frequency noise in industrial sensors, a time-domain averaging strategy was adopted, whereby the final spectrum of each sample group was generated by averaging four consecutive single scans. This rigorous experimental and spectral acquisition standard provides highly reliable data support for subsequent deep feature extraction and regression model validation.
[0065] This experiment dynamically prepared a wide-range CO and CO2 mixed gas sample set. The concentration range of carbon monoxide was set from 500 to 10000 ppm (concentration gradient interval of 500 ppm, for a total of 20 concentration levels), and the concentration range of carbon dioxide was set from 5000 to 27500 ppm (concentration gradient interval of 2500 ppm, for a total of 10 concentration levels). Through orthogonal combination, a total of 200 groups (20 × 10) of mixed gas with gridded gradient concentration distributions were generated. To reduce random errors in the experimental measurement process and improve the robustness of the deep learning model, three independent spectra were continuously collected for each specific concentration of mixed gas, constructing a complete dataset containing 600 spectral samples. To ensure the objectivity of model evaluation and rigorous generalization ability, the entire sample set was randomly stratified at a ratio of 4:1, and finally divided into a training set containing 480 samples (corresponding to 160 concentration combinations) and an independent test set containing 120 samples (corresponding to 40 concentration combinations).
[0066] The raw output of the FTIR measurement system is an interferogram, which is then Fourier transformed to obtain a single-beam spectrum. For example... Figure 2 As shown in (a), the black curve represents the reference single-beam spectrum against a high-purity nitrogen background, and the red curve represents the sample single-beam spectrum after being filled with the mixed gas. According to the Beer-Lambert law, by taking the negative logarithm of the ratio between the sample spectrum and the background spectrum, it can be converted into a full-band absorbance spectrum, as shown below. Figure 2 As shown in (b).
[0067] The selection of characteristic bands is crucial for high-precision quantitative analysis of mixed gases. From the full-band spectrum, it can be seen that CO2 has a main absorption peak at high concentrations (approximately 2300–2400 cm⁻¹). -The ¹ interval has undergone complete physical saturation, with transmitted light intensity approaching zero, resulting in severe loss of concentration information within this frequency band and making it highly susceptible to instrument electrical noise. To ensure the effectiveness of quantification, this embodiment deliberately avoids this saturation dead zone. Furthermore, if only isolated, interference-free absorption bands in the spectrum are selected for modeling, the core advantages of deep learning algorithms in decoupling complex collinear features cannot be fully verified. Therefore, a precise avoidance and anchoring strategy was adopted, accurately locking the 2210–2250 cm⁻¹ range. - ¹This characteristic range. Given the spectrometer's 0.5cm... - ¹ With a physical resolution of , the target band contains 83 discrete wavenumber points, which constitute the high-dimensional feature vector of the model input in this study.
[0068] like Figure 2 (c) and Figure 2 As shown in (d), the local characteristic absorption spectra reveal that the highest absorbance remains within the effective linear response range below 0.6 in the target band. However, regardless of whether the CO concentration is fixed and the CO2 concentration is changed, or vice versa, the molecular collision broadening induced by high-concentration gases alters the constancy of the absorption coefficient, leading to significant cross-over of the absorption bands of the two gases at this point. Furthermore, the measurement of the average transmitted light intensity due to the instrument's limited resolution inevitably introduces nonlinear errors in calculations during logarithmic transformation. The nonlinear superposition interference caused by the combined effects of the above physical and instrumental factors results in a highly nonlinear mapping relationship between absorbance at a single wavenumber and gas concentration, causing the actual spectral features to no longer strictly follow the ideal linear superposition assumed by the classical Beer-Lambert law. This nonlinear coupling characteristic constitutes the main physical bottleneck for the inversion accuracy of traditional linear calibration models, but it also constructs a highly challenging multi-component interference scenario, further validating the necessity and practical application value of introducing an LSTM deep nonlinear mapping architecture for feature decoupling in this embodiment.
[0069] To construct the optimal hybrid prediction architecture, focusing on the 2210–2250 cm⁻¹ range where cross-interference is severe. - Using band ¹ (83 discrete feature points) as input, the impact of the number of hidden layers (L=1~4) in LSTM on feature extraction and final regression performance was investigated. The experiments simultaneously evaluated the dual index responses of root mean square error (RMSE) and mean absolute percentage error (MAPE).
[0070] like Figure 3As shown, compared to the rigid fluctuations of the end-to-end LSTM model in the high-error range, the LSTM-SVR hybrid model exhibits a significant nonlinear optimization trend regarding network depth. When using a single-layer network (L=1), the shallow receptive field is insufficient to decouple the deep overlap of high-dimensional spectra, leading to underfitting of the model (CO2 RMSE is 218.51ppm, MAPE is 0.9%; CO RMSE is 64.44ppm, MAPE is 1.07%). As the depth is expanded to L=2 and L=3, the model performance achieves a step improvement, indicating that the deep architecture provides the necessary parameter space for capturing the implicit cross-coupling of multi-component gases.
[0071] Especially at L=3, the model error reaches its global optimum: the RMSE of CO2 and CO bottoms out at 46.45ppm and 28.88ppm respectively, a significant decrease of 78.7% and 55.2% compared to the single-layer structure; at the same time, their MAPE also converges to extremely low levels of 0.33% and 0.89% respectively. This proves that the 3-layer stacked structure can most effectively complete the hierarchical abstraction from the bottom peak shape to high-order semantic features. However, when the network is excessively deepened to L=4, the RMSE shows a slight error rebound (CO2 rises to 49.62ppm, CO rises to 31.17ppm), indicating that the redundant depth introduces unnecessary feature noise, interfering with the construction of the hyperplane in the downstream SVR. Considering both feature representation capacity and generalization ability, this embodiment preferably uses a fixed 3-layer LSTM as the front-end feature extractor.
[0072] To rigorously demonstrate the gain effect of deep feature extraction on quantitative analysis, a controlled variable comparison experiment was designed: a single SVR model directly inputting 83-dimensional raw spectra was compared with an LSTM-SVR hybrid model inputting 128-dimensional deep features. To eliminate the interference of the regressor's own parameters, both were configured with the same RBF kernel function.
[0073] like Figure 4 As shown, the prediction residual distributions of the two models on independent test sets are illustrated. It can be observed that the residuals of the single SVR model exhibit wide divergence and oscillations in high gas concentration and deep overlap regions, significantly deviating from the zero line (y=0). Quantitative data further confirm its limitations; the predicted RMSEs of the single SVR for CO2 and CO are as high as 278.99 ppm and 97.49 ppm, respectively. This indicates that, faced with local saturation and severe band collinearity interference caused by high concentrations, simply relying on the shallow kernel mapping of traditional SVR is insufficient to effectively reproduce the nonlinear concentration distribution.
[0074] In contrast, thanks to the intervention of the pre-processed LSTM feature extractor, the prediction residuals of the hybrid model exhibit extremely high convergence, closely hovering near the zero axis. The RMSEs for CO2 and CO significantly decreased to 46.45 ppm and 28.88 ppm, respectively, with relative error reductions of 83.3% and 70.4%. The mechanism behind this performance improvement lies in the fact that the LSTM treats the original spectrum as a dynamic time series with context-dependent characteristics (such as absorption peak broadening and sideband sequences). Through its internal gating mechanism, the LSTM successfully projects the originally severely aliased and inseparable spectral signals in the 83-dimensional low-dimensional space nonlinearly into a 128-dimensional high-order manifold space. Within this reconstructed high-dimensional space, the features of the multi-component gases achieve physical decoupling and linear separability, effectively reducing the fitting difficulty of the downstream SVR regressor and laying a high-quality data foundation for subsequent PSO algorithm-based precise parameter optimization.
[0075] To quantify the independent contribution of the Particle Swarm Optimization (PSO) algorithm in hyperparameter space optimization, under the premise of uniformly using 83-dimensional original spectra as input, the baseline SVR model based on traditional grid search and the SVR model optimized by PSO were compared.
[0076] like Figure 5 As shown, the prediction residual distributions of the two parameter optimization strategies on independent test sets are illustrated. It can be observed that the baseline SVR model using conventional parameter search (purple scatter points) exhibits severe residual oscillations in local high-concentration ranges (e.g., CO2 at 20,000–25,000 ppm), indicating that due to improper hyperparameter configuration, the model is highly susceptible to local underfitting or excessive sensitivity to environmental noise. In contrast, after joint optimization using independent PSO algorithms (green scatter points), the residual fluctuation amplitude of the model is narrowed across the entire range, and extreme outlier prediction errors are more effectively controlled.
[0077] Quantitative statistics further highlight the necessity of adaptive optimization: the PSO algorithm reduced the SVR's prediction RMSE for CO2 from 278.99 ppm to 211.11 ppm (error reduction of 24.33%), and the RMSE for CO from 97.48 ppm to 75.52 ppm (error reduction of 22.53%). This significant performance gain is attributable to the underlying mathematical logic of the SVR's penalty coefficient. nuclear parameters With insensitive boundaries Complex nonlinear couplings exist between these components, resulting in a highly nonconvex loss landscape. Traditional grid search is prone to getting trapped in local minima; however, PSO, leveraging the cognitive and social interaction mechanisms among particle swarms, can more effectively escape local traps and approach the global optimum in a high-dimensional continuous parameter space. By introducing an independent PSO optimization module, the model achieves a better balance between "fitting accuracy" and "generalization ability" (minimizing structural risk), thereby effectively improving the quantitative analysis performance of the SVR regressor.
[0078] To comprehensively evaluate the effectiveness of the proposed architecture, this embodiment also constructs six modeling strategies (MLP, SVR, LSTM, PSO-SVR, LSTM-SVR, LSTM-PSO-SVR) from shallow to deep and from single to hybrid approaches for ablation and cross-sectional comparison. The evaluation dimensions cover the model's training robustness, prediction accuracy, linear mapping capability, and residual statistical properties, specifically including: (1) Cross-validation and training robustness analysis: To eliminate the randomness brought about by a single data partition and to verify the stability of the model, such as Figure 6 As shown, the root mean square error (RMSE) of the LSTM-PSO-SVR model on the test set under 5-fold cross-validation is illustrated. In the prediction tasks for CO2 and CO, the model's error remained stable at each validation fold (RMSE fluctuations for CO2 ranged from 2.81 to 5.36 ppm, and for CO from 6.49 to 24.60 ppm), without significant performance oscillations. This cross-fold consistency indicates that the end-to-end architecture possesses good data adaptability and training robustness, effectively avoiding the risk of overfitting to specific subsets of samples.
[0079] (2) Prediction accuracy and synergistic effect analysis: The overall performance of each model on the independent test set is as follows: Figure 7The comprehensive comparison bar charts provided fully illustrate the performance. The data shows that the LSTM-PSO-SVR model achieves optimal performance across all evaluation metrics. Taking CO2 prediction as an example, the model provided in this embodiment reduces the RMSE to 20.25 ppm; compared to the baseline SVR model (RMSE = 279.00 ppm), the error reduction is as high as 92.74%. Even compared to the second-best performing LSTM-SVR hybrid model, its error is further reduced by 56.41%. For CO prediction, the model also demonstrates consistent superiority, reducing the RMSE to 19.65 ppm, an error reduction of 79.84% compared to the baseline SVR model. This significant performance improvement confirms the deep synergistic effect of the three core modules: LSTM is responsible for decoupling the severely aliased spectral signal into highly recognizable features; SVR is responsible for constructing a robust nonlinear mapping in high-dimensional space; and the independent PSO module accurately calibrates the hyperplane boundary, effectively overcoming the systematic bias caused by empirical parameter tuning.
[0080] (3) Linear mapping capability and goodness-of-fit analysis: This addresses nonlinear distortions caused by spectral overlap, such as... Figure 8 As shown, scatter plots and coefficients of determination for linear fitting of predicted and actual concentrations from various models are presented. It can be observed that the scatter distribution of traditional shallow layer models (MLP, SVR) exhibits a certain degree of divergence, making it difficult to fully capture the complex variations caused by component overlap and local saturation. Their R² values are... 2 The values are all below 0.999 (e.g., the R value of a single SVR for CO2). 2 (Only 0.9983). In contrast, the LSTM-PSO-SVR model has highly convergent scatter points that closely fit the ideal diagonal of y=x, and its R² for CO2 and CO is much higher. 2 The scores reached 0.99999 and 0.99995 respectively, demonstrating extremely high linear fit and unbiased predictive ability.
[0081] (4) Error dynamic tracking and residual statistical characteristics analysis: The deep feature analysis capability of the model can be further verified through the distribution characteristics of the residuals. For example, Figure 9 The residual line dynamic tracking plot shown reveals that the residuals of single models (such as MLP and SVR) exhibit significant amplitude and fluctuation, indicating that some nonlinear features in the spectrum remain unextracted. In contrast, the residual trajectory of the LSTM-PSO-SVR model closely follows the zero axis, with significantly reduced fluctuation amplitude. Furthermore, based on the prediction results of 120 independent test set samples, such as... Figure 10The frequency histogram of prediction errors revealed by the model shows its underlying statistical regularity: the error distribution of the proposed model exhibits a highly concentrated, near-zero-mean Gaussian distribution. This homoscedasticity characteristic, resembling white noise, indicates that the hybrid model has fully extracted the deterministic component information and nonlinear interference characteristics from the spectral matrix, and its small residual errors have been reduced to systematic errors mainly dominated by the underlying physical random noise of the FTIR measurement system. In summary, the LSTM-PSO-SVR model achieves a high degree of balance between quantitative prediction accuracy and model robustness when dealing with severe spectral overlap interference.
[0082] Finally, this embodiment also provides a comparison of the technical effects of traditional FTIR gas analysis methods and the LSTM-PSO-SVR model analysis methods provided in this embodiment, based on experimental data.
[0083] In CO2 concentration retrieval, the LSTM-PSO-SVR model provided in this embodiment shows a significant accuracy advantage compared to traditional principal component regression PCR and partial least squares (PLS) methods. Figure 11 As shown, the RMSE, MAE, MAPE, and R² obtained by LSTM-PSO-SVR were 20.25 ppm, 7.01 ppm, 0.03%, and 0.99999, respectively, while the corresponding indices for principal component regression PCR were 249.02 ppm, 196.45 ppm, 1.30%, and 0.9986, and for partial least squares (PLS) PCR were 254.27 ppm, 201.41 ppm, 1.31%, and 0.9986. Compared with the principal component regression PCR results, the RMSE, MAE, and MAPE obtained by LSTM-PSO-SVR decreased by approximately 91.87%, 96.43%, and 97.69%, respectively; compared with the PLS results, they decreased by approximately 92.04%, 96.52%, and 97.71%, respectively. Simultaneously, the R² increased from 0.9986 in the traditional method to 0.99999, indicating a higher consistency between the predicted and actual concentrations. Based on the above results, under conditions of severe spectral overlap and accompanying nonlinear interference, traditional linear chemometric methods such as principal component regression PCR and partial least squares (PLS) can establish a certain relationship between target gas concentration and spectral response. However, their characterization ability is still significantly limited for the complex nonlinear coupling and overlapping information between multi-component absorption features. In contrast, the method proposed in this embodiment uses LSTM to reconstruct deep features of the continuous spectrum and then uses PSO-optimized SVR to establish a nonlinear concentration mapping. This allows for more complete extraction and utilization of concentration-related information masked by cross-interference in the original spectrum, thereby significantly reducing the absolute and relative errors in CO2 concentration inversion.
[0084] For CO concentration retrieval, this technical solution also shows a significant and consistent performance improvement compared to traditional methods. For example... Figure 12 As shown, the RMSE, MAE, MAPE, and R² obtained by LSTM-PSO-SVR were 19.65 ppm, 7.37 ppm, 0.18%, and 0.99995, respectively, while the corresponding indices of principal component regression PCR were 194.83 ppm, 154.67 ppm, 4.81%, and 0.9954, and the corresponding indices of PLS were 173.84 ppm, 141.49 ppm, 5.11%, and 0.9963, respectively. Compared with principal component regression PCR, the RMSE, MAE, and MAPE obtained by LSTM-PSO-SVR decreased by approximately 89.91%, 95.24%, and 96.26%, respectively; compared with partial least squares PLS, they decreased by approximately 88.70%, 94.79%, and 96.48%, respectively, while the R² increased from 0.9954 and 0.9963 to 0.99995, respectively. This demonstrates that the improvement of the proposed method in this embodiment is not limited to a single evaluation index, but outperforms principal component regression PCR and partial least squares (PLS) in multiple aspects, including overall prediction error, mean absolute error, relative error, and fitting consistency. Especially for CO spectra affected by cross-interference in CO2 absorption characteristics, it can still control the RMSE within 20 ppm, indicating its ability to more effectively resolve target gas concentration information in severely overlapping spectra. Combining the technical path proposed in this embodiment—LSTM for extracting deep concentration-related features, SVR for establishing robust nonlinear regression relationships, and PSO for adaptive joint optimization of key SVR parameters—it can be concluded that the performance improvement stems from the synergistic effect between various functional modules, rather than a simple improvement in a single algorithm. This demonstrates the technical effectiveness and application value of this combined technical solution in the quantitative analysis of complex FTIR multi-component gases.
[0085] Example 2 It should be further explained that, based on the same inventive concept, this embodiment provides an FTIR concentration inversion system for LSTM cascaded PSO optimized SVR. The system executes the method described in Embodiment 1 during operation, including the following modules: The dataset construction module is used to select target bands containing overlapping absorption features from the FTIR absorbance spectra of multi-component gases. After standardization and preprocessing, the absorbance data of the target bands are divided into training and testing sets. The LSTM network training module is used to train the Stacked Long Short-Term Memory (LSTM) network. The prediction model building module is used to remove the fully connected regression layer of the LSTM network and replace it with a support vector regression (SVR) model. The hyperparameter optimization module is used to extract the deep spectral features and corresponding gas concentrations output by the last LSTM network at the last time step as training samples and to jointly optimize the hyperparameters of the SVR model using the particle swarm optimization algorithm (PSO) with the average root mean square error of 5-fold cross-validation as the particle fitness. The output module is used to perform regression mapping on the deep spectral characteristics of the FTIR absorbance spectrum under test based on the optimized SVR model, and output the concentration inversion results of multi-component gases.
[0086] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An FTIR concentration inversion method for SVR optimized by LSTM cascade PSO, characterized in that, Target bands with overlapping absorption features are selected from the FTIR absorbance spectra of multi-component gases. The absorbance data of the target bands are standardized and preprocessed, and then divided into training and testing sets. Using the training set as input and the corresponding gas concentration value as the supervision label, a stacked long short-term memory network (LSTM) is trained. The fully connected regression layer of the LSTM network is removed and replaced with a support vector regression (SVR) model. The deep spectral features and corresponding gas concentrations output by the last time step of the last LSTM layer are extracted as training samples, and the hyperparameters of the SVR model are jointly optimized using a particle swarm optimization algorithm (PSO) with the mean square error of 5-fold cross-validation as the particle fitness. Based on the optimized SVR model, the deep spectral features of the tested FTIR absorbance spectrum are regressed and mapped to output the concentration inversion results of the multi-component gases.
2. The FTIR concentration inversion method for SVR optimized by LSTM cascaded PSO according to claim 1, characterized in that, The method also includes comprehensively evaluating the concentration inversion accuracy and anti-interference robustness of the overall model under overlapping absorption spectroscopy conditions by calculating four indicators: root mean square error, coefficient of determination, mean absolute error, and mean absolute percentage error, based on the concentration prediction results of the test set and the corresponding real concentration data.
3. The FTIR concentration inversion method for SVR optimized by LSTM cascaded PSO according to claim 1, characterized in that, The absorbance data of the target band, after standardization and preprocessing, is divided into a training set and a test set, including: The raw FTIR absorbance spectra were normalized using the Z-Score method. The processing is as follows: in, The spectral data is after standardization and preprocessing. and Let be the mean and standard deviation of absorbance for the corresponding wavenumber feature dimension in the dataset, respectively; the processed dataset is randomly divided into training and testing sets in an 8:2 ratio.
4. The FTIR concentration inversion method for SVR optimized by LSTM cascaded PSO according to claim 1, characterized in that, The stacked long short-term memory (LSTM) network includes: a dimension of The input layer consists of a stacked 3-layer hidden layer architecture, with 128 neurons in each layer. The number of spectral data points for the selected target band.
5. The FTIR concentration inversion method for SVR optimized by LSTM cascaded PSO according to claim 1, characterized in that, The training of the stacked long short-term memory (LSTM) network includes: A fully connected layer is added on top of the LSTM, and supervised training is performed using mean squared error as the loss function; the RAdam optimizer is used; the initial learning rate is set to... A ReduceLROnPlateau dynamic learning rate adjustment mechanism is introduced. When the test set does not show a significant decrease within 50 epochs, the learning rate is adjusted accordingly. Automatic rate decay; introduced in the optimizer Weight decay implementation Regularization is applied, and the gradient clipping threshold is set to... .
6. The FTIR concentration inversion method for SVR optimized by LSTM cascaded PSO according to claim 1, characterized in that, The aforementioned deep spectral features include: At any moment Given the current spectral features as input And the hidden state of the previous moment. and unit state The LSTM network updates its state through the following operations: Forgotten Gate Used to control the state of the unit in the previous time step. The proportion of historical spectral information retained, input gate Combine candidate states The following formula determines how much new information about the current wavenumber should be written to the main state: in, Indicates the hidden state from the previous time step. Spectral feature input at the current time The joint input vector is formed by concatenating features along their dimensions. , , The weight matrices representing the forget gate, input gate, and candidate unit states are used to perform a linear transformation on the joint input vector. , , These represent the bias vectors corresponding to the states of the forget gate, input gate, and candidate units, respectively, and are used to adjust the activation offset of the corresponding gated units; and These are the Sigmoid and hyperbolic tangent activation functions, respectively; random noise in the original spectrum is filtered out through a gating mechanism, and the information of key feature peaks is enhanced, forming a core memory carrier that runs through the entire sequence. As shown in the following formula: Output gate Control the final feature representation and generate the hidden state at the current time step. As shown in the following formula: In the formula, and These are the Sigmoid and hyperbolic tangent activation functions, respectively. It represents the Hadamardi (or Hadama) stack; and The weight matrix and bias term represent the output gate.
7. The FTIR concentration inversion method for SVR optimized by LSTM cascaded PSO according to claim 1, characterized in that, The deep spectral features and corresponding gas concentrations are used as training samples, and a particle swarm optimization algorithm (PSO) with the mean root mean square error of 5-fold cross-validation as particle fitness is used to jointly optimize the hyperparameters of the SVR model, including: The core hyperparameter set of the SVR model in a continuous high-dimensional space Adaptive global optimization is performed, and the optimized solution space is defined as three dimensions, where the penalty coefficient is... C The search range is [1, 1000], and the kernel function parameters are... The search range is [1e -4 [1], Insensitive loss parameter The search range is [1e -4 [1], the population consists of The system consists of 3 particles; the position vector of each particle represents a set of candidate SVR hyperparameter combinations; when any parameter exceeds the corresponding search boundary after particle update, boundary correction is performed on the out-of-bounds parameter; in the 1st... In the nth iteration, the 1st The position vector of each particle Let represent a set of candidate hyperparameter solutions, whose flight velocity vector is denoted as . , representing the velocity vector of the particle in the corresponding three-dimensional parameter space; the particle tracks its own historical best position. and the global optimal position of the group To dynamically update speed and position, as shown in the following formula: In the formula, Inertial weights are used to balance global exploration and local development capabilities; and For learning factors; and The values are random numbers between [0,1]. After algorithm initialization, the deep spectral features of the LSTM output are extracted to evaluate the current parameter solution of each particle, and the average root mean square error of 5-fold cross-validation is used as the particle fitness. During the iteration process, the optimization algorithm updates the particle fitness in real time. and A boundary check mechanism is introduced to correct out-of-bounds particles; the optimization terminates when the preset number of iterations is reached, and the globally optimal hyperparameter solution of the SVR model is output. ,in The optimal penalty coefficient is... For the optimal kernel function parameters, This represents the optimal insensitive loss boundary.
8. The FTIR concentration inversion method for SVR optimized by LSTM cascaded PSO according to claim 1, characterized in that, The optimized SVR model is used to perform a regression mapping on the deep spectral characteristics of the FTIR absorbance spectrum under test. The regression function is as follows: in, For the first Deep spectral feature vectors obtained by LSTM feature extraction from training samples; x The deep spectral feature vector is obtained by LSTM feature extraction of the sample to be predicted; and For Lagrange multipliers; For bias terms; It is the radial basis function kernel.
9. The FTIR concentration inversion method for SVR optimized by LSTM cascaded PSO according to claim 2, characterized in that, The root mean square error, coefficient of determination, mean absolute error, and mean absolute percentage error are respectively expressed as follows: in, The root mean square error, As the coefficient of determination, The mean absolute error, The mean absolute percentage error, This represents the actual concentration value. The predicted value of the model. This is the average of the actual concentration values. This represents the number of samples.
10. An FTIR concentration inversion system for SVR optimized by LSTM cascaded PSO, characterized in that, Includes the following modules: The dataset construction module is used to select target bands containing overlapping absorption features from the FTIR absorbance spectra of multi-component gases. After standardization and preprocessing, the absorbance data of the target bands are divided into training and testing sets. The LSTM network training module is used to train the Stacked Long Short-Term Memory (LSTM) network. The prediction model building module is used to remove the fully connected regression layer of the LSTM network and replace it with a support vector regression (SVR) model. The hyperparameter optimization module is used to extract the deep spectral features and corresponding gas concentrations output by the last LSTM network at the last time step as training samples and to jointly optimize the hyperparameters of the SVR model using the particle swarm optimization algorithm (PSO) with the average root mean square error of 5-fold cross-validation as the particle fitness. The output module is used to perform regression mapping on the deep spectral characteristics of the FTIR absorbance spectrum under test based on the optimized SVR model, and output the concentration inversion results of multi-component gases.