A gas detection method and device
By using PWM control to heat the TLD and rapidly detect the negative absorption peak of the gas, the problems of high power consumption and slow start-up of laser gas detection systems are solved, achieving low power consumption and high precision gas detection, which is suitable for portable battery-powered devices.
Patent Information
- Application Number
- CN202511695890.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2045-11-18
AI Technical Summary
Laser gas detection systems have high power consumption, slow startup, and low accuracy, making them unsuitable for portable battery power.
Tunable laser diodes (TLDs) and photodiodes (PDs) are used. The heating of the TLD is controlled by PWM to achieve rapid preheating and precise temperature control. Combined with preliminary and high-precision detection of negative gas absorption peaks, the power is dynamically adjusted to reduce heating time and power consumption.
It achieves low-power, fast start-up and high-precision gas detection, reduces the overall energy consumption of the equipment, is suitable for battery power, and improves the flexibility and detection efficiency of the equipment.
Smart Images

Figure CN121324304B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of gas detection technology, and in particular to a gas detection method and device. Background Technology
[0002] Laser gas detection is an advanced detection technology that uses laser light as a detection source and, based on the principles of absorption spectroscopy, qualitatively identifies and quantitatively analyzes gas components and their concentrations by analyzing the intensity attenuation, wavelength changes, or physical effects that occur after a laser of a specific wavelength interacts with target gas molecules. Laser gas detection technology plays a vital role in environmental monitoring, industrial safety, and medical diagnostics due to its high sensitivity, high selectivity, and rapid response.
[0003] Laser gas detection systems typically suffer from high power consumption because after starting detection, the laser diode (LD) emitter needs to be heated and kept at its operating temperature. At the same time, during detection, the laser diode (LD) and photodiode (PD) need to be continuously scanned at high frequency to obtain photoelectric data for gas detection. Therefore, the entire system needs to be powered by wired connection to ensure its normal operation.
[0004] To realize a battery-powered laser gas detection system, a low-power gas detection method is needed. Summary of the Invention
[0005] This application provides a gas detection method and device to solve the technical problems of slow start-up, low accuracy and high power consumption in laser gas detection.
[0006] In a first aspect, this application provides a gas detection method applied to a gas detection device, the device including a tunable laser diode (TLD) and a photodiode (PD), the method comprising: In response to preset conditions, the ambient temperature, the current TLD temperature, and the TLD target temperature corresponding to the gas to be detected are obtained. Based on the target temperature of the TLD, the ambient temperature, and the current temperature of the TLD, obtain the target steady-state duty cycle PWM value for TLD heating; Steady-state duration was calculated based on the target temperature of the TLD and the ambient temperature. The first PWM is used to preheat the TLD, and the first PWM is the full power PWM value; In response to the preheating time of the full-power preheating TLD being greater than or equal to the steady-state time, the first PWM is downgraded to the target steady-state PWM value; The first PWM is adjusted to the second PWM based on the temperature difference between the target temperature and the current temperature of the TLD, and the second PWM is used to preheat the TLD. In response to the TLD's current temperature entering the target temperature range, the presence of a negative gas absorption peak is detected based on data collected by the PD: In response to the detection of a negative absorption peak in the gas, the gas concentration of the gas to be detected is then determined based on the data collected by the PD.
[0007] Optionally, the presence of a negative gas absorption peak can be detected based on the data acquired by the PD, including: The data collected by the PD is sampled to obtain the sampled light intensity; The sampled light intensity was fitted to obtain a fitting curve; Calculate the first difference between the fitted curve and the original curve formed by the light intensity data; The negative absorption peak of the gas was detected based on the first difference data.
[0008] Optionally, the first difference data between the fitted curve and the original curve formed by the light intensity data is calculated, including: Based on the second difference data between the fitted curve and the mid-section curve formed by the mid-section position data of the sampled light intensity, the negative absorption peak curve of the gas is determined, wherein the mid-section position data represents the data of the left and right quarter positions of the center point of the sampled light intensity. The gas negative absorption peak is detected based on the first difference data, including: In response to the absolute value of the light intensity at the minimum extreme point of the detected gas negative absorption peak curve not being greater than a preset light intensity threshold, it is determined that no gas negative absorption peak has been detected; and / or, A first absorption peak integration window is established with the minimum extreme point of the gas negative absorption peak curve as the center. The gas negative absorption peak curve is integrated based on the first absorption peak integration window. In response to the detection that the gas negative absorption peak curve integration is not greater than the preset integration threshold, it is determined that no gas negative absorption peak is detected.
[0009] Optionally, a first difference data is calculated between the fitted curve and the original curve formed by the light intensity data; based on the first difference data, a negative absorption peak of the gas is detected, including: The gas negative absorption peak curve is determined based on the second difference between the fitted curve and the mid-section curve formed by the mid-section position data of the sampled light intensity. A first absorption peak integration window is established with the minimum extreme point of the gas negative absorption peak curve as the center, and the gas negative absorption peak curve is statistically integrated based on the first absorption peak integration window. In response to the detection that the absolute value of the light intensity at the minimum extreme point of the gas negative absorption peak curve is greater than a preset light intensity threshold, and the integral of the gas negative absorption peak curve is greater than a preset integration threshold, it is determined that a gas negative absorption peak has been detected.
[0010] Optionally, based on the TLD target temperature, ambient temperature, and current TLD temperature, the target steady-state PWM value for TLD heating is obtained, including: Based on the TLD temperature-PWM model corresponding to the ambient temperature, the target steady-state PWM value is calculated using the first formula, which is: , Where y represents the target temperature of the TLD, x represents the PWM for preheating the TLD, and a, b, and c represent constants obtained through temperature calibration.
[0011] Optionally, the steady-state duration is calculated based on the TLD target temperature and the ambient temperature, including: Based on the TLD heating model, the steady-state duration is calculated using the second formula, which is: , Where t represents the steady-state duration, T represents the ambient temperature, and D... n B represents the target temperature of the TLD, K represents the TLD heating coefficient, and K represents the heating weighting coefficient.
[0012] Optionally, the gas concentration of the gas to be detected is determined based on the data acquired by the PD, including: The data acquired by the PD is filtered to obtain the D-band denoised data after removing electronic noise. By fitting the denoised data in segment D, the first baseline is obtained. The gas negative absorption peak curve is obtained by subtracting the first baseline from the mid-section curve formed by the mid-section position data of the D-section denoised data. The center position of the corresponding negative absorption peak is determined based on the minimum extreme value of the negative absorption peak curve. A second absorption peak integration window is established with the center position of the negative absorption peak of the gas as the center, and the data of each of the two ends of the second absorption peak integration window are used to fit the second baseline. Combining the second baseline and the second absorption peak integration window, the absorbance integral of the second absorption peak integration window is calculated based on Beer-Brown's law; Based on the integral concentration benchmark model corresponding to the gas to be detected, the gas concentration of the gas to be detected is calculated according to the absorbance integral.
[0013] Optionally, after converting the absorbance integral into the gas concentration of the gas to be detected, the method further includes: In response to the cumulative number of times the gas concentration of the gas to be detected is calculated being not less than the preset calculation threshold, an alarm is reported and heating of the TLD is stopped.
[0014] Optionally, the response is triggered by preset conditions, including: Triggered at a preset interval, wherein the preset interval is no greater than 15 seconds; and / or Triggered upon receiving a detection command.
[0015] On the other hand, a gas detection device is provided, comprising: Tunable laser diode (TLD), first temperature sensor, second temperature sensor, processor, heater and battery, and photodiode (PD); The battery is used to power the gas detection device; The first temperature sensor is used to acquire the ambient temperature and transmit the ambient temperature to the processor. The second temperature sensor is used to acquire the current temperature of the TLD and transmit the current temperature of the TLD to the processor. This processor is used to run executable code to implement the methods described above.
[0016] The beneficial effects of the technical solutions provided in this application include at least the following: This application embodiment utilizes a full-power PWM TLD for rapid preheating, enabling the TLD to heat up quickly at maximum power, thus achieving the fastest preheating. Based on a pre-calculated steady-state duration, the first PWM is intelligently switched to the target steady-state PWM before entering a fine-tuned temperature control stage to prevent overheating. Furthermore, by finely adjusting the first PWM to the second PWM based on the real-time temperature difference, the TLD temperature can be maintained within the target temperature range, enabling rapid initiation of gas negative absorption peak detection based on data collected by the PD. Since the heating device consumes a significant amount of power, this application achieves rapid preheating, reducing heating time and thus significantly reducing power consumption. Attached Figure Description
[0017] To more clearly illustrate the technical solutions 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 only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart of a gas detection method provided in an embodiment of this application; Figure 2 This is a flowchart of another gas detection method provided in the embodiments of this application; Figure 3 This is a schematic diagram of a TLD heating model provided in an embodiment of this application; Figure 4 This is a schematic diagram of a TLD temperature-PWM model provided in an embodiment of this application; Figure 5This is the signal curve collected by the PD when the combustible gas concentration is 0%, as provided in the embodiments of this application. Figure 6 This is the signal curve collected by the PD when the combustible gas concentration is 20%, as provided in the embodiments of this application; Figure 7 This is a schematic diagram of the methane absorption peak characteristics provided in an embodiment of this application; Figure 8 This is a flowchart of a preliminary gas negative absorption peak detection method provided in an embodiment of this application; Figure 9 This is a schematic diagram of a gas detection device provided in an embodiment of this application; Figure 10 This is a schematic diagram of TLD temperature-PWM change during full-power preheating provided in an embodiment of this application. Detailed Implementation
[0019] The present application will be described in detail below with reference to the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present application. Any structural, methodological, or functional modifications made by those skilled in the art based on these embodiments are included within the protection scope of the present application.
[0020] This application provides a gas detection method, which is referred to... Figure 1 As shown, this method is applied to a gas detection device, which includes a TLD (Tunable Diode Laser) and a photodiode (PD). The method may include the following steps: S101: In response to a preset condition trigger, acquire the ambient temperature, the current TLD temperature, and the TLD target temperature corresponding to the gas to be detected.
[0021] For example, responses to preset conditions may include, but are not limited to: Triggered at a preset interval, wherein the preset interval is no greater than 15 seconds; and / or Triggered upon receiving a detection command.
[0022] The detection command can be a command issued from the upper-level control equipment to the gas detection equipment.
[0023] S102: Based on the target temperature of TLD, ambient temperature and current temperature of TLD, obtain the target steady-state PWM value for TLD heating.
[0024] S103: Calculate steady-state duration based on TLD target temperature and ambient temperature.
[0025] Specifically, ambient temperature can refer to the ambient temperature outside the gas detection equipment.
[0026] Optionally, the first temperature sensor for detecting ambient temperature can be built into a corner of the gas detection device to detect ambient temperature, or the first temperature sensor can be placed outside the gas detection device and exposed to the air to detect ambient temperature.
[0027] The TLD's built-in second temperature sensor can be used to detect the TLD's current temperature.
[0028] S104: The first PWM is used to preheat the TLD, and the first PWM is the full power PWM value.
[0029] PWM (Pulse Width Modulation), also known as duty cycle, is a highly efficient digital control technique that uses the width of a pulse signal to achieve equivalent analog voltage or power levels.
[0030] S105: In response to the preheating time of the full-power preheating TLD being greater than or equal to the steady-state time, the first PWM is downgraded to the target steady-state PWM value.
[0031] S106: Adjust the first PWM to the second PWM according to the temperature difference between the target temperature of the TLD and the current temperature of the TLD, and use the second PWM to preheat the TLD.
[0032] S107: In response to the current temperature of the TLD entering the range of the target temperature, detect the presence of a negative gas absorption peak based on the data collected by the PD.
[0033] S108: In response to the detection of a negative absorption peak in the gas, the gas concentration of the gas to be detected is determined based on the data collected by the PD.
[0034] For example, embodiments of this application also provide a gas detection method, such as... Figure 2 As shown, the method includes: Step 201: At preset intervals, acquire the ambient temperature, the current TLD temperature, and the TLD target temperature corresponding to the gas to be detected; For example, the target TLD temperature of the gas to be detected can be pre-stored in the gas detection device before leaving the factory. When the preset conditions are triggered, the target TLD temperature of the gas to be detected is read from the memory of the gas detection device.
[0035] Step 202: Based on the TLD target temperature, calculate the target steady state using the TLD temperature-PWM model corresponding to the ambient temperature, and calculate the steady state duration using the TLD heating model; Step 203: Preheat TLD using PWM at full power; Step 204: Determine whether the preheating time of the PWM full-power preheating TLD is less than the steady-state time; if yes, proceed to step 203; otherwise, proceed to step 205. Step 205: Adjust the current PWM to the target steady-state PWM, calculate the temperature difference between the target temperature and the current temperature of the TLD, and fine-tune the current PWM based on the temperature difference using a proportional gain. Step 206: Determine whether the current temperature of the TLD is within the target temperature range. If yes, proceed to step 207; otherwise, proceed to step 205. Step 207: Initiate preliminary gas negative absorption peak detection; Step 208: If no negative absorption peak of gas is detected, stop heating the TLD and set the current PWM to zero; Step 209: If a negative absorption peak of the gas is detected, the gas concentration of the gas to be detected is determined based on the data collected by the PD.
[0036] The detection speed of the preliminary gas negative absorption peak detection in step 207 above is relatively fast, and it can also be called rapid gas negative absorption peak detection.
[0037] The gas detection method provided in this application can solve the problems of slow start-up, low accuracy, and high power consumption in laser gas detection. For example, during periodic detection, the gas detection device is woken up at preset intervals to perform rapid preheating and rapid detection of negative gas absorption peaks to achieve combustible gas detection. During rapid preheating, the output power of the heater is controlled by dynamically adjusting the PWM to shorten the preheating time, thereby achieving rapid heating and precise temperature control of the TLD. If no negative gas absorption peak is detected during rapid detection, the TLD is turned off and the PWM is set to zero, and the gas detection device enters sleep mode, waking up again after a preset time. If a negative gas absorption peak is detected during rapid detection, the device enters high-precision detection mode.
[0038] The method described in this application can be used in devices that detect combustible gas leaks and issue alarms. When the concentration of combustible gas in the environment reaches the threshold set by the alarm, the device immediately issues an audible and visual alarm to remind relevant personnel to take measures to prevent safety accidents such as explosions and fires.
[0039] In an optional embodiment of this application, the preheating of the TLD and the calculation of the target steady-state PWM and steady-state duration belong to different threads, and the time used to calculate the target steady-state PWM and steady-state duration is much shorter than the time used to preheat the TLD. Therefore, steps 202 and 203 can be performed simultaneously or sequentially within a certain time difference.
[0040] Optionally, in this embodiment of the application, after obtaining the ambient temperature, the current temperature of the TLD and the target temperature through step 201, the target steady-state PWM and the steady-state duration can be calculated through step 202, and then the TLD can be preheated through step 203.
[0041] Optionally, in this embodiment of the application, after obtaining the ambient temperature, the current temperature of the TLD, and the target temperature through step 201, the TLD can be preheated in step 203. Then, the target steady-state PWM and steady-state duration can be calculated in step 202, and these two parameters can be transmitted to the heater to control the preheating of the TLD. This can shorten the waiting time from startup to completion of preheating.
[0042] Optionally, in this embodiment of the application, after obtaining the ambient temperature, the current temperature of the TLD and the target temperature through step 201, the TLD can be preheated simultaneously through step 203, and the target steady-state PWM and steady-state duration can be calculated through step 202. These two parameters are then transmitted to the heater to control the preheating of the TLD.
[0043] For example, in step 202, the target steady-state PWM can be calculated based on the TLD target temperature using the TLD temperature-PWM model corresponding to the ambient temperature. Based on the TLD temperature-PWM model corresponding to the ambient temperature, the target steady-state PWM value is calculated using the first formula, where the first formula is: , Where y represents the target temperature of the TLD, x represents the PWM for preheating the TLD, and the constants a, b, and c are obtained through temperature calibration.
[0044] In step 202, the steady-state duration can be calculated using the following second formula combined with the TLD heating model, where the second formula is: , Where t represents the steady-state duration, T represents the ambient temperature, Dn represents the TLD target temperature, B represents the TLD heating coefficient, and K represents the heating weighting coefficient. Due to the material differences between the TLD and the gas, B and K are also different. In this embodiment, the TLD target temperature Dn can be any value within ±0.5℃ of the TLD target temperature, and is not limited here. For example, the range of the TLD target temperature is no greater than ±0.5℃, and this range can be obtained by calibrating the gas detection equipment before shipment. For example, assuming the TLD target temperature is the effective operating temperature of the TLD, then in a scenario involving methane detection, the production calibration process of equipment A confirms that the TLD needs to be at 65 degrees Celsius to detect methane. Therefore, the target temperature of equipment A's TLD is 65 degrees Celsius, and the range of the target temperature for equipment A is between 64.5 degrees Celsius and 65.5 degrees Celsius. Similarly, the production calibration process of equipment B confirms that the TLD needs to be at 63 degrees Celsius to detect methane. Therefore, the target temperature of equipment B's TLD is 63 degrees Celsius, and the range of the target temperature for equipment B is between 62.5 degrees Celsius and 63.5 degrees Celsius.
[0045] For example, in this application embodiment, a temperature rise model and a TLD temperature-PWM model are obtained through temperature rise calibration. This temperature rise calibration process can be, but is not limited to, the following: 1) Divide the PWM into levels and set values, such as PWM values of 400, 500, 600, 1000, 1500, and 2000. No restrictions are imposed here. For example, the voltage of the heating element currently in use is 0~3.3V, and the corresponding PWM is 0~2000 or 0~4000, which can be determined according to the application scenario.
[0046] 2) Set different PWMs to heat the TLD until the temperature reaches a stable state, and statistically analyze the TLD temperature-time change curve; 3) According to the heating model formula Calculate the heating weight coefficient K corresponding to different PWMs to obtain the heating model corresponding to different PWMs, where x represents the heating time, y represents the TLD temperature corresponding to the heating time, x and y are obtained through the TLD temperature-time change curve, T represents the initial temperature of TLD, and B represents the TLD heating coefficient. 4) Based on the temperature rise weighting coefficient K corresponding to different PWMs and the starting temperature of the TLD, a second-order polynomial fitting is used to obtain the constant coefficients e, f, and g of the PWM-K coefficient model. The model formula is as follows:
[0047] Where x represents PWM, K is the temperature rise weighting coefficient, and e, f, and g represent constant coefficients.
[0048] For example, the TLD temperature-time variation curves corresponding to different PWMs obtained in the embodiments of this application are as follows: Figure 3 As shown in Table 1, the heating weight coefficient K corresponding to different PWMs is calculated according to the heating model formula.
[0049] Table 1
[0050] When the TLD's initial temperature is 20℃, the TLD temperature-PWM model curve is as follows: Figure 4 As shown, where , , .
[0051] The method in this application embodiment preheats the TLD using full-power PWM. When the TLD temperature reaches the target temperature range or the heating reaches the steady-state duration, the PWM is adjusted to the target steady-state PWM. Then, the proportional gain of the current PWM is finely adjusted based on the difference between the target temperature and the current TLD temperature to maintain the TLD temperature within the target temperature range.
[0052] For example, the preset time in step 201 can be set to no more than 15 seconds. This ensures a fast detection speed and avoids excessively long detection times.
[0053] For example, when the gas to be detected includes methane, assuming the laser wavelength capable of detecting methane is 1600 nm, the target calibration temperature of the TLD (Total Discharge Temperature) is 55 degrees Celsius based on the factory calibration of the gas detection equipment. As another example, when the gas to be detected includes carbon monoxide, assuming the laser wavelength capable of detecting carbon monoxide is 1400 nm, the target calibration temperature of the TLD is 55 degrees Celsius based on the factory calibration of the gas detection equipment.
[0054] Assume the target temperature is the effective operating temperature of the device's TLD. For example, the wavelength for detecting methane is 1600nm. The production calibration process of equipment A confirms that the TLD needs to be able to detect a wavelength of 1600nm at 65℃; The production calibration process of equipment B confirmed that the TLD needs to be able to detect a wavelength of 1600nm at 63℃; The production calibration process of equipment C confirms that the TLD needs to be able to detect a wavelength of 1600nm at 67℃; Therefore, the target temperature for equipment A is 65℃; the target temperature for equipment B is 63℃; and the target temperature for equipment C is 67℃.
[0055] For example, in step 205, the current PWM can be fine-tuned based on the difference using a proportional gain, but is not limited to, by the following fine-tuning formula:
[0056] in, This is the fine-tuned PWM. This represents the current PWM, where W is the proportional gain. The target temperature value, The given temperature is the current value. The proportional gain W can be a preset constant used to characterize the temperature gain.
[0057] In this embodiment of the application, when the TLD temperature is within the target temperature range, it means that the TLD can start working and can start the preliminary detection of gas negative absorption peaks to realize the detection of whether there are gas negative absorption peaks based on the data collected by the PD.
[0058] This application embodiment determines the presence of combustible gas in the current environment by detecting the initial negative absorption peak of the gas. In the laser gas detection system, a photodiode (PD) receives the laser signal emitted by a tunable laser diode (TLD) that passes through the gas to be measured. Figure 5 The signal curve collected by the PD represents the situation when the concentration of combustible gas is 0%. Figure 6 The signal curve collected by the PD when the combustible gas concentration is 20% is shown below. Figure 6 As shown, when a combustible gas is present in the gas, its molecules will selectively absorb light of a specific wavelength in the laser, resulting in a significant absorption depression (i.e., a negative absorption peak) in the middle of the signal curve acquired by the PD. Thus, by accurately calculating the characteristic value (such as the integral area) of this absorption depression according to the Beer-Lambert law, the accurate concentration of the combustible gas can be deduced.
[0059] See Figure 7 As shown, the characteristics of the methane absorption peak change when the TLD temperature changes by 1°C from high to low.
[0060] For example, the preliminary detection of the negative absorption peak of the gas in step 207 is achieved by sampling the full range of light intensity data of a single frame of data acquired by the PD to obtain the sampled light intensity; the position of the concave peak in the sampled light intensity is determined based on linear fitting.
[0061] An exemplary method for detecting preliminary negative absorption peaks in gases is as follows: Figure 8 As shown, it includes: Step 801: Acquire single-frame data from PD.
[0062] For example, single-frame data refers to one frame of data collected by the PD at one time.
[0063] Step 802: Sample the data collected by the PD to obtain the sampled light intensity; Optionally, step 802 can be performed using arithmetic sampling with a span of four or three; this embodiment does not limit the specific sampling method. Sampling reduces the amount of data required for calculation, resulting in faster detection of negative absorption peaks in the gas.
[0064] Step 803: Fit the sampled light intensity to obtain a fitting curve; Step 804: Calculate the first difference data between the fitted curve and the original curve formed by the light intensity data.
[0065] Step 805: Detect the negative absorption peak of the gas based on the first difference data.
[0066] Optionally, step 804 may include: Based on the second difference data between the fitted curve and the mid-section curve formed by the mid-section position data of the sampled light intensity, the negative absorption peak curve of the gas is determined, wherein the mid-section position data represents the data of the left and right quarter positions of the center point of the sampled light intensity. The detection of the negative absorption peak of the gas based on the first difference data may include: In response to the absolute value of the light intensity at the minimum extreme point of the detected gas negative absorption peak curve not being greater than a preset light intensity threshold, it is determined that no gas negative absorption peak has been detected; and / or, A first absorption peak integration window is established with the minimum extreme point of the gas negative absorption peak curve as the center. The gas negative absorption peak curve is integrated based on the first absorption peak integration window. In response to the detection that the gas negative absorption peak curve integration is not greater than the preset integration threshold, it is determined that no gas negative absorption peak is detected.
[0067] In an optional embodiment of this application, steps 804 and 805 can be combined. When the absolute value of the light intensity at the minimum extreme point of the gas negative absorption peak curve is greater than a preset light intensity threshold, and the integral of the gas negative absorption peak curve is greater than a preset integration threshold, it is determined that a gas negative absorption peak has been detected. The process is as follows: The gas negative absorption peak curve is determined based on the second difference between the fitted curve and the mid-section curve formed by the mid-section position data of the sampled light intensity. A first absorption peak integration window is established with the minimum extreme point of the gas negative absorption peak curve as the center, and the gas negative absorption peak curve is statistically integrated based on the first absorption peak integration window. In response to the detection that the absolute value of the light intensity at the minimum extreme point of the gas negative absorption peak curve is greater than a preset light intensity threshold, and the integral of the gas negative absorption peak curve is greater than a preset integration threshold, it is determined that a gas negative absorption peak has been detected.
[0068] For example, in an optional embodiment of this application, for the single-frame data collected by the PD, arithmetic sampling is performed according to a span of four, that is, one data point is selected every three data points, thereby selecting one-quarter of the light intensity data as the sampled light intensity for a first linear fitting to obtain a first fitting curve, which greatly reduces the amount of computation; from the full light intensity data, the middle section data, which is half the total number of data in the whole section (i.e., the middle section position data), is selected and the corresponding middle section curve is obtained, which is used to calculate the difference with the first fitting curve. By selecting the middle section position data, the amount of computation is further reduced; based on the difference data, the presence of a negative absorption peak of gas is detected. While ensuring accuracy, the overall amount of computation is greatly reduced and the result detection efficiency is improved.
[0069] In an optional embodiment of this application, the single-frame data can be filtered before sampling to obtain D-segment denoised data after removing electronic noise. Then, the D-segment denoised data is sampled using arithmetic four-order sampling to obtain the sampled light intensity. For sampling light intensity The fitted curve N1 was obtained by fitting the data. Rapid detection of the negative absorption peak of the gas was performed as follows: 1) Take the mid-section curve formed by the mid-section position data of the D segment denoised data, and then subtract the fitted curve N1 to obtain the gas negative absorption peak curve U. The calculation formula is as follows:
[0070] 2) The coordinates of the minimum point Umin in the gas negative absorption peak curve U are the coordinates of the center position of the gas negative absorption peak. The calculation formula is as follows:
[0071] 3) Using the minimum extreme point Umin as the center, extend 100 units to the left and right to establish the first absorption peak integration window L. The calculation formula is as follows:
[0072] 4) The integral magnitude of the gas negative absorption peak curve within the integration window L of the first absorption peak is obtained by summing using the following formula:
[0073] 5) Compare the integral of the gas negative absorption peak curve with the integration threshold. If the integral of the gas negative absorption peak curve is greater than the integration threshold, it is determined that a gas negative absorption peak has been detected; if the integral of the gas negative absorption peak curve is not greater than the integration threshold, it is determined that no gas negative absorption peak has been detected.
[0074] The method in this application saves data acquisition time and calculation time for the negative absorption peak by detecting the gas in the preliminary stage. If no negative absorption peak is detected, the detection device enters sleep mode again, thus saving energy. Only when a negative absorption peak is detected in the preliminary detection stage will the device enter the high-precision gas detection stage to detect the concentration of the gas to be detected. Before entering the high-precision gas detection stage, a rapid detection is performed. If no absorption peak is detected, the TLD is turned off and the PWM is set to zero, which can greatly shorten the normal detection process when there is no gas. It not only has the advantages of preliminary response, low power consumption, and high reliability that can meet the secondary requirements of high precision, but also saves energy.
[0075] For example, detecting the gas concentration of the gas to be detected based on data acquired by a PD includes: The data acquired by the PD is filtered to obtain the D-band denoised data after removing electronic noise. By fitting the denoised data in segment D, the first baseline is obtained. The gas negative absorption peak curve is obtained by subtracting the first baseline from the mid-section curve formed by the mid-section position data of the D-section denoised data. The center position of the corresponding negative absorption peak is determined based on the minimum extreme value of the negative absorption peak curve. A second absorption peak integration window is established with the center position of the negative absorption peak of the gas as the center, and the data of each of the two ends of the second absorption peak integration window are used to fit the second baseline. Combining the second baseline and the second absorption peak integration window, the absorbance integral of the second absorption peak integration window is calculated based on Beer-Brown's law; Based on the integral concentration benchmark model corresponding to the gas to be detected, the gas concentration of the gas to be detected is calculated according to the absorbance integral.
[0076] For example, the calculation of the concentration of the gas to be detected in this application embodiment (i.e., the high-precision gas detection stage) can be achieved through methods such as... Figure 8 Perform as shown: Step 801: Acquire single-frame data from the PD, filter the single-frame data to obtain D-band denoised data after removing electronic noise. Step 802: Fit the denoised data of segment D to obtain the first baseline. Step 803: Subtract the first baseline from the D-segment curve formed by the D-segment denoising data to obtain the gas negative absorption peak curve, and determine the center position of the gas negative absorption peak corresponding to the minimum extreme value of the gas negative absorption peak curve. In optional step 803, in order to speed up the calculation, the first baseline can be subtracted from the D-segment curve formed by the middle position data of the D-segment curve (i.e., the data at the left and right quarter positions of the center point of the D-segment denoised data) to obtain the gas negative absorption peak curve. Step 804: Establish a second absorption peak integration window centered on the center position of the negative absorption peak of the gas, and fit the second baseline by taking one-third of the data from each end of the second absorption peak integration window. Step 805: Using the second baseline and the second absorption peak integration window, calculate the absorbance integral of the second absorption peak integration window based on Beer Braun's law; Step 806: Based on the integral concentration benchmark model corresponding to the gas to be detected, convert the absorbance integral into the concentration of the gas to be detected.
[0077] For example, in this embodiment of the application, after step 806, a further operation can be performed by comparing the concentration of the gas to be detected with a concentration threshold, including: If the cumulative number of times the concentration of the gas to be detected is calculated is less than the preset calculation number threshold, then return to step 801, the step of obtaining the next frame of single frame data collected by PD, and repeat the calculation process of the concentration of the gas to be detected, and increment the cumulative number of calculation processes of the concentration of the gas to be detected by one. If the cumulative number of times the concentration of the gas to be detected is not less than the preset calculation threshold, an alarm will be reported and the heating of the TLD will be stopped, thereby reducing power consumption.
[0078] For example, assuming the cumulative number of times the concentration of the gas to be detected is x before the alarm is reported, the alarm information can also carry the average value of the concentration of the gas to be detected x times. This average value is used as the alarm reporting concentration of the gas to be detected, and the TLD and heater are turned off. This can reduce the probability of false alarms.
[0079] For example, suppose the data acquired by the PD is filtered to obtain D-band denoised data after removing electronic noise: 1) Use the D-segment denoised data to perform linear function fitting to obtain the first baseline LINE1; A linear function can be a first-order linear function or a second-order linear function, etc.
[0080] 2) Subtract the first baseline from the D-segment curve formed by the D-segment denoised data to obtain the gas negative absorption peak curve U. The calculation formula is as follows:
[0081] 3) The coordinates of the minimum point Umin in the gas negative absorption peak curve U are the coordinates of the center position of the gas negative absorption peak. The calculation formula is as follows:
[0082] 3) Using the center of the negative absorption peak of the gas as the center, extend 300 units to the left and right to establish the integration window B of the second absorption peak. The calculation formula is as follows:
[0083] 4) Take one-third of the data from both ends of the integration window B of the second absorption peak and perform second-order polynomial fitting to obtain the second baseline LINE2; 5) Based on Beer-Brown's law, using the baseline L as the background, calculate the absorbance integral of the integration window B of the second absorption peak. The calculation formula is as follows:
[0084] Wherein, LINE2 represents the second baseline. This is the value within the integration window B of the second absorption peak, which serves as the baseline.
[0085] 6) Based on the integral concentration benchmark model corresponding to the gas to be detected, the absorbance integral is converted into the concentration of the gas to be detected.
[0086] For example, the integral concentration baseline model may include, but is not limited to, the heavy gas diffusion model SLAB model, the AOT40 cumulative concentration baseline model, the Gaussian plume model, etc., and is not limited here.
[0087] Based on a similar technical concept to the method, embodiments of this application also provide a gas detection device, such as... Figure 9 As shown, the gas detection device includes: TLD 903, photodiode PD905, first temperature sensor 902, second temperature sensor 906, processor 901, heater 904, and battery 910. Figure 9 (not shown in the image) The first temperature sensor 902 is used to acquire the ambient temperature and transmit the ambient temperature to the processor 901; The battery 910 is used to power the gas detection device; The second temperature sensor 906 is used to acquire the current temperature of the TLD and transmit the current temperature of the TLD to the processor 901; This heater 904 is used to heat TLD903; The photodiode PD905 is used to receive the laser signal emitted by the TLD903 and passing through the gas to be measured, and to collect light intensity data; The processor 901 is used to run executable code to implement the gas detection method described above.
[0088] For example, the gas detection device provided in this application includes three working modes: sleep mode, rapid gas negative absorption peak detection mode, and high-precision gas detection mode. During use, the device is woken up at preset intervals and enters the rapid gas negative absorption peak detection mode. If a gas negative absorption peak is detected, it enters the high-precision gas detection mode; otherwise, the device enters sleep mode again.
[0089] In one embodiment of this application, the initial TLD temperature is 21.6°C, and the target TLD temperature is 65°C. The calculated target steady-state PWM corresponding to this target temperature is 844, with a steady-state duration of 144ms. The relationship between TLD temperature and PWM over time during the initial preheating process is as follows: Figure 10 As shown: Within 0~144ms, PWM full-power preheating is used to heat the TLD to 64.5℃; At 145ms, exit full-power heating and adjust the current PWM to the target steady-state PWM; Within 146~500ms, the difference between the current temperature of the TLD and the target temperature is calculated and the PWM is finely adjusted to stabilize the TLD temperature.
[0090] Optionally, the rapid preheating time in this embodiment is within 600ms.
[0091] In this embodiment, when the TLD is maintained within the target temperature range, the power of the gas detection device is 34mW; in the fast gas negative absorption peak detection mode, the power required to preheat the TLD and maintain the target temperature range is approximately 121mW, the running time is 600ms, and the power consumption is 0.0202mWh; the power required for the TLD and PD to collect light intensity data is approximately 164mW, the running time is 6ms, and the power consumption is 0.000273mWh; in the secondary gas detection mode, the gas detection device maintains 34mW for 5s, the power consumption is 0.0472mWh, and the power consumption required for the TLD and PD to collect light intensity data is 0.00819mWh.
[0092] Assuming the method of this application embodiment is applied to a gas detection device, and the gas detection device is woken up every 15 seconds, the power consumption required for the rapid gas negative absorption peak detection mode per year is:
[0093] Assuming the secondary gas detection mode operates twice a month on average, the annual power consumption required by the secondary gas detection mode is:
[0094] The MCU's sleep state draws 18μA, and its annual power consumption in sleep state is P3=365. 24h 0.018mA 3.3V = 520.344mWh.
[0095] Total annual power consumption is .
[0096] If a wired, continuously heated single-gas detection system is used to heat or cool the TLD (Total Discharge Lid), the operating current often reaches hundreds of mA or even exceeds 1A, with a preheating time exceeding 15 seconds. Furthermore, during gas detection, the TLD and PD collect photoelectric data via high-frequency scanning, resulting in an average power consumption of 55.44 mW per second. Assuming continuous heating via wired power, the heating system of a continuously heated wired single-gas detection system has an average power consumption of 36 mW per second, the TLD and PD have a power consumption of 55.44 mW per second, and the single-gas detection system has a power consumption of 91.44 mW per second. The estimated total annual power consumption is 365 mW. 24h 91.44mW =801014.4mWh=801.0144Wh.
[0097] This comparison shows that when the gas detection method combining rapid preheating and intermittent wake-up adopted in the embodiments of this application is applied to gas detection equipment, the total annual power consumption is reduced by more than ten times compared to a single gas detection system with limited power supply and continuous heating. This nearly 20-fold difference in power consumption is sufficient to change the power supply of the gas detection equipment in the embodiments of this application from a plug-in power supply to a battery power supply, which can greatly reduce the installation difficulty and installation location requirements, save energy, and improve the flexibility of equipment installation.
[0098] The method in this application reduces the TLD preheating time to within 600ms by rapid preheating, thereby reducing the power consumption required for heating. When the device is working, it uses low-power rapid gas negative absorption peak detection for rapid detection, with a single run time of no more than 6ms. If no gas negative absorption peak is detected, the device is switched to a low-power sleep mode, which reduces the run time of the secondary detection mode, further reducing the device power consumption, shortening the detection time, and improving the detection efficiency.
[0099] For example, processor 901 can be a central processing unit (CPU), or it can 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.
[0100] For example, processor 901 may include multiple processors, each of which may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). Here, "processor" may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions). The gas detection method of this application embodiment is implemented by running executable code; specific implementation methods can be found in the above method embodiments, and will not be repeated here.
[0101] It should be understood that the term "and / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. Additionally, the character " / " in this document generally indicates an "or" relationship between the preceding and following related objects, but it may also indicate an "and / or" relationship; please refer to the context for a more accurate understanding.
[0102] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0103] In this application, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0104] The various embodiments in this application are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0105] The above are merely preferred embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.
Claims
1. A gas detection method, characterized in that, Applied to gas detection equipment, the equipment including a tunable laser diode (TLD) and a photodiode (PD), the method includes: In response to preset conditions, the ambient temperature, the current TLD temperature, and the TLD target temperature corresponding to the gas to be detected are obtained. Based on the target TLD temperature, the ambient temperature, and the current TLD temperature, obtain the target steady-state duty cycle (PWM) value for TLD heating; The steady-state duration is calculated based on the TLD target temperature and the ambient temperature. The TLD is preheated using a first PWM, where the first PWM is a full-power PWM value; In response to the TLD being preheated at full power for a duration greater than or equal to the steady-state duration, the first PWM is downgraded to the target steady-state PWM value; The first PWM is adjusted to the second PWM based on the temperature difference between the target temperature and the current temperature of the TLD, and the second PWM is used to preheat the TLD. In response to the TLD's current temperature entering the target temperature range, the presence of a negative gas absorption peak is detected based on data collected by the PD: In response to the detection of the negative absorption peak of the gas, the gas concentration of the gas to be detected is then detected based on the data collected by the PD. The detection of the presence of a negative gas absorption peak based on data acquired by the PD includes: The data collected by the PD is sampled to obtain the sampled light intensity; The sampled light intensity is fitted to obtain a fitting curve; Calculate the first difference between the fitted curve and the original curve formed by the sampled light intensity data; Detect the negative absorption peak of the gas based on the first difference data; The calculation of the first difference data between the fitted curve and the original curve formed by the sampled light intensity data includes: The gas negative absorption peak curve is determined based on the second difference data between the fitted curve and the mid-section curve formed by the mid-section position data of the sampled light intensity, wherein the mid-section position data represents the data of the left and right quarter positions of the center point of the sampled light intensity. The step of detecting the negative absorption peak of the gas based on the first difference data includes: In response to the detection that the absolute value of the light intensity at the minimum extreme point of the gas negative absorption peak curve is not greater than a preset light intensity threshold, it is determined that no gas negative absorption peak has been detected; and / or, A first absorption peak integration window is established with the minimum extreme point of the gas negative absorption peak curve as the center. The integral of the gas negative absorption peak curve is calculated based on the first absorption peak integration window. In response to the detection that the integral of the gas negative absorption peak curve is not greater than a preset integration threshold, it is determined that no gas negative absorption peak is detected.
2. The method as described in claim 1, characterized in that, The calculation of the first difference data between the fitted curve and the original curve formed by the sampled light intensity data; and the detection of the negative absorption peak of the gas based on the first difference data, includes: The gas negative absorption peak curve is determined based on the second difference data between the fitted curve and the mid-section curve formed by the mid-section position data of the sampled light intensity; A first absorption peak integration window is established with the minimum extreme point of the gas negative absorption peak curve as the center, and the integral of the gas negative absorption peak curve is statistically calculated based on the first absorption peak integration window. When the absolute value of the light intensity at the minimum extreme point of the gas negative absorption peak curve is greater than a preset light intensity threshold, and the integral of the gas negative absorption peak curve is greater than a preset integral threshold, it is determined that a gas negative absorption peak has been detected.
3. The method as described in claim 1, characterized in that, The step of obtaining the target steady-state PWM value for TLD heating based on the TLD target temperature, the ambient temperature, and the current TLD temperature includes: The target steady-state PWM value is calculated based on the first formula using the TLD temperature-PWM model corresponding to the ambient temperature. The first formula is: , Where y represents the target temperature of the TLD, x represents the PWM for preheating the TLD, and a, b, and c represent constants obtained through temperature calibration.
4. The method as described in claim 1, characterized in that, The calculation of steady-state duration based on the TLD target temperature and the ambient temperature includes: Based on the TLD heating model, the steady-state duration is calculated using the second formula, whereby: , Where t represents the steady-state duration, T represents the ambient temperature, and D n The TLD target temperature is represented by B, the TLD heating coefficient is represented by B, and the heating weighting coefficient is represented by K.
5. The method as described in claim 1, characterized in that, The detection of the gas concentration of the gas to be detected based on the data collected by the PD includes: The data acquired by the PD is filtered to obtain D-band denoised data after removing electronic noise. The first baseline is obtained by fitting the denoised data of segment D. The gas negative absorption peak curve is obtained by subtracting the first baseline from the D-segment curve formed by the D-segment denoised data. The center position of the corresponding negative absorption peak is determined based on the minimum extreme value of the gas negative absorption peak curve. A second absorption peak integration window is established with the center position of the negative absorption peak of the gas as the center, and the data of each of the two ends of the second absorption peak integration window are used to fit the second baseline. Combining the second baseline and the first absorption peak integration window, the absorbance integral of the second absorption peak integration window is calculated based on Beer-Brown's law; Based on the integral concentration benchmark model corresponding to the gas to be detected, the gas concentration of the gas to be detected is calculated according to the absorbance integral.
6. The method as described in claim 5, characterized in that, After converting the absorbance integral into the gas concentration of the gas to be detected, the method further includes: In response to the cumulative number of times the gas concentration of the gas to be detected is calculated being not less than a preset calculation threshold, an alarm is reported and the heating of the TLD is stopped.
7. The method as described in claim 1, characterized in that, The response triggered by a preset condition includes: Triggered at a preset interval, wherein the preset interval is no greater than 15 seconds; and / or Triggered upon receiving a detection command.
8. A gas detection device, characterized in that, include: Tunable laser diode (TLD), first temperature sensor, second temperature sensor, processor, heater and battery, and photodiode (PD); The battery is used to power the gas detection device; The first temperature sensor is used to acquire the ambient temperature and transmit the ambient temperature to the processor. The second temperature sensor is used to acquire the current temperature of the TLD and transmit the current temperature of the TLD to the processor; The processor is used to run executable code to implement the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Fit dynamic peak searching method for detecting gas concentration by laser
CN101915748A
Continuous-laser driving device and method
CN102570306A
