Multi-parameter compensation type combustible gas detection method and system based on thermal conductivity coefficient principle

Through a multi-parameter compensation method based on the principle of thermal conductivity, combined with environmental isolation and dynamic correction technology of embedded processors, the sensitivity and durability issues of combustible gas detectors in complex environments are solved, and high-precision gas concentration measurement and graded alarm are achieved.

CN120629281AActive Publication Date: 2025-09-12SHENZHEN MODA TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

Existing combustible gas detectors have insufficient sensitivity, high false alarm rates, high operation and maintenance costs, and limited device durability. They are particularly prone to drift errors in environments with drastic humidity or temperature fluctuations.

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. The environmental isolation technology is combined to maintain constant temperature and humidity in the detection cavity. The embedded processor and compensation algorithm model are used for real-time dynamic correction. The BP neural network model of the particle swarm optimization algorithm is used for gas concentration calculation and graded alarm control.

Benefits of technology

It improves the sensitivity and reliability of gas detection, reduces the interference of temperature and humidity fluctuations on detection, realizes high-precision gas concentration measurement and graded alarm, and is suitable for hydrogen detection in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120629281A_ABST
    Figure CN120629281A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-parameter compensation type combustible gas detection method and system based on a thermal conductivity coefficient principle. The method comprises the following steps: measuring heat conductivity coefficient change of target gas by using a thermal conductivity detector to calculate gas concentration; the environment isolation technology is adopted to maintain constant temperature and humidity in the detection cavity; collecting data through an embedded processor, and dynamically correcting a gas concentration calculation result based on a pre-trained compensation algorithm model; and executing grading alarm control according to the compensated concentration value. The compensation algorithm model adopts a BP neural network model based on a particle swarm optimization algorithm. The system comprises a power supply circuit, a communication interface, a thermal conductivity sensor module, a constant temperature and humidity detection cavity, an embedded processor, a compensation algorithm module and a linkage control module, and a software multi-task hierarchical scheduling framework is also constructed. The device 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] The present 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 Art

[0002] Combustible gas detectors are safety devices that monitor the concentration of flammable gas in the environment. Currently, mainstream products are based on three key technologies: semiconductor, infrared, and catalytic combustion. Their development focuses on improving the accuracy and response speed of fire warnings. They generally offer advantages such as early warning, multifunctional integration, and strong environmental adaptability. However, existing technologies still suffer from common shortcomings, including insufficient sensitivity, high false alarm rates, high maintenance costs, and limited device durability.

[0003] Disadvantages of existing technical solutions: (1) The catalytic reaction is an irreversible reaction, which easily leads to poor durability and short life of the equipment; (2) Frequent calibration and maintenance are required, which is not conducive to cost reduction; (3) High power consumption and poor thermal stability: continuous heating to high temperature is required, which consumes a lot of energy and is prone to drift errors in environments with drastic fluctuations in humidity or temperature.

[0004] Therefore, there is an urgent need to develop a new combustible gas detection method that can solve the problems of low combustible gas 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 thermal conductivity principle, 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, an embodiment of the present application provides a multi-parameter compensation combustible gas detection method based on the principle of thermal conductivity, the method comprising: Step S1: Measuring 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. The detector detects the change in thermal equilibrium state caused by the gas flowing through the detection chamber, outputs an electrical signal difference, and calculates the gas concentration based on the difference. Step S2: Isolate the detection cavity from the external environment using environmental isolation technology, integrate a temperature and humidity sensor and a control module in the cavity, and maintain a constant temperature and humidity environment in the detection cavity through active temperature control elements and humidity adjustment units; Step S3: Real-time acquisition of ambient temperature and humidity data and thermal conductivity signals by an embedded processor, and dynamic correction of the gas concentration calculation results 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. Step S4: Execute graded alarm control according to the compensated gas concentration value.

[0007] Optionally, in an implementation of the first aspect of the present invention, 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 thermopile; The unbalanced voltage output by the bridge is linearly related to the gas concentration and is converted into the actual concentration value through the calibration curve.

[0008] Optionally, in an implementation of the first aspect of the present invention, the active temperature control element in step S2 is a semiconductor refrigeration plate or a micro heater, and the humidity adjustment unit uses dry gas purge or adsorbent to maintain constant humidity.

