Gas detector and detection method based on multi-parameter environment coupling compensation algorithm

By employing a two-stage adaptive state detection strategy and real-time compensation parameter generation, the drift problem of electrochemical gas detectors under the influence of multi-parameter coupling is solved, improving detection accuracy and stability while reducing system overhead and hardware complexity.

CN121275865BActive Publication Date: 2026-07-14SHENZHEN YIFAN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN YIFAN TECH CO LTD
Filing Date
2025-10-14
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

During long-term operation, the gas sensing unit of existing electrochemical gas detectors is susceptible to the combined effects of changes in multiple parameters such as ambient temperature and humidity, as well as its own aging factors, which can lead to sensitivity and zero-point drift, reducing the accuracy and long-term stability of the detection results.

Method used

A gas detector based on a multi-parameter environmental coupling compensation algorithm is adopted. Through a two-stage adaptive state detection strategy, the first stage performs impedance measurement and state pre-classification at sparse frequency points, and the second stage performs high-resolution frequency sweep measurement within the optimal characteristic frequency window to generate the optimal compensation parameter set in real time, and dynamically track and correct the effects of environment and aging.

Benefits of technology

It achieves efficient and accurate characterization of sensor status, significantly improves the response speed and working efficiency of the detector, enhances the accuracy and long-term stability of gas concentration detection, and reduces system computational load and hardware costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121275865B_ABST
    Figure CN121275865B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of chemical detection, and discloses a gas detector and a detection method based on a multi-parameter environment coupling compensation algorithm, the detector comprising a gas sensing unit, a state detection and characterization unit, a data storage unit and a central processing and control unit, the central processing and control unit controls the execution of two-stage adaptive detection: in the first stage, a rough impedance spectrum is obtained through sparse scanning to quickly pre-classify the current state category of the sensor; in the second stage, the optimal characteristic frequency window is determined based on the category query, and only within the window, focused scanning is carried out to obtain a high-precision focused dynamic impedance spectrum; according to the focused dynamic impedance spectrum and by calling a pre-stored compensation parameter mapping model, an optimal compensation parameter set that accurately matches the current state is generated, and the original direct current signal is compensated by using the compensation parameter set, so that the final gas concentration is obtained. Through the two-stage adaptive detection strategy and the real-time compensation mechanism, efficient and rapid characterization of the sensor state is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of chemical detection technology, specifically to a gas detector and detection method based on a multi-parameter environmental coupling compensation algorithm. Background Technology

[0002] Electrochemical gas detectors have been widely used in industrial safety, environmental monitoring, and other fields due to their high sensitivity and low power consumption. The core of these detectors is the gas sensing unit, which converts the concentration of the gas to be measured into a measurable electrical signal. However, the electrochemical characteristics of the gas sensing unit are highly susceptible to disturbances from external environmental factors. Changes in ambient temperature and humidity, as well as the aging of the sensor's materials, can cause unexpected drift in its output signal, including zero-point drift and sensitivity drift, which directly affects the accuracy and long-term reliability of the detection results. To address this issue, existing technologies typically employ compensation algorithms to correct measurement errors.

[0003] One existing compensation method involves integrating additional environmental sensors, such as temperature and humidity sensors, into the detector. This method compensates by establishing a mathematical model between the gas sensor's output signal and environmental parameters. However, this compensation approach has inherent limitations. It assumes that environmental influences are linearly separable. In reality, the effects of temperature, humidity, and aging on sensors are deeply coupled, not simply additive. Therefore, compensation models based on external environmental parameters struggle to accurately reflect the sensor's true operating state and suffer from insufficient long-term stability.

[0004] To more accurately characterize the intrinsic state of sensors, another approach is exploring electrochemical impedance spectroscopy (EIS). EIS comprehensively reflects the internal electrochemical interface characteristics of a sensor and is considered its state fingerprint. However, to obtain complete sensor state information, current techniques using EIS tend to perform full-band, high-resolution frequency sweep measurements. This process is time-consuming. Prolonged measurements not only interrupt normal gas monitoring but also increase the instantaneous power consumption of the equipment. This high detection overhead limits the practical application of this technology in detection instruments requiring rapid response and continuous operation. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a gas detector and detection method based on a multi-parameter environmental coupling compensation algorithm. This solves the problem that in the long-term operation of existing electrochemical gas detectors, the core gas sensing unit is easily affected by the coupling effects of changes in multiple parameters such as ambient temperature and humidity, as well as its own aging, leading to drift in sensitivity and zero point, thereby reducing the accuracy and long-term stability of the detection results.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] The first aspect of this invention provides a gas detector based on a multi-parameter environmental coupling compensation algorithm, the detector comprising:

[0008] The gas sensing unit is designed to convert the concentration of the gas to be measured into a raw DC signal, either linearly or nonlinearly.

[0009] The data storage unit contains a state pre-classification model, a state-optimal frequency band mapping library, and a compensation parameter mapping model.

[0010] The state detection and characterization unit, electrically coupled to the gas sensing unit, applies a variable-frequency AC excitation signal to the gas sensing unit according to external commands and acquires its response signal. Through calculation, it obtains the complex impedance data of the gas sensing unit at different frequencies, i.e., the electrochemical impedance spectrum. This complex impedance can be expressed as... :

[0011] ;

[0012] in:

[0013] In frequency The complex impedance below;

[0014] This represents the real part of the complex impedance;

[0015] This represents the imaginary part of the complex impedance;

[0016] It is the imaginary unit.

[0017] The central processing and control unit serves as the core of computation and control, interacting with the gas sensing unit, data storage unit, and state detection and characterization unit for data and command exchange.

