An adaptive denoising method for reflective terahertz time-domain spectroscopy signals

By using an adaptive noise reduction method, utilizing the noise power threshold and piecewise variance in flat regions, and combining SG filtering and nonlinear diffusion filtering, the problems of noise suppression and peak preservation in the noise reduction of reflective terahertz time-domain spectral signals are solved, achieving better noise reduction results.

CN122489918APending Publication Date: 2026-07-31SOUTHWEST PETROLEUM UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SOUTHWEST PETROLEUM UNIV
Filing Date
2026-05-12
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing reflective terahertz time-domain spectral signal denoising algorithms are prone to distortion of peak regions or loss of effective information when removing noise, and the threshold selection is highly dependent, making it difficult to effectively preserve the characteristics of peak regions.

Method used

An adaptive noise reduction method is adopted, which calculates the maximum noise power in the flat region of the terahertz time-domain spectral signal as the threshold, and then judges the regional properties based on the variance after segmentation. The SG filtering algorithm or nonlinear diffusion filtering algorithm is used for adaptive noise reduction to ensure the preservation of the characteristics of the peak region.

Benefits of technology

It outperforms traditional algorithms in terms of signal-to-noise ratio, root mean square error, and Pearson correlation coefficient, and minimizes peak region distortion while removing noise to the greatest extent.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122489918A_ABST
    Figure CN122489918A_ABST
Patent Text Reader

Abstract

This invention relates to the field of terahertz nondestructive testing technology and discloses an adaptive denoising method for reflective terahertz time-domain spectral signals. The method first constructs a reflective terahertz time-domain spectral system and detects the sample; then, it calculates the total noise power in the flat region of the reflective terahertz time-domain spectral signal, and obtains the maximum value of this total noise power, which is used as the threshold for adaptive denoising; finally, the terahertz time-domain spectral signal is segmented and the variance of each segment is calculated. If the variance is less than or equal to 0, the segment is denoised using a nonlinear diffusion filtering algorithm; otherwise, the segment is denoised using an SG filtering algorithm, where L is the total number of segments. Compared with wavelet soft thresholding denoising, SG filtering, and EMD-R / S denoising algorithms, this adaptive denoising method shows better performance in terms of signal-to-noise ratio, root mean square error, and Pearson correlation coefficient after denoising, and exhibits minimal distortion in the peak region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of terahertz nondestructive testing technology, and in particular to an adaptive noise reduction method for reflective terahertz time-domain spectral signals. Background Technology

[0002] Terahertz waves are electromagnetic waves located in the frequency range of 0.1-10 THz. Due to their excellent penetration of non-polar materials, ability to achieve non-contact testing, and lack of harmful ionizing radiation, they have broad application prospects in the field of non-destructive testing. Terahertz non-destructive testing technology relies on terahertz time-domain spectroscopy systems, which are mainly divided into two types: transmission and reflection. Transmission terahertz time-domain spectroscopy systems are mostly used for extracting optical parameters of samples, while reflection terahertz time-domain spectroscopy systems are often used for detecting internal defects in samples.

[0003] However, in actual testing, after performing non-destructive testing on samples using a reflective terahertz time-domain spectroscopy system, the directly obtained terahertz time-domain spectral signal is often affected by various noises. Therefore, it is necessary to perform noise reduction processing on the directly obtained spectral signal. Currently, commonly used algorithms include the Savitzky Golay (SG) filtering algorithm, wavelet soft thresholding denoising algorithm, and Empirical Mode Decomposition - Range / Standard Deviation (EMD). The Decomposition-Range / Standard Deviation (EMD-R / S) noise reduction algorithm; the SG filtering algorithm performs polynomial fitting on time-domain data with a certain odd-length window, replaces the original data with the fitted value at the center point of the window, and performs filtering by sliding the window point by point. Mirror extension processing is used for boundary data before filtering. This algorithm does not analyze and suppress noise characteristics and is prone to causing severe distortion in the spectral peak region, resulting in the loss of effective information; the wavelet soft thresholding noise reduction algorithm uses a selected wavelet basis and decomposition level to decompose the spectral signal into multiple high-frequency components and a single low-frequency component. Each component contains wavelet coefficients of a certain length. The wavelet coefficients are processed by a calculated soft threshold, and then the denoised signal is reconstructed. This method can remove most high-frequency noise, but it is also prone to mistakenly removing effective components in the high-frequency range; the EMD-R / S noise reduction algorithm first decomposes the spectral signal into several intrinsic mode functions (IMFs). The mode function (IMF) is used to calculate the corresponding Hurst exponent based on the R / S value of each IMF, thereby setting a threshold. Finally, the noise-dominant IMF component is removed according to the threshold and the signal is reconstructed. Its performance is highly dependent on the selection of the Hurst exponent threshold: if the threshold is too small, the noise residue will be serious, and if the threshold is too large, the effective information will be lost. Therefore, there is an urgent need for a noise reduction method that can effectively remove spectral signal noise and retain the effective information in the peak region to the greatest extent. Summary of the Invention

