Gas detection method and system and terminal equipment
By acquiring the test spectrum and calibration spectrum of the gas detection system, calculating the relative concentration using the least squares method, and determining the degree of dispersion of the deviation spectrum, the problem of inaccurate detection results of TDLAS technology in complex environments is solved, and high-reliability detection is achieved in interference environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XUZHOU XUHAI OPTO ELECTRONICS TECH CO LTD
- Filing Date
- 2025-12-30
- Publication Date
- 2026-05-08
AI Technical Summary
TDLAS gas detection technology is susceptible to interference in complex environments, which can lead to a decrease in the accuracy and reliability of detection results.
By acquiring the test spectrum of the gas to be tested and the calibration spectrum of the standard gas, the relative concentration is calculated using the least squares method. Combined with the dispersion value of the deviation spectrum, the validity of the detection result is judged, and the center wavelength of the probe beam is dynamically adjusted to adapt to environmental interference.
It improves the accuracy and reliability of gas detection in complex interference environments, avoids false alarms, and enhances the credibility of detection results.
Smart Images

Figure CN122003592A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of gas detection, and more particularly to a gas detection method, system, and terminal equipment. Background Technology
[0002] Tunable Diode Laser Absorption Spectroscopy (TDLAS) is an important technique in gas detection. However, in practical applications, TDLAS is susceptible to interference from various environmental factors, leading to abnormal light intensity at the photodetector and consequently affecting the accuracy and reliability of gas detection results. Therefore, an effective solution is urgently needed to improve the accuracy and reliability of TDLAS gas detection systems under complex interference environments.
[0003] Technical issues One of the objectives of this application is to provide a gas detection method, system, terminal device, and storage medium to improve the accuracy and reliability of detection results when performing gas detection in complex interference environments.
[0004] Technical solutions The first aspect of this application provides a gas detection method, including: Obtain the test spectrum of the gas to be tested; Based on the test spectrum and the calibration spectrum of the pre-obtained standard gas, the relative concentration is obtained by the least squares method; Based on the relative concentration and the pre-obtained calibration concentration of the standard gas, the test concentration of the gas to be tested is obtained; Based on the test spectrum, the calibration spectrum, and the relative concentration, a deviation spectrum is obtained; Based on the deviation spectrum, the dispersion value of the deviation spectrum is obtained; Determine whether the dispersion value is greater than a reference threshold; if the dispersion value is greater than the reference threshold, determine that the test concentration is invalid; otherwise, determine that the test concentration is valid.
[0005] A second aspect of this application provides a gas detection system, comprising: A laser for emitting a probe beam toward any gas, which may be the gas to be measured, a standard gas, or zero gas. A photodetector is used to receive a detection beam that passes through the arbitrary gas and convert it into an electrical signal; The driving module is communicatively connected to the laser and the photodetector, and is used to control the operating parameters of the laser according to the feedback of the electrical signal, so as to adjust the center wavelength of the detection beam and dynamically scan the wavelength, so that the absorption peak wavelength of the arbitrary gas is within the dynamic scanning wavelength range of the detection beam. The data acquisition module is communicatively connected to the photodetector and is used to convert the electrical signal into a digital signal; The data processing module is communicatively connected to the data acquisition module and is used to process the digital signal to implement the steps of the gas detection method provided in the first aspect of the present application.
[0006] A third aspect of this application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the gas detection method provided in the first aspect of this application.
[0007] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the gas detection method provided in the first aspect of this application.
[0008] Beneficial effects The first aspect of this application's embodiments involves acquiring the test spectrum of the gas to be tested, obtaining the relative concentration based on the test spectrum and the calibration spectrum of a pre-acquired standard gas using the least squares method, and combining this with the pre-acquired calibration concentration of the standard gas to obtain the test concentration of the gas to be tested. Then, based on the test spectrum, calibration spectrum, and relative concentration, a deviation spectrum and its corresponding dispersion value are defined for judging the validity of the data. This allows the test concentration to be determined to be invalid if the dispersion value is greater than a reference threshold; otherwise, the test concentration is determined to be valid. This can improve the accuracy and reliability of the detection results when performing gas detection in complex interference environments.
[0009] It is understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0010] To more clearly illustrate the technical applications in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1This is a schematic diagram of the gas detection system provided in the embodiments of this application; Figure 2 This is a schematic diagram of the first process of the gas detection method provided in the embodiments of this application; Figure 3 This is a schematic diagram of the second process of the gas detection method provided in the embodiments of this application; Figure 4 This is a simulation diagram of the test spectrum and calibration spectrum under light intensity interference conditions provided in the embodiments of this application; Figure 5 These are simulation diagrams of the test spectrum, calibration spectrum, and deviation spectrum under light intensity interference conditions provided in the embodiments of this application; Figure 6 This is a simulation diagram of the calibration spectrum of methane under standard conditions detected by a telemetry gas detector in a noise-free environment, as provided in the embodiments of this application. Figure 7 This is a simulation diagram of the calibration spectrum, test spectrum, and deviation spectrum of methane under standard conditions detected by a telemetry gas detector in a normal noise environment, as provided in the embodiments of this application. Figure 8 This is a simulation diagram of the calibration spectrum, test spectrum, and deviation spectrum of methane under standard conditions detected by a telemetry gas detector in a severely noisy environment, as provided in the embodiments of this application. Figure 9 This is a schematic diagram of the third process of the gas detection method provided in the embodiments of this application.
[0012] Embodiments of the present invention In the following description, specific details such as particular device structures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known devices, modules, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0013] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0014] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0015] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0016] The gas detection method provided in this application can be applied to terminal devices such as embedded sensing modules, tablet computers, laptops, personal computers (PCs), netbooks, personal digital assistants (PDAs), industrial control computers, servers, robots (e.g., gas detection robots), wearable devices (e.g., personal protective equipment (PPE)), vehicle-mounted devices (vehicle-mounted gas detection devices), augmented reality (AR) / virtual reality (VR) devices, etc. The terminal device may include a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the gas detection method.
[0017] In application, during the execution of the gas detection method, the terminal device can interact with the user through a human-machine interface module, responding to the user's operation commands to control the execution process of the gas detection method. This includes controlling the execution sequence of any step, controlling the timing of data input / output, and storing / editing (e.g., creating, deleting, updating, and querying) data (e.g., inputting / outputting / stored data). This application does not impose any restrictions on the specific type of terminal device in its embodiments.
[0018] In applications, the human-computer interaction module may include at least one of physical buttons (e.g., an external keyboard or a keyboard or button built into the terminal device), touch sensors, gesture recognition sensors, and voice recognition units, enabling users to input operation commands through corresponding touch, gesture, or voice control methods.
[0019] In applications, terminal devices may include, but are not limited to, memory and processors, and may also include input / output devices, network access devices, etc. Input / output devices may include human-computer interaction modules and displays. Network access devices may include communication modules. Displays may be thin-film transistor liquid crystal displays (TFT-LCDs), liquid crystal displays (LCDs), organic light-emitting diode displays (OLEDs), quantum dot light-emitting diode displays (QLEDs), seven-segment or eight-segment displays, etc.
[0020] like Figure 1 As shown in the illustration, this application also provides a gas detection system 100, comprising: Laser 1 is used to emit a probe beam into any gas; Photodetector 2 is used to receive the detection beam that passes through any gas and convert it into an electrical signal; The drive module 3 is communicatively connected to the laser 1 and the photodetector 2. It is used to control the operating parameters of the laser 1 according to the feedback of the electrical signal, so as to adjust the center wavelength of the detection beam and make the absorption peak wavelength of any gas within the center wavelength range of the detection beam. Data acquisition module 4, which is communicatively connected to photodetector 2, is used to convert electrical signals into digital signals; The data processing module 5 is communicatively connected to the data acquisition module 4 and is used to process digital signals to implement the steps of the gas detection method.
[0021] In applications, the laser can be any type of tunable laser, such as Fabry-Perot lasers, distributed feedback semiconductor lasers, distributed Bragg reflector lasers, vertical-cavity surface-emitting lasers, quantum cascade lasers, interband cascade lasers, and external cavity tunable semiconductor lasers.
[0022] In applications, any gas can be, but is not limited to, the analyte gas, the standard gas, or zero air. The analyte gas and the standard gas can be, but are not limited to, one or more of the following: methane (CH4), carbon dioxide (CO2), carbon monoxide (CO), water vapor (H2O), acetylene (C2H2), ammonia (NH3), and hydrogen sulfide (H2S). The difference is that the analyte gas is a gas with an unknown concentration, while the standard gas is a gas with a precisely known concentration and inherent uncertainty. Zero air can be, but is not limited to, high-purity nitrogen (N2), filtered air, or a vacuum.
[0023] In applications, the driving module can be implemented based on a microprocessor and a current or voltage source with digital-to-analog conversion capabilities. Operating parameters can be operating temperature, bias current, or bias voltage. The center wavelength and dynamic scanning wavelength of the probe beam emitted by the laser can be adjusted by changing the operating temperature, bias current, or bias voltage of the laser chip.
[0024] In applications, photodetectors can be based on photodiodes, avalanche photodiodes, photomultiplier tubes, narrow bandgap material (InGaAs) photodiodes, mercury cadmium telluride detectors, or pyroelectric detectors.
[0025] In applications, the data acquisition module can be implemented based on analog-to-digital converters and microcontrollers. The data processing module can be implemented based on processors and memory. The data processing module can also be part of the terminal device. When the data processing module is part of the terminal device, the terminal device can also integrate one or more of the following: laser, driver module, photodetector, and data acquisition module. Alternatively, the terminal device can communicate with one or more of the following through a communication module to form a gas detection system.
[0026] In applications, the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0027] In applications, the memory may be an internal storage unit of the terminal device in some embodiments, such as a hard drive or RAM. In other embodiments, the memory may be an external storage device of the terminal device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory may include both internal and external storage units of the terminal device. The memory is used to store the operating system, applications, bootloader, data, and other programs, such as program code for computer programs. The memory can also be used to temporarily store data that has been output or will be output.
[0028] In applications, communication modules can be implemented using wired or wireless communication devices. For example, communication modules can be implemented based on wireless local area networks (WLANs) (such as Wi-Fi networks), Bluetooth, Zigbee, mobile communication networks, Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and other wireless communication modules. Communication modules can also be implemented based on wired communication modules such as serial ports (e.g., RS-232, RS-485), Ethernet, USB, fiber optics, CAN bus, etc.
[0029] In some embodiments, any gas is located in free space; Alternatively, the gas detection system may also include a gas chamber, located in the transmission optical path of the detection beam, for containing any gas.
[0030] In applications, free space can be any indoor or outdoor space within an atmospheric environment. The air chamber can be an open cavity or a closed cavity. An open cavity can be a U-shaped cavity with one end open and a light-transmitting window or reflector at the opposite end, or an annular cavity with both opposite ends open, or an open cavity with a reflector at each opposite end. A closed cavity can be constructed from an encapsulated shell with a light-transmitting window at each opposite end, an encapsulated shell with a reflector at each opposite end, or an encapsulated shell with a light-transmitting window at one end and a reflector at the opposite end.
[0031] In applications, a gas chamber is positioned within the transmission optical path of the probe beam. This path includes a transmitting optical path and a receiving optical path. When the transmitting and receiving optical paths are coaxial, the laser and photodetector are positioned opposite each other, with the gas chamber positioned between them. The probe beam emitted by the laser passes through any gas and is then received by the photodetector. When the transmitting and receiving optical paths are not coaxial, the laser and photodetector are positioned on the same side. When the transmitting and receiving optical paths are not coaxial, the probe beam emitted by the laser passes through any gas and is reflected by a reflective surface within the gas chamber to the photodetector.
[0032] Figure 1 The example shows that the transmitting and receiving optical paths are not coaxial, the laser 1 and the photodetector 2 are located on the same side, and the detection beam is reflected to the photodetector 2 by the reflective surface in the gas chamber 6.
[0033] like Figure 2 As shown, the gas detection method provided in this application includes the following steps S1 to S7: Step S1: Obtain the test spectrum of the gas to be tested, then proceed to step S2.
[0034] In the application, a laser emits a probe beam to the gas to be tested; the driving module controls the laser's operating parameters to adjust the center wavelength of the probe beam and dynamically scan the wavelength, ensuring that the absorption peak wavelength of the gas to be tested is within the dynamic scanning wavelength range of the probe beam; a photodetector receives the probe beam transmitted through the gas to be tested and converts it into an electrical signal; a data acquisition module converts the electrical signal into a digital signal (i.e., light intensity); a data processing module processes the digital signal to obtain the absorption data of the gas to be tested, and then processes the absorption data again to obtain the test spectrum of the gas to be tested and store it for later retrieval.
[0035] Step S2: Based on the test spectrum and the calibration spectrum of the pre-acquired standard gas, obtain the relative concentration using the least squares method, and proceed to step S3.
[0036] In applications, the least squares method is a concentration inversion algorithm. It uses the least squares method to invert the test spectrum and calibration spectrum to obtain the relative concentration between the gas to be tested and the standard gas, and can be further processed to obtain the test concentration of the gas to be tested.
[0037] In some embodiments, the test spectrum can be the direct absorption spectrum of the gas to be tested, the calibration spectrum can be the direct absorption spectrum of the calibration gas, or the test spectrum can be the harmonic spectrum of the gas to be tested, and the calibration spectrum can be the harmonic spectrum of the calibration gas.
[0038] In some embodiments, the steps preceding step S2 include: Obtain the calibration spectrum of the standard gas and proceed to step S2.
[0039] In the application, a probe beam is first emitted to the standard gas via a laser; the operating parameters of the laser are controlled by the drive module to adjust the center wavelength of the probe beam and dynamically scan the wavelength so that the absorption peak wavelength of the standard gas is within the dynamic scanning wavelength range of the probe beam; the probe beam transmitted through the standard gas is received by a photodetector and converted into an electrical signal; the electrical signal is converted into a digital signal (i.e., light intensity) by the data acquisition module; the digital signal is processed by the data processing module to obtain the absorption data of the standard gas, and then the absorption data of the standard gas is processed again to obtain the calibration spectrum of the standard gas and stored for later retrieval.
[0040] In some embodiments, the steps preceding step S2 include: Obtain the initial spectrum of zero gas; Obtain the initial spectrum of the standard gas; Obtain the difference between the initial spectrum of the standard gas and the initial spectrum of the zero gas, and use it as the calibration spectrum of the standard gas. Proceed to step S2. Correspondingly, step S1 includes: Obtain the initial spectrum of the gas to be tested; Obtain the difference between the initial spectrum of the gas to be tested and the initial spectrum of the zero gas, and use it as the test spectrum of the gas to be tested, then proceed to step S2; The initial spectrum is either a direct absorption spectrum or a harmonic spectrum.
[0041] In the application, a probe beam is first emitted to the zero gas / standard gas / test gas via a laser. The operating parameters of the laser are controlled by the drive module to adjust the center wavelength of the probe beam and dynamically scan the wavelength, so that the absorption peak wavelengths of the zero gas / standard gas / test gas are within the dynamic scanning wavelength range of the probe beam. The probe beam transmitted through the zero gas is received by a photodetector and converted into an electrical signal. The electrical signal is converted into a digital signal (i.e., light intensity) by the data acquisition module. The digital signal is processed by the data processing module to obtain the absorption data of the zero gas / standard gas / test gas. The absorption data of the zero gas / standard gas / test gas is then processed to obtain the initial spectrum of the zero gas / standard gas / test gas. The difference between the initial spectrum of the standard gas and the initial spectrum of the zero gas is then obtained as the calibration spectrum of the standard gas and stored. The difference between the initial spectrum of the test gas and the initial spectrum of the zero gas is then obtained as the test spectrum of the test gas for subsequent retrieval.
[0042] In some embodiments, the expression for the direct absorption spectrum is:
[0043] in, Indicates the direct absorption spectrum. This represents the light intensity of the probe beam before it enters any gas. This indicates the intensity of the light beam after it passes through any gas. This indicates the wavenumber of the probe beam, where any gas can be the gas to be tested, a standard gas, or zero gas.
[0044] In applications, the process of acquiring harmonic spectra is as follows: During the laser scanning process controlled by the drive module, a modulation current with frequency f is superimposed on the drive current of the laser, and the electrical signal output by the photodetector is subjected to N-wavelength modulation. Lock-in amplification of f yields the Nth harmonic spectrum, where N = 1, 2, 3, ... Lock-in amplification can be implemented using hardware (e.g., a lock-in amplifier) in the data acquisition module or through software.
[0045] In some embodiments, the harmonic spectrum is an Nth harmonic spectrum and N is an integer between 1 and 3, for example, N=2.
[0046] In some embodiments, step S2 includes: Based on the calibration spectrum, obtain the summation term of the square of the calibration spectrum intensity and the summation term of the calibration spectrum intensity; Based on the test spectrum, obtain the summation term of the product of the test spectrum intensity and the calibration spectrum intensity, as well as the summation term of the test spectrum intensity. Based on the summation of the square of the calibrated spectral intensity, the summation of the calibrated spectral intensity, the summation of the product of the measured spectral intensity and the calibrated spectral intensity, and the summation of the measured spectral intensity, the relative concentration is obtained by the least squares method, and then proceed to step S3.
[0047] In some embodiments, the expression for the summation term of the square of the calibrated spectral intensity is:
[0048] The expression for the summation term of the calibrated spectral intensity is:
[0049] The expression for the summation term of the product of the test spectral intensity and the calibration spectral intensity is as follows:
[0050] The expression for the summation term of the measured spectral intensity is:
[0051] The expression for relative concentration is:
[0052] in, This represents the summation term of the squared intensity of the calibrated spectrum. This represents the summation term for the calibrated spectral intensity. This represents the summation term of the product of the measured spectral intensity and the calibrated spectral intensity. The term representing the summation of the measured spectral intensity is... This indicates the number of sampling points, that is, the number of spectral data points used in the calculation. Indicates the calibration spectrum at the 1st Light intensity at each sampling point Indicates the test spectrum at the 1st Light intensity at each sampling point Indicates relative concentration.
[0053] Step S3: Based on the relative concentration and the calibration concentration of the pre-acquired standard gas, obtain the test concentration of the gas to be tested, and proceed to step S4.
[0054] In applications, the calibration concentration of the standard gas is known. The calibration concentration is obtained in advance and stored by the data processing module for later retrieval.
[0055] In some embodiments, the test concentration is obtained by multiplying the relative concentration and the calibrated concentration. The expression for the test concentration is:
[0056] in, Indicates the test concentration. Indicates relative concentration. Indicates the calibrated concentration.
[0057] Step S4: Based on the test spectrum, calibration spectrum and relative concentration, obtain the deviation spectrum, and proceed to step S5.
[0058] In applications, the deviation spectrum is the difference between the test spectrum and the theoretical spectrum of the analyte gas (i.e., the product of the calibration spectrum and the relative concentration). Based on Lambert-Beer's Law, the absorption spectrum of the analyte gas is proportional to its concentration; theoretically, the theoretical spectrum of the analyte gas = calibration spectrum × relative concentration. The difference between the actual measured spectrum and the theoretical spectrum of the analyte gas is the deviation spectrum. This difference represents the error between the theoretical prediction (the theoretical spectrum) and the actual observed value (the test spectrum).
[0059] In applications, biased spectra occur when the light intensity in the form of the electrical signal output by the photodetector is severely interfered with, for example: When the gas detection system is a telemetry gas detector, during the process of the drive module controlling the laser to emit a detection beam to the gas to be measured for wavelength scanning, the position of the reflective surface in the space where the gas to be measured is located changes (e.g., the reflective surface moves), or the slight change in the angle of the laser's emitting end will cause the position of the light spot formed by the detection beam on the reflective surface to change. If the reflectivity of different areas on the reflective surface is large, or if there are floating particles in the transmission path of the detection beam between the laser's emitting end and the reflective surface, it will cause abnormal fluctuations in the light intensity of the detection beam received by the photodetector and reflected back by the reflective surface. In the case of a gas detection system with a gas chamber, if there are water droplets on the reflective surface of the gas chamber or water vapor in the gas chamber, the reflective performance of the reflective surface will change with the change of the water droplet or water vapor morphology during the wavelength scanning process when the drive module controls the laser to emit the detection beam to the gas to be measured. In addition, there may be floating particles in the transmission path of the detection beam in the open gas chamber, including open cavities, which will cause abnormal jitter in the light intensity of the detection beam received by the photodetector and reflected back by the reflective surface. Electromagnetic interference, including but not limited to power voltage fluctuations or spatial electromagnetic interference conducted along the power line to the photodetector.
[0060] Step S5: Based on the deviation spectrum, obtain the dispersion value of the deviation spectrum, and proceed to step S6.
[0061] In applications, the measure of dispersion is a statistical measure used to describe the degree of difference, dispersion, or fluctuation within bias spectral data. The measure of dispersion can be the standard deviation or variance of the bias spectrum. Under normal circumstances, the fluctuation of the bias spectrum (i.e., the measure of dispersion) will be within a stable range; if the measure of dispersion is too large due to light intensity interference, it indicates that the detected concentration data is unreliable and should be discarded.
[0062] In some embodiments, the expression for the deviation spectrum is:
[0063] The dispersion value is the standard deviation or variance of the deviation spectrum. The expression for the standard deviation is:
[0064] in, Indicates the deviation spectrum, Indicates the test spectrum at the 1st Light intensity at each sampling point Indicates relative concentration. Indicates the calibration spectrum at the 1st Light intensity at each sampling point Indicates standard deviation, This represents the average value of the deviation spectrum. This indicates the number of sampling points, i.e., the number of spectral data points involved in the calculation.
[0065] Step S6: Determine whether the dispersion value is greater than the reference threshold; if yes (i.e., if the dispersion value is greater than the reference threshold), proceed to step S7; otherwise (i.e., if the dispersion value is less than or equal to the reference threshold), proceed to step S8. Step S7: Determine that the test concentration is invalid; Step S8: Determine if the test concentration is valid.
[0066] In application, the validity of the test concentration can be determined by checking whether the dispersion value exceeds a reference threshold. Multiple extreme test conditions can be simulated without light interference. Each extreme test condition includes one or more of the following: high temperature, low temperature, zero gas, and a standard gas environment with maximum concentration. The dispersion value of the deviation spectrum under each extreme test condition is calculated. When simulating only one extreme test condition, the dispersion value under that extreme test condition is directly multiplied by a margin coefficient as the reference threshold. When simulating multiple extreme test conditions, the maximum dispersion value under all extreme test conditions is selected, and this maximum dispersion value is multiplied by the margin coefficient as the reference threshold.
[0067] In some embodiments, prior to step S6, the following is included: Under extreme test conditions and no light intensity interference, obtain one or more discrete values and use the maximum value among them as the target discrete threshold. Obtain the product of the target dispersion value and the margin coefficient as a reference threshold, and proceed to step S6.
[0068] In applications, the margin factor is an adjustment coefficient that reserves a safety margin. It is used to provide an extra buffer for normal fluctuations in the gas detection system when setting a reference threshold, avoiding the misjudgment of reasonable small fluctuations as interference. A margin factor can be selected for similar systems and stored for later use. It is not necessary to test and select a margin factor for every gas detection system of the same type. Generally, the margin factor should be greater than 1 and can be a decimal.
[0069] In some embodiments, the margin factor ranges from (1 to 10).
[0070] In applications, the margin factor can be an integer or a decimal in (1, 10).
[0071] In some embodiments, the test conditions include one or more of the following: high temperature environment, low temperature environment, zero gas environment, and standard gas environment with maximum concentration.
[0072] In some embodiments, light intensity interference conditions include one or more of the following interference items: The position of the reflecting surface used to reflect the detection beam changes in the space where the gas to be tested is located; The angle of the emitting end of the probe beam changes; Water droplets condense on the reflective surface; There is water vapor in the space; Particulate matter is floating in the air; Electromagnetic interference.
[0073] like Figure 3 As shown, in some embodiments, after step S7, the following steps are included: Step S9: Output the first prompt signal indicating that the concentration characterization test is invalid; After step S8, the following is included: Step S10: Output a second prompt signal indicating that the concentration of the test is valid.
[0074] In applications, the terminal device may also include a prompting module. This module can be implemented using any device capable of emitting signals perceptible to the human body, such as a display screen, a light alarm, a sound alarm, a sound and light alarm, or an audio player. Correspondingly, the first and second prompting signals can be signals of the same or different types. It should be understood that, depending on the conditions that trigger the prompting module to emit the prompting signal, different prompting signals can be of the same type but different in their specific manifestation. For example, the first and second prompting signals can be light signals, sound signals, or sound and light signals. Specifically, the first and second prompting signals can be: light signals of different colors and / or different flashing frequencies; or sound signals of different timbres and / or different frequencies; or sound and light signals of different colors and / or different flashing frequencies and / or different timbres; or voice prompt signals with different linguistic meanings.
[0075] like Figure 4 As shown, an exemplary simulation of the test spectrum and calibration spectrum under light intensity interference conditions is presented; wherein, the calibration spectrum is obtained with a probe beam transmission path of 9 cm and a wavelength of 6046.95 cm. -1 The direct absorption spectrum of 2% methane (standard gas) detected nearby (i.e., at 1653.7 nm); the test spectrum was performed with a probe beam path length of 9 cm and a wavelength of 6046.95 cm. -1The direct absorption spectrum was detected near the light source (i.e., at 1653.7 nm), after removing 2% methane (i.e., the methane concentration of the test gas is 0%) and under conditions of light intensity interference. Based on the test spectrum, the methane concentration was calculated to be 4%, which is significantly different from the actual 0%. If no further processing is performed, a false alarm signal of excessive methane concentration will be triggered.
[0076] like Figure 5 As shown, exemplarily, simulation diagrams of the test spectrum, calibration spectrum, and deviation spectrum under light intensity interference conditions are illustrated; wherein, the calibration spectrum is obtained with a probe beam transmission path of 9 cm and a wavelength of 6046.95 cm. -1 The direct absorption spectrum of 2% methane (standard gas) detected nearby (i.e., at 1653.7 nm); the test spectrum was performed with a probe beam path length of 9 cm and a wavelength of 6046.95 cm. -1 The direct absorption spectrum was detected near the vicinity (i.e., 1653.7 nm), after removing 2% methane (i.e., the methane concentration of the analyte gas was 0%) and under conditions of light intensity interference. The bias spectrum was based on the gas detection method provided in the embodiments of this application, with a transmission optical path of 9 cm and a wavelength of 6046.95 cm for the probe beam. -1 The deviation spectrum detected near the vicinity (i.e., 1653.7 nm), after removing 2% methane (i.e., the methane concentration of the test gas is 0%), and under conditions of light intensity interference, has a standard deviation of 0.032. Under normal circumstances, the standard deviation of the intrinsic noise of the TDLAS system is less than 0.001. If the reference threshold is set to 0.001, then the standard deviation of the deviation spectrum is 32 times the reference threshold of 0.001. That is, the dispersion threshold of the deviation spectrum is greater than the reference threshold. It is easy to determine that the test concentration is invalid, that is, the test spectrum is not the true direct absorption spectrum, thereby avoiding the issuance of false methane concentration exceeding the standard alarm signal and increasing the reliability of the gas detection system.
[0077] In applications where the gas detection system is a telemetry gas detector, the light intensity of the reflected detection beam received by the photodetector is very weak, which leads to a lot of noise in the circuit itself after signal amplification. At the same time, because the angle of the laser's emitting end will fluctuate slightly when the telemetry gas detector emits the detection beam (especially when handheld), the position of the reflecting surface in the space where the gas to be measured is located will also change during the wavelength scanning process, resulting in a high background noise of the reflected detection beam. Figures 6-8 A spectral simulation of methane under standard conditions detected by a telemetry gas detector was generated.
[0078] like Figure 6As shown, an exemplary simulation of the calibration spectrum of methane under standard conditions detected by a telemetry gas detector in a noise-free (near-noise-free) environment is presented. like Figure 7 As shown, an exemplary simulation diagram of the calibration spectrum, test spectrum, and deviation spectrum of methane detected by a telemetry gas detector under standard conditions in a normal noise environment is presented. like Figure 8 As shown, an exemplary simulation diagram of the calibration spectrum, test spectrum, and deviation spectrum of methane detected by a telemetry gas detector under standard conditions in a severely noisy environment is presented. Under standard conditions, the concentration-optical path product of methane is 1800 ppm. m; Figure 7 The test spectrum is a second harmonic spectrum, and the standard deviation of the deviation spectrum is about 30. Therefore, the reference threshold corresponding to the standard deviation can be set to 40. Figure 8 The measured spectrum was a second harmonic spectrum and almost invisible; the standard deviation of the bias spectrum was approximately 80, which is greater than that based on Figure 7 The set reference threshold is 40, therefore, it can be determined that... Figure 8 If the test spectrum is invalid data, the test concentration obtained based on the test spectrum is also invalid, and a first prompt signal indicating that the test concentration is invalid can be output.
[0079] like Figure 9 As shown, in some embodiments, after step S8, the following steps S11~S12 are included: Step S11: Based on the calibration concentration and the calibration pressure and calibration temperature when obtaining the calibration concentration, the test concentration and the test pressure and test temperature when obtaining the test concentration, as well as the temperature correction factor, pressure correction factor and nonlinear correction factor, obtain the correction coefficient and proceed to step S12. Step S12: Obtain the product of the test concentration and the correction coefficient as the actual concentration of the gas to be tested.
[0080] In applications, after confirming the validity of the test concentration, a correction coefficient can be introduced to correct the effects of temperature and pressure changes and system nonlinearity on the concentration measurement results, making the final actual concentration of the gas to be measured more accurate.
[0081] In some embodiments, the expression for the correction coefficient is:
[0082] in, Indicates the correction factor. An integer between 1 and 3 Indicates the temperature correction factor. This represents the pressure correction factor. This represents the nonlinear correction factor. Indicates the test concentration. Indicates the calibrated concentration.
[0083] The gas detection method provided in this application can employ direct absorption spectroscopy, harmonic spectroscopy, or other spectra suitable for least squares reaction calculation. Direct absorption spectroscopy can be used for high-concentration gas detection, while harmonic spectroscopy can be used for low-concentration gas detection. In scenarios requiring wide-range detection of full-concentration gases, both direct absorption and harmonic spectroscopy can be used simultaneously. The reference threshold can be flexibly adjusted, making it suitable for gas detection in both low and high background noise environments. The algorithm is simple, requires minimal computation, saves computational resources, shortens response time, and thus improves detection efficiency, while having low hardware performance requirements. The reference threshold is intuitive and detectable. By pre-obtaining the dispersion threshold of the deviation spectrum under extreme test conditions and without light intensity interference, a reliable reference threshold can be obtained. Human-computer interaction or machine-to-machine interaction can be performed through at least one output data from the human-computer interaction module, communication module, and display screen.
[0084] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps in the above-described gas detection method embodiments.
[0085] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps in any of the above gas detection method embodiments.
[0086] In applications, computer-readable media may include at least: any entity or device capable of carrying computer program code to a terminal device, recording media, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In the above embodiments, the descriptions of each embodiment have different focuses; parts not described in detail in a particular embodiment can be referred to in the relevant descriptions of other embodiments.
[0087] Those skilled in the art will recognize that the devices described in connection with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0088] In the embodiments provided in this application, it should be understood that the disclosed systems and devices can be implemented in other ways. For example, the system and device embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple modules may be combined or integrated.
[0089] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A gas detection method, comprising: Obtain the test spectrum of the gas to be tested; Based on the test spectrum and the calibration spectrum of the pre-obtained standard gas, the relative concentration is obtained by the least squares method; Based on the relative concentration and the pre-obtained calibration concentration of the standard gas, the test concentration of the gas to be tested is obtained; Based on the test spectrum, the calibration spectrum, and the relative concentration, a deviation spectrum is obtained; Based on the deviation spectrum, the dispersion value of the deviation spectrum is obtained; Determine whether the dispersion value is greater than a reference threshold; If the dispersion value is greater than a reference threshold, the test concentration is determined to be invalid; otherwise, the test concentration is determined to be valid.
2. The gas detection method as described in claim 1, wherein, The test spectrum and the calibration spectrum are direct absorption spectra or harmonic spectra.
3. The gas detection method as described in claim 1, wherein, Before obtaining the relative concentration using the least squares method based on the test spectrum and the pre-acquired calibration spectrum of the standard gas, the process includes: Obtain the initial spectrum of zero gas; Obtain the initial spectrum of the standard gas; The difference between the initial spectrum of the standard gas and the initial spectrum of the zero gas is obtained and used as the calibration spectrum of the standard gas. Correspondingly, obtaining the test spectrum of the gas to be tested includes: Obtain the initial spectrum of the gas to be tested; The difference between the initial spectrum of the gas to be tested and the initial spectrum of the zero gas is obtained and used as the test spectrum of the gas to be tested. The initial spectrum is either a direct absorption spectrum or a harmonic spectrum.
4. The gas detection method as described in claim 1, wherein, Before determining whether the dispersion value is greater than the reference threshold, the following steps are included: Under extreme test conditions and no light intensity interference, obtain one or more of the discreteness values as the target discreteness threshold. The product of the target dispersion value and the margin coefficient is obtained as a reference threshold.
5. The gas detection method as described in claim 4, wherein, The extreme test conditions include one or more of the following: high temperature environment, low temperature environment, zero gas environment, and standard gas environment with maximum concentration.
6. The gas detection method as described in claim 4, wherein, The margin coefficient ranges from (1, 10).
7. The gas detection method as described in claim 4, wherein, The light intensity interference conditions include one or more of the following interference items: The position of the reflecting surface used to reflect the detection beam changes in the space where the gas to be tested is located; The angle of the emitting end of the detection beam changes; Water droplets condense on the reflective surface; The space contains water vapor; The space contains floating particles; Electromagnetic interference.
8. The gas detection method as described in claim 1, wherein, Based on the test spectrum and the pre-obtained calibration spectrum of the standard gas, the relative concentration is obtained using the least squares method, including: Based on the calibration spectrum, obtain the summation term of the square of the calibration spectrum intensity and the summation term of the calibration spectrum intensity. Based on the test spectrum, obtain the summation term of the product of the test spectrum intensity and the calibration spectrum intensity, as well as the summation term of the test spectrum intensity. The relative concentration is obtained by the least squares method based on the summation of the square of the calibrated spectral intensity, the summation of the product of the test spectral intensity and the calibrated spectral intensity, and the summation of the test spectral intensity.
9. The gas detection method as described in claim 8, wherein, The expression for the summation term of the square of the calibrated spectral intensity is: The expression for the summation term of the calibrated spectral intensity is: The expression for the summation term of the product of the test spectral intensity and the calibration spectral intensity is as follows: The expression for the summation term of the tested spectral intensity is: The expression for the relative concentration is: in, This represents the summation term of the square of the calibrated spectral intensity. This represents the summation term of the calibrated spectral intensity. This represents the summation term of the product of the tested spectral intensity and the calibrated spectral intensity. This represents the summation term of the light intensity of the tested spectrum. This indicates the number of sampling points, that is, the number of spectral data points used in the calculation. Indicates that the calibration spectrum is in the first... Light intensity at each sampling point Indicates that the test spectrum is in the first... Light intensity at each sampling point This indicates the relative concentration.
10. The gas detection method as described in claim 1, wherein, After confirming the validity of the test concentration, the following steps are included: Based on the calibrated concentration and the calibrated pressure and calibrated temperature at which the calibrated concentration was obtained, the test concentration and the test pressure and test temperature at which the test concentration was obtained, as well as the temperature correction factor, pressure correction factor and nonlinear correction factor, the correction coefficient is obtained. The product of the test concentration and the correction coefficient is obtained as the actual concentration of the gas to be tested.
11. The gas detection method as described in claim 10, wherein, The expression for the correction coefficient is: in, This represents the correction coefficient. Integers between 1 and 3 This represents the temperature correction factor. This represents the pressure correction factor. This represents the nonlinear correction factor. This indicates the test concentration. This indicates the calibration concentration.
12. The gas detection method as described in claim 2 or 3, wherein, The expression for the direct absorption spectrum is: in, This refers to the direct absorption spectrum. This represents the light intensity of the probe beam before it enters any gas. This indicates the light intensity of the probe beam after it passes through the arbitrary gas. This indicates the wavenumber of the probe beam.
13. The gas detection method according to any one of claims 2 or 3, wherein, The harmonic spectrum is an Nth harmonic spectrum, where N is an integer between 1 and 3.
14. The gas detection method according to any one of claims 1 to 11, wherein, The expression for the test concentration is: in, This indicates the test concentration. This indicates the relative concentration. This indicates the calibration concentration.
15. The gas detection method according to any one of claims 1 to 11, wherein, The expression for the deviation spectrum is: The dispersion value is the standard deviation or variance of the deviation spectrum, and the expression for the standard deviation is: in, This indicates the deviation spectrum. Indicates that the test spectrum is in the first... Light intensity at each sampling point This indicates the relative concentration. Indicates that the calibration spectrum is in the first... Light intensity at each sampling point This represents the standard deviation. This represents the average value of the deviation spectrum. This indicates the number of sampling points, i.e., the number of spectral data points involved in the calculation.
16. A gas detection system, comprising: A laser for emitting a probe beam toward any gas, which may be the gas to be measured, a standard gas, or zero gas. A photodetector is used to receive a detection beam that passes through the arbitrary gas and convert it into an electrical signal; The driving module is communicatively connected to the laser and the photodetector, and is used to control the operating parameters of the laser according to the feedback of the electrical signal, so as to adjust the center wavelength of the detection beam and dynamically scan the wavelength, so that the absorption peak wavelength of the arbitrary gas is within the dynamic scanning wavelength range of the detection beam. The data acquisition module is communicatively connected to the photodetector and is used to convert the electrical signal into a digital signal; A data processing module, communicatively connected to the data acquisition module, is used to process the digital signal to implement the steps of the gas detection method as described in any one of claims 1 to 15.
17. The gas detection system as claimed in claim 16, wherein, The arbitrary gas is located in free space; Alternatively, the gas detection system may further include a gas chamber disposed in the transmission optical path of the detection beam for containing any gas.
18. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, When the processor executes the computer program, it implements the steps of the gas detection method as described in any one of claims 1 to 15.