Electronic nose system and odor detection method

By constructing polar coordinate images and 3D thermal images, and combining them with convolutional neural networks, the problems of long processing time and insufficient detection accuracy in traditional electronic nose systems have been solved, achieving fast and efficient odor identification and differentiation of subtle differences.

CN119555746BActive Publication Date: 2026-03-31ZHONGYAN TESTING CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Traditional electronic nose systems rely on comparing standard library data for odor identification, which is time-consuming and inefficient. Furthermore, they cannot fully utilize high-dimensional features when processing multi-dimensional data, resulting in insufficient detection accuracy and an inability to effectively distinguish between similar odors and subtle differences.

Method used

Multiple gas sensors are used to collect gas signals, which are then converted into digital signals by a microcontroller. The standard deviation and correlation coefficient of the sensors are calculated to construct polar coordinate images and 3D thermal images. Odor detection is performed using a convolutional neural network, avoiding comparison with standard library data.

Benefits of technology

It achieves fast and efficient odor identification, can make full use of high-dimensional features when processing multi-dimensional data, improves detection accuracy, and can effectively distinguish similar odors and subtle differences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119555746B_ABST
    Figure CN119555746B_ABST
Patent Text Reader

Abstract

The application provides an electronic nose system and an odor detection method, and relates to the technical field of gas odor detection. The system comprises: a collection module configured to collect a plurality of gas signals through a plurality of gas sensors; a conversion module configured to convert each gas signal into a digital signal through a microcontroller; a calculation module configured to calculate the standard deviation of each gas sensor and the correlation coefficient between each gas sensor according to the digital signal; a first construction module configured to construct a polar coordinate image according to the standard deviation of each gas sensor; a second construction module configured to construct a 3D heat map image according to the correlation coefficient between each gas sensor; a third construction module configured to construct an odor detection model based on a convolutional neural network; and a detection module configured to input the polar coordinate image and the 3D heat map image into the odor detection model based on the convolutional neural network as different channels for detection, and output an odor detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gas odor detection technology, and in particular to an electronic nose system and odor detection method. Background Technology

[0002] With social development and technological progress, the requirements for quality control in areas such as the environment and food are becoming increasingly stringent, leading to the widespread application of gas analysis technology in various fields. Especially in food, chemical, environmental monitoring, and medical diagnostics, the types and concentrations of gases can reflect different quality states or disease conditions. Therefore, how to accurately and quickly detect the gaseous components in the air, especially odors, has become a pressing issue. The generation of odors is often closely related to environmental pollution, food spoilage, and human health; therefore, accurate detection of odor components is of great significance for improving quality of life and protecting public health.

[0003] In existing technologies, traditional electronic nose systems typically rely on comparing data in a standard library to identify odors, which is time-consuming and inefficient.

[0004] In addition, traditional electronic nose systems often fail to fully utilize their potential high-dimensional features when processing multi-dimensional data, resulting in insufficient detection accuracy and an inability to effectively distinguish between similar odors and subtle differences. Summary of the Invention

[0005] To address the technical problems of traditional electronic nose systems, which typically rely on comparing data from a standard library for odor identification, resulting in long processing times, low efficiency, and inability to fully utilize the potential high-dimensional features of multi-dimensional data, leading to insufficient detection accuracy and an inability to effectively distinguish between similar odors and subtle differences, this invention provides an electronic nose system and odor detection method.

[0006] The technical solutions provided by the embodiments of the present invention are as follows:

[0007] First aspect:

[0008] An electronic nose system provided in this embodiment of the invention includes:

[0009] The acquisition module is used to acquire multiple gas signals through multiple gas-sensitive sensors installed in the electronic nose;

[0010] A conversion module is used to convert the various gas signals into digital signals via a microcontroller located in the electronic nose;

[0011] The calculation module is used to calculate the standard deviation of each gas sensor and the correlation coefficient between each gas sensor based on the digital signal.

[0012] The first construction module is used to construct a polar coordinate image based on the standard deviation of each of the gas sensors;

[0013] The second construction module is used to construct a 3D thermal image based on the correlation coefficients between the various gas sensors.

[0014] The third building module is used to build an odor detection model based on a convolutional neural network;

[0015] The detection module is used to input the polar coordinate image and the 3D heat map image as different channels into the odor detection model based on the convolutional neural network for detection, and output the odor detection result.

[0016] The second aspect:

[0017] An odor detection method provided in this embodiment of the invention includes:

[0018] S1: Multiple gas signals are collected through multiple gas-sensitive sensors installed in the electronic nose;

[0019] S2: The gas signals are converted into digital signals by a microcontroller installed in the electronic nose;

[0020] S3: Calculate the standard deviation of each gas sensor and the correlation coefficient between each gas sensor based on the digital signal;

[0021] S4: Construct a polar coordinate image based on the standard deviation of each of the gas sensors;

[0022] S5: Construct a 3D thermal image based on the correlation coefficients between the various gas sensors;

[0023] S6: Construct an odor detection model based on a convolutional neural network;

[0024] S7: Input the polar coordinate image and the 3D heat map image as different channels into the odor detection model based on convolutional neural network for detection, and output the odor detection result.

[0025] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0026] In this invention, by calculating the standard deviation of each gas sensor and the correlation coefficient between each gas sensor, a polar coordinate image is constructed based on the standard deviation of each gas sensor, and a 3D heat map image is constructed based on the correlation coefficient between each gas sensor. The polar coordinate image and the 3D heat map image are then input as different channels into an odor detection model based on a convolutional neural network for detection. Odor identification can be performed without relying on data in a standard library. This method is time-saving, efficient, and can fully utilize the potential high-dimensional features of multi-dimensional data when processing multi-dimensional data. It also has high detection accuracy and can effectively distinguish between similar odors and subtle differences. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 This is a schematic diagram of the structure of an electronic nose system provided in an embodiment of the present invention;

