A multi-parameter compensation type combustible gas detection method and system based on the principle of thermal conductivity coefficient

By employing a multi-parameter compensation method based on the principle of thermal conductivity, combined with environmental isolation and dynamic correction by an embedded processor, the sensitivity and durability issues of combustible gas detectors in complex environments are resolved, achieving high-precision gas detection and reducing operation and maintenance costs.

CN120629281BActive Publication Date: 2026-02-06SHENZHEN MODA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510984403.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-17
Publication Date
2026-02-06
Estimated Expiration
2045-07-17

AI Technical Summary

Technical Problem

Existing combustible gas detectors suffer from insufficient sensitivity, high false alarm rate, high maintenance cost, and limited device durability, especially in environments with drastic humidity or temperature fluctuations where they are prone to drift errors.

Method used

A multi-parameter compensation method based on the principle of thermal conductivity is adopted. The change of gas thermal conductivity is measured by a thermal conductivity detector. Combined with environmental isolation technology, a constant temperature and humidity are maintained in the detection cavity. The gas concentration is dynamically corrected in real time using an embedded processor and a compensation algorithm model. A BP neural network model with particle swarm optimization is used for temperature and humidity compensation.

Benefits of technology

It improves the sensitivity and reliability of combustible gas detection, reduces false alarm rate, reduces operation and maintenance costs, and enhances device durability and detection accuracy in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120629281B_ABST
    Figure CN120629281B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of multi-parameter compensation combustible gas detection method and system based on thermal conductivity principle.The method comprises: using thermal conductivity detector to measure target gas thermal conductivity change to calculate gas concentration;Using environmental isolation technology to maintain constant temperature and humidity in detection cavity;Through embedded processor, data is collected, and the concentration calculation result of gas is dynamically corrected based on pre-trained compensation algorithm model;According to the concentration value after compensation, graded alarm control is executed.The compensation algorithm model uses BP neural network model based on particle swarm optimization algorithm.The system includes power supply circuit, communication interface, thermal conductivity sensor module, constant temperature and humidity detection cavity, embedded processor and compensation algorithm module, linkage control module, and software multi-task hierarchical scheduling framework is also constructed.The present application is suitable for hydrogen detection, and can effectively improve the accuracy and reliability of gas detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gas detection technology, and in particular to a combustible gas detection method and system based on the principle of thermal conductivity and combined with dynamic compensation of environmental parameters, which is suitable for high-precision detection of flammable and explosive gases such as hydrogen. Background Technology

[0002] Combustible gas detectors are safety devices that monitor the concentration of combustible substances in the environment. Currently, mainstream products are mainly based on three technological routes: semiconductor, infrared, and catalytic combustion. Their development goals all focus on improving the accuracy and response speed of fire warnings, and they generally possess advantages such as early warning, multi-functional integration, and strong environmental adaptability. However, existing technologies still have common shortcomings, including insufficient sensitivity, high false alarm rates, high maintenance costs, and limited device durability.

[0003] The disadvantages of the existing technical solutions are: (1) the catalytic reaction is an irreversible reaction, which easily leads to poor equipment durability and short lifespan; (2) frequent calibration and maintenance are required, which is not conducive to cost reduction; (3) high power consumption and poor thermal stability: it needs to be continuously heated to high temperature, which consumes a lot of energy and is prone to drift error in environments with drastic fluctuations in humidity or temperature.

[0004] Therefore, there is an urgent need to develop a new method for detecting combustible gases that can solve the problems of low detection sensitivity and cross-interference. Summary of the Invention

[0005] In view of this, it is necessary to provide a multi-parameter compensation combustible gas detection method and system based on the principle of thermal conductivity, which can solve the problems of temperature interference, low sensitivity and cross interference through multi-parameter compensation and sensor structure optimization.

[0006] In a first aspect, embodiments of this application provide a multi-parameter compensated combustible gas detection method based on the principle of thermal conductivity, the method comprising:

[0007] Step S1: Measure the change in thermal conductivity of the target gas using a thermal conductivity detector. The thermal conductivity detector includes at least one pair of symmetrically arranged heating elements and temperature sensing elements. By detecting the change in thermal equilibrium state caused by the gas flowing through the detection cavity, the detector outputs an electrical signal difference and calculates the gas concentration based on the difference.

[0008] Step S2: The detection cavity is isolated from the external environment using environmental isolation technology. Temperature and humidity sensors and control modules are integrated into the cavity. A constant temperature and humidity environment inside the detection cavity is maintained through active temperature control elements and humidity adjustment units.

[0009] Step S3: The ambient temperature and humidity data and thermal conductivity signal are collected in real time by the embedded processor, and the gas concentration calculation results are dynamically corrected based on the pre-trained compensation algorithm model. The compensation algorithm model fits the mapping relationship between temperature gradient, humidity deviation and thermal conductivity signal drift through machine learning and outputs the compensated gas concentration value.

[0010] Step S4: Implement graded alarm control based on the compensated gas concentration value.

[0011] Optionally, in one implementation of the first aspect of the present invention, the thermal conductivity detector in step S1 adopts a Wheatstone bridge structure, wherein:

[0012] The heating element is a platinum wire, and the temperature sensing element is a thermistor or a thermopile.

[0013] The unbalanced voltage output by the bridge is linearly related to the gas concentration and is converted into the actual concentration value through a calibration curve.

[0014] Optionally, in one implementation of the first aspect of the present invention, the active temperature control element in step S2 is a semiconductor cooling chip or a micro heater, and the humidity adjustment unit maintains constant humidity by dry gas purging or adsorbent method.

[0015] Optionally, in one implementation of the first aspect of the present invention, the compensation algorithm model in step S3 is a BP neural network model based on particle swarm optimization algorithm, which is constructed through the following steps:

[0016] S3.1 Construct the BP neural network structure, including the settings of the input layer, hidden layer, output layer, and the number of nodes and layers in the hidden layer;

[0017] S3.2 Initialize particle swarm parameters, including population size, maximum number of iterations, weights, and learning factor;

[0018] S3.3 Update the velocity and position of the particles. During the iteration process, each particle updates its velocity and position based on its own historical best position pbest and the historical best position gbest of the entire population. The update rule combines the particle's velocity vector with individual and global optimal information to achieve a more efficient search.

[0019] S3.4 Optimize weights and learning factors. Through a non-linear dynamic weighting method, the algorithm has a strong global search capability in the early stage.

[0020] S3.5 Eligibility Check and Convergence Condition Judgment: After each iteration, an eligibility check is performed to determine whether the convergence conditions are met. Convergence conditions include reaching the maximum number of iterations, the fitness value stabilizing, or the error being less than a preset value. If the convergence conditions are met, the optimal solution is output; otherwise, the iteration continues.

[0021] S3.6 Backpropagation and Error Calculation: During the iteration process, the output error of the BP neural network is calculated through the backpropagation algorithm and used as the input of the fitness function. The error calculation result will be used to update the position and velocity of the particles, thereby continuously optimizing the weights and thresholds of the network.

[0022] S3.7 Result Analysis and Model Evaluation: After the iteration ends or the convergence condition is met, the final optimal solution is analyzed and evaluated. Evaluation indicators include prediction accuracy, convergence speed, and generalization ability.

[0023] Optionally, in one implementation of the first aspect of the present invention, step S3.4, optimizing weights and learning factors, uses a nonlinear dynamic weighting method to enable the algorithm to have strong global search capabilities in the initial stage, including:

[0024] The weight coefficient of the input node is selected based on the comparison between the fitness value and the average fitness value during the iteration. The expression is as follows:

[0025] ;

[0026] in, Indicates the first The input node generated in the next iteration The weight, These are the pre-set maximum and minimum weight thresholds, In order, in the th The average fitness value, minimum fitness value, and individual fitness value of the particle swarm are calculated in the next iteration;

[0027] Particle number The formulas for updating the velocity and position are:

[0028] ,

[0029] ,

[0030] in, It is a particle In the Speed ​​during the next iteration; It is the inertial weight, which controls the tendency of particles to maintain their original speed; These are learning factors, which control the step size of the particle's learning towards the individual optimum and the global optimum, respectively. yes A random number between these values ​​is used to introduce randomness.

[0031] ,

[0032] ,

[0033] in, , These are preset random learning factors, and , This represents the total number of iterations. As the number of iterations increases, It exhibits a linear decreasing trend. It exhibits a linear increasing trend, which can enhance the convergence of particles to the global optimum.

[0034] The compensation algorithm model is dynamically corrected using the following formula:

[0035] ,

[0036] in, The gas concentration after compensation; The original measured concentration; and These are the current temperature and relative humidity, respectively. and These are standard temperature and humidity reference values; and These are the temperature compensation coefficient and the humidity compensation coefficient, respectively, which were determined through experimental calibration.

[0037] Optionally, in one implementation of the first aspect of the present invention, the compensation algorithm model is trained using a machine learning method, including the following steps:

[0038] Collect thermal conductivity signal drift data under different temperature and humidity conditions;

[0039] A regression algorithm was used to fit the relationship between temperature and humidity and signal drift.

[0040] Deploy the trained model to an embedded processor to achieve real-time dynamic compensation;

[0041] The detection results are transmitted to the cloud platform via a LoRa wireless module. The platform generates a concentration trend warning report based on historical data and remotely calibrates the detector parameters. The method is applicable to hydrogen detection.

[0042] Optionally, in one implementation of the first aspect of the present invention, step S4, performing graded alarm control based on the compensated gas concentration value, includes:

[0043] When the gas concentration reaches the first preset threshold, a level one alarm is triggered and the following actions are taken:

[0044] S4.1, activate the audible and visual alarm device;

[0045] S4.2, Automatically start the exhaust system to dilute the gas;

[0046] S4.3, send a first alarm signal to the fire control panel containing the status of "low-explosive alarm" and "fan start";

[0047] When the gas concentration reaches a second preset threshold higher than the first preset threshold, a level two alarm is triggered and the following actions are taken:

[0048] S4.4, Immediately stop the exhaust system;

[0049] S4.5 sends a second alarm signal to the fire control panel, which includes the statuses of "high-explosive alarm" and "fan shutdown".

[0050] Secondly, embodiments of this application provide a multi-parameter compensated combustible gas detection system based on the principle of thermal conductivity, applied to the multi-parameter compensated combustible gas detection method based on the principle of thermal conductivity as described in the first aspect, including:

[0051] Power supply circuit composition: The detector has a 24V active output circuit, and the circuit board has both voltage monitoring and voltage conversion functions.

[0052] Communication interface: It has one RS485 communication interface, three relay inputs and outputs, and one CANBUS for inputting and outputting various alarm, start and stop signals of the detector;

[0053] Thermal conductivity sensor module: The thermal conductivity sensor module has a relatively comprehensive integration of functions, including temperature and humidity sensors, pressure sensors, and hydrogen sensors;

[0054] Constant temperature and humidity detection chamber: Employing environmental isolation technology, the detection chamber can maintain a specific temperature and humidity environment;

[0055] Embedded processor and compensation algorithm module: Intelligent algorithm automatically compensates for temperature and humidity differences;

[0056] The linkage control module controls a certain number of LED lights to display alarms, faults, and operating status.

[0057] Optionally, in one implementation of the second aspect of the present invention, the system further includes software module design to construct a software multi-task hierarchical scheduling framework, including:

[0058] The system adopts a front-end and back-end approach, scheduling each functional module based on time slices;

[0059] A single task is divided into a driver layer, an interface layer, and an application layer, which run independently but are interconnected.

