Laser methane remote sensing denoising method and system based on sparrow search algorithm optimization
By optimizing parameters using the sparrow search algorithm and combining singular value decomposition and improved wavelet transform, a collaborative denoising architecture is constructed. This solves the parameter dependence and nonlinear adaptability problems of noise suppression in the TDLAS system, achieving efficient noise separation and signal fidelity, and improving detection performance.
Patent Information
- Application Number
- CN202610566749.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-27
- Publication Date
- 2026-07-21
AI Technical Summary
Existing algorithm-based noise suppression techniques in TDLAS systems suffer from problems such as parameter selection relying on human experience, poor nonlinear adaptability, and insufficient signal fidelity, making it difficult to achieve accurate noise separation and distortion-free waveform preservation in dynamic and complex noise environments.
The sparrow search algorithm is used to optimize parameters, and a collaborative denoising architecture is constructed that first targets the global noise and then the local noise. By combining singular value decomposition and improved wavelet transform, the parameter combination is adaptively optimized to achieve effective suppression of various complex noises.
It significantly improves the detection sensitivity and accuracy of the TDLAS system, with a signal-to-noise ratio increase of over 20.20 dB, a normalized correlation coefficient of 0.9953, and maintains the integrity of the absorption peak shape and the accuracy of the amplitude.
Smart Images