[0018] The workflow of the central processing and control unit is as follows: When a preset trigger condition is met, the unit controls the state detection and characterization unit to perform the first-stage detection. This detection involves impedance measurement at multiple preset, discrete, sparse frequency points to quickly obtain a coarse impedance spectrum. Subsequently, the unit calls the state pre-classification model in the data storage unit to classify the current comprehensive operating state of the gas sensing unit into a preset state category based on the coarse impedance spectrum. After determining the state category, the unit queries the state-optimal frequency band mapping library to determine an optimal characteristic frequency window that is most sensitive to state changes and corresponds to the current state category. Next, the unit controls the state detection and characterization unit to perform the second-stage detection. This detection involves frequency sweep measurement only within the determined optimal characteristic frequency window at a high frequency resolution to obtain a high-information-density focused dynamic impedance spectrum. Based on this focused dynamic impedance spectrum, the unit calls the compensation parameter mapping model to calculate and generate a set of optimal compensation parameters that precisely match the current state in real time. Finally, the unit uses this real-time generated optimal compensation parameter set to perform compensation calculations on the original DC signal output by the gas sensing unit to obtain and output a final gas concentration corrected for environmental and aging effects.

[0019] The gas detector provided by this invention achieves efficient and accurate characterization of sensor status through a two-stage adaptive state detection strategy. The first stage, sparse scanning, quickly locates the sensor's current operating range with extremely low system overhead, avoiding time-consuming and unnecessary full-band scanning. The second stage, focused scanning, ensures high-resolution data acquisition within the most information-rich frequency band, providing a reliable basis for accurate compensation. Based on this detection result, compensation parameters are generated in real time, enabling the detector to dynamically track and compensate for measurement drift caused by environmental changes and sensor aging. This significantly improves the long-term stability and environmental adaptability of the equipment while maintaining high accuracy, and reduces reliance on manual maintenance and calibration.

[0020] A second aspect of this invention provides a gas detection method based on a multi-parameter environmental coupling compensation algorithm. This method is implemented using the aforementioned gas detector and includes the following steps:

[0021] First, the first stage of detection is performed, and the impedance of the gas sensing unit is measured at multiple preset sparse frequency points to obtain a rough impedance spectrum.

[0022] Subsequently, state pre-classification is performed by calling a pre-stored state pre-classification model and determining the current state category of the gas sensing unit based on the rough impedance spectrum.

[0023] Next, the second stage of detection is performed. Based on the determined state category, a pre-stored state-optimal frequency band mapping library is queried to determine an optimal characteristic frequency window, and the gas sensing unit is swept and measured only within the optimal characteristic frequency window to obtain a focused dynamic impedance spectrum.

[0024] Then, compensation parameters are generated in real time, a fine feature vector is extracted from the focused dynamic impedance spectrum, and the vector is input into a pre-stored compensation parameter mapping model to calculate a set of optimal compensation parameters that precisely match the current state in real time.

[0025] Finally, a compensation calculation is performed, using the real-time generated optimal compensation parameter set to calculate the original DC signal output by the gas sensing unit to obtain the final gas concentration.

[0026] By combining active detection with real-time computation, a closed-loop adaptive compensation process is established by directly correlating the dynamic impedance spectrum characteristics of the intrinsic electrochemical state of the reaction sensor with the external correction parameters required to compensate for measurement drift. This process does not rely on additional environmental sensors but starts directly from the state fingerprint information of the gas sensing unit itself, achieving comprehensive compensation for the coupled effects of multiple parameters such as temperature, humidity, and aging, resulting in higher integration and compensation accuracy.

[0027] This invention provides a gas detector and detection method based on a multi-parameter environmental coupling compensation algorithm. It has the following beneficial effects:

[0028] 1. This invention achieves efficient and rapid characterization of the sensor's current state through a two-stage adaptive detection strategy that combines sparse scanning and state pre-classification in the first stage with focused scanning and fine characterization in the second stage. This approach avoids time-consuming and costly scanning across the entire operating frequency band, performing high-precision detection only within the optimal characteristic frequency window that is most sensitive to changes in the current state. This significantly reduces the system's computational load and the time required for a single compensation, thereby improving the detector's response speed and operating efficiency.

[0029] 2. This invention is based on real-time acquisition of a focused dynamic impedance spectrum that accurately reflects the current state of the sensor. It calls upon a pre-stored compensation parameter mapping model to calculate a set of optimal compensation parameters in real time, and then uses this parameter set to compensate the original DC signal. This mechanism eliminates the reliance on fixed, preset correction values ​​for compensation, instead dynamically tracking and accurately eliminating measurement drift caused by changes in ambient temperature and humidity, as well as sensor aging. This significantly improves the accuracy of gas concentration detection and the stability of long-term operation.

[0030] 3. This invention directly utilizes the electrochemical impedance spectroscopy of the gas sensing unit itself as a state fingerprint to extract information for compensating for the effects of multi-parameter coupling. This approach eliminates the need for additional environmental sensors such as temperature and humidity sensors, reducing both the hardware cost and system design complexity of the detector. Furthermore, since impedance spectroscopy directly reflects the combined effects of environmental and aging factors on the sensor, it enables more accurate and comprehensive compensation, avoiding errors that may be introduced by multi-sensor data fusion. Attached Figure Description

[0031] Figure 1 This is a system framework diagram of the present invention;

[0032] Figure 2 This is a flowchart of the method of the present invention.

[0033] Among them, 100 is a gas detector; 110 is a gas sensing unit; 120 is a state detection and characterization unit; 130 is a central processing and control unit; 140 is a data storage unit; and 150 is a human-computer interaction unit. Detailed Implementation

[0034] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0035] See attached document Figure 1 , Figure 1 This is a schematic diagram of the system structure of a gas detector 100 according to an embodiment of the present invention.

[0036] This invention provides a gas detector 100, which physically integrates a gas sensing unit 110, a state detection and characterization unit 120, a central processing and control unit 130, a data storage unit 140, and a human-machine interaction unit 150. These units are interconnected through an internal bus or dedicated circuit, forming a collaborative organic whole.