[0060] The driver layer implements hardware driver initialization;

[0061] The interface layer receives and processes data;

[0062] The application layer analyzes the data and performs logical processing.

[0063] Thirdly, embodiments of this application provide an electronic device, including:

[0064] processor;

[0065] Memory used to store processor-executable instructions;

[0066] The processor is configured to implement the multi-parameter compensated combustible gas detection method based on the principle of thermal conductivity as described in the first aspect when executing the instructions.

[0067] Fourthly, embodiments of this application provide a computer-readable storage medium storing a program that instructs a device to execute the multi-parameter compensated combustible gas detection method based on the principle of thermal conductivity as described in the first aspect.

[0068] This invention relates to a multi-parameter compensated combustible gas detection method and system based on the principle of thermal conductivity. The method includes: measuring the change in thermal conductivity of the target gas using a thermal conductivity detector to calculate the gas concentration; maintaining a constant temperature and humidity within the detection chamber using environmental isolation technology; acquiring data through an embedded processor and dynamically correcting the gas concentration calculation results based on a pre-trained compensation algorithm model; and executing graded alarm control based on the compensated concentration value. The compensation algorithm model employs a BP neural network model based on particle swarm optimization. The system includes a power supply circuit, a communication interface, a thermal conductivity sensor module, a constant temperature and humidity detection chamber, an embedded processor and compensation algorithm module, and a linkage control module. A multi-task hierarchical scheduling framework is also constructed. This invention is applicable to hydrogen detection and can effectively improve the accuracy and reliability of gas detection.

[0069] Beneficial effects:

[0070] (1) Thermal conductivity principle optimization: Based on the advanced thermal conductivity coefficient reaction principle, the combustible gas detector adopts a cross hot wire structure. Referring to the dynamic measurement principle of the hot wire thermal conductivity tester, the symmetrical design suppresses environmental thermal disturbances, improves the detection sensitivity of low-concentration gases, and overcomes the defect of traditional thermal conductivity detectors being easily affected by temperature.

[0071] (2) Environmental isolation technology: By drawing on the closed temperature control scheme of industrial-grade temperature and humidity transmitters, the microenvironment of the detection cavity is maintained through active control module, thereby reducing the interference of external temperature and humidity fluctuations on thermal conductivity signals from a physical perspective.

[0072] (3) Adaptive algorithm compensation: Construct a particle swarm BP model with adaptive dynamic weights, and achieve high-precision dynamic correction through temperature and humidity compensation to solve the problem of the sharp drop in accuracy of the traditional thermal conductivity method in high humidity environment.

[0073] (4) Hierarchical alarm control strategy, linking the ventilation system and the fire control panel.

[0074] (5) System scalability: The system integrates RS485 / CANBUS communication, multi-sensor fusion and hierarchical software architecture, which is suitable for the detection of combustible gases such as hydrogen, reduces temperature drift error and significantly improves the detection reliability in complex environments. Attached Figure Description

[0075] Figure 1 This is a schematic flowchart of a multi-parameter compensated combustible gas detection method based on the principle of thermal conductivity, provided in an embodiment of this application.

[0076] Figure 2 This is a schematic diagram of the compensation algorithm model structure provided in an embodiment of this application.

[0077] Figure 3 This is a schematic diagram illustrating the implementation steps of the compensation algorithm provided in an embodiment of this application.

[0078] Figure 4 A flowchart illustrating the specific linkage process of the alarm triggering mechanism provided in one embodiment of this application.

[0079] Figure 5 A schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0080] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them.

[0081] It should be noted that, in the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.

[0082] It should be noted that in the embodiments of this application, the terms "first," "second," etc., are used only for descriptive purposes and should not be construed as indicating or implying relative importance, nor as indicating or implying order. Features specified as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0083] Based on the embodiments described in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0084] Example 1

[0085] Figure 1 This is a schematic flowchart of a multi-parameter compensated combustible gas detection method based on the principle of thermal conductivity, provided in an embodiment of this application.

[0086] like Figure 1 As shown, a multi-parameter compensated combustible gas detection method based on the principle of thermal conductivity includes:

[0087] Step S1: Measure the change in thermal conductivity of the target gas using a thermal conductivity detector. The thermal conductivity detector includes at least one pair of symmetrically arranged heating elements and temperature sensing elements. By detecting the change in thermal equilibrium state caused by the gas flowing through the detection cavity, it outputs an electrical signal difference and calculates the gas concentration based on the difference.

[0088] A thermal conductivity detector is a detection device based on the difference in thermal conductivity of gases. Its core structure includes at least one pair of symmetrically arranged heating elements and temperature sensing elements. When the target gas flows through the detection chamber, the temperature of the heating element changes due to the difference in thermal conductivity between different gases, resulting in a change in resistance. This change in resistance is converted into an electrical signal difference through circuits such as a Wheatstone bridge, ultimately outputting an electrical signal proportional to the gas concentration. For example, gases such as methane, hydrogen, and carbon dioxide can be detected by thermal conductivity detectors because their thermal conductivity differs from that of air. Furthermore, thermal conductivity detectors have high sensitivity for high-concentration gases (such as hydrogen) but lower sensitivity for low-concentration gases.

[0089] Specifically, the thermal conductivity detector in step S1 adopts a Wheatstone bridge structure, wherein:

[0090] The heating element is a platinum wire, and the temperature sensing element is a thermistor or thermopile. The unbalanced voltage output by the bridge circuit has a linear relationship with the gas concentration and is converted into the actual concentration value through a calibration curve. In practical applications, the resistance of the thermistor (such as a platinum wire or thermistor) as the heating element changes due to variations in the gas's thermal conductivity, leading to an imbalance in the bridge circuit. This unbalanced voltage is converted into an electrical signal that is easy to display and record through a signal conditioning circuit, ultimately enabling the detection of the gas concentration.