[0009] Optionally, in an implementation of the first aspect of the present invention, the compensation algorithm model of step S3 is a BP neural network model based on a particle swarm optimization algorithm, which is constructed by the following steps: S3.1. Construct the BP neural network structure, including the settings of the input layer, hidden layer, and output layer, as well as the number of nodes and layers in the hidden layer; S3.2. Initialize the particle swarm parameters, including population size, maximum number of iterations, weight, and learning factor; S3.3. Update the speed and position of particles. During the iteration process, each particle updates its speed 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 speed vector and personal and global optimal information to achieve more efficient search. S3.4. Optimize weights and learning factors, and use nonlinear dynamic weighting methods to give the algorithm stronger global search capabilities in the early stages. S3.5. Qualification check and convergence condition judgment: After each iteration, a qualification check is performed to determine whether the convergence conditions are met. Convergence conditions include reaching the maximum number of iterations, the fitness value tending to be stable, or the error being less than the preset value. If the convergence conditions are met, the optimal solution is output; otherwise, the iteration continues; S3.6, Back Propagation and Error Calculation. During the iteration process, the output error of the BP neural network is calculated through the back propagation 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 network weights and thresholds. S3.7. Result analysis and model evaluation: After the iteration ends or the convergence conditions are met, the final optimal solution is analyzed and evaluated. The evaluation indicators include prediction accuracy, convergence speed, and generalization ability.

[0010] Optionally, in an implementation of the first aspect of the present invention, step S3.4, optimizing weights and learning factors, using a nonlinear dynamic weighting method to enable the algorithm to have a stronger global search capability in the initial stage, includes: Select the weight coefficient of the input node based on the size of the fitness value in the comparison iteration and the average fitness value , expressed as follows: ; in, Indicates in Input nodes generated at iteration The weight of are the preset maximum and minimum weight thresholds, In order The average fitness value, minimum fitness value and individual fitness value of the particle swarm calculated at the iteration; Particle The speed and position update formula is: , , in, It is a particle In the The speed of the iteration; is the inertia weight, which controls the tendency of the particle to maintain its original velocity; is the learning factor, which controls the step size of the particle learning towards the individual optimum and the global optimum respectively; yes A random number between , used to introduce randomness; , , in, 、 are preset random learning factors, and , is the total number of iterations. As the number of iterations increases, It shows a linear decreasing trend. It shows a linear increasing trend, which can enhance the convergence of particles to the global optimal point.

[0011] The compensation algorithm model uses the following formula for dynamic correction: , in, is the gas concentration after compensation; is the original measured concentration; and are the current temperature and relative humidity respectively; and are standard temperature and humidity reference values ​​respectively; and They are the temperature compensation coefficient and humidity compensation coefficient, respectively, which are determined through experimental calibration.

[0012] Optionally, in an implementation of the first aspect of the present invention, the compensation algorithm model is trained using a machine learning method, comprising the following steps: Collect thermal conductivity signal drift data under different temperature and humidity conditions; Use regression algorithm to fit the relationship between temperature and humidity and signal drift; Deploy the trained model to an embedded processor to achieve real-time dynamic compensation; The detection results are transmitted to the cloud platform via the LoRa wireless module. 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.

[0013] Optionally, in an implementation of the first aspect of the present invention, step S4, performing graded alarm control according to the compensated gas concentration value, includes: When the gas concentration reaches the first preset threshold, a level 1 alarm is triggered and the following actions are executed: S4.1, activate the sound and light alarm device; S4.2, automatically start the exhaust system to dilute the gas; S4.3, sending the first alarm signal containing "low explosion alarm" and "fan start" status to the fire control host; When the gas concentration reaches a second preset threshold value higher than the first preset threshold value, a secondary alarm is triggered and the following actions are executed: S4.4, immediately stop the exhaust system; S4.5, sends a second alarm signal including "high explosion alarm" and "fan shutdown" status to the fire control host.

[0014] In a second aspect, an embodiment of the present application provides a multi-parameter compensation combustible gas detection system based on the thermal conductivity principle, which is applied to the multi-parameter compensation combustible gas detection method based on the thermal conductivity principle as described in the first aspect, including: Power supply circuit composition: The detector has a 24V active output circuit, and the circuit board also has voltage monitoring and voltage conversion functions; Communication interface: equipped with 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 relatively comprehensive functional integration, including temperature and humidity sensors, pressure sensors, and hydrogen sensors; Constant temperature and humidity detection chamber: using environmental isolation technology, the detection chamber can maintain a specific temperature and humidity environment; Embedded processor and compensation algorithm module: intelligent algorithm automatically compensates for temperature and humidity differences; The linkage control module controls a certain number of LED lights to display alarm, fault and operating status.

[0015] Optionally, in an 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: The system uses a front-end and back-end solution to schedule each functional module based on time slices; A single task is divided into the driver layer, interface layer, and application layer, which run independently but are interrelated; The driver layer implements hardware driver initialization; The interface layer receives and processes data; The application layer analyzes data and performs logical processing.

