Signal noise reduction method and gas concentration detection method based on improved threshold function

By improving the signal denoising method of the threshold function and combining CEEMDAN decomposition and wavelet thresholding, the problem of noise suppression and signal preservation in TDLAS signals was solved, achieving high-precision gas concentration detection and improving the system's stability and detection capability.

CN121658786APending Publication Date: 2026-03-13UNIV OF SCI & TECH BEIJING
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-05
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing technologies struggle to preserve the original amplitude and waveform characteristics of the second harmonic signal of tunable diode laser absorption spectroscopy (TDLAS) while suppressing the effects of noise, resulting in insufficient accuracy and stability of gas detection systems, especially poor detection performance in low-concentration or harsh environments.

Method used

A signal denoising method using an improved threshold function is proposed. The signal is decomposed into intrinsic mode function components by an adaptive empirical mode decomposition algorithm, and the wavelet coefficients are processed by an improved wavelet threshold function. This achieves decisive noise removal and high-fidelity preservation of the effective signal. The specific steps include CEEMDAN decomposition, noise-dominated IMF identification, and improved wavelet threshold denoising.

Benefits of technology

It significantly improves signal noise reduction accuracy and waveform fidelity, enhances the signal-to-noise ratio, detection accuracy, and system stability of gas concentration detection, effectively suppresses noise interference, and is suitable for high-precision gas concentration detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121658786A_ABST
    Figure CN121658786A_ABST
Patent Text Reader

Abstract

The invention provides a signal noise reduction method and a gas concentration detection method based on an improved threshold function. The signal noise reduction method comprises the following steps: decomposing an original signal containing noise into a plurality of signal components; wavelet threshold noise reduction processing is carried out on at least part of the signal components, and wavelet coefficients are processed through an improved threshold function in the processing process; and performing signal reconstruction based on a wavelet threshold noise reduction processing result to obtain a de-noised signal. A threshold function containing an exponential attenuation item is introduced, the function is continuous and smooth at a threshold point, when the amplitude of a wavelet coefficient is just larger than a threshold, the function can provide smooth shrinkage similar to a soft threshold, and signal oscillation caused by a hard threshold function is effectively avoided; when the amplitude of the wavelet coefficient is far greater than a threshold value, the exponential attenuation item rapidly approaches zero, so that the processed coefficient infinitely approaches the original coefficient; noise with small amplitude can be filtered out, high-fidelity preservation can be carried out on a large-amplitude coefficient, and the signal noise reduction precision and the waveform fidelity are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of signal processing technology, and in particular to a signal denoising method and a gas concentration detection method based on an improved threshold function. Background Technology

[0002] Tunable diode laser absorption spectroscopy (TDLS) is a high-precision, highly selective method for gas concentration detection. It inverts gas concentration by detecting the attenuation of a specific wavelength of laser light after absorption by a gas. While the second harmonic signal of this technique exhibits excellent signal-to-noise ratio enhancement, it remains highly susceptible to complex noises such as laser noise, detector noise, and environmental background interference, leading to decreased measurement accuracy. This problem is particularly pronounced when detecting trace gases at low concentrations or in harsh environments.

[0003] To suppress the effects of noise, existing technologies widely employ signal processing methods. Among these, wavelet thresholding denoising has been extensively studied due to its excellent time-frequency localization characteristics. Commonly used hard thresholding and soft thresholding functions suffer from inherent drawbacks, such as discontinuous threshold points leading to signal oscillations, and constant compression of all coefficients greater than the threshold resulting in over-smoothing and amplitude distortion. Furthermore, empirical mode decomposition (EMD), as another adaptive signal processing tool, has been applied to signal decomposition and denoising; however, it suffers from mode aliasing, affecting the separation of noise from the effective signal.

[0004] Overall, existing technologies struggle to effectively suppress noise while perfectly preserving the original amplitude and waveform characteristics of the TDLAS second harmonic signal, thus limiting further improvements in the accuracy and stability of gas detection systems. Summary of the Invention

[0005] To address the technical problems of poor fidelity and mode mixing in existing wavelet threshold denoising technologies, this invention provides a signal denoising method and a gas concentration detection method based on an improved threshold function. The technical solution is as follows:

[0006] On one hand, a signal denoising method based on an improved threshold function is provided. This method includes: decomposing a noisy original signal into multiple signal components; performing wavelet threshold denoising on at least a portion of the signal components, and processing the wavelet coefficients during the processing using the following improved threshold function:

[0007] ,

[0008] ,