[0091] Step S2: The detection cavity is isolated from the external environment using environmental isolation technology. Temperature and humidity sensors and control modules are integrated into the cavity. A constant temperature and humidity environment is maintained inside the detection cavity through active temperature control elements and humidity adjustment units.

[0092] To ensure stable temperature and humidity within the detection chamber and prevent external environmental influences on the test results, the system employs environmental isolation technology. Temperature and humidity sensors and a control module are integrated within the detection chamber, maintaining a constant temperature and humidity environment through active temperature control elements and a humidity regulation unit. This environmental control technology effectively reduces the interference of temperature and humidity fluctuations on thermal conductivity measurements, thereby improving the stability and accuracy of the test. Furthermore, environmental isolation technology also prevents interference from external gases, ensuring the reliability of the test results.

[0093] Specifically, the active temperature control element in step S2 is a semiconductor cooling chip or a micro heater, and the humidity adjustment unit maintains constant humidity by dry gas purging or adsorbent method.

[0094] Step S3: The ambient temperature and humidity data and thermal conductivity signal are collected in real time by the embedded processor, and the gas concentration calculation results are dynamically corrected based on the pre-trained compensation algorithm model. The compensation algorithm model fits the mapping relationship between temperature gradient, humidity deviation and thermal conductivity signal drift through machine learning, and outputs the compensated gas concentration value.

[0095] The system uses an embedded processor to collect ambient temperature and humidity data and thermal conductivity signals in real time, and dynamically corrects the calculated gas concentration based on a pre-trained compensation algorithm model. The compensation algorithm model uses machine learning to fit the mapping relationship between temperature gradient, humidity deviation and thermal conductivity signal drift, and outputs the compensated gas concentration value.

[0096] Specifically, the compensation algorithm model in step S3 is a BP neural network model based on particle swarm optimization, which is constructed through the following steps:

[0097] Figure 2 This is a schematic diagram of the compensation algorithm model structure provided in an embodiment of this application. Figure 3 This is a schematic diagram illustrating the implementation steps of the compensation algorithm provided in an embodiment of this application.

[0098] like Figure 2-3 As shown in Figure S3.1, construct the BP neural network structure, including the settings of the input layer, hidden layer, output layer, and the number of nodes and layers in the hidden layer.

[0099] In constructing a backpropagation (BP) neural network, the network structure is typically determined based on the input and output characteristics of the specific problem. The number of nodes in the input layer usually corresponds to the feature dimension of the input data, while the number of nodes in the output layer corresponds to the number of categories or predicted values ​​of the output target. The number of nodes and layers in the hidden layers can be adjusted according to the complexity of the problem.

[0100] S3.2 Initialize particle swarm parameters, including population size, maximum number of iterations, weights, and learning factor.

[0101] The initialization parameters of the Particle Swarm Optimization (PSO) algorithm include population size, maximum number of iterations, inertia weight, and learning factors (c1, c2). The population size determines the number of particles in the search space, typically set between 20 and 80, with the specific value adjusted based on problem complexity and computational resources. The maximum number of iterations is one of the termination conditions for the algorithm, usually set between 100 and 500 to ensure the algorithm completes the search within a reasonable timeframe. The inertia weight controls the tendency of particles to maintain their original velocity; it is typically set to a higher value (e.g., 0.9) in the early stages of the search to enhance global search capabilities, and gradually decreased as the number of iterations increases to enhance local search capabilities. The learning factors c1 and c2 control the step size of the particles learning towards the individual optimum (pbest) and global optimum (gbest), respectively, and are typically set between 1.5 and 2.0.

[0102] S3.3 Update the velocity and position of particles. During the iteration process, each particle updates its velocity and position based on its own historical best position pbest and the historical best position gbest of the entire population. The update rule combines the particle's velocity vector with individual and global optimal information to achieve a more efficient search.

[0103] The particle's velocity and position updates are the core of the PSO algorithm. The formulas for updating the velocity and position are:

[0104] ,

[0105] ,

[0106] in, It is a particle In the Speed ​​during the next iteration; It is the inertial weight, which controls the tendency of particles to maintain their original speed; These are learning factors, which control the step size of the particle's learning towards the individual optimum and the global optimum, respectively. yes The random number between these values ​​is used to introduce randomness. Using the above formula, the particle updates its velocity and position in each iteration based on its own and the group's historical best positions, thus gradually approaching the global optimum.

[0107] S3.4 Optimize weights and learning factors. By using a non-linear dynamic weighting method, the algorithm has a strong global search capability in the early stages.

[0108] In particle swarm optimization (PSO) algorithms, optimizing weights and learning factors is crucial for improving performance. By dynamically adjusting inertia weights and learning factors nonlinearly, the algorithm can develop strong global search capabilities in the early stages and enhance local search capabilities in the later stages. For example, inertia weights can employ a linear decreasing strategy, gradually reducing from an initial value (e.g., 0.9) to a final value (e.g., 0.4) to balance global and local search capabilities. Learning factors c1 and c2 can also be dynamically adjusted based on changes in fitness values. For instance, maintaining a high c1 value in the early stages of the search enhances individual exploration capabilities, while increasing c2 values ​​in the later stages enhances global convergence. Furthermore, adaptive methods can be used to adjust learning factors, such as dynamically adjusting the values ​​of c1 and c2 based on particle fitness values ​​and historical best positions, to improve the algorithm's convergence speed and optimization accuracy.

[0109] Specifically, step S3.4, optimizing weights and learning factors, uses a non-linear dynamic weighting method to give the algorithm a strong global search capability in the initial stage, including:

[0110] The weight coefficient of the input node is selected based on the comparison between the fitness value and the average fitness value during the iteration. The expression is as follows:

[0111] ;

