A gas concentration detection method of a second harmonic signal nonlinear fitting
By constructing a Voigt function model of the second harmonic signal and performing nonlinear fitting, the problems of signal drift and waveform distortion in gas detection were solved, achieving accurate measurement of gas concentration and improving system stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-29
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies for gas detection, the second harmonic signal is susceptible to temperature and pressure fluctuations and noise, leading to baseline drift and waveform distortion, which affects measurement accuracy and system stability.
A nonlinear fitting method was adopted. By constructing a Voigt function model of the second harmonic signal, and combining the Lorentz function and the Voigt function, the Levenberg-Marquardt algorithm was used to perform least squares fitting to eliminate signal drift and noise effects and obtain the gas concentration.
It achieves accurate fitting of the second harmonic signal, eliminates baseline drift and waveform distortion, improves the accuracy of gas detection and system stability, simplifies the concentration measurement process, and eliminates the need for pre-measurement and calibration of standard spectra.
Smart Images

Figure CN116625984B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of environmental optics, and more specifically to a method for detecting gas concentration by fitting second harmonic signals. Background Technology
[0002] When using laser spectroscopy for gas detection, the second harmonic signal is directly proportional to the concentration. However, due to temperature and pressure fluctuations, changes in the composition of the measured gas, and other factors, the measurement background changes, causing the second harmonic baseline to drift. Furthermore, noise and broadening can cause distortion of the second harmonic waveform, altering the peak value of the second harmonic at a fixed absorption center, leading to inaccurate measurements.
[0003] Currently, some scholars have conducted research on second harmonic fitting. For example, they have normalized the second harmonic using the first harmonic to eliminate the influence of the residual modulation amplitude. However, this method cannot solve the drift and distortion problems of the second harmonic signal. Another example is the design of a high-precision temperature control system to eliminate the influence of background signal drift and enhance the stability of the measurement system. However, in the actual measurement process, the factors that cause the drift and distortion of the second harmonic signal are complex and diverse, and cannot be completely solved by simply improving the system hardware. Summary of the Invention
[0004] In view of the shortcomings of existing technical methods, this invention proposes a gas concentration detection method based on nonlinear fitting of second harmonic signals, which aims to solve the problems of signal drift and signal deformation affecting measurement accuracy, eliminate baseline drift and reduce noise, thereby improving detection accuracy and ensuring the stability of the detection system.
[0005] The technical solution of the present invention to solve the above problems is as follows:
[0006] The gas concentration detection method based on nonlinear fitting of second harmonic signals, as described in this invention, is characterized by its application in a gas detection system comprised of a laser source, temperature and current controllers, a modulation signal generator, a reference channel, a measurement channel, a photodetector, a lock-in amplifier, and an embedded processor; wherein, a gas with a known concentration of N is introduced into the reference channel. ref The gas;
[0007] The modulation signal generator produces a modulation signal to modulate the wavelength of the laser source. Simultaneously, driven by the temperature and current controller, the laser source excites a modulated laser beam, which is split into two paths. The first path passes through the reference channel and reaches the photodetector. The photodetector outputs the first photoelectric signal to the lock-in amplifier, generating the second harmonic signal y at the i-th sampling position of the reference channel. ref (i);
[0008] The second path passes through the measurement channel and reaches the photodetector. The photodetector outputs the second photoelectric signal to the lock-in amplifier, generating the second harmonic signal y at the i-th sampling position of the measurement channel. gas (i); the embedded processor processes y according to the following procedure ref (i) and y gas (i) Perform nonlinear fitting:
[0009] Step 1: Based on the Lorentz shape, construct the Lorentz function model y of the second harmonic signal using equation (1). L (γ L ,v0,m,v):
[0010]
[0011] In equation (1), γ L Let v0 be the absorption center position corresponding to the maximum value of the second harmonic signal, m be the modulation coefficient, and v be the frequency sequence of the second harmonic signal. To widen the normalized modulation coefficients by Lorentz, The Lorentz-widened normalized frequency is given; M is the first modulation frequency factor, and R is the second modulation frequency factor, and
[0012] The Voigt function model y of the second harmonic signal is constructed using equation (2). V (γ L ,γ G ,v0,m,v):
[0013]
[0014] In equation (2), * denotes convolution, and γ G To widen the full height and half width for collisions;
[0015] The functional expression y of the second harmonic signal is obtained using equation (3). 2f (v):
[0016] y 2f (v)=NS(T)PLy V (3)
[0017] In equation (3), N is the gas concentration, T represents the temperature, S(T) is the absorption line intensity, P is the measurement pressure, and L is the effective optical path.
[0018] Step 3: For y ref (i) Fitting:
[0019] Initialize the Voigt function model y V (γL ,γ G The four parameters of the reference channel (v0,m,v) include: initialization γ L For y ref (i) is Δ times the full width at half maximum (FWHM); Δ ∈ (0.5, 1); initialize γ G =γ L Initialize v0 to y ref The sequence position corresponding to the maximum value of (i); initialize m to y ref (i) The ratio of the peaks to the troughs;
[0020] The Levenberg-Marquardt algorithm is used in conjunction with the Voigt function model y. V (γ L ,γ G ,v0,m,v), for y ref (i) Perform least-squares nonlinear fitting to obtain the best-fit values (γ) of the four parameters after fitting the reference channel. L-fit ,γ G-fit ,v 0-fit ,m fit ) ref ; where γ L-fit γ represents the full height half-width after Lorentz broadening following the fitting. G-fit The fitted collision-expanded full height half-width, v 0-fit Indicates the location of the absorption center after fitting, m fit This represents the fitted modulation coefficients;
[0021] Step 4: For y gas (i) Fitting:
[0022] Initialize the Voigt function model y V (γ L ,γ G For the four parameters of the measurement channel (v0,m,v), including initialization γ, ... L For y gas (i) is Δ times the full width at half maximum (FWHM); Δ ∈ (0.5, 1); initialize γ G =γ L Initialize v0 to y gas The sequence position corresponding to the maximum value of (i); initialize m to y gas (i) The ratio of the peaks to the troughs;
[0023] The Levenberg-Marquardt algorithm is used in conjunction with the Voigt function model y. V (γ L ,γ G ,v0,m,v), for y gas(i) Perform least-squares nonlinear fitting to obtain the best-fit values (γ′) of the four parameters after fitting the measurement channel. L-fit ,γ′ G-fit ,v′ 0-fit ,m′ fit ) gas ;wherein, γ′ L-fit γ′ represents the full height half-width after Lorentz expansion following the fitting. G-fit v′ represents the full height and half width of the fitted collision-expanded area. 0-fit Indicates the location of the absorption center after fitting, m′ fit This represents the fitted modulation coefficients;
[0024] Step 4: Find the best-fit parameters (γ) for the four parameters after fitting the reference channel and the measurement channel respectively. L-fit ,γ G-fit ,v 0-fit ,m fit ) ref With (γ′) L-fit ,γ′ G-fit ,v′ 0-fit ,m′ fit ) gas Substituting into equation (3), the maximum second harmonic value S of the reference channel is obtained accordingly. ref and the maximum value of the second harmonic of the measurement channel S gas ;
[0025] Step 5: Calculate the gas concentration in the detection channel.
[0026] The present invention provides an electronic device, including a memory and a processor, wherein the memory is used to store a program that supports the processor in executing the gas concentration detection method, and the processor is configured to execute the program stored in the memory.
[0027] The present invention discloses a computer-readable storage medium on which a computer program is stored, wherein the computer program is executed by a processor to perform the steps of the gas concentration detection method.
[0028] Compared with existing technologies, the beneficial effects of this invention are reflected in:
[0029] 1. In this invention, by constructing a Voigt linear function model of the second harmonic signal, nonlinear fitting of the measured second harmonic signal is achieved, resulting in a standard second harmonic signal. This eliminates the influence of signal drift and distortion on the accuracy of concentration measurement and improves the long-term stability of the gas detection system.
[0030] 2. In this invention, the optimal fitting parameters are obtained by linear fitting of the second harmonic signal, and then the gas concentration is obtained. There is no need to measure the standard spectrum beforehand, and the concentration can be obtained directly after fitting without calibration. The method is simple and accurate. Attached Figure Description
[0031] Figure 1 This is a flowchart of the second harmonic signal fitting gas detection system in an embodiment of the present invention;
[0032] Figure 2 This is a flowchart of a Voigt linear nonlinear fitting method for a second harmonic signal according to the present invention.
[0033] Figure 3 The second harmonic signals before and after fitting;
[0034] Figure 4 The figures show the concentration before and after correction in an embodiment of the present invention. Detailed Implementation
[0035] In this embodiment, see Figure 1 The second harmonic fitting gas detection system includes: a laser source 1, a temperature and current controller 2, a modulation signal generator 3, a reference channel 4, a photodetector 5, a lock-in amplifier 6, a measurement channel 7, a photodetector 8, a lock-in amplifier 9, and an embedded processor 10.
[0036] Laser source 1 is driven by laser source temperature and current controller 2. Modulation signal generator 3 generates a modulation signal which is input to laser source 1 for wavelength modulation. The output beam of laser source 1 is split into two paths. The first path passes through reference channel 4 and then reaches photodetector 5. A known concentration of N is introduced into the reference channel. ref The gas, photodetector 5 outputs photoelectric signal to lock-in amplifier 6, thereby generating the second harmonic signal y of the reference channel at the i-th sampling position. ref (i) The second path, after passing through the measurement channel, reaches the photodetector 8. The photodetector 8 outputs a photoelectric signal to the lock-in amplifier 9, thereby generating the second harmonic signal y at the i-th sampling position of the measurement channel. gas (i), y ref (i) and y gas (i) Transmitted to the embedded processor 10.
[0037] See Figure 2 A gas concentration detection method based on nonlinear fitting of second harmonic signals is applied to the aforementioned gas detection system. This second harmonic nonlinear fitting method is performed according to the following steps:
[0038] Step 1: Based on the Lorentz shape, construct the Lorentz function model y of the second harmonic signal using equation (1). L(γ L ,v0,m,v):
[0039]
[0040] In equation (1), γ L Let v0 be the absorption center position corresponding to the maximum value of the second harmonic signal, m be the modulation coefficient, and v be the frequency sequence of the second harmonic signal. To widen the normalized modulation coefficients by Lorentz, The Lorentz broadened normalized frequency is given; M is the frequency factor 1, and R is the frequency factor 2, and
[0041] The Voigt function model y of the second harmonic signal is constructed using equation (2). V (γ L ,γ G ,v0,m,v):
[0042]
[0043] In equation (2), * denotes convolution, and γ G To accommodate collisions, the full height and half width are widened.
[0044] The functional expression y of the second harmonic signal is obtained using equation (3). 2f (v):
[0045] y 2f (v)=NS(T)PLy V (3)
[0046] In equation (3), N is the gas concentration, T represents the temperature, S(T) is the absorption line intensity, P is the measurement pressure, and L is the effective optical path.
[0047] Step 3: For y ref (i) Perform fitting and initialize the Voigt function model y. V (γ L ,γ G The four parameters in (v0, m, v) include: initialization γ L For y ref (i) is Δ times the full width at half maximum (FWHM); Δ ∈ (0.5, 1); initialize γ G =γ L Initialize v0 to y ref The sequence position corresponding to the maximum value of (i); initialize m to y ref (i) The ratio of the peaks to the troughs;
[0048] The Levenberg-Marquardt algorithm is used in conjunction with the Voigt function model y. V (γ L ,γ G ,v0,m,v), for y ref (i) Perform least-squares nonlinear fitting to obtain the best-fit values (γ) of the four parameters after fitting the reference channel. L-fit ,γ G-fit ,v 0-fit ,m fit ) ref ; where γ L-fit Represents the fitted γ L γ G-fit Represents the fitted γ G v 0-fit Represents the fitted v0, m fit This represents the fitted m;
[0049] Step 4: For y gas (i) Perform fitting and initialize the Voigt function model y. V (γ L ,γ G The four parameters in (v0, m, v) include: initialization γ L For y gas (i) is Δ times the full width at half maximum (FWHM); Δ ∈ (0.5, 1); initialize γ G =γ L Initialize v0 to y gas The sequence position corresponding to the maximum value of (i); initialize m to y gas (i) The ratio of the peaks to the troughs;
[0050] The Levenberg-Marquardt algorithm is used in conjunction with the Voigt function model y. V (γ L ,γ G ,v0,m,v), for y gas (i) Perform least-squares nonlinear fitting to obtain the best-fit values (γ′) of the four parameters after fitting the measurement channel. L-fit ,γ′ G-fit ,v′ 0-fit ,m′ fit ) gas ;wherein, γ′ L-fit Represents the fitted γ L , γ′ G-fit Represents the fitted γ G , v′ 0-fit Represents the fitted v0, m′ fit This represents the fitted m;
[0051] Step 4: Find the best-fit parameters (γ) for the four parameters after fitting the reference channel and the measurement channel respectively. L-fit ,γ G-fit ,v 0-fit ,m fit ) ref With (γ′) L-fit ,γ′ G-fit ,v′ 0-fit ,m′ fit ) gas Substituting into equation (3), we obtain the standard second harmonic signal of the reference channel and the maximum value S of the reference channel signal. ref The standard second harmonic signal of the measurement channel, and the maximum value S of the measurement channel signal. gas ;
[0052] Step 5: Calculate the gas concentration in the detection channel.
[0053] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing the above-described method, and the processor is configured to execute the program stored in the memory.
[0054] In this embodiment, a computer-readable storage medium stores a computer program, which is executed by a processor to perform the steps of the above method.
[0055] To verify the effectiveness of the method described in this invention, an experiment was conducted using the established second harmonic fitting gas detection system. The modulation frequency of the modulation signal generator was set to 20 kHz, the acquisition frequency of the embedded processor was set to 800 kHz, and the measurement path used a 10 m multi-reflection cell. The carbon dioxide concentration was sealed within the cell at approximately 200 ppm for measurement. The results before and after fitting using the method described in this invention are shown in the figure below. Figure 3 As shown, the fitting process eliminated baseline drift and waveform distortion, yielding a standard second harmonic signal. To further verify the impact of the method described in this invention on the accuracy of concentration inversion calculations, continuous measurements were performed on a fixed concentration of 200 ppm carbon dioxide. The measurement results are as follows: Figure 4 As shown, the standard deviation after broadening correction is 0.0455, and the standard deviation without considering the broadening effect is 0.0104. The experimental results prove that the method provided by the present invention can effectively eliminate baseline drift and waveform distortion of the second harmonic signal, effectively improve the accuracy of gas concentration measurement, and improve the stability of the system.
Claims
1. A gas concentration detection method using nonlinear fitting of a second harmonic signal, characterized in that, It is applied in a gas detection system consisting of a laser source, temperature and current controllers, a modulation signal generator, a reference channel, a measurement channel, a photodetector, a lock-in amplifier, and an embedded processor; wherein, a gas with a known concentration of N is introduced into the reference channel. ref The gas; The modulation signal generator produces a modulation signal to modulate the wavelength of the laser source. Simultaneously, driven by the temperature and current controller, the laser source excites a modulated laser beam, which is split into two paths. The first path passes through the reference channel and reaches the photodetector. The photodetector outputs the first photoelectric signal to the lock-in amplifier, generating the second harmonic signal y at the i-th sampling position of the reference channel. ref (i); The second path, after passing through the measurement channel, reaches the photodetector. The photodetector outputs the second photoelectric signal to the lock-in amplifier, generating the second harmonic signal y at the i-th sampling position of the measurement channel. gas (i); the embedded processor processes y according to the following procedure ref (i) and y gas (i) Perform nonlinear fitting: Step 1: Based on the Lorentz shape, construct the Lorentz function model of the second harmonic signal using equation (1). : (1) In equation (1), To widen the full height and half width of Lorenz, Let m be the absorption center location corresponding to the maximum value of the second harmonic signal, m be the modulation coefficient, and v be the frequency sequence of the second harmonic signal. To widen the normalized modulation coefficients by Lorentz, To broaden the normalized frequency for Lorentz; Let be the first modulation frequency factor, and , It is the second modulation frequency factor, and ; Construct the Voigt function model of the second harmonic signal using equation (2). : (2) In equation (2), It is a Lorentz linear function. Represents convolution. To widen the full height and half width for collisions; The functional expression of the second harmonic signal is obtained using equation (3). : (3) In equation (3), N is the gas concentration, T represents the temperature, S(T) is the absorption line intensity, P is the measurement pressure, and L is the effective optical path. Step 3: For y ref (i) Fitting: Initialize the Voigt function model The four parameters for the reference channel include: initialization For y ref (i) is Δ times the full width and height of the half-height; Δ ∈ (0.5, 1); initialize = ;initialization For y ref The sequence position corresponding to the maximum value of (i); initialize m to y ref (i) The ratio of the peaks to the troughs; The Levenberg-Marquardt algorithm is used in conjunction with the Voigt function model. , for y ref (i) Perform least-squares nonlinear fitting to obtain the best-fit values of the four parameters after fitting the reference channel. ;in, This indicates the full height and half width of the fitted Lorentz broadened shape. This indicates the full height and half width of the fitted collision width. This indicates the location of the absorption center after fitting. This represents the fitted modulation coefficients; Step 4: For y gas (i) Fitting: Initialize the Voigt function model For the four parameters of the measurement channel, including: initialization For y gas (i) is Δ times the full width and height of the half-height; Δ ∈ (0.5, 1); initialize = ;initialization For y gas The sequence position corresponding to the maximum value of (i); initialize m to y gas (i) The ratio of the peaks to the troughs; The Levenberg-Marquardt algorithm is used in conjunction with the Voigt function model. , for y gas (i) Perform least-squares nonlinear fitting to obtain the best-fit values of the four parameters after fitting the measurement channel. ;in, This indicates the full height and half width of the fitted Lorentz broadened shape. This indicates the full height and half width of the fitted collision width. This indicates the location of the absorption center after fitting. This represents the fitted modulation coefficients; Step 4: Find the best-fit parameters for the four parameters after fitting the reference channel and the measurement channel respectively. and Substituting into equation (3), the maximum second harmonic value S of the reference channel is obtained accordingly. ref And the maximum value of the second harmonic of the measurement channel S gas ; Step 5: Calculate the gas concentration in the detection channel. .
2. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports the processor in executing the gas concentration detection method of claim 1, and the processor is configured to execute the program stored in the memory.
3. A computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to perform the steps of the gas concentration detection method of claim 1.
Citation Information
Patent Citations
Method for extracting low-concentration signals of laser gas analyzer
CN102914515A