[0029] Figure 2 A schematic diagram illustrating the working principle of an electronic nose system provided in an embodiment of the present invention;

[0030] Figure 3 This is a flowchart illustrating an odor detection method provided in an embodiment of the present invention. Detailed Implementation

[0031] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0032] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0033] Reference manual attached Figure 1 The diagram shows a structural schematic of an electronic nose system provided in an embodiment of the present invention.

[0034] This invention provides an electronic nose system 20, comprising:

[0035] Reference manual attached Figure 2 The diagram illustrates the working principle of an electronic nose system provided in an embodiment of the present invention.

[0036] It should be noted that the electronic nose system is suitable for various scenarios, including breathalyzer drug detection (such as detecting drug metabolites through breath gas), food spoilage detection in refrigerators (identifying volatile putrefactive gases), room drug detection (monitoring drug volatile gases), alcohol aroma detection (such as identifying the authenticity and quality of alcoholic beverages), indoor tobacco storage detection (identifying tobacco odors and masking the odor of burning tobacco), and plastic combustion gas monitoring (suitable for fire alarms and indoor air quality monitoring). The data acquisition module 201 is used to acquire multiple gas signals through multiple gas-sensitive sensors installed in the electronic nose.

[0037] It should be noted that the gas signals collected by the gas sensors are electrical signals. Multiple gas sensors installed in the electronic nose collect electrical signals of the odor gases.

[0038] Specifically, the electronic nose deploys a gas-sensitive sensor array, which includes multiple gas sensors, each sensitive to a specific gas or gas component. When gas molecules in the environment react chemically or physically with the sensitive material on the sensor surface, the sensor generates a corresponding electrical signal. These signals reflect the sensor's response to a specific gas concentration. By synchronously sampling the gas-sensitive sensor array, multiple gas signals can be acquired simultaneously.

[0039] In this invention, by simultaneously acquiring different gas signals through multiple sensors, changes in gas composition in the environment can be captured more comprehensively, thereby improving the accuracy and sensitivity of gas identification. By deploying multiple sensors, the system can effectively address potential malfunctions or instabilities in individual sensors, ensuring the overall reliability and stability of the system. Through the collaborative work of multiple sensors, the system can better distinguish and identify different types of gases or gas mixtures, thus achieving more efficient gas classification and identification in complex gas environments.

[0040] The conversion module 202 is used to convert various gas signals into digital signals via a microcontroller located in the electronic nose.

[0041] Optionally, the microcontroller is a PIC18F46K80.

[0042] Specifically, the gas signals (electrical signals) are preprocessed by the PIC18F46K80 microcontroller installed in the electronic nose to convert each gas signal (electrical signal) into a digital signal.

[0043] It should be noted that the PIC18F46K80 is a high-performance, low-power 8-bit microcontroller manufactured by Microchip, based on the PIC18 core architecture, and suitable for embedded applications. It supports multiple communication protocols (such as CAN and EUSART) and features a 12-bit resolution analog-to-digital converter (ADC) capable of converting analog signals into digital signals for precise data processing. This microcontroller has up to 64KB of flash memory, 4KB of RAM, and various power management functions, making it suitable for use as a signal conversion module in electronic nose systems to achieve efficient digitization of gas sensor signals.

[0044] In this invention, the microcontroller's rapid data processing capabilities enable the electronic nose system to process signals acquired by the gas sensor in real time, achieving instant gas detection and response. This makes it suitable for environmental monitoring and safety detection applications requiring rapid response. The PIC18F46K80 microcontroller's built-in 12-bit analog-to-digital converter (ADC) can convert analog signals into digital signals with high precision, thereby ensuring the electronic nose system's accurate acquisition and processing of gas signals and improving the system's recognition accuracy.

[0045] The calculation module 203 is used to calculate the standard deviation of each gas sensor and the correlation coefficient between each gas sensor based on the digital signal.

[0046] In this invention, the calculation of standard deviation helps filter out unstable or noisy sensor data, thereby improving the system's ability to identify valid signals. Through correlation coefficients, the system can identify and utilize the complementarity between different sensors, improving signal quality and accuracy.

[0047] In one possible implementation, the computing module 203 is specifically used for:

[0048] Calculate the standard deviation of each gas sensor based on the digital signal:

[0049]

[0050] Where σ represents the standard deviation of the gas sensor, X represents the digital signal of the gas sensor, μ represents the average value of the digital signal of the gas sensor, and N represents the total number of gas sensors.

[0051] Calculate the correlation coefficients between the various gas sensors based on the digital signals:

[0052]

[0053] Where, r ij X represents the correlation coefficient between the i-th gas sensor and the j-th gas sensor. iμ represents the digital signal of the i-th gas sensor. i X represents the average value of the digital signal from the gas sensor. j μ represents the digital signal of the j-th gas sensor. j This represents the average value of the digital signal from the gas sensor.

[0054] In this invention, the standard deviation of each gas sensor is calculated to measure the stability of each sensor's response to gas changes. Sensors with larger standard deviations may exhibit higher noise or instability; the system can use this to identify and process noisy data, improving data quality. Correlation coefficient calculation measures the signal similarity between different sensors, helping the system identify which sensors have complementary responses and which have redundant signals. By calculating the correlation coefficient, the system can better fuse signals from multiple sensors, enhancing overall gas identification capabilities.

[0055] The first construction module 204 is used to construct a polar coordinate image based on the standard deviation of each gas sensor.

