Electronic nose system and peculiar smell detection method

By calculating the standard deviation value and correlation coefficient of the gas-sensitive sensor, polar coordinate images and 3D heat map images are constructed, and convolutional neural network model is input, which solves the problems of inefficient efficiency and insufficient detection accuracy of traditional electronic nose systems, and achieves efficient and accurate odor recognition.

CN119555746AActive Publication Date: 2025-03-04ZHONGYAN TESTING CO LTD
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202411766359.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-04
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

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

Method used

By calculating the standard deviation value and correlation coefficient of the gas-sensitive sensor, polar coordinate images and 3D heat map images are constructed, and these images are input as channels to be detected in a convolutional neural network-based odor detection model.

Benefits of technology

It realizes odor identification that does not rely on standard database data, which is short time-consuming and efficient, and can make full use of the high-dimensional characteristics of multi-dimensional data, improve detection accuracy, and effectively distinguish similar odors from small differences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119555746A_ABST
    Figure CN119555746A_ABST
Patent Text Reader

Abstract

The invention provides an electronic nose system and a peculiar smell detection method, and relates to the technical field of gas peculiar smell detection.The system comprises an acquisition module used for acquiring a plurality of gas signals through a plurality of gas sensitive sensors; the conversion module is used for converting each gas signal into a digital signal through the microcontroller; the calculation module is used for respectively calculating standard deviation values of the gas sensors and correlation coefficients among the gas sensors according to the digital signals; the first construction module is used for constructing a polar coordinate image according to the standard deviation value of each gas sensor; the second construction module is used for constructing a 3D heat map image according to the correlation coefficients among the gas sensors; the third construction module is used for constructing an odor detection model based on a convolutional neural network; and the detection module is used for inputting the polar coordinate image and the 3D heat map image as different channels into a peculiar smell detection model based on a convolutional neural network for detection, and outputting a peculiar smell detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of gas odor detection, and in particular to an electronic nose system and an odor detection method. Background Art

[0002] With the development of society and the advancement of technology, the requirements for quality control in the environment and food are getting higher and higher, and the application of gas analysis technology in many fields has become increasingly widespread. Especially in the fields of food, chemical industry, environmental monitoring and medical diagnosis, the type and concentration of gas can reflect different quality states or disease conditions. Therefore, how to accurately and quickly detect the gas components in the air, especially the odor, has become a problem that needs to be solved urgently. The generation of odor is often closely related to environmental pollution, food deterioration, human health, etc. Therefore, accurate detection of odor components is of great significance to improving the quality of life and protecting public health.

[0003] In the prior art, traditional electronic nose systems usually rely on comparing data in a standard library to perform odor identification, which is time-consuming and inefficient.

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

[0005] In order to solve the technical problems that traditional electronic nose systems usually rely on comparing data in a standard library for odor identification, which is time-consuming and inefficient, and usually cannot fully utilize its potential high-dimensional features when processing multi-dimensional data, resulting in insufficient detection accuracy and inability to effectively distinguish similar odors and slight differences, the present invention provides an electronic nose system and an odor detection method.

[0006] The technical solution provided by the embodiment of the present invention is as follows:

[0007] First aspect:

[0008] An electronic nose system provided by an embodiment of the present invention includes:

[0009] A collection module, used for collecting multiple gas signals through multiple gas sensors arranged in the electronic nose;

[0010] A conversion module, used for converting each of the gas signals into a digital signal through a microcontroller arranged in the electronic nose;

[0011] A calculation module, used for calculating the standard deviation of each gas sensor and the correlation coefficient between each gas sensor according to the digital signal;

[0012] A first construction module is used to construct a polar coordinate image according to the standard deviation values ​​of each of the gas sensors;

[0013] A second construction module is used to construct a 3D thermal map image according to the correlation coefficients between the 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 thermal 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] Second aspect:

[0017] An odor detection method provided by an embodiment of the present invention includes:

[0018] S1: Collecting multiple gas signals through multiple gas sensors arranged in the electronic nose;

[0019] S2: converting each of the gas signals into a digital signal through a microcontroller disposed in the electronic nose;

[0020] S3: Calculating the standard deviation of each gas sensor and the correlation coefficient between each gas sensor according to the digital signal;

[0021] S4: constructing a polar coordinate image according to the standard deviation values ​​of each of the gas sensors;

[0022] S5: constructing a 3D thermal map image according to the correlation coefficients between the gas sensors;

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

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

