Smell classification electronic nose system design based on pattern recognition algorithm
Through the odor classification electronic nose system of multi-sensor array and pattern recognition algorithm, the problem of poor generalization of complex odors is solved, and high-precision odor recognition is achieved.
Patent Information
- Application Number
- CN202510357706.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-08-15
AI Technical Summary
Existing gas sensors have poor generalization of complex odors and have low classification accuracy, so they cannot effectively identify multiple gases.
An odor classification electronic nose system using multi-sensor array and pattern recognition algorithm, including the Raspberry Pi 4B main control module, BME680 sensor array module and adjustable speed gas circuit module, is used to establish a classifier model through data augmentation, dimensionality reduction and a variety of machine learning algorithms.
It has achieved high-precision classification of various odors, with an accuracy rate of 81.7%, and improved the generalization ability of gas recognition.
Smart Images

Figure CN120490228A_ABST
Abstract
Description
Technical field:
[0001] The present invention belongs to the field of gas detection and pattern recognition, and specifically provides an odor classification electronic nose system based on a multi-sensor array. Background technology:
[0002] As national requirements for environmental monitoring, food safety, high-end aerospace and automotive manufacturing, chemical production, civilian healthcare, and consumer electronics continue to rise, machine olfaction, a widely used gas detection technology, is crucial for further breakthroughs and development. The electronic nose system, a leading example of machine olfaction technology, consists of two components: a gas sensor array that interacts with gases to collect sensor data, and a machine learning method that processes and trains this data to build a classifier model.
[0003] Existing commercial gas sensors often only have a broad spectrum of responses to a specific type of gas, such as ethanol and ethylene, and are unable to achieve a generalized response to gases. Therefore, it is unlikely to achieve this at the level of gas-sensitive materials and microsystem design of traditional gas sensors. However, if an array composed of multiple sensors is used to extract information from the multiple non-specific responses of multiple sensors to a single gas, and combined with signal processing technology to create a gas dataset with corresponding labels for the current array, it may be possible to classify a specific generalized gas.
[0004] Machine learning, the processing "brain" of the electronic nose system, is rapidly gaining traction with significant advancements in computer hardware configuration (computing power, memory, etc.). It is currently being applied to tasks such as classification, regression, and density estimation. Its sub-discipline, deep learning, is even more widely applied across diverse fields, including speech recognition and computer vision. Machine learning is an interdisciplinary approach that, as long as it has data support, can be applied to a wide range of areas, including gas sensor data processing. Summary of the invention:
[0005] The purpose of the present invention is to address the problems of poor generalization and low classification accuracy of existing gas sensors for complex odors, and to provide an odor classification electronic nose system based on a multi-sensor array and pattern recognition algorithm, thereby realizing the identification of generalized target gases.
[0006] To achieve the above object, the technical solution adopted by the present invention is:
[0007] An odor classification electronic nose system based on a multi-sensor array and a pattern recognition algorithm is characterized by comprising the following steps:
[0008] (1) Build an embedded electronic nose system platform, which includes: Raspberry Pi 4B main control module, four BME680 sensor array modules and an adjustable speed air path module.
[0009] (2) Conduct data collection experiments on five generalized odors: mint, coffee, chrysanthemum tea, orange peel, and apple;
[0010] (3) Use pattern recognition algorithms to perform data enhancement and data dimension reduction on the original data set and establish the corresponding classifier model.
[0011] Furthermore, the Raspberry Pi 4B main control module is responsible for running the multi-process concurrent main program framework to realize the logical functions of data transmission, TCP server and control sampling process.
[0012] Furthermore, the sensor array module is mainly based on a programmable gradient temperature control configuration strategy of the sensor array in the semi-open test chamber to obtain non-differential responses under different thermodynamic conditions.
[0013] Furthermore, the odor data experiment includes constructing a multi-scenario gas data set: effectively covering the comprehensive gas distribution characteristics of different meteorological conditions (sunny, cloudy and rainy days), time periods (noon, night) and concentration gradients (micro air pump half / full speed), simulating the real environment as much as possible.
[0014] Furthermore, the data enhancement is to fit the four groups of response curves of the sensor array through nonlinear least squares method, extract the features representing the trend of the curves such as slope and curvature, and expand the dimension of the original data set.
[0015] Furthermore, the data dimensionality reduction uses principal component analysis to reduce the dimensionality of the expanded high-dimensional data set to reduce the model training overhead.
[0016] Furthermore, the pattern recognition algorithm is trained on four sets of data sets: original feature space, PCA dimensionality reduction (retaining 95% variance) data, PCA dimensionality reduction (retaining 90% variance) data, and PCA dimensionality reduction (retaining 85% variance) data through four machine learning algorithms, namely k-nearest neighbor, logistic regression, support vector machine and artificial neural network, to establish corresponding classifier models.
[0017] Furthermore, by comparing and analyzing the balance between model accuracy and training overhead under different PCA dimensionality reduction coefficients, the optimal classifier model is selected. Description of the drawings:
[0018] Figure 1 Diagram showing the framework of the odor classification electronic nose system based on multi-sensor array and pattern recognition algorithm in this invention
[0019] Figure 2 This is the technical roadmap of the present invention
[0020] Figure 3 This is the structural diagram of the sensor array gas test chamber
[0021] Figure 4 Schematic diagram of the air path module of the electronic nose system
[0022] Figure 5 Flowchart of software support design for electronic nose system
[0023] Figure 6 Schematic diagram of the accuracy results of four pattern recognition algorithms for different data sets Specific implementation method:
[0024] The technical solution of the present invention is further described in detail below with reference to the accompanying drawings and embodiments.
[0025] This embodiment provides an odor classification electronic nose system based on a multi-sensor array and a pattern recognition algorithm. The specific framework is as follows: Figure 1 As shown, it includes a sensor array module 1, an air path module 2, a Raspberry Pi 4B main control module 3, and a PC user-side software algorithm module 4.
[0026] Furthermore, its technology roadmap is as follows Figure 2 As shown, the method includes three steps: setting up a sampling platform, sampling experiments of multiple types of odor data, and establishing a pattern recognition model.
[0027] Furthermore, the sampling platform construction step uses Raspberry Pi 4B as the main controller to run the electronic nose main program. Based on its powerful computing power, reorganized memory support, rich interface resources and good software ecology, it facilitates the development of electronic nose technology. Using 4 groups of BME680 sensor arrays as acquisition terminals, based on its ability to integrate temperature, pressure, humidity, and gas multiple parameters, it can obtain more odor data characteristics, and provide a programmable configuration function of the built-in heater to achieve 4 groups of sensor gradient temperature control strategies (220℃ / 280℃ / 340℃ / 400℃ four-order temperature control), so that the same target gas triggers the redox reaction of sensitive materials under different thermodynamic conditions, and obtains different response curves, which greatly improves the characteristic dimension of gas data. The entire array is arranged as follows Figure 3 The semi-open rectangular test chamber shown in the figure has a cavity size of 130mm×40mm×30mm, with three vents at the front with a diameter of 5.3mm. A pulse width modulation (PWM) driven micro diaphragm air pump is used to achieve adjustable speed extraction (0-0.8L / min) of the odor to be tested. The air circuit is connected as follows Figure 4 shown.
[0028] Furthermore, the electronic nose main program software design process is as follows Figure 5 As shown, the system uses a multi-process parallel framework, including a TCP server process and a data acquisition process. Specifically, the TCP server process establishes a TCP server. Once connected to the client, it receives control commands from the PC, parses them, and notifies the corresponding micro-diaphragm air pump thread to start. It also monitors sampled data files and sends any new data to the PC client. The data acquisition process reads data from four sensors via the I2C / SPI bus and writes the sampled data files.
[0029] Furthermore, the multi-category odor data sampling experiment includes the following steps:
[0030] (1) System function verification: conduct joint debugging and testing of the electronic nose hardware sampling platform to ensure normal operation;
[0031] (2) Sensor preheating: Before conducting the odor data collection experiment, the BME680 four-sensor array must be preheated for at least three days in advance to ensure that the sensors reach the best working condition before use.
[0032] (3) Perform a single measurement. During the pre-equilibration phase, close the hinge above the test chamber. After the gas resistance reading stabilizes, inject the gas to be measured for 2 minutes. Then, the measurement begins, and the sensor array records the TPHG full-parameter time domain signal (sampling rate 1 Hz). After sampling, turn off the air pump, open the hinge, and allow air to flow for 5 minutes to restore the environment.
[0033] (4) Sampling was performed in the order of “mint candy → coffee → chrysanthemum tea → orange → apple”, and each odor was measured three times. The air pump speeds of 100% and 50% were measured to obtain the original data set for structured storage.
[0034] After the above steps, a multi-scenario gas dataset with diversity of environmental variables and gas concentration gradients was constructed to simulate the real environment as much as possible.
[0035] Furthermore, the pattern recognition model establishment includes: data processing, k-nearest neighbor learning, logistic regression, support vector machine and artificial neural network. The performance of the classifier model is evaluated by 10-fold cross validation using the above four algorithms.
[0036] Furthermore, in the data processing phase, a nonlinear least squares method was used to fit the trend curve to obtain a Sigmoid function model. Its mathematical properties, including the first-order derivative (indicating the response rate) and the second-order derivative (describing the change in curvature), were analyzed to transform the time series signal into dynamic features, thereby expanding the feature dimension. Principal component analysis was used to reduce the data dimensionality, reducing the expanded 19-dimensional data to 9 dimensions with a variance of 95%, thereby reducing computational complexity while preserving the core distribution characteristics of the data.
[0037] Furthermore, the 19-dimensional data dimensions include: temperature, pressure, humidity, resistance values of four groups of sensors, first-order derivative values of four sensors, second-order derivative values of four groups of sensors, time from the start of sampling, and ratios of three groups of resistance values.
[0038] Furthermore, in the k-nearest neighbor learning algorithm, by setting the parameters 'n_neighbors' and 'weights' values, grid search was performed to obtain the optimal model parameters: when the parameter combination of 'weights' = 'distance' and 'n_neighbors' = 40, the accuracy of classifying the five odors can reach 70.8%.
[0039] Furthermore, in the logistic regression algorithm, by setting the solver (solver option), regularization penalty term (penalty) and penalty coefficient C, grid search was performed to obtain the optimal model parameters: 'Saga'+'l1'. When the parameter combination of C=0.08, the accuracy of classifying the five odors can reach 75.4%.
[0040] Furthermore, in the support vector machine algorithm, by setting the kernel function coefficient gamma value and the penalty coefficient C value, the rbf kernel function is used, and grid search is performed to obtain the optimal model parameters: when the parameter combination of gamma = 0.039 and C = 0.5, the accuracy of classifying the five odors can reach 79.7%.
[0041] Furthermore, in the artificial neural network algorithm, by setting the network structure, learning rate and regularization parameters, grid search is performed to obtain the optimal model parameters: when the network structure is
[14] , the learning rate is 0.001, and the regularization parameter is 0.001, the accuracy of classifying the five odors can reach 81.7%.
[0042] Furthermore, the optimal accuracy results of the four models trained on data sets with different PCA dimensionality reduction coefficients are obtained, such as Figure 6 As shown in the figure, in the original data space, the accuracy of the classifier model based on the artificial neural network algorithm can reach 81.7%. It is the optimal model. The accuracy of the data after 95% variance reduction is not much different from that of the original data space. It reduces the training cost while ensuring the accuracy, which is also a good solution.
[0043] The above description is only a specific embodiment of the present invention. Any feature disclosed in this specification, unless otherwise stated, can be replaced by other equivalent or alternative features with similar purposes; all disclosed features, or all steps in the methods or processes, except for mutually exclusive features and / or steps, can be combined in any way.
Claims
1. An odor classification electronic nose system based on a pattern recognition algorithm, characterized by: The steps include: (1) Build an embedded electronic nose system platform, which includes the following modules: Raspberry Pi 4B main control module, four sets of BME680 sensor array modules and an adjustable speed air path module; (2) Conduct data collection experiments on five generalized odors: mint, coffee, chrysanthemum tea, orange peel, and apple; (3) Use pattern recognition algorithms to perform data enhancement and data dimension reduction on the original data set and establish the corresponding classifier model.
2. The odor classification electronic nose system according to claim 1, characterized in that: In step (1), the Raspberry Pi 4B runs a multi-process concurrent main program framework to implement the logical functions of data transmission, TCP server, and control sampling process.
3. The odor classification electronic nose system according to claim 1, characterized in that: In the step (1), a gradient temperature control strategy for the four groups of sensors is implemented by setting the programmable temperature control mechanism of BME680, thereby collecting multiple nonspecific response curve data.
4. The odor classification electronic nose system according to claim 1, characterized in that: In the step (1), the sensor array is evenly placed horizontally in a rectangular test chamber with a cavity size of 130 mm×40 mm×30 mm.
5. The odor classification electronic nose system according to claim 1, characterized in that: In step (2), the data acquisition experiment needs to construct a multi-scenario gas data set: effectively covering the comprehensive gas distribution characteristics of different meteorological conditions (sunny, cloudy and rainy days), time periods (noon, night) and concentration gradients (micro air pump half / full speed).
6. The odor classification electronic nose system according to claim 1, characterized in that: In the step (3), data enhancement uses nonlinear least squares method to fit the response curve, extract features such as slope and curvature, and expand the dimension of the data set.
7. The odor classification electronic nose system according to claim 1, characterized in that: In step (3), the data will be processed for dimensionality reduction using principal component analysis to reduce the model training overhead.
8. The odor classification electronic nose system according to claim 1, characterized in that: In the step (iii), four sets of data sets: original feature space, PCA dimensionality reduction (retaining 95% variance) data, PCA dimensionality reduction (retaining 90% variance) data, and PCA dimensionality reduction (retaining 85% variance) data are trained by four machine learning algorithms, namely k-nearest neighbor, logistic regression, support vector machine, and artificial neural network, to establish corresponding classifier models.
9. The classifier model according to claim 8, compares and analyzes the balance between model accuracy and training overhead under different PCA dimensionality reduction coefficients.
Citation Information
Cited By
Preparation method of flexible electronic nose based on laser-induced graphene
CN122282877A