[0009] In the formula, and The wavelet coefficients before and after processing are respectively, sign() is the sign function, λ is the threshold, and α is an adjustable positive constant factor; based on the result of the wavelet threshold denoising process, the signal is reconstructed to obtain the denoised signal.

[0010] On the other hand, a gas concentration detection method is provided, which includes: acquiring a noisy second harmonic signal of the gas to be detected as the original signal based on tunable diode laser absorption spectroscopy; processing the original signal using the above-mentioned signal denoising method based on the improved threshold function to obtain a denoised second harmonic signal; extracting the feature values ​​of the denoised second harmonic signal, and obtaining the concentration of the gas to be detected according to a predetermined calibration relationship between the feature values ​​and the gas concentration.

[0011] The beneficial effects of the technical solution provided by the embodiments of the present invention include at least the following: by introducing a novel threshold function containing an exponential decay term, the function is continuous and smooth at the threshold point. When the amplitude of the wavelet coefficient is just greater than the threshold, the function can provide a smooth contraction similar to a soft threshold, effectively avoiding signal oscillations caused by a hard threshold function. When the amplitude of the wavelet coefficient is much greater than the threshold, the exponential decay term rapidly approaches zero, making the processed coefficients infinitely close to the original coefficients, thereby avoiding the constant deviation introduced by the soft threshold function and the excessive smoothing of the characteristics of large amplitude signals. This design achieves high-fidelity preservation of large amplitude coefficients representing strong signals while resolutely filtering out small amplitude noise, significantly improving the accuracy of signal denoising and waveform fidelity. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a flowchart of a signal denoising method based on an improved threshold function provided by an embodiment of the present invention;

[0014] Figure 2 This is a comparison chart of the improved threshold function provided in this embodiment of the invention and the traditional function;

[0015] Figure 3 This is a comparison chart of the signal-to-noise ratios of different wavelet bases provided in the embodiments of the present invention;

[0016] Figure 4 This is a comparison chart of different decomposition layers and threshold signal-to-noise ratios provided in the embodiments of the present invention;

[0017] Figure 5This is an ideal second harmonic signal diagram and its corresponding noisy signal diagram provided in the embodiments of the present invention;

[0018] Figure 6 This is a schematic diagram of the IMF components and residual components after CEEMDAN decomposition provided in an embodiment of the present invention.

[0019] Figure 7 This is the denoised signal obtained by the optimal denoising method of the present invention provided in this embodiment;

[0020] Figure 8 This is a hard threshold noise reduction signal diagram provided in an embodiment of the present invention;

[0021] Figure 9 This is a soft threshold noise reduction signal diagram provided in an embodiment of the present invention;

[0022] Figure 10 This is a noise-reduced signal graph provided by an embodiment of the present invention using only an improved threshold function;

[0023] Figure 11 This is a flowchart of a gas concentration detection method provided in an embodiment of the present invention;

[0024] Figure 12 This is a diagram of the second harmonic signals of methane gas at different concentrations before noise reduction, provided in an embodiment of the present invention.

[0025] Figure 13 This is a diagram of the second harmonic signals of methane gas at different concentrations after noise reduction, provided in an embodiment of the present invention.

[0026] Figure 14 This is a linear fitting relationship diagram between the second harmonic peak value and different concentrations of methane gas provided in the embodiments of the present invention;

[0027] Figure 15 This is a distribution map of 200 sets of methane concentration data points obtained by inverting the original signal peak value, provided in an embodiment of the present invention.

[0028] Figure 16 This is a distribution map of 200 sets of methane concentration data points obtained by peak inversion of the denoised signal, provided in an embodiment of the present invention.

[0029] Figure 17 This is a histogram of the methane concentration data deviation after processing by the method of the present invention, as provided in this embodiment of the invention.

[0030] Figure 18 This is a Gaussian profile fitting curve of the methane concentration data processed by the method of the present invention provided in this embodiment of the invention;

[0031] Figure 19This refers to the Allan variance change of methane concentration data after processing by the method of the present invention, as provided in this embodiment of the invention. Detailed Implementation

[0032] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0033] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.

[0034] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.

[0035] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.

[0036] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0037] Please see Figure 1 This invention provides a signal denoising method based on an improved threshold function, which includes steps S101 to S103.