[0025] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0026] In the present invention, by respectively calculating the standard deviation value of each gas sensor and the correlation coefficient between each gas sensor, a polar coordinate image is constructed according to the standard deviation value of each gas sensor, and a 3D thermal map image is constructed according to the correlation coefficient between each gas sensor, and the polar coordinate image and the 3D thermal map image are respectively input as different channels into the odor detection model based on the convolutional neural network for detection, so that odor identification can be performed without relying on the data in the comparison standard library, which is time-saving and efficient, and can generally make full use of its potential high-dimensional features when processing multi-dimensional data, with high detection accuracy, and can effectively distinguish similar odors and slight differences. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0028] Figure 1 A schematic diagram of the structure of an electronic nose system provided by an embodiment of the present invention;

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

[0030] Figure 3 A schematic flow chart of an odor detection method provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0032] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0033] Reference Manual Attached Figure 1 , showing a schematic structural diagram of an electronic nose system provided by an embodiment of the present invention.

[0034] The embodiment of the present invention provides an electronic nose system 20, comprising:

[0035] Reference Manual Attached Figure 2 , shows a working principle diagram of an electronic nose system provided by an embodiment of the present invention.

[0036] It should be noted that the electronic nose system is applicable to a variety of scenarios, including breath-testing drug detection (such as detecting drug metabolites through breath gas), food spoilage detection in the refrigerator (identifying volatile corruption gases), room drug detection (monitoring volatile drug gases), wine aroma inspection (such as identifying the authenticity and quality of wine), indoor tobacco storage detection (identifying tobacco odor and shielding the smell of burning tobacco), and plastic combustion gas monitoring (applicable to fire alarm and indoor air quality monitoring). The acquisition module 201 is used to collect multiple gas signals through multiple gas sensors arranged in the electronic nose.

[0037] It should be noted that the gas signal collected by the gas sensor is an electrical signal, and the electrical signal of the odor gas is collected by multiple gas sensors arranged in the electronic nose.

[0038] Specifically, a gas sensor array is deployed in the electronic nose. The gas sensor array includes multiple gas sensors, each of which is sensitive to a specific gas or gas component. When the 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 sensor array, multiple gas signals can be obtained simultaneously.

[0039] In the present invention, by collecting different gas signals simultaneously through multiple sensors, the 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 deal with possible failures or instabilities of individual sensors, ensuring the reliability and stability of the overall system. Through the collaborative work of multiple sensors, the system can better distinguish and identify different types of gases or gas mixtures, thereby achieving more efficient gas classification and identification in complex gas environments.

[0040] The conversion module 202 is used to convert each gas signal into a digital signal through a microcontroller arranged in the electronic nose.

[0041] Optionally, the microcontroller is a PIC18F46K80.

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

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

[0044] In the present invention, the fast data processing capability of the microcontroller enables the electronic nose system to process the signals collected by the gas sensor in real time, realize instant gas detection and response, and is suitable for environmental monitoring and safety detection applications that require fast response. The built-in 12-bit analog-to-digital converter (ADC) of the PIC18F46K80 microcontroller can convert analog signals into digital signals with high precision, thereby ensuring the accurate collection and processing of gas signals by the electronic nose system and improving the recognition accuracy of the system.

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

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

[0047] In a possible implementation, the calculation module 203 is specifically configured to:

[0048] According to the digital signal, calculate the standard deviation of each gas sensor:

[0049]

[0050] Wherein, σ 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] According to the digital signal, calculate the correlation coefficient between each gas sensor:

[0052]

[0053] Among them, r ij represents the correlation coefficient between the i-th gas sensor and the j-th gas sensor, X irepresents the digital signal of the i-th gas sensor, μ i Represents the average value of the digital signal of the gas sensor, X j represents the digital signal of the jth gas sensor, μ j Indicates the average value of the digital signal of the gas sensor.

[0054] In the present invention, by calculating the standard deviation of each gas sensor, the response stability of each sensor to gas changes can be measured. Sensors with larger standard deviations may have higher noise or instability, and the system can identify and process noise data accordingly to improve data quality. Correlation coefficient calculation can measure the signal similarity between different sensors and help the system identify which sensors are complementary in response and which sensors' signals are redundant. By calculating the correlation coefficient, the system can better fuse the signals from multiple sensors and improve the overall gas recognition capability.

[0055] The first constructing module 204 is used to construct a polar coordinate image according to the standard deviation values ​​of each gas sensor.