[0056] It's important to note that a polar image is a visualization based on a polar coordinate system, used to show the distribution characteristics of data within that system. Each data point is represented by two parameters: polar radius and polar angle. The polar radius typically represents the magnitude or intensity of the data, such as the normalized standard deviation of a gas sensor, while the polar angle ranges from 0 to 2π depending on the data's sequence or category. Polar images are suitable for displaying the global distribution of multidimensional data. In electronic noses, they can visually represent the changing patterns of sensor responses, useful for pattern recognition tasks such as odor detection.

[0057] In this invention, polar coordinate images can intuitively display the standard deviation of different gas sensors, reflecting the sensor's response strength and stability to gas changes. By converting the sensor's response into an image, the differences and commonalities between the sensors can be clearly observed, facilitating the identification and analysis of gas signals.

[0058] In one possible implementation, the first building module 204 is specifically used for:

[0059] The standard deviations of each gas sensor were normalized:

[0060]

[0061] in, σ represents the standard deviation of the i-th gas sensor after normalization, max() represents taking the maximum value, min() represents taking the minimum value, and σ represents the standard deviation of the i-th gas sensor after normalization. i This represents the standard deviation of the i-th gas sensor.

[0062] Determine the coordinate angles based on the serial numbers of each gas sensor:

[0063]

[0064] Where, θ i Let represent the coordinate angle of the i-th gas sensor, and N represent the total number of gas sensors.

[0065] A polar coordinate image is constructed based on the coordinate angles and the standard deviations of each gas sensor after normalization.

[0066] In this invention, the normalized standard deviation scales the sensor response data to a uniform range, which helps eliminate the scale inconsistency caused by differences in sensitivity between different sensors. This allows data from various sensors to be compared and analyzed on the same scale, improving data consistency and operability. By combining the normalized standard deviation with coordinate angles to construct a polar coordinate image, multidimensional data (responses from multiple sensors) can be transformed into a distribution in two-dimensional space, facilitating intuitive display and analysis. Each sensor's data is represented as a point in the polar coordinate image, making the response patterns of gas sensors more intuitive and understandable, suitable for pattern recognition and gas classification tasks.

[0067] The specific method for constructing the polar coordinate image is as follows:

[0068] Based on the coordinate angle, a polar coordinate image is constructed using the standard deviation of each gas sensor after normalization as the coordinate radius.

[0069] Specifically, first, the standard deviation of each gas sensor is calculated and normalized, scaling it to the range [0,1], which is then used as the radius in polar coordinates. Next, corresponding coordinate angles are assigned based on the gas sensor's number, typically evenly distributed within the range [0,2π]. Then, the normalized standard deviation of each gas sensor is used as the radius of the point, and the angle is used as the polar angle to plot the data points in a polar coordinate system. Finally, by connecting all the points, a polar coordinate image reflecting the response characteristics of the gas sensors is generated, visually displaying the signal change patterns of each sensor.

[0070] In this invention, polar coordinate images effectively fuse data from multiple sensors by mapping the response features of multiple sensors to the same coordinate system. This avoids the problem of processing multiple complex data dimensions required in traditional methods, simplifying the data processing and analysis process. Polar coordinate images can more clearly show the sensor's response patterns to gas changes, especially in the case of multiple gases or gases of different concentrations. With this image, the electronic nose system can more effectively identify the type and concentration of gases, thereby improving the accuracy and efficiency of pattern recognition.

[0071] The second construction module 205 is used to construct a 3D thermal image based on the correlation coefficients between the various gas sensors.

[0072] It's important to note that a 3D heatmap image is a three-dimensional visualization that displays the correlation or distribution characteristics between data points. Based on a three-dimensional space, the X and Y axes represent the data category or index, such as the number of a gas sensor, while the Z axis represents the numerical intensity of the data, such as the correlation coefficient between sensors. Colors typically correspond to the Z-axis values, visually reflecting the differences between data points. In electronic noses, 3D heatmap images can be used to represent the correlation distribution between sensors, helping to analyze sensor cooperation patterns and signal characteristics, providing more intuitive information support for gas identification and classification.

[0073] In this invention, 3D thermal images clearly show how different sensors influence and cooperate with each other, especially in multi-sensor configurations, helping to identify redundant information or complementarity between sensors. This facilitates the optimization of sensor selection and configuration, improving the overall system's detection performance and efficiency.

[0074] In one possible implementation, the second building module 205 is specifically used for:

[0075] A correlation matrix is ​​constructed based on the correlation coefficients between the various gas sensors.

[0076] Optionally, the correlation matrix can be constructed according to the following formula:

[0077]

[0078] Where R represents the correlation matrix and N represents the total number of gas sensors.

[0079] Construct a 3D heat map image based on the correlation matrix.

[0080] In this invention, by constructing a correlation matrix, the correlation between gas sensors can be comprehensively reflected, revealing the similarities and differences in sensor response signals. The correlation coefficient between each pair of sensors provides information about their similarity in gas response patterns, which helps analyze which sensors have redundant information and which sensors provide different signal characteristics. Constructing a 3D heatmap image visually presents the complex correlation matrix information, allowing analysts to clearly see the strength of the correlation between sensors through color and three-dimensional structure.

[0081] The specific method for constructing 3D heatmap images is as follows:

[0082] Based on the correlation matrix, a 3D thermal image is constructed using the correlation coefficient between each gas sensor as the Z-axis and the number of each gas sensor as the X-axis or Y-axis.