[0016] In a third aspect, an embodiment of the present application provides an electronic device, including: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the multi-parameter compensation combustible gas detection method based on the thermal conductivity principle as described in the first aspect when executing the instructions.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a program, wherein the program instructs a device to execute the multi-parameter compensation combustible gas detection method based on the thermal conductivity principle as described in the first aspect.

[0018] The present invention relates to a multi-parameter compensated combustible gas detection method and system based on the principle of thermal conductivity. The method comprises: using a thermal conductivity detector to measure the change in thermal conductivity of the target gas to calculate the gas concentration; using environmental isolation technology to maintain constant temperature and humidity in the detection chamber; collecting data through an embedded processor, and dynamically correcting the gas concentration calculation result based on a pre-trained compensation algorithm model; and performing hierarchical alarm control according to the compensated concentration value. The compensation algorithm model adopts a BP neural network model based on a particle swarm optimization algorithm. The system comprises a power supply circuit, a communication interface, a thermal conductivity sensor module, a constant temperature and humidity detection chamber, an embedded processor and a compensation algorithm module, a linkage control module, and also constructs a software multi-task hierarchical scheduling framework. The present invention is suitable for hydrogen detection and can effectively improve the accuracy and reliability of gas detection.

[0019] Beneficial effects:

[0020] (1) Optimization of thermal conductivity principle: The combustible gas detector is based on the advanced thermal conductivity reaction principle, adopts a cross hot wire structure, and refers to the dynamic measurement principle of the hot wire method thermal conductivity tester. The symmetrical design suppresses environmental thermal disturbances, improves the sensitivity of low-concentration gas detection, and overcomes the defect that traditional thermal conductivity detectors are easily affected by temperature.

[0021] (2) Environmental isolation technology: By drawing on the sealed temperature control solution of industrial-grade temperature and humidity transmitters, the active control module is used to maintain the stability of the detection chamber microenvironment, thereby reducing the interference of external temperature and humidity fluctuations on the thermal conductivity signal from a physical level.

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

[0023] (4) Hierarchical alarm control strategy, linking the exhaust system and the fire host.

[0024] (5) System scalability: The system integrates RS485 / CANBUS communication, multi-sensor fusion and layered software architecture, which is suitable for the detection of combustible gases such as hydrogen, reduces temperature drift errors, and significantly improves detection reliability in complex environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A schematic flow chart of a multi-parameter compensation combustible gas detection method based on the thermal conductivity principle provided in one embodiment of the present application.

[0026] Figure 2 A schematic diagram of the compensation algorithm model structure provided in one embodiment of the present application.

[0027] Figure 3 A schematic diagram of the steps for implementing the compensation algorithm provided in one embodiment of the present application.

[0028] Figure 4 This is a specific linkage flow chart of the trigger alarm mechanism provided in one embodiment of the present application.

[0029] Figure 5 A schematic diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0030] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.

[0031] It should be noted that, in the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art in the art to which this application relates. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0032] It should be noted that, in the embodiments of the present application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order. Features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present 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 the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way.

[0033] Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0034] Example 1

[0035] Figure 1 A schematic flow chart of a multi-parameter compensation combustible gas detection method based on the thermal conductivity principle provided in one embodiment of the present application.

[0036] like Figure 1 As shown, a multi-parameter compensation combustible gas detection method based on the thermal conductivity principle includes: Step S1: Use a thermal conductivity detector to measure the change in thermal conductivity of the target gas. 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 chamber, the detector outputs an electrical signal difference and calculates the gas concentration based on the difference.

[0037] A thermal conductivity detector is a detection device based on differences in gas thermal conductivity. Its core structure consists of at least one pair of symmetrically arranged heating elements and temperature sensing elements. As the target gas flows through the detection chamber, the varying thermal conductivities of different gases cause the temperature of the heating element to change due to a shift in thermal equilibrium, resulting in a change in resistance. This resistance change is converted into an electrical signal difference through a circuit 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 a thermal conductivity detector because their thermal conductivity differs from that of air. Furthermore, thermal conductivity detectors have high sensitivity for high-concentration gases (such as hydrogen) but low sensitivity for low-concentration gases.

[0038] Specifically, 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 thermopile. The unbalanced voltage output by the bridge is linearly related to the gas concentration and is converted to the actual concentration value using a calibration curve. In practical applications, the resistance of the thermally sensitive element (such as a platinum wire or thermistor) used as the heating element will change due to changes in the thermal conductivity of the gas, causing an imbalance in the bridge. This unbalanced voltage is converted by a signal conditioning circuit into an electrical signal that can be easily displayed and recorded, ultimately enabling gas concentration detection.

[0039] Step S2: Use environmental isolation technology to isolate the detection cavity from the external environment, integrate temperature and humidity sensors and a control module in the cavity, and maintain a constant temperature and humidity environment in the detection cavity through active temperature control elements and humidity adjustment units.