[0056] It should be noted that the polar coordinate image is a visualization graphic based on the polar coordinate system, which is used to show the distribution characteristics of data in the polar coordinate system. Each data point is represented by two parameters: polar diameter and polar angle. The polar diameter usually represents the size or intensity of the data, such as the normalized standard deviation of a gas sensor, and the polar angle is distributed in the range of 0 to 2π according to the sequence number or classification of the data. Polar coordinate images are suitable for displaying the global distribution of multidimensional data. In electronic noses, they can intuitively represent the changing pattern of sensor responses and are used for pattern recognition tasks such as odor detection.

[0057] In the present invention, the polar coordinate image can intuitively display the standard deviation values ​​of different gas sensors, reflecting the response strength and stability of the sensor to gas changes. By converting the sensor response into an image, the differences and commonalities between the sensors can be clearly observed, making it easier to identify and analyze gas signals.

[0058] In a possible implementation, the first building module 204 is specifically configured to:

[0059] Normalize the standard deviation of each gas sensor:

[0060]

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

[0062] Determine the coordinate angle according to the number of each gas sensor:

[0063]

[0064] Among them, θ i represents the coordinate angle of the i-th gas sensor, and N represents the total number of gas sensors.

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

[0066] In the present invention, the normalized standard deviation value scales the sensor response data to a uniform range, which helps to eliminate the scale inconsistency problem caused by sensitivity differences of different sensors, so that the data of each sensor can be compared and analyzed on the same scale, improving the consistency and operability of the data. By combining the normalized standard deviation value with the coordinate angle to construct a polar coordinate image, multidimensional data (the response of multiple sensors) can be converted into a distribution in a two-dimensional space, which is convenient for intuitive display and analysis. The data of each sensor is represented as a point in the polar coordinate diagram, making the response pattern of the gas sensor more intuitive and easy to understand, and suitable for pattern recognition and gas classification tasks.

[0067] Among them, the method for constructing the polar coordinate image is specifically as follows:

[0068] According to the coordinate angle, the polar coordinate image is constructed by taking the normalized standard deviation of each gas sensor as the coordinate radius.

[0069] Specifically, first, the standard deviation of each gas sensor is calculated and normalized, and the standard deviation is scaled to the range of [0,1] as the radius in polar coordinates. Then, the corresponding coordinate angle is assigned according to the number of the gas sensor, which is usually evenly distributed in the range of [0,2π]. Next, 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 draw the data points in the polar coordinate system. Finally, by connecting all the points, a polar coordinate image reflecting the response characteristics of the gas sensor is generated, which intuitively displays the signal change pattern of each sensor.

[0070] In the present invention, polar coordinate images can effectively fuse the data of multiple sensors by mapping the response characteristics of multiple sensors into the same coordinate system, avoiding the problem of needing to process multiple complex data dimensions in the traditional method, and simplifying the data processing and analysis process. Polar coordinate images can more clearly show the response pattern of the sensor to gas changes, especially in the case of multiple gases or gases of different concentrations. Through this image, the electronic nose system can more effectively identify the type and concentration of the gas, thereby improving the accuracy and efficiency of pattern recognition.

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

[0072] It should be noted that a 3D heat map is an image that displays the correlation or distribution characteristics between data in a three-dimensional visualization. It is based on a three-dimensional space, where the X-axis and Y-axis represent the category or index of the data, such as the number of the gas sensor, and the Z-axis represents the numerical intensity of the data, such as the correlation coefficient between sensors. The color usually corresponds to the Z-axis value and is used to intuitively reflect the difference between data points. In an electronic nose, a 3D heat map can be used to represent the correlation distribution between sensors, help analyze the cooperation mode and signal characteristics of the sensors, and provide more intuitive information support for gas identification and classification.

[0073] In the present invention, through the 3D heat map, it is possible to clearly see how different sensors interact and work together, especially in a multi-sensor configuration, which can help identify redundant information or complementarity between sensors. This helps to optimize sensor selection and configuration, and improve the detection performance and efficiency of the overall system.

[0074] In a possible implementation manner, the second building module 205 is specifically used to:

[0075] According to the correlation coefficients between various gas sensors, a correlation matrix is ​​constructed.

[0076] Optionally, construct a correlation matrix according to the following formula:

[0077]

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

[0079] Based on the correlation matrix, a 3D heat map image is constructed.