[0112] in, Indicates the first The input node generated in the next iteration The weight, These are the pre-set maximum and minimum weight thresholds, In order, in the th In each iteration, the average fitness value, minimum fitness value, and individual fitness value of the particle swarm are calculated. When an individual fitness value is higher than the average, it is assigned a larger weight to enhance the particle's exploration ability and prevent premature convergence. When an individual fitness value is lower than the average, it is assigned a smaller weight to suppress ineffective exploration and accelerate convergence.

[0113] In the early stages of the algorithm, due to the high diversity of the population, the fitness values ​​of most individuals are close to the average, and the weights are mostly taken as... This facilitates global search; as iterations progress, the differentiation of fitness values ​​intensifies, and weights are dynamically adjusted to balance exploration and development.

[0114] Particle number The formulas for updating the velocity and position are:

[0115] ,

[0116] ,

[0117] in, It is a particle In the Speed ​​during the next iteration; It is the inertial weight, which controls the tendency of particles to maintain their original speed; These are learning factors, which control the step size of the particle's learning towards the individual optimum and the global optimum, respectively. yes A random number between these values ​​is used to introduce randomness.

[0118] ,

[0119] ,

[0120] in, , These are preset random learning factors, and , This represents the total number of iterations. As the number of iterations increases, It exhibits a linear decreasing trend. It exhibits a linear increasing trend, which can enhance the convergence of particles towards the global optimum. Effect: Initially... Larger scale, emphasizes individual experience, and enhances global search; later stages Enhance and strengthen the guidance to achieve global optimality, thereby accelerating convergence.

[0121] Fitness-driven weight allocation: Weights are dynamically allocated by comparing an individual's fitness value with the average, avoiding the limitations of fixed thresholds. For example, in the early stages when fitness fluctuates greatly, weights tend to favor... During the convergence phase, it gradually turns to To achieve adaptive balance. Cooperative optimization of learning factors: and The dynamic adjustment forms a "explore first, develop later" strategy: Exploration phase (early iterations): Larger particles focus more on their individual historical best performance, preventing premature aggregation of the group. (Development phase, later iterations) Enhancement: Particles move closer to the global optimum, improving accuracy. A combination of randomness and determinism: random numbers. The introduction of inertial weights prevents the algorithm from getting trapped in local minima, while deterministic adjustments to the weights and learning factors ensure the direction of convergence. Function: Larger Preserves more historical speed, suitable for exploration; smaller Promote convergence. Dynamically adjust. It can be further optimized, for example, by incorporating adaptive adjustment based on the fitness change rate.

[0122] This software module design provides a solid foundation for the efficient operation of the entire system, and it has good application prospects, especially in scenarios with high requirements for real-time performance and accuracy, such as hydrogen detection.

[0123] The compensation algorithm model is dynamically corrected using the following formula:

[0124] ,

[0125] in, The gas concentration after compensation; The original measured concentration; and These are the current temperature and relative humidity, respectively. and These are standard temperature and humidity reference values; and These are the temperature compensation coefficient and humidity compensation coefficient, determined through experimental calibration. Using the above formulas, the compensation algorithm model can dynamically correct the gas concentration, improving measurement accuracy and stability.

[0126] S3.5 Qualification check and convergence condition judgment: After each iteration, a qualification check is performed to determine whether the convergence condition is met. The convergence condition includes reaching the maximum number of iterations, the fitness value stabilizing or the error being less than the preset value. If the convergence condition is met, the optimal solution is output; otherwise, the iteration continues.

[0127] Specifically, during the iterative process of the particle swarm optimization algorithm, convergence conditions need to be set to determine whether the algorithm has found a sufficiently good solution. Common convergence conditions include: Maximum number of iterations: The search stops after reaching a preset maximum number of iterations. Fitness value stabilizes: If the fitness value of a particle changes very little in several consecutive iterations, it indicates that the algorithm is close to the optimal solution. Error is less than a preset value: If the fitness value (e.g., error) of a particle is lower than a preset threshold, a satisfactory solution is considered to have been found. After each iteration, the algorithm checks these conditions. If any one of the conditions is met, the iteration stops and the optimal solution is output; otherwise, the iteration continues.

[0128] S3.6 Backpropagation and Error Calculation: During the iteration process, the output error of the BP neural network is calculated through the backpropagation algorithm and used as the input of the fitness function. The error calculation result will be used to update the position and velocity of the particles, thereby continuously optimizing the weights and thresholds of the network.

[0129] In the optimization process of the network, the backpropagation algorithm is used to calculate the network's output error and use it as input to the fitness function. Specifically, the output error of the BP neural network is calculated using the backpropagation algorithm, and the magnitude of the error reflects the network's predictive ability. The smaller the error value, the more accurate the network's prediction, and the higher the fitness value. In each iteration, the positions of the particles (i.e., the network's weights and thresholds) are updated based on the fitness value, thereby continuously optimizing the network's parameters and improving prediction accuracy.

[0130] S3.7 Result Analysis and Model Evaluation: After the iteration ends or the convergence condition is met, the final optimal solution is analyzed and evaluated. Evaluation indicators include prediction accuracy, convergence speed, and generalization ability.

[0131] After optimizing the BP neural network, the final optimal solution needs to be analyzed and evaluated to assess the model's performance. Commonly used evaluation metrics include: Prediction accuracy: measures the model's predictive ability on test data, typically using metrics such as mean squared error (MSE), mean absolute error (MAE), or coefficient of determination (R²). Convergence speed: measures the time required for the algorithm to find the optimal solution, usually evaluated by the number of iterations or the rate of change of fitness values. Generalization ability: measures the model's performance on unseen data, typically evaluated through cross-validation or hold-out methods. These metrics provide a comprehensive evaluation of the BP neural network's performance and a basis for subsequent optimization and improvement.

[0132] The compensation algorithm model is trained using machine learning methods, and includes the following steps:

[0133] Thermal conductivity signal drift data under different temperature and humidity conditions is collected. This data is acquired using sensors (such as a PT1000 temperature sensor and a LoRa wireless module) to train the model. The data includes environmental parameters such as temperature and humidity, along with their corresponding signal drift values.

[0134] Regression algorithms are used to fit the relationship between temperature / humidity and signal drift. Regression algorithms (such as BP neural networks and LSTM) are used to model the acquired thermal conductivity signal drift data and fit the relationship between temperature / humidity and signal drift. For example, a compensation model based on a BP neural network can effectively improve the sensitivity and stability of a QCM humidity sensor. Furthermore, LSTM neural networks are also used in dynamic compensation algorithms to improve the model's predictive ability for complex temperature drift conditions by exploring the nonlinear relationship between temperature data and measurement error.

[0135] The trained model is deployed to an embedded processor to achieve real-time dynamic compensation. The trained model is deployed to the embedded processor for real-time compensation of thermal conductivity signal drift. For example, a compensation method based on a lightweight convolutional neural network (CNN) can effectively and efficiently compensate for RLG temperature drift, improving its output accuracy under varying temperature environments. Furthermore, an improved particle swarm optimization (PSO) algorithm is also used for humidity sensor compensation; by combining neural networks and Levy flight, the accuracy and stability of the compensation are improved.

[0136] The detection results are transmitted to a cloud platform via a LoRa wireless module. The platform generates a concentration trend warning report based on historical data and remotely calibrates the detector parameters. This method is applicable to hydrogen detection. The collected, compensated thermal conductivity signal data is also transmitted to the cloud platform via a LoRa wireless module. The platform generates a concentration trend warning report based on historical data and supports remote calibration of detector parameters. For example, the LoRa wireless temperature and humidity monitoring and warning system can achieve full coverage of the monitoring area, collecting and transmitting temperature and humidity data to the cloud platform in real time for data analysis and optimization. Furthermore, the system can also perform data analysis and optimization through a big data platform, ultimately pushing accurate data to a web service system or mobile app for real-time monitoring and control management.

[0137] Step S4: Implement graded alarm control based on the compensated gas concentration value.

[0138] After obtaining the compensated gas concentration value, the system performs tiered alarm control based on preset alarm thresholds. For example, when the detected gas concentration exceeds the set alarm point, the system will trigger an audible and visual alarm to remind on-duty personnel to take appropriate safety measures.

[0139] Figure 4 A flowchart illustrating the specific linkage process of the alarm triggering mechanism provided in one embodiment of this application.

[0140] Specifically, such as Figure 4 As shown, the fire alarm logic is as follows: When the on-site detector detects combustible gas, the specific linkage process of the alarm mechanism is as follows:

[0141] Low concentration alarm stage: When the gas concentration reaches the lower explosive limit threshold (low explosive value), the detector immediately activates an audible and visual alarm. At this time, the input / output modules linked to the detector will simultaneously perform two operations:

[0142] (a) The exhaust system is automatically activated to dilute the gas;

[0143] (b) The two status signals, “low-explosive alarm” and “fan start”, are sent back to the fire control host.

[0144] High Concentration Emergency Response Phase: If the gas concentration continues to rise to the upper explosive limit threshold (high explosive value), the system will take emergency safety measures:

[0145] (a) The input / output module immediately stops the fan;

[0146] (b) Simultaneously upload two signals to the host: "High Explosion Alarm" and "Fan Stopped", indicating that emergency response measures such as personnel evacuation should be taken.

[0147] Example 2

[0148] This application provides a multi-parameter compensated combustible gas detection system based on the principle of thermal conductivity, applied to the multi-parameter compensated combustible gas detection method based on the principle of thermal conductivity as described in Embodiment 1, including:

[0149] Power supply circuit composition: The detector has a 24V active output circuit, and the circuit board has both voltage monitoring and voltage conversion functions.

[0150] Communication interface: It has one RS485 communication interface, three relay inputs and outputs, and one CANBUS for inputting and outputting various alarm, start and stop signals of the detector.

[0151] Thermal conductivity sensor module: The thermal conductivity sensor module has a relatively comprehensive integration of functions, including temperature and humidity sensors, pressure sensors, and hydrogen sensors.

[0152] Constant temperature and humidity detection chamber: Using environmental isolation technology, the detection chamber can maintain a specific temperature and humidity environment.

[0153] Embedded processor and compensation algorithm module: Intelligent algorithm automatically compensates for temperature and humidity differences.

[0154] The linkage control module controls a certain number of LED lights to display alarms, faults, and operating status.

[0155] Specifically, the system also includes software module design, constructing a software multi-task hierarchical scheduling framework, including:

[0156] The system employs a front-end / back-end separation approach, scheduling each functional module based on time-slice rotation. This architecture divides the functional modules into multiple tasks, scheduling them using a time-slice round-robin method. This scheduling approach ensures efficient system operation on resource-constrained embedded platforms while supporting parallel processing of multiple functional modules.

[0157] Each task is divided into a driver layer, an interface layer, and an application layer, operating independently yet interconnected. Each task is further divided into three layers, each responsible for different functions, as follows: Driver Layer: Responsible for the initialization and control of hardware resources. For example, it initializes hardware devices such as sensors, actuators, and communication modules (e.g., LoRa wireless modules) to ensure proper hardware operation. Interface Layer: Responsible for data reception, processing, and forwarding. For example, it receives data from sensors, performs data format conversion, verification, and filtering, and then passes the processed data to the application layer. Application Layer: Responsible for data analysis and logical processing. For example, it performs signal compensation based on compensation algorithm models, calculates hydrogen concentration, and generates early warning reports.