[0083] Specifically, firstly, a correlation matrix is ​​calculated based on the correlation coefficients of the gas sensors, where each element represents the correlation coefficient r between the two sensors. ij Then, the sensor numbers are assigned to X-axis and Y-axis coordinates, with the rows and columns of the matrix corresponding to the sensor numbers. Finally, the correlation coefficient r is... ij The correlation is mapped to the Z-axis, and color or height is used to visually represent the strength of the correlation. The higher the correlation coefficient (closer to 1), the brighter the color or the higher the height; the lower the correlation coefficient (closer to 0 or negative values), the darker or lower the height. By plotting these data points in a three-dimensional coordinate system, a 3D heatmap image reflecting the correlation between sensors is generated for analyzing the cooperative patterns of sensor signals.

[0084] In this invention, by analyzing 3D thermal images, it is possible to assess which sensors exhibit high redundancy and which provide unique and useful signals. This allows the system to optimize sensor configuration based on inter-sensor correlations, avoiding redundant data and improving data processing efficiency. It facilitates multi-sensor data fusion strategies, enhancing the accuracy of gas detection. The 3D thermal images provide crucial visualization support for subsequent pattern recognition and classification tasks. By analyzing the distribution of inter-sensor correlations, the system can identify the characteristics of different gases and the collaborative patterns between sensors, thereby improving the accuracy of gas classification and identification.

[0085] The third building module 206 is used to build an odor detection model based on a convolutional neural network.

[0086] It's important to note that a Convolutional Neural Network (CNN) is a deep learning model specifically designed for processing images and other gridded data, such as time series or audio. CNNs extract local features through convolutional layers, reduce data dimensionality and computational complexity through pooling layers, and finally complete classification or regression tasks through fully connected layers. Its core is the convolutional operation, which reduces the number of parameters through a shared weight mechanism and progressively extracts low- to high-level features from the data through a multi-layered structure. CNNs are widely used in image recognition, speech processing, and pattern detection. In odor detection using electronic noses, CNNs can learn features from polar coordinate images and 3D heatmap images to perform efficient gas classification and odor identification.

[0087] In this invention, Convolutional Neural Networks (CNNs) can automatically extract meaningful features from input data (such as polar coordinate images and 3D heatmap images). Traditional image processing methods require manual feature extraction, while CNNs can progressively extract features from low to high levels (such as edges, textures, shapes, etc.) through convolutional layers, greatly simplifying the feature extraction process and improving the efficiency and accuracy of the system.

[0088] The detection module 207 is used to input polar coordinate images and 3D heat map images as different channels into the odor detection model based on convolutional neural network for detection, and output odor detection results.

[0089] Specifically, by using polar coordinate images and 3D thermal images as independent input channels to the model, deep learning algorithms are used to identify the characteristics of complex gases, thereby achieving accurate gas classification and identification, and the final gas category is output as the odor detection result.

[0090] In this invention, different types of images (such as polar coordinate images and 3D thermal images) can demonstrate different characteristics of the gas sensor. By using them as independent input channels, the CNN can process and learn these two different features separately, thereby improving the system's accuracy in recognizing complex gases or odors. In this way, the model can capture richer patterns and details, improving the performance of gas classification and odor detection.

[0091] In one possible implementation, the convolutional neural network includes an input layer, multiple convolutional layers, multiple pooling layers, a fully connected layer, and an output layer. The convolutional layers include a first convolutional layer, a second convolutional layer, and a third convolutional layer. The pooling layers include a first pooling layer, a second pooling layer, and a third pooling layer. The detection module 207 is specifically used for:

[0092] In the input layer, input polar coordinate images and 3D heatmap images.

[0093] In the first convolutional layer, features are extracted from the polar coordinate image and the 3D heatmap image to generate the first local feature map.

[0094] It should be noted that the first convolutional layer is a convolutional layer containing eight 7×7 convolutional kernels.

[0095] In the first pooling layer, max pooling is performed on the first local feature map to generate the first pooled feature map.

[0096] It should be noted that the first pooling layer is a pooling layer containing a 2×2 max pooling window with a step size of 2.

[0097] In the second convolutional layer, features are extracted from the first pooling feature map to generate the second local feature map.

[0098] It should be noted that the second convolutional layer is a convolutional layer containing 12 5×5 convolutional kernels.

[0099] In the second pooling layer, max pooling is performed on the second local feature map to generate the second pooled feature map.

[0100] It should be noted that the second pooling layer is a pooling layer containing a 2×2 max pooling window with a step size of 2.

[0101] In the third convolutional layer, features are extracted from the second pooling feature map to generate the third local feature map.

[0102] It should be noted that the third convolutional layer is a convolutional layer containing 16 3×3 convolutional kernels.

[0103] In the third pooling layer, max pooling is performed on the third local feature map to generate the third pooled feature map.

[0104] It should be noted that the third pooling layer is a pooling layer containing a 2×2 maximum pooling window with a step size of 2.

[0105] The first pooling feature map, the second pooling feature map, and the third pooling feature map are weighted and fused to generate the target feature map:

[0106]

[0107] Where H represents the target feature map, W1 represents the weight coefficients of the first pooling feature map, A represents the activation function, and P1 represents the first pooling feature map. The concatenation operation is represented by W2, where W2 represents the weight coefficient of the second pooling feature map, P2 represents the second pooling feature map, W3 represents the weight coefficient of the third pooling feature map, and P3 represents the third pooling feature map.

[0108] Odor detection is performed in the fully connected layer based on the target feature map.

[0109] The output layer outputs the odor detection results.

[0110] In this invention, the CNN extracts features from low to high levels through multiple convolutional layers. The first convolutional layer uses a large kernel to extract coarse features, while subsequent layers use small kernels to extract more detailed features. This hierarchical approach improves the accuracy and robustness of gas recognition. Pooling layers reduce data dimensionality, retain important features, reduce the risk of overfitting, and improve computational efficiency. By weighted fusion of multiple feature maps, the CNN extracts key features from different dimensions, enhancing its expressive power and adapting to different gas patterns. Finally, odor detection is performed through fully connected layers, and the results are output. The multi-layered structure and weighted fusion improve recognition accuracy and stability.