[0004] This invention addresses the limitations of existing denoising algorithms for reflective terahertz time-domain spectral signals by proposing an adaptive denoising method. This method first calculates the maximum noise power in the flat region of the terahertz time-domain spectral signal and uses it as a threshold. Second, it divides the spectral signal into several segments based on the maximum data length of the peak region. Then, it calculates the variance of each segment. If the variance of a segment is less than or equal to the threshold, the SG filtering algorithm is used for denoising; otherwise, a nonlinear diffusion filtering algorithm is used. Compared with the SG filtering algorithm, wavelet soft thresholding denoising algorithm, and EMD-R / S denoising algorithm, the adaptive denoising algorithm provided by this invention performs better in terms of signal-to-noise ratio (SNR), root mean square error (RMSE), and Pearson correlation coefficient (PCC), and exhibits the least distortion in the peak region, thus achieving better denoising performance for reflective terahertz time-domain spectral signals.

[0005] This invention provides an adaptive noise reduction method for reflective terahertz time-domain spectral signals, comprising: Step 1. Construct a reflection terahertz time-domain spectroscopy system and detect the sample: Step 1-1. Build a reflective terahertz time-domain spectroscopy system, place the metal plate on a two-dimensional moving platform, and then place the sample to be detected on the metal plate; Step 1-2. Perform 12 detections at the same location of the sample to obtain the corresponding terahertz time-domain spectral signal, wherein the terahertz transmitter emits terahertz waves vertically at an incident angle of 0 degrees. Step 2. Calculate the threshold for adaptive noise reduction. : Step 2-1. Obtain the first... The time-domain reference signal of the secondary detected spectral signal and Second echo time-domain sample signal ,in, , Time-domain reference signal The first reflection peak of the spectral signal is the reflection peak on the upper surface of the sample, and the zero-echo time-domain sample signal. The second reflection peak, representing the reflection from the lower surface of the sample, is the time-domain sample signal of the first echo. The first echo reflection peak of the sample's lower surface is the third reflection peak; the second echo time-domain sample signal is the second echo reflection peak of the sample's lower surface, which is the fourth reflection peak; and the third echo time-domain sample signal is the third echo reflection peak of the sample's lower surface, which is the fifth reflection peak. Step 2-2. Separation Noiseless time-domain reference signal in and noisy time-domain reference signal : Noiseless time-domain reference signal Defined as: obtained from 12 detections The signal obtained by calculating the arithmetic mean, i.e. ; The noisy time-domain reference signal is defined as: ; Steps 2-3. Separation In Second echo noiseless time-domain sample signal and Second echo noisy time-domain sample signal ; Second echo noiseless time-domain sample signal Defined as: obtained from 12 detections The signal obtained by calculating the arithmetic mean, i.e. ; Second echo noisy time-domain sample signal Defined as: ; Steps 2-4. For the time-domain signal and Perform a Fourier transform to obtain the frequency domain signal. and ,in It is the angular frequency in the terahertz band; Steps 2-5. Calculation and ratio Noise-free terms and noisy terms ,in ; Steps 2-6. Derivation variance , in, yes The transmitter noise power, yes air noise power, yes The receiver shot noise power, yes Other noise power of the receiver, yes amplitude-frequency characteristics, yes amplitude-frequency characteristics, It is electron charge. It is the noise bandwidth. The calculation formula is: , The calculation formula is: , The real refractive index of the sample is... It is the distance between the terahertz emitter and the upper surface of the sample. It's the speed of light; Steps 2-7. Utilize time and calculate , , and ; Steps 2-8. From and calculate and ; Step 2-9. Calculate the total noise power in the flat region of the terahertz time-domain spectral signal. maximum value and will Defined as the threshold for adaptive noise reduction, where the total noise power in the flat region... The air noise power in the flat area is The Johnson noise power in the receiver is ; Step 3. Adaptive noise reduction: Step 3-1. Segment the terahertz time-domain spectral signal, using the maximum data length K of the peak region as a reference. To ensure the consistency of each segment size, divide the complete terahertz time-domain spectral signal consisting of N data points into segments. The data is divided into L segments, where And it is divisible N The smallest positive integer; Step 3-2. Calculate the variance of each terahertz time-domain spectral signal segment. ,in , This is the i-th data point of the spectral signal. This is the arithmetic mean of all data in this terahertz time-domain spectral signal. ; Step 3-3. Calculate the variance of each time-domain spectral signal. With adaptive noise reduction threshold The comparison is performed, and an appropriate denoising algorithm is executed to denoise each segment of the time-domain spectral signal based on the comparison results; like If the time-domain spectral signal is determined to be a non-flat region, a nonlinear diffusion filtering algorithm is used for noise reduction. The steps of nonlinear diffusion filtering include: First, initializing the number of nonlinear diffusion filters for this segment of the spectrum signal. Then, the gradient values ​​of the data in this spectral signal segment are calculated sequentially. , i=3,4,…,M; secondly, all Substituting the diffusion parameters in sequence, we get: diffusion function The diffusion coefficient is calculated in the middle; next, the diffusion coefficient will be calculated. and Substitute the values ​​in order, with a time step of... Iterative filtering formula The data obtained after one filtering of the (i-1)th data point is obtained. Furthermore, one data point at each end of this spectral signal remains unchanged; finally, the spectral signal after the first filtering is subjected to the aforementioned nonlinear diffusion filtering again, and this process is repeated until... The final nonlinear diffusion filter denoising result is obtained for this segment of the spectrum, where The maximum number of filters set; like If the time-domain spectral signal is determined to be a flat region, the SG filtering algorithm is used for noise reduction. The steps of the SG filtering algorithm include: First, determining the length p of the window, where p is an odd number; second, constructing an r-degree polynomial. , Next, the data within the leftmost window of this spectral signal are calculated sequentially. The sum of squared errors, i.e. Then, establish a system of equations. Solve for r+1 unknown coefficients ,get The detailed expression; later, the index of the window center point. Substitution In the middle section, SG filtering is implemented on the data in the center of the window; finally, the window is moved with a step size of 1, and SG filtering is performed on the data in the middle of the window in sequence; in order to ensure that the data on both sides of this spectral signal are filtered... Each data point can be subjected to SG filtering, and the data is supplemented by mirroring and flipping.