[0037] In terms of system structure, the central processing and control unit 130 serves as the core, establishing information interaction and control connections with other units. The state detection and characterization unit 120 is electrically coupled to the gas sensing unit 110 to achieve online detection of the electrochemical characteristics of the gas sensing unit 110 itself.

[0038] The gas sensing unit 110 is the source for acquiring information about the gas to be measured. In one embodiment, the gas sensing unit 110 is an amperometric electrochemical gas sensor, which internally includes a working electrode, a counter electrode, and a reference electrode. The gas sensing unit 110 operates at a constant DC bias potential. When the target gas molecules undergo an electrochemical reaction on the surface of the working electrode, a weak Faraday current is generated. This current signal is amplified and converted by a potentiostat circuit to form a raw DC signal. The amplitude of the original DC signal has a direct functional relationship with the concentration of the gas being measured. This original DC signal... It is transmitted to the central processing and control unit 130 for processing.

[0039] The central processing and control unit 130 is the entity that executes the gas detection method of the present invention. In hardware, the central processing and control unit 130 can be a microcontroller (MCU), a digital signal processor (DSP), a field-programmable gate array (FPGA), or a system-on-a-chip (SoC) containing these processing cores. As a processing device, the central processing and control unit 130 is responsible for executing the program instructions stored in the data storage unit 140 to achieve the following functions:

[0040] S101: Receive and process the raw DC signal from the gas sensing unit 110. .

[0041] S102: Based on a preset time period or specific event triggering conditions, generate control commands and send them to the status detection and characterization unit 120 to initiate a status detection process for the gas sensing unit 110.

[0042] S103: Receive complex impedance data measured and returned by the state detection and characterization unit 120.

[0043] S104: Based on the received complex impedance data, call the preset algorithm model from the data storage unit 140 to perform a series of calculation tasks such as state recognition and compensation parameter generation.

[0044] S105: Integrates raw DC signal The compensation parameters generated in real time are used to complete the final gas concentration compensation calculation.

[0045] S106: Send the calculated final gas concentration value to the human-machine interaction unit 150 for display or output.

[0046] Data storage unit 140 is a non-volatile storage device, such as flash memory or electrically erasable programmable read-only memory (EEPROM). As a storage device, data storage unit 140's function is not limited to storing system firmware; more importantly, it embeds a series of models and databases built during the offline calibration phase for online compensation decisions. These specifically include: a state pre-classification model, a state-optimal frequency band mapping library, and a compensation parameter mapping model. These pre-built models and databases form the knowledge foundation for implementing the adaptive compensation algorithm.

[0047] The state detection and characterization unit 120 is a dedicated hardware module for active state sensing. The state detection and characterization unit 120 is directly electrically connected to the electrode system of the gas sensing unit 110. Under the command of the central processing and control unit 130, the state detection and characterization unit 120 generates a weak sinusoidal AC excitation signal of a specified frequency and amplitude, and superimposes it onto the DC bias potential of the gas sensing unit 110. Simultaneously, the state detection and characterization unit 120 can accurately acquire the AC response current signal flowing through the sensor, and calculate the complex impedance of the gas sensing unit 110 at the excitation frequency in real time using internal calculation circuits or algorithms. This complex impedance It is a direct physical quantity that characterizes the current electrochemical state of the sensor.

[0048] The human-machine interface unit 150 provides users with an interface for information exchange with the gas detector 100. This interface can be implemented as a panel with an LCD screen and physical buttons, or as a touch screen. The human-machine interface unit 150 is responsible for presenting the final gas concentration value calculated by the central processing and control unit 130 to the user in a digital or graphical format, and for receiving user commands for configuration, calibration, and other operations.

[0049] See attached document Figure 1 In this embodiment of the invention, the gas sensing unit 110 is the basic physical component of the gas detector 100 for measuring gas concentration. The function of the gas sensing unit 110 is to convert the target gas concentration information in the measured environment into a raw DC signal that can be processed by subsequent circuits.

[0050] In one specific embodiment, the gas sensing unit 110 employs a three-electrode ampere-type electrochemical sensor. The three-electrode ampere-type electrochemical sensor includes a working electrode, a reference electrode, and a counter electrode, and is encapsulated within a housing that allows the target gas to diffuse freely. The three-electrode system of the three-electrode ampere-type electrochemical sensor is driven by an external potentiostat circuit (integrated in the gas detector 100, not shown separately). The function of the external potentiostat circuit is to precisely maintain the potential of the working electrode at a preset DC bias potential, based on the reference electrode, that induces a specific electrochemical reaction in the target gas.

[0051] When the target gas molecules pass through the diffusion barrier and enter the sensor, reaching the surface of the working electrode, they undergo oxidation or reduction reactions at a preset DC bias potential. Under certain conditions, the rate of this electrochemical reaction is directly proportional to the concentration of the target gas near the working electrode. According to Faraday's law, this reaction rate directly corresponds to a DC current flowing through the working electrode, i.e., the Faraday current. Therefore, this DC current The magnitude of directly characterizes the concentration of the gas being measured. The ideal relationship can be expressed as:

[0052] ;

[0053] in:

[0054] The DC current output by the gas sensing unit 110;

[0055] The actual concentration of the gas to be measured;

[0056] This is the sensitivity coefficient of the sensor, usually expressed in A / ppm.

[0057] This is the zero-point bias current of the sensor, which is the baseline current output in clean air.

[0058] It is worth noting that the sensitivity coefficient and zero-point bias current These currents are not constant; they are affected nonlinearly by factors such as ambient temperature, humidity, air pressure, and the aging of the sensor itself. This is the core issue that needs to be addressed. The DC current generated by the gas sensing unit 110... The signal is then transmitted to a transimpedance amplifier (TIA) for processing. The TIA linearly converts the current signal into a voltage signal, forming the original DC signal. This data is then transmitted to the central processing and control unit 130. The conversion relationship is as follows:

[0059] ;

[0060] in:

[0061] The raw DC signal is input to the central processing and control unit 130;

[0062] This is the feedback resistor value of the transimpedance amplifier.

[0063] Besides serving as a DC signal source, the gas sensing unit 110 also plays another crucial role: acting as the detection target for the state detection and characterization unit 120. The weak AC excitation signal applied by the state detection and characterization unit 120 is superimposed on the DC bias potential of the working electrode through a potentiostat circuit. At this time, the entire electrochemical system of the gas sensing unit 110 exhibits a complex electrochemical impedance. The characteristics of the electrochemical impedance directly reflect the state of its internal electrode / electrolyte interface, the conductivity of the electrolyte, and the microscopic dynamics of mass transport processes, all of which are the result of the combined influence of the environment and aging state. Therefore, by measuring this impedance, fingerprint information characterizing its current comprehensive state can be obtained.

[0064] The data storage unit 140 serves as the permanent storage medium for the gas detector 100, and in hardware, it can be a non-volatile memory. The core function of the data storage unit 140 is to permanently store a series of models and data pre-built during the offline calibration phase. These models and data form the algorithmic basis for the online adaptive compensation method of this invention. Specifically, the data storage unit 140 stores a state pre-classification model, a state-optimal frequency band mapping library, and a compensation parameter mapping model. The construction methods of these three core components will be described in detail below.

[0065] The construction process of these components is completed by an external computer system or by the central processing and control unit 130 of the gas detector 100 itself after acquiring the aforementioned full-condition impedance spectrum database, and includes the following steps:

[0066] S301: State Preclassification Model The state pre-classification model is used to quickly and initially identify the current state of the sensor during the online detection phase.

[0067] S301a: From each data tuple in the full-condition impedance spectrum database Extract its complete reference dynamic impedance spectrum. .

[0068] S301b: Selected across the entire spectrum range A fixed sparse frequency point And extract the complex impedance features at these frequency points to form a low-dimensional coarse feature vector. :

[0069] ;

[0070] in:

[0071] To connect with state nodes The corresponding coarse feature vector;

[0072] The total number of sparse frequency points selected;

[0073] For the first A sparse frequency point, In frequency The magnitude of the lower complex impedance;

[0074] In frequency The phase angle of the lower complex impedance.

[0075] S301c: All state nodes in the database Based on their physical properties (such as temperature and humidity range, aging stage), they are classified into Discrete state categories and for each coarse feature vector Label it with its corresponding category tag .

[0076] S301d: Utilizing generated feature-label pairs The training set is used to train a supervised learning classification algorithm (such as k-nearest neighbors, decision trees, or support vector machines) to obtain the final state pre-classification model. .

[0077] S302: Status-Optimal Frequency Band Mapping Library The establishment of the state-optimal frequency band mapping library guides the second phase of online detection, assigning the most informative detection frequency bands for different state categories.

[0078] S302a: Includes all reference dynamic impedance spectra from the full-condition impedance spectrum database. According to its corresponding state category Group them.

[0079] S302b: For each state category Statistical analysis was performed on all impedance spectra within the range to find a frequency window. Within this window, the impedance spectrum curves corresponding to different physical states (e.g., different degrees of aging under the same temperature and humidity, or different temperatures and humidity under the same degree of aging) show the greatest differences in shape, meaning that this frequency band is most sensitive to changes in state.

[0080] S302c: Establish a system from each state category to its corresponding optimal characteristic frequency window The mapping relationship, organized in the form of lookup tables or key-value pairs, constitutes the state-optimal frequency band mapping library.

[0081] S303: Compensation Parameter Mapping Model The construction of the compensation parameter mapping model is used to calculate the optimal compensation parameters in real time based on the accurate state fingerprint.

[0082] S303a: For each data tuple in the database From its reference dynamic impedance spectrum Extract a high-dimensional, fine-grained feature vector. This refined feature vector can contain impedance information at more frequency points, or circuit element parameters obtained by fitting an equivalent circuit model.

[0083] S303b: Refined feature vectors As input, the corresponding optimal compensation parameter set As output, they form (input-output) data pairs used for training.

[0084] S303c: Uses a regression algorithm (such as multiple linear regression, gradient boosting tree, or neural network model) to train these data pairs and build a fine feature vector. To the compensation parameter set The nonlinear mapping relationship is used to obtain the compensation parameter mapping model.

[0085] The above-described pre-classification model of state has been completed. State-Optimal Frequency Band Mapping Library and compensation parameter mapping model The data is uniformly written and solidified in the data storage unit 140, providing a decision-making basis for the online operation of the gas detector 100.

[0086] The state detection and characterization unit 120 is a key physical module in the gas detector 100 used to actively acquire the state information of the gas sensing unit 110 itself. The state detection and characterization unit 120 operates under the scheduling of the central processing and control unit 130. Its core function is to accurately perform electrochemical impedance spectroscopy measurements on the gas sensing unit 110 and provide the measurement results to the central processing and control unit 130 in the form of complex impedance data.

[0087] The complete process of the state detection and characterization unit 120 performing an impedance measurement at a specific frequency point includes the following steps:

[0088] S401: Receive probe command and generate AC excitation signal. The central processing and control unit 130 sends a probe command to the state detection and characterization unit 120, which includes the target frequency required for this measurement. and excitation amplitude The signal generation module inside the state detection and characterization unit 120 generates a highly stable sinusoidal AC excitation signal according to this instruction.

[0089] ;

[0090] in:

[0091] The instantaneous excitation voltage varies with time;

[0092] The voltage amplitude of the excitation signal is set to be small enough (e.g., 5mV to 10mV) to ensure that the detection process does not cause significant disturbance to the DC operating point of the gas sensing unit 110 and conventional gas detection.

[0093] The frequency of the excitation signal;

[0094] For time.

[0095] The generated excitation signal is superimposed on the DC bias potential of the working electrode of the gas sensing unit 110 through a coupling circuit.

