Gas detection device and method with near-infrared band decoupling and harmonic two-dimensional features
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA JILIANG UNIV
- Filing Date
- 2026-03-02
- Publication Date
- 2026-06-16
Smart Images

Figure CN122217907A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gas detection technology, and in particular to a gas detection device and method based on near-infrared spectral band decoupling and harmonic two-dimensional characteristics. Background Technology
[0002] In the field of gas detection, the detection of complex hydrocarbon gases (ethane, ethylene, propane, etc.) is one of the core technologies for ensuring the safety monitoring of critical equipment in the energy, chemical, power and semiconductor industries. It is of great significance for the safe operation of major infrastructure such as refining plants, gas pipelines and substations.
[0003] 1) In the measurement of complex alkane gases, current detection schemes based on the mid-infrared band face technical challenges such as insufficient long-term device stability, easy mode jumping of lasers, and high detector noise. Furthermore, core components (especially key light sources and detectors) rely on imports, resulting in high costs and limiting their large-scale application in industrial settings. In contrast, the near-infrared band utilizes mature semiconductor lasers and InGaAs detectors, offering advantages in both device reliability and cost. However, existing near-infrared detection schemes still largely rely on conventional harmonic demodulation (such as 2...). f The amplitude) combined with empirical multi-peak fitting lacks a unified algorithmic closed-loop constraint for the "evolution of spectral cluster structure, peak candidate update and threshold adaptation" of vibrational-rotational spectral bands under weak absorption and strong overlap conditions, making it difficult to stably separate each component and achieve transferable calibration and tracing.
[0004] 2) While the near-infrared band offers advantages in device maturity and cost, hydrocarbon molecules often exhibit complex vibrational-rotational coupled spectral structures with weak absorption. This results in severe overlap between the target absorption spectrum and interference spectra, limiting system detection sensitivity and exacerbating multi-component cross-interference. Existing methods generally employ single-line (or empirically degenerate Voigt / Lorentz) and peak-by-peak nonlinear least-squares optimization, which is susceptible to peak assignment uncertainty, incomplete prior knowledge, and overfitting. Under multi-source perturbations, the response of single-dimensional harmonic features to "peak cluster merging and sub-spectral line cluster shifts" lacks identifiable topological constraints, leading to insufficient decoupling robustness and amplified quantization bias, making it difficult to support long-term online monitoring and cross-condition reuse. Furthermore, inversion relying solely on harmonic amplitude is sensitive to multiplicative drift in light intensity, coupling efficiency, and detection gain, causing ill-conditioned amplitude-concentration mapping under strong overlap conditions, further reducing online stability. Summary of the Invention
[0005] To overcome the shortcomings of the prior art, the present invention aims to provide a gas detection device and method with near-infrared spectral decoupling and harmonic two-dimensional features, which can improve the stability, consistency and traceability of gas concentration inversion results, and improve the sensitivity and cross-interference suppression of complex alkane gases in the near-infrared band. It has the advantages of low cost, easy engineering deployment and easy maintenance.
[0006] This invention employs the following technical solution: a gas detection device with near-infrared spectral band decoupling and harmonic two-dimensional characteristics, comprising a front-end detection module and a back-end processing and control module. The front-end detection module includes a laser control and modulation unit, a near-infrared laser source, a multi-pass gas cell, a detector and preamplifier unit, and a synchronous acquisition and analog-to-digital conversion unit. The near-infrared laser source outputs near-infrared scanning light. The laser control and modulation unit is connected to the near-infrared laser source and dynamically modulates the near-infrared scanning light output by the near-infrared laser source, loading modulation depth information in real time. The multi-pass gas cell is positioned between the near-infrared laser source and the detector and preamplifier unit. The detector and preamplifier unit convert the transmitted light absorbed by the multi-pass gas cell into an electrical signal. The synchronous acquisition and analog-to-digital conversion unit is positioned between the detector and preamplifier unit and the back-end processing and control module. The synchronous acquisition and analog-to-digital conversion unit acquires and converts the electrical signal into an analog signal, and outputs the signal to the back-end processing and control module. The back-end processing and control module is also connected to the laser control and modulation unit and outputs control signals to the laser control and modulation unit.
[0007] In the operation of the gas detection device with near-infrared spectral decoupling and harmonic two-dimensional characteristics, the near-infrared scanning light output from the near-infrared laser source is modulated by the laser control and modulation unit and then enters the multi-pass gas cell. The gas to be measured is introduced into the multi-pass gas cell, and the transmitted light is absorbed by the multi-pass gas cell. The detector and the preamplifier unit measure and convert the light into an electrical signal. The synchronous acquisition and analog-to-digital conversion unit completes the synchronous sampling and analog-to-digital conversion to obtain a digital sequence of absorption spectra containing overlapping spectral band information. At the same time, the device also completes the synchronous acquisition and recording of information such as temperature T, pressure P, equivalent optical path L, timestamp, modulation phase, and scanning coordinates. The data is then sent to the back-end processing and control module.
[0008] The back-end processing and control module includes a spectral band multi-peak decoupling unit, a 2f extraction unit, a two-dimensional peak state construction unit, an online optimization and modulation control unit, a cross-interference calculation and compensation unit, and a concentration calculation unit. The gas detection method based on near-infrared spectral band decoupling and harmonic two-dimensional characteristics, using the aforementioned near-infrared spectral band decoupling and harmonic two-dimensional characteristic gas detection device, includes the following steps: Step 1: First, the multi-peak decoupling unit of the spectral band is used to perform multi-peak fitting and cluster merging on the overlapping spectral bands obtained by the gas detection device that exhibit a continuous envelope shape under normal pressure due to the complexity of molecular energy levels, based on the parameterized line shape L(·), to obtain an updated peak candidate set. The peak candidate set includes a discrete spectral line parameter set {ν0,S,γ} with a spectral line cluster structure, where the adjacent peak distance threshold δν is the threshold for multi-peak fitting and cluster merging, ν0 is the spectral line center frequency / wavenumber, S is the line intensity / area, and γ is the full width at half maximum (FWHM) / broadening parameter. Step 2: Subsequently, the second harmonic 2f is obtained by phase-locked demodulation using the 2f extraction unit. Step 3: Using the aforementioned two-dimensional peak-state construction unit, construct peak-state contour lines in the wavelength-modulation depth two-dimensional feature space (λ,m) and extract the peak position-modulation trajectory Γ, the stable point p*, and the separability index. D ; Step 4: Use the online optimization and modulation control unit described above to obtain the optimal modulation depth online with the objective function. m* It also sends back laser control and modulation unit modulation drive in real time to improve harmonic signal-to-noise ratio and inter-peak separability; Step 5: While working in Step 4, the aforementioned cross-interference calculation and compensation unit is used to introduce a peak position offset that is approximately insensitive to amplitude multiplicative drift within the two-dimensional peak stability interval. Δx m As a self-calibrated observable, it is used to invert the interference intensity ratio β and generate compensation weights, thereby improving the identifiability and convergence stability of the inversion under conditions of strong overlap and amplitude drift. The cross-interference calculation and compensation unit utilizes the peak position shift of the stable point. Δx m Estimate the interference intensity ratio β and generate the residual-weight-compensation matrix W(β), and apply weighting and compensation to the concentration calculation unit; Step 6: The concentration calculation unit is used to calculate the concentration of the spectral parameters {ν0, S, γ} and the compensated second harmonic 2. f The concentrations of each gas component are jointly solved, and consistency and residual checks are performed; if the fitting residual e or the optimal modulation depth is found... m* If the process is unstable, the concentration calculation unit feeds back the residual-weight-compensation matrix W(β), the fitting residual e, the weights, and the adjacent peak distance threshold δν to the multi-peak decoupling unit of the spectrum for re-initialization and to enter the next iteration; after convergence, the gas concentration is output.
[0009] Furthermore, step 1 specifically includes the following steps: Step 11: Construct an initial value space based on physical constraints; the initial values and boundaries of the peak candidates (i.e., the initial spectral line parameter estimates) are obtained from the line table or cross-section database, and are converted according to the current temperature T, pressure P and equivalent optical path L; when the line-by-line data in the database is missing or insufficient to describe the actual observed broadband absorption, the equivalent cross-section is used to approximate the equivalent peak candidates in the target band. Step 12: Nonlinear fitting solution; the parameter solution uses nonlinear least squares estimation of the spectral parameter set {ν0, S, γ} with physical boundaries. During this process, physical constraints are applied to the peak candidate parameters (the above spectral parameters) to avoid non-physical divergence of the solution: constraints S≥0, γ≥γ min ν0 is constrained within the candidate window, where γ minAn empirical lower bound is given by the instrument resolution and minimum pressure broadening; Step 13: Establish a feedback-based spectral cluster structure; initially, adjacent peaks are clustered using the adjacent peak spacing threshold δν or peak overlap criterion, and a unified spectral cluster label is assigned to the group of spectral lines after merging; after receiving the distribution characteristics of the fitting residual in the wavelength domain from the feedback in Step 6, for band regions where the fitting residual is higher than the preset value, the adjacent peak spacing threshold δν in that region is reduced to trigger spectral cluster splitting; for regions where the parameters do not converge but the residual is low, the adjacent peak spacing threshold δν is increased to trigger spectral cluster merging; the intra-cluster integral intensity is always maintained during the splitting or merging process; after residual statistical characteristics are determined, spectral clusters are dynamically split or merged, while maintaining the intra-cluster integral intensity conservation: the overall cluster line intensity is added by area, the cluster center position ν0 is taken as the weighted average of the line intensity, and the cluster broadening γ is taken as the weighted or equivalent broadening; Step 14: Suppress overfitting and redundant peaks; Select the model order by combining the multi-peak decoupling unit of the spectrum with the information criterion: use the sum of squared residuals E and its change ΔE and the parameter increment norm as convergence criteria; Perform white noise and autocorrelation tests on the residuals; Step 15: Output quality assessment; approximate covariance Σ of the final output parameters of the multi-peak decoupling unit and the fitting quality index Q. fit This serves as the basis for subsequent weight allocation and error propagation; when Q fit When the value is below the threshold, return the candidate update δν to trigger refitting.
[0010] Furthermore, step 2 specifically includes the following steps: The 2f extraction unit synchronously demodulates the transmitted light intensity signal acquired and digitized by the front-end detection module to obtain the second harmonic component 2f; the demodulation is achieved by digital phase-locked loop, which completes phase-sensitive detection and low-pass filtering according to the modulation frequency and sampling timing, so that the output 2f is registered with the wavelength / wavenumber coordinates one by one. The 2f extraction unit reconstructs and fits the absorbance spectrum from the discrete spectral line parameter set {ν0,S,γ} output by the multi-peak decoupling unit, and then demodulates it to obtain the second harmonic component 2f. Based on the fitting quality index Q output in step 15... fit The weights of the direct demodulation results and the reconstructed demodulation results are adjusted adaptively based on their relative values, or a selective switching is performed.
[0011] Furthermore, step 3 specifically includes the following steps: Step 31: The two-dimensional peak state construction unit is located in the harmonic-modulation two-dimensional characteristic space (λ, m), with wavelength λ and wave number or frequency number ν as the horizontal axis and modulation depth as the vertical axis. m Using the vertical axis as the coordinate axis, multiple modulation depths are considered. m The second harmonic component 2 f The curves are stacked to form a two-dimensional kurtosis distribution. S 2f(λ,m) or S 2f Contour lines or isopleth maps of (ν,m); Step 32: Extract the peak position-modulation trajectory Γ and the stable point by searching for the global or local extrema of the second harmonic component 2f in the harmonic-modulation two-dimensional feature space. p* Where the peak position-modulation trajectory Γ represents the second harmonic component 2. f Extreme values vary with modulation depth m Change path, stable point p* This refers to dΓ / dm≈0 and d 2 Γ / dm 2 The neighborhood center of >0; Step 33: Based on this, further extract the peak position shift Δ x m Based on the degree of overlap between the target spectral line cluster and the interfering spectral line cluster on the two-dimensional contour lines, the separability index is calculated. D ; Extracted Γ, p *、Δ x m and D This serves as a criterion for subsequent online modulation optimization and cross-interference compensation.
[0012] Furthermore, step 4 specifically includes the following steps: using an online optimization and modulation control unit to online determine the optimal modulation depth with the objective function J(m). m * and sends the data to the laser control and modulation unit in the front-end detection module; when the statistically detected peak spacing or spectral line cluster structure changes significantly, the online optimization and modulation control unit determines the optimal configuration based on the latest peak position-modulation trajectory Γ and the separability index. D Based on the distribution of the peaks, the system adaptively provides an update suggestion for the adjacent peak distance threshold δν, and feeds it back to the multi-peak decoupling unit for the next round of cluster merging and parameter initial setting.
[0013] Furthermore, step 5 specifically includes the following steps: Step 51: First, use the cross-interference calculation and compensation unit at the optimal modulation depth. m Within a small neighborhood, confined to a two-dimensional peak stability region, the stable point p* of the 2f peak position of the target spectral line cluster is read from the two-dimensional harmonic-modulation feature space, and its peak position offset relative to the device calibration reference peak position is calculated. Δx m Peak position offset is defined along the wavelength λ and wavenumber / frequency ν directions. Δx m This reflects characteristic 2 under the current spectral line cluster composition and the presence of interfering gases. f Overall drift of the peak position relative to the reference; Step 52: Then, using the cross-interference calculation and compensation unit, the peak position shift is calculated based on the monotonic mapping relationship established in advance during the gas detection device calibration stage. Δx m The inversion yields the interference intensity ratio β, obtaining the intensity contribution of the interference component relative to the target component under the current operating conditions. This monotonic mapping is obtained by fitting a standard gas experiment with known concentrations and remains approximately monotonic within the normal operating range, facilitating the determination of the interference intensity ratio β during online operation. Step 53: Next, the calculated interference intensity ratio β is written into the residual-weight-compensation matrix W(β) by frequency point or by spectral line cluster using the cross-interference calculation and compensation unit. For the case of cluster compensation, the weights are normalized and allocated within each spectral line cluster according to the proportion of the line intensity S of each frequency point. The residual-weight-compensation matrix W(β) is synchronously fed back into the spectral band multi-peak decoupling unit as the basis for updating the frequency point weights and initial values, so that the compensation results participate in the next round of refitting and decoupling, thereby forming a coupling closed loop. Step 54: When the two-dimensional kurtosis separability index D When the peak position shift is below the preset separability threshold, or when the peak position trajectory shows significant instability, the peak position offset is adjusted. Δx m Robust statistical processing is performed to remove obvious outliers and limit extreme offsets, retaining only statistically stable offsets for inverting the interference intensity ratio β, thereby improving the reliability of the compensation results; if necessary, the update amplitude of the residual-weight-compensation matrix W(β) is reduced or the current update of the interference intensity ratio β is paused to avoid introducing weight oscillations under kurtosis conditions. Step 55: Finally, with the optimal modulation depth m The update of * synchronously refreshes the current effective compensation frequency band and the weight coefficients of the corresponding frequency band in W(β), so that the compensation range matches the actual modulation coverage of the spectral range; the 2f data after W(β) weighted compensation is sent to the concentration calculation unit to solve the concentration of the target gas and the interfering gas; if the fitting residual decreases after compensation and the fitting quality index improves, the current interference intensity ratio β and the residual-weight-compensation matrix W(β) are retained, and the statistical results of the residual after compensation are fed back to the spectral multi-peak decoupling unit for adaptive adjustment of the peak candidate set and the adjacent peak distance threshold δν, and used as the initial weight for the next round of multi-peak fitting.
[0014] Furthermore, step 6 specifically includes the following steps: Step 61: The concentration calculation unit calculates the spectral parameters {ν0,S,γ} obtained by the multi-peak decoupling unit and the compensated second harmonic 2 output by the cross-interference calculation and compensation unit. f The data were analyzed using nonlinear least squares or equivalent optimization methods to determine the concentrations of each component, and residual statistics and consistency checks were performed. Step 62: Let E be the sum of squared residuals of the current iteration, ΔE be the change in residuals between two adjacent iterations, and Δm* be the change in optimal modulation depth between two adjacent iterations. When |ΔE| and |Δm*| reach the convergence threshold, output the gas concentration. Step 63: If convergence is not achieved, the update suggestions of the residual-weight-compensation matrix W(β), the fitting residual, the weights and the adjacent peak distance threshold δν are fed back to the multi-peak decoupling unit and the online optimization and modulation control unit until convergence is achieved. After convergence, the gas concentration is output.
[0015] Furthermore, the higher the harmonic signal-to-noise ratio, the better the two-dimensional separability index. D The larger the peak and the more stable the peak shape, the better the evaluation result indicated by the objective function J(m).
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. The gas detection device and method based on near-infrared spectral decoupling and harmonic two-dimensional features of the present invention can reduce cross-interference error and overfitting risk, and improve the stability, consistency and traceability of gas concentration inversion results under conditions such as weak absorption, strong overlap and slight drift of temperature / pressure and modulation parameters, based on interference intensity ratio estimation and matrix closed-loop compensation in the two-dimensional peak stable interval.
[0017] 2. The gas detection device and method for near-infrared spectral band decoupling and harmonic two-dimensional characteristics of the present invention rely on mature near-infrared semiconductor lasers and InGaAs detection links. It does not require the addition of special hardware or changes to the optical path structure. It only achieves the improvement of sensitivity and cross-interference suppression for complex alkane gases in the near-infrared band by realizing closed-loop control of "online optimization of modulation parameters - update of compensation matrix - re-decoupling / refitting of spectral bands" through software. It has the advantages of low cost, easy engineering deployment and easy maintenance, and can meet the needs of industrial environment measurement while taking into account system cost and stability. Attached Figure Description
[0018] Figure 1 This is a connection and flowchart of the gas detection device and method for near-infrared spectral band decoupling and harmonic two-dimensional features of the present invention; Figure 2 This is a schematic diagram of the spectrum of the present invention when used for the detection of complex hydrocarbon gases; Figure 3 This is a schematic diagram of the near-infrared banding mechanism and multi-peak decoupling principle of the multi-peak decoupling unit in this invention; Figure 4 This is a schematic diagram of the Lorentz line fitting of the ethane spectrum band by the multi-peak decoupling unit in this invention; Figure 5 This is a schematic diagram of the second harmonic peak shift when a single-component spectral line is superimposed onto a multi-component spectral line cluster in this invention.
[0019] In the figure: Laser control and modulation unit 11, near-infrared laser source 12, multi-pass gas cell 13, detector and preamplifier unit 14, synchronous acquisition and analog-to-digital conversion unit 15, spectral multi-peak decoupling unit 21, 2f extraction unit 22, two-dimensional peak state construction unit 23, online optimization and modulation control unit 24, cross-interference calculation and compensation unit 25, concentration calculation unit 26. Detailed Implementation
[0020] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.
[0021] The purpose of this invention is to address the shortcomings of existing technologies by providing a gas detection device and method based on near-infrared spectral decoupling and harmonic two-dimensional characteristics.
[0022] Example 1 The gas detection device with near-infrared spectral decoupling and harmonic two-dimensional characteristics provided in this embodiment refers to... Figure 1 As shown, the system includes a front-end detection module and a back-end processing and control module. The front-end detection module includes a laser control and modulation unit 11, a near-infrared laser source 12, a multi-pass gas cell 13, a detector and pre-amplifier unit 14, and a synchronous acquisition and analog-to-digital conversion unit 15. The near-infrared laser source 12 is used to output near-infrared scanning light. The laser control and modulation unit 11 is connected to the near-infrared laser source 12 and is used to modulate the near-infrared scanning light output by the near-infrared laser source 12. The multi-pass gas cell 13 is disposed between the near-infrared laser source 12 and the detector and pre-amplifier unit 14. In this embodiment... The multi-pass gas cell 13 can be a multi-pass cell. The detector and preamplifier unit 14 are used to convert the transmitted light absorbed by the multi-pass gas cell 13 into an electrical signal. The synchronous acquisition and analog-to-digital conversion unit 15 is located between the detector and preamplifier unit 14 and the back-end processing and control module. The synchronous acquisition and analog-to-digital conversion unit 15 is used to acquire and convert the electrical signal into an analog signal, and output the signal to the back-end processing and control module. The back-end processing and control module is also connected to the laser control and modulation unit 11, and is used to output control signals (including the optimal modulation depth) to the laser control and modulation unit 11. m*The near-infrared laser source 12 operates in the target wavelength band (e.g., around 1683nm). After modulation in the near-infrared band, the near-infrared laser source 12 emits near-infrared scanning light. The laser control and modulation unit 11 modulates the near-infrared laser source 12 under the drive of the scanning signal superimposed with a high-frequency modulation signal. The initial value of the modulation depth of the laser control and modulation unit 11 is... m0 It is issued by the backend processing and control module.
[0023] In this embodiment, the near-infrared spectral decoupling and harmonic two-dimensional feature gas detection device operates by having the near-infrared scanning light output from the near-infrared laser source 12 modulated by the laser control and modulation unit 11 and then entering the multi-pass gas cell 13. The gas to be tested is introduced into the multi-pass gas cell 13, and the transmitted light is absorbed by the multi-pass gas cell 13. The light is then measured by the detector and the preamplifier unit 14 and converted into an electrical signal. The synchronous acquisition and analog-to-digital conversion unit 15 completes the synchronous sampling and analog-to-digital conversion to obtain a digital sequence of absorption spectra containing overlapping spectral band information. The device also synchronously acquires and records information such as temperature T, pressure P, equivalent optical path L, timestamp, modulation phase, and scanning coordinates, and then sends the data to the back-end processing and control module.
[0024] Reference Figure 1 - Figure 2 As shown, the back-end processing and control module includes a spectral band multi-peak decoupling unit 21, a 2f extraction unit 22, a two-dimensional peak state construction unit 23, an online optimization and modulation control unit 24, a cross-interference calculation and compensation unit 25, and a concentration calculation unit 26. The gas detection method based on near-infrared spectral band decoupling and harmonic two-dimensional features uses the aforementioned near-infrared spectral band decoupling and harmonic two-dimensional feature gas detection device. As a closed-loop iterative system, it includes the following steps: Step 1: The multi-peak decoupling unit 21 first performs multi-peak fitting and cluster merging on the overlapping spectral bands obtained by the gas detection device, which exhibit a continuous envelope shape under normal pressure due to the complexity of molecular energy levels, based on the parameterized line shape L(·). According to the adjacent peak distance threshold δν of the multi-peak fitting and cluster merging (dynamically adjusted in the iteration), the updated peak candidate set is obtained. The peak candidate set includes a discrete spectral line parameter set {ν0,S,γ} with a spectral line cluster structure, where ν0 is the spectral line center frequency / wavenumber, S is the line intensity / area, and γ is the full width at half maximum / broadening parameter. Step 2: Subsequently, the 2f extraction unit 22 performs phase-locked demodulation to obtain the second harmonic 2. f (Optional 2) f / 1 f (Normalization), in this process, the fitting quality index Q can be used as a reference. fit Adaptive selection of direct demodulation or demodulation based on reconstructed fitted spectrum is used to achieve a balance between signal-to-noise ratio and signal fidelity; Step 3: The two-dimensional peak state construction unit 23 constructs peak state contour lines in the wavelength-modulation depth two-dimensional feature space (λ,m) and extracts the peak position-modulation trajectory Γ, the stable point p*, and the separability index. D ; Step 4: Online optimization and modulation control unit 24 obtains the optimal modulation depth online using the objective function. m* It also sends back the modulation drive in real time to improve the harmonic signal-to-noise ratio and inter-peak separability; Step 5: While working in Step 4, the cross-interference calculation and compensation unit 25 simultaneously introduces a peak position offset that is approximately insensitive to amplitude multiplicative drift within the two-dimensional peak stability interval. Δx m As a self-calibrated observable, it is used to invert the interference intensity ratio β and generate compensation weights, thereby improving the identifiability and convergence stability of the inversion under the condition of strong overlap and amplitude drift. The cross-interference calculation and compensation unit 25 utilizes the peak position shift of the stable point. Δx m The interference intensity ratio is estimated and a residual-weight-compensation matrix W(β) is generated, which is then used to apply weighting and compensation to the subsequent concentration calculation unit 26. Step 6: Concentration calculation unit 26 combines the spectral parameter set {ν0,S,γ} with the compensated second harmonic 2 f The concentrations of each component are jointly solved, and consistency and residual checks are performed. If the residual or the optimal modulation depth m* is unstable, the concentration calculation unit 26 will combine the residual-weight-compensation matrix W(β) and the fitted residual. e The update suggestions for weights and adjacent peak distance thresholds δν are fed back to the multi-peak decoupling unit 21. The multi-peak decoupling unit 21 dynamically adjusts δν according to the residual distribution characteristics of the feedback to trigger the splitting or merging of spectral clusters, and re-initializes it with W(β) as the prior weight and enters the next iteration. This cycle continues until the system converges and outputs the gas concentration, thereby achieving high-sensitivity measurement and cross-interference suppression of complex near-infrared spectral bands.
[0025] Example 2 The gas detection method based on near-infrared spectral decoupling and harmonic two-dimensional features provided in this embodiment is based on Embodiment 1, and refers to... Figure 1 - Figure 3 As shown, the acquired overlapping spectrum bands are parametrically decomposed by the multi-peak decoupling unit 21, outputting a set of discrete spectral line parameters and establishing a spectral line cluster structure. At the same time, the fitting quality assessment is included for subsequent harmonic modeling, weighted compensation and error propagation. Specifically, under weak absorption conditions, the multi-peak decoupling unit 21 represents the absorption band within the target band as a linear superposition of multiple spectral lines. A parameterized line type L(·) is used to decouple the acquired spectral bands into multiple peaks. L(·) can be Voigt, Lorentz, Gaussian, or a combination thereof, or an equivalent model driven by a line table / section library. In this embodiment, the specific line type is not limited. The unit output includes an updated set of peak candidates, and each spectral line in the peak candidate set contains the following information: Physical parameters: The set of spectral line parameters {ν0, S, γ}, where ν0 is the center frequency / wavenumber of the spectral line; S is the line intensity / area; and γ is the full width at half maximum (FWHM) / broadening parameter. These parameters directly determine the physical properties of the gas absorption characteristics, and their accuracy is the basis for concentration inversion. Structural information: Spectral line cluster label, which identifies the index symbol of the group to which each spectral line belongs, by using the adjacent peak distance threshold δν (dimensions same as the sampling resolution Δν, unit cm). -1 The spectral line cluster structure is generated by performing cluster merging (while maintaining the conservation of integral intensity), thus logically defining the "spectral line cluster structure". The purpose of establishing the spectral line cluster structure is to treat multiple closely overlapping and difficult-to-distinguish absorption peaks as a whole, thereby solving the problem of single-peak parameter oscillation under strong overlap conditions. Statistical evaluation indicators: approximate parameter covariance Σ and fit quality index Q fit .
[0026] The output data will be used as key prior information and sent to the subsequent 2f extraction unit 22, two-dimensional peak state construction unit 23, and cross-interference calculation and compensation unit 25.
[0027] The specific processing flow for step 1 is as follows: Step 1: Construct an initial value space based on physical constraints; the initial values and boundaries of the peak candidates (i.e., the initial spectral line parameter estimates) are obtained from line table / section databases, such as HITRAN / GEISA / PNNL, and are standardized according to the current temperature T, pressure P and equivalent optical path L; when the line-by-line data in the database is missing or insufficient to describe the actual observed broadband absorption, equivalent peak candidates are approximately generated in the target band by segmenting equivalent sections to ensure parameter identifiability and convergence stability; Step 2: Nonlinear fitting solution; the parameter solution uses nonlinear least squares with physical boundaries (such as LM) to estimate the spectral parameter set {ν0, S, γ}. In this process, physical constraints are applied to the peak candidate parameters (the above spectral parameters) to avoid non-physical divergence of the solution: constraints S≥0 (absorption is not negative), γ≥γ min (An empirical lower bound is given by the instrument resolution and minimum pressure broadening), and ν0 is constrained within the candidate window.
[0028] Step 3: Establish a feedback-based spectral cluster structure to address parameter uncertainties caused by ultra-near overlap. When processing complex hydrocarbon gases, due to the extremely close proximity of adjacent absorption peaks, traditional single-peak fitting is prone to parameter oscillations characterized by "one peak rising while another falls." To solve this problem, this embodiment introduces a "spectral cluster structure." Specifically, adjacent peaks are clustered according to the adjacent peak distance threshold δν or peak overlap criterion. After merging, a unified "spectral cluster label" is assigned to the group of spectral lines. Upon receiving the fitting residual from step 6, the data is processed in the wavelet curve. After analyzing the distribution characteristics of the long domain, for band regions where the fitting residual is higher than the preset value, the adjacent peak distance threshold δν in that region is reduced to trigger spectral cluster splitting; for regions where the parameters do not converge but the residual is low, the adjacent peak distance threshold δν is increased to trigger spectral cluster merging; the intra-cluster integral intensity is always maintained during the splitting or merging process; after analyzing the residual statistical characteristics, spectral clusters are dynamically split or merged, while maintaining the intra-cluster integral intensity conservation: the overall cluster line intensity is added by area, the cluster center position ν0 is taken as the weighted average of line intensity, and the cluster broadening γ is taken as the weighted or equivalent broadening; Step 4: Suppressing Overfitting and Redundant Peaks (Model Order Selection); To prevent the creation of physically non-existent "redundant peaks" in pursuit of low residuals in the method of this invention, or to prevent "overfitting" (i.e., the model characterizes noise rather than the real signal, resulting in extreme sensitivity to changes in operating conditions and poor generalization ability), the spectral multi-peak decoupling unit 21 selects the model order in conjunction with information criteria; specific criteria include: using the sum of squared residuals E and its change ΔE and parameter increment norm as convergence criteria; performing white noise and autocorrelation tests on the residuals, and using robust weights to suppress abnormal frequency points when necessary; Step 5: Output quality assessment; The final output parameter covariance approximation Σ (obtained from the normalized Hessian matrix, reflecting the confidence interval of the fitted parameters) of the spectral multi-peak decoupling unit 21 and the fitting quality index Q fit (Such as normalized mean square error or coefficient of determination, reflecting the model's interpretability of the observed data), serving as the basis for subsequent weight allocation and error propagation; when Q fit When the value is below the adjacent peak distance threshold, return the candidate update δν to trigger refitting.
[0029] Symbol explanation: δν is the threshold between adjacent peaks, ν0 is the center frequency / wavenumber, S is the line intensity / integral area, γ is the full width at half maximum (FWHM), γ min To broaden the lower bound, E / ΔE represents the residuals and their changes, Σ is the approximation of the parametric covariance, and Q... fit To fit the quality index, the dimensions and ranges mentioned above are not limited to specific instruments or line types, as long as equivalent implementation is met.
[0030] Reference Figure 4 As shown, to verify the effectiveness of the present invention, ethane was used in this embodiment at a near-infrared wavelength of 1683.1 nm and a wavenumber of 5940.8-5941.9 cm⁻¹. -1Taking the absorption band as an example, the front-end detection module and the processing and control module complete the spectral acquisition according to the process, and the multi-peak decoupling unit 21 uses the Lorentz special case of L(·) to achieve multi-peak decoupling of the band. The processing result is as follows: Figure 4 As shown, under verification conditions of 1 atm air pressure, 25°C temperature, 3m equivalent optical path length, and approximately 1 ppm, observation results indicate that severe overlap was successfully decomposed and the main peak center frequency was accurately extracted. This example is only for illustrating the principle of this method; in practical applications, switching between Voigt / Lorentz / Gaussian methods and their combinations or equivalent cross sections can be performed without affecting the implementation of the method and the protection range.
[0031] The specific processing flow for step 2 is as follows: Through 2 f Extraction unit 22 synchronously demodulates the transmitted light intensity signal containing overlapping spectral band information, which has been acquired and digitized by the front-end detection module, to obtain the second harmonic component 2. f And the optional output normalization factor 2 f / 1 f Demodulation can be achieved using digital phase-locked loops: based on the modulation frequency and sampling timing, phase-sensitive detection and low-pass filtering are performed to achieve a 2D output. f Registered one-to-one with wavelength / wavenumber coordinates.
[0032] To enhance robustness, the second harmonic component 2 f It can be obtained either directly from the demodulation of the transmitted light intensity signal, or by reconstructing and then demodulating the fitted absorbance spectrum from the discrete spectral line parameter set {ν0,S,γ} output by the spectral multi-peak decoupling unit 21. Both methods can be used according to the fitting quality index Q. fit The amplitude of the second harmonic component 2f may be scaled as a whole when there are multiplicative drifts in light intensity, coupling efficiency, and detection gain. In this embodiment, a peak position "position quantity" is further introduced as an independent information channel to form a complementary constraint with the amplitude channel.
[0033] The specific processing flow for step 3 is as follows: Using the two-dimensional peak-state construction unit 23, in the harmonic-modulation two-dimensional feature space (e.g., (λ, m)), with wavelength λ, wave number or frequency number ν as the horizontal axis and modulation depth as the vertical axis, the modulation depth is constructed. m Using the vertical axis as the ordinate, at multiple modulation depths m Obtain the second harmonic signal that varies with λ or ν. 2f Curve, and according to the modulation depth m, the 2 f The curves are stacked to form a two-dimensional kurtosis distribution map. Preferably, the two-dimensional kurtosis distribution map is presented as a contour plot or isopleth map, such as... S 2f (λ,m) or S 2f (ν,m) represents 2.f With the horizontal axis coordinate and modulation depth m The characteristics of joint change; By searching within this two-dimensional feature space 2 f Global or local extrema, extract peak position-modulation trajectory Γ (representing 2). f Extreme values follow m (path of change) and stable point p* (referring to dΓ / dm≈0 and d) 2 Γ / dm 2 The neighborhood center of >0); based on this, the peak position offset Δ is further extracted. x m Based on the degree of overlap between the target spectral line cluster and the interfering spectral line cluster on the two-dimensional contour lines, the separability index is calculated. D , used to measure the separation degree between the two in a two-dimensional feature space; the extracted Γ, p*, Δ x m and D This will serve as an important criterion for subsequent online modulation optimization and cross-interference compensation.
[0034] The specific processing flow for step 4 is as follows: To explain the peak position offset Δ x m For the formation mechanism of and its rationale as a positional quantity observation, see . Figure 5 As shown, under single-component spectral line conditions, with given temperature T, pressure P, equivalent optical path L, and modulation depth parameters... m Below, the peak position of the second harmonic 2f has a repeatable baseline characteristic; when an interfering component is introduced, the target spectral line superimposes with the interfering spectral line within the observation window to form a spectral line cluster, and its 2f peak position will undergo a systematic shift relative to the baseline, and this shift has higher statistical stability within the two-dimensional peak-state stability interval. Based on this, the present invention uses the peak position shift Δ corresponding to the stable point p* within the stability interval. x m As a positional quantity observation, it is used to characterize the changes in the composition of spectral line clusters and the degree of cross-interference, and is further used to estimate the interference intensity ratio β online, update the compensation weights, and drive the subsequent refitting / redecoupling closed loop.
[0035] The online optimization and modulation control unit 24, based on the objective function J(m), calculates the optimal modulation depth m* online and sends it to the laser control and modulation unit 11 in the front-end detection module. The objective function J(m) defined here aims to quantify the current detection quality. The objective function J(m) is constructed based on the harmonic signal-to-noise ratio and the two-dimensional separability index of the target spectral line cluster and the interference spectral line cluster at the current modulation depth. D Based on factors such as peak shape stability, its construction logic is: the higher the harmonic signal-to-noise ratio, the better the two-dimensional separability index.D The larger the peak and the more stable the peak shape, the better the evaluation result indicated by the objective function J(m). This comprehensive evaluation method aims to achieve a trade-off between sensitivity (primarily positively correlated with signal-to-noise ratio) and anti-interference capability (primarily positively correlated with separability index). When the statistically observed peak spacing or spectral cluster structure changes significantly, this unit uses the latest peak position-modulation trajectory Γ and separability index... D Based on the distribution of the peaks, the system adaptively provides an update suggestion for the adjacent peak distance threshold δν and feeds it back to the multi-peak decoupling unit 21 for the next round of cluster merging and parameter initial setting, thereby achieving coordinated optimization of the modulation parameters and the decoupling process of the spectrum.
[0036] Cross-interference calculation and compensation unit 25 utilizes two-dimensional peak-state stability point p The peak position shift is used to estimate the interference intensity ratio online, and the estimation result is written into the compensation matrix to correct subsequent concentration calculations. In strongly overlapping spectral bands, the second harmonic peak height or amplitude characteristics simultaneously superimpose the absorption contributions of the target component and the interfering component, and are sensitive to multiplicative drifts such as light intensity, coupling efficiency, and detection gain. This leads to ill-conditioned characteristics, such as enhanced parameter correlation and high sensitivity to drift and noise, when relying solely on amplitude-concentration inversion. Therefore, this embodiment uses peak position shift as a self-calibration observable to provide prior constraints independent of amplitude scaling.
[0037] The specific processing flow for step 5 is as follows: First, through the cross-interference calculation and compensation unit 25 at the optimal modulation depth m Within a small neighborhood, preferably within a two-dimensional peak stability region, the stable point of the 2f peak position of the target spectral line cluster is read from the harmonic-modulation two-dimensional feature space. p * and calculate its peak position offset relative to the device calibration reference peak position. Δx m Peak position offset is defined along the wavelength λ and wavenumber / frequency ν directions. Δx m This reflects characteristic 2 under the current spectral line cluster composition and the presence of interfering gases. f The overall drift of the peak position relative to the reference.
[0038] Then, the cross-interference calculation and compensation unit 25 uses the monotonic mapping relationship pre-established during the device calibration stage to calculate the peak position offset. Δx m The inversion yields the interference intensity ratio β, obtaining the intensity contribution of the interfering component relative to the target component under the current operating conditions. This mapping can be obtained through fitting with a standard gas experiment of known concentration and remains approximately monotonic within the normal operating range, facilitating the calculation of β during online operation. Peak position shift. Δx mAs a position quantity observation, it has higher statistical stability when the harmonic amplitude is scaled up as a whole due to multiplicative drifts in light intensity, coupling efficiency, and detection gain, and can be used as an independent constraint channel for amplitude inversion.
[0039] Next, the cross-interference calculation and compensation unit 25 writes the calculated β into the residual-weight-compensation matrix W(β) according to frequency points or spectral clusters. For the case of cluster-based compensation, the weights are normalized and allocated within each spectral cluster according to the proportion of the line intensity S of each frequency point to maintain the conservation of the integral intensity within the cluster and avoid the compensation process from destroying the total absorption of the cluster. In order to prevent the weights from changing too much in a single iteration, the weight adjustment range in W(β) is limited to a preset range. W(β) is then synchronously fed back to the spectral band multi-peak decoupling unit 21 as the basis for updating the frequency point weights and initial values, so that the interference compensation information participates in the next round of refitting and re-decoupling, thereby forming a coupling closed loop.
[0040] When the two-dimensional kurtosis separability index D When the peak position shift is below the preset separability threshold, or when the peak position trajectory shows significant instability, the peak position offset is adjusted. Δx m Simple robust statistical processing is performed, such as removing obvious outliers and limiting extreme offsets, retaining only statistically stable offsets for β inversion, thereby improving the reliability of the compensation results; if necessary, the update amplitude of W(β) is reduced or the current β update is paused to avoid introducing weight oscillations under kurtosis conditions.
[0041] Finally, as the optimal modulation depth m* is updated, the system synchronously refreshes the weighting coefficients of the current effective compensation frequency band and the corresponding frequency band in W(β), so that the compensation range matches the actual modulation coverage spectral range; after W(β) weighted compensation, 2f (or 2 f / 1 f The data is sent to the concentration calculation unit 26 to solve for the concentrations of the target gas and interfering gases. If the fitting residual decreases after compensation and the fitting quality index improves, then β and W(β) are retained, and the statistical results of the compensated residual are fed back to the multi-peak decoupling unit 21 for adaptive adjustment of the peak candidate set and the adjacent peak distance threshold δν, which is used as the initial weight for the next round of multi-peak fitting. Through the above steps, a closed-loop process of "two-dimensional peak state feature extraction - cross-interference calculation and compensation - spectral re-decoupling" is formed, gradually reducing the measurement error introduced by cross-interference in the iteration.
[0042] Where β is the interference intensity ratio, and W(β) is the residual-weight-compensation matrix with the interference intensity ratio β as input. Δx m This represents the peak position offset of the stable point of the 2f peak position in the two-dimensional feature space relative to the calibration reference at a modulation depth of m or m*. DIt is an index for the separability of the target spectral line cluster and the interfering spectral line cluster on a two-dimensional contour line.
[0043] The specific processing flow for step 6 is as follows: Based on the spectral parameter set {ν0,S,γ} obtained by the multi-peak decoupling unit 21 and the compensated harmonic data output by the cross-interference calculation and compensation unit 25, the concentration calculation unit 26 uses nonlinear least squares or equivalent optimization methods to solve for the concentration of each component and performs residual statistics and consistency checks. Let E be the sum of squared residuals of the current iteration, ΔE be the change in residuals between two adjacent iterations, and Δm* be the change in optimal modulation depth between two adjacent iterations. When |ΔE| and |Δm*| reach the convergence threshold, the concentration is output. If convergence is not achieved, the back-end processing and control module feeds back the update suggestions of W(β), fitting residual e, weight and adjacent peak distance threshold δν to the multi-peak decoupling unit 21 and the online optimization and modulation control unit 24, triggering an adaptive closed loop of "peak state → compensation → refitting" until convergence. After convergence, the gas concentration is output.
[0044] The present invention relates to a gas detection device and method for near-infrared spectral band decoupling and harmonic two-dimensional features. A front-end detection module acquires the absorption spectrum of the target band. A back-end processing and control module performs multi-peak decoupling of the spectral band using parameterized line shapes to obtain center frequency, line intensity, and broadening parameters, and establishes a spectral line cluster structure. Based on this, second harmonic contour lines are generated in the wavelength-modulation depth two-dimensional feature space, and peak positions, modulation trajectories, and stable points are extracted. A two-dimensional separability index is calculated, and the optimal modulation depth is then sought online. m* It also updates the adjacent peak distance threshold δν and the peak candidate set in a linked manner; furthermore, it extracts the peak position shift within the two-dimensional peak stability interval. Δx m As a positional quantity observation (approximately insensitive to multiplicative amplitude drift such as light intensity, coupling efficiency, and detection gain), it is mapped to the interference intensity ratio β, and a residual-weight-compensation matrix W(β) is constructed for joint weighting in concentration solution and the next round of multi-peak decoupling. The compensating residual statistics, consistency test, and modulation parameter stability are used as convergence criteria to drive the formation of an adaptive closed-loop system of "peak state extraction-compensation-peak-by-peak refitting / re-decoupling" until convergence.
[0045] Addressing the problem of gas detection based on spectral structure, this paper takes near-infrared complex hydrocarbon gases as an example. Overcoming the limitations of traditional single-line analysis in resolving complex spectral bands, it proposes a "multi-peak decoupling of vibrational and rotational bands" approach. Under the assumptions of weak absorption approximation and linear superposition of spectral lines, it represents the continuous envelope-shaped complex spectral band as an equivalent linear superposition model of several discrete spectral line clusters. The spectral line clusters are then computationally characterized through parameterized line shapes. Simultaneously, constraints on spectral line cluster merging and integral intensity conservation are introduced to suppress overfitting caused by uncertainty in the number of peaks and redundant peaks in high-density overlapping bands. This reduces spectral band resolution errors and improves parameter identifiability, overcoming the limitations of traditional methods that rely on single spectral lines to represent spectral bands, such as large resolution errors and sensitivity to operating condition drift. The above characterization and constraints are not limited to specific quantum mechanical modeling methods and can be equivalently implemented using line surface priors, equivalent cross sections, or empirical line shape parameters.
[0046] Traditional approaches to address near-infrared spectral band overlap primarily rely on harmonic height data fitting or machine learning, limiting them to a single dimension. This application proposes a "two-dimensional harmonic peak-state feature" approach, extending spectral band analysis from a single harmonic amplitude dimension to a two-dimensional harmonic-modulation feature domain. Vertically, it provides a theoretical basis for the optimal modulation depth of the band, optimizing the selection of high-response spectral lines within the band to improve detection sensitivity. Horizontally, it utilizes the trajectory and stable interval of the second harmonic peak position as modulation parameters change to identify changes in spectral line cluster composition and the degree of cross-interference, thereby correcting and compensating for harmonic amplitude-related errors. Specifically, this invention constructs a "two-dimensional peak-state fingerprint" (including peak position-modulation trajectory, stable points, and connectivity / separability indices) in the two-dimensional harmonic-modulation feature space (λ,m). Using this peak-state fingerprint as a unified driver, on the one hand, it seeks the optimal modulation parameters online. m* (Taking into account 2) f (Signal-to-noise ratio and inter-peak separability), adaptively updating peak candidates and adjacent peak distance threshold δν, on the other hand, based on peak position offset. Δx m The interference intensity ratio β is inverted and a residual-weight-compensation matrix W(β) is constructed. This matrix is not only used to correct the final concentration, but also fed back to the front-end decoupling stage to adaptively update peak candidates and adjacent peak distance thresholds, thus forming a complete closed loop of peak state extraction-matrix compensation-peak-by-peak refitting / re-decoupling. Δx m As a positional quantity observation, it is insensitive to the multiplicative amplitude drift approximation and can provide independent constraints for the amplitude channel, thereby improving the discriminability and convergence stability under conditions of strong overlap and drift.
[0047] This invention leverages mature near-infrared semiconductor lasers and InGaAs detection links, requiring no additional dedicated hardware or changes to the optical path structure. It achieves a comprehensive improvement in sensitivity and selectivity simply through software-based closed-loop control of "online modulation parameter optimization - compensation matrix update - spectral band decoupling / refitting." This offers advantages such as low cost, easy engineering deployment, and ease of maintenance, meeting the needs of industrial environment measurements while balancing system cost and stability. In conditions of weak absorption, strong overlap, and slight drift in temperature / pressure and modulation parameters, interference intensity ratio estimation based on the two-dimensional peak-state stable region and matrix-based closed-loop compensation can reduce cross-interference errors and overfitting risks, improving the stability, consistency, and traceability of concentration inversion results.
[0048] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A gas detection device based on near-infrared spectral decoupling and harmonic two-dimensional characteristics, characterized in that: The system includes a front-end detection module and a back-end processing and control module. The front-end detection module includes a laser control and modulation unit (11), a near-infrared laser source (12), a multi-pass gas cell (13), a detector and preamplifier unit (14), and a synchronous acquisition and analog-to-digital conversion unit (15). The near-infrared laser source (12) is used to output near-infrared scanning light. The laser control and modulation unit (11) is connected to the near-infrared laser source (12) and is used to dynamically modulate the near-infrared scanning light output by the near-infrared laser source (12) and load modulation depth information in real time. The multi-pass gas cell (13) is located in the near-infrared laser source. (12) Between the detector and the preamplifier unit (14), the detector and the preamplifier unit (14) are used to convert the transmitted light absorbed by the multi-pass gas cell (13) into an electrical signal. The synchronous acquisition and analog-to-digital conversion unit (15) is set between the detector and the preamplifier unit (14) and the back-end processing and control module. The synchronous acquisition and analog-to-digital conversion unit (15) is used to acquire and convert the electrical signal into an analog signal and output the signal to the back-end processing and control module. The back-end processing and control module is also connected to the laser control and modulation unit (11) and is used to output control signals to the laser control and modulation unit (11).
2. A gas detection method based on near-infrared spectral band decoupling and harmonic two-dimensional features, using the gas detection device based on near-infrared spectral band decoupling and harmonic two-dimensional features as described in claim 1, characterized in that: The back-end processing and control module includes a multi-peak decoupling unit (21), a 2f extraction unit (22), a two-dimensional peak state construction unit (23), an online optimization and modulation control unit (24), a cross-interference calculation and compensation unit (25), and a concentration calculation unit (26). The gas detection method based on near-infrared spectral band decoupling and harmonic two-dimensional features includes the following steps: Step 1: First, the multi-peak decoupling unit (21) is used to perform multi-peak fitting and cluster merging on the overlapping spectral bands obtained by the gas detection device that exhibit a continuous envelope shape under normal pressure due to the complexity of molecular energy levels, based on the parameterized line shape L(·), to obtain an updated peak candidate set. The peak candidate set contains a discrete spectral parameter set {ν0,S,γ} with a spectral cluster structure. The adjacent peak distance threshold δν of the multi-peak fitting and cluster merging can be dynamically adjusted according to the feedback of subsequent steps. ν0 is the spectral center frequency / wavenumber, S is the line intensity / area, and γ is the half width at half maximum / broadening parameter. Step 2: Subsequently, using the aforementioned 2 f The extraction unit (22) performs phase-locked demodulation to obtain the second harmonic 2f; Step 3: Using the two-dimensional peak-state construction unit (23), construct peak-state contour lines in the wavelength-modulation depth two-dimensional feature space (λ,m) and extract the peak position-modulation trajectory Γ, the stable point p*, and the separability index. D ; Step 4: Use the online optimization and modulation control unit (24) to obtain the optimal modulation depth online with the objective function. m* And in real time, the laser control and modulation unit (11) modulates and drives the laser to improve the harmonic signal-to-noise ratio and inter-peak separability; Step 5: While working in Step 4, the cross-interference calculation and compensation unit (25) is used to introduce a peak position offset that is approximately insensitive to amplitude multiplicative drift within the two-dimensional peak stability interval. Δx m As a self-calibrated observable, it is used to invert the interference intensity ratio β and generate compensation weights, thereby improving the identifiability and convergence stability of the inversion under the condition of strong overlap and amplitude drift. The cross-interference calculation and compensation unit (25) utilizes the peak position shift of the stable point. Δx m Estimate the interference intensity ratio β and construct the residual-weight-compensation matrix W(β) to apply weighting and compensation to the concentration calculation unit (26); Step 6: The concentration calculation unit (26) is used to calculate the concentration of the spectral parameters {ν0,S,γ} and the compensated second harmonic 2. f The concentrations of each gas component are jointly solved, and consistency and residual checks are performed; if the fitting residual e or the optimal modulation depth is found... m* Unstable, the concentration calculation unit (26) then calculates the residual-weight-compensation matrix W(β) and the fitted residual. e The weights and adjacent peak distance thresholds δν are fed back to the multi-peak decoupling unit (21) of the spectrum to reinitialize and enter the next round of iteration, which is used to update the adjacent peak distance thresholds and peak candidate sets, triggering a new round of decoupling and fitting until the system converges; after convergence, the gas concentration is output.
3. The gas detection method based on near-infrared spectral band decoupling and harmonic two-dimensional features according to claim 2, characterized in that, Step 1 specifically includes the following steps: Step 11: Construct an initial value space based on physical constraints. The initial values and boundaries of the peak candidates are obtained from the line table or cross-section database and are converted according to the current temperature T, pressure P and equivalent optical path L. When the line-by-line data in the database is missing or insufficient to describe the actual observed broadband absorption, the equivalent cross-section is used to approximate the equivalent peak candidates in the target band. Step 12: Nonlinear fitting solution; the parameter solution uses nonlinear least squares estimation of the spectral parameter set {ν0, S, γ} with physical boundaries. During this process, physical constraints are applied to the peak candidate parameters to avoid non-physical divergence of the solution: constraints S≥0, γ≥γ min ν0 is constrained within the candidate window, where γ min An empirical lower bound is given by the instrument resolution and minimum pressure broadening; Step 13: Establish a feedback-based spectral cluster structure; initially, adjacent peaks are clustered using the adjacent peak spacing threshold δν or peak overlap criterion, and a unified spectral cluster label is assigned to the group of spectral lines after merging; after receiving the distribution characteristics of the fitting residual in the wavelength domain from the feedback in Step 6, for band regions where the fitting residual is higher than the preset value, the adjacent peak spacing threshold δν in that region is reduced to trigger spectral cluster splitting; for regions where the parameters do not converge but the residual is low, the adjacent peak spacing threshold δν is increased to trigger spectral cluster merging; the intra-cluster integral intensity is always maintained during the splitting or merging process; after residual statistical characteristics are determined, spectral clusters are dynamically split or merged, while maintaining the intra-cluster integral intensity conservation: the overall cluster line intensity is added by area, the cluster center position ν0 is taken as the weighted average of the line intensity, and the cluster broadening γ is taken as the weighted or equivalent broadening; Step 14: Suppress overfitting and redundant peaks; Spectral multi-peak decoupling unit (21) selects model order based on information criteria: use the sum of squared residuals E and its change ΔE and parameter increment norm as convergence criteria; perform white noise and autocorrelation tests on the residuals; Step 15: Output quality assessment; spectral multi-peak decoupling unit (21) final output parameter covariance approximation Σ and fitting quality index Q fit This serves as the initial weighting basis for constructing the error propagation matrix W(β); when Q fit When the value is below the threshold, return the candidate update δν to trigger refitting.
4. The gas detection method based on near-infrared spectral band decoupling and harmonic two-dimensional features according to claim 3, characterized in that, Step 2 specifically includes the following steps: The 2 mentioned f Extraction unit (22) synchronously demodulates the transmitted light intensity signal acquired and digitized by the front-end detection module to obtain the second harmonic component 2. f Demodulation is achieved through digital phase-locked loop (PLL), which performs phase-sensitive detection and low-pass filtering based on the modulation frequency and sampling timing, resulting in a 2D output. f Registered one-to-one with wavelength / wavenumber coordinates; The 2 mentioned f Extraction unit (22) reconstructs and fits the absorbance spectrum from the discrete spectral line parameter set {ν0,S,γ} output by multi-peak decoupling unit (21), and then demodulates it to obtain the second harmonic component 2. f And based on the fitting quality index Q output in step 15 fit The weights of the direct demodulation results and the reconstructed demodulation results are adjusted adaptively based on their relative values, or a selective switching is performed.
5. The gas detection method based on near-infrared spectral band decoupling and harmonic two-dimensional features according to claim 4, characterized in that, Step 3 specifically includes the following steps: Step 31: Two-dimensional peak state construction unit (23) on the harmonic-modulation two-dimensional feature space (λ,m), with wavelength λ, wave number or frequency number ν as the horizontal axis and modulation depth as the vertical axis. m Using the vertical axis as the coordinate axis, multiple modulation depths are considered. m The second harmonic component 2 f The curves are stacked to form a two-dimensional kurtosis distribution. S 2f (λ,m) or S 2f Contour lines or isopleth maps of (ν,m); Step 32: Search for the second harmonic component 2 in the harmonic-modulation two-dimensional feature space. f Global or local extrema, extract peak position-modulation trajectory Γ and stable points p* Where the peak position-modulation trajectory Γ represents the second harmonic component 2. f Extreme values vary with modulation depth m Change path, stable point p* This refers to dΓ / dm≈0 and d 2 Γ / dm 2 The neighborhood center of >0; Step 33: Based on this, further extract the peak position shift Δ x m Based on the degree of overlap between the target spectral line cluster and the interfering spectral line cluster on the two-dimensional contour lines, the separability index is calculated. D ; Extracted Γ, p *、Δ x m and D This serves as a criterion for subsequent online modulation optimization and cross-interference compensation.
6. The gas detection method based on near-infrared spectral band decoupling and harmonic two-dimensional features according to claim 5, characterized in that, Step 4 specifically includes the following steps: using the online optimization and modulation control unit (24) to online determine the optimal modulation depth with the objective function J(m). m * and sends it to the laser control and modulation unit (11) in the front-end detection module; when the statistically detected peak spacing or spectral line cluster structure changes significantly, the online optimization and modulation control unit (24) calculates the latest peak position-modulation trajectory Γ and the separability index. D Based on the distribution of the peaks, an adaptive update suggestion for the adjacent peak distance threshold δν is given and fed back to the multi-peak decoupling unit (21) for the next round of cluster merging and parameter initial setting.
7. The gas detection method based on near-infrared spectral band decoupling and harmonic two-dimensional features according to claim 6, characterized in that, Step 5 specifically includes the following steps: Step 51: First, use the cross-interference calculation and compensation unit (25) at the optimal modulation depth m Within a small neighborhood, confined to a two-dimensional peak stability region, the stable point p* of the 2f peak position of the target spectral line cluster is read from the two-dimensional harmonic-modulation feature space, and its peak position offset relative to the device calibration reference peak position is calculated. Δx m Peak position offset is defined along the wavelength λ, wavenumber, or frequency number ν direction. Δx m This reflects characteristic 2 under the current spectral line cluster composition and the presence of interfering gases. f Overall drift of the peak position relative to the reference; Step 52: Then, using the cross-interference calculation and compensation unit (25), the peak position offset is calculated based on the monotonic mapping relationship established in advance during the gas detection device calibration stage. Δx m The inversion yields the interference intensity ratio β, obtaining the intensity contribution of the interference component relative to the target component under the current operating conditions. This monotonic mapping is obtained by fitting a standard gas experiment with known concentrations and remains approximately monotonic within the normal operating range, facilitating the determination of the interference intensity ratio β during online operation. Step 53: Next, the calculated interference intensity ratio β is written into the residual-weight-compensation matrix W(β) by frequency point or by spectral cluster using the cross-interference calculation and compensation unit (25). The matrix W(β) contains compensation factors for correcting the weights of each frequency point. In the case of cluster compensation, the weights are normalized and allocated according to the proportion of the line intensity S of each frequency point within each spectral cluster. The residual-weight-compensation matrix W(β) is synchronously fed back to the spectral band multi-peak decoupling unit (21) as the basis for updating the frequency point weights and initial values, so that the compensation results participate in the next round of refitting and re-decoupling, thereby forming a coupling closed loop.
8. The gas detection method based on near-infrared spectral band decoupling and harmonic two-dimensional features according to claim 7, characterized in that, Step 5 further includes the following steps: Step 54: When the two-dimensional kurtosis separability index D When the peak position shift is below the preset separability threshold, or when the peak position trajectory shows significant instability, the peak position offset is adjusted. Δx m Robust statistical processing is performed to remove obvious outliers and limit extreme offsets, retaining only statistically stable offsets for inverting the interference intensity ratio β, thereby improving the reliability of the compensation results; if necessary, the update amplitude of the residual-weight-compensation matrix W(β) is reduced or the current update of the interference intensity ratio β is paused to avoid introducing weight oscillations under kurtosis conditions. Step 55: Finally, with the optimal modulation depth m The update of * synchronously refreshes the current effective compensation frequency band and the weight coefficient of the corresponding frequency band in W(β) so that the compensation range matches the actual modulation coverage of the spectral range; the 2f data after W(β) weighted compensation is sent to the concentration calculation unit (26) to solve the concentration of the target gas and the interfering gas; if the fitting residual decreases after compensation and the fitting quality index improves, the current interference intensity ratio β and the residual-weight-compensation matrix W(β) are retained, and the statistical results of the residual after compensation are fed back to the spectral band multi-peak decoupling unit (21) for adaptive adjustment of the peak candidate set and the adjacent peak distance threshold δν, and used as the initial weight for the next round of multi-peak fitting.
9. The gas detection method based on near-infrared spectral band decoupling and harmonic two-dimensional features according to claim 8, characterized in that, Step 6 specifically includes the following steps: Step 61: The concentration calculation unit (26) calculates the spectral parameters {ν0,S,γ} obtained by the multi-peak decoupling unit (21) and the compensated second harmonic 2 output by the cross-interference calculation and compensation unit (25). f The data were analyzed, and the concentrations of each component were determined using nonlinear least squares or equivalent optimization methods. Residual statistics and consistency tests were then performed. Step 62: Let E be the sum of squared residuals of the current iteration, ΔE be the change in residuals between two adjacent iterations, and Δm* be the change in optimal modulation depth between two adjacent iterations. When |ΔE| and |Δm*| reach the convergence threshold, output the gas concentration. Step 63: If convergence is not achieved, the update suggestions of the residual-weight-compensation matrix W(β), the fitting residual, the weight and the adjacent peak distance threshold δν are fed back to the multi-peak decoupling unit (21) and the online optimization and modulation control unit (24) until convergence is achieved. After convergence, the gas concentration is output.
10. The gas detection method based on near-infrared spectral band decoupling and harmonic two-dimensional features according to claim 6, characterized in that, When the harmonic signal-to-noise ratio is higher, the two-dimensional separability index is higher. D The larger the peak and the more stable the peak shape, the better the evaluation result indicated by the objective function J(m).