[0006] Compared with the prior art, the advantages of the present invention are as follows: 1. The present invention provides an adaptive noise reduction method for reflective terahertz time-domain spectral signals, which uses the maximum noise power in a flat region as the threshold for adaptive noise reduction, thereby adaptively achieving noise reduction using the SG filtering algorithm in flat regions and the nonlinear diffusion filtering algorithm in non-flat regions. 2. The present invention provides an adaptive noise reduction method for reflective terahertz time-domain spectral signals, which can remove the influence of noise in flat regions to the greatest extent while retaining the characteristics of peak regions; 3. The adaptive denoising method for reflective terahertz time-domain spectral signals provided by this invention has better performance in terms of signal-to-noise ratio, root mean square error, and Pearson correlation coefficient compared with SG filtering algorithm, wavelet soft thresholding denoising algorithm, and EMD-R / S denoising algorithm, and has less loss in the peak region, that is, better denoising effect on reflective terahertz time-domain spectral signals. Attached Figure Description

[0007] Figure 1 A flowchart of an adaptive noise reduction method for reflective terahertz time-domain spectral signals provided by the present invention; Figure 2 The present invention provides an adaptive noise reduction method for reflective terahertz time-domain spectral signals. Under the condition that the vertical distance between the terahertz transmitter and the upper surface of the carbon black-free high-density polyethylene (HDPE) flat plate sample is 7.5 cm, after detecting a certain point of the carbon black-free HDPE flat plate sample, the distribution map of the total noise power of the flat area in the frequency band of 0.1~2.2 THz is obtained. Figure 3 The adaptive noise reduction method for reflective terahertz time-domain spectral signals provided by this invention is compared with the noise reduction effects of SG filtering algorithm, wavelet soft thresholding algorithm and EMD-R / S noise reduction algorithm under the condition that the vertical distance between the terahertz transmitter and the upper surface of the carbon black-free HDPE plate sample is 7.5cm. Detailed Implementation