[0080] In the present invention, by constructing a correlation matrix, the correlation between gas sensors can be fully reflected, revealing the similarities and differences of sensor response signals. The correlation coefficient between each pair of sensors provides information about their similarities in gas response patterns, which helps to analyze which sensors have redundant information and which sensors provide different signal characteristics. Constructing a 3D thermal map image intuitively 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 the 3D thermal map image is as follows:

[0082] According to the correlation matrix, a 3D thermal map image is constructed with the correlation coefficients between the gas sensors as the Z axis and the numbers of the gas sensors as the X axis or Y axis.

[0083] Specifically, first, the correlation matrix is ​​calculated based on the correlation coefficient of the gas sensor. Each element of the matrix represents the correlation coefficient r between two sensors. ij Then, the sensor numbers are assigned as the coordinates of the X-axis and Y-axis, and the rows and columns of the matrix correspond to the sensor numbers respectively. Finally, the correlation coefficient r ij Mapped to the value of the Z axis, the strength of the correlation is intuitively displayed using color or height. The higher the correlation coefficient (close to 1), the brighter the color or the higher the height, and the lower (close to 0 or negative value), the darker or lower. By plotting these data points in a three-dimensional coordinate system, a 3D heat map image reflecting the correlation between sensors is generated, which is used to analyze the collaborative mode of sensor signals.

[0084] In the present invention, by analyzing the 3D thermal map images, it is possible to evaluate which sensors have high redundancy and which sensors can provide unique and useful signals. In this way, the system can optimize the sensor configuration according to the correlation between sensors, avoid redundant data, and improve data processing efficiency. It helps multi-sensor data fusion strategy and improves the accuracy of gas detection. The 3D thermal map provides important visualization support for subsequent pattern recognition and classification tasks. By analyzing the correlation distribution between sensors, the system can identify the characteristics of different gases and the cooperation mode 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 should be noted that Convolutional Neural Network (CNN) is a deep learning model designed for processing images and other gridded data (such as time series or audio). CNN extracts local features through convolution layers, reduces data dimensions and computational complexity through pooling layers, and finally completes classification or regression tasks through fully connected layers. Its core is the convolution operation, which can reduce the number of parameters through a shared weight mechanism and gradually extract low-level to high-level features of data through a multi-layer structure. CNN is widely used in image recognition, speech processing, pattern detection and other fields. In the odor detection of electronic noses, CNN can learn features in polar coordinate images and 3D thermal map images for efficient gas classification and odor recognition.

[0087] In the present invention, a convolutional neural network (CNN) can automatically extract meaningful features from input data (such as polar coordinate images and 3D thermal map images). Traditional image processing methods require manual feature extraction, while CNN can gradually extract features from low-level to high-level (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 the polar coordinate image and the 3D thermal map image as different channels into the odor detection model based on the convolutional neural network for detection, and output the odor detection result.

[0089] Specifically, polar coordinate images and 3D thermal map images are input into the model as independent channels respectively, and the characteristics of complex gases are identified using a deep learning algorithm, thereby achieving accurate classification and identification of gases, and outputting the final gas category as the odor detection result.

[0090] In the present invention, different types of images (such as polar coordinate images and 3D thermal map images) can show different characteristics of gas sensors. Using them as independent channel inputs allows CNN to process and learn these two different features separately, thereby improving the system's recognition accuracy for complex gases or odors. In this way, the model can capture richer patterns and details, improving the effect of gas classification and odor detection.

[0091] In a 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 layer includes a first convolutional layer, a second convolutional layer, and a third convolutional layer, the pooling layer includes a first pooling layer, a second pooling layer, and a third pooling layer, and the detection module 207 is specifically used to:

[0092] In the input layer, polar coordinate images and 3D heat map images are input.

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

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

[0095] In the first pooling layer, a maximum pooling operation is performed on the first local feature map to generate a first pooling feature map.

[0096] It should be noted that the first pooling layer is a pooling layer including a 2×2 maximum pooling window and a step size of 2.

[0097] In the second convolutional layer, feature extraction is performed on the first pooled feature map to generate a 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, a maximum pooling operation is performed on the second local feature map to generate a second pooled feature map.

[0100] It should be noted that the second pooling layer is a pooling layer including a 2×2 maximum pooling window and a step size of 2.

[0101] In the third convolutional layer, feature extraction is performed on the second pooled feature map to generate a 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, a maximum pooling operation is performed on the third local feature map to generate a third pooling feature map.

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

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

[0106]

[0107] Among them, H represents the target feature map, W1 represents the weight coefficient of the first pooling feature map, A represents the activation function, P1 represents the first pooling feature map, Represents a concatenation operation, 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] In the fully connected layer, odor detection is performed based on the target feature map.