[0158] The driver layer initializes the hardware driver. The interface layer receives and processes data. The application layer analyzes the data and performs logical processing. The driver layer and the interface layer communicate through a data interface; the driver layer is responsible for collecting raw data, and the interface layer is responsible for parsing and processing the data. The interface layer and the application layer also communicate through a data interface; the interface layer passes the processed data to the application layer, which performs logical processing and generates results. The application layer may also call functions from the driver layer, such as re-collecting data or controlling hardware devices when needed.

[0159] The system uses a time-slice scheduling mechanism to allocate tasks to different time slices, ensuring that each task can be completed within the specified time. Tasks can share some resources but run independently to avoid mutual interference. Through task priority management, critical tasks (such as data acquisition, compensation calculation, and early warning generation) can be prioritized for execution.

[0160] The system's advantages lie in its modular design: each layer operates independently, facilitating development, testing, and maintenance. It boasts strong scalability: system functionality can be expanded by adding tasks or adjusting task priorities. It offers high real-time performance: time-slice scheduling and task priority management ensure real-time response for critical tasks. Furthermore, it provides high reliability: each layer operates independently and is isolated from the others, enhancing system stability and fault tolerance. This modular software design provides a solid foundation for the efficient operation of the entire system, and it shows promising application prospects, particularly in scenarios with high real-time and accuracy requirements, such as hydrogen detection.

[0161] Figure 5 This is an electronic device provided in one embodiment of this application. For example... Figure 5As shown, the electronic device includes at least the following components: processor 101 and memory 100, communication interface 103, and bus 102.

[0162] In this embodiment of the application, memory 100 is used to store executable instructions of processor 101, which, when configured to execute instructions, implements the method as described in the first aspect.

[0163] In embodiments of this application, a computer-readable storage medium includes instructions that instruct a device to perform the method as described in the first aspect. For example, the instructions instruct the device to perform... Figure 1 The method is shown in the process steps.

[0164] In one embodiment of this application, the program operating in the electronic device may be a program that controls a central processing unit (CPU) or similar device to achieve the functions of the above-described embodiments of the present invention (a program that enables the computer to function). Information processed by these devices is then temporarily stored in random access memory (RAM) during processing, and subsequently stored in various ROMs such as read-only memory (FlashROM) and hard disk drives (HDDs), and read, corrected, and written by the CPU as needed.

[0165] It should be noted that a portion of the electronic device described above can also be implemented using a computer. In this case, the program for implementing the control function can be recorded on a computer-readable recording medium, and the program recorded on the recording medium can be read into the computer and executed.

[0166] It should be noted that the term "computer" as used here refers to a computer built into an electronic device, employing hardware including an operating system and peripheral devices. Furthermore, "computer-readable recording media" refers to removable media such as floppy disks, magneto-optical disks, ROMs, and CD-ROMs, as well as storage devices such as hard drives built into a computer.

[0167] Furthermore, a "computer-readable recording medium" can include: a medium that dynamically stores a program for a short period of time, such as a communication line used when transmitting a program via a network such as the Internet or a communication line such as a telephone line; or a medium that stores a program for a fixed period of time, such as volatile memory inside a computer that serves as a server or client in this case. In addition, the aforementioned program can be a program used to implement the above-mentioned functions, or it can be a program that can implement the above-mentioned functions by combining with programs already recorded in the computer.

[0168] Furthermore, the electronic device in the above embodiments can also be implemented as an assembly (device group) composed of multiple devices. Each device constituting the device group can possess some or all of the functions or functional blocks of the electronic device in the above embodiments. As a device group, it is sufficient to have all the functions or functional blocks of the electronic device.

[0169] Those skilled in the art should recognize that the above embodiments are only used to illustrate this application and are not intended to limit this application. Any appropriate changes and variations made to the above embodiments within the essential spirit and scope of this application fall within the scope of protection claimed in this application.

Claims

1. A multi-parameter compensated flammable gas detection method based on the principle of thermal conductivity, characterized in that, The method comprises: Step S1, measuring the thermal conductivity change of the target gas by using a thermal conductivity detector, the thermal conductivity detector comprising at least one pair of symmetrically arranged heating elements and temperature sensing elements, outputting the difference of electrical signals by detecting the change of thermal equilibrium state caused by the gas flowing through the detection cavity, and calculating the gas concentration based on the difference; Step S2, isolating the detection cavity from the external environment by using environmental isolation technology, integrating temperature and humidity sensors and control modules in the cavity, and maintaining a constant temperature and humidity environment in the detection cavity by active temperature control elements and humidity adjustment units; Step S3, collecting environmental temperature and humidity data and thermal conductivity signals in real time by an embedded processor, and dynamically correcting the gas concentration calculation results based on a pre-trained compensation algorithm model, the compensation algorithm model fitting the mapping relationship between temperature gradient, humidity deviation and thermal conductivity signal drift by machine learning, and outputting the compensated gas concentration value; wherein the compensation algorithm model is a BP neural network model based on particle swarm optimization algorithm, which is constructed by the following steps: S3.1, constructing the BP neural network structure, including the setting of input layer, hidden layer and output layer, and the number of nodes and layers of the hidden layer; S3.2, initializing particle swarm parameters, including population size, maximum iteration number, weight, and learning factor; S3.3, updating the speed and position of the particles, in the iteration process, each particle updates its speed and position according to its own historical best position pbest and the historical best position gbest of the whole population, and the update rule combines the speed vector of the particle and the individual and global optimal information to achieve more efficient search; S3.4, optimizing the weight and learning factor, through the nonlinear dynamic weight method, the algorithm has strong global search ability in the early stage; S3.5, qualification check and convergence condition judgment, after each iteration, qualification check is performed to determine whether the convergence condition is met, the convergence condition includes reaching the maximum iteration number, the fitness value tends to be stable or the error is less than the preset value, if the convergence condition is met, the optimal solution is output; otherwise, continue iteration; S3.6, back propagation and error calculation, in the iteration process, the output error of the BP neural network is calculated by the back propagation algorithm and is input as the fitness function, and the calculation result of the error is used to update the position and speed of the particles, thereby continuously optimizing the weight and threshold of the network; S3.7, result analysis and model evaluation, after the iteration ends or the convergence condition is met, the final optimal solution is analyzed and evaluated, and the evaluation indexes include prediction accuracy, convergence speed and generalization ability; Step S4, executing hierarchical alarm control according to the compensated gas concentration value.