[0008] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples; the following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0009] Example 1: This example provides a method for calculating the adaptive noise reduction threshold to achieve adaptive noise reduction of reflective terahertz time-domain spectral signals. The method, with specific steps as follows: Step 1-1. Build a reflective terahertz time-domain spectroscopy system, place the metal plate on a two-dimensional moving platform, and then place the sample to be detected on the metal plate; Step 1-2. Perform 12 detections at the same location of the sample to obtain the corresponding terahertz time-domain spectral signal, wherein the terahertz transmitter emits terahertz waves vertically at an incident angle of 0 degrees. Steps 1-3. Obtain the... The time-domain reference signal of the secondary detected spectral signal and Second echo time-domain sample signal ,in, , Time-domain reference signal The first reflection peak of the spectral signal is the reflection peak on the upper surface of the sample, and the zero-echo time-domain sample signal. The second reflection peak, representing the reflection from the lower surface of the sample, is the time-domain sample signal of the first echo. The first echo reflection peak (also known as the third reflection peak) on the lower surface of the sample is the second echo time-domain sample signal. The second echo reflection peak (the fourth reflection peak) is located on the lower surface of the sample, and the third echo time-domain sample signal is also shown. The fifth reflection peak is the third echo reflection peak on the lower surface of the sample. Steps 1-4. Separation Noiseless time-domain reference signal in and noisy time-domain reference signal ; Noiseless time-domain reference signal Defined as: obtained from 12 detections The signal obtained by calculating the arithmetic mean, i.e. ; The noisy time-domain reference signal is defined as: ; Steps 1-5. Separation In Second echo noiseless time-domain sample signal and Second echo noisy time-domain sample signal ; Second echo noiseless time-domain sample signal Defined as: obtained from 12 detections The signal obtained by calculating the arithmetic mean, i.e. ; Second echo noisy time-domain sample signal Defined as: ; Steps 1-6. For time-domain signals and Perform a Fourier transform to obtain the frequency domain signal. and ,in It is the angular frequency in the terahertz band; Steps 1-7. Calculation and ratio Noise-free terms and noisy terms ,in ; Steps 1-8. Derivation variance , in, yes The transmitter noise power, yes air noise power, yes The receiver shot noise power, yes Other noise power of the receiver, yes amplitude-frequency characteristics, yes amplitude-frequency characteristics, It is electron charge. It is the noise bandwidth. The calculation formula is: , The calculation formula is: , The real refractive index of the sample is... It is the distance between the terahertz emitter and the upper surface of the sample. It's the speed of light; Steps 1-9. Utilize time and calculate , , and ; Steps 1-10. By and calculate and ; Step 1-11. Calculate the total noise power in the flat region of the terahertz time-domain spectral signal. maximum value and will Defined as the threshold for adaptive noise reduction, where the total noise power in the flat region... The air noise power in the flat area is The Johnson noise power in the receiver is .