[0038] Step S101: Decompose the noisy original signal into multiple signal components. The original signal is usually a complex mixture of effective signal and various noises. When directly denoising the original signal as a whole, it is difficult to distinguish the different characteristics of noise and effective signal, which can easily lead to incomplete denoising or damage to signal characteristics. By decomposing the original signal into a series of signal components of different scales, it is possible to distinguish which components are mainly composed of noise and which components are mainly composed of effective signal based on the characteristics of each component (such as frequency and correlation with the original signal). This lays the foundation for more targeted and differentiated noise reduction processing in the future, which is a key preprocessing step for achieving high-fidelity noise reduction.

[0039] Optionally, step S101 specifically involves: decomposing the original signal into multiple eigenmode function components and a residual component using an adaptive empirical mode decomposition algorithm. Adaptive empirical mode decomposition algorithms, such as empirical mode decomposition and its improved algorithms (e.g., global empirical mode decomposition, adaptive noise-complete set empirical mode decomposition, etc.), can adaptively decompose complex signals into a series of eigenmode functions from high frequency to low frequency based on the signal's own time-scale characteristics. Compared to non-adaptive methods such as wavelet transform, which require pre-defined basis functions, such algorithms have unique advantages in processing nonlinear and non-stationary signals, and are particularly suitable for analyzing complex signals such as TDLAS second harmonics. This invention uses such an algorithm for decomposition precisely to more accurately separate the components with different characteristics in the signal.

[0040] Intrinsic Mode Function (IMF) components are signal components that satisfy the following two conditions: The number of extrema is equal to or at most differs by one from the number of zero-crossings throughout the data sequence; and at any given time point, the average of the upper envelope defined by local maxima and the lower envelope defined by local minima is zero. Simply put, each IMF component represents a simple oscillation mode at a specific time scale in the signal. Residual components, also known as trend terms, are the signal portion remaining after layers of decomposition. They are typically a monotonic function or a mean curve, representing the overall trend of the signal or a DC component.

[0041] Optionally, the adaptive empirical mode decomposition algorithm is the CEEMDAN algorithm. CEEMDAN is an improved algorithm of EMD. By adding adaptive white noise multiple times and integrating and averaging, it effectively suppresses mode aliasing. Its core calculation process is as follows.

[0042] (1) Generate noise-assisted signal. Let the original signal be x(t), and add different adaptive white noise ε to the original signal x(t) multiple times (e.g., N times). j (t), j∈{1,2,…,N}, thus generating a set of noise auxiliary signals:

[0043] ,

[0044] In the formula, β0 is the noise coefficient, and E1() represents the noise operator of the first-order mode.

[0045] (2) Decompose and find the first-order eigenmode function components. For the set of noise-assisted signals x generated in the previous step j (t) is decomposed into EMD terms to obtain its first remainder r. j (t), then for all r j The average of (t) is used to obtain the first global remainder R1(t).

[0046] (3) Based on the original signal x(t) and the first global remainder R1(t), the first-order intrinsic mode function components are obtained, and the calculation formula is as follows:

[0047] .

[0048] (4) Iteratively calculate the second-order intrinsic mode function component. Take R1(t) as the new signal to be decomposed, that is, replace x(t) in step (1) with R1(t), repeat steps (1) to (3), and the global second remainder R2(t) and the second-order intrinsic mode function component IMF2(t) can be calculated.

[0049] (5) Repeat the above iterative process to calculate the higher-order intrinsic mode function components until the global Kth remainder term R. K (t) is a monotonic signal, and the intrinsic mode function components can no longer be extracted.

[0050] Ultimately, the original signal x(t) is decomposed into a series of eigenmode function components and a residual component:

[0051] .

[0052] This process adaptively decomposes the complex second harmonic signal into a series of intrinsic mode functions (IMFs) with different characteristic scales, ranging from high frequency to low frequency. The distribution of noise and effective signal in different modes can be clearly seen, laying the foundation for subsequent noise and signal separation.

[0053] Step S102: Perform wavelet thresholding noise reduction on at least some signal components, and process the wavelet coefficients using the following improved threshold function during the process:

[0054] ,

[0055] ,

[0056] In the formula, ω j,k and Here, λ represents the wavelet coefficients before and after processing, respectively; sign() is the sign function; λ is the threshold; and α is an adjustable constant factor. For the decomposed signal components, wavelet transform is performed to obtain wavelet coefficients ω at different scales. j,k The core of wavelet thresholding denoising lies in thresholding the coefficients. This step is an improvement on the coefficient processing.