[0040] To ensure stable temperature and humidity within the detection chamber and prevent the external environment from affecting test results, the system utilizes environmental isolation technology. The detection chamber integrates temperature and humidity sensors and a control module, maintaining a constant temperature and humidity environment through active temperature control elements and humidity regulation units. This environmental control technology effectively reduces the interference of temperature and humidity fluctuations on thermal conductivity measurements, thereby improving test stability and accuracy. Furthermore, environmental isolation prevents interference from external gases, ensuring the reliability of test results.

[0041] Specifically, the active temperature control element in step S2 is a semiconductor refrigeration chip or a micro heater, and the humidity adjustment unit uses dry gas purge or adsorbent to maintain constant humidity.

[0042] Step S3: Real-time collection of ambient temperature and humidity data and thermal conductivity signals by an embedded processor, and dynamic correction of the gas concentration calculation results 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.

[0043] The system uses an embedded processor to collect real-time ambient temperature and humidity data and thermal conductivity signals, and dynamically corrects the gas concentration calculations based on a pre-trained compensation algorithm model. The compensation algorithm 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.

[0044] Specifically, the compensation algorithm model of step S3 is a BP neural network model based on a particle swarm optimization algorithm, which is constructed by the following steps: Figure 2 A schematic diagram of the compensation algorithm model structure provided in one embodiment of the present application. Figure 3 A schematic diagram of the steps for implementing the compensation algorithm provided in one embodiment of the present application.

[0045] like Figure 2-3 As shown, 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.

[0046] When constructing a 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 typically corresponds to the characteristic dimensions of the input data, while the number of nodes in the output layer corresponds to the number of output target categories or predicted values. The number of nodes and layers in the hidden layer can be adjusted based on the complexity of the problem.

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

[0048] The initialization parameters of the particle swarm optimization algorithm include the 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 and is typically set between 20 and 80, with the specific value adjusted based on the complexity of the problem and computing resources. The maximum number of iterations is one of the conditions for the algorithm to terminate and is typically set between 100 and 500 to ensure that the algorithm completes the search within a reasonable time. The inertia weight controls the tendency of particles to maintain their original velocity. It is typically set to a high value (e.g., 0.9) at the beginning of the search to enhance global search capabilities and gradually decreases with increasing iterations 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 the global optimum (gbest), respectively, and are typically set between 1.5 and 2.0.

[0049] S3.3. Update the speed and position of the particles. During 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 entire population. The update rule combines the particle's speed vector and personal and global optimal information to achieve more efficient search.

[0050] The particle speed and position update is the core part of the PSO algorithm. The speed and position update formula is: , , in, It is a particle In the The speed of the iteration; is the inertia weight, which controls the tendency of the particle to maintain its original velocity; is the learning factor, which controls the step size of the particle learning towards the individual optimum and the global optimum respectively; yes A random number between is used to introduce randomness. Through the above formula, the particle updates its speed and position according to its own and the group's historical optimal positions in each iteration, thus gradually approaching the global optimal solution.

[0051] S3.4. Optimize weights and learning factors, and use nonlinear dynamic weighting methods to enable the algorithm to have stronger global search capabilities in the initial stage.

[0052] In the particle swarm optimization algorithm, optimizing weights and learning factors is a key approach to improving algorithm performance. By dynamically adjusting the inertia weights and learning factors, the algorithm can achieve strong global search capabilities in the early stages while enhancing local search capabilities in the later stages. For example, the inertia weight can be linearly decreased 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 fitness changes. For example, maintaining a high c1 value in the early stages of the search to enhance individual exploration capabilities while increasing c2 in the later stages to enhance global convergence. Furthermore, adaptive learning factors can be employed, such as dynamically adjusting c1 and c2 based on the particle's fitness and historical optimal position, to improve convergence speed and optimization accuracy.

[0053] Specifically, the step S3.4, optimizing weights and learning factors, using a nonlinear dynamic weighting method to enable the algorithm to have a stronger global search capability in the initial stage, includes: Select the weight coefficient of the input node based on the size of the fitness value in the comparison iteration and the average fitness value , expressed as follows: ; in, Indicates in Input nodes generated at iteration The weight of are the preset maximum and minimum weight thresholds, In order The average fitness value, minimum fitness value, and individual fitness value of the particle swarm calculated at the iteration are: When the individual fitness value is higher than the average, a larger weight is assigned to enhance the exploration ability of the particle and avoid premature convergence. When the individual fitness value is lower than the average, a smaller weight is assigned to suppress ineffective exploration and accelerate convergence.