[0109] In the output layer, the odor detection results are output.

[0110] In the present invention, CNN extracts features from low-level to high-level through multiple convolution layers. The first convolution layer uses a large convolution kernel to extract rough features, and the subsequent layers use small convolution kernels to extract more detailed features. This layered approach improves the accuracy and robustness of gas recognition. The pooling layer reduces the data dimension, retains important features, reduces the risk of overfitting and improves computational efficiency. By weighted fusion of multiple feature maps, CNN extracts key features from different dimensions, improves expression capabilities, and adapts to different gas modes. Finally, odor detection is performed through a fully connected layer and the results are output. The multi-layer structure and weighted fusion improve recognition accuracy and stability.

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

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

[0113] It should be noted that the Krill Herd Algorithm (KH) is a global optimization algorithm based on the behavior of krill groups in nature, which simulates the collaborative mechanism of krill in foraging and group movement. The algorithm implements search through three key behaviors: foraging movement (exploring the target area), induced movement (group collaboration) and physical diffusion (randomness enhances search diversity). These behaviors are modeled as mathematical formulas to dynamically adjust the position of each "krill" to optimize the objective function. In the convolutional neural network training of the electronic nose, the krill swarm optimization algorithm is used to find the optimal values ​​of the network parameters to minimize the loss function and improve the classification accuracy and stability of the model. Its advantage is that it can effectively balance global search and local development to avoid falling into the local optimal solution.

[0114] In the present invention, the krill swarm optimization algorithm can effectively achieve a balance between global search and local development by simulating three behaviors of krill (foraging movement, induced movement, and physical diffusion). In CNN training, the optimization algorithm needs to adjust a large number of parameters. KH can avoid falling into the local optimal solution, making it more likely to find the global optimal solution and improve the performance and classification accuracy of the model. The KH algorithm reduces the workload of manually adjusting network hyperparameters by automatically optimizing network parameters. Compared with the traditional manual parameter adjustment method, KH can automatically search for the appropriate parameter combination without the need for expert knowledge, making the training process of the convolutional neural network more efficient and convenient.

[0115] In a possible implementation, the training module 208 is specifically used to:

[0116] With the goal of minimizing the mean square error loss function, construct the objective function:

[0117]

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

[0119] According to the objective function, the convolutional neural network is trained through the krill swarm optimization algorithm to determine the optimal network parameters of the convolutional neural network.

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

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

[0122] An initial population is randomly generated, which includes multiple krill individuals, and each krill individual represents a feasible set of network parameters of a convolutional neural network.

[0123] The objective function is used as the fitness function to calculate the fitness value of each krill individual, and the krill individual with the maximum fitness value is used as the current krill individual.

[0124] Adaptively adjust foraging motion and induced motion according to the current iteration number:

[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 represents the foraging movement of the i-th krill individual, V f represents the foraging speed, β i represents the foraging direction of the i-th krill individual, w f represents the inertia weight of the foraging motion with a value range of [0,1], F i old represents the last foraging movement of the i-th krill individual, β i food represents the current best foraging direction to attract the i-th krill individual, β i best represents the historical best foraging direction to attract the i-th krill individual, K i' represents the induced motion of the i-th krill individual after adaptive adjustment, K i represents the induced motion of the i-th krill individual, K max represents the maximum induced velocity, a i represents the induction factor of the i-th krill individual, w n represents the inertia weight of the induced motion with a value range of [0,1], represents the last induced movement of the i-th krill individual.

[0130] Update the current krill individual according to the adaptively adjusted foraging movement and induced movement:

[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 represents the i-th krill individual, t represents the time, Δt represents the step length when the krill individual is updated, and D i represents the random diffusion rate of the i-th krill individual, D max represents the maximum diffusion speed, and δ represents the random disturbance factor with a value range of [-1,1].

[0134] Calculate the fitness value of the updated krill individual and compare the fitness value of the updated krill individual with the fitness value of the current krill individual. When the fitness value of the updated krill individual is greater than the fitness value of the current krill individual, replace the current krill individual with the updated krill individual. When the fitness value of the updated krill individual is less than the fitness value of the current krill individual, keep the current krill individual unchanged.

[0135] Through the crossover operator, some krill individuals are randomly selected for crossover operation to generate new krill individuals:

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

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

[0138] It should be noted that the crossover operator is a mechanism borrowed from genetic algorithms, which is used to realize information exchange between individuals in the optimization algorithm, thereby generating the next generation of individuals with mixed characteristics. In the krill swarm optimization algorithm, the crossover operator generates new krill individuals by randomly selecting two or more krill individuals (solution vectors) for combination. Through the crossover operation, the new krill individuals inherit the characteristics of the original individuals, improve the diversity of the population, help explore a wider search space and avoid falling into the local optimal solution.

[0139] Use the generated new krill individuals to replace some of the krill individuals in the population.

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

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

[0142] In the present invention, the KH algorithm optimizes the parameters of CNN, such as convolution kernels and weights, by taking the objective function (such as the mean square error loss function) as the fitness function, to ensure the best parameter combination in gas identification and odor detection tasks. Compared with the gradient descent method, KH can search the fitness space more comprehensively, improve the training effect and simplify the parameter adjustment process. KH adaptively adjusts foraging and induced movements according to the number of iterations, relying on exploratory behavior in the early stage and group experience in the later stage, thereby accelerating convergence and maintaining diversity, avoiding premature convergence, optimizing CNN parameters, and improving efficiency and accuracy. KH enhances population diversity through crossover operators, helps the model jump out of the local optimal solution, enhances robustness, and ensures that the model can cope with unknown patterns and abnormal data in complex gas detection.

[0143] Optionally, based on the odor detection results, an alarm mechanism is triggered when necessary:

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

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

[0146] (2) When the electronic nose detection results show 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) Sound alarm: When the concentration of harmful gases detected exceeds the set threshold, the system will issue a sound signal through a speaker or buzzer to warn. The intensity of the sound alarm can be adjusted according to the detected concentration level. For example, when the gas concentration is low, the buzzer sound is intermittent and the frequency is low; when the concentration reaches a dangerous level, the alarm sound is continuous and the frequency is significantly increased. For drug detection, the system can distinguish drug alarms from general toxic gas alarms through unique tones or frequencies so that users can quickly identify them.

[0149] (2) Visual alarm: The system displays alarm information on the device display or prompts the user through the color change of the LED light. Different colors can represent different alarm levels, such as red for danger, yellow for warning, and green for normal status. For drug detection, the display can directly display detailed information such as the type of drug detected, concentration value, and danger level. For example, the display content can be: "Cannabis volatile gas detected, concentration: high danger."

[0150] It should be noted that those skilled in the art can set the alarm triggering conditions and alarm mechanism according to actual needs, and the present invention is not limited thereto.

[0151] In the present invention, when the 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 (such as the frequency of the sound, the color of the LED light) is adjusted according to the gas concentration level, so that the user can quickly judge the degree of danger and avoid unnecessary panic or misjudgment caused by excessive alarms or ambiguous information. Through unique tones and detailed information displayed on the screen (such as drug type and concentration), it is convenient for users to quickly understand the source of the problem and take targeted measures, which is particularly suitable for law enforcement or security monitoring applications.

[0152] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0153] In the present invention, by respectively calculating the standard deviation value of each gas sensor and the correlation coefficient between each gas sensor, a polar coordinate image is constructed according to the standard deviation value of each gas sensor, and a 3D thermal map image is constructed according to the correlation coefficient between each gas sensor, and the polar coordinate image and the 3D thermal map image are respectively input as different channels into the odor detection model based on the convolutional neural network for detection, so that odor identification can be performed without relying on the data in the comparison standard library, which is time-saving and efficient, and can generally make full use of its potential high-dimensional features when processing multi-dimensional data, with high detection accuracy, and can effectively distinguish similar odors and slight differences.

[0154] Reference Manual Attached Figure 3 , showing a schematic flow chart of an odor detection method provided by the present invention.

[0155] The present invention also provides a method for detecting odor, comprising:

[0156] S1: Collect multiple gas signals through multiple gas sensors set in the electronic nose.

[0157] S2: Each gas signal is converted into a digital signal through a microcontroller arranged in the electronic nose.

[0158] S3: Calculate the standard deviation of each gas sensor and the correlation coefficient between each gas sensor according to the digital signal.

[0159] S4: Construct a polar coordinate image according to the standard deviation values ​​of each gas sensor.

