A hydrogen absorption spectral line adaptive positioning method
By utilizing multiple known features of the methane reference spectral signal to establish template matching and screening in tunable semiconductor laser absorption spectroscopy detection, the reliability problem of hydrogen absorption line positioning under changes in laser scanning center position or scanning span is solved, and high-precision hydrogen detection is achieved.
Patent Information
- Application Number
- CN202611670240.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-27
- Publication Date
- 2026-11-24
AI Technical Summary
When the center position or scanning span of the laser scan changes and there are mismatches in local reference features, it is difficult to reliably determine the position of the weak hydrogen absorption spectral line in the current sampling sequence.
By selecting known features of multiple methane reference spectral signals under preset reference scanning conditions, a reference feature template is established. Hydrogen detection signals and methane reference spectral signals are acquired synchronously within the same laser scanning cycle. Local template matching is performed, and reference features with good matching confidence and position consistency are selected. The mapping relationship between the sampling position and spectral coordinates of the current scanning cycle is established, and the position of the hydrogen target absorption spectral line is calculated in reverse.
It improves the reliability of hydrogen absorption spectral line localization, reduces the impact of noise and background interference on localization, ensures that the detection window covers the target spectral line and completely captures the signal, and reduces localization error.
Smart Images

Figure CN123155484A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of tunable semiconductor laser absorption spectroscopy gas detection technology, and particularly to an adaptive positioning method for hydrogen absorption spectral lines. Background Technology
[0002] Tunable semiconductor laser absorption spectroscopy technology adjusts the output wavelength of a semiconductor laser to scan the characteristic absorption lines of the gas being tested, and obtains gas information based on the gas's selective absorption of laser light at a specific wavelength. This technology can be combined with wavelength modulation spectroscopy and harmonic detection methods to improve the detection sensitivity of weak absorption signals, making it suitable for online detection of gases such as hydrogen.
[0003] In tunable semiconductor laser absorption spectroscopy detection, it is typically necessary to determine the correspondence between the sampling position and the actual spectral position, and then determine the corresponding signal analysis interval based on the theoretical position of the target gas absorption line. When the laser is operating stably, the same absorption line can be detected at a relatively fixed sampling position. However, the laser's output wavelength is related to the operating temperature, drive current, and tuning state. When the laser scanning center position or scanning span changes, the correspondence between the original sampling position and the actual spectral position may change, thus affecting the determination of the target absorption line's position.
[0004] In the prior art, there is a detection system and method based on harmonic technology for linear nonlinear correction. This method uses a tunable semiconductor laser, a reference optical path, and a probe optical path to acquire the second harmonic spectral signal. Through background noise correction, zero-line offset correction, and adaptive fitting of the standard second harmonic signal, the influence of background noise and spectral asymmetry on the gas concentration inversion results is reduced. This method mainly addresses the amplitude baseline shift and linearity changes of the second harmonic signal.
[0005] Another method for adaptive gas concentration detection based on tunable semiconductor laser absorption spectroscopy collects environmental parameters such as temperature, humidity, and air pressure, and determines the wavelength drift compensation amount by combining the correlation information between the reference spectrum and the approximate background spectrum. This method adjusts the laser's temperature setpoint and drive current according to the compensation amount, and obtains the target gas concentration information through second harmonic detection and concentration calculation. This type of technology mainly improves the stability of gas concentration detection by compensating for laser wavelength drift and improving the quality of the detection signal.
[0006] Furthermore, existing techniques utilize multiple known absorption lines of a reference gas for spectral coordinate calibration. The center sampling position of the reference spectral line is obtained through peak finding, second derivative analysis, or single-peak line shape fitting. The theoretical spectral position of the reference line is then used to establish a mapping relationship between the sampling position and the spectral coordinates. However, when a local reference spectral line is affected by random noise, background variations, or local anomalous signals, the sampling position of the reference feature may be incorrectly matched. If the incorrectly matched reference position is directly used in coordinate fitting, it can easily cause the spectral coordinate mapping relationship to deviate from the actual scanning state.
[0007] For analytes with weak absorption signals, such as hydrogen, directly determining the spectral line position based on the gas's own absorption signal is susceptible to low signal-to-noise ratio and background interference. When the laser scanning center position or scanning span changes, using a fixed sampling window for signal extraction may cause the target spectral line to deviate from the detection window or be incompletely captured. Even with multiple reference features for coordinate calibration, mismatches of local reference features can still affect the final target spectral line localization result.
[0008] Therefore, there is a need for a detection method that can reliably determine the position of weak hydrogen absorption lines in the current sampling sequence when the laser scanning center position and scanning span change and local reference features are mismatched. Summary of the Invention
[0009] The technical problem to be solved by the present invention is: to reliably determine the position of the weak hydrogen absorption spectral line in the current sampling sequence when the center position or scanning span of the laser scan changes and there is a mismatch in the local methane reference features.
[0010] To achieve the above objectives, this invention proposes an adaptive localization method for hydrogen absorption spectral lines, comprising: Under the preset reference scanning conditions, multiple methane reference features with known theoretical spectral positions are selected from the methane reference spectral signal. The theoretical spectral position and nominal sampling position of each feature are recorded, and a corresponding reference feature template is established with the local signal interval containing each feature. Hydrogen detection signals and methane reference spectral signals are acquired synchronously within the same laser scanning cycle, and the methane reference spectral signals are preprocessed. Local search ranges are set with the nominal sampling position as the center. The corresponding reference feature template is moved within each local search range. The similarity between the template and the current methane reference spectrum signal is calculated. The position corresponding to the maximum similarity is determined as the candidate sampling position, and the maximum similarity is used as the matching confidence. Methane reference features with matching confidence scores below a preset matching confidence threshold are removed. A unified positional change relationship is fitted using the nominal sampling positions and candidate sampling positions of the remaining methane reference features. The absolute value of the residuals of each candidate sampling position relative to the relationship is calculated. Methane reference features with absolute residual values exceeding a preset residual threshold are removed to obtain effective methane reference features. A mapping relationship between the sampling position and spectral coordinates of the current scan cycle is established based on the candidate sampling positions of the effective methane reference features and the corresponding theoretical spectral positions. Based on the theoretical spectral position of the hydrogen target absorption line and the mapping relationship, the position of the line in the current sampling sequence is calculated, and a local detection signal is extracted from the hydrogen detection signal with the position as the center.
[0011] Preferably, the methane reference feature is a local peak, local valley, local line shape, or a feature interval composed of multiple consecutive sampling points in the methane reference spectral signal; the reference feature template is obtained by extracting the corresponding local signal interval from the theoretical spectral signal, experimental calibration signal, or pre-acquired high signal-to-noise ratio methane reference spectral signal.
[0012] Preferably, the reference feature template adopts a local methane line shape containing multiple continuous sampling points. When performing template matching, the continuous sampling points corresponding to the local methane line shape are used as the overall matching object.
[0013] Preferably, the hydrogen detection signal and the methane reference spectrum signal are obtained in the following manner: the scanning laser generated by the same tunable semiconductor laser is split and enters the hydrogen detection channel and the methane reference channel respectively. After detection by the photodetector corresponding to each channel and harmonic demodulation, the hydrogen detection signal and the methane reference spectrum signal are obtained respectively. The signals obtained by both channels are wavelength-modulated second harmonic signals.
[0014] Preferably, before performing reference feature template matching, at least one of the following is performed on the methane reference spectral signal: smoothing, filtering, slow background removal, and abnormal sampling point processing.
[0015] Preferably, for the first A methane reference feature, the local search range is represented as: ,in, This is the reference characteristic number for methane. This is the nominal sampling location for the methane reference characteristic. The corresponding preset search half-width is used; within the local search range, the corresponding reference feature template is moved point by point, and the normalized correlation coefficient is used as the evaluation index of the similarity.
[0016] Preferably, a unified positional variation relationship is fitted based on the nominal sampling position and candidate sampling position of the remaining methane reference characteristics, wherein the unified positional variation relationship is expressed as follows: ,in, This is the reference characteristic number for methane. For the first Candidate sampling locations for each methane reference feature, For its nominal sampling location, For parameters related to scanning scale variation, For parameters related to the change in scan position, This corresponds to the positional residual; according to Calculate the absolute value of the position residual, where, For the first The absolute value of the position residual of each methane reference feature is used to eliminate abnormally matched methane reference features based on the comparison result between the absolute value of the position residual and a preset residual threshold.
[0017] Preferably, the mapping relationship between the sampling position and the spectral coordinates adopts a linear function. ,in, This refers to the sampling position within the current scanning period. For the corresponding spectral coordinates, This is the scale parameter between the sampling position and the spectral coordinates in the current scan cycle. The position offset parameter for the spectral coordinates is determined by fitting the candidate sampling positions and corresponding theoretical spectral positions of each effective reference feature. and .
[0018] Preferably, the position of the hydrogen target absorption spectral line in the current sampling sequence is determined by inversely calculating the linear function, wherein the position is determined according to... Calculate, where, This represents the position of the hydrogen target absorption line in the current sampling sequence. This represents the theoretical spectral position of the target absorption line for hydrogen. The scale parameter and , The position offset parameter is the parameter mentioned above.
[0019] Preferably, with A local detection window is set at the center, and the sampling position within the interval is extracted from the current hydrogen detection signal. The signal within is used as the local detection signal, wherein, This represents the position of the hydrogen target absorption line in the current sampling sequence. This is the preset half-width of the local detection window.
[0020] Preferably, the mapping relationship between the sampling position and the spectral coordinates adopts a quadratic polynomial. ,in, This refers to the sampling position within the current scanning period. For the corresponding spectral coordinates, The coefficient of the quadratic term and , The coefficient of the linear term, The constant term is used; the coefficients of the quadratic polynomial are determined by fitting the candidate sampling positions and corresponding theoretical spectral positions of each effective reference feature.
[0021] The beneficial effects of adopting the above technical solution are as follows: This invention utilizes multiple methane reference features with known theoretical spectral positions to establish local reference feature templates. Within the current laser scanning cycle, template matching is used to determine the candidate sampling positions and matching confidence levels of each reference feature, reducing reliance on the extreme values of individual reference features for localization. Through matching confidence screening and multi-reference feature position consistency screening, some reference features with low matching quality or inconsistent positional changes can be eliminated, reducing the impact of abnormal matching on the spectral coordinate fitting results. Based on the screened effective methane reference features, the mapping relationship between the current sampling position and spectral coordinates is re-established, reflecting scan position offsets and scan span changes. Furthermore, the current sampling position is calculated by inversely based on the theoretical spectral position of the hydrogen target absorption line, and the local hydrogen detection signal is extracted accordingly. This reduces the localization error caused by directly relying on weak hydrogen absorption signals for peak finding, reduces the inconsistency between the fixed detection window and the actual target spectral line position, and improves the reliability of hydrogen absorption line localization. Attached Figure Description
[0022] The present invention will now be described in detail with reference to specific embodiments and accompanying drawings, wherein: Figure 1 This is a schematic diagram of the overall process of the adaptive localization method for hydrogen absorption lines provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of the system structure of the hydrogen detection channel and the methane reference channel; Figure 3 A schematic diagram of the second harmonic reference spectrum modulated by the wavelength of methane, along with multiple reference features and local templates; Figure 4 A schematic diagram illustrating the establishment of a mapping relationship between sampling location and wavenumber and the localization of hydrogen target spectral lines using multiple effective reference features; Figure 5 This is a schematic diagram illustrating the positioning of a fixed detection window and an adaptive detection window under laser scanning drift conditions. Detailed Implementation
[0023] The technical solution of this application will be clearly and completely described below with reference to the accompanying drawings and specific embodiments. The following embodiments are used to illustrate the technical principles, implementation conditions, and specific execution process of this application, and do not constitute a limitation on the scope of protection of this application. Without departing from the technical concept of this application, technical features with clear technical basis and capable of mutual cooperation in each embodiment can be used in combination. Those skilled in the art can implement this application based on the disclosure of this application and in combination with actual testing conditions.
[0024] Example 1 This embodiment provides an adaptive positioning method for hydrogen absorption spectral lines, which is mainly used in the process of tunable semiconductor laser absorption spectroscopy detection. Based on multiple known spectral features in the methane reference spectrum, the current laser scanning coordinates are determined, and the position of the hydrogen target absorption spectral line in the current sampling sequence is determined using the scanning coordinates.
[0025] When using a tunable semiconductor laser for gas absorption spectroscopy, the laser's output wavelength is related to its operating temperature, drive current, and tuning state. As the detection environment and laser operating state change, the scanning center position and scanning span may change in different scanning cycles, causing the same theoretical spectral position to correspond to different sampling positions in different scanning cycles.
[0026] For hydrogen, which has weak absorption characteristics, directly determining the target spectral line position based on the local peaks or valleys of the hydrogen detection signal is easily affected by noise and background signal variations. If the hydrogen detection signal is always extracted from a preset fixed sampling position, the detection window may deviate from the actual target spectral line or fail to completely cover the target spectral line.
[0027] This embodiment utilizes the methane reference spectral signal corresponding to the hydrogen detection process for scanning coordinate calibration. The methane reference spectral signal contains multiple reference features with known theoretical spectral positions. By determining the actual sampling positions of these reference features within the current scanning cycle, a correspondence between the current sampling position and the spectral coordinates can be established. Then, the current sampling position is determined based on the theoretical spectral position of the hydrogen target absorption line.
[0028] Considering that there may be local noise, background changes, or abnormal sampling points in the methane reference spectrum, this embodiment performs local template matching on each reference feature before establishing the spectral coordinate mapping relationship, and selects valid reference features based on the matching confidence and the positional consistency among multiple reference features, so as to reduce the impact of abnormal matching on the spectral coordinate calibration results.
[0029] In this embodiment, methane reference features refer to spectral features in a methane reference spectral signal that have known theoretical spectral positions and can be identified through local signal morphology. Methane reference features can manifest as local peaks, local valleys, local linear shapes, or feature intervals composed of multiple consecutive sampling points.
[0030] The nominal sampling position refers to the sampling position corresponding to the methane reference feature under pre-defined reference scan conditions. This position is used to indicate the initial position of the reference feature under the reference scan conditions and serves as the basis for subsequent local searches.
[0031] A reference feature template is a local signal region containing the corresponding methane reference feature. This template is used to match the methane reference spectral signal within the current scan period to determine the position of the corresponding reference feature in the current sampling sequence.
[0032] Candidate sampling positions refer to the matching positions obtained by comparing the similarity between the reference feature template and the current methane reference spectral signal within the corresponding local search range.
[0033] Match confidence refers to the maximum similarity achieved by the reference feature template within the corresponding local search range. In this embodiment, the normalized correlation coefficient is used as the similarity evaluation index; therefore, the match confidence is specifically the maximum normalized correlation coefficient within the corresponding local search range.
[0034] The unified position change relationship refers to the position correspondence established based on the nominal sampling positions of multiple methane reference features and their current candidate sampling positions. It is used to describe the sampling position change law that different reference features follow under laser scanning change conditions.
[0035] Valid reference features refer to the methane reference features retained after matching confidence screening and positional consistency screening. The current candidate sampling positions and their theoretical spectral positions of the valid reference features are used to establish the spectral coordinate mapping relationship for the current scan cycle.
[0036] The method flow of this embodiment is as follows: Figure 1 As shown, the process includes establishing a methane reference feature template, simultaneously acquiring methane and hydrogen detection signals, matching local templates of methane reference features, screening matching confidence levels, screening multiple reference feature position consistency, establishing a mapping relationship between the current sampling position and spectral coordinates, inversely determining the current position of the hydrogen target spectral line, and extracting the local hydrogen detection signal.
[0037] like Figure 2 As shown, this embodiment employs a dual-channel laser absorption spectroscopy detection structure. This structure includes a driving and modulation module, a tunable semiconductor laser, a beam splitter, a hydrogen detection channel, a methane reference channel, a signal acquisition and demodulation module, and a data processing module.
[0038] The drive and modulation module is connected to the tunable semiconductor laser and is used to provide scanning and modulation drive signals to the tunable semiconductor laser so that its output can cover the target spectral region of the scanning laser.
[0039] The output optical path of the tunable semiconductor laser is configured to correspond with the beam splitter. The beam splitter divides the output laser into beams that enter the hydrogen detection channel and the methane reference channel, respectively.
[0040] The hydrogen detection channel includes a hydrogen absorption cell and a first detector 1. Laser light entering the hydrogen detection channel passes through the hydrogen absorption cell and is absorbed by the gas to be detected therein. The laser light passing through the hydrogen absorption cell is received by the first detector 1 and converted into a corresponding electrical signal.
[0041] The methane reference channel includes a methane reference cell and a second detector 2. Laser light entering the methane reference channel passes through the methane reference cell and is absorbed by the methane gas therein. The laser light passing through the methane reference cell is received by the second detector 2 and converted into a methane reference electrical signal.
[0042] The first detector 1 and the second detector 2 are respectively connected to the signal acquisition and demodulation module. The signal acquisition and demodulation module receives the corresponding electrical signals and completes signal acquisition and demodulation according to the laser scanning process to obtain the hydrogen detection signal and the methane reference spectrum signal, respectively.
[0043] The signal acquisition and demodulation module transmits data to the data processing module. The data processing module receives the synchronously acquired hydrogen detection signal and methane reference spectrum signal, calls the pre-stored reference feature template and related processing parameters, and sequentially performs local template matching, matching confidence screening, position consistency screening, spectral coordinate mapping, and hydrogen target spectral line localization.
[0044] In this embodiment, the hydrogen detection channel and the methane reference channel use the same tunable semiconductor laser to generate the scanning laser, so that the two detection channels correspond to the same laser scanning process.
[0045] Therefore, when the laser scanning center position or scanning span changes, the corresponding change can be reflected in the spectral signals of both channels. By analyzing the reference features with known theoretical positions in the methane reference spectral signal, the scanning coordinate information corresponding to the current hydrogen detection signal can be obtained.
[0046] In this embodiment, both the hydrogen detection channel and the methane reference channel employ wavelength modulation second harmonic detection. The driving and modulation module enables the tunable semiconductor laser to perform spectral scanning and wavelength modulation. The signal acquisition and demodulation module performs harmonic demodulation on the detection signals from both channels to obtain the hydrogen second harmonic detection signal and the methane second harmonic reference spectrum signal, respectively.
[0047] By employing second harmonic detection, harmonic signals related to gas absorption characteristics can be extracted. This embodiment utilizes identifiable local features in the methane second harmonic reference spectrum for matching and position calibration, rather than directly relying on the weak hydrogen absorption signal to determine the scanning coordinates.
[0048] The following is combined with Figure 1 The flowchart shown below provides a detailed explanation of the data processing procedure in this embodiment.
[0049] First, a multi-reference characteristic spectral scale for methane is established.
[0050] Under pre-set reference scanning conditions, a methane reference spectral signal is acquired. The reference scanning conditions are the laser scanning conditions used to establish the correspondence between the initial spectral position and the sampling position.
[0051] Under this reference scanning condition, multiple reference features with known theoretical spectral positions are selected from the methane reference spectral signal, and the theoretical spectral position and nominal sampling position corresponding to each reference feature are recorded.
[0052] Let the total selection be One methane reference characteristic, among which... This represents the total number of selected methane reference features. The theoretical spectral positions of the methane reference features are denoted as follows: The corresponding nominal sampling location is denoted as .in, This is the reference characteristic number for methane. For the theoretical spectral position corresponding to the reference feature, The sampling location of this feature is used as a reference under scanning conditions.
[0053] The theoretical spectral positions of the multiple methane reference features are represented as follows: ,in, Indicates the first The theoretical spectral position of a methane reference feature, , This represents the total number of selected methane reference features.
[0054] The theoretical spectral position of each reference feature can be represented by wavenumber, wavelength, or frequency. During the same implementation process, the theoretical spectral position of each reference feature and the subsequently established spectral coordinate mapping relationship adopt a consistent spectral coordinate form.
[0055] In this embodiment, a local line shape containing multiple continuous sampling points is preferably used as the methane reference feature, rather than using only a single peak point or valley point.
[0056] For each reference feature, a local signal range containing that reference feature is extracted from the theoretical spectral signal, experimental calibration signal, or pre-acquired high signal-to-noise ratio methane reference spectral signal to form the corresponding reference feature template.
[0057] The reference feature template preserves the signal variation relationship between multiple consecutive sampling points within the corresponding local interval. In the subsequent matching process, this local signal interval is used as the overall matching object.
[0058] Through the above processing, the theoretical spectral position, nominal sampling position and corresponding reference feature template of each methane reference feature are obtained, and the correspondence between the three is established.
[0059] The data processing module saves the above correspondence, enabling each reference feature template to be associated with its corresponding theoretical spectral position and nominal sampling position.
[0060] A multi-reference feature spectral scale for methane is constructed from multiple reference feature templates and their theoretical spectral positions. This spectral scale is used for methane reference feature matching and scan coordinate calibration in subsequent scan cycles.
[0061] The second harmonic reference spectrum of methane can contain multiple local peaks, local valleys, and local line shapes of different forms. Local signal intervals can be extracted near different reference features and used as reference feature templates.
[0062] like Figure 3 As shown, F1, F2, F3, F4, and F5 correspond to different local reference features in the methane reference spectrum, and T1, T2, T3, T4, and T5 represent the template intervals defined around the corresponding local reference features. Figure 3 WMS-2f in the text represents the wavelength-modulated second harmonic reference spectrum signal.
[0063] Since each reference feature has a different theoretical spectral position, the current positions of multiple reference features can be used together to determine the scanning coordinates, without having to rely entirely on the positional changes of a single methane absorption feature.
[0064] Secondly, acquire the dual-channel detection signal for the current scanning cycle.
[0065] In the actual detection process, the drive and modulation module controls the tunable semiconductor laser to scan the spectral region covering the hydrogen target absorption spectrum and the selected methane reference characteristics.
[0066] The laser beam passes through a beam splitter into the hydrogen detection channel and the methane reference channel. The signal acquisition and demodulation module acquires the detection signals corresponding to the two channels within the same laser scanning cycle.
[0067] Let a complete scan cycle contain There are discrete sampling points, among which... This represents the total number of sampling points within that scanning period. This indicates the sequence position of the sampling point within the current scan period, and its value range is... .
[0068] The hydrogen detection signal obtained in the current scan cycle is represented as follows: The methane reference spectral signal is represented as .
[0069] in, Indicates the first scan cycle in the current scan period The hydrogen detection signal value corresponding to each sampling location; Indicates the first scan cycle in the same scan period The methane reference spectral signal value corresponding to each sampling location.
[0070] The two signal sequences correspond to the hydrogen detection channel and the methane reference channel, respectively, and the correspondence between the sampling positions is established according to the same laser scanning process.
[0071] Since the signals from both channels originate from the same scanning laser, the changes in the sampling position in the methane reference spectrum signal can be used to characterize the position changes during the current laser scanning process, providing a reference for determining the position of the hydrogen target absorption spectral line.
[0072] After obtaining the methane reference spectral signal, preprocessing can be performed to reduce the impact of random noise and slowly varying background on local template matching.
[0073] The preprocessing may include at least one of smoothing, filtering, slow background removal, and abnormal sampling point processing.
[0074] For example, the methane reference spectral signal can be smoothed or filtered to reduce local random fluctuations; slowly changing background components can also be processed to make the local line shape of the methane reference feature easier to identify.
[0075] For locations where abnormal sampling values occur, abnormal sampling point processing can be performed to reduce the impact of the sampling point on subsequent local matching results.
[0076] After preprocessing, the correspondence between the methane reference spectral signal and the current scanning sampling sequence is preserved, and the processed methane reference spectral signal is used for subsequent reference feature localization.
[0077] In this embodiment, the reference feature template matching is based on the data of the current scanning cycle. After each scanning cycle is completed, the position of the corresponding reference feature can be re-determined using the newly obtained methane reference spectral signal.
[0078] Next, local template matching is performed on each methane reference feature.
[0079] For the A methane reference feature, at its nominal sampling location Set the corresponding local search range with the center as the center.
[0080] The local search range is represented as .
[0081] in, For the first Nominal sampling location of a methane reference feature, The preset search half-width corresponding to this reference feature. This is the reference characteristic number for methane.
[0082] This local search range is used to define the search area for the reference feature template in the current methane reference spectral signal, so that template matching is performed around the nominal sampling position of the corresponding reference feature.
[0083] Within the local search range, the corresponding reference feature template is moved point by point according to the sampling position. For each candidate position, the local signal corresponding to the template is obtained from the current methane reference spectrum signal, and the similarity between the two is calculated.
[0084] In this embodiment, the normalized correlation coefficient is preferably used as the similarity evaluation index. This evaluation index assesses the degree of matching between the reference feature template and the current local reference spectral signal by comparing the corresponding changes between the two.
[0085] Because a local line shape containing multiple continuous sampling points is used as a template, the matching process utilizes the signal change information within the local interval, rather than determining the position based solely on the amplitude extreme value of a single sampling point.
[0086] The data processing module traverses the first... For each reference feature, calculate the local search range and the normalized correlation coefficient for each candidate position.
[0087] After completing the similarity comparison within this local search range, the candidate position for obtaining the maximum normalized correlation coefficient is determined, and this position is used as the first... Candidate sampling locations of methane reference features within the current scan cycle.
[0088] The candidate sampling position is denoted as ,in, Indicates the first Candidate sampling positions of methane reference features in the current scan cycle.
[0089] At the same time, the corresponding maximum normalized correlation coefficient is denoted as This serves as the matching confidence level for the methane reference characteristic. Indicates the first The maximum template matching similarity of methane reference features.
[0090] Following the above method, local search and template matching are performed on each pre-selected methane reference feature to obtain the candidate sampling position and corresponding matching confidence of each reference feature.
[0091] The candidate sampling positions for each methane reference feature are represented as follows: The corresponding matching confidence scores are expressed as follows: .in, The total number of selected methane reference features, For the first Candidate sampling locations for each feature This represents the matching confidence level for this feature.
[0092] Each candidate sampling location is associated with the theoretical spectral location of its corresponding reference feature, enabling the subsequent selection of data for establishing spectral coordinate mapping relationships based on the reliability of the candidate locations.
[0093] Since the local search is performed separately near the nominal sampling position of each reference feature, each reference feature can independently obtain candidate matching results according to its local signal morphology.
[0094] Even if there are differences in signal intensity, local morphology, or noise influence of different methane reference features, their matching can be evaluated separately, without using the matching result of a single reference feature to represent all reference features.
[0095] Subsequently, preliminary screening was conducted based on the matching confidence level.
[0096] A pre-set matching confidence threshold is used to determine whether the matching result between the reference feature template and the current methane reference spectral signal meets the preset requirements.
[0097] The matching confidence threshold is denoted as ,in, This indicates the preset matching confidence threshold.
[0098] For the Each methane reference feature is matched with a confidence level. Matching confidence threshold Compare them.
[0099] when If the current template matching result of the methane reference feature does not meet the preset requirements, the reference feature will be removed from the candidate reference features used in subsequent position consistency checks.
[0100] when At that time, the methane reference feature and its candidate sampling location are retained so that they can continue to participate in subsequent location consistency judgments.
[0101] By filtering based on matching confidence, candidate reference features with low similarity to the corresponding template can be excluded first, reducing the number of obviously unreliable matching results entering the positional relationship fitting process.
[0102] However, a high similarity obtained by local template matching does not necessarily mean that the candidate sampling position is consistent with the scanning position change relationship of other reference features.
[0103] For example, when there are locally similar features in the current methane reference spectral signal, even if a single reference feature achieves a high matching similarity, its candidate position may still deviate from the actual position of the reference feature.
[0104] Therefore, after matching confidence screening, this embodiment further utilizes the sampling position change relationship between multiple methane reference features for consistency verification.
[0105] For the reference features retained after matching confidence filtering, obtain their nominal sampling position and current candidate sampling position respectively.
[0106] When the changes in laser scanning are mainly manifested as the overall shift in scanning position and the change in scanning span, the nominal sampling position of different reference features and the current candidate sampling position can be described by a unified position change relationship.
[0107] This relationship is represented as .
[0108] in, For the first Candidate sampling locations for each methane reference feature, The nominal sampling location of this reference feature. For parameters related to scanning scale variation, For parameters related to the change in scan position, For the first The residuals of each methane reference feature relative to the uniform positional variation relationship.
[0109] Scan scale variation parameters Used to describe the change in sampling position scale relative to reference scanning conditions during the current scan cycle. Scan position change parameter. Used to describe the sampling position offset of the current scan cycle relative to the reference scan conditions.
[0110] When the current scan change is mainly manifested as an overall positional shift, the candidate sampling positions of different methane reference features usually show similar overall positional changes.
[0111] When the scan span changes, the amount of change in sampling position corresponding to different spectral locations may be different. By using scale parameters and position offset parameters to jointly describe the sampling position relationship, both types of changes can be reflected simultaneously.
[0112] The data processing module fits the scan scale variation parameters in a unified positional variation relationship based on the nominal sampling positions and candidate sampling positions of multiple retained methane reference features. and scan position change parameters .
[0113] After obtaining the above parameters, calculate the absolute value of the residual relative to the fitted positional relationship for each candidate sampling position.
[0114] The absolute value of the residual is expressed as .
[0115] in, For the first The absolute value of the positional residuals of each methane reference feature Candidate sampling locations for this reference feature. The nominal sampling location of this reference feature. and These are the scanning scale variation parameters and scanning position variation parameters obtained from the fitting, respectively.
[0116] The above calculations can yield the magnitude of the deviation between the candidate sampling positions of each reference feature and the positions predicted by the uniform position change relationship.
[0117] Pre-set the location residual threshold and denot it as ,in, This represents the preset residual threshold used to determine the consistency of the methane reference feature position.
[0118] The absolute value of the positional residuals of each methane reference feature Compared with the preset residual threshold Compare them.
[0119] when If the candidate sampling position of the reference feature deviates from the position change relationship obtained by fitting other reference features in a manner that exceeds a preset range, the reference feature is identified as an abnormal matching feature and is removed.
[0120] when At that time, the reference feature is retained so that it can be used as a valid reference feature for the current scan coordinate calibration.
[0121] Through the above processing, the matching confidence is first used to evaluate the matching of the local line shapes of each reference feature, and then the positional relationship between multiple reference features is used to evaluate whether the candidate positions conform to the common scanning change pattern.
[0122] The two screening methods constrain the candidate matching results from two aspects: local signal similarity and consistency of multiple reference feature positions.
[0123] Among them, the matching confidence screening mainly excludes reference features with low local template matching quality; the position consistency screening further excludes abnormal matches that, although candidate positions are obtained, do not conform to the common change pattern of multiple reference features.
[0124] After the above screening, the effective methane reference features within the current scanning period are obtained, and the candidate sampling positions of each effective reference feature and its corresponding theoretical spectral positions are retained.
[0125] These effective reference features are used to establish the mapping relationship between the sampling position and the spectral coordinates of the current scan cycle.
[0126] Next, the current scan coordinate mapping relationship is established based on the effective methane reference characteristics.
[0127] After location consistency screening, the data processing module obtains the candidate sampling positions of each effective methane reference feature in the current scanning cycle, as well as the corresponding theoretical spectral positions recorded in advance.
[0128] In this embodiment, the candidate sampling position of the effective methane reference feature is taken as its current actual matching position, and the fitting data is constructed using this position and the corresponding theoretical spectral position.
[0129] Each valid reference feature constitutes a corresponding data set between the current sampling position and the known spectral position.
[0130] For the first one Each valid methane reference feature, whose current candidate sampling position is still represented as The corresponding theoretical spectral position is represented as .
[0131] in, The serial number corresponds to the methane reference characteristic. This refers to the current candidate sampling position retained after filtering based on this feature. The theoretical spectral position of this reference feature is known in advance.
[0132] The effective methane reference features were numbered in the selected order, and their sampling locations were paired with the theoretical spectral locations to form corresponding data pairs. .in, The total number of effective methane reference characteristics, For effective methane reference characteristic number, , For the first The actual sampling location of each effective methane reference feature in the current scan cycle. For the first The theoretical spectral positions corresponding to each effective methane reference feature; For the corresponding original features The positions retained after screening.
[0133] By utilizing the correspondence between the sampling positions and the theoretical spectral positions formed by multiple effective reference features, the spectral coordinate mapping relationship under the current scanning period can be obtained by fitting.
[0134] The spectral coordinate mapping relationship is used to describe the correspondence between the sampling position and the laser spectral position within the current scanning cycle.
[0135] The mapping relationship between the sampling position and the spectral coordinates in the current scan period can also be expressed as: ,in, Sampling location, The spectral coordinates corresponding to this sampling location, It is a mapping function from the sampling position to the spectral coordinates determined by the effective methane reference characteristics of the current scan cycle.
[0136] In this embodiment, the sampling position and spectral coordinates within the current scanning range are approximately linearly related, so a linear function is used to establish the mapping relationship.
[0137] The linear mapping relationship is expressed as follows: .
[0138] in, This refers to the sampling position within the current scanning period. Sampling location The corresponding spectral coordinates This refers to the scale parameter between the sampling position and the spectral coordinates in the current scan cycle. This is the position offset parameter for the spectral coordinates.
[0139] The data processing module selects candidate sampling locations based on each valid methane reference feature. and the corresponding theoretical spectral position Fitting to determine the scale parameters of the current scan cycle and position offset parameters .
[0140] Here, the scale parameter This represents the scale between the change in sampling position and the change in spectral coordinates within the current scan period; position offset parameter. This represents the offset of the corresponding linear mapping relationship on the spectral coordinates.
[0141] It should be noted that the scale parameter here... and position offset parameters Used to establish the mapping relationship between the current sampling location and spectral coordinates.
[0142] The aforementioned scanning scale variation parameters and scan position change parameters This is used to describe the relationship between the reference feature and the current candidate sampling position.
[0143] The former relation is used to determine the positional consistency among multiple reference features, while the latter relation is used to determine the actual spectral coordinates corresponding to the current sampling position. The two have different input data and processing purposes.
[0144] By fitting a linear mapping relationship using multiple selected effective reference features, the impact of abnormal candidate matching positions on the current spectral coordinate calibration results can be reduced.
[0145] Meanwhile, since the linear mapping relationship includes scale parameters and position offset parameters, when the current scan center position changes or the scan span changes, the corresponding mapping parameters can be re-determined based on the current position of the effective methane reference feature within the current scan cycle.
[0146] Multiple valid methane reference features correspond to known theoretical spectral positions. By establishing a mapping relationship between sampling positions and wavenumbers using the current sampling positions of these valid reference features, the position of the target spectral line in the current scanning coordinates can be determined based on the theoretical wavenumber of the target gas absorption line.
[0147] like Figure 4 As shown in the diagram with sampling location as the x-axis and wavenumber as the y-axis, multiple valid methane reference features provide corresponding points for location and wavenumber. The current mapping relationship is used to determine the corresponding sampling location from the theoretical wavenumber of the hydrogen target spectral line.
[0148] The above mapping relationship is obtained again based on the methane reference spectrum signal of the current scan cycle, and it is not necessary to always use the initial sampling position relationship established under the reference scan conditions.
[0149] Subsequently, the position of the hydrogen target absorption spectral line is determined based on the current scanning coordinate mapping relationship.
[0150] Before starting the detection, the theoretical spectral position of the absorption line of the hydrogen target to be detected is determined in advance. This theoretical spectral position adopts a spectral coordinate form that is consistent with the current scanning coordinate mapping.
[0151] The theoretical spectral position of the hydrogen target absorption line is denoted as... ,in, This indicates the theoretical spectral position of the target hydrogen absorption line, which is predetermined.
[0152] The data processing module will By substituting the mapping relationship between the sampling position and the spectral coordinates of the current scanning cycle, the position of the hydrogen target absorption spectral line in the current sampling sequence can be determined by inversely calculating the mapping relationship.
[0153] When using a linear mapping relationship At that time, the sampling position of the hydrogen target absorption spectrum line is according to calculate.
[0154] in, This represents the sampling position corresponding to the hydrogen target absorption spectral line within the current scan period. This represents the theoretical spectral position of the target absorption line for hydrogen. This is the scale parameter between the sampling position and the spectral coordinates in the current scan cycle. This is the position offset parameter for the current spectral coordinates, and .
[0155] Through the above calculations, even if the hydrogen absorption spectrum is affected by noise in the current hydrogen detection signal, the data processing module can still use the current scan coordinates established by the methane reference features to determine the sampling position corresponding to its theoretical position.
[0156] This process does not require accurately identifying the position of the target absorption peak from the weak hydrogen detection signal. Instead, it uses the scanning coordinates established by the methane reference spectrum signal to determine the detection position of the hydrogen target spectral line.
[0157] After obtaining the current sampling position of the hydrogen target spectral line, the data processing module extracts the local detection signal from the synchronously obtained hydrogen detection signal based on this position.
[0158] Specifically, based on the current sampling position of the hydrogen target absorption spectral line. Set up a local detection window centered on the target area.
[0159] The sampling position range of the local detection window is represented as follows: .
[0160] in, To determine the sampling position of the hydrogen target absorption spectral line based on the current scanning coordinate mapping relationship, The half-width of the pre-set local detection window.
[0161] The data processing module obtains the hydrogen detection signal from the current scan cycle. In the process, discrete sampling data located within the local detection window are extracted and used as the local hydrogen detection signal corresponding to the current scanning cycle.
[0162] The above-mentioned local signal extraction process is also expressed as: .in, This is a captured local hydrogen detection signal. This indicates that a local signal is extracted from the current hydrogen detection signal according to the sampling position range specified in square brackets. This represents the current sampling position of the hydrogen target absorption line. The width of the local detection window is half its width.
[0163] Since the center position of the detection window is re-determined based on the methane reference characteristics of the current scanning cycle, the detection window can adjust its position accordingly based on the current scanning coordinates when the center position of the laser scan shifts.
[0164] When the change in the scanning span causes a change in the scale relationship between the sampling position and the actual spectral position, the data processing module can also use the currently fitted mapping scale parameter to recalculate the sampling position of the hydrogen target spectral line and determine the center position of the detection window accordingly.
[0165] It should be noted that this embodiment adapts to changes in the current scan coordinates by updating the center position of the detection window. The local detection window uses a preset half-width, and its extraction range is determined by the inversely calculated center position and the preset half-width.
[0166] When the laser scanning position changes, the fixed detection window still corresponds to the originally set sampling area, while the adaptive detection window determined according to the methane reference characteristics can be adjusted according to the currently predicted hydrogen target spectral line position.
[0167] like Figure 5 As shown, the fixed detection window and the adaptive detection window correspond to the fixed sampling interval and the sampling interval determined based on the estimated position of the current methane reference feature, respectively. The figure also illustrates the nominal and actual positions of the hydrogen target spectral line to explain the relative relationship between the two windows during scan drift.
[0168] This reduces the risk of the detection window and the target spectral line position becoming inconsistent due to changes in the scanning position.
[0169] The extracted local hydrogen detection signal retains the signal information within the detection interval where the target absorption spectral line is located, which can be used for subsequent hydrogen absorption spectral line fitting, feature extraction, or hydrogen concentration inversion.
[0170] The method described in this embodiment uses the current sampling position of the hydrogen target absorption spectrum and the extraction of local detection signals as the processing result. Subsequent concentration inversion can utilize the obtained local detection signals, but this does not affect the implementation process of the localization method in this embodiment.
[0171] Under a specific implementation condition, the scanning wavelength range of the tunable semiconductor laser is approximately to Each complete scan cycle contains 1600 discrete sampling points.
[0172] in, It represents micrometers.
[0173] Within this scanning band, the theoretical wavenumber is selected to be located at The nearby hydrogen absorption lines are used as target spectral lines, among which... This indicates the wavenumber unit, which is per centimeter.
[0174] Both the hydrogen detection channel and the methane reference channel employ wavelength modulation second harmonic detection.
[0175] Under pre-defined reference scanning conditions, the second harmonic reference spectrum signal of methane is first obtained. Several identifiable local reference features of methane are selected from this signal, and their nominal sampling positions and corresponding theoretical wavenumbers under the reference scanning conditions are recorded. Local reference feature templates are then established for each feature.
[0176] Within the current laser scanning cycle, the hydrogen second harmonic detection signal and the methane second harmonic reference spectrum signal are acquired simultaneously.
[0177] The data processing module reads the pre-stored methane reference feature template and performs local searches near the nominal sampling positions of each reference feature.
[0178] Within each local search range, the candidate sampling location and matching confidence of the reference feature are determined by comparing the normalized correlation coefficient between the current methane reference spectral signal and the corresponding reference feature template.
[0179] For methane reference features whose matching confidence does not meet the preset requirements, they are removed from the reference features used in subsequent position consistency checks.
[0180] For the retained methane reference features, a unified position change relationship is fitted based on the nominal sampling position and the candidate sampling position. Then, the absolute value of the position residual is used to determine whether each candidate position conforms to the common scanning position change pattern among multiple reference features.
[0181] Reference features whose absolute position residual value exceeds a preset threshold are identified as abnormal matches and removed from the reference features used for scan coordinate calibration.
[0182] When the effective methane reference features retained after screening can meet the fitting requirements of the linear mapping relationship, the linear mapping relationship between the sampling position and the wavenumber of the current scanning cycle is obtained by fitting based on the current candidate sampling position and the corresponding theoretical wavenumber.
[0183] Subsequently, the theoretical wavenumber of the hydrogen target absorption line was determined. Substituting the current linear mapping relationship, we can inversely calculate the position of the hydrogen target spectral line in the sampling sequence consisting of the current 1600 sampling points.
[0184] The data processing module uses the position obtained by inversion as the center, and extracts the corresponding local signal interval from the current hydrogen second harmonic detection signal to obtain the local detection signal for subsequent hydrogen absorption spectral analysis.
[0185] After completing the localization process for the current scan cycle, the next scan cycle can continue to acquire new methane reference spectral signals and hydrogen detection signals. Following the template matching, feature screening, mapping reconstruction, and target position inversion process described above, the hydrogen target spectral line position for the corresponding scan cycle is re-determined.
[0186] By updating the mapping relationship using the position of the current methane reference feature on a scan cycle basis, this embodiment can adjust the sampling position of the hydrogen target spectral line according to the changes in the laser scanning position and scanning span, without always limiting the hydrogen target spectral line to the fixed sampling position corresponding to the initial reference scanning conditions.
[0187] In this embodiment, there are clear data relationships between the various technical processing steps.
[0188] First, the local reference feature template is matched with the current methane reference spectral signal to obtain the candidate sampling positions of each reference feature and their matching confidence.
[0189] Secondly, by matching confidence screening and location consistency screening, valid reference features for establishing the current spectral coordinates are determined.
[0190] Subsequently, a spectral coordinate mapping relationship for the current scanning cycle is established using the current candidate sampling position of the effective reference feature and the known theoretical spectral position.
[0191] Finally, the current sampling position is determined by inversely based on the theoretical spectral position of the hydrogen target spectral line, and the corresponding local hydrogen detection signal is extracted using this position.
[0192] Local template matching provides candidate positions for each methane reference feature; matching confidence screening is used to exclude reference features with low local matching quality; multi-reference feature position consistency screening is used to further exclude abnormal matches that do not conform to the common scan change relationship; and spectral coordinate mapping converts the positions of the selected valid reference features into the spectral coordinate relationship of the current scan cycle.
[0193] The above process can reduce the occurrence of abnormal reference matching results directly participating in spectral coordinate fitting, and reduce the influence of the noise of the weak hydrogen absorption signal itself on the determination of the initial position of the target spectral line.
[0194] The localization process in this embodiment mainly relies on the matching, screening, and coordinate mapping of methane reference spectral features. Since the position of the hydrogen target spectral line is obtained based on the known theoretical spectral position and the current scanning coordinates, the target position can be determined without directly relying on the weak absorption signal of hydrogen to find the peak, and the corresponding hydrogen detection signal can be extracted.
[0195] Thus far, this embodiment has completed the entire processing procedure from establishing the methane reference feature template, acquiring dual-channel signals, local matching of multiple reference features, screening of abnormal matches, reconstructing the current scan coordinates, to determining the position of the hydrogen target absorption spectral line and extracting the local detection signal.
[0196] Example 2 This embodiment, based on Embodiment 1, further illustrates the specific implementation methods for selecting methane reference features, establishing reference feature templates, processing detection signals, and local template matching.
[0197] This embodiment still uses the methane reference spectral signal to assist in determining the position of the hydrogen target absorption line, and its detection system structure and basic processing flow are the same as in Embodiment 1. Technical content that is the same as in Embodiment 1 will not be described again.
[0198] In this embodiment, the methane reference spectral signal may contain multiple local features with known theoretical spectral positions. Each local feature may be represented as a local peak, a local valley, or a local line shape composed of multiple consecutive sampling points.
[0199] When selecting methane reference features, multiple local features that can be identified in the spectral signal can be selected based on the characteristic distribution of the methane reference spectrum in the corresponding scanning band, and the correspondence between each feature and its theoretical spectral position can be established.
[0200] The second harmonic reference spectrum of methane exhibits different local signal morphologies at different sampling locations. Some reference features show local positive peaks, some show local negative valleys, and some contain continuously varying combinations of peaks and valleys.
[0201] The aforementioned local features can all be used to establish corresponding reference feature templates. However, when matching templates, it is necessary to ensure that the region to be matched in the current methane reference spectrum signal has a comparable signal form with the corresponding template.
[0202] In one implementation, a reference feature template can be established based on the theoretical spectral signal.
[0203] Specifically, based on the known theoretical spectral position of the methane reference feature, a local interval containing the corresponding reference feature is determined in the theoretical spectral signal, and then the signal sequence within this local interval is extracted as a template for the corresponding reference feature.
[0204] In another implementation, a reference feature template can be established based on the experimental calibration signal.
[0205] Specifically, under pre-set reference scanning conditions, methane reference spectral signals are acquired, and the nominal sampling positions corresponding to each reference feature are determined based on known theoretical spectral positions. Local signal intervals containing the corresponding reference features are extracted near each nominal sampling position to form the corresponding reference feature template.
[0206] The reference feature template can also be obtained from a pre-acquired high signal-to-noise ratio methane reference spectral signal.
[0207] Specifically, the local signal intervals of each reference feature are determined in the high signal-to-noise ratio methane reference spectral signal, and the continuous sampling data within the corresponding intervals are saved as corresponding templates.
[0208] Regardless of which source the reference feature template uses, the theoretical spectral position and nominal sampling position of the corresponding reference feature are recorded, so that the template can be associated with the corresponding spectral coordinates and reference scan position.
[0209] In a preferred embodiment, each reference feature template adopts a local line type that includes multiple consecutive sampling points.
[0210] Compared to using only a single peak or valley sampling point, a local linear template contains signal variation information between multiple adjacent sampling points. During the matching process, candidate sampling positions can be determined based on the similarity between the entire local signal interval and the current reference spectral signal.
[0211] When individual sampling points in a local signal are affected by random noise, using a local line shape composed of continuous sampling points as the matching object can reduce the sensitivity to fluctuations of individual sampling points when relying solely on single-point extrema for localization.
[0212] This embodiment does not require all methane reference features to have the same local line shape. Different reference features can each use a reference feature template corresponding to their own local signal morphology.
[0213] When creating templates, the number of sampling points contained in each template is recorded so that the local signal range corresponding to the template can be obtained from the current methane reference spectrum signal for matching.
[0214] In this embodiment, the hydrogen detection signal and the methane reference spectrum signal can be direct absorption signals or harmonic signals obtained through wavelength modulation and harmonic demodulation.
[0215] When using direct absorption signals, the signal acquisition and demodulation module acquires the direct absorption detection signals corresponding to the two detection channels. The data processing module performs local template matching and subsequent scan coordinate calibration based on the reference characteristics in the methane direct absorption spectrum.
[0216] When using wavelength modulation second harmonic detection, the drive and modulation module controls the tunable semiconductor laser to perform wavelength scanning and modulation. The hydrogen detection channel and methane reference channel respectively obtain the corresponding detection electrical signals, which are then demodulated by the signal acquisition and demodulation module for second harmonics.
[0217] At this point, the reference feature template can adopt a local second harmonic line shape corresponding to the current methane second harmonic reference spectrum signal.
[0218] Under the two signal formats mentioned above, the methane reference channel and the hydrogen detection channel both correspond to the same laser scanning process. Therefore, the current sampling position of the methane reference feature can be used to establish the scanning coordinate relationship corresponding to the hydrogen detection signal.
[0219] Before performing local template matching, the data processing module can preprocess the current methane reference spectral signal.
[0220] The preprocessing may include at least one of smoothing, filtering, slow background removal, and abnormal sampling point processing.
[0221] Smoothing and filtering processes are primarily used to reduce random signal fluctuations in the methane reference spectrum. Slow-varying background removal is used to reduce the impact of slowly changing background components on the local reference line shape. Outlier sampling point processing is used to reduce the interference of local anomalous data on the template matching results.
[0222] After preprocessing, the current methane reference spectral signal still maintains the correspondence with the sampling position of the current scanning cycle, enabling the subsequent determination of candidate sampling positions for each reference feature.
[0223] For different pre-selected methane reference features, corresponding local search ranges can be set respectively.
[0224] For example, when different methane reference features correspond to different nominal sampling positions, the local search range is determined by taking their respective nominal sampling positions as the center and according to the corresponding preset search half-width.
[0225] The local search half-width of different methane reference features can be preset separately, and it is not required that the local search range of all reference features be exactly the same.
[0226] The local search range is used to determine the search position of the reference feature template in the current methane reference spectral signal. The data processing module moves the template within this range, compares the similarity between the template and the current local spectral signal, and determines the corresponding candidate sampling position.
[0227] Furthermore, when using the normalized correlation coefficient to evaluate template similarity, the similarity can be calculated according to the amplitude variation relationship between corresponding sampling points in the local signal interval.
[0228] Let the first The template for each methane reference feature contains The nth consecutive sampling point in the template The signal value of each sampling point is represented as: .
[0229] in, This is the reference characteristic number for methane. The number of sampling points corresponding to the reference feature template. The sampling point number inside the template. For the first one in this template The signal value at each sampling point.
[0230] When the reference feature template moves to the candidate sampling position in the current methane reference spectrum signal At that time, a local signal interval with the same number of sampling points as the template is obtained.
[0231] The first local signal interval The signal value of each sampling point is represented as: .
[0232] in, These are the candidate sampling locations within the current local search range. For the first Each reference feature template is located at the candidate sampling position. At that time, the corresponding methane reference spectral signal in the current methane reference spectrum signal is the first... The signal value at each sampling point.
[0233] When both the template and the current local signal interval have non-zero amplitude changes, the similarity can be calculated using the following normalized correlation coefficient formula:
[0234] in, Indicates the first A methane reference feature template is located at the candidate sampling position. At that time, the normalized correlation coefficient between the current methane reference spectral signal and the corresponding local interval; For the first The arithmetic mean of the signal values of each sampling point in a reference feature template; Candidate sampling locations This is the arithmetic mean of the signal values at each sampling point within the corresponding local signal interval. The meanings of the remaining parameters are the same as those defined above.
[0235] The above-mentioned normalized correlation coefficient calculation method uses the relationship between the template and the changes of each sampling point in the current local signal interval relative to their respective average values to evaluate the degree of local linear similarity.
[0236] For the Each methane reference feature is used, and the data processing module traverses the candidate sampling positions within its local search range and calculates the corresponding normalized correlation coefficients for each.
[0237] The maximum normalized correlation coefficient obtained within the local search range is used as the matching confidence of the reference feature, and the candidate sampling position where the maximum normalized correlation coefficient is obtained is used as the current candidate sampling position of the reference feature.
[0238] Let the first The set consists of all candidate sampling locations within the local search range of each methane reference feature. ,in, Indicates the first The set of candidate sampling locations corresponding to each reference feature.
[0239] The matching confidence of this reference feature is then expressed as:
[0240] in, For the first Matching confidence of each methane reference feature Candidate sampling locations The corresponding normalized correlation coefficient, This is the set of candidate sampling locations within the corresponding local search range.
[0241] The candidate sampling position with the largest normalized correlation coefficient is obtained and used as the candidate sampling position for this reference feature. .in, Indicates the first Candidate sampling locations obtained by template matching for each methane reference feature within the current scan cycle.
[0242] Following the above processing method, candidate sampling locations and matching confidence levels for multiple methane reference features can be obtained respectively.
[0243] The data processing module compares the matching confidence of each reference feature with the preset matching confidence threshold and excludes reference features whose matching confidence does not meet the preset requirements.
[0244] For the retained methane reference features, continue to perform the unified position change relationship fitting and position residual judgment in Example 1 to further determine the effective reference features that meet the position consistency requirements of multiple reference features.
[0245] Since local linear template matching and multi-reference feature position consistency verification judge candidate matching results from two aspects, namely signal morphology and sampling position change relationship, it can reduce the situation where local abnormal matching directly participates in scan coordinate fitting.
[0246] In this embodiment, the normalized correlation coefficient is a specific template similarity evaluation method. If the candidate sampling positions of the reference features and the corresponding matching quality information are available, other matching or fitting methods that can obtain the local reference spectral feature positions can also be used.
[0247] Regardless of the selected reference feature type, template source, and detection signal form, the basic processing relationship of establishing the current scan coordinates using multiple methane reference features remains unchanged.
[0248] Through the above implementation methods, the corresponding reference feature template can be selected according to the specific morphology of the methane reference spectral signal, and candidate reference features for subsequent position consistency screening can be obtained according to the local matching results within the current scanning cycle.
[0249] Example 3 Based on Example 1, this embodiment further illustrates the implementation method of establishing a nonlinear spectral coordinate mapping relationship using multiple effective methane reference features when there is a non-negligible nonlinear tuning relationship during laser scanning, and determining the current sampling position of the hydrogen target absorption spectrum line accordingly.
[0250] In Example 1, when the sampling position and spectral coordinates within the current scanning range are approximately linearly related, a linear function is used to establish the mapping relationship between the sampling position and the spectral coordinates.
[0251] However, in actual scanning processes, the correspondence between the sampling position and the output spectrum position of a tunable semiconductor laser does not always strictly conform to a linear variation law.
[0252] When there is a non-negligible nonlinear tuning relationship during the scanning process, using only a linear function to describe the correspondence between the current sampling position and the spectral coordinates may result in mapping errors.
[0253] Therefore, this embodiment utilizes the effective methane reference features obtained after matching confidence screening and multi-reference feature position consistency screening to establish a nonlinear spectral coordinate mapping relationship within the current scanning cycle.
[0254] This embodiment still uses the same method as in Embodiment 1 for acquiring methane reference spectral signals and hydrogen detection signals.
[0255] Within the current laser scanning cycle, hydrogen detection signals and methane reference spectral signals are acquired simultaneously, and local template matching is performed on the current methane reference spectral signal based on multiple pre-established methane reference feature templates.
[0256] For each methane reference feature, obtain its current candidate sampling location and matching confidence.
[0257] First, reference features whose local matching quality does not meet the preset requirements are removed based on the matching confidence threshold. Then, a unified positional change relationship is established based on the nominal sampling position of the retained reference features and the current candidate sampling position, and the absolute value of the residual of each candidate position relative to this relationship is calculated.
[0258] Reference features whose absolute position residual value exceeds a preset residual threshold are discarded to obtain valid methane reference features for current scan coordinate calibration.
[0259] In this embodiment, the aforementioned position consistency screening is still used to determine whether the candidate sampling positions of each reference feature conform to a common scanning variation pattern. After completing the screening of valid reference features, a nonlinear spectral coordinate mapping relationship is established based on the corresponding data between the current sampling position and the theoretical spectral position.
[0260] It should be noted that location consistency filtering and spectral coordinate mapping deal with different objects.
[0261] The positional consistency screening is based on the nominal sampling position of the methane reference feature and the current candidate sampling position to determine whether the candidate matching results conform to a common positional change pattern.
[0262] The spectral coordinate mapping determines the correspondence between the current sampling position and the actual spectral coordinates based on the current sampling position and its theoretical spectral position of the selected valid reference features.
[0263] Therefore, the subsequent use of nonlinear functions to establish spectral coordinate mapping relationships does not change the aforementioned processing order of using matching confidence and positional consistency to screen effective reference features.
[0264] After completing the screening of valid reference features, the data processing module reads the candidate sampling positions of each valid methane reference feature and its pre-recorded theoretical spectral positions.
[0265] Let the first Candidate sampling locations for each effective methane reference feature are: Its corresponding theoretical spectral position is .
[0266] in, This is the reference characteristic number for methane. This refers to the current candidate sampling position retained after filtering based on the reference feature. The theoretical spectral position corresponding to the known reference features.
[0267] The current candidate sampling position and theoretical spectral position of each effective reference feature are combined to form the corresponding fitting data.
[0268] When the number of effective reference features meets the requirements of nonlinear mapping fitting, and there is a nonlinear tuning relationship that cannot be ignored in the current scanning process, a quadratic polynomial can be used to establish the mapping relationship between the current sampling position and the spectral coordinates.
[0269] This mapping relationship is represented as follows:
[0270] in, This refers to the sampling position within the current scanning period. Sampling location The corresponding spectral coordinates The coefficient of the quadratic term, The coefficient of the linear term, It is a constant term, and .
[0271] The data processing module determines the coefficients of each term in the quadratic polynomial by fitting the candidate sampling positions of multiple effective methane reference features and their corresponding theoretical spectral positions.
[0272] Through the above fitting, a quadratic polynomial mapping relationship between the sampling position and the spectral coordinates within the current scanning period is obtained.
[0273] Compared to the linear mapping relationship in Example 1, the quadratic polynomial adds a quadratic term to describe the nonlinear change between the sampling position and the spectral coordinates.
[0274] Therefore, when there is a non-negligible nonlinear relationship between the sampling position and the spectral coordinates in the current scanning process, and when the effective reference features can provide position data that meets the fitting requirements, this relationship can be described by a quadratic polynomial.
[0275] In this embodiment, the coefficients of each term of the quadratic polynomial are obtained by refitting based on the effective methane reference characteristics within the current scan cycle, instead of directly using the fixed mapping coefficients under the reference scan conditions.
[0276] When the sampling position of the methane reference feature changes in a subsequent scan cycle, the corresponding nonlinear mapping relationship can be updated based on the valid reference feature position obtained again in that scan cycle.
[0277] By using the above method, the current spectral coordinate mapping relationship can correspond to the methane reference feature position obtained in this scanning cycle, instead of always relying on the coordinate relationship under the initial reference scanning conditions.
[0278] After establishing the quadratic polynomial mapping relationship, the data processing module calculates the position of the hydrogen target spectral line in the current sampling sequence based on the pre-determined theoretical spectral position of the hydrogen target absorption spectral line.
[0279] Let the mapping relation of the quadratic polynomial be denoted as... ,in, This represents the mapping function from the sampling position to the spectral coordinates obtained by fitting the effective methane reference features of the current scan cycle.
[0280] In this embodiment, .
[0281] in, This is the current sampling location. , and These are the coefficients of the quadratic term, the coefficients of the linear term, and the constant term of the quadratic polynomial, respectively.
[0282] Let the theoretical spectral position of the hydrogen target absorption line be... ,in, The theoretical spectral position of the target hydrogen absorption line is predetermined.
[0283] When the mapping relationship can determine the corresponding sampling position within the scanning interval where the hydrogen target spectral line is located, the current sampling position of the hydrogen target spectral line is represented as follows:
[0284] in, This represents the position of the target hydrogen absorption line in the current sampling sequence. This represents the inverse mapping of the current sampling position to spectral coordinates within the applicable scanning range. This represents the theoretical spectral position of the target absorption line for hydrogen.
[0285] For the quadratic polynomial in this embodiment, the inverse process corresponds to determining the current sampling position that satisfies the following relationship:
[0286] in, , and These are the quadratic coefficients, linear coefficients, and constant term obtained by fitting the effective methane reference characteristics based on the current scan cycle. The sampling location for the target hydrogen absorption spectral line to be determined. The theoretical spectral position of the target absorption line.
[0287] If the position of the hydrogen target spectral line can be determined according to the mapping relationship within the current scanning interval, the data processing module obtains the corresponding sampling position as the hydrogen target spectral line positioning result for the current scanning cycle.
[0288] Subsequently, following the local signal extraction method in Example 1, a local detection window was set with the determined hydrogen target spectral line sampling position as the center.
[0289] The sampling position range of the local detection window is represented as follows:
[0290] in, To determine the sampling position of the hydrogen target absorption spectral line based on the current nonlinear spectral coordinate mapping relationship, This is the preset half-width of the local detection window.
[0291] The data processing module extracts the sampling data located within the local detection window from the hydrogen detection signal synchronously acquired in the current scanning cycle to obtain the corresponding local hydrogen detection signal.
[0292] In the above process, the methane reference spectral signal is used to determine the spectral coordinate mapping relationship of the current scanning cycle, while the hydrogen detection signal is used as the target local signal extraction object.
[0293] Therefore, even if the signal amplitude of the hydrogen target absorption line is weak, the sampling position of the target line can be determined based on the spectral coordinate information provided by the methane reference characteristics, without having to directly rely on the peak and valley positions in the weak hydrogen absorption signal to complete the scanning coordinate calibration.
[0294] When there is a nonlinear tuning relationship during laser scanning, a quadratic polynomial can describe the corresponding nonlinear change between the sampling position and the spectral coordinates, so that the hydrogen target position can be determined based on the currently fitted coordinate relationship.
[0295] This embodiment uses a quadratic polynomial as the specific form of the nonlinear spectral coordinate mapping relationship. When there is a non-negligible nonlinear tuning relationship during the scanning process and the number of effective reference features meets the fitting requirements, other nonlinear functions can also be used to establish the mapping relationship.
[0296] Even when using other nonlinear functions, the mapping relationship is still determined based on the current candidate sampling position and theoretical spectral position of the effective methane reference feature, and then the corresponding sampling position is calculated by reversing the theoretical spectral position of the hydrogen target absorption line.
[0297] The form of the mapping function used does not change the basic processing relationship between the aforementioned local template matching, matching confidence screening, multi-reference feature position consistency screening, and hydrogen local detection signal extraction.
[0298] Therefore, under scanning conditions where the sampling position and spectral coordinates are approximately linearly related, the linear mapping method of Example 1 can be used; when there is a non-negligible nonlinear tuning relationship and the effective reference features can meet the fitting requirements, the nonlinear mapping method of this embodiment can be used.
[0299] All different mapping methods use the selected effective methane reference features as input and aim to determine the sampling position of the hydrogen target absorption line in the current scan cycle.
[0300] The obtained local hydrogen detection signal can be further used for hydrogen absorption line fitting, spectral feature extraction, or hydrogen concentration inversion.
[0301] In this embodiment, the methane reference spectral signal is used for scanning coordinate calibration, while the hydrogen detection signal is used for target absorption information extraction. The two signals are correlated through the same laser scanning process and the currently established spectral coordinate mapping relationship.
[0302] Through the above implementation methods, under different laser scanning coordinate changes, the corresponding current spectral coordinate relationship can be established based on the effective methane reference characteristics, and the position of the hydrogen target absorption spectral line and the corresponding local detection signal can be determined accordingly.
[0303] The above embodiments illustrate the adaptive localization method for hydrogen absorption lines provided in this application. Embodiment 1 illustrates the complete process of local template matching, matching confidence screening, position consistency verification, scan coordinate mapping, and hydrogen target absorption line localization using multiple methane reference spectral features. Embodiment 2 further illustrates the selection method of methane reference features, the establishment method of reference feature templates, the processing method of detection signals, and the specific implementation of local template matching. Embodiment 3 illustrates the implementation method of establishing a nonlinear spectral coordinate mapping relationship using effective methane reference features when a non-negligible nonlinear tuning relationship exists.
[0304] The technical means described in the above embodiments can be combined and used according to actual detection conditions, provided there are no technical contradictions and they can be used in combination. For example, a corresponding reference feature template can be selected based on the specific characteristics of the methane reference spectral signal, a publicly available signal preprocessing method can be used based on the actual situation of the detection signal, and a corresponding mapping function can be used based on the correspondence between the current sampling position and the spectral coordinates. None of the above selections change the basic technical concept of establishing the current scanning coordinates using the methane reference feature positioning results and determining the position of the hydrogen target absorption spectral line based on the scanning coordinates.
[0305] It should be understood that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit the scope of protection of this application. Those skilled in the art, based on a full understanding of the disclosure of this application, can make equivalent substitutions or appropriate modifications to the relevant technical means without departing from the technical concept of this application. Different implementation methods disclosed in this application can also be reasonably combined where technically compatible. The scope of protection of this application is determined by the contents of the claims.
Claims
1. A hydrogen absorption spectral line self-adaptive positioning method, characterized in that, include: Under the preset reference scanning conditions, multiple methane reference features with known theoretical spectral positions are selected from the methane reference spectral signal. The theoretical spectral position and nominal sampling position of each feature are recorded, and a corresponding reference feature template is established with the local signal interval containing each feature. Hydrogen detection signals and methane reference spectral signals are acquired synchronously within the same laser scanning cycle, and the methane reference spectral signals are preprocessed. Local search ranges are set with the nominal sampling position as the center. The corresponding reference feature template is moved within each local search range. The similarity between the template and the current methane reference spectrum signal is calculated. The position corresponding to the maximum similarity is determined as the candidate sampling position, and the maximum similarity is used as the matching confidence. Methane reference features with matching confidence scores below a preset matching confidence threshold are removed. A unified positional change relationship is fitted using the nominal sampling positions and candidate sampling positions of the remaining methane reference features. The absolute value of the residuals of each candidate sampling position relative to the relationship is calculated. Methane reference features with absolute residual values exceeding a preset residual threshold are removed to obtain effective methane reference features. A mapping relationship between the sampling position and spectral coordinates of the current scan cycle is established based on the candidate sampling positions of the effective methane reference features and the corresponding theoretical spectral positions. Based on the theoretical spectral position of the hydrogen target absorption line and the mapping relationship, the position of the line in the current sampling sequence is calculated, and a local detection signal is extracted from the hydrogen detection signal with the position as the center.
2. The hydrogen absorption line self-adapting positioning method according to claim 1, characterized in that, The methane reference feature is a local peak, local valley, local line shape, or a feature interval composed of multiple consecutive sampling points in the methane reference spectral signal; the reference feature template is composed of the corresponding local signal interval extracted from the theoretical spectral signal, experimental calibration signal, or pre-acquired high signal-to-noise ratio methane reference spectral signal.
3. The hydrogen absorption line self-adapting positioning method according to claim 2, characterized in that, The reference feature template adopts a local methane line shape containing multiple continuous sampling points. When matching the reference feature template with the current methane reference spectral signal, the continuous sampling points corresponding to the local methane line shape are used as the overall matching object.
4. The hydrogen absorption line self-adapting positioning method according to claim 1, characterized in that, The hydrogen detection signal and the methane reference spectrum signal are obtained in the following way: the scanning laser generated by the same tunable semiconductor laser is split and enters the hydrogen detection channel and the methane reference channel respectively. After detection and harmonic demodulation by the photodetectors corresponding to the two channels, the hydrogen detection signal and the methane reference spectrum signal are obtained respectively. The signals obtained by the two channels are wavelength-modulated second harmonic signals.
5. The hydrogen absorption line self-adapting positioning method according to claim 4, characterized in that, Before matching the reference feature template with the current methane reference spectral signal, at least one of the following is performed on the methane reference spectral signal: smoothing, filtering, slow background removal, and abnormal sampling point processing.
6. The hydrogen absorption line self-adapting positioning method according to claim 1, characterized in that, For the first methane reference feature, the local search range is represented as wherein, is the methane reference feature serial number, is the nominal sampling position of the methane reference feature, is the corresponding preset search half-width; the corresponding reference feature template is moved sample point by sample point within the local search range, and the normalized correlation coefficient is used as the evaluation index of the similarity.
7. The hydrogen absorption line self-adapting positioning method according to claim 6, characterized in that, fitting a unified position variation relationship between the nominal sampling positions of the remaining methane reference features and the candidate sampling positions, the unified position variation relationship being expressed as wherein, is a methane reference feature index number, is a candidate sampling position of the th methane reference feature, is a nominal sampling position thereof, is a scan scale variation parameter, is a scan position variation parameter, is a corresponding position residual; according to Calculate the absolute value of the position residual, where, For the first The absolute value of the position residual of each methane reference feature is used to eliminate abnormally matched methane reference features based on the comparison result between the absolute value of the position residual and a preset residual threshold.
8. The hydrogen absorption line self-adapting positioning method according to claim 7, characterized in that, The mapping relationship between the sampling position and the spectral coordinate adopts a linear function wherein, is the sampling position in the current scanning period, is the corresponding spectral coordinate, is a scale parameter between the sampling position and the spectral coordinate in the current scanning period, is a position offset parameter of the spectral coordinate; determined according to the candidate sampling position of each effective reference feature and the corresponding theoretical spectral position fitting and .
9. The hydrogen absorption line self-adapting positioning method according to claim 8, characterized in that, According to the linear function, the position of the hydrogen target absorption spectral line in the current sampling sequence is inversely solved, and the position is calculated according to wherein, is the position of the hydrogen target absorption spectral line in the current sampling sequence, is the theoretical spectral position of the hydrogen target absorption spectral line, is the scale parameter and , is the position offset parameter.
10. The adaptive localization method for hydrogen absorption lines according to claim 9, characterized in that, with a local detection window centered at the current sampling position, the signal within the interval is taken from the current hydrogen detection signal as the local detection signal, wherein is the position of the hydrogen target absorption line in the current sampling sequence, is a preset half-width of the local detection window.