[0054] In the early stage of the algorithm, due to the high diversity of the population, most individual fitness values ​​are close to the average value, and the weights are mostly , promoting global search; as the iteration progresses, the differentiation of fitness values ​​intensifies, and the weights are dynamically adjusted to balance exploration and development.

[0055] Particle The speed and position update formula is: , , in, It is a particle In the The speed of the iteration; is the inertia weight, which controls the tendency of the particle to maintain its original velocity; is the learning factor, which controls the step size of the particle learning towards the individual optimum and the global optimum respectively; yes A random number between , used to introduce randomness.

[0056] , , in, 、 are preset random learning factors, and , is the total number of iterations. As the number of iterations increases, It shows a linear decreasing trend. It shows a linear increasing trend, which can enhance the particle convergence to the global optimal point. Effect: Initial Larger, emphasizes individual experience, enhances global search; later Enhanced, strengthened global optimal guidance, accelerated convergence.

[0057] Fitness-driven weight allocation: By comparing individual fitness values ​​with the average, weights are dynamically allocated to avoid the limitations of fixed thresholds. For example, in the early stage when fitness fluctuates greatly, weights are more inclined to , and gradually turns to , achieving adaptive balance. Collaborative optimization of learning factors: and Dynamic adjustments form the strategy of "exploration before development": Exploration phase (early iteration): Larger, particles pay more attention to individual historical optimality, avoiding premature aggregation of groups. Development stage (later iteration) Enhanced, particles move closer to the global optimum, improving accuracy. The combination of randomness and determinism: random numbers The introduction of prevents the algorithm from falling into local minima, while the deterministic adjustment of weights and learning factors ensures the convergence direction. Function: Larger Preserve more historical speed, suitable for exploration; smaller Promote convergence. Dynamic adjustment It can be further optimized, for example, by combining adaptive adjustment of the fitness change rate.

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

[0059] The compensation algorithm model uses the following formula for dynamic correction: , in, is the gas concentration after compensation; is the original measured concentration; and are the current temperature and relative humidity respectively; and are standard temperature and humidity reference values ​​respectively; and are the temperature compensation coefficient and humidity compensation coefficient, respectively, which are determined through experimental calibration. Through the above formula, the compensation algorithm model can dynamically correct the gas concentration and improve the measurement accuracy and stability.

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

[0061] Specifically, during the iteration 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 the preset maximum number of iterations. Fitness value tends to be stable: If the fitness value of the particle changes very little over several consecutive iterations, it indicates that the algorithm has approached the optimal solution. Error is less than a preset value: If the fitness value of the particle (such as the error) is lower than a preset threshold, it is considered that a satisfactory solution has been found. After each iteration, the algorithm checks these conditions. If any of them is met, the iteration stops and the optimal solution is output; otherwise, the iteration continues.

[0062] S3.6. Back propagation and error calculation. During the iteration process, the output error of the BP neural network is calculated through the back propagation 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.