[0111] In one possible implementation, the electronic nose system 20 further includes:

[0112] Training module 208 is used to train a convolutional neural network with the goal of minimizing the mean squared error loss function, and to determine the optimal network parameters of the convolutional neural network using a krill swarm optimization algorithm.

[0113] It's important to note that the Krill Herd Algorithm (KH) is a global optimization algorithm based on the swarm behavior of krill in nature, simulating the cooperative mechanisms of krill during foraging and group movement. The algorithm achieves its search through three key behaviors: foraging movement (exploring the target area), induced movement (group cooperation), and physical diffusion (randomness enhances search diversity). These behaviors are modeled as mathematical formulas to dynamically adjust the position of each "krill," thereby optimizing the objective function. In the training of convolutional neural networks for electronic noses, the Krill Herd Algorithm is used to find the optimal values ​​of network parameters to minimize the loss function and improve the model's classification accuracy and stability. Its advantage lies in its ability to effectively balance global search and local exploitation, avoiding getting trapped in local optima.

[0114] In this invention, the krill swarm optimization algorithm effectively balances global search and local exploitation by simulating three krill behaviors (foraging movement, induced movement, and physical dispersal). In CNN training, optimization algorithms require tuning a large number of parameters. KH avoids getting trapped in local optima, thus increasing the likelihood of finding the global optimum and improving model performance and classification accuracy. The KH algorithm automates network parameter optimization, reducing the workload of manually tuning network hyperparameters. Compared to traditional manual parameter tuning methods, KH can automatically search for suitable parameter combinations without requiring expert knowledge, making the training process of convolutional neural networks more efficient and convenient.

[0115] In one possible implementation, the training module 208 is specifically used for:

[0116] To minimize the mean squared error loss function, the objective function is constructed as follows:

[0117]

[0118] Where min represents taking the minimum value, MSE represents the objective function, θ' represents the set of network parameters of the convolutional neural network, S represents the total number of input images, and y s This represents the true detection result of the s-th input image. This represents the actual detection result of the s-th input image.

[0119] Based on the objective function, the convolutional neural network is trained using the krill swarm optimization algorithm to determine the optimal network parameters.

[0120] Optionally, the krill swarm optimization algorithm specifically includes:

[0121] Initialize parameters and set the maximum number of iterations for the krill swarm optimization algorithm.

[0122] An initial population is randomly generated, consisting of multiple krill individuals, each representing a set of network parameters for a feasible convolutional neural network.

[0123] Using the objective function as the fitness function, the fitness value of each krill individual is calculated, and the krill individual with the maximum fitness value is selected as the current krill individual.

[0124] Based on the current iteration number, adaptively adjust foraging and induced movements:

[0125]

[0126] F i =V f β i +w f F i old

[0127] β i =β i food +β i best

[0128]

[0129] Among them, F i ' represents the foraging movement of the i-th krill individual after adaptive adjustment, MI represents the maximum number of iterations, I represents the current number of iterations, and F i V represents the foraging movement of the i-th krill individual. f Indicates foraging speed, β i w represents the foraging direction of the i-th krill individual. f F represents the inertial weight of foraging motion with values ​​ranging from [0,1]. i old β represents the last foraging movement of the i-th krill individual. i food β represents the current optimal foraging direction to attract the i-th krill individual. i best K represents the historically optimal foraging direction that attracts the i-th krill individual. i' represents the induced movement of the i-th krill individual after adaptive adjustment, K i K represents the induced movement of the i-th krill individual. max a represents the maximum induced velocity. i w represents the inducing factor for the i-th krill individual. n This represents the inertial weights of the induced motion, with values ​​ranging from [0,1]. This represents the last induced movement of the i-th krill individual.

[0130] Update the current krill individual based on the adaptively adjusted foraging and induced movements:

[0131] L i (t+Δt)=L i (t)+Δt(F i '+K i '+D i )

[0132] D i =D max δ

[0133] Among them, L i Let D represent the i-th krill individual, t represent time, Δt represent the step size when updating the krill individual, and D i D represents the random diffusion rate of the i-th krill individual. max δ represents the maximum diffusion velocity, and δ represents the random perturbation factor with a value range of [-1, 1].

[0134] Calculate the fitness value of the updated krill individual and compare it with the fitness value of the current krill individual. If the fitness value of the updated krill individual is greater than that of the current krill individual, replace the current krill individual with the updated krill individual. If the fitness value of the updated krill individual is less than that of the current krill individual, leave the current krill individual unchanged.

[0135] By using the crossover operator, randomly select a subset of krill individuals and perform the crossover operation to generate new krill individuals:

[0136] L new =αL1+(1-α)L2

[0137] Among them, L new L1 represents the newly generated krill individual, α represents the random weight with a value range of [0,1], L1 represents the first krill individual selected randomly, and L2 represents the second krill individual selected randomly.

[0138] It's important to note that the crossover operator is a mechanism borrowed from genetic algorithms, used in optimization algorithms to facilitate information exchange between individuals, thereby generating the next generation of individuals with hybrid characteristics. In the krill swarm optimization algorithm, the crossover operator generates new krill individuals by randomly selecting two or more krill individuals (solution vectors) and combining them. Through crossover, the new krill individuals inherit the characteristics of the original individuals, increasing population diversity, facilitating the exploration of a wider search space, and avoiding getting trapped in local optima.

[0139] Replace some of the krill individuals in the population with the newly generated krill individuals.