[0160] S5: construct a 3D thermal map image according to the correlation coefficients between the gas sensors.

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

[0162] S7: The polar coordinate image and the 3D thermal map image are respectively input as different channels into the odor detection model based on the convolutional neural network for detection, and the odor detection result is output.

[0163] Furthermore, S3 specifically includes:

[0164] S301: Calculate the standard deviation of each gas sensor according to the digital signal:

[0165]

[0166] Wherein, σ 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 coefficients between the gas sensors based on the digital signal:

[0168]

[0169] Among them, r ij represents the correlation coefficient between the i-th gas sensor and the j-th gas sensor, X i represents the digital signal of the i-th gas sensor, μ i Represents the average value of the digital signal of the gas sensor, X jrepresents the digital signal of the jth gas sensor, μ j Indicates the average value of the digital signal of 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 ith gas sensor after normalization, max() represents the maximum value, min() represents the minimum value, σ i Represents the standard deviation value of the i-th gas sensor.

[0174] S402: Determine the coordinate angle according to the number of each gas sensor:

[0175]

[0176] Among them, θ i represents the coordinate angle of the i-th gas sensor, and N represents the total number of gas sensors.

[0177] S403: constructing a polar coordinate image according to the coordinate angles and the normalized standard deviation values ​​of each gas sensor.

[0178] Furthermore, the method for constructing the polar coordinate image is specifically as follows:

[0179] According to the coordinate angle, the polar coordinate image is constructed by taking the normalized standard deviation of each gas sensor as the coordinate radius.

[0180] Furthermore, S5 specifically includes:

[0181] S501: Construct a correlation matrix according to the correlation coefficients between the gas sensors.

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

[0183] Furthermore, the method for constructing the 3D heat map image is specifically as follows:

[0184] According to the correlation matrix, a 3D thermal map image is constructed with the correlation coefficients between the gas sensors as the Z axis and the numbers of the gas sensors 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 layer includes a first convolutional layer, a second convolutional layer, and a third convolutional layer. The pooling layer includes a first pooling layer, a second pooling layer, and a third pooling layer. S7 specifically includes:

[0186] S701: In the input layer, a polar coordinate image and a 3D thermal map image are input.

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

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

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

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

[0191] S706: In the third convolutional layer, feature extraction is performed on the second pooled feature map to generate a third local feature map.

[0192] S707: In the third pooling layer, perform a maximum pooling operation on the third local feature map to generate a third pooled feature map.

[0193] S708: Perform weighted fusion on the first pooling feature map, the second pooling feature map, and the third pooling feature map to generate a target feature map:

[0194]

[0195] Among them, H represents the target feature map, W1 represents the weight coefficient of the first pooling feature map, A represents the activation function, P1 represents the first pooling feature map, Represents a concatenation operation, 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: In the fully connected layer, odor detection is performed based on the target feature map.

[0197] S710: In the output layer, output the odor detection result.

[0198] Furthermore, the odor detection method also includes:

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

[0200] Furthermore, S8 specifically includes:

[0201] S801: With the goal of minimizing the mean square error loss function, construct the objective function:

[0202]

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

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

[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 repetition, the present invention will not go into details.

[0206] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0207] In the present invention, by respectively calculating the standard deviation value of each gas sensor and the correlation coefficient between each gas sensor, a polar coordinate image is constructed according to the standard deviation value of each gas sensor, and a 3D thermal map image is constructed according to the correlation coefficient between each gas sensor, and the polar coordinate image and the 3D thermal map image are respectively input as different channels into the odor detection model based on the convolutional neural network for detection, so that odor identification can be performed without relying on the data in the comparison standard library, which is time-saving and efficient, and can generally make full use of its potential high-dimensional features when processing multi-dimensional data, with high detection accuracy, and can effectively distinguish similar odors and slight differences.

[0208] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0209] There are a few points to note:

[0210] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention, and other structures may refer to the general design.

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

[0212] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.

[0213] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. An electronic nose system, characterized in that: include: A collection module, used for collecting multiple gas signals through multiple gas sensors arranged in the electronic nose; A conversion module, used for converting each of the gas signals into a digital signal through a microcontroller arranged in the electronic nose; A calculation module, used for calculating the standard deviation of each gas sensor and the correlation coefficient between each gas sensor according to the digital signal; A first construction module is used to construct a polar coordinate image according to the standard deviation values ​​of each of the gas sensors; A second construction module is used to construct a 3D thermal map image according to the correlation coefficients between the gas sensors; The third building module is used to build an odor detection model based on a convolutional neural network; The detection module is used to input the polar coordinate image and the 3D thermal map image as different channels into the odor detection model based on the convolutional neural network for detection, and output the odor detection result.