[0063] During network optimization, 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. Smaller error values ​​indicate more accurate network predictions and a higher fitness value. With each iteration, the particle positions (i.e., the network's weights and thresholds) are updated based on the fitness value, continuously optimizing the network's parameters and improving prediction accuracy.

[0064] S3.7. Result analysis and model evaluation: After the iteration ends or the convergence conditions are met, the final optimal solution is analyzed and evaluated. The evaluation indicators include prediction accuracy, convergence speed, and generalization ability.

[0065] After optimizing the BP neural network, the final optimal solution needs to be analyzed and evaluated to assess the model's performance. Common evaluation metrics include: Prediction accuracy: This 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 rate: This measures the time it takes the algorithm to find the optimal solution, typically evaluated by the number of iterations or the rate of change in the fitness value. Generalization ability: This measures the model's performance on unseen data, typically evaluated through cross-validation or holdout methods. These metrics can be used to comprehensively evaluate the performance of the BP neural network and provide a basis for subsequent optimization and improvement.

[0066] The compensation algorithm model is trained using a machine learning method, including the following steps: Collect thermal conductivity signal drift data under different temperature and humidity conditions. Use sensors (such as PT1000 temperature sensors and LoRa wireless modules) to collect thermal conductivity signal drift data under different temperature and humidity conditions for model training. This data includes environmental parameters such as temperature and humidity, as well as the corresponding signal drift values.

[0067] Use regression algorithms to fit the relationship between temperature, humidity, and signal drift. Regression algorithms (such as BP neural networks and LSTM) are used to model the collected thermal conductivity signal drift data and fit the relationship between temperature, humidity, and signal drift. For example, compensation models based on BP neural networks can effectively improve the sensitivity and stability of QCM humidity sensors. LSTM neural networks are also used in dynamic compensation algorithms. By exploiting the nonlinear relationship between temperature data and measurement error, the model's predictive ability for complex temperature drift scenarios is enhanced.

[0068] Deploy the trained model to the embedded processor for real-time dynamic compensation. The trained model is deployed to the embedded processor to compensate for thermal conductivity signal drift in real time. 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 in fluctuating temperature environments. Furthermore, an improved particle swarm optimization (PSO) algorithm is also used for humidity sensor compensation. By combining a neural network and Levy flight, the accuracy and stability of compensation are improved.

[0069] The detection results are transmitted to a cloud platform via a LoRa wireless module. The platform generates concentration trend warning reports based on historical data and remotely calibrates detector parameters. This method is applicable to hydrogen detection. The collected, compensated thermal conductivity signal data is transmitted to the cloud platform via a LoRa wireless module. The platform generates concentration trend warning reports based on historical data and supports remote calibration of detector parameters. For example, a LoRa wireless temperature and humidity monitoring and early 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 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.

[0070] Step S4: Execute graded alarm control according to the compensated gas concentration value.

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

[0072] Figure 4 This is a specific linkage flow chart of the trigger alarm mechanism provided in one embodiment of the present application.

[0073] Specifically, such as Figure 4 As shown, the fire alarm logic is as follows: When the on-site detector detects combustible gas, the alarm mechanism is triggered. The specific linkage process is as follows: Low concentration alarm stage: When the gas concentration reaches the lower explosion limit threshold (low explosion value), the detector immediately activates the sound and light alarm. At this time, the input and output module linked to the detector will simultaneously perform two operations: (a) Automatically start the exhaust system to dilute the gas; (b) The two status signals of "low explosion alarm" and "fan start" are transmitted back to the fire control host.

[0074] High-concentration emergency response phase: If the gas concentration continues to rise to the upper explosion threshold (high explosive value), the system will take emergency safety measures: (a) The input and output module stops the fan immediately; (b) Simultaneously upload the dual signals of "high explosion alarm" and "fan shutdown" to the host, prompting the need for emergency response such as personnel evacuation.

[0075] Example 2 The present application provides a multi-parameter compensation type combustible gas detection system based on the thermal conductivity principle, which is applied to the multi-parameter compensation type combustible gas detection method based on the thermal conductivity principle as described in Example 1, including: Power supply circuit composition: The detector has a 24V active output circuit, and the circuit board also has voltage monitoring and voltage conversion functions; Communication interface: It has one RS485 communication interface, three relay input and output interfaces and one CANBUS interface for input and output of various alarm, start and stop signals of the detector.

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

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

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

[0079] The linkage control module controls a certain number of LED lights to display alarm, fault and operating status.

[0080] Specifically, the system also includes software module design and construction of a software multi-task hierarchical scheduling framework, including: The system uses a front-end and back-end approach to schedule each functional module based on time slices. The system employs a front-end and back-end separation architecture, dividing functional modules into multiple tasks and scheduling them in a round-robin fashion. This scheduling approach ensures efficient operation on resource-constrained embedded platforms while supporting the parallel processing of multiple functional modules.

[0081] Individual tasks are divided into the driver layer, interface layer, and application layer, operating independently yet interconnected. Each task is divided into three layers, each responsible for a different function, as follows: Driver layer: Responsible for initializing and controlling hardware resources. For example, it initializes hardware devices such as sensors, actuators, and communication modules (such as LoRa wireless modules) to ensure proper operation. Interface layer: Responsible for receiving, processing, and forwarding data. For example, it receives data from sensors, performs data format conversion, validation, and filtering, and then passes the processed data to the application layer. Application layer: Responsible for analyzing and logically processing the data. For example, it performs signal compensation based on compensation algorithm models, calculates hydrogen concentration, and generates early warning reports.

[0082] 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 and interface layers communicate via a data interface. The driver layer is responsible for collecting raw data, while the interface layer is responsible for parsing and processing the data. The interface layer communicates with the application layer via a data interface. The interface layer passes processed data to the application layer, which performs logical processing and generates results. The application layer may also call upon driver layer functions, such as re-collecting data or controlling hardware devices when needed.

[0083] The system uses a time-slice scheduling mechanism to assign tasks to different time slices, ensuring that each task is completed within the specified timeframe. Tasks can share some resources but operate independently to avoid interference. Task priority management ensures that critical tasks (such as data collection, compensation calculations, and warning generation) are prioritized.

[0084] The system's advantages lie in its modular design: each layer functions independently, facilitating development, testing, and maintenance. It is highly scalable: system functionality can be expanded by adding tasks or adjusting task priorities. High real-time performance: time-slice scheduling and task priority management ensure real-time response for critical tasks. High reliability: each layer operates independently and is isolated from each other, improving system stability and fault tolerance. This modular software design provides a solid foundation for the efficient operation of the entire system, and has promising application prospects, particularly in scenarios with high real-time and precision requirements, such as hydrogen detection.

[0085] Figure 5 This is an electronic device provided by an embodiment of the present application. Figure 5As shown, the electronic device includes at least the following parts: a processor 101 and a memory 100 , a communication interface 103 , and a bus 102 .

[0086] In an embodiment of the present application, the memory 100 is used to store instructions executable by the processor 101, and the processor 101 is configured to implement the method of the first aspect when executing the instructions.

[0087] In an embodiment of the present application, a computer-readable storage medium includes instructions, and the instructions instruct a device to execute the method of the first aspect. For example, the instructions instruct the device to execute Figure 1 The method is shown in the process steps.

[0088] The program running in the electronic device involved in one embodiment of the present application may be a program that controls a central processing unit (CPU) and the like to implement the functions of the above-mentioned embodiment involved in one embodiment of the present invention (a program that causes a computer to function). The information processed by these devices is temporarily stored in random access memory (RAM) while being processed, and is then stored in various ROMs such as read-only memory (Flash ROM) and a hard disk drive (HDD), where it is read, modified, and written as needed by the CPU.

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

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

[0091] Furthermore, "computer-readable recording media" may include: media that dynamically store programs for a short period of time, such as communication lines when transmitting programs via networks such as the Internet or communication lines such as telephone lines; and media that store programs for a fixed period of time, such as volatile memory within computers acting as servers or clients in this context. Furthermore, the aforementioned program may be a program for implementing a portion of the aforementioned functions, or a program that can achieve the aforementioned functions by combining with a program already stored in a computer.

[0092] Furthermore, the electronic device in the above-described embodiments can also be implemented as a collection of multiple devices (a device group). Each device comprising the device group may include some or all of the functions or functional blocks of the electronic device in the above-described embodiments. A device group only needs to include all of the functions or functional blocks of the electronic device.

[0093] Those skilled in the art should recognize that the above embodiments are merely intended to illustrate the present application and are not intended to limit the present application. As long as they are within the spirit of the present application, appropriate changes and modifications to the above embodiments are within the scope of protection claimed in the present application.

Claims

1. A multi-parameter compensation combustible gas detection method based on the principle of thermal conductivity, characterized in that: The method comprises: Step S1: Measuring 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. The detector detects the change in thermal equilibrium state caused by the gas flowing through the detection chamber, outputs an electrical signal difference, and calculates the gas concentration based on the difference. Step S2: Isolate the detection cavity from the external environment using environmental isolation technology, integrate a temperature and humidity sensor and a control module in the cavity, and maintain a constant temperature and humidity environment in the detection cavity through active temperature control elements and humidity adjustment units; Step S3: Real-time acquisition of ambient temperature and humidity data and thermal conductivity signals by an embedded processor, and dynamic correction of the gas concentration calculation results 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. Step S4: Execute graded alarm control according to the compensated gas concentration value.

2. The multi-parameter compensation combustible gas detection method based on the thermal conductivity principle according to claim 1 is 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 thermopile; The unbalanced voltage output by the bridge is linearly related to the gas concentration and is converted into the actual concentration value through the calibration curve.

3. The multi-parameter compensation combustible gas detection method based on the thermal conductivity principle according to claim 2 is characterized in that: The active temperature control element in step S2 is a semiconductor refrigeration chip or a micro heater, and the humidity adjustment unit uses dry gas purge or adsorbent to maintain constant humidity.

4. The multi-parameter compensation combustible gas detection method based on the thermal conductivity principle according to claim 3 is characterized in that: The compensation algorithm model in step S3 is a BP neural network model based on a particle swarm optimization algorithm, which is constructed by the following steps: S3.

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

2. Initialize the particle swarm parameters, including population size, maximum number of iterations, weight, and learning factor; S3.

3. Update the speed and position of particles. During the iteration process, each particle updates its speed 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 speed vector and personal and global optimal information to achieve more efficient search. S3.

4. Optimize weights and learning factors, and use nonlinear dynamic weighting methods to give the algorithm stronger global search capabilities in the early stages. S3.

5. Qualification check and convergence condition judgment: After each iteration, a qualification check is performed to determine whether the convergence conditions are met. Convergence conditions include reaching the maximum number of iterations, the fitness value tending to be stable, or the error being less than the preset value. If the convergence conditions are met, the optimal solution is output; Otherwise, continue iterating; S3.6, Back Propagation and Error Calculation. During the iteration process, the output error of the BP neural network is calculated through the back propagation 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 network weights and thresholds. S3.

7. Result analysis and model evaluation: After the iteration ends or the convergence conditions are met, the final optimal solution is analyzed and evaluated. The evaluation indicators include prediction accuracy, convergence speed, and generalization ability.

5. The multi-parameter compensation combustible gas detection method based on the thermal conductivity principle according to claim 4 is characterized in that: The step S3.4, optimizing weights and learning factors, uses a nonlinear dynamic weighting method to enable the algorithm to have a stronger global search capability in the early stage, including: Select the weight coefficient of the input node based on the size of the fitness value in the comparison iteration and the average fitness value , expressed as follows: ; in, Indicates in Input nodes generated at iteration The weight of are the preset maximum and minimum weight thresholds, In order The average fitness value, minimum fitness value and individual fitness value of the particle swarm calculated at the iteration; Particle The speed and position update formula is: , , in, It is a particle In the The speed of the iteration; is the inertia weight, which controls the tendency of the particle to maintain its original velocity; is the learning factor, which controls the step size of the particle learning towards the individual optimum and the global optimum respectively; yes A random number between , used to introduce randomness; , , in, 、 are preset random learning factors, and , is the total number of iterations. As the number of iterations increases, It shows a linear decreasing trend. It shows a linear increasing trend, which can enhance the convergence of particles to the global optimal point; The compensation algorithm model uses the following formula for dynamic correction: , in, is the gas concentration after compensation; is the original measured concentration; and are the current temperature and relative humidity respectively; and are standard temperature and humidity reference values ​​respectively; and They are the temperature compensation coefficient and humidity compensation coefficient, respectively, which are determined through experimental calibration.

6. The multi-parameter compensation combustible gas detection method based on the thermal conductivity principle according to claim 1 is characterized in that: The compensation algorithm model is trained using a machine learning method, including the following steps: Collect thermal conductivity signal drift data under different temperature and humidity conditions; Use regression algorithm to fit the relationship between temperature and humidity and signal drift; Deploy the trained model to an embedded processor to achieve real-time dynamic compensation; The detection results are transmitted to the cloud platform via the LoRa wireless module. 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.

7. The multi-parameter compensation combustible gas detection method based on the thermal conductivity principle according to claim 1 is characterized in that: The step S4, performing graded alarm control according to the compensated gas concentration value, includes: When the gas concentration reaches the first preset threshold, a level 1 alarm is triggered and the following actions are executed: S4.1, activate the sound and light alarm device; S4.2, automatically start the exhaust system to dilute the gas; S4.3, sending the first alarm signal containing "low explosion alarm" and "fan start" status to the fire control host; When the gas concentration reaches a second preset threshold value higher than the first preset threshold value, a secondary alarm is triggered and the following actions are executed: S4.4, immediately stop the exhaust system; S4.5, sends a second alarm signal including "high explosion alarm" and "fan shutdown" status to the fire control host.

8. A multi-parameter compensation type combustible gas detection system based on the principle of thermal conductivity, applied to the multi-parameter compensation type combustible gas detection method based on the principle of thermal conductivity as claimed in any one of claims 1 to 7, characterized in that: include: Power supply circuit composition: The detector has a 24V active output circuit, and the circuit board also has voltage monitoring and voltage conversion functions; Communication interface: equipped with 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 relatively comprehensive functional integration, including temperature and humidity sensors, pressure sensors, and hydrogen sensors; Constant temperature and humidity detection chamber: using environmental isolation technology, the detection chamber can maintain a specific temperature and humidity environment; Embedded processor and compensation algorithm module: intelligent algorithm automatically compensates for temperature and humidity differences; The linkage control module controls a certain number of LED lights to display alarm, fault and operating status.

9. The multi-parameter compensation combustible gas detection system based on the thermal conductivity principle according to claim 8 is characterized in that: The system also includes software module design to build a software multi-task hierarchical scheduling framework, including: The system uses a front-end and back-end solution to schedule each functional module based on time slices; A single task is divided into the driver layer, interface layer, and application layer, which run independently but are interrelated; The driver layer implements hardware driver initialization; The interface layer receives and processes data; The application layer analyzes data and performs logical processing.

10. 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 combustible gas detection method based on the thermal conductivity principle according to any one of claims 1 to 7.

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

  • Capacitive liquid level sensor temperature compensation method based on improved BP neural network

    CN119962384A

  • Thermal conductivity type gas analysis system

    CN120195214A

  • Gas measuring device and gas measuring process for a target gas with improved compensation of an ambient condition

    US20250164425A1

Cited By

  • Carbon dioxide real-time monitoring system based on Internet of Things

    CN121385233A

  • A carbon dioxide real-time monitoring system based on the Internet of Things

    CN121385233B