[0057] It is important to note that the subscripts j and k in step S102 have different meanings and value ranges than those in the CEEMDAN algorithm. In the CEEMDAN algorithm, j represents the number of experiments, ranging from 1 to N, and k represents the number of iterations, ranging from 1 to K. In step S102, the subscript j represents the j-th level (or j-th scale) of the wavelet decomposition, where j=1 represents the finest scale (highest frequency), and a larger j represents a coarser scale (lower frequency). k represents the time position index of the wavelet coefficient at the j-th scale, corresponding to the local characteristics of the signal at a specific moment. Wavelet coefficient ω j,k This represents the amplitude of the wavelet coefficients of the signal at the j-th scale and the k-th time position.

[0058] In existing technologies, there are generally two types of threshold functions for wavelet coefficient processing: hard threshold function and soft threshold function.

[0059] Hard threshold function: The function is discontinuous at the threshold point λ, which easily leads to oscillations in the reconstructed signal. Its function expression is as follows:

[0060] .

[0061] Soft thresholding function: Although the function is continuous, it constantly compresses coefficients greater than or equal to the threshold λ, introducing a constant bias, which leads to excessive signal smoothing and amplitude distortion. Its function expression is as follows:

[0062] .

[0063] Optionally, the positive constant factor α can range from [0.5, 5], and more preferably, from [1, 2]. Setting the positive constant factor α to [0.5, 5] provides an effective adjustment range between smooth transition and signal fidelity. When α is too small (e.g., less than 0.5), the exponential decay term decays too slowly, and the function behaves close to a soft threshold within a large coefficient range, potentially leading to over-smoothing. When α is too large (e.g., greater than 5), the decay is too fast, and the function may behave close to a hard threshold near the threshold, increasing the risk of introducing oscillations. Within this range, the value of α can be adjusted to adapt to specific scenarios with different signal-to-noise ratios or signal characteristics. More preferably, the value of α is from [1, 2], within which the function can achieve a good balance between noise suppression and signal feature preservation in most cases.

[0064] The innovation of the threshold function in this invention lies in the introduction of an exponential decay term. When the coefficient amplitude ω j,k When the value is just above the threshold λ, the attenuation term is relatively large, acting as a smoothing contraction similar to a soft threshold; as the coefficient amplitude ω... j,k The decay term, being much larger than the threshold λ, rapidly approaches 0, causing the function value h to infinitely approach the original coefficient value ω.j,k This preserves the amplitude coefficient (representing a strong signal) and avoids the constant deviation of soft thresholding. This continuous, smooth, and adjustable characteristic enables robust noise filtering and high-fidelity preservation of the effective signal. Comparison of different threshold functions is shown below. Figure 2 As shown in the figure, the superiority of the function proposed in this invention can be clearly seen.

[0065] Optionally, to ensure that the improved wavelet threshold denoising process achieves optimal performance, the present invention optimizes the key parameters in the wavelet threshold denoising process and performs parameter space optimization by using the output signal-to-noise ratio as the evaluation index. The key parameters include the wavelet basis function, the number of decomposition layers, and the threshold selection rules.

[0066] Optionally, the wavelet basis functions in this invention can be, for example, sym, db, or coif. Figure 3 The diagram illustrates the relationship between different wavelet basis functions and the signal-to-noise ratio (SNR) after denoising. It shows that the signal obtained after denoising using the sym5 wavelet basis has the highest SNR. This is mainly because the sym5 wavelet has good symmetry and regularity, and its waveform better matches the shape characteristics of the TDLAS second harmonic signal. Therefore, it can more effectively extract and preserve signal features during decomposition, resulting in superior denoising performance.

[0067] Optionally, the number of decomposition layers in this invention can be selected as 4 to 7 layers, and the threshold λ can be calculated using criteria such as sqtwolog, rigrsure, heursure, or minimaxi. Figure 4 The paper illustrates the relationship between different decomposition levels, different calculation criteria, and the signal-to-noise ratio (SNR) after denoising. It shows that when the decomposition level is set to 6 levels and the threshold λ is calculated using the Heursure criterion, the SNR of the denoised signal reaches its peak. Too few decomposition levels (e.g., less than 4 levels) may lead to insufficient separation of noise and signal on the frequency scale; too many levels (e.g., more than 7 levels) may introduce unnecessary computational complexity and cause over-decomposition of the signal, potentially even resulting in meaningless pseudo-components. The Heursure criterion is an adaptive threshold selection method based on Stan unbiased risk estimation. It can provide a better global threshold based on the actual distribution of the signal wavelet coefficients and outperforms other fixed or empirical threshold rules in this application scenario.