2. The electronic nose system according to claim 1, characterized in that: The calculation module is specifically used for: Calculating the standard deviation of each of the gas sensors according to the digital signal; The correlation coefficients between the gas sensors are calculated according to the digital signal.

3. The electronic nose system according to claim 1, characterized in that: The first building block is specifically used for: Normalizing the standard deviation of each gas sensor; Determining the coordinate angle according to the serial number of each gas sensor; A polar coordinate image is constructed according to the coordinate angles and the normalized standard deviation values ​​of the gas sensors.

4. The electronic nose system according to claim 3, characterized in that: The method for constructing the polar coordinate image is specifically as follows: According to the coordinate angle, the polar coordinate image is constructed by taking the normalized standard deviation value of each gas sensor as the coordinate radius.

5. The electronic nose system according to claim 1, characterized in that: The second building block is specifically used for: Constructing a correlation matrix according to the correlation coefficients between the gas sensors; Based on the correlation matrix, a 3D heat map image is constructed.

6. The electronic nose system according to claim 5, characterized in that: The method for constructing the 3D thermal map image is specifically as follows: According to the correlation matrix, the 3D thermal map image is constructed by taking the correlation coefficient between each gas sensor as the Z axis and the serial number of each gas sensor as the X axis or the Y axis.

7. The electronic nose system according to claim 1, characterized in that: The convolutional neural network includes an input layer, multiple convolutional layers, multiple pooling layers, a fully connected layer and an output layer, the convolutional layer includes a first convolutional layer, a second convolutional layer and a third convolutional layer, the pooling layer includes a first pooling layer, a second pooling layer and a third pooling layer, and the detection module is specifically used for: In the input layer, the polar coordinate image and the 3D thermal map image are input; In the first convolutional layer, feature extraction is performed on the polar coordinate image and the 3D thermal map image to generate a first local feature map; In the first pooling layer, performing a maximum pooling operation on the first local feature map to generate a first pooling feature map; In the second convolutional layer, feature extraction is performed on the first pooled feature map to generate a second local feature map; In the second pooling layer, performing a maximum pooling operation on the second local feature map to generate a second pooling feature map; In the third convolutional layer, feature extraction is performed on the second pooled feature map to generate a third local feature map; In the third pooling layer, performing a maximum pooling operation on the third local feature map to generate a third pooling feature map; Performing weighted fusion on the first pooling feature map, the second pooling feature map, and the third pooling feature map to generate a target feature map; In the fully connected layer, odor detection is performed according to the target feature map; In the output layer, the odor detection result is output.

8. The electronic nose system according to claim 1, characterized in that: Also includes: The training module is used to train the convolutional neural network by a krill swarm optimization algorithm with the goal of minimizing the mean square error loss function, and determine the optimal network parameters of the convolutional neural network.

9. The electronic nose system according to claim 8, characterized in that: The training module is specifically used for: Construct the objective function with the goal of minimizing the mean square error loss function; According to the objective function, the convolutional neural network is trained by a krill swarm optimization algorithm to determine the optimal network parameters of the convolutional neural network.

10. A method for detecting odor, characterized in that: include: S1: Collecting multiple gas signals through multiple gas sensors arranged in the electronic nose; S2: converting each of the gas signals into a digital signal through a microcontroller disposed 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: constructing a polar coordinate image according to the standard deviation values ​​of each of the gas sensors; S5: constructing a 3D thermal map image according to the correlation coefficients between the gas sensors; S6: Construct an odor detection model based on convolutional neural network; S7: respectively input the polar coordinate image and the 3D thermal map image as different channels into the odor detection model based on the convolutional neural network for detection, and output the odor detection result.

Citation Information

Patent Citations

  • System and method for detecting milk freshness based on electronic nose

    CN104792826A

  • Method for predicting odor descriptor rating based on electronic nose

    CN112927763A

  • Health state correlation model construction method and system based on human body smell signal

    CN114067190A

  • Blowout site gas burning and explosion analysis method based on multi-parameter data fusion

    CN115099337A

  • Gas detection model training method and device based on electronic nose, medium and equipment

    CN115984624A