[0010] Example 2: Obtaining the adaptive noise reduction threshold based on Example 1 This invention provides an adaptive noise reduction method for reflective terahertz time-domain spectral signals, the specific implementation steps of which are as follows: Step 2-1. Obtain the adaptive noise reduction threshold according to Example 1. ; Step 2-2. Segment the terahertz time-domain spectral signal, using the maximum data length K of the peak region as a reference. To ensure the consistency of each segment size, divide the complete terahertz time-domain spectral signal consisting of N data points into segments. The data is divided into L segments, where And it is the smallest positive integer that can divide N; Steps 2-3. Calculate the variance of each time-domain spectral signal segment. ,in , This is the i-th data point of the spectral signal. It is the arithmetic mean of all data in this spectral signal. ; Steps 2-4. Calculate the variance of each time-domain spectral signal. With adaptive noise reduction threshold The comparisons are made, and a suitable denoising algorithm is selected based on the comparison results to denoise each segment of the time-domain spectral signal; if If the time-domain spectral signal is not flat, then this segment is identified as a non-flat region, and a nonlinear diffusion filtering algorithm is used for noise reduction; if If the time-domain spectral signal is determined to be a flat region, the SG filtering algorithm is used for noise reduction. The steps of nonlinear diffusion filtering include: First, initializing the number of nonlinear diffusion filters for this segment of the spectrum signal. Then, the gradient values ​​of the data in this spectral signal segment are calculated sequentially. , i=3,4,…,M; secondly, all Substituting the diffusion parameters in sequence, we get: diffusion function The diffusion coefficient is calculated in the middle; next, the diffusion coefficient will be calculated. and Substitute the values ​​in order, with a time step of... Iterative filtering formula The data obtained after one filtering of the (i-1)th data point is obtained. Furthermore, one data point at each end of this spectral signal remains unchanged; finally, the spectral signal after the first filtering is subjected to the aforementioned nonlinear diffusion filtering again, and this process is repeated until... The final nonlinear diffusion filter denoising result is obtained for this segment of the spectrum, where The maximum number of filters set; The steps of the SG filtering algorithm include: First, determining the length p of the window, where p is an odd number; second, constructing an r-degree polynomial. , Next, the data within the leftmost window of this spectral signal are calculated sequentially. The sum of squared errors, i.e. Then, establish a system of equations. Solve for r+1 unknown coefficients ,get The detailed expression; later, the index of the window center point. Substitution In the middle section, SG filtering is implemented on the data in the center of the window; finally, the window is moved with a step size of 1, and SG filtering is performed on the data in the middle of the window in sequence; in order to ensure that the data on both sides of this spectral signal are filtered... Each data point can be subjected to SG filtering, and the data is supplemented by mirroring and flipping.

[0011] In the second embodiment of the present invention, an example of an adaptive noise reduction method specifically using a reflective terahertz time-domain spectral signal is as follows: Step 1. Construct a reflection terahertz time-domain spectroscopy system and detect the sample: Step 1-1. Build a reflection terahertz time-domain spectroscopy system and place the metal plate on a two-dimensional moving platform. Then place the carbon black-free HDPE flat plate sample to be tested on the metal plate. Step 1-2. Using computer software, control the two-dimensional moving platform to move the detection point of the HDPE flat plate sample directly below the terahertz emitter. Adjust the terahertz emitter to emit vertically at a 0-degree incident angle. Detect this point 12 times sequentially, obtaining 12 terahertz time-domain spectral signals. The distance between the terahertz emitter and the upper surface of the HDPE flat plate sample is... ; Step 2. Obtain the adaptive noise reduction threshold according to Example 1. The real refractive index of the HDPE flat plate sample in the terahertz frequency band. : Step 3. Adaptive noise reduction: Step 3-1. Segment the terahertz time-domain spectral signal. The maximum data length of the peak region is K=150. To ensure complete segmentation, the complete terahertz time-domain spectral signal consisting of N=7000 data points is divided into L=35 segments with M=200 data points each. Step 3-2. Calculate the variance of each time-domain spectral signal segment. ,in , This is the i-th data point of the spectral signal. It is the arithmetic mean of all data in this spectral signal. ; Step 3-3. Calculate the variance of each time-domain spectral signal. With adaptive noise reduction threshold The comparison is performed, and based on the comparison results, a suitable denoising algorithm is selected to denoise each segment of the time-domain spectral signal; if The terahertz time-domain spectral signal is then classified as a non-flat region, and a nonlinear diffusion filter algorithm is used for noise reduction. The number of filters is 50, the time step is 0.1, and the noise reduction parameters are... ;like If the time-domain spectral signal is determined to be a flat region, the SG filtering algorithm is used for noise reduction. The degree of the fitting polynomial for noise reduction is 3, and the window length is 21.

[0012] Table 1 shows the denoising of a terahertz time-domain spectral signal generated at a certain point of a carbon black-free HDPE flat plate sample using an adaptive denoising method for reflective terahertz time-domain spectral signals, wavelet soft thresholding denoising algorithm, EMD-R / S denoising algorithm, and SG filtering algorithm. The signal-to-noise ratio, root mean square error, and Pearson correlation coefficient of the obtained terahertz time-domain spectral signals are compared. The results show that the adaptive denoising method for reflective terahertz time-domain spectral signals provided in this invention performs better in terms of signal-to-noise ratio, root mean square error, and Pearson correlation coefficient, that is, the denoising effect is far superior to commonly used algorithms such as wavelet soft thresholding denoising algorithm, EMD-R / S denoising algorithm, and SG filtering algorithm.

[0013] Table 1. Noise reduction performance indicators of four noise reduction algorithms; .