[0140] Specifically, the fitness value of the newly generated krill individual is calculated and compared with the fitness value of the corresponding individual in the original population. If the fitness value of the new individual is better, the new individual replaces the corresponding individual in the original population. Otherwise, the original individual is retained.

[0141] Repeat the above steps until the maximum number of iterations is reached.

[0142] In this invention, the KH algorithm optimizes CNN parameters, such as convolutional kernels and weights, by using the objective function (e.g., mean squared error loss function) as the fitness function, ensuring the optimal parameter combination for gas recognition and odor detection tasks. Compared to gradient descent, KH searches the fitness space more comprehensively, improving training performance and simplifying parameter tuning. KH adaptively adjusts foraging and induced movement based on the number of iterations, relying on exploration behavior in the early stages and group experience in the later stages, thereby accelerating convergence and maintaining diversity, avoiding premature convergence, optimizing CNN parameters, and improving efficiency and accuracy. KH enhances population diversity through crossover operators, helping the model escape local optima, enhancing robustness, and ensuring the model can handle unknown patterns and anomalous data in complex gas detection.

[0143] Optionally, based on the odor detection results, an alarm mechanism may be triggered if necessary:

[0144] 1. The specific alarm triggering conditions are as follows:

[0145] (1) When the electronic nose detects that the concentration of a specific gas exceeds a set safety threshold, the system will trigger an alarm. This threshold is usually set based on the type of gas, its concentration, and its potential impact on human health. For example, the system will immediately alarm when the concentration of carbon monoxide (CO) exceeds the safe range; similarly, an alarm will also be triggered when the concentration of toxic gases such as benzene or formaldehyde exceeds the set safety value.

[0146] (2) When the electronic nose detection result indicates that a certain gas is a drug, the system will immediately issue an alarm signal. For example, when methamphetamine (ice) gas is detected, the system will immediately issue an alarm to prompt the user to take appropriate measures.

[0147] 2. Implementation of the alarm mechanism, including:

[0148] (1) Audible Alarm: When the concentration of harmful gas exceeds a set threshold, the system will issue an audible warning via a speaker or buzzer. The intensity of the audible alarm can be adjusted according to the detected concentration level. For example, when the gas concentration is low, the buzzer is intermittent and has a low frequency; while when the concentration reaches a dangerous level, the alarm is continuous and the frequency increases significantly. For drug detection, the system can distinguish between drug alarms and general toxic gas alarms using unique tones or frequencies, allowing users to quickly identify them.

[0149] (2) Visual Alarm: The system displays alarm information on the device's screen or alerts the user through color changes of LEDs. Different colors represent different alarm levels; for example, red indicates danger, yellow indicates warning, and green indicates normal status. For drug detection, the display can directly show detailed information, such as the type of drug detected, its concentration, and its danger level. For example, the display could read: "Detected cannabis volatiles, concentration: high danger."

[0150] It should be noted that those skilled in the art can set alarm triggering conditions and alarm mechanisms according to actual needs, and this invention does not limit them.

[0151] In this invention, when gas concentration or drug characteristics are detected, the system can immediately trigger an alarm, prompting the user to take protective or emergency measures to reduce potential hazards. The alarm intensity is adjusted according to the gas concentration level (e.g., sound frequency, LED color), enabling the user to quickly assess the level of danger and avoid unnecessary panic or misjudgment due to excessive alarms or ambiguous information. Through a unique tone and detailed information displayed on the screen (e.g., drug type and concentration), users can quickly understand the source of the problem and take targeted measures, making it particularly suitable for law enforcement or security monitoring applications.

[0152] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0153] In this invention, by calculating the standard deviation of each gas sensor and the correlation coefficient between each gas sensor, a polar coordinate image is constructed based on the standard deviation of each gas sensor, and a 3D heat map image is constructed based on the correlation coefficient between each gas sensor. The polar coordinate image and the 3D heat map image are then input as different channels into an odor detection model based on a convolutional neural network for detection. Odor identification can be performed without relying on data in a standard library. This method is time-saving, efficient, and can fully utilize the potential high-dimensional features of multi-dimensional data when processing multi-dimensional data. It also has high detection accuracy and can effectively distinguish between similar odors and subtle differences.

[0154] Reference manual attached Figure 3 The diagram shows a flowchart of an odor detection method provided by the present invention.

[0155] The present invention also provides an odor detection method, comprising:

[0156] S1: Multiple gas signals are collected through multiple gas-sensitive sensors installed in the electronic nose.

[0157] S2: The microcontroller installed in the electronic nose converts the various gas signals into digital signals.

[0158] S3: Based on the digital signal, calculate the standard deviation of each gas sensor and the correlation coefficient between each gas sensor.

[0159] S4: Construct a polar coordinate image based on the standard deviation of each gas sensor.

[0160] S5: Construct a 3D thermal image based on the correlation coefficients between the various gas sensors.

[0161] S6: Construct an odor detection model based on a convolutional neural network.

[0162] S7: Input the polar coordinate image and the 3D heat map image as different channels into the odor detection model based on the convolutional neural network for detection, and output the odor detection results.

[0163] Furthermore, S3 specifically includes:

[0164] S301: Calculate the standard deviation of each gas sensor based on the digital signal:

[0165]

[0166] Where σ represents the standard deviation of the gas sensor, X represents the digital signal of the gas sensor, μ represents the average value of the digital signal of the gas sensor, and N represents the total number of gas sensors.

[0167] S302: Calculate the correlation coefficient between each gas sensor based on the digital signal.

[0168]

[0169] Where, r ij X represents the correlation coefficient between the i-th gas sensor and the j-th gas sensor. i μ represents the digital signal of the i-th gas sensor. i X represents the average value of the digital signal from the gas sensor. jμ represents the digital signal of the j-th gas sensor. j This represents the average value of the digital signal from the gas sensor.