[0068] Optionally, in the wavelet thresholding denoising process, the sym5 wavelet basis is used, with a decomposition level of 6 layers, and the threshold λ is calculated using the Heursure criterion. Establishing this specific parameter combination is one of the key technical aspects of this invention, ensuring that the denoising algorithm achieves the optimal balance between noise suppression and signal feature preservation when processing TDLAS second harmonic signals. The results of this parameter optimization process can be verified through signal-to-noise ratio comparison, such as... Figure 3, Figure 4 As shown, it intuitively demonstrates the performance differences under different parameter combinations, thus confirming the superiority of the selected parameter combination.

[0069] Step S103: Based on the wavelet threshold denoising result, signal reconstruction is performed to obtain the denoised signal. Signal reconstruction refers to the process of recombining the signal components after differential processing (such as denoising or direct retention) to form a complete denoised signal. Based on the processing result of step S102, the reconstruction process can organically integrate the well-preserved effective signal features with the purified signal components. This step ensures that the output of the entire denoising process is a complete, continuous, high-quality signal, providing a directly usable data foundation for subsequent applications such as accurate measurement, feature extraction, or concentration inversion.

[0070] Optionally, wavelet threshold denoising is performed on at least some of the signal components, specifically: wavelet threshold denoising is performed on all intrinsic mode function components; signal reconstruction is performed based on the result of wavelet threshold denoising, specifically: signal reconstruction is performed by combining all intrinsic mode function components after wavelet threshold denoising with the residual components.

[0071] Optionally, after the step of decomposing the original signal into multiple intrinsic mode function components and a residual component using the adaptive empirical mode decomposition algorithm, the method further includes: dividing the multiple intrinsic mode function components into a first component dominated by effective signals and a second component dominated by noise; performing wavelet threshold denoising on at least some of the signal components, specifically: performing wavelet threshold denoising on the second component; and reconstructing the signal based on the result of the wavelet threshold denoising, specifically: reconstructing the signal from the second component, the first component, and the residual component that have undergone wavelet threshold denoising.

[0072] The difference between the two embodiments is as follows: In the first embodiment, wavelet thresholding denoising is performed on all intrinsic mode function (IMF) components; the second embodiment, however, first divides all IMF components into a first component and a second component, and then only performs wavelet thresholding denoising on the second component, which is dominated by noise. The advantage of the latter over the former is that it achieves intelligent identification and differentiated treatment of signal components. By dividing the IMF into a first component dominated by effective signal and a second component dominated by noise, and focusing denoising only on the second component, this strategy can maximize the protection of effective signal components from distortion or smoothing effects that may be introduced by the denoising algorithm. At the same time, it concentrates computational resources on processing the component that most needs cleaning, improving algorithm efficiency. Therefore, this embodiment achieves higher signal fidelity and computational efficiency while maintaining or even improving the denoising effect.

[0073] Optionally, multiple intrinsic mode function (IMF) components are divided into a first component dominated by effective signals and a second component dominated by noise. This includes: calculating the correlation coefficient between each IMF component and the original signal; identifying IMF components with correlation coefficients greater than or equal to a preset threshold as the first component; and identifying IMF components with correlation coefficients less than the preset threshold as the second component. The correlation coefficient is an important statistic for measuring the degree of linear correlation between two signals. For an IMF component obtained by CEEMDAN decomposition, the level of its correlation coefficient with the original noisy signal reflects the amount of effective components contained in that component that are consistent with the overall trend of the original signal. An IMF component with a high correlation coefficient means that its waveform is highly similar to the original signal and is likely to carry the main effective signal information; while an IMF component with a low correlation coefficient has low similarity to the original signal and is more likely to be dominated by noise. Therefore, the correlation coefficient provides an objective and effective quantitative indicator for distinguishing between signal-dominated and noise-dominated components.

[0074] Optionally, the preset threshold value range is [0.3, 0.5], and optimally, the preset threshold is 0.4. The preset threshold value range [0.3, 0.5] is determined based on experimental observation and statistical analysis of the correlation coefficient distribution between each IMF component and the original signal after CEEMDAN decomposition of a typical TDLAS second harmonic signal. Dividing within this range can stably and accurately distinguish between IMFs dominated by high-frequency noise and those dominated by low-frequency effective signals. Setting the threshold too low (e.g., less than 0.3) may cause some noise components to be misjudged as signals and retained; setting the threshold too high (e.g., greater than 0.5) may cause some weak signal components to be misjudged as noise and over-processed. Extensive experimental verification shows that when the threshold is optimally set to 0.4, the most accurate modal classification and optimal overall noise reduction performance can be achieved in the studied scenario.