[0096] S402: Synchronously acquires AC response signals. When an AC excitation signal is applied... Simultaneously, the response signal acquisition module inside the state detection and characterization unit 120 synchronously measures the AC response current flowing through the gas sensing unit 110. :

[0097] ;

[0098] in:

[0099] The instantaneous response current varies with time;

[0100] In frequency The amplitude of the response current under the given conditions;

[0101] In frequency The phase shift of the response current relative to the excitation voltage.

[0102] In one specific implementation, the response signal acquisition module includes a high-precision transimpedance amplifier to convert a weak current signal into a voltage signal, which is then digitized by a high-speed, high-resolution analog-to-digital converter (ADC).

[0103] S403: Real-time complex impedance calculation. The impedance spectrum real-time calculation module inside the state detection and characterization unit 120 receives the digitized excitation signal (as a reference) and response signal, and calculates the impedance at that frequency in real time. Below, the complex impedance presented by the gas sensing unit 110 Complex impedance It is the phasor of the excitation signal Phasor of the response signal The ratio:

[0104] ;

[0105] in:

[0106] In frequency The complex impedance below;

[0107] The imaginary unit;

[0108] The amplitude of the excitation voltage signal;

[0109] In frequency Below, the amplitude of the response current signal;

[0110] In frequency The phase shift of the response current relative to the excitation voltage;

[0111] is the base of the natural logarithm;

[0112] This represents the real part of the complex impedance;

[0113] This represents the imaginary part of the complex impedance. Specific implementation methods for this solution process include, but are not limited to: methods based on Fast Fourier Transform (FFT), i.e., performing an FFT on one or more cycles of the acquired signal to extract the frequency. The amplitude and phase information at the point are used to calculate the complex impedance; or, based on a digital lock-in amplification method, the real part of the complex impedance is directly calculated through digital mixing and low-pass filtering. and the virtual part .

[0114] S404: Output detection results. The state detection and characterization unit 120 packages the calculated complex impedance data (e.g., in the form of real and imaginary part numerical pairs) and sends it to the central processing and control unit 130 via the internal data bus for subsequent state identification and compensation parameter generation calculations.

[0115] The central processing and control unit 130 is the core of the gas detector 100 for computation and control. The central processing and control unit 130 is responsible for executing program instructions stored in the data storage unit 140 and scheduling other hardware units to work collaboratively to complete the entire process of online detection and adaptive compensation. The steps it performs in actual operation of the device will be described in detail below.

[0116] S501: Routine detection and probe triggering. In normal operating mode, the central processing and control unit 130 continuously receives and processes the raw DC signal from the gas sensing unit 110. Simultaneously, a trigger monitoring logic runs internally within this unit. When a preset trigger condition is met, the central processing and control unit 130 will pause the regular concentration-signal direct conversion and initiate an adaptive state detection process. The specific implementation of this trigger condition includes:

[0117] Time-triggered: The detection process is automatically started at a fixed time interval (e.g., every 30 minutes).

[0118] Event trigger: When a raw DC signal is detected It is activated when the drift or volatility exceeds a preset threshold, or when an external environmental sensor (not shown) detects a drastic change in temperature or humidity.

[0119] Command trigger: Started when a user calibration command is received from the human-machine interaction unit 150 or a remote command is received from the host computer.

[0120] S502: First-stage detection: coarse scanning and state pre-classification. After the detection process is triggered, the central processing and control unit 130 performs the first-stage detection:

[0121] S502a: The central processing and control unit 130 sends a series of detection commands to the state detection and characterization unit 120, instructing it to perform detection in a preset state. sparse frequency points Impedance measurements were performed point by point.

[0122] S502b: After the state detection and characterization unit 120 completes the measurement, it will... The complex impedance data corresponding to each frequency point is returned to the central processing and control unit 130 to form a rough impedance spectrum.

[0123] S502c: The central processing and control unit 130 constructs a coarse feature vector consistent with the format of the offline calibration stage based on the received coarse impedance spectrum data.

[0124] S502d: The central processing and control unit 130 retrieves the state pre-classification model from the data storage unit 140. and construct a coarse feature vector As input, it performs calculations. The model outputs a class label for the current state. This label indicates the approximate operating condition range of the sensor (e.g., "high temperature and high humidity", "low temperature and dryness", or "moderate aging").

[0125] S503: Second-stage detection: Focused scan. (After obtaining the current state category...) Then, the central processing and control unit 130 immediately performs the second phase of probing to obtain more detailed status information:

[0126] S503a: Central Processing and Control Unit 130, by status category For indexing, query the state-optimal frequency band mapping library stored in data storage unit 140. This allows for the determination of an optimal feature frequency window corresponding to the current state category. .

[0127] S503b: The central processing and control unit 130 sends a new series of detection commands to the state detection and characterization unit 120, instructing it to perform frequency sweep measurements only within the optimal characteristic frequency window with a higher frequency resolution (i.e., denser frequency points) to obtain the focused dynamic impedance spectrum.

[0128] S504: Real-time generation of compensation parameters. After receiving the focused dynamic impedance spectrum, the central processing and control unit 130 performs calculations to generate compensation parameters that precisely match the current sensor state:

[0129] S504a: The central processing and control unit 130 processes the focused dynamic impedance spectrum and extracts a high-dimensional fine feature vector from it. The fine feature vector can be constructed by directly using the complex impedance values ​​at multiple frequency points within the frequency band, or by fitting the impedance spectrum of this band to a preset electrochemical equivalent circuit model to obtain the component parameter values ​​(such as charge transfer resistance, double layer capacitance, etc.).

[0130] S504b: The central processing and control unit 130 retrieves the compensation parameter mapping model from the data storage unit 140. And extract the fine feature vector As input, the model calculates and outputs a set of currently optimal compensation parameters. In one embodiment, the compensation parameter set may include updated sensitivity coefficients. and zero-point bias current .