[0170] Furthermore, S4 specifically includes:

[0171] S401: Normalize the standard deviation of each gas sensor:

[0172]

[0173] in, σ represents the standard deviation of the i-th gas sensor after normalization, max() represents taking the maximum value, min() represents taking the minimum value, and σ represents the standard deviation of the i-th gas sensor after normalization. i This represents the standard deviation of the i-th gas sensor.

[0174] S402: Determine the coordinate angles based on the serial numbers of each gas sensor:

[0175]

[0176] Where, θ i Let represent the coordinate angle of the i-th gas sensor, and N represent the total number of gas sensors.

[0177] S403: Construct a polar coordinate image based on the coordinate angles and the standard deviations of each gas sensor after normalization.

[0178] Furthermore, the specific method for constructing polar coordinate images is as follows:

[0179] Based on the coordinate angle, a polar coordinate image is constructed using the standard deviation of each gas sensor after normalization as the coordinate radius.

[0180] Furthermore, S5 specifically includes:

[0181] S501: Construct a correlation matrix based on the correlation coefficients between the various gas sensors.

[0182] S502: Construct a 3D heat map image based on the correlation matrix.

[0183] Furthermore, the specific method for constructing 3D thermal images is as follows:

[0184] Based on the correlation matrix, a 3D thermal image is constructed using the correlation coefficient between each gas sensor as the Z-axis and the number of each gas sensor as the X-axis or Y-axis.

[0185] Furthermore, the convolutional neural network includes an input layer, multiple convolutional layers, multiple pooling layers, a fully connected layer, and an output layer. The convolutional layers include a first convolutional layer, a second convolutional layer, and a third convolutional layer. The pooling layers include a first pooling layer, a second pooling layer, and a third pooling layer. S7 specifically includes:

[0186] S701: In the input layer, input polar coordinate images and 3D heatmap images.

[0187] S702: In the first convolutional layer, feature extraction is performed on the polar coordinate image and the 3D heat map image to generate the first local feature map.

[0188] S703: In the first pooling layer, max pooling is performed on the first local feature map to generate the first pooled feature map.

[0189] S704: In the second convolutional layer, feature extraction is performed on the first pooling feature map to generate a second local feature map.

[0190] S705: In the second pooling layer, max pooling is performed on the second local feature map to generate the second pooled feature map.

[0191] S706: In the third convolutional layer, features are extracted from the second pooling feature map to generate the third local feature map.

[0192] S707: In the third pooling layer, max pooling is performed on the third local feature map to generate the third pooled feature map.

[0193] S708: Weighted fusion of the first pooling feature map, the second pooling feature map, and the third pooling feature map to generate the target feature map:

[0194]

[0195] Where H represents the target feature map, W1 represents the weight coefficients of the first pooling feature map, A represents the activation function, and P1 represents the first pooling feature map. The concatenation operation is represented by W2, where W2 represents the weight coefficient of the second pooling feature map, P2 represents the second pooling feature map, W3 represents the weight coefficient of the third pooling feature map, and P3 represents the third pooling feature map.

[0196] S709: Odor detection is performed in the fully connected layer based on the target feature map.

[0197] S710: Outputs the odor detection results in the output layer.

[0198] Furthermore, odor detection methods also include:

[0199] S8: With the goal of minimizing the mean squared error loss function, the convolutional neural network is trained using the krill swarm optimization algorithm to determine the optimal network parameters.

[0200] Furthermore, S8 specifically includes:

[0201] S801: Construct the objective function with the goal of minimizing the mean squared error loss function:

[0202]

[0203] Where min represents taking the minimum value, MSE represents the objective function, θ' represents the set of network parameters of the convolutional neural network, S represents the total number of input images, and y s This represents the true detection result of the s-th input image. This represents the actual detection result of the s-th input image.

[0204] S802: Based on the objective function, the convolutional neural network is trained using the krill swarm optimization algorithm to determine the optimal network parameters.

[0205] It should be noted that the odor detection method can be implemented by the above-mentioned electronic nose system and can achieve the same or similar technical effects. To avoid duplication, the present invention will not elaborate further.

[0206] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0207] In this invention, by calculating the standard deviation of each gas sensor and the correlation coefficient between each gas sensor, a polar coordinate image is constructed based on the standard deviation of each gas sensor, and a 3D heat map image is constructed based on the correlation coefficient between each gas sensor. The polar coordinate image and the 3D heat map image are then input as different channels into an odor detection model based on a convolutional neural network for detection. Odor identification can be performed without relying on data in a standard library. This method is time-saving, efficient, and can fully utilize the potential high-dimensional features of multi-dimensional data when processing multi-dimensional data. It also has high detection accuracy and can effectively distinguish between similar odors and subtle differences.

[0208] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

[0209] The following points need to be explained:

[0210] (1) The accompanying drawings of the embodiments of the present invention only involve the structures involved in the embodiments of the present invention. Other structures can refer to the general design.

[0211] (2) For clarity, the thickness of layers or regions is enlarged or reduced in the drawings used to describe embodiments of the present invention; that is, these drawings are not drawn to actual scale. It is understood that when an element such as a layer, film, region, or substrate is referred to as being “above” or “below” another element, the element may be “directly” located “above” or “below” the other element, or there may be intermediate elements.

[0212] (3) Where there is no conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other to obtain new embodiments.