Figure CN122436057A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of gas sensing and photoelectric detection technology, and particularly relates to a laser methane remote sensing noise reduction method and system based on the sparrow search algorithm. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Methane (CH4), as an important greenhouse and energy gas, is crucial for high-precision and high-sensitivity detection in environmental monitoring, energy exploration, industrial safety, and agricultural production. Tunable diode laser absorption spectroscopy (TDLAS) technology, due to its high selectivity, non-contact measurement, and rapid response, has become one of the mainstream technologies for laser methane detection.
[0004] In TDLAS systems, wavelength modulation spectroscopy (WMS) technology is typically used to suppress low-frequency noise and improve detection sensitivity by high-frequency modulation of the laser wavelength and detection of the second harmonic (2f) signal. However, complex noise interference in real-world applications remains a key bottleneck restricting the improvement of TDLAS system detection performance, especially in open optical path telemetry, industrial field, or dynamic monitoring scenarios, where the harmonic signals acquired by the system are severely affected by various complex noises. These noises mainly include: 1) Optical interference fringes caused by laser coherence exhibit quasi-periodic fluctuations in the frequency domain and often overlap with the spectrum of gas absorption signals, making them difficult to filter out using traditional linear filters; 2) Pulse noise caused by transient electromagnetic interference in the environment manifests as random narrow peaks in the signal, which are prone to forming spurious peaks near the absorption peaks, interfering with the accuracy of peak detection and reducing the robustness of traditional threshold denoising methods based on variance estimation. 3) The inherent 1 / f pink noise of semiconductor devices and photodetectors is characterized by significantly higher low-frequency energy in the frequency domain. In wavelength modulation spectroscopy detection, 1 / f noise will mask the slow-change component of the absorption signal, and due to its long-range correlation, it is difficult to completely separate it through conventional frequency domain filtering, which can easily cause absorption peak distortion and systematic errors in concentration inversion. 4) Baseline drift caused by systematic factors such as thermal expansion and contraction of the optical system, slow changes in ambient temperature, slow changes in laser output power, or mechanical vibration of the optical path, manifests in the time domain as a slow shift or bending of the overall signal trend, and in the frequency domain it is concentrated in the extremely low frequency band close to DC. Its harm lies in destroying the signal reference, causing systematic deviations in concentration inversion, and affecting long-term accuracy. 5) Detector white noise, including shot noise and thermal noise, is characterized by a flat spectrum and exhibits irregular high-frequency random fluctuations in the time domain. Its harm lies in its widespread diffusion across the entire frequency band, directly raising the background noise and drowning out weak signals, thus determining the theoretical limit of the system's detection sensitivity.
[0005] However, existing algorithm-based noise suppression techniques still have certain limitations: moving average filtering is simple to implement, but it smooths signal details, leading to absorption peak broadening and increased concentration inversion errors; Kalman filtering is suitable for linear systems, but it is difficult to model the nonlinear absorption process of TDLAS and requires accurate noise statistics; the performance of variational mode decomposition (VMD) depends heavily on preset parameters, such as the number of decomposition levels K and the penalty factor a, and the selection of these parameters requires a large number of iterative calculations; although EMD-like methods can adaptively decompose, they suffer from endpoint effects and mode mixing, resulting in incomplete noise separation; singular... Value decomposition (SVD) is an effective preprocessing method, but the selection of its reconstruction order k heavily relies on human experience. In complex and variable noise environments, it is difficult to accurately adapt to the real structure of the signal, which can easily lead to overfitting (noise residue) or underfitting (signal distortion), thus restricting the stability and reliability of denoising performance. Although wavelet transform is widely used for signal denoising, its core threshold function has a fundamental defect: hard threshold is discontinuous at the threshold point, which can easily cause oscillations in the reconstructed signal; soft threshold, although continuous, constantly compresses the effective coefficients, resulting in a systematic attenuation of the signal amplitude, directly introducing a fixed deviation in concentration measurement.
[0006] It is evident that existing denoising algorithms have inherent limitations in parameter selection, nonlinear adaptability, and signal fidelity, making it difficult to achieve accurate noise separation and distortion-free waveform preservation in dynamic and complex noise environments. Summary of the Invention
[0007] To overcome the shortcomings of the prior art, this invention provides a laser methane telemetry denoising method and system based on the sparrow search algorithm. The method uses the sparrow search algorithm to adaptively optimize parameters and constructs a collaborative denoising architecture that first global and then local. Through singular value decomposition and improved wavelet transform collaborative denoising, it can effectively suppress various complex noises and improve the detection sensitivity and accuracy of the TDLAS system.
[0008] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: The first aspect of this invention provides a laser methane telemetry denoising method based on a sparrow search algorithm, comprising: Noisy harmonic signals from the laser methane detection system are acquired and preprocessed to obtain a one-dimensional time-series vector. The sparrow search algorithm is used to adaptively optimize the denoising parameters to obtain the optimized parameter combination. Based on the optimized parameter combination, the singular value decomposition algorithm is used to perform global denoising on the one-dimensional time-series vector to obtain the initial denoised signal. Based on the optimized parameter combination, the improved wavelet transform is used to perform local denoising on the initial denoised signal to obtain the final denoised signal; The methane gas concentration is calculated based on the final denoised signal.
[0009] As one implementation method, noisy harmonic signals from a laser methane detection system are acquired and preprocessed to obtain a one-dimensional time-series vector. The specific process is as follows: A distributed feedback laser is used as the laser emission source, and its center wavelength is tuned to the near-infrared characteristic absorption line of methane. Wavelength modulation technology is used to superimpose a high-frequency sinusoidal modulation signal onto the laser driving current to modulate the laser wavelength. The intensity signal of the transmitted laser light after absorption by methane is collected, and then converted into a digital electrical signal through photoelectric conversion, analog amplification, and analog-to-digital conversion. The first and second harmonics are extracted from digital electrical signals using digital quadrature lock-in amplification technology. The first and second harmonics are downsampled and normalized to obtain a one-dimensional time series vector.
[0010] As one implementation method, the sparrow search algorithm is used to adaptively optimize the denoising parameters to obtain the optimized parameter combination. The specific process is as follows: Initialize the population parameters of the sparrow search algorithm, and use the combination of denoising parameters as the position of each individual sparrow; Based on the current location of the sparrow population, analyze the current parameter combination; Based on the current parameter combination, a Hankel matrix is constructed from the one-dimensional time series vector and singular value decomposition is performed to achieve global denoising. Based on the current parameter combination, the globally denoised signal is subjected to improved wavelet transform processing to achieve local denoising. Based on the denoised signal, calculate the fitness function value corresponding to the current parameter combination; Sparrow population roles are assigned based on fitness function values, and the positions of discoverers, joiners, and vigilants are updated accordingly. Repeat the above steps until the current iteration count reaches the maximum iteration count, and output the optimized parameter combination.
[0011] As one implementation method, the optimized parameter combination includes: the effective order of singular value decomposition reconstruction, the wavelet threshold function adjustment factor, the wavelet threshold formula scaling factor, and the number of wavelet decomposition layers.
[0012] As one implementation method, based on the optimized parameter combination, the singular value decomposition algorithm is used to perform global denoising on the one-dimensional time series vector to obtain the initial denoised signal. The specific process is as follows: Construct the Hankel matrix of the one-dimensional time series vector; Perform singular value decomposition on the Hankel matrix; The effective order reconstruction matrix is reconstructed based on the optimized singular value decomposition to obtain the initial denoised signal.
[0013] As one implementation method, based on the optimized parameter combination, the improved wavelet transform is used to locally denoise the initial denoised signal to obtain the final denoised signal. The specific process is as follows: Based on the optimized wavelet decomposition level, the sym5 wavelet basis function is used to perform discrete wavelet transform on the initial denoised signal to extract the detail coefficients of each level. Based on the detail coefficients of each layer, an adaptive threshold function that varies with the decomposition scale is constructed, and the adaptive threshold is calculated. Based on an adaptive threshold, an improved threshold function is constructed to shrink the detail coefficients of each layer. The shrinkage-processed detail coefficients are subjected to inverse wavelet transform to obtain the final collaboratively denoised signal.
[0014] As one implementation method, an adaptive threshold function that varies with the decomposition scale is constructed, with the following formula: ; Where N is the signal length; This is an estimate of the noise standard deviation. j represents the current decomposition scale level. is the global fine-tuning coefficient; k is the SVD singular order; L is the wavelet decomposition level.
[0015] As one implementation method, an improved threshold function is constructed, with the following formula: ; in, These are the detail coefficients of each layer of the original wavelet. The coefficients after processing. An adaptive threshold that varies with the decomposition scale. It is a regulating factor.
[0016] As one implementation method, the methane gas concentration is calculated by inversion based on the final denoised signal. The specific process is as follows: Calculate the peak intensity of the second harmonic signal and the intensity of the first harmonic signal at the corresponding moment of the peak. The second harmonic signal is normalized using the first harmonic signal. The final methane gas concentration is obtained based on the normalized signal value.
[0017] A second aspect of the present invention provides a laser methane telemetry denoising system optimized based on a sparrow search algorithm, comprising: The data acquisition and processing module is used to acquire noisy harmonic signals in the laser methane detection system and preprocess them to obtain a one-dimensional time-series vector. The parameter optimization module is used to adaptively optimize the denoising parameters using the sparrow search algorithm to obtain the optimized parameter combination; The collaborative denoising module is used to perform global denoising on a one-dimensional time-series vector based on the optimized parameter combination and using the singular value decomposition algorithm to obtain the initial denoised signal. Based on the optimized parameter combination, the improved wavelet transform is used to perform local denoising on the initial denoised signal to obtain the final denoised signal; The concentration inversion module is used to invert and calculate the methane gas concentration based on the final denoised signal.
[0018] The above one or more technical solutions have the following beneficial effects: In this embodiment, addressing the issue that key parameters such as the reconstruction order k and wavelet decomposition level L in traditional SVD rely on manual experience for setting, the Sparrow Search Algorithm (SSA) is introduced into the TDLAS signal processing field for the first time. A parameter optimization model is constructed with (k, α, r, L) as optimization variables and the fitness function being a weighted sum of signal-to-noise ratio (SNR) and normalized correlation coefficient (NCC). Leveraging the powerful global search capability and fast convergence characteristics of the SSA algorithm, it can adaptively discover the current optimal parameter combination in complex dynamic environments, completely eliminating the blindness of manual trial and error. This solves the problems of poor environmental adaptability and difficulty in matching different concentration change scenarios caused by the fixed parameters in traditional methods. Simultaneously, the global reconstruction order of SVD and the local threshold parameters of the wavelet are placed in the same multidimensional solution space. SSA, through real-time feedback of the joint fitness function, can adaptively sense and compensate for over-smoothing or under-denoising in SVD, solving the problem of compromise caused by parameter coupling in traditional cascaded architectures. To address the issue of SSA getting trapped in local optima due to the discontinuity of traditional wavelet threshold functions, an exponentially continuous threshold function is introduced. This not only eliminates Gibbs oscillations in the reconstructed signal in the physical time-frequency domain but also provides a smooth and continuous parameter search gradient for SSA in the mathematical optimization domain. This mechanism fundamentally ensures the convergence stability and accuracy of the SSA algorithm in the global optimization within the SVD-wavelet cascade architecture, and is key to the efficient operation of this joint architecture.
[0019] In this embodiment, a collaborative denoising strategy of global and local preprocessing is proposed to address the problem of multiple types of noise intertwining and superimposed in the TDLAS system, including optical interference fringes, 1 / f noise, shot noise, thermal noise, and impulse noise. First, adaptive singular value decomposition (SVD) is used for global preprocessing of the signal to accurately identify and suppress strongly correlated structured noise such as optical interference fringes. Then, an improved wavelet transform is used for localized and refined filtering of residual noise, fully leveraging the complementary advantages of the two algorithms. Experiments show that this collaborative architecture can effectively handle various complex interferences ranging from periodic fringes to high-frequency random noise, improving the signal-to-noise ratio (SNR) by more than 20.20 dB, which is significantly better than traditional single SVD or wavelet denoising methods.
[0020] In this embodiment, addressing the inherent shortcomings of traditional wavelet threshold functions, an improved threshold function based on exponential adjustment is constructed, using a threshold that varies with the decomposition scale, to achieve high-fidelity signal denoising. The function is continuously differentiable at the threshold point |d|=T, completely eliminating the reconstructed signal oscillation problem (Gibbs phenomenon) caused by discontinuities in hard threshold functions; secondly, when... As the exponential term rapidly increases and the subtrahend term approaches zero, the processed coefficients asymptotically approach the identity transformation. This fundamentally avoids the systematic amplitude attenuation and negative concentration measurement bias introduced by the constant compression of effective coefficients by the soft threshold function. Finally, the adjustment factor 'a' can adaptively adjust the transition speed of the function from 0 to y=x according to the signal characteristics, achieving a dynamic balance between smoothness and fidelity. Experiments confirm that this method has significant advantages in maintaining the integrity of the absorption peak shape and the accuracy of the amplitude, with a normalized correlation coefficient (NCC) as high as 0.9953.
[0021] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0022] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0023] Figure 1 This is a flowchart of the laser methane telemetry noise reduction method based on the sparrow search algorithm optimized according to Embodiment 1 of the present invention; Figure 2 This is a flowchart illustrating the adaptive optimization of denoising parameters using the sparrow search algorithm in Embodiment 1 of the present invention. Figure 3 This is a schematic diagram of a clean signal simulated in Embodiment 1 of the present invention; Figure 4 A schematic diagram of the signal after adding noise in the simulation of Embodiment 1 of the present invention; Figure 5 This is a schematic diagram of the denoising effect of SVD when the singular value order K=5 in Embodiment 1 of the present invention; Figure 6 This is a schematic diagram of the denoising effect of SVD when the singular value order K=10 in Embodiment 1 of the present invention; Figure 7 This is an embodiment of the present invention. A schematic diagram illustrating the impact of the choice of threshold function; Figure 8 This is a schematic diagram illustrating the denoising effect of the db wavelet function in Embodiment 1 of the present invention; Figure 9 This is a schematic diagram illustrating the denoising effect of the sym wavelet function in Embodiment 1 of the present invention; Figure 10 This is a schematic diagram illustrating the denoising effect of the coif wavelet function in Embodiment 1 of the present invention; Figure 11 This is a schematic diagram illustrating the denoising effect of the Bior wavelet function in Embodiment 1 of the present invention; Figure 12 This is an embodiment of the present invention. A schematic diagram illustrating the impact of the choice of threshold function; Figure 13 Evaluation of the denoising effect of different algorithms in Embodiment 1 of the present invention; Figure 14 This is the SVD singular value distribution of Embodiment 1 of the present invention; Figure 15 This is a comparison chart of the final denoising results in Embodiment 1 of the present invention; Figure 16 This is a comparison diagram of the clean signal and the noisy signal in Embodiment 1 of the present invention; Figure 17 This is a residual signal diagram of Embodiment 1 of the present invention. Detailed Implementation
[0024] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0025] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0026] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0027] Example 1 This embodiment discloses a laser methane telemetry noise reduction method based on a sparrow search algorithm.
[0028] To more clearly illustrate this embodiment, the laser methane telemetry denoising process optimized based on the sparrow search algorithm can be specifically described as follows: A laser methane telemetry denoising method based on the sparrow search algorithm optimization includes: S1. Acquire the noisy harmonic signal in the laser methane detection system and preprocess it to obtain a one-dimensional time-series vector; S2. Use the sparrow search algorithm to adaptively optimize the denoising parameters to obtain the optimized parameter combination; S3. Based on the optimized parameter combination, the singular value decomposition algorithm is used to perform global denoising on the one-dimensional time-series vector to obtain the initial denoised signal. S4. Based on the optimized parameter combination, the initial denoised signal is locally denoised using the improved wavelet transform to obtain the final denoised signal; S5. Calculate the methane gas concentration based on the final denoised signal.
[0029] In this embodiment, an open-path methane telemetry system based on tunable diode laser absorption spectroscopy (TDLAS) technology is constructed, employing a sparrow search algorithm to optimize a global-first, local-second collaborative denoising architecture. The sparrow search algorithm adaptively adjusts and determines optimal parameters such as the singular order k and the wavelet decomposition level L, constructing a denoising algorithm model architecture based on the collaboration of singular value decomposition (SVD) and wavelet transform, which is then applied to a laser methane concentration precision detection system.
[0030] like Figure 1 As shown, in step S1, the noisy harmonic signal in the laser methane detection system is acquired and preprocessed to obtain a one-dimensional time-series vector.
[0031] (1) A distributed feedback laser is used as the laser emission source, and its center wavelength is tuned to the near-infrared characteristic absorption line of methane.
[0032] A distributed feedback (DFB) laser was used, with the center wavelength tuned to the absorption line of methane in the near-infrared band, which was selected to be 1653.7 μm.
[0033] (2) The laser is wavelength modulated by superimposing a high-frequency sinusoidal modulation signal on the laser's drive current.
[0034] Wavelength modulation technology is used to superimpose a high-frequency sinusoidal modulation signal onto the laser drive current to modulate the laser wavelength.
[0035] Specifically, a high-frequency signal generator is controlled to generate a 10kHz high-frequency sinusoidal modulation signal with a modulation amplitude of 5mA (peak value). This modulation signal is then superimposed on the drive current of the DFB laser to achieve high-frequency modulation of the laser's wavelength.
[0036] (3) Collect the intensity signal of the laser transmitted light after absorption by methane, and obtain a digital electrical signal through photoelectric conversion, analog amplification and analog-to-digital conversion.
[0037] The modulated laser beam passes through an absorption cell containing the methane to be tested. Part of the laser beam is selectively absorbed by the methane gas, and the remaining transmitted light intensity signal carries methane concentration information. At the same time, due to factors such as optical interference and electromagnetic interference in the open / closed detection environment, the transmitted light intensity signal naturally carries various environmental noises, forming a noisy light intensity signal.
[0038] The transmitted light intensity signal is collected, and after photoelectric conversion and analog amplification, it is converted into a digital signal y(t) by an analog-to-digital converter.
[0039] Specifically, 1) The photodetector receives the noisy transmitted light intensity signal after being absorbed by methane gas and converts it into a corresponding analog electrical signal.
[0040] 2) Since the amplitude of the optical signal is weak after being absorbed by the gas, and the converted electrical signal contains inherent noise such as shot noise and thermal noise, the analog electrical signal is amplified by an analog amplifier to increase the signal amplitude and ensure the effectiveness of subsequent signal acquisition.
[0041] 3) A high-speed analog-to-digital converter (ADC) is used to perform high-speed analog-to-digital conversion on the amplified noisy analog electrical signal. The sampling rate is set to 1MHz and the sampling is continuously collected for 1s. The continuous analog electrical signal is converted into a discrete digital electrical signal to obtain the original noisy digital signal y(t). This signal is the original data for subsequent harmonic extraction and still contains various noise and redundant information.
[0042] (4) Extract the first and second harmonics from the digital electrical signal using digital quadrature lock-in amplification technology.
[0043] The first harmonic (1f) and second harmonic (2f) signals are extracted from y(t) using digital quadrature lock-in amplification technology.
[0044] Specifically, the digital quadrature lock-in amplification algorithm is used to perform harmonic decomposition on the original noisy digital signal y(t), accurately extracting the first harmonic (1f) signal that is in the same frequency as the laser modulation signal and the second harmonic (2f) signal that is a multiple of the modulation signal. These two types of harmonic signals are the core effective signals for laser methane detection. At the same time, they still carry complex noise such as optical interference fringes, pulse noise, and 1 / f pink noise, forming noisy harmonic signals.
[0045] (5) Downsampling and standardization are performed on the first and second harmonics to obtain a one-dimensional time-series vector.
[0046] The extracted noisy harmonic signal is downsampled to remove redundant sampling points and the signal is standardized into a discrete data sequence of length 2000 points. Finally, the one-dimensional time-series vector y(i) of the noisy harmonic signal of the laser methane detection system is obtained.
[0047] The time-series harmonic signal y(i) containing noise within a single cycle detected by the system is the sum of the useful signal s(i) and the noise signal n(i).
[0048] Furthermore, in addition to acquiring noisy harmonic signals from the laser methane detection system, simulated signals can also be used, such as... Figure 2 The image shows a clean signal as simulated. Figure 3 The signal after adding noise to the simulation.
[0049] like Figure 1 As shown, in step S2, the sparrow search algorithm is used to adaptively optimize the denoising parameters to obtain the optimized parameter combination.
[0050] This embodiment employs a combination of singular value decomposition (SVD) and wavelet transform for denoising.
[0051] If only one of the existing technologies is used, it often leads to local optima. For example, excessive truncation in SVD can cause features to be included in the residual along with noise. If the wavelet layer still uses a conventional static threshold, it will result in oversmoothing; conversely, it will result in residual noise. In addition, traditional hard / soft thresholding functions have mathematical discontinuities or constant biases. This discontinuity can cause drastic jumps in the fitness function and gradient mutations during the iteration of intelligent swarm optimization algorithms, making the algorithm prone to getting trapped in local optima and unable to achieve globally optimal matching of parameters across modules.
[0052] In practical applications of Singular Value Decomposition (SVD) denoising algorithms, the choice of the number of singular values is crucial, as it directly affects the effectiveness of harmonic signal noise suppression. If the chosen singular value order is too large, too much noise signal may not be effectively removed; conversely, if the chosen k value is too small, too much useful signal may be mistakenly deleted.
[0053] In the application of wavelet denoising algorithms, determining the appropriate number of decomposition levels is a crucial step affecting the denoising effect. Different decomposition levels will lead to different distributions of wavelet coefficients, thus significantly affecting the quality of the denoised signal. If the number of decomposition levels is set too low, it will be difficult to fully separate the signal from the noise components, reducing the denoising effect; conversely, if the number of decomposition levels is set too high, the signal may be over-decomposed, causing significant distortion in the reconstruction stage, while also increasing the algorithm complexity and reducing computational efficiency.
[0054] Based on the influence of parameters such as the effective order of singular value decomposition reconstruction, the wavelet threshold function adjustment factor, the wavelet threshold formula scaling factor, and the number of wavelet decomposition layers on the denoising effect, and taking into account both denoising performance and computational efficiency, we can achieve synergistic denoising of singular value decomposition and wavelet transform. Therefore, before denoising, we need to use swarm intelligence optimization algorithms to optimize the parameters.
[0055] Genetic algorithms (GA) and particle swarm optimization (PSO) have been used to optimize wavelet thresholds. However, PSO is prone to getting trapped in local optima, and GA has a slow convergence speed. The Sparrow Search Algorithm (SSA), proposed in 2020, is a novel algorithm that, compared to PSO and GA, has stronger global search capabilities and faster convergence speed, making it particularly suitable for handling multimodal, high-dimensional parameter optimization problems. The Sparrow Search Algorithm (SSA) is a novel swarm intelligence optimization algorithm inspired by the foraging and anti-predation behaviors of sparrows. Compared to traditional particle swarm optimization (PSO) and genetic algorithms (GA), SSA features fast convergence speed, high optimization accuracy, and good stability.
[0056] In this embodiment, SSA divides the population into three categories: Discoverers, typically comprising 10%-20% of the population, are responsible for extensive exploration throughout the SVD-wavelet parametric coupling space. Because the continuous high-order differentiable threshold function of this invention eliminates pitfalls in the optimization space, discoverers can quickly pinpoint the optimal parameter solution region that balances global coarse filtering in SVD with local fine-tuning in wavelet analysis. They possess high fitness values (calculated by combining SNR and RMSE) and a wide search range, laying the foundation for subsequent parameter fine-tuning.
[0057] Joiners: Following the discoverer, they perform deep optimization in the vicinity of the optimal parameter solution region. If the discoverer finds a high-fidelity parameter combination that enables high-fidelity reconstruction of the TDLAS harmonic signal, they immediately converge, fine-tuning the threshold adjustment factor and the number of decomposition layers; otherwise, they perform random walks. This mechanism ensures the rapid joint convergence of the cascaded algorithm parameters.
[0058] The watchdogs, comprising 10%-20% of the population, are responsible for monitoring the risk of parameter mismatch during the optimization process. When they realize that the algorithm has fallen into a local optimum (e.g., parameter combinations causing severe oversmoothing of the reconstructed signal or producing pseudo-Gibbs oscillations leading to fitness stagnation), they quickly change positions, forcing the population to escape the current mismatched parameter combination and move towards the global optimum. This mechanism endows the cross-module architecture of this invention with a powerful ability to escape local optima and achieve global collaborative matching.
[0059] like Figure 2As shown, in this embodiment, the sparrow search algorithm is used to adaptively optimize the denoising parameters to obtain the optimized parameter combination. The specific process is as follows: (1) Initialize the population parameters of the sparrow search algorithm and use the denoising parameter combination as the position of each individual sparrow.
[0060] Define the population size and maximum number of iterations for the sparrow search algorithm, and construct a vector containing four optimization variables. The optimization variables are the effective order k of SVD reconstruction (an integer, ranging from [1, 50]) and the improved threshold function adjustment factor. (Continuous real numbers, ranging from [0.1, 10.0]), threshold scaling coefficient (A continuous real number, ranging from [0.1, 5.0]), the wavelet decomposition level L (an integer, ranging from [1, 10]), and initialize the spatial position of all individual sparrows.
[0061] The position vector X of each individual sparrow i Represents a set of potential denoising parameters, expressed as: ; in, (Integer), representing the effective order of SVD reconstruction; (Continuous real number), representing the adjustment factor of the new threshold function, which controls the approximation speed; (Continuous real number), representing the scaling factor in the threshold formula; (Integer), representing the wavelet decomposition level.
[0062] (2) Analyze the current parameter combination based on the current sparrow population location.
[0063] Based on the current sparrow population location, we analyze the effective order of singular value decomposition reconstruction, the adjustment factor of wavelet threshold function, the scaling factor of wavelet threshold formula, and the number of wavelet decomposition layers.
[0064] (3) Based on the current parameter combination, construct the Hankel matrix for the one-dimensional time series vector and perform singular value decomposition to achieve global denoising.
[0065] The specific implementation steps are the same as the detailed steps in step S3.
[0066] (4) Based on the current parameter combination, the global denoised signal is subjected to improved wavelet transform processing to achieve local denoising.
[0067] The specific implementation steps are the same as the detailed steps in step S4.
[0068] (5) Based on the denoised signal, calculate the fitness function value corresponding to the current parameter combination.
[0069] 1) Calculate the signal-to-noise ratio of the denoised signal.
[0070] 2) Calculate the normalized correlation coefficient.
[0071] 3) Based on the signal-to-noise ratio and normalized correlation coefficient of the denoised signal, construct the fitness function and calculate the fitness function value corresponding to the current parameter combination.
[0072] Specifically, in order to comprehensively evaluate the denoising effect, both noise suppression capability and signal fidelity must be considered, and a fitness function must be constructed, the formula of which is: ; Wherein, SNR is the signal-to-noise ratio, which measures the purity after denoising; NCC is the normalized correlation coefficient, which measures the waveform consistency between the denoised signal and the ideal signal (or the low-frequency components in the original noisy signal); w1 and w2 are the weighting coefficients of the signal-to-noise ratio and the normalized correlation coefficient, respectively, used to balance the two.
[0073] The formula for signal-to-noise ratio (SNR) is: ; The normalized correlation coefficient (NCC) formula is: ; The closer the NCC is to 1, the better the signal waveform (especially the width and symmetry of the absorption peak) is preserved, and the less distortion occurs.
[0074] SSA's goal is to find a group , making maximize.
[0075] (6) Divide the sparrow population roles according to the fitness function value, and update the positions of the discoverer, joiner and vigilant respectively.
[0076] Sparrows were sorted according to their fitness values and divided into discoverers (20%), joiners (80%), and vigilants (20%).
[0077] Discoverer: Performs an extensive search within the solution space, updating positions using non-linear decreasing weights; Joiners: Follow the discoverer and move towards the best area with the highest current fitness. The watchdog randomly selects a subset of individuals to monitor environmental hazards (where they may get stuck in local optima). When it discovers that its fitness is below average or it is in a stagnant state, it executes a random jump mechanism to prevent the algorithm from getting trapped in local parameter traps that can only remove noise but cause waveform distortion.
[0078] (7) Repeat steps (3) to (6) until the current iteration number reaches the maximum iteration number, and output the optimized parameter combination.
[0079] When the maximum number of iterations T=50 is reached, the globally optimal parameter combination is output. .
[0080] The optimized parameter combination includes: the effective order of singular value decomposition reconstruction, the wavelet threshold function adjustment factor, the wavelet threshold formula scaling factor, and the number of wavelet decomposition layers.
[0081] The effective order k of SVD reconstruction, the wavelet threshold function adjustment factor α, the wavelet threshold formula scaling factor r, and the number of wavelet decomposition layers L.
[0082] like Figure 1 As shown, in step S3, based on the optimized parameter combination, the singular value decomposition algorithm is used to perform global denoising on the one-dimensional time-series vector to obtain the initial denoised signal.
[0083] The optimal parameter combination output is used to perform final collaborative denoising on the currently acquired noisy signal. Specifically, the SVD reconstruction order k obtained in step 2 is used. best Global denoising is performed on the noisy signal y(i). The specific process is as follows: (1) Construct the Hankel matrix of the one-dimensional time series vector.
[0084] Let y(i) = [y1, y2, ..., y N Construct it into a Hankel matrix A, with the following formula:
[0085] (2) Perform singular value decomposition on the Hankel matrix.
[0086] Where all elements in the first column of matrix A and the last row y n+1 to y N The elements, concatenated end-to-end, constitute the original harmonic signal time series data. Therefore, using singular value decomposition (SVD) to denoise the harmonic signal is essentially decomposing the constructed Hankel matrix, from which we can obtain: ; ; Where U is the left singular vector matrix, Σ is the singular value diagonal matrix, λ is the non-zero singular value of A, and V is the right singular vector matrix.
[0087] (3) Reconstruct the effective order reconstruction matrix based on the optimized singular value decomposition to obtain the initial denoised signal.
[0088] After the time-series data of harmonic signals undergo singular value decomposition, since the singular values in the diagonal matrix are arranged in order of magnitude, λ iThe magnitude of the singular values reflects the concentration of useful signal and noise energy. Singular values indicate the importance of the signal; larger singular values correspond to the main components of the signal, while smaller singular values correspond to noise or other minor components. The first k larger singular values mainly reflect the gas spectral absorption signal, while the smaller singular values mainly reflect the noise signal. If the singular value reflecting noise is set to zero, then its corresponding component y... i-k It will be subtracted from the original harmonic signal.
[0089] Based on the current optimization order parameter k, only the top k largest singular values and their corresponding eigenvectors are retained for inverse reconstruction, resulting in an intermediate signal x that effectively suppresses optical interference fringes and some low-frequency trend terms. {svd} (t).
[0090] Specifically, by selecting the first k largest singular values and setting all other singular values to zero, the denoised diagonal matrix can be obtained, as shown in the formula: ; In the above formula, the parameter k is the order of the singular values. First, using the unitary matrices U and V formed by the left and right singular value vectors, and the updated diagonal matrix ∑... k The original signal is reconstructed to obtain matrix A. Then, a one-dimensional signal y is extracted from matrix A. k (i), thereby obtaining the harmonic signal after noise reduction.
[0091] In PyCharm, a second harmonic signal was simulated as the analysis sample. After denoising using the SVD algorithm with different singular value orders, the denoised signal was obtained as follows: Figure 5 , 6 As shown, it is easy to see that the choice of different singular value orders has a significant impact on the noise reduction effect of the second harmonic signal. Figure 5 The denoising effect of SVD is shown when k=5, while Figure 6 This shows the denoising effect when k=10. Therefore, the appropriateness of parameter selection directly affects the noise suppression effect of harmonic signals. In the complex environment of oil and gas facility sites, noise amplitude often exhibits strong time-varying characteristics. It is difficult to achieve ideal noise reduction results using SVD algorithms with fixed parameters. In this embodiment, the adaptive singular value order SVD noise suppression algorithm can be adjusted according to the specific characteristics of harmonic signal measurement data and noise characteristics to achieve better noise suppression results.
[0092] like Figure 1 As shown, in step S4, based on the optimized parameter combination, the improved wavelet transform is used to perform local denoising on the initial denoised signal to obtain the final denoised signal.
[0093] The wavelet denoising algorithm decomposes the signal layer by layer using wavelet functions. After obtaining low-frequency approximation coefficients and high-frequency detail coefficients, it uses a threshold function to compare all wavelet coefficients with a wavelet threshold determined based on the noise standard deviation. Coefficients greater than the threshold are considered signal features, while those less than the threshold are considered noise. The wavelet coefficients are then quantized according to the threshold function.
[0094] In wavelet denoising algorithms, there are several key parameters, namely the selection of wavelet function, the determination of the number of decomposition layers, the appropriate threshold, and the selection of threshold function.
[0095] Specifically, (1) based on the optimized wavelet decomposition layer, the initial denoised signal is subjected to discrete wavelet transform using the sym5 wavelet basis function to extract the detail coefficients of each layer.
[0096] The initial denoised signal is subjected to multi-scale wavelet decomposition using the sym5 wavelet basis, with the number of decomposition levels being the current optimization parameter L, and the detail coefficients dj of each level are extracted.
[0097] (2) Based on the detail coefficients of each layer, construct an adaptive threshold function that varies with the decomposition scale and calculate the adaptive threshold.
[0098] Most wavelet denoising methods use a universal threshold. This threshold is fixed for all scales j. However, noise in TDLAS signals is often not pure white noise; the signal-to-noise ratio is high in the low-frequency band (large scale) and low in the high-frequency band (small scale). A uniform threshold can easily lead to the false rejection of low-frequency signals (past noise) or the retention of high-frequency noise (under-denoising).
[0099] To address the drawbacks of the traditional uniform threshold, a threshold formula that varies with the decomposition scale j is introduced: ; Where N is the signal length; The noise standard deviation estimate is typically calculated using the median of the first-level detail coefficients. j represents the current decomposition scale level. is the global fine-tuning coefficient, used as an optimization variable for SSA; k is the singular order of SVD; L is the wavelet decomposition level.
[0100] In wavelet decomposition, a smaller j corresponds to a higher frequency, and a larger j corresponds to a lower frequency. Random noise in TDLAS signals is mainly concentrated in the high-frequency band, while effective signal energy is mainly concentrated in the low-frequency band. This formula introduces the layer number variable j, enabling the threshold to adaptively optimize according to the frequency distribution.
[0101] denominator in the formula This achieves dynamic adjustment in two aspects. Firstly, as the number of layers j increases, the denominator increases, driving the threshold T. j The threshold decreases smoothly with increasing scale. When j=1, the threshold is relatively large, which is beneficial for strongly filtering out high-frequency noise; when j=L, the threshold decreases significantly, accurately protecting weak signal features in the low-frequency band from being accidentally deleted.
[0102] On the other hand, a correction term is introduced. When the current-level SVD truncation order k is large, The increase automatically shifts the logarithmic growth curve to the right, which allows the wavelet to maintain a high level of denoising suppression in shallow decomposition, successfully compensating for the nonlinear parameter isolation interference during SVD preprocessing and wavelet denoising.
[0103] like Figure 7 As shown, the global fine-tuning coefficients The introduction of this factor determines the threshold T for different frequency layers. j The overall size is the baseline width of the dead zone in the threshold function. Traditional scale-dependent thresholds often have fixed coefficients, which cannot adapt to complex and variable operating conditions.
[0104] Introduction Then, SSA can raise or lower the threshold baseline based on the actual background noise level: when As the threshold value increases, the effective point of the nonlinear threshold curve shifts outward, the dead zone widens, and more coefficients are treated as noise and truncated, resulting in more aggressive denoising but also a higher risk of damaging the signal. When the waveform is smaller, the effective point shrinks, preserving more waveform details and resulting in high signal fidelity, but with more residual noise.
[0105] Based on the formula, calculate the adaptive threshold that varies with the decomposition scale. .
[0106] (3) Based on the adaptive threshold, an improved threshold function is constructed to shrink the detail coefficients of each layer.
[0107] Traditional wavelet denoising has limitations in selecting the threshold function and a suitable threshold. Traditional methods mainly include hard thresholding and soft thresholding, where the hard thresholding function is expressed as: ; in, These are the detail coefficients for each layer of the original wavelet.
[0108] exist There are discontinuities at these points. These discontinuities will cause oscillations at the signal edges during inverse transform reconstruction, severely affecting the fitting of the gas absorption peak shape.
[0109] The soft threshold function is expressed as: ; Although continuous, all coefficients greater than the threshold were subtracted. This results in an overall reduction in the amplitude of the reconstructed signal. In TDLAS, the peak height of the 2f signal directly corresponds to the gas concentration. The "constant bias" caused by the soft threshold leads to a systematic underestimation of the concentration measurement results, and the error increases with the threshold.
[0110] To simultaneously address the discontinuity of the hard threshold and the constant deviation of the soft threshold, an improved threshold function based on exponential adjustment is constructed, with the following formula: ; in, These are the detail coefficients of each layer of the original wavelet. The coefficients after processing. An adaptive threshold that varies with the decomposition scale. It is a regulating factor.
[0111] A mathematical property analysis and advantage demonstration of the improved threshold function are conducted, specifically: 1) Proof of continuity.
[0112] when hour,
[0113] This is The function value is equal to 0 at the threshold. Therefore, the function is continuous at the threshold, completely eliminating the oscillation problem caused by the hard threshold and ensuring the smoothness of the reconstructed signal.
[0114] when (That is, when encountering a strong signal coefficient, such as the top of an absorption peak) the exponential term The rapid increase led to the fractional term It approaches 0. At this point, This means that for large coefficients, the function produces almost no decay, asymptotically approaching the hard-threshold function y=x. In contrast, the soft-threshold function always maintains a deviation of |d| - T. Therefore, this new function can preserve the peak height of the 2f signal very well, which is crucial for ensuring the accuracy of methane concentration inversion (especially at high concentrations).
[0115] 2) Regulatory factors Its function.
[0116] like Figure 12 As shown, parameters This controls how quickly the function transitions from 0 to y=x. When When the exponential term is very large, it grows extremely rapidly, and the function quickly approaches the hard threshold with minimal deviation; when... When the value is very small, the transition is smooth, exhibiting denoising and smoothing characteristics similar to a soft threshold.
[0117] In other words, using the current parameters Substituting these values into the above formula for the continuously differentiable higher-order threshold function, and shrinking the coefficients, we obtain the processed threshold function, which is: ; This function is The exponential term is continuous, and when the coefficient is large, the exponential term... The rapid increase causes the subtrahend term to approach 0, and the processed coefficients quickly approximate the identity transformation (y=x). This overcomes the discontinuous oscillations of the hard threshold and avoids the constant deviation problem of the traditional soft threshold.
[0118] The choice of wavelet basis functions also has a significant impact on the denoising results. Four commonly used wavelet families are used for systematic comparison: Daubecheies (db), Coiflets (coif), Biorthogonal (bior), and Symlets (sym). Specifically, Daubecheies wavelets include db4, db5, db6, db7, db8, db9, and db10; Symlets wavelets include sym4, sym5, sym6, sym7, sym8, sym9, and sym10; Coiflets wavelets include coif1, coif2, coif3, coif4, and coif5; and Biorthogonal wavelets include bior1.3, bior2.2, bior2.4, bior2.6, bior3.1, bior3.3, bior3.5, and bior3.7. Under the condition of wavelet denoising using a fixed soft threshold function, different wavelet basis functions were combined with 4–8 decomposition levels, resulting in 82 effective denoising parameter configurations. The denoising performance of each parameter combination was evaluated by calculating the difference between the signal-to-noise ratio (SNR) of the denoised signal and the SNR before denoising. Some wavelet basis functions and decomposition levels with superior SNR performance were selected for visualization, as shown in the heatmap. Figure 8-11 As shown.
[0119] Depend on Figure 8-11 It can be seen that the sym5 wavelet basis function has the largest snr at a decomposition level of 5. Therefore, sym5 is chosen as the wavelet basis function.
[0120] Through the above steps, the improved threshold function achieves high-order continuous differentiability at the threshold by introducing an exponential adjustment term, eliminating the gradient breakage and constant bias present in traditional hard and soft threshold functions. This provides a smooth search gradient for the parameter optimization algorithm and ensures the stability of global convergence.
[0121] (4) Perform wavelet inverse transform on the detail coefficients after shrinkage to obtain the final collaborative denoising signal.
[0122] The final collaboratively denoised signal x is obtained by inverse wavelet transform. {final} (t).
[0123] To balance thorough denoising with waveform fidelity, x is calculated based on the fitness function formula. {final} (t) represents the signal-to-noise ratio improvement (SNR) and normalized correlation coefficient (NCC) relative to the original signal, expressed as: ; The higher the fitness value, the better the fitness of the set of parameters. The better the overall noise reduction effect in the current noise environment.
[0124] like Figure 1 As shown, in step S5, the methane gas concentration is calculated based on the final denoised signal.
[0125] (1) Calculate the peak intensity of the second harmonic signal and the intensity of the first harmonic signal at the time corresponding to the peak.
[0126] From step S4, the final denoised signal is obtained, which is time-series data containing the first and second harmonic components. From this time-series data, the peak intensity of the second harmonic signal is extracted. And the intensity of the first harmonic signal at the time corresponding to that peak value. .
[0127] 1) Calculate the peak intensity of the second harmonic signal.
[0128] The simplified formula for the second harmonic signal is: GI2f = ηR0H2²; Where G is the photoelectric gain coefficient, I2f is the second harmonic signal intensity, η is the target reflection coefficient, R0 is the baseline signal amplitude, and H2 is the second harmonic component coefficient.
[0129] The peak intensity of the second harmonic signal is obtained using the simplified formula for the second harmonic signal. .
[0130] 2) Calculate the second harmonic signal.
[0131] The simplified formula for the first harmonic signal is: GI1f = ηR0i1H1²; in, The first harmonic signal strength, For the first term coefficient of the modulation current, These are the component coefficients of the first harmonic. Because... With light intensity They exhibit a linear proportional relationship and are often used to eliminate light intensity fluctuation interference.
[0132] The peak intensity of the first harmonic signal is obtained using the simplified formula for the second harmonic signal. .
[0133] (2) Calculate the normalized second harmonic signal value of the first harmonic. The calculation formula is: ; The ratio Proportional to methane gas concentration ,Right now .
[0134] (3) The final methane gas concentration is obtained based on the normalized signal value.
[0135] Normalized signal values Substituting these values into the concentration inversion model, the slope k and intercept b are obtained using the least squares method to achieve concentration inversion. The formula is as follows: .
[0136] To verify the effectiveness of the SSA-optimized adaptive singular-order SVD and improved wavelet transform collaborative architecture, comparative experiments were conducted with traditional SVD denoising, single wavelet threshold denoising, and SVD-wavelet joint denoising without SSA optimization.
[0137] like Figure 13 As shown, different algorithms exhibit significant differences in signal-to-noise ratio (SNR) and root mean square error (RMSE): Single wavelet denoising: Although it performs reasonably well in terms of RMSE (0.0504), which is better than traditional SVD, its SNR is only 12.02 dB. This is mainly because the traditional wavelet threshold function has a constant deviation or discontinuity when processing signal boundaries, resulting in the loss of some effective high-frequency details.
[0138] Traditional SVD denoising (SVD): Its SNR (13.09dB) is slightly higher than wavelet denoising, but its RMSE is as high as 0.1151. As can be seen from the "SVD denoising results" graph in the synthesis panel, although SVD can recover the signal contour, a large amount of high-frequency noise remains in the reconstructed signal, and it is extremely sensitive to the choice of singular value order k, which easily leads to over-smoothing or under-denoising.
[0139] Ordinary joint denoising: Simply concatenating SVD and wavelet denoising significantly improves the denoising effect, achieving an SNR of 13.98 dB and reducing RMSE to 0.0468. This demonstrates that the collaborative filtering architecture can complement the shortcomings of the two algorithms.
[0140] Building upon the standard joint architecture, this study introduces the Sparrow Search Algorithm (SSA) to globally optimize key parameters, further exploring the algorithm's potential. According to the panel results of the comprehensive experiments, this algorithm achieves the best denoising performance. Parameter adaptive optimization: such as Figure 14 As shown in the singular value distribution of SSVD, the algorithm accurately locates the extreme points of the singular value difference spectrum using SSA, adaptively selects the optimal order k=9, and effectively separates the signal subspace from the noise subspace. Simultaneously, the parameters of the improved wavelet threshold function are optimized to... , This effectively avoids the Gibbs phenomenon, which causes oscillations at the leading and trailing edges of the peak, distorting the peak shape and thus affecting the accuracy of concentration inversion.
[0141] Final performance improvement: After SSA optimization, the final SNR of this algorithm is improved to 20.20dB, which is 6.22dB higher than the ordinary joint method (13.98dB) and 12.78dB higher than single wavelet denoising. At the same time, the RMSE is reduced by 82.5% compared with the original noisy signal, and the correlation coefficient is as high as 0.9953.
[0142] Signal fidelity: such as Figure 15 This is a comparison image of the final denoising results. Figure 16 This is a comparison chart of clean and noisy signals. Figure 17 The image shows the residual signal. The denoised blue signal has eliminated most of the noise and is close to a clean signal, without distortion. The residual signal exhibits random fluctuations in the time domain, without obvious periodicity, trends, or structural patterns. This indicates that useful components in the original signal were not mistakenly removed; otherwise, periodic or pulse-like features would remain in the residual. The denoising process did not introduce systematic distortion; otherwise, the residual would show correlation or regularity. The standard deviation is extremely small, only 0.0044. This minimum value indicates that noise is highly suppressed, the residual fluctuation amplitude is extremely low, the error between the denoised signal and the ideal signal is very small, and the algorithm has high fidelity.
[0143] Example 2 The purpose of this embodiment is to provide a laser methane telemetry denoising system optimized based on a sparrow search algorithm, including: The data acquisition and processing module is used to acquire noisy harmonic signals in the laser methane detection system and preprocess them to obtain a one-dimensional time-series vector. The parameter optimization module is used to adaptively optimize the denoising parameters using the sparrow search algorithm to obtain the optimized parameter combination; The collaborative denoising module is used to perform global denoising on a one-dimensional time-series vector based on the optimized parameter combination and using the singular value decomposition algorithm to obtain the initial denoised signal. Based on the optimized parameter combination, the improved wavelet transform is used to perform local denoising on the initial denoised signal to obtain the final denoised signal; The concentration inversion module is used to invert and calculate the methane gas concentration based on the final denoised signal.
[0144] Based on the laser methane telemetry denoising system optimized by the sparrow search algorithm, the method steps in Example 1 are implemented.
[0145] Example 3 The purpose of this embodiment is to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the above-described method.
[0146] Example 4 The purpose of this embodiment is to provide a computer-readable storage medium.
[0147] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the above method.
[0148] Example 5 The purpose of this embodiment is to provide a computer program product containing instructions that, when run on a computer, cause the computer to perform the methods and functions involved in any of the above embodiments.
[0149] The steps and methods involved in the apparatus of the above embodiments correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0150] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0151] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A laser methane telemetry denoising method based on a sparrow search algorithm, characterized in that, include: Noisy harmonic signals from the laser methane detection system are acquired and preprocessed to obtain a one-dimensional time-series vector. The sparrow search algorithm is used to adaptively optimize the denoising parameters to obtain the optimized parameter combination. Based on the optimized parameter combination, the singular value decomposition algorithm is used to perform global denoising on the one-dimensional time-series vector to obtain the initial denoised signal. Based on the optimized parameter combination, the improved wavelet transform is used to perform local denoising on the initial denoised signal to obtain the final denoised signal; The methane gas concentration is calculated based on the final denoised signal.
2. The laser methane telemetry denoising method based on the sparrow search algorithm optimization as described in claim 1, characterized in that, The noisy harmonic signal in the laser methane detection system is acquired and preprocessed to obtain a one-dimensional time-series vector. The specific process is as follows: A distributed feedback laser is used as the laser emission source, and its center wavelength is tuned to the near-infrared characteristic absorption line of methane. Wavelength modulation technology is used to superimpose a high-frequency sinusoidal modulation signal onto the laser driving current to modulate the laser wavelength. The intensity signal of the transmitted laser light after absorption by methane is collected, and then converted into a digital electrical signal through photoelectric conversion, analog amplification, and analog-to-digital conversion. The first and second harmonics are extracted from digital electrical signals using digital quadrature lock-in amplification technology. The first and second harmonics are downsampled and normalized to obtain a one-dimensional time series vector.
3. The laser methane telemetry denoising method based on the sparrow search algorithm optimization as described in claim 1, characterized in that, The sparrow search algorithm is used to adaptively optimize the denoising parameters to obtain the optimized parameter combination. The specific process is as follows: Initialize the population parameters of the sparrow search algorithm, and use the combination of denoising parameters as the position of each individual sparrow; Based on the current location of the sparrow population, analyze the current parameter combination; Based on the current parameter combination, a Hankel matrix is constructed from the one-dimensional time series vector and singular value decomposition is performed to achieve global denoising. Based on the current parameter combination, the globally denoised signal is subjected to improved wavelet transform processing to achieve local denoising. Based on the denoised signal, calculate the fitness function value corresponding to the current parameter combination; Sparrow population roles are assigned based on fitness function values, and the positions of discoverers, joiners, and vigilants are updated accordingly. Repeat the above steps until the current iteration count reaches the maximum iteration count, and output the optimized parameter combination.
4. The laser methane telemetry denoising method based on the sparrow search algorithm optimization as described in claim 3, characterized in that, The optimized parameter combination includes: the effective order of singular value decomposition reconstruction, the wavelet threshold function adjustment factor, the wavelet threshold formula scaling factor, and the number of wavelet decomposition layers.
5. The laser methane telemetry denoising method based on the sparrow search algorithm as described in claim 1, characterized in that, Based on the optimized parameter combination, the singular value decomposition algorithm is used to perform global denoising on the one-dimensional time series vector to obtain the initial denoised signal. The specific process is as follows: Construct the Hankel matrix of the one-dimensional time series vector; Perform singular value decomposition on the Hankel matrix; The effective order reconstruction matrix is reconstructed based on the optimized singular value decomposition to obtain the initial denoised signal.
6. The laser methane telemetry denoising method based on the sparrow search algorithm as described in claim 1, characterized in that, Based on the optimized parameter combination, the initial denoised signal is locally denoised using an improved wavelet transform to obtain the final denoised signal. The specific process is as follows: Based on the optimized wavelet decomposition level, the sym5 wavelet basis function is used to perform discrete wavelet transform on the initial denoised signal to extract the detail coefficients of each level. Based on the detail coefficients of each layer, an adaptive threshold function that varies with the decomposition scale is constructed, and the adaptive threshold is calculated. Based on an adaptive threshold, an improved threshold function is constructed to shrink the detail coefficients of each layer. The shrinkage-processed detail coefficients are subjected to inverse wavelet transform to obtain the final collaboratively denoised signal.
7. The laser methane telemetry denoising method based on the sparrow search algorithm optimized as described in claim 6, characterized in that, An adaptive threshold function that varies with the decomposition scale is constructed, as shown in the following formula: ; Where N is the signal length; This is an estimate of the noise standard deviation. j represents the current decomposition scale level. is the global fine-tuning coefficient; k is the SVD singular order; L is the wavelet decomposition level.
8. The laser methane telemetry denoising method based on the sparrow search algorithm as described in claim 6, characterized in that, Construct an improved threshold function, the formula is: ; in, For the detail coefficients of each layer of the original wavelet, The coefficients after processing. An adaptive threshold that varies with the decomposition scale. It is a regulating factor.
9. The laser methane telemetry denoising method based on the sparrow search algorithm optimization as described in claim 1, characterized in that, The methane gas concentration is calculated based on the final denoised signal. The specific process is as follows: Calculate the peak intensity of the second harmonic signal and the intensity of the first harmonic signal at the corresponding moment of the peak. Calculate the normalized second harmonic signal value of the first harmonic; The final methane gas concentration is obtained based on the normalized signal value.
10. A laser methane telemetry denoising system optimized based on a sparrow search algorithm, characterized in that, include: The data acquisition and processing module is used to acquire noisy harmonic signals in the laser methane detection system and preprocess them to obtain a one-dimensional time-series vector. The parameter optimization module is used to adaptively optimize the denoising parameters using the sparrow search algorithm to obtain the optimized parameter combination; The collaborative denoising module is used to perform global denoising on a one-dimensional time-series vector based on the optimized parameter combination and using the singular value decomposition algorithm to obtain the initial denoised signal. Based on the optimized parameter combination, the improved wavelet transform is used to perform local denoising on the initial denoised signal to obtain the final denoised signal; The concentration inversion module is used to invert and calculate the methane gas concentration based on the final denoised signal.