[0131] S505: Final gas concentration compensation calculation and output. The Central Processing and Control Unit 130 uses the newly generated compensation parameter set. The raw DC signal output by the gas sensing unit 110 Perform the final compensation calculation to obtain the compensated gas concentration. The compensation operation is performed by a pre-defined compensation model function. definition:

[0132] ;

[0133] in:

[0134] The final output is the compensated gas concentration;

[0135] The original DC signal output by the sensor;

[0136] This is a set of compensation parameters generated in real time based on the current sensor status.

[0137] For example, if the compensation model is a linear model, then the specific form of this operation is:

[0138] ;

[0139] in This is the feedback resistor value of the transimpedance amplifier. Finally, the central processing and control unit 130 calculates the final gas concentration. The data is transmitted to the human-computer interaction unit 150 for display. After completing this compensation process, the system returns to the normal detection mode and waits for the next trigger.

[0140] See attached document Figure 2 , Figure 2 This is a general flowchart of a gas detection method based on multi-parameter environmental coupling compensation according to an embodiment of the present invention. The method provided by the present invention is logically divided into two core stages: one is the offline model construction and calibration stage completed before the gas detector leaves the factory, and the other is the online detection and adaptive compensation stage performed by the gas detector in the actual application environment.

[0141] The offline model building and calibration phase is a fundamental data preparation and model training process. The goal of this phase is to instill prior knowledge into the gas detector to cope with complex operating conditions. This phase involves systematically experimenting with the gas sensing unit 110 under various controlled environmental (temperature, humidity, air pressure) and aging state combinations to establish a full-condition state-impedance spectrum database. This database stores data that correlates the sensor's specific state, its corresponding complete electrochemical impedance spectral characteristics, and the optimal compensation parameters required to obtain accurate measurement results under that state. Based on the full-condition state-impedance spectral database, three core software components are trained and generated using machine learning and data analysis techniques: a state pre-classification model, a state-optimal frequency band mapping library, and a compensation parameter mapping model. These components are ultimately embedded into the gas detector's data storage unit 140.

[0142] The online detection and adaptive compensation phase is a real-time, cyclical workflow performed by the gas detector at the user's site. This process specifically includes the following steps:

[0143] S201: The gas detector operates in normal mode and initiates an active state detection and adaptive compensation process when the preset trigger conditions are met.

[0144] S202: Perform a low-overhead first-stage detection on a sparse frequency point set to obtain a coarse impedance spectrum, and call the aforementioned state pre-classification model to quickly perform a preliminary classification of the sensor's current state.

[0145] S203: Based on the classification results of the first stage, query the state-optimal frequency band mapping library to determine the optimal feature frequency window that is most sensitive to changes in the current state.

[0146] S204: Perform a high-resolution second-stage probe only once within this optimal characteristic frequency window to obtain a focused dynamic impedance spectrum containing key state fingerprint information for accurate compensation.

[0147] S205: Extract fine feature vectors from the focused dynamic impedance spectrum and call the compensation parameter mapping model to calculate a set of optimal compensation parameters that precisely match the current sensor state in real time.

[0148] S206: Using the real-time generated set of compensation parameters, perform compensation calculations on the original DC signal output by the gas sensing unit 110 to obtain and output a final gas concentration value after correction for environmental and aging effects.

[0149] The offline model construction and calibration stage is the fundamental preparatory work for the method of this invention. Its purpose is to construct a mathematical model and database that can characterize and compensate for the behavior of the sensor under different operating conditions through systematic experiments and data analysis. All operations in this stage are completed before the gas detector leaves the factory.

[0150] S601: Construction of the full-condition impedance spectroscopy database. This step aims to obtain a complete raw dataset that accurately correlates the multi-condition of the sensor, its electrochemical fingerprint characteristics, and the corresponding compensation requirements.

[0151] S601a: Place one or more gas sensing units 110 to be calibrated in a high-precision environmental simulation chamber. The environmental simulation chamber can independently and accurately control its internal environmental parameters, including temperature, relative humidity, and air pressure.

[0152] S601b: Defines a series of discretized multidimensional state nodes Each state node represents a specific overall sensor operating state, determined by both environmental parameters and the sensor's own health status. A state node can be represented by a vector:

[0153] ;

[0154] in:

[0155] For the first One state node;

[0156] For the corresponding number The ambient temperature of each state node;

[0157] For the corresponding number The relative humidity of the environment for each state node;

[0158] For the corresponding number The ambient air pressure of each state node;

[0159] For the corresponding number The aging status of sensors at each state node. Different aging states of sensors. This is achieved through accelerated aging experiments conducted under specific environmental conditions, such as prolonged electrical or chemical exposure. The aging process is quantified using metrics such as equivalent working time.

[0160] S601c: For each set state node Under clean air conditions, a broadband electrochemical impedance spectroscopy sweep measurement is performed on the gas sensing unit 110 through the state detection and characterization unit 120 to obtain the reference dynamic impedance spectrum under this state. .

[0161] S601d: In the state-maintaining node Under the premise that all other conditions remain unchanged, a standard target gas of known concentration is introduced into the environmental simulation chamber. After the output of the gas sensing unit 110 stabilizes, record its original DC signal. .

[0162] S601e: Based on a preset compensation model function An optimal set of compensation parameters can be solved in reverse using numerical optimization algorithms (such as the least squares method). This parameter set enables the compensation model to adapt to the original signal. The calculation results and standard concentration The error between them is minimized.

[0163] S601f: Traverse all preset state nodes, repeat steps S601c to S601e, and set the state vector corresponding to each state node. Reference dynamic impedance spectrum and the optimal compensation parameter set Integrate into a single data tuple All these data tuples together constitute the full-condition state-impedance spectrum database.

[0164] S602: Training and Generation of the Core Model and Database. This step utilizes the database built in S601 to train and generate three core software components for online phased decision-making through data mining and machine learning algorithms.