[0075] The effectiveness of this invention will be verified by conducting simulation comparison experiments in the MATLAB environment.

[0076] The simulation conditions were set as follows: the laser center wavenumber was 6046.72 cm⁻¹. -1 The gas pressure is 1 atm, and the absorption line intensity S(T) = 0.0362 cm⁻¹ -2 ·atm -1 (Corresponding temperature 296K), absorption optical path length 1m, methane gas concentration 10ppm. Based on TDLAS technology and wavelength modulation spectroscopy, an ideal second harmonic signal is generated, and then Gaussian white noise is superimposed to simulate actual detection interference, resulting in a noisy signal. The noisy signal can be used to verify the original signal of the method of this invention, and the ideal second harmonic signal can be used as a theoretical denoised signal. These two signals are as follows... Figure 5 As shown.

[0077] First, the noisy signal is subjected to adaptive decomposition using the CEEMDAN algorithm, yielding 10 intrinsic mode function components and 1 residual component, such as... Figure 6 As shown in the table below. Next, the correlation coefficients between each IMF component and the original noisy signal are calculated.

[0078] Table 1: Correlation coefficients of each IMF component with the noisy signal.

[0079] IMF components Correlation coefficient IMF components Correlation coefficient IMF1 0.3159 IMF6 0.1251 IMF2 0.2039 IMF7 0.6287 IMF3 0.2023 IMF8 0.4849 IMF4 0.1656 IMF9 0.6138 IMF5 0.1187 IMF10 0.7764

[0080] Next, the calculated correlation coefficients are compared with a set threshold, assuming the threshold is 0.4. Components with correlation coefficients below 0.4 (such as IMF1–IMF6) are identified as noise-dominant components and denoised using a modified wavelet threshold function (positive constant factor α=2). Components with correlation coefficients above 0.4 (such as IMF7–IMF10) are considered signal-dominant components and retained. Finally, the denoised IMF components, the retained IMF components, and the residual components are reconstructed to obtain the final denoised signal, as shown below. Figure 7 As shown in the figure, the denoised signal obtained by the method of this invention is very close to the ideal second harmonic signal, with a smooth waveform and effective preservation of signal characteristics, resulting in excellent denoising performance.

[0081] Furthermore, the comparative experiments simulated the denoised signals obtained by three methods: hard thresholding, soft thresholding, and using only an improved thresholding function (without using the CEEMDAN algorithm for decomposition or processing the noise-dominated second component). Figure 8 This is a graph of the signal after hard threshold denoising. Figure 9 This is a graph of the soft-threshold denoising signal. Figure 10 The graphs show the denoised signal using only the improved threshold function. As can be seen from these graphs, the denoising effect is already quite good using only the improved threshold function, but the denoising effect would be even better if the CEEMDAN algorithm were added and only the noise-dominated second component were processed.

[0082] To quantitatively compare the four schemes mentioned above, three indicators were used for evaluation: signal-to-noise ratio (SNR), root mean square error (RMSE), and correlation coefficient (CORR). The comparison results are shown in Table 2.

[0083] Table 2: Comparison of performance evaluation indicators for different noise reduction methods.

[0084] Denoising algorithm SNR RMSE CORR No noise reduction 9.8728 0.1983 0.9207 Wavelet hard thresholding 11.5817 0.1544 0.9465 Wavelet soft thresholding 12.0358 0.1460 0.9518 Improved threshold 17.8674 0.0722 0.9874 Optimal method 24.5230 0.0345 0.9971

[0085] As can be seen from Table 2, the improved thresholding method is superior to both hard and soft thresholding. Furthermore, the optimal method in this invention outperforms other methods in terms of SNR (24.5230), RMSE (0.0345), and CORR (0.9971).

[0086] The comparison results of peak fidelity are shown in Table 3.

[0087] Signal peak Original signal 1.771 Noisy signal 2.101 Wavelet hard thresholding 1.997 Wavelet soft thresholding 2.018 Improved threshold 1.843 Optimal method 1.765

[0088] As can be seen from Table 3, the improved threshold and the optimal method in this invention have very low errors between the reconstructed signal peak value and the original signal peak value. In particular, the optimal method has an error of only 0.006, which is significantly better than other methods and demonstrates good signal fidelity performance.

[0089] Please see Figure 11 This invention provides a gas concentration detection method, which includes steps S1101 to S1103.