2. A multi-parameter compensated flammable gas detection method based on the principle of thermal conductivity according to claim 1, characterized in that, The thermal conductivity detector in step S1 adopts a Wheatstone bridge structure, wherein: The heating element is a platinum wire, and the temperature sensing element is a thermistor or a thermocouple; The unbalanced voltage output by the bridge has a linear relationship with the gas concentration, and is converted into the actual concentration value through a calibration curve.

3. A multi-parameter compensated flammable gas detection method based on the principle of thermal conductivity according to claim 2, characterized in that, The active temperature control element in step S2 is a semiconductor refrigeration sheet or a micro heater, and the humidity adjustment unit maintains constant humidity by using dry gas purging or adsorbent.

4. A multi-parameter compensated flammable gas detection method based on the principle of thermal conductivity according to claim 1, characterized in that, The step S3.4, optimizing the weight and learning factor, makes the algorithm have strong global search ability in the initial stage through the nonlinear dynamic weight method, including: The weight coefficient of the input node is selected according to the size of the fitness value and the average fitness value in the comparison iteration The expression is as follows: ; in, Indicates the first The input node generated in the next iteration The weight, These are the pre-set maximum and minimum weight thresholds, In order, in the th The average fitness value, minimum fitness value, and individual fitness value of the particle swarm are calculated in the next iteration; Particle The velocity and position update equations for the second particle are: , , wherein, is a particle velocity at the first iteration; is an inertia weight, controlling the tendency of the particle to maintain its previous velocity; is a learning factor, respectively controlling the step size of the particle learning towards the individual and global optimum; is a random number between 0 and 1, used to introduce randomness; , , wherein, , are preset random learning factors, respectively, and , is the total number of iterations, as the number of iterations increases, shows a linear decreasing trend, shows a linear increasing trend, which can strengthen the convergence of particles to the global optimal point; The compensation algorithm model is dynamically corrected by the following formula: , wherein, is the compensated gas concentration; is the original measured concentration; and are the current temperature and relative humidity, respectively; and are the standard temperature and humidity reference values, respectively; and are the temperature compensation coefficient and humidity compensation coefficient, respectively, determined by experimental calibration.

5. A multi-parameter compensated flammable gas detection method based on the principle of thermal conductivity according to claim 1, characterized in that, The compensation algorithm model is trained by a machine learning method, including the following steps: Collecting thermal conductivity signal drift data under different temperature and humidity conditions; Using a regression algorithm to fit the relationship between temperature and humidity and signal drift; Deploying the trained model to an embedded processor to realize real-time dynamic compensation; The detection result is transmitted to the cloud platform through the LoRa wireless module, and the platform generates a concentration trend warning report based on historical data and remotely calibrates the detector parameters; the method is suitable for hydrogen detection.

6. A multi-parameter compensated flammable gas detection method based on the principle of thermal conductivity according to claim 1, characterized in that, The step S4, performing hierarchical alarm control according to the compensated gas concentration value, includes: When the gas concentration reaches the first preset threshold, trigger a first-level alarm and execute: S4.1, start the sound-light alarm device; S4.2, automatically start the exhaust system for gas dilution; S4.3, send a first alarm signal containing "low explosion alarm" and "fan start" state to the fire control host; When the gas concentration reaches a second preset threshold higher than the first preset threshold, trigger a second-level alarm and execute: S4.4, immediately stop the exhaust system; S4.5, send a second alarm signal containing "high explosion alarm" and "fan stop" state to the fire control host.

7. A multi-parameter compensated combustible gas detection system based on the principle of thermal conductivity, applied to the multi-parameter compensated combustible gas detection method based on the principle of thermal conductivity according to any one of claims 1 to 6, characterized in that, Including: Power circuit composition: the detector has a 24V active output circuit, and the circuit board has voltage monitoring function and voltage conversion function; Communication interface: one RS485 communication interface, three relay input and output, and one CANBUS for input and output of various alarm, start and stop signals of the detector; Thermal conductivity sensor module: the thermal conductivity sensor module has a comprehensive function integration, including temperature and humidity sensor, pressure sensor, hydrogen sensor; Constant temperature and humidity detection cavity: using environmental isolation technology, the detection cavity can maintain a specific temperature and humidity environment; Embedded processor and compensation algorithm module: intelligent algorithm automatically compensates temperature and humidity difference; Linkage control module, control a certain number of LED lights to display alarm, fault and running state.

8. A multi-parameter compensated combustible gas detection system based on the principle of thermal conductivity according to claim 7, characterized in that, The system also includes software module design, which constructs a software multi-task hierarchical scheduling framework, including: The system adopts a foreground and background scheme to schedule each functional module based on time slice; A single task is divided into a driver layer, an interface layer and an application layer, and independently runs and is associated with each other; The driver layer realizes hardware driver initialization; The interface layer receives and processes data; The application layer analyzes data and does logical processing.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a program, and the program instructs the device to execute the multi-parameter compensation type combustible gas detection method based on the thermal conductivity coefficient principle according to any one of claims 1-6.

Citation Information

Patent Citations

  • Attention mechanism-based multi-column neural network effluent total phosphorus concentration multi-step prediction method

    CN119578643A

  • Semiconductor thermal conductivity dual-mode hydrogen detection control system with temperature and humidity compensation

    CN119936137A