[0014] In summary, the first embodiment of the present invention provides the threshold required for adaptive noise reduction of terahertz time-domain spectral signals. The method; subsequently, the second embodiment of the present invention, based on the first embodiment, provides a reflective terahertz time-domain spectral signal. An adaptive denoising method for reflective terahertz time-domain spectral signals is proposed. Experimental results show that, compared with wavelet soft thresholding denoising algorithm, SG filtering algorithm and EMD-R / S denoising algorithm, the adaptive denoising method for reflective terahertz time-domain spectral signals provided by this invention has better performance in terms of signal-to-noise ratio, root mean square error and Pearson correlation coefficient, and the distortion degree in the peak region of the spectral signal is the smallest.

[0015] The present invention provides an adaptive noise reduction method for reflective terahertz time-domain spectral signals. The entire process is as follows: Figure 1 As shown: First, a reflective terahertz time-domain spectroscopy system is constructed and the sample is scanned; then, the total noise power in the flat region of the terahertz time-domain spectral signal is calculated. This allows us to obtain the threshold for adaptive noise reduction. Finally, the terahertz time-domain spectral signal is segmented and its variance is calculated. ,like If the noise level is high, a nonlinear diffusion filter algorithm is used for noise reduction; otherwise, an SG filter algorithm is used. .

[0016] To verify the effectiveness of the present invention, the terahertz time-domain spectral signal was processed by adaptive noise reduction algorithm, wavelet soft threshold noise reduction algorithm, SG filtering algorithm and EMD-R / S noise reduction algorithm respectively, and the noise reduction effect was compared.

[0017] Figure 2 An adaptive noise reduction method for reflective terahertz time-domain spectral signals is presented. Under the condition that the vertical distance between the terahertz transmitter and the upper surface of the carbon black-free HDPE flat plate sample is 7.5 cm, the distribution of the total noise power in the flat area of ​​the sample after detection at a certain point of the carbon black-free HDPE flat plate sample is obtained in the frequency band of 0.1~2.2 THz. Figure 3 This paper illustrates the comparison of the entire terahertz time-domain spectral signal and its peak region before and after processing using an adaptive denoising algorithm, wavelet soft thresholding algorithm, EMD-R / S denoising algorithm, and SG filtering algorithm for reflective terahertz time-domain spectral signals provided by this invention. Under the same conditions, the adaptive denoising algorithm for reflective terahertz time-domain spectral signals provided by this invention exhibits the least distortion in the peak region of the spectral signal compared to the wavelet soft thresholding algorithm, EMD-R / S denoising algorithm, and SG filtering algorithm.

[0018] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. An adaptive noise reduction method for reflective terahertz time-domain spectral signals, characterized in that, include: Step 1. Construct a reflection terahertz time-domain spectroscopy system and detect the sample: Step 1-1. Build a reflective terahertz time-domain spectroscopy system, place the metal plate on a two-dimensional moving platform, and then place the sample to be detected on the metal plate for terahertz detection. Step 1-2. Perform 12 detections at the same location of the sample to obtain the corresponding terahertz time-domain spectral signal, wherein the terahertz transmitter emits terahertz waves vertically at an incident angle of 0 degrees. Step 2. Calculate the threshold for adaptive noise reduction. : Step 2-1. Obtain the first... The time-domain reference signal of the secondary detected spectral signal and Second echo time-domain sample signal ,in, , Time-domain reference signal The first reflection peak of the spectral signal is the reflection peak on the upper surface of the sample, and the zero-echo time-domain sample signal. The second reflection peak, representing the reflection from the lower surface of the sample, is the time-domain sample signal of the first echo. The first echo reflection peak (also known as the third reflection peak) on the lower surface of the sample is the second echo time-domain sample signal. The second echo reflection peak (the fourth reflection peak) is located on the lower surface of the sample, and the third echo time-domain sample signal is also shown. The fifth reflection peak is the third echo reflection peak on the lower surface of the sample. Step 2-2. Isolation noiseless time-domain reference signal and noisy time-domain reference signal ; Step 2-3. Isolation Primary echo noiseless time-domain sample signal and Primary echo noisy time-domain sample signal ;​ Step 2-4. Fourier transform of the time domain signal and where is the angular frequency of the terahertz band.​​ Steps 2-5. Calculation and ratio noise-free terms and noisy terms ,in ; Step 2-6. Calculation of variance of the variance , in, yes The transmitter noise power, yes air noise power, yes The receiver shot noise power, yes Other noise power of the receiver, yes amplitude-frequency characteristics, yes amplitude-frequency characteristics, It is electron charge. It is the noise bandwidth. The calculation formula is: , The calculation formula is: , The real refractive index of the sample is... It is the distance between the terahertz emitter and the upper surface of the sample. It's the speed of light; Steps 2-7. Utilize time and calculate , , and ; Step 2-8. From and calculations and ; Step 2-9. Calculate the total noise power in the flat region of the terahertz time-domain spectral signal. maximum value and will Defined as the threshold for adaptive noise reduction; Step 3. Adaptive noise reduction: Step 3-1. Divide the terahertz time-domain spectral signal into L equal segments; Step 3-2. Calculate the variance of each segment of the terahertz time-domain spectroscopy signal wherein , is the i-th data of the segment of the spectroscopy signal, is the arithmetic mean of all data of the segment of the terahertz time-domain spectroscopy signal, ; Step 3-3. Comparing the variance of each segment of time domain spectral signal with a threshold of adaptive noise reduction with the threshold of adaptive noise reduction and performing appropriate noise reduction algorithm according to the comparison result.