[0090] Step S1101: Based on tunable diode laser absorption spectroscopy, the noisy second harmonic signal of the gas to be detected is obtained as the original signal. In a specific implementation, a distributed feedback (DFB) laser with a center wavelength of 1653.7 nm is used, with methane at 6047 cm⁻¹. -1 The nearby absorption line was used as the detection target. The experimental setup included a laser emission unit, a gas absorption cell, a photodetector, and a lock-in amplifier circuit. Methane standard gas samples with concentrations ranging from 50 ppm to 190 ppm were prepared using a gas mixing device for subsequent construction of predetermined calibration relationships and algorithm verification. Without using any noise reduction algorithms, the second harmonic signals of each concentration sample were directly acquired through the lock-in amplifier, and the results are as follows: Figure 12 As shown, the original signal is severely affected by noise, with obvious spikes in the waveform and difficulty in identifying signal characteristic peaks, reflecting the impact of noise on detection accuracy in the actual system.

[0091] Step S1102: Using the above-described signal denoising method based on the improved threshold function, the original signal is processed to obtain the denoised second harmonic signal. The acquired original signal is processed using the above-described signal denoising method based on the improved threshold function, that is, the following steps are performed sequentially: CEEMDAN decomposition, noise-dominated IMF identification, improved wavelet threshold denoising, and signal reconstruction. The processed second harmonic signal is as follows: Figure 13 As shown, with Figure 12 The comparison shows that after processing by the noise reduction method of the present invention, the signal waveforms at each concentration are smoother, the noise is effectively suppressed, and the absorption peaks are complete and clear, which is conducive to the accurate extraction of peak parameters.

[0092] Step S1103: Extract the feature values ​​of the denoised second harmonic signal, and obtain the concentration of the gas to be detected based on the predetermined calibration relationship between the feature values ​​and the gas concentration. The predetermined calibration relationship can be obtained by extracting the peak value of the denoised signal and performing linear regression analysis with the corresponding methane concentration, as shown in the results. Figure 14 As shown. Figure 14 In the figure, the correlation coefficient of the fitted straight line reached 0.9918, indicating a good linear relationship between the peak value and the gas concentration, thus verifying the accuracy and reliability of the method of the present invention in quantitative concentration inversion. In actual reasoning, it is only necessary to use the noisy second harmonic signal of the gas to be detected as the original signal, process it through step S1102, and then execute step S1103 to obtain the concentration of the gas to be detected.

[0093] To verify the stability of the gas concentration detection method in continuous measurement, 200 repeated measurements were performed on a 100 ppm methane sample. The concentration results obtained by directly using the inversion of the original signal peak are as follows: Figure 15 As shown, the concentration fluctuation range was 93.93 ppm to 105.66 ppm, with a standard deviation of 2.35 ppm. The concentration results after processing using the method of this invention are as follows... Figure 16 As shown, the inversion concentration fluctuation range was reduced to 96.08 ppm to 104.13 ppm, the standard deviation was reduced to 1.27 ppm, and the data concentration was significantly improved, indicating that the gas concentration detection method with the aforementioned noise reduction method effectively improved the measurement stability.

[0094] Please see Figure 17 and Figure 18 The detection accuracy is then analyzed using Gaussian fitting of the concentration deviation. Before noise reduction, the full width at half maximum (FWHM) of the concentration deviation was 5.5 ppm, corresponding to a detection accuracy of 5.5%. After noise reduction, the FWHM decreased to 3.0 ppm, and the detection accuracy improved to 3.0%, a relative improvement of approximately 83.3%. The results show that the method of this invention can significantly reduce measurement errors and improve the system's detection accuracy.

[0095] The detection limit is analyzed below. Allan variance was used to evaluate the detection limit of the gas concentration detection method at different integration times. The denoised concentration sequence was analyzed, and the results are as follows: Figure 19 As shown, when the averaging time is 1 second, the detection limit of this method is 1.2 ppm; when the averaging time is extended to 55 seconds, the detection limit further decreases to 0.05 ppm. This demonstrates that the method of the present invention is not only applicable to conventional concentration detection, but also has a high sensitivity detection capability for trace amounts of methane gas.

[0096] The experimental results above demonstrate that the gas concentration detection method proposed in this invention can effectively suppress noise interference and improve signal quality in a practical TDLAS detection system, thereby significantly improving the linearity of concentration inversion, system stability, detection accuracy, and detection limit. It is suitable for high-precision gas detection applications.

[0097] In summary, the technical solution of this invention brings many beneficial effects.