[0165] S602a: State Preclassification Model The construction of the database. From each benchmark dynamic impedance spectrum. Extract in Complex impedance information at fixed, sparsely distributed frequency points constitutes a low-dimensional coarse feature vector. At the same time, all state nodes Based on their physical meaning (such as combinations of high, medium, and low temperature ranges and high, medium, and low humidity ranges), they are divided into Discrete state categories Using these feature vectors with category labels The training set is used to train a classification algorithm (e.g., a support vector machine), ultimately obtaining a state pre-classification model. .

[0166] S602b: Status-Optimal Frequency Band Mapping Library The establishment of the database. This involves creating all impedance spectra from the database. According to its state category Grouping is performed. Sensitivity analysis is conducted on the spectral data within each category to identify the frequency window where the impedance spectrum changes most drastically with condition (e.g., aging degree) within the operating range represented by that category. This frequency window is defined as the optimal characteristic frequency window for that condition category. Ultimately, a system is built from each state category. The mapping relationship between the state and its corresponding optimal characteristic frequency window forms a state-optimal frequency band mapping library. .

[0167] S602c: Compensation Parameter Mapping Model The construction of the database. From each benchmark dynamic impedance spectrum. In the process, a high-dimensional, fine-grained feature vector is extracted. This vector can be constructed from the impedance spectrum at more frequency points, or from component parameters (such as charge transfer resistance, double-layer capacitance, etc.) obtained by fitting an equivalent circuit model. This refined eigenvector... As input, with the corresponding optimal compensation parameter set For the output, training data pairs are constructed. These data pairs are used to train a regression model (e.g., a gradient boosting regression tree or a neural network), establishing a direct mapping from fine-grained feature vectors to the compensation parameter set, ultimately yielding a compensation parameter mapping model. .

[0168] Finally, the completed state pre-classification model will be constructed. State-Optimal Frequency Band Mapping Library and compensation parameter mapping model Together, they are written and solidified into the data storage unit 140 of the gas detector 100.

[0169] The online detection and adaptive compensation phase is the real-time workflow executed at the user's site after the gas detector 100 is actually deployed. The core of this phase is to periodically or when necessary actively detect the current state of the gas sensing unit 110 and generate compensation parameters in real time based on the detection results to accurately correct the original measurement signal.

[0170] S701: Routine detection and triggering. During the normal operation of the gas detector 100, the central processing and control unit 130 continuously acquires and processes the raw DC signal from the gas sensing unit 110. Meanwhile, this unit executes a preset triggering logic to determine when to initiate a complete state detection and compensation process. The specific implementation of this triggering logic can be one or more combinations of the following:

[0171] Triggering based on a fixed time period: The timer inside the central processing and control unit 130 automatically generates a trigger signal at a preset time interval (e.g., every hour).

[0172] Event triggering based on abnormal measurement signals: The central processing and control unit 130 monitors the raw DC signal in real time. The baseline drift rate or noise level. When the change in these indicators exceeds a preset threshold over a period of time, the system determines that the sensor state may have changed significantly and generates a trigger signal.

[0173] Triggered by external commands: When the user issues a manual calibration command through the human-machine interaction unit 150, or when the system receives a remote diagnostic command sent by the host computer through the communication interface, a trigger signal is generated.

[0174] S702: Two-stage adaptive state detection. Once a trigger signal is received, the central processing and control unit 130 immediately initiates a two-stage adaptive detection process to efficiently and accurately acquire fingerprint information characterizing the current sensor state.

[0175] S702a: Performs the first stage of sparse scanning and state pre-classification. The central processing and control unit 130 first instructs the state detection and characterization unit 120, in a preset environment... A set of sparse frequency points Impedance measurement is performed. This process is low-cost and short-time. Based on the complex impedance data returned from the measurement, the central processing and control unit 130 constructs a low-dimensional coarse feature vector. Subsequently, the state pre-classification model stored in data storage unit 140 is invoked. The model takes this coarse feature vector as input and outputs a class label for the current state after computation. This label positions the sensor's current operating condition within a general range, such as "high temperature and high humidity with slight aging".

[0176] S702b: Performs the second stage of focused scanning and fine characterization. This is done after obtaining the state category. Subsequently, the central processing and control unit 130 uses this category label as an index to query the status-optimal frequency band mapping library in the data storage unit 140. Retrieve the optimal feature frequency window that uniquely corresponds to this category. The central processing and control unit 130 randomly instructs the state detection and characterization unit 120 to perform a second frequency sweep measurement with a high frequency resolution only within this selected, information-rich narrow frequency band. This measurement yields a high-precision focused dynamic impedance spectrum containing detailed state fingerprint information sufficient for accurate compensation.

[0177] S703: Real-time compensation based on state fingerprint. After acquiring the focused dynamic impedance spectrum, the central processing and control unit 130 executes a real-time compensation calculation process.

[0178] S703a: Real-time generation of compensation parameters. The central processing and control unit 130 extracts features from the focused dynamic impedance spectrum data, generating a high-dimensional, fine-grained feature vector. The specific construction method of this fine feature vector can be: after fitting the impedance spectrum to a pre-defined electrochemical equivalent circuit model, the resulting set of component parameter values ​​(e.g., charge transfer resistance) Double-layer capacitors (etc.); or directly use the real and imaginary parts of the complex impedance at multiple frequency points within the frequency band. The central processing and control unit 130 then calls the compensation parameter mapping model in the data storage unit 140. The model takes this refined feature vector as input and, after nonlinear mapping calculations, outputs a set of optimal compensation parameters that precisely match the current sensor state. For example, this parameter set can be specified as the sensitivity coefficients in the current state. and zero-point bias current .