2. The adaptive noise reduction method for reflective terahertz time-domain spectral signals according to claim 1, characterized in that, In step 2-2, the noiseless time-domain reference signal Defined as: obtained from 12 detections The signal obtained by calculating the arithmetic mean; The noisy time-domain reference signal is defined as: .

3. The adaptive noise reduction method for reflective terahertz time-domain spectral signals according to claim 1, characterized in that, In steps 2-3, Second echo noiseless time-domain sample signal Defined as: obtained from 12 detections The signal obtained by calculating the arithmetic mean; Second echo noisy time-domain sample signal Defined as: .

4. The adaptive noise reduction method for reflective terahertz time-domain spectral signals according to claim 1, characterized in that, In steps 2-9, the total noise power in the flat region of the terahertz time-domain spectral signal Air noise power in flat areas Johnson noise power in the receiver .

5. The adaptive noise reduction method for reflective terahertz time-domain spectral signals according to claim 1, characterized in that, In step 3-1, when segmenting the terahertz time-domain spectral signal, the maximum data length K of the peak region is used as a reference. To ensure that the size of each segment is consistent, the complete terahertz time-domain spectral signal composed of N data points is divided into segments. The data is divided into L segments, where And M is divisible N The smallest positive integer.

6. The adaptive noise reduction method for reflective terahertz time-domain spectral signals according to claim 1, characterized in that, In step 3-3, the method for executing a suitable noise reduction algorithm is as follows: If If the time-domain spectral signal is not flat, then this segment is identified as a non-flat region, and a nonlinear diffusion filtering algorithm is used for noise reduction; if If the time-domain spectral signal is determined to be a flat region, the SG filtering algorithm is used for noise reduction. The steps of nonlinear diffusion filtering include: First, initializing the number of nonlinear diffusion filters for this segment of the spectrum signal. Then, the gradient values ​​of the data in this spectral signal segment are calculated sequentially. , i=3,4,…,M; secondly, all Substituting the diffusion parameters in sequence, we get: diffusion function The diffusion coefficient is calculated in the middle; next, the diffusion coefficient will be calculated. and Substitute the values ​​in order, with a time step of... Iterative filtering formula The data obtained after one filtering of the (i-1)th data point is obtained. Furthermore, one data point at each end of this spectral signal remains unchanged; finally, the spectral signal after the first filtering is subjected to the aforementioned nonlinear diffusion filtering again, and this process is repeated until... The final nonlinear diffusion filter denoising result is obtained for this segment of the spectrum, where The maximum number of filters set; The steps of the SG filtering algorithm include: First, determining the length p of the window, where p is an odd number; second, constructing an r-degree polynomial. , Next, the data within the leftmost window of this spectral signal are calculated sequentially. The sum of squares of the errors, i.e. Then, establish a system of equations. Solve for r+1 unknown coefficients ,get The expression; later, the index of the window center point. Substitution In the middle section, SG filtering is implemented on the data in the center of the window; finally, the window is moved with a step size of 1, and SG filtering is performed on the data in the middle of the window in sequence; in order to ensure that the data on both sides of this spectral signal are filtered... Each data point can be subjected to SG filtering, and the data is supplemented by mirroring and flipping.