Gas concentration detection method, device, storage medium and electronic equipment
By calculating the intensity difference between no absorption peak and absorption peak in the spectrum and the average value of the absorption peak, the gas concentration detection process is simplified, the problem of low detection frequency in the prior art is solved, and the gas concentration detection with high-speed detection is realized.
Patent Information
- Application Number
- CN202410044365.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-12
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-01-12
AI Technical Summary
The existing gas concentration detection technology has low detection frequency in high-speed detection occasions, making it difficult to meet the needs of high-speed vehicles or drones, and the calculation speed is slow and it is easy to miss inspection.
By obtaining the original spectrum of the laser reflected by the gas to be tested, the average value H0 of the intensity difference between the no absorption peak and the absorption peak is calculated, and combined with the average intensity value H1 of the absorption peak, input the constructed gas concentration detection model to simplify the calculation process , reduce logarithmic operations, only add, subtract and multiplication and division operations are performed to increase the detection frequency.
The calculation process is simplified, the calculation amount and time are reduced, and the detection frequency of the gas sensor is significantly improved, making it suitable for high-speed detection occasions.
Smart Images

Figure CN118858216B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of gas detection technology, and specifically relates to a gas concentration detection method, device, storage medium and electronic equipment. Background Art
[0002] Usually, when measuring gas concentration, it is necessary to select a certain absorption line of the gas to be measured. The laser emitted by the laser is modulated by the modulation signal so that the output wavelength of the laser is fixed near the selected absorption line of the gas to be measured and scanned and emitted. When the laser beam passes through the gas to be measured, the detector will generate an output signal waveform in the time domain. The waveform is digitally collected to obtain spectral signal data.
[0003] To process the spectral signal data, the peak amplitude, area under the curve and root mean square are generally used to calculate the gas concentration according to the Lambert-Beer law. According to the Lambert-Beer law, the intensity of the laser without gas absorption is , the optical path through the gas is L, and the intensity after being absorbed after passing through the gas is , the laser intensity will be attenuated due to molecular absorption, and its intensity change can be expressed as:
[0004] (1)
[0005] In the formula, is the line intensity of the characteristic spectrum of the gas, which is a single-valued function of temperature and can be obtained by querying the database; p is the total pressure of the gas medium; L is the distance the laser propagates in the gas; A is the volume concentration of the gas; It is a linear function that represents the specific shape of the absorption spectrum, which is related to T, P and the content of each component in the gas. v is the wave number of the absorption spectrum.
[0006] When the interference between gas components is small, equation (1) can be transformed into:
[0007] (2)
[0008] The commonly used technique is to calculate the integral of the natural logarithm of the ratio of the outgoing light to the incident light over the entire wavenumber range according to equation (2), where: is the spectral absorbance. As long as the integral value of the spectral absorbance within the wavenumber range is obtained, and the pressure, temperature and optical path length of the gas pool in the experiment are measured, the concentration of the gas can be obtained through formula (2).
[0009] In formula (2), the intensity without gas absorption is It is usually obtained by peak removal fitting method, which usually requires sensor calibration and obtaining absorption peaks in advance (such as Figure 2 As shown, Figure 2 The center position and width of the concave part in the middle is the absorption peak. The absorbed data is removed from the original spectral signal, and then the two segments of data on the left and right of the absorption peak are selected for high-order curve fitting, and the fitting result is used as the light intensity without absorption.
[0010] Figure 3 The medium-thin solid line is Figure 2 Then, the gas concentration can be obtained by calculating according to formula (2).
[0011] In the existing technical solution, the center position of the absorption peak and the width of the absorption peak must first be specified, and these data need to be obtained by calibrating the gas sensor in advance.
[0012] According to formula (2), to calculate the concentration, we first need to calculate , including one division and one logarithmic operation, which places high demands on gas sensors and has a slow calculation speed. It is difficult to use in situations where high-speed detection is required, such as high-speed vehicles or drones, resulting in a detection range that is too wide and prone to missed detections.
[0013] In view of the above problems, it is necessary to propose a new gas concentration detection method to improve the detection frequency of the sensor. Summary of the invention
[0014] In view of the deficiencies in the prior art, the purpose of the present application is to provide a gas concentration detection method, which can improve the detection frequency of the gas sensor for the concentration of the gas to be measured.
[0015] To achieve the above objectives, this application provides the following technical solutions:
[0016] A method for detecting gas concentration, comprising the following steps:
[0017] S100: obtaining the original spectrum of the laser after being reflected by the gas to be measured;
[0018] S200: Obtain the intensity I of the absorption peak in the original spectrum t and the intensity of no absorption peak I0;
[0019] S300: Calculate the intensity difference I0-I between the non-absorption peak and the absorption peak t The average value H0;
[0020] S400: Calculate the intensity average value H1 of the absorption peak;
[0021] S500: Inputting H0 and H1 into the constructed gas concentration detection model to detect the concentration of the gas to be tested.
[0022] Preferably, in step S300, the intensity difference between the non-absorption peak and the absorption peak is I0-I t The average value H0 is as follows:
[0023]
[0024] Among them, I t It represents the intensity of the absorption peak in the original spectrum; I0 represents the intensity without absorption peak in the original spectrum, W represents the maximum width of the absorption peak, and P represents the central wave number of the absorption peak.
[0025] Preferably, step S400 includes the following steps:
[0026] S401: Calculate the intensity average value I within a certain interval between the critical point A and the critical point B between the absorption peak and the non-absorption peak A and I B ;
[0027] S402: Based on I A and I B Calculate the intensity average H1 of the absorption peak.
[0028] The present application also provides a gas concentration detection device, the device comprising:
[0029] The first acquisition module is used to acquire the original spectrum of the laser after it is reflected by the gas to be measured;
[0030] The second acquisition module is used to obtain the intensity I of the absorption peak in the original spectrum. t and the intensity of no absorption peak I0;
[0031] The first calculation module is used to calculate the intensity difference I0-I between the non-absorption peak and the absorption peak. t The average value H0;
[0032] The second calculation module is used to calculate the intensity average value H1 of the absorption peak;
[0033] The detection module is used to input H0 and H1 into the constructed gas concentration detection model to detect the concentration of the gas to be tested.
[0034] The present application also provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute any of the above methods.
[0035] The present application also provides an electronic device, including:
[0036] A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein:
[0037] When the processor executes the program, any of the above methods is implemented.
[0038] Compared with the prior art, the beneficial effects brought about by the present application are: the present application simplifies the calculation process. First, there is no need to fit the absorption equation of the spectral line, and since there is no need to consider the influence of pressure and temperature, a large amount of calculation can be reduced; secondly, there is no need to perform time-consuming logarithmic operations, only addition, subtraction, multiplication and division operations are required, so the data processing speed can be greatly improved, thereby increasing the gas concentration detection frequency of the gas sensor, and thus allowing the gas sensor to be used in situations requiring high-speed detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a flow chart of a gas concentration detection method provided by an embodiment of the present application;
[0040] Figure 2 is the gas absorption spectrum curve;
[0041] Figure 3 Yes Figure 2 The curve shown is a spectrum without absorption peak obtained after peak removal fitting;
[0042] Figure 4 Another embodiment of the present application provides a quadratic function that approximates a quadratic curve piecewise linearly;
[0043] Figure 5 is a schematic diagram of using absorption peak data provided by another embodiment of the present application;
[0044] Figure 6 It is a schematic diagram of the light intensity calculation in the areas on both sides of the absorption peak. DETAILED DESCRIPTION
[0045] The following will refer to the attached Figures 1 to 6 The specific embodiments of the present application are described in detail. Although the specific embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0046] It should be noted that certain words are used in the specification and claims to refer to specific components. Those skilled in the art should understand that technicians may use different nouns to refer to the same component. This specification and claims do not use the difference in nouns as a way to distinguish components, but use the difference in the functions of the components as the criterion for distinction. As mentioned throughout the specification and claims, "including" or "comprising" is an open term, so it should be interpreted as "including but not limited to". The subsequent description of the specification is a preferred embodiment of the implementation of the present application, but the description is based on the general principles of the specification and is not used to limit the scope of the present application. The scope of protection of the present application shall be determined by the attached claims.
[0047] To facilitate understanding of the embodiments of the present application, further explanation will be given below using specific embodiments as examples in conjunction with the accompanying drawings, and the various drawings do not constitute a limitation on the embodiments of the present application.
[0048] In one embodiment, if Figure 1 As shown, the present application provides a gas concentration detection method, comprising the following steps:
[0049] S100: obtaining the original spectrum of the laser after being reflected by the gas to be measured;
[0050] S200: Obtain the intensity I of the absorption peak in the original spectrum t , for the data in the interval [PW, P+W] on the original spectrum, the intensity I0 of the non-absorption peak is obtained by peak removal fitting;
[0051] In this step, if Figure 6 As shown, the position of the absorption peak of the spectral curve is fixed. Therefore, N (>100) data outside the critical points A and B are selected to fit a third-order curve as a spectral curve without absorption peak. By fitting the spectral curve without absorption peak, the intensity I0 of the absorption peak can be obtained.
[0052] S300: Calculate the intensity difference I0-I between the non-absorption peak and the absorption peak t The average value H0;
[0053] In this step, the intensity difference between the non-absorption peak and the absorption peak is I0-I t The average value H0 is as follows:
[0054]
[0055] Among them, I t It represents the intensity of the absorption peak in the original spectrum; I0 represents the intensity without absorption peak in the original spectrum, W represents the maximum width of the absorption peak, and P represents the central wave number of the absorption peak.
[0056] S400: Calculate the intensity average value H1 of the absorption peak;
[0057] In this step, the intensity average H1 of the absorption peak is calculated by the following steps:
[0058] S401: Take N data in the intervals near the critical point A and the critical point B between the absorption peak and the non-absorption peak, where the interval near the critical point A is [PWN, PW], and the average intensity is recorded as I A , the interval near the critical point B is [PW, P-W+N], and the average intensity is recorded as I B , where P represents the central wave number of the absorption peak and W represents the maximum width of the absorption peak.
[0059] S402: Based on I A and I B Calculate the intensity average H1 of the absorption peak, H1 is as follows:
[0060]
[0061] and
[0062]
[0063]
[0064] S500: Inputting H0 and H1 into the constructed gas concentration detection model to detect the concentration of the gas to be tested.
[0065] In this step, the gas concentration detection model is expressed as:
[0066] A=a m y+b m y
[0067] and
[0068] y= H0 / H1
[0069] Among them, A represents the concentration of the gas to be measured, a m and b m All represent coefficients, m represents the coefficient number, y represents the ratio of the average value H0 to the intensity average value H1, a m and b m Obtained by referring to the subsequent Table 1.
[0070] Below, this application describes in detail the construction process of the above-mentioned gas concentration detection model.
[0071] Considering formula (2), except for the gas absorption section, the other parts and is consistent, that is , assuming that the starting wave number of the absorption end is a and the ending wave number is b, then equation (2) can be rewritten as:
[0072] (3)
[0073] Apply Taylor's formula to Expand and simplify to get:
[0074]
[0075] In the above formula, .make , The results are consistent with the quadratic function distribution. When the sensor is used for outdoor measurement, the atmospheric pressure p is considered constant, and for specific gases, The temperature has little effect on the quadratic function and is considered unchanged. The quadratic function is approximated by a piecewise linear function, such as Figure 4 shown.
[0076] The gas concentration calculation formula can be simplified as:
[0077] (4)
[0078] In formula (4), , Take the average value of the light intensity. In order to eliminate the uncertainty error caused by the random selection of light intensity, Using the average intensity of the absorption peak, Figure 5 The curve in the figure is obtained by subtracting the intensity of the absorption peak from the intensity of the non-absorption peak. Figure 5 Calculate the average value .
[0079] Take the average value of the light intensity of two segments of data with a fixed distance on both sides of the absorption peak. Figure 6 As shown, the average light intensity of segments A and B is taken as .
[0080] Before using the sensor, it needs to be calibrated. Specifically, the concentration used is increased in sequence, and the concentration value is , ,..., The sensor is calibrated with gas (n≥10) and the calculated value is ( , ), , ),...,( , ), use two adjacent sets of values to perform straight line fitting and obtain a set of coefficients [( ), ),...,( )] and save the set of data to the storage medium of the sensor.
[0081] Exemplarily, the coefficients a and b obtained after fitting are shown in Table 1:
[0082]
[0083] In another embodiment, the present application further provides a gas concentration detection device, the device comprising:
[0084] The first acquisition module is used to acquire the original spectrum of the laser after it is reflected by the gas to be measured;
[0085] The second acquisition module is used to obtain the intensity I of the absorption peak in the original spectrum. t and the intensity of no absorption peak I0;
[0086] The first calculation module is used to calculate the intensity difference I0-I between the non-absorption peak and the absorption peak. t The average value H0;
[0087] The second calculation module is used to calculate the intensity average value H1 of the absorption peak;
[0088] The detection module is used to input H0 and H1 into the constructed gas concentration detection model to detect the concentration of the gas to be tested.
[0089] In another embodiment, the present application further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute any of the methods described above.
[0090] In another embodiment, the present application further provides an electronic device, including:
[0091] A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein:
[0092] When the processor executes the program, any of the above methods is implemented.
[0093] The above general description of the invention involved in this application and the description of its specific implementation methods should not be understood as limiting the technical solutions of the invention. Based on the disclosure of this application, those skilled in the art can, without violating the constituent elements of the invention involved, add, reduce or combine the disclosed technical features in the above general description or / and specific implementation methods (including examples) to form other technical solutions within the scope of protection of this application.
Claims
1. A gas concentration detection method, characterized in that: The method comprises the following steps: S100: obtaining the original spectrum of the laser after being reflected by the gas to be measured; S200: Obtain the intensity I of the absorption peak in the original spectrum t and the intensity of no absorption peak I0; S300: Calculate the intensity difference I0-I between the non-absorption peak and the absorption peak t The average value H0; The intensity difference between the non-absorption peak and the absorption peak is I0-I t The average value H0 is shown as follows: , in, I t represents the intensity of the absorption peak in the original spectrum; I 0 represents the intensity of the non-absorption peak in the original spectrum, W represents the maximum width of the absorption peak, P represents the central wave number of the absorption peak; S400: Calculate the intensity average value H1 of the absorption peak; Step S400 includes the following steps: S401: Take N data in the intervals near the critical point A and the critical point B between the absorption peak and the non-absorption peak, where the interval near the critical point A is [PWN, PW], and the average intensity is recorded as I A , the interval near the critical point B is [PW, P-W+N], and the average intensity is recorded as I B , where P represents the central wave number of the absorption peak, and W represents the maximum width of the absorption peak; the intensity average value I within a certain interval between the absorption peak and the critical point A and the critical point B without absorption peak is calculated. A and I B ; S402: Based on I A and I B Calculate the intensity average H1 of the absorption peak; , and , , 500: inputting H0 and H1 into the constructed gas concentration detection model to detect the concentration of the gas to be tested; The gas concentration detection model is expressed as: A=a m y+b m and, and y= H0 / H 1, Among them, A represents the concentration of the gas to be measured, a m and b m All represent coefficients, m represents the coefficient number, and y represents the ratio of the average value H0 to the intensity average value H1.
2. A gas concentration detection device for implementing the method as claimed in claim 1, characterized in that: The device comprises: The first acquisition module is used to acquire the original spectrum of the laser after it is reflected by the gas to be measured; The second acquisition module is used to obtain the intensity I of the absorption peak in the original spectrum. t and the intensity of no absorption peak I0; The first calculation module is used to calculate the intensity difference I0-I between the non-absorption peak and the absorption peak. t The average value H0; The second calculation module is used to calculate the intensity average value H1 of the absorption peak; The detection module is used to input H0 and H1 into the constructed gas concentration detection model to detect the concentration of the gas to be tested.
3. A computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the method of claim 1.
4. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to claim 1 is implemented.
Citation Information
Patent Citations
Spectral method-based multi-component gas concentration analysis method
CN108287141A
Overlapping peak treatment method and device applied to chromatographic analysis
CN111337606A
Variable optical path NDIR (Non-Dispersive Infra-Red) wide-range gas detection method and system
CN114778475A
Method for the automated measurement of gas pressure and concentration inside sealed containers
US20100067012A1