[0098] (1) Excellent noise reduction performance: Simulation results show that the signal-to-noise ratio (SNR) of the signal processed by this method is significantly improved from 9.87dB to 24.52dB, the root mean square error (RMSE) is reduced from 0.198 to 0.034, and the correlation coefficient (CORR) is increased to 0.997. All indicators are significantly better than the traditional method.

[0099] (2) Improved detection accuracy and stability: Experiments show that the system detection accuracy increased from 5.5% to 3.0%, an increase of 83.3%; the standard deviation of fixed concentration measurement decreased from 2.35ppm to 1.27ppm, and the stability was significantly enhanced.

[0100] (3) Achieve trace detection: The system’s minimum detection limit is 0.05 ppm, which greatly improves the ability to detect low concentrations of gas.

[0101] (4) High versatility: The method described in this invention is not only applicable to methane detection, but its core "decomposition-classification-adaptive denoising" framework can be widely applied to other gas detection based on TDLAS technology and even weak signal detection in other fields.

[0102] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.

[0103] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.

[0104] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.

[0105] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0106] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0107] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0108] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0109] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0110] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0111] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0112] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A signal denoising method based on an improved threshold function, characterized in that, The method includes: The original signal containing noise is decomposed into multiple signal components; At least some of the signal components are subjected to wavelet thresholding denoising, and the wavelet coefficients are processed using the following improved threshold function during the process: , , In the formula, and These are the wavelet coefficients before and after processing, respectively; sign() is the sign function; λ is the threshold; and α is an adjustable constant factor. The signal is reconstructed based on the result of the wavelet threshold denoising process to obtain the denoised signal.

2. The signal denoising method based on an improved threshold function according to claim 1, characterized in that, The original signal containing noise is decomposed into multiple signal components. Specifically, the original signal is decomposed into multiple intrinsic mode function components and a residual component using an adaptive empirical mode decomposition algorithm.

3. The signal denoising method based on an improved threshold function according to claim 2, characterized in that, The adaptive empirical mode decomposition algorithm is the CEEMDAN algorithm.

4. The signal denoising method based on the improved threshold function according to claim 2, characterized in that, The wavelet threshold denoising process is performed on at least a portion of the signal components, specifically: the wavelet threshold denoising process is performed on all intrinsic mode function components. Signal reconstruction is performed based on the result of the wavelet threshold denoising process, specifically by reconstructing the signal using all intrinsic mode function components after the wavelet threshold denoising process and the residual components.

5. The signal denoising method based on an improved threshold function according to claim 2, characterized in that, After the step of decomposing the original signal into multiple intrinsic mode function components and a residual component using the adaptive empirical mode decomposition algorithm, the method further includes: The multiple intrinsic mode function components are divided into a first component dominated by effective signals and a second component dominated by noise; Perform wavelet threshold denoising on at least a portion of the signal components, specifically: perform the wavelet threshold denoising on the second component; The signal is reconstructed based on the result of the wavelet threshold denoising process, specifically by reconstructing the signal from the second component, the first component, and the residual component that have undergone the wavelet threshold denoising process.

6. The signal denoising method based on an improved threshold function according to claim 5, characterized in that, The multiple intrinsic mode function components are divided into a first component dominated by effective signals and a second component dominated by noise, including: Calculate the correlation coefficient between each intrinsic mode function component and the original signal; The intrinsic mode function components with correlation coefficients greater than or equal to a preset threshold are determined as the first component; The intrinsic mode function components with correlation coefficients less than the preset threshold are determined as the second component.

7. The signal denoising method based on an improved threshold function according to claim 6, characterized in that, The preset threshold value ranges from [0.3, 0.5].

8. The signal denoising method based on an improved threshold function according to claim 1, characterized in that, The value range of the positive constant factor α is [0.5, 5].

9. The signal denoising method based on an improved threshold function according to claim 1, characterized in that, In the wavelet thresholding denoising process, the sym5 wavelet basis is used, the decomposition layer is 6 layers, and the threshold λ is calculated using the Heursure criterion.

10. A method for detecting gas concentration, characterized in that, The method includes: Based on tunable diode laser absorption spectroscopy, the noisy second harmonic signal of the gas to be detected is obtained as the original signal. The original signal is processed using the signal denoising method based on the improved threshold function according to any one of claims 1 to 9 to obtain a denoised second harmonic signal; The feature values ​​of the denoised second harmonic signal are extracted, and the concentration of the gas to be detected is obtained according to the predetermined calibration relationship between the feature values ​​and the gas concentration.