[0179] S703b: Compensation calculation for the final gas concentration. The Central Processing and Control Unit 130 uses the compensation parameter set generated in real time in S703a. For the currently acquired raw DC signal Perform a compensation operation to calculate the final gas concentration. This operation is performed by a pre-defined compensation model function. The definition, and its specific form, have been determined during the offline calibration phase. For example, in a linear compensation model, this calculation process utilizes the currently optimal zero-point bias. Zero-point correction is performed on the original current, and then the current optimal sensitivity coefficient is used. Perform gain correction.

[0180] Finally, the calculated compensated gas concentration The data is transmitted to the human-machine interface unit 150 for display and recording. At this point, a complete adaptive compensation process is finished, and the system returns to the S701's normal detection and trigger monitoring state.

Claims

1. A gas detector based on a multi-parameter environmental coupling compensation algorithm, characterized in that, include: The gas sensing unit is used to convert the concentration of the gas to be measured into a raw DC signal; Data storage unit, used to solidify storage state pre-classification model, state-optimal frequency band mapping library and compensation parameter mapping model; The state detection and characterization unit is used to perform electrochemical impedance spectroscopy measurement on the gas sensing unit according to instructions and output complex impedance data. The central processing and control unit, connected to the gas sensing unit, data storage unit, and state detection and characterization unit, is used for: The state detection and characterization unit is controlled to perform a first-stage detection to obtain a rough impedance spectrum. The first-stage detection involves impedance measurement at multiple preset sparse frequency points. The state pre-classification model in the data storage unit is invoked to determine the current state category based on the coarse impedance spectrum. Based on the state category, the state-optimal frequency band mapping library is queried to determine an optimal characteristic frequency window, and the state detection and characterization unit is controlled to perform a second-stage detection to perform frequency sweep measurement on the gas sensing unit only within the optimal characteristic frequency window to obtain the focused dynamic impedance spectrum. Based on the focused dynamic impedance spectrum, the compensation parameter mapping model is invoked to generate a set of optimal compensation parameters in real time; The original DC signal is compensated using the optimal compensation parameter set to obtain the final gas concentration.

2. The gas detector based on a multi-parameter environmental coupling compensation algorithm according to claim 1, characterized in that, The state pre-classification model, state-optimal frequency band mapping library, and compensation parameter mapping model stored in the data storage unit are generated offline based on the full-condition state-impedance spectrum database. The full-condition state-impedance spectrum database contains multiple data tuples. Each data tuple includes a specific sensor integrated working state, the reference dynamic impedance spectrum corresponding to that state, and the optimal compensation parameter set required to obtain accurate measurement results under that state.

3. The gas detector based on a multi-parameter environmental coupling compensation algorithm according to claim 1, characterized in that... The central processing and control unit constructs a coarse feature vector from the complex impedance data at the sparse frequency points and inputs the coarse feature vector into the state pre-classification model to determine the state category.

4. The gas detector based on a multi-parameter environmental coupling compensation algorithm according to claim 1, characterized in that, The central processing and control unit is used to extract a fine feature vector based on the focused dynamic impedance spectrum and input the fine feature vector into the compensation parameter mapping model to generate the optimal compensation parameter set; the fine feature vector is the complex impedance value of the focused dynamic impedance spectrum at multiple frequency points, or the component parameter value obtained after fitting the focused dynamic impedance spectrum to the equivalent circuit model.

5. The gas detector based on a multi-parameter environmental coupling compensation algorithm according to claim 1, characterized in that, The central processing and control unit is configured to initiate the first-stage detection and the second-stage detection when preset trigger conditions are met; the trigger conditions include: reaching a preset time interval, detecting that the drift or volatility of the original DC signal exceeds a preset threshold, or receiving an external calibration command.

6. A gas detection method based on a multi-parameter environmental coupling compensation algorithm, and a gas detector based on a multi-parameter environmental coupling compensation algorithm according to any one of claims 1-5, characterized in that, Includes the following steps: The first stage of detection is performed by measuring the impedance of the gas sensing unit at multiple preset sparse frequency points to obtain a rough impedance spectrum. Perform state pre-classification by calling a pre-stored state pre-classification model and determining the current state category based on the coarse impedance spectrum. The second stage of detection is performed. Based on the state category, a pre-stored state-optimal frequency band mapping library is queried to determine the optimal characteristic frequency window. The gas sensing unit is then swept and measured only within the optimal characteristic frequency window to obtain a focused dynamic impedance spectrum. Compensation parameters are generated in real time. Based on the focused dynamic impedance spectrum, a pre-stored compensation parameter mapping model is called to calculate a set of optimal compensation parameters in real time. A compensation calculation is performed, using the optimal compensation parameter set to calculate the original DC signal output by the gas sensing unit to obtain the final gas concentration.

7. The gas detection method based on a multi-parameter environmental coupling compensation algorithm according to claim 6, characterized in that, The steps for performing state pre-classification specifically include: Extract a coarse feature vector from the coarse impedance spectrum; The coarse feature vector is input into the state pre-classification model to obtain the state category.

8. The gas detection method based on a multi-parameter environmental coupling compensation algorithm according to claim 6, characterized in that, The step of generating compensation parameters in real time specifically includes: Extract fine feature vectors from the focused dynamic impedance spectrum; The refined feature vector is input into the compensation parameter mapping model to obtain the optimal compensation parameter set.

9. The gas detection method based on a multi-parameter environmental coupling compensation algorithm according to claim 8, characterized in that, The fine feature vector is extracted by fitting the focused dynamic impedance spectrum to a preset electrochemical equivalent circuit model, and taking the obtained charge transfer resistance and double-layer capacitance and other component parameters as the fine feature vector.

10. The gas detection method based on a multi-parameter environmental coupling compensation algorithm according to claim 6, characterized in that, The optimal compensation parameter set includes the sensitivity coefficient and the zero-point bias current; the specific steps for performing the compensation calculation are as follows: The zero-point bias current is used to perform zero-point correction on the original current converted from the original DC signal; The gain is then corrected using the sensitivity coefficient.