Abstract: A method of support vector machine based on particle swarm optimization was proposed for the question of parameter selecting difficult of least square support vector machine in modeling of gas sensor. Least square support vector machine is used to build the model of gas sensor. Particle swarm optimization arithmetic was introduced to optimize the parameters of support vector machine. The sensor model is tested with the data measured reality. The results prove the accuracy of the model.
Introduction
Gas sensors are critical components in environmental protection and industrial safety systems. However, accurately quantifying individual gas concentrations within complex mixtures remains a significant challenge. While Artificial Neural Networks (ANNs) are commonly employed for this task, they often suffer from slow convergence and the tendency to get trapped in local minima. Support Vector Machines (SVMs) provide a more stable alternative based on structural risk minimization, but their performance is highly sensitive to the selection of hyperparameters, such as the penalty factor and kernel parameters. This paper presents a hybrid approach using Least Squares Support Vector Machines (LS-SVM) optimized by Particle Swarm Optimization (PSO) to automate and refine the modeling process for $NO_2$, $SO_2$, and $NO$ detection.
Methodology
Least Squares Support Vector Machine (LS-SVM)
The LS-SVM is an efficient variant of the standard SVM. By employing a squared error loss function and equality constraints instead of inequality constraints, the optimization problem is transformed from a quadratic programming task into a set of linear equations. This significantly reduces computational complexity and speeds up the learning process. To handle the non-linear nature of gas sensor responses, a Radial Basis Function (RBF) kernel is utilized to map input data into a higher-dimensional feature space.
Particle Swarm Optimization (PSO)
The core innovation of this study is the application of PSO to solve the parameter selection problem. PSO is a population-based stochastic optimization technique inspired by the social behavior of bird flocking. In this context, a "swarm" of particles explores the parameter space for the penalty factor ($c$) and the kernel width ($\sigma$). Each particle adjusts its trajectory based on its own historical best position (pbest) and the global best position found by the entire swarm (gbest).
As shown in the flowchart above, the algorithm iteratively updates the velocity and position of each particle to minimize the Mean Square Error (MSE) of the LS-SVM model, eventually converging on the optimal configuration.
Experimental Setup and Datasets
The model was trained and validated using 208 groups of real-world experimental data collected from gas sensors. The study focused on a three-component mixture of Nitrogen Dioxide ($NO_2$), Sulfur Dioxide ($SO_2$), and Nitric Oxide ($NO$). The dataset was partitioned into training sets for model construction and testing sets for performance verification.
Results and Discussion
The PSO-optimized LS-SVM model demonstrated exceptional precision and reliability. By automating the tuning of $c$ and $\sigma$, the system achieved a high degree of fit with the experimental data. The reference errors for all tested gas components were consistently maintained below 1%.
As summarized in the table above, the model exhibited excellent linearity across the measurement ranges. Specifically, the linearity for $NO_2$ reached 0.04%, while $SO_2$ and $NO$ recorded 0.30% and 0.55%, respectively. These results indicate that the PSO algorithm successfully identified optimal parameters that might be overlooked by manual or grid search methods, leading to a highly stable sensor model.
Conclusion
This research demonstrates that combining LS-SVM with PSO provides a robust and accurate framework for gas sensor modeling. The automated parameter selection process eliminates the need for manual "blind searching," resulting in a model with high linearity and low reference error. Future work will focus on assessing the computational overhead for real-time applications and testing the model's scalability with more complex gas mixtures containing additional interfering components.
Summary updated