[0213] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. The scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. An electronic nose system, characterized by The electronic nose system comprises: a collection module configured to collect a plurality of gas signals through a plurality of gas sensors arranged in the electronic nose; a conversion module configured to convert each of the gas signals into a digital signal through a microcontroller arranged in the electronic nose; a calculation module configured to calculate a standard deviation value of each of the gas sensors and a correlation coefficient between each of the gas sensors according to the digital signals; the standard deviation value of each of the gas sensors is calculated according to the digital signals: wherein, σ represents a standard deviation value of the gas sensitive sensor, X represents a digital signal of the gas sensitive sensor, μ represents an average value of the digital signal of the gas sensitive sensor, N represents a total number of the gas sensitive sensor; the correlation coefficient between each of the gas sensors is calculated according to the digital signals: in, r ij Indicates the first i The gas sensor and the first j The correlation coefficient between the gas sensors X i Indicates the first i Digital signals from a gas sensor, μ i The average value of the digital signal from the gas sensor. X j Indicates the first j Digital signals from a gas sensor, μ j The average value of the digital signal from the gas sensor; a first construction module configured to normalize the standard deviation value of each of the gas sensors, determine a coordinate angle according to the number of each of the gas sensors, and construct a polar coordinate image with the normalized standard deviation value as a radius and the corresponding coordinate angle as a polar angle; a second construction module configured to construct a correlation matrix according to the correlation coefficient between each of the gas sensors, and construct a 3D heat map image with the numerical value of an element in the correlation matrix as a Z axis, the number of the gas sensors as an X axis and a Y axis; a third construction module configured to construct an off-flavor detection model of a convolutional neural network comprising an input layer, three convolutional layers, three pooling layers, a full connection layer and an output layer; a training module configured to train the convolutional neural network through a phosphorus shrimp swarm optimization algorithm with the minimization of a mean square error loss function as an objective, adaptively adjust foraging movement, induced movement and random diffusion of phosphorus shrimp individuals, and iteratively optimize network parameters to determine optimal network parameters; a detection module configured to input the polar coordinate image and the 3D heat map image as different channels into the off-flavor detection model of the convolutional neural network, sequentially extract and reduce dimensions through the three convolutional layers and the three pooling layers, weight and fuse a feature map output by the three pooling layers to generate a target feature map according to a weight coefficient, perform off-flavor detection through the full connection layer, and output an off-flavor detection result.

2. The electronic nose system of claim 1, wherein, The calculation module is specifically configured to: calculate the standard deviation value of each of the gas sensors according to the digital signals; calculate the correlation coefficient between each of the gas sensors according to the digital signals.

3. The electronic nose system of claim 1, wherein, The first construction module is specifically configured to: normalize the standard deviation value of each of the gas sensors; determine a coordinate angle according to the number of each of the gas sensors; construct a polar coordinate image according to the coordinate angle and the normalized standard deviation value of each of the gas sensors.

4. The electronic nose system according to claim 1, wherein: in the first convolutional layer, the polar coordinate image and the 3D heat map image are subjected to feature extraction to generate a first local feature map; in the first pooling layer, a maximum pooling operation is performed on the first local feature map to generate a first pooling feature map; in the second convolutional layer, the first pooling feature map is subjected to feature extraction to generate a second local feature map; in the second pooling layer, a maximum pooling operation is performed on the second local feature map to generate a second pooling feature map; in the third convolutional layer, the second pooling feature map is subjected to feature extraction to generate a third local feature map; In the third pooling layer, a maximum pooling operation is performed on the third local feature map to generate a third pooled feature map; The first pooled feature map, the second pooled feature map and the third pooled feature map are weightedly fused to generate a target feature map; In the full connection layer, odor detection is performed according to the target feature map; In the output layer, an odor detection result is output.

5. The electronic nose system of claim 1, wherein, The training module is specifically configured to: Minimize a mean square error loss function to construct a target function; According to the target function, the convolutional neural network is trained by a brine shrimp swarm optimization algorithm to determine optimal network parameters of the convolutional neural network.

6. A method of detecting an off-flavour, using the electronic nose system according to claims 1-5, characterized in that, Comprise: S1: Collecting a plurality of gas signals through a plurality of gas sensors arranged in an electronic nose; S2: Converting each of the gas signals into a digital signal through a microcontroller arranged in the electronic nose; S3: Calculating the standard deviation of each gas sensor and the correlation coefficient between each gas sensor according to the digital signal; S4: Normalizing the standard deviation of each gas sensor, determining the coordinate angle according to the number of each gas sensor, and constructing a polar coordinate image with the normalized standard deviation as the radius and the corresponding coordinate angle as the polar angle; S5: Constructing a correlation matrix according to the correlation coefficient between each gas sensor, and constructing a 3D heat map image with the numerical value of the element in the correlation matrix as the Z axis, the gas sensor number as the X axis and the Y axis; S6: Constructing an odor detection model of a convolutional neural network comprising an input layer, three convolutional layers, three pooling layers, a full connection layer and an output layer; Minimizing a mean square error loss function to train the convolutional neural network by a brine shrimp swarm optimization algorithm, adaptively adjusting the foraging movement, induced movement and random diffusion of brine shrimp individuals, iteratively optimizing network parameters to determine optimal network parameters; S7: Inputting the polar coordinate image and the 3D heat map image as different channels into the odor detection model of the convolutional neural network, sequentially performing feature extraction and dimension reduction through three convolutional layers and three pooling layers, weightedly fusing the feature maps output by the three pooling layers to generate a target feature map, performing odor detection through a full connection layer, and outputting an odor detection result.

Citation Information

Patent Citations

  • Imaged liquor recognition method applicable to multiple electronic nose platforms

    CN108694375A

  • Method for predicting odor descriptor rating based on electronic nose

    CN112927763A

  • Method and system for detecting harmful gas in multi-component mixed gas

    CN118298409A

  • Smell identification method and system based on electronic nose

    CN118376656A