Flight state monitoring method of plant protection UAV based on adaptive wavelet packet denoising
Through the adaptive wavelet packet noise reduction algorithm, the problem that traditional technology is difficult to monitor the flight attitude of plant protection drones in complex noise environments is solved, and effective monitoring is achieved in environments of uneven bandwidth changes, improving signal-to-noise ratio and energy retention , enhances the ability to identify signals of interest.
Patent Information
- Application Number
- CN202111383162.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-10-28
- Filing Date
- 2021-11-22
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2041-11-22
Smart Images

Figure CN114216433B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a mechanical state monitoring method of adaptive wavelet packet noise reduction (WPD), which is mainly used for monitoring the flight posture of a spraying operation of a plant protection UAV. Background Art
[0002] During the spraying operation of the plant protection UAV, its flight posture has a very important influence on the spraying effect. Therefore, the research on the flight posture monitoring of its spraying operation is of great value and significance. There are many methods for status monitoring of various equipment, but most of these equipment are expensive, have poor environmental adaptability, and have high requirements for working conditions and environment. The use of acoustic signals to monitor the working status of equipment can overcome these unfavorable factors. The present invention proposes a method for monitoring the spraying flight status of a plant protection UAV using acoustic signals.
[0003] Since there is a lot of interference noise in the working environment of plant protection UAVs, the most critical step in using acoustic signals to monitor the flight avoidance posture of plant protection UAVs is signal noise reduction. There are many methods of noise reduction, among which wavelet packet noise reduction is the most widely used. Traditional wavelet packet transform has a certain noise reduction ability, but for plant protection UAVs working in complex noise environments, traditional wavelet packet noise reduction technology still has some defects. For example, pure Gaussian distribution noise exhibits a constant variance at all frequencies in the measurement bandwidth, which is an inappropriate assumption in the spray operation environment of plant protection UAVs. In addition, due to a large number of parameters (such as wavelet functions, decomposition levels, threshold selection methods, etc.), there is no definite method for selecting these parameters. The present invention designs a replicable algorithm to help select appropriate parameters to adapt to the flight posture monitoring of spray operations of various plant protection UAVs in a noise environment with uneven bandwidth changes. Summary of the invention
[0004] The purpose of the present invention is to propose an adaptive WPD algorithm to overcome the flight attitude monitoring of UAVs in a noisy environment with uneven bandwidth variation.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] Step 1: Acquisition of noisy signals of the flight attitude of the plant protection UAV;
[0007] Step 2: Adopt the adaptive WPD algorithm to denoise the data to remove the noise pollution and DC components contained in the data;
[0008] Step 3: Use Welch's method to estimate the acoustic characteristics of each acquired signal block to help reduce spectral leakage, where Welch's method is:
[0009]
[0010] In the formula, PSD[f](W / Hz) represents the power spectral density estimate at the nth point with a frequency of f(Hz), N represents the length of the discrete signal, n represents the discrete point at which the signal is Fourier transformed, Δt represents the sampling period, f represents the sampling frequency, h[n] represents a window function, and x[n](Pa) represents the acquired time domain signal;
[0011] Step 4: Based on the power spectrum density estimate calculated in step 3, select (0-f)kHz and divide it into m frequency bands on average. These m frequency bands contain more than 90% of the signal energy. Calculate the power on the m frequency bands to reduce the amount of data used to detect non-stationary flight attitudes and the variability between the spectral lines:
[0012]
[0013] In the formula, b[k](w) represents the frequency f a and f b The average power of the k-band is defined as k = m (the same below), f a and f b It represents the starting frequency and ending frequency of any one of the m frequency bands calculated, and Δf (Hz) is the frequency resolution;
[0014] Step 5. To quantify the difference in acoustic transmissibility caused by the non-steady flight attitude, the power estimate of the frequency band containing the main energy of the signal is subtracted from the average baseline, which corresponds to the average frequency band power of the steady flight attitude data subset measured by the microphone under the same test conditions (steady flight attitude):
[0015]
[0016] In the formula, Δb d [k] (unit: W) is the frequency band power difference at different flight attitude angles d, b d [k] is the power estimate of different flight attitude angle bands, is the average band power estimate for the data subset in the steady flight attitude;
[0017] Step 6. The band power differences are rolled into a single metric for detecting and distinguishing flight attitude angles, the sum of absolute differences, which is simply calculated as the sum of the absolute values of the band power differences (SAD) for each data block:
[0018]
[0019] In the formula, SAD d It is the sum of the absolute differences of different flight attitude angle data;
[0020] Step 7: Perform outlier analysis on the SAD value. In the entire data set, remove the data points with an absolute deviation less than or greater than 3 times the median to achieve the purpose of removing outliers.
[0021] Step 8. Store the final set of processed SAD values without outliers for subsequent comparison with the experimental SAD data subset to detect and distinguish between smooth and non-steady flight attitudes of the aircraft. A flight attitude detection threshold is established, which is equal to three standard deviations above the mean of the smooth flight attitude data subset, and is used to classify SAD values exceeding this threshold as non-steady flight attitudes.
[0022] In the above steps, how to reduce the noise of the attitude sound signal of the plant protection UAV in step 2 of the present invention also includes the following specific technical solutions:
[0023] Step 2.1: The collected N-point time domain signal x[n] (where n=1, 2, 3...) is filtered by a low-pass scaling filter G and a high-pass wavelet filter H respectively. The N-point time domain signal is decomposed into the first level (j=1) of the wavelet packet (node), and then downsampled by 2. As a result, the N / 2-point wavelet packet nodes W1; 0 and W 1;1 The corresponding frequency ranges are [0,fs / 4] and [fs / 4,fs / 2] respectively. 1;0 and W 1;1 ) Apply the same filtering and downsampling operations to obtain finer resolution in the frequency domain. The result is that the four N / 4 point wavelet packets corresponding to the time information of the original signal are divided into four equal-width frequency bands, and the process is repeated until the noise signal and the signal of interest can be better distinguished;
[0024] Step 2.2: Calculate the signal-to-noise ratio (SNR) for each terminal node k , and the signal-to-noise ratio is estimated relative to frequency:
[0025]
[0026] SNR k is the wavelet packet node W L,k The signal-to-noise ratio corresponding to the frequency subband, W L,k represents the terminal node coefficient of wavelet packet decomposition, L represents the number of decomposition layers, k represents the kth node of the Lth layer; W L,k,n is the node W corresponding to the wavelet packet L,k The coefficient of the pure noise interval, n represents the pure noise node;
[0027] Step 2.3, considering only the coefficients of the pure noise interval, calculate the noise standard deviation for each terminal node:
[0028]
[0029] σ L,k is the noise standard deviation of the kth node at the maximum decomposition level L, W L,k represents the terminal node coefficient of wavelet packet decomposition, L represents the number of decomposition layers, and k represents the kth node of the Lth layer;
[0030] Step 2.4, adjust the risk of the selected threshold based on the signal-to-noise ratio of the measured time response. The risk threshold is calculated based on the use of Birge and Massart's adaptive density estimation strategy, which determines the best projection of the unknown density from the minimum of the risk function. This strategy is easy to relate and apply to wavelet thresholding, where the best approximation of the projection of the wavelet coefficients of the unknown signal is determined. The threshold that produces the wavelet coefficients corresponding to the best approximation is determined by calculating:
[0031]
[0032] W s (k) is the absolute value of all wavelet coefficients sorted in descending order, α is the sparsity penalty term, N is the total number of wavelet coefficients, and t is the current index, i.e., the coefficient in the current subset; it can be observed that the risk function represents a trade-off between the wavelet coefficient subset and the penalty function, which depends on the size of the sample space and the sparsity parameter;
[0033] Step 2.5. From step (4), we can see that increasing or decreasing the sparsity parameter α(risk) will increase or decrease the sparsity of the thresholded wavelet coefficients, corresponding to the minimum value of the risk function t min Related to the threshold that produces the best projection of the wavelet coefficients:
[0034] T BM (α) = W S (t min )
[0035] T BM (α) is the threshold obtained from the Birgé-Massart strategy for a given penalty coefficient α;
[0036] Step 2.6: For each terminal node, the coefficient corresponding to the pure noise interval is set to 0, and the remaining coefficients (signal and noise) are suppressed by the corresponding thresholds calculated in steps (2.4) and (2.5);
[0037] Step 2.7: Reconstruct the denoised time response by applying the inverse wavelet packet transform to the improved coefficients.
[0038] For the measurement of wavelet packet denoising parameters, we evaluate the effectiveness of each wavelet parameter on the denoising performance through three quality assessment indicators: signal-to-noise ratio improvement, percentage of energy retained after denoising of the signal of interest, and entropy of wavelet coefficients. Each of the three indicators is specifically selected to quantify the degree of approximately retaining the energy of the clean signal, that is, the percentage of retained energy, and approximately enhancing the distinguishability of the clean signal from the noise, that is, the degree of signal-to-noise ratio improvement and entropy;
[0039] a. Improvement of signal-to-noise ratio
[0040] The signal-to-noise ratio is defined as the ratio between the signal power of interest and the noise power. In order to quantify the improvement in the signal-to-noise ratio, the signal-to-noise ratio after applying the WPD algorithm must be quantified. In order to accurately estimate the signal-to-noise ratio after denoising (a posteriori SNR), the WPD process is applied to the clean signal without any added noise, and the reconstructed response corresponds only to the signal content retained from the WPD process, marked as the denoised clean signal; further, the denoised clean signal is subtracted from the reconstructed response obtained by applying the WPD process to the clean signal with added noise to obtain the noise content remaining after denoising; now, the signal-to-noise ratio improvement can be properly calculated as follows:
[0041]
[0042] In the formula, ΔSNR is the improvement in signal-to-noise ratio, SNR P is the a posteriori signal-to-noise ratio, SNR I is the initial signal-to-noise ratio, x sd is the denoised response without added noise, x d is the denoised response with added noise, x s is the signal of interest, x n is the noise signal. A larger ΔSNR value corresponds to a better denoising performance;
[0043] b. Signal energy retention percentage
[0044] The percentage of energy remaining corresponding only to the signal of interest is calculated as the ratio between the l-2 norm of the denoised response without added noise and the original signal of interest:
[0045]
[0046] In the formula, L2R is the l-2 norm ratio. The ideal value of L2R is 1, which means that no energy is lost in the WPD process. ΔSNR and L2R need to be carefully checked to ensure that the ideal balance is maintained between removing noise and preserving energy;
[0047] c. Wavelet coefficient entropy
[0048] Entropy, as a measure to quantify the disorder of wavelet packet coefficients (how evenly / unevenly the values are distributed), can be calculated as follows:
[0049]
[0050] In the formula, Q j,k is the entropy of the kth node on the jth layer, W j,k represents the wavelet coefficient of the kth node on the jth layer, t corresponds to the coefficient index of the wavelet packet node, T j is the number of coefficients in the wavelet packet node of the jth layer. When the values of the coefficients are uniformly distributed, the entropy will be large, and fewer large-valued signal coefficients are expected to correspond to smaller entropy values, thereby enhancing the ability to distinguish signals of interest and transient noise events from ambient noise.
[0051] Compared with the traditional wavelet packet denoising technology, the beneficial effects of the present invention are: the adaptive wavelet packet denoising technology adopted by the present invention can adapt to plant protection UAVs working in complex noise environments. In addition, due to a large number of parameters (such as wavelet functions, decomposition levels, threshold selection methods, etc.), there is no exact method for selecting these parameters. The present invention designs a replicable algorithm to help select appropriate parameters to adapt to the monitoring of the flight posture of each plant protection UAV in a noise environment with uneven bandwidth changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a structural block diagram of the obstacle avoidance flight attitude monitoring method of the plant protection UAV of the present invention;
[0053] Figure 2 It is the wavelet packet decomposition and reconstruction diagram of the flight attitude acoustic signal of the plant protection UAV;
[0054] Figure 3 It is a flow chart of adaptive wavelet packet denoising of the flight attitude acoustic signal of plant protection UAV;
[0055] Figure 4 It is a schematic diagram of the acoustic signal processing program for the stable and non-steady flight states of the plant protection UAV. DETAILED DESCRIPTION
[0056] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0057] The present invention provides a method for monitoring the flight attitude of a plant protection UAV based on adaptive wavelet packet denoising. Specifically, adaptive wavelet packet denoising is performed on the avoidance attitude signal of the plant protection UAV to suppress the interference of the external noise environment, thereby improving the monitoring and identification of the flight attitude of the plant protection UAV.
[0058] The purpose of the present invention is to achieve the following technical solution: monitoring the flight attitude of a plant protection UAV based on adaptive wavelet packet denoising, and the implementation steps are as follows:
[0059] This article uses the "Gengyun No. 1" agricultural plant protection UAV, model 3WWDZ-10C as the research object, mainly monitoring the pitch angle, roll angle and yaw angle.
[0060] Step 1. Place the sound pressure sensor directly under the drone to collect the sound pressure signal. This article applies the sound pressure signals of the drone in stable flight, pitch angle (-15°, -8°, 8°, 15°), roll angle (-10°, -5°, 5°, 10°), and yaw angle (-40°, -20°, 20°, 40°). 300 sets of data are collected for each posture, 150 sets are training samples, and 150 sets are test samples.
[0061] Step 2: Adaptive wavelet packet denoising is performed on the signal data collected by the plant protection UAV. Figure 2 and Figure 3 Schematic diagram of wavelet packet decomposition and flow chart of adaptive wavelet packet denoising.
[0062] Step 2.1, when performing wavelet packet denoising on the collected time domain signal x[n] (here n=1, 2, 3...), for the decomposition level of wavelet packet transform, we determine the selected decomposition level by comparing the trade-off between the improvement of signal-to-noise ratio (ΔSNR) and the retained signal energy (L2R). When the initial signal-to-noise ratio is -5dB and the signal-to-noise ratio improvement (ΔSNR) is 11.8dB, the decomposition level that can maintain at least 90% of the signal energy is always level 7. The wavelet function is selected based on the three indicators of the improvement of signal-to-noise ratio (ΔSNR), the retained signal energy (L2R) and the entropy of the wavelet coefficient. When the initial signal-to-noise ratio is 6dB, the wavelet function that produces the largest L2R (greater than 90%), the largest ΔSNR (13.96dB) and the lowest entropy (4.84) is db35. Therefore, in the adaptive WPD algorithm, we choose the wavelet function db35 and the number of decomposition layers is 7.
[0063] Step 2.2: For each terminal node, the denoising threshold is selected by dividing the initial SNR and using the energy to maintain L2R ≥ 90% and the SNR improvement metric. Specifically, when the initial SNR is between (-∞, -4) dB, TBM (1) produces the best SNR improvement; when it is between (-4, -3) dB, TBM (2) produces the best SNR improvement; when it is between (-3, -2) dB, TBM (3) produces the best SNR improvement; when it is between (-2, 0) dB, TBM (4) produces the best SNR improvement; when it is between (0, ∞) dB, TBM (5) produces the best SNR improvement. The above thresholds are selected to denoise the terminal nodes to maintain the integrity of the signal of interest.
[0064] Step 2.3: Reconstruct the denoised signal.
[0065] Step 3: Use Welch's method to estimate the acoustic characteristics of each acquired signal block to help reduce spectral leakage, where Welch's method is:
[0066]
[0067] In the formula, PSD[f](W / Hz) represents f th (Hz) The power spectral density estimate of the frequency component, h[n] represents the Hamming window function. x[n](Pa) represents the acquired time domain signal, as shown in the attached figure. Figure 4 As shown in step 3.
[0068] Step 4: Based on the power spectrum density estimate calculated in step 3, select 0-20kHz and divide it into 30 frequency bands on average. These 30 frequency bands contain more than 90% of the signal energy. Calculate the power on the 30 frequency bands to reduce the amount of data used to detect non-stationary flight attitudes and the variability between the spectral lines. Repeat 150 times for each attitude:
[0069]
[0070] In the formula, b[k](w) represents the frequency f a and f b The average power of the defined k-band, k = 30, f a and f b It indicates the starting frequency and ending frequency of any one of the 30 frequency bands calculated, and Δf (Hz) is the frequency resolution. Figure 4 As shown in step 4.
[0071] Step 5: To quantify the difference in acoustic transmissibility caused by the non-steady flight attitude, subtract the estimated frequency band power from the average baseline. The average baseline corresponds to the average frequency band power of the steady flight attitude data subset measured by the microphone under the same test conditions (steady flight attitude). The calculation method is the same as the average frequency band power of the non-steady flight attitude. Both are calculated according to step 4. Then, the power of the 30 frequency bands of the non-steady flight attitude calculated for each data block is subtracted from the power of the 30 frequency bands of the steady flight attitude. Repeat 150 times for each flight attitude:
[0072]
[0073] In the formula, Δb d [k] (W) is the band power difference of different flight attitudes d (pitch, roll, yaw), b d [k] is the frequency band power estimate for the non-stationary flight attitude, is the average frequency band power estimate of the data subset of the stable flight attitude. The so-called average frequency band power estimate is the average value of 150 sets of data, as shown in the attached figure. Figure 4 As shown in step 5.
[0074] Step 6: Use the absolute values of the power differences of 30 frequency bands of different flight attitudes (150 groups each) calculated in step 5 and the stable flight attitude to sum them up, as shown in the following formula:
[0075]
[0076] In the formula, SAD d It is the sum of absolute differences of different flight attitude data, k = 30, and each attitude has 150 sums of absolute differences SAD d The data points form the data curve of the sum of absolute differences of different flight attitudes. Figure 4 As shown in step 6.
[0077] Step 7: Using the data curve of the sum of absolute differences of different flight attitudes in step 6, calculate the median curve of the data, the data curve of 3 times the median absolute deviation and the data curve of -3 times the median absolute deviation, and remove the points that are no longer in the median deviation curve, as shown in the attached figure. Figure 4 As shown in step 7.
[0078] Step 8. Store the final set of processed SAD values without outliers for subsequent comparison with the SAD data subset of the steady flight state to detect and distinguish between steady and non-steady flight attitudes of the aircraft. A flight attitude detection threshold is established, which is equal to three standard deviations above the mean of the steady flight attitude data subset, and is used to classify SAD values exceeding this threshold as non-steady flight attitudes, as shown in the attached figure. Figure 4 as shown in step 8.
[0079] Some test results are shown in the following table:
[0080] Dataset Training sample (group) Test sample (group) Monitoring accuracy Stable flight state 150 150 100% Pitch angle -15° 150 150 97.25% Pitch angle 15° 150 150 96.65% Roll angle -10° 150 150 95.36% Roll angle -10° 150 150 96.44% Yaw angle: 20° 150 150 89.65% Yaw angle 20° 150 150 87.31%
[0081] As shown in the table above, the proposed flight state monitoring method for plant protection UAVs based on adaptive wavelet packet denoising can well complete the flight attitude monitoring of plant protection UAVs in spraying operations in a noise environment with uneven bandwidth changes, and also has the advantage of a small sample size. The present invention can monitor the flight attitude of plant protection UAVs in real time, provide a basis for improving spraying efficiency and operation quality, and avoid waste of resources.
Claims
1. A method for monitoring the flight attitude of a plant protection UAV based on adaptive wavelet packet denoising, characterized in that: The following steps are involved: Step 1: Acquisition of noisy signals of the flight attitude of the plant protection UAV; Step 2: Adopt the adaptive WPD algorithm to denoise the data to remove the noise pollution and DC components contained in the data; Step 3: Use Welch's method to estimate the acoustic characteristics of each acquired signal block to help reduce spectral leakage, where Welch's method is: In the formula, PSD[f](W / Hz) represents the power spectral density estimate at the nth point with a frequency of f(Hz), N represents the length of the discrete signal, n represents the discrete point at which the signal is Fourier transformed, Δt represents the sampling period, f represents the sampling frequency, h[n] represents a window function, and x[n](Pa) represents the acquired time domain signal; Step 4: Based on the power spectrum density estimate calculated in step 3, select (0-f)kHz and divide it into m frequency bands on average. These m frequency bands contain more than 90% of the signal energy. Calculate the power on the m frequency bands to reduce the amount of data used to detect non-stationary flight attitudes and the variability between the spectral lines: In the formula, b[k](w) represents the frequency f a and f b The average power of the defined k-band, k = m, f a and f b It represents the starting frequency and ending frequency of any one of the m frequency bands calculated, and Δf (Hz) is the frequency resolution; Step 5. To quantify the difference in acoustic transmissibility caused by the non-steady flight attitude, the power estimate of the frequency band containing the main energy of the signal is subtracted from the average baseline, which corresponds to the average frequency band power of the steady flight attitude data subset measured by the microphone under the same test conditions, i.e., the steady flight attitude: In the formula, Δb d [k] (unit: W) is the frequency band power difference at different flight attitude angles d, b d [k] is the power estimate of different flight attitude angle bands, is the average band power estimate for the data subset in the steady flight attitude; Step 6. The band power differences are rolled into a single metric for detecting and distinguishing flight attitude angles, the sum of absolute differences, which is simply calculated as the sum of the absolute values of the band power differences (SAD) for each data block: In the formula, SAD d It is the sum of the absolute differences of different flight attitude angle data; Step 7: Perform outlier analysis on the SAD value. In the entire data set, remove the data points with an absolute deviation less than or greater than 3 times the median to achieve the purpose of removing outliers. Step 8. Store the final set of processed SAD values without outliers for subsequent comparison with the experimental SAD data subset to detect and distinguish between smooth and non-steady flight attitudes of the aircraft. A flight attitude detection threshold is established, which is equal to three standard deviations above the mean of the smooth flight attitude data subset, and is used to classify SAD values exceeding this threshold as non-steady flight attitudes.
2. The method for monitoring the flight attitude of a plant protection UAV based on adaptive wavelet packet denoising according to claim 1 is characterized in that: In step 2, the adaptive WPD algorithm is used to denoise the data to remove the noise pollution and DC components contained in the data. The technical solution is as follows: Step 2.1: The collected N-point time domain signal x[n] is filtered by a low-pass scaling filter G and a high-pass wavelet filter H, respectively, n = 1, 2, 3...; the N-point time domain signal is decomposed into the first level of wavelet packet nodes, j = 1; then down-sampled by 2 times; the result is N / 2-point wavelet packet node W 1;0 and W1; 1 corresponds to the frequency range of [0,fs / 4] and [fs / 4,fs / 2] respectively; by the wavelet packet coefficient W of the previous stage 1;0 and W 1;1 Apply the same filtering and downsampling operations to obtain finer resolution in the frequency domain; The result is that the four N / 4-point wavelet packets corresponding to the time information of the original signal are divided into four equal-width frequency bands, and the process is repeated until the noise signal and the signal of interest can be better distinguished; Step 2.2: Calculate the signal-to-noise ratio (SNR) for each terminal node k , and the signal-to-noise ratio is estimated relative to frequency: SNR k is the wavelet packet node W L,k The signal-to-noise ratio corresponding to the frequency subband, W L,k represents the terminal node coefficient of wavelet packet decomposition, L represents the number of decomposition layers, k represents the kth node of the Lth layer; W L,k,n is the node W corresponding to the wavelet packet L,k The coefficient of the pure noise interval, n represents the pure noise node; Step 2.3, considering only the coefficients of the pure noise interval, calculate the noise standard deviation for each terminal node: σ L,k is the noise standard deviation of the kth node at the maximum decomposition level L, W L,k represents the terminal node coefficient of wavelet packet decomposition, L represents the number of decomposition layers, and k represents the kth node of the Lth layer; Step 2.4, adjust the risk of the selected threshold based on the signal-to-noise ratio of the measured time response. The risk threshold is calculated based on the use of Birge and Massart's adaptive density estimation strategy, which determines the best projection of the unknown density from the minimum of the risk function. This strategy is easy to relate and apply to wavelet thresholding, where the best approximation of the projection of the wavelet coefficients of the unknown signal is determined. The threshold that produces the wavelet coefficients corresponding to the best approximation is determined by calculating: W s (k) is the absolute value of all wavelet coefficients sorted in descending order, α is the sparsity penalty term, N is the total number of wavelet coefficients, and t is the current index, i.e., the coefficient in the current subset; it can be observed that the risk function represents a trade-off between the wavelet coefficient subset and the penalty function, which depends on the size of the sample space and the sparsity parameter; Step 2.
5. From step 2.4, we can see that increasing or decreasing the sparsity parameter α will increase or decrease the sparsity of the thresholded wavelet coefficients, corresponding to the minimum value of the risk function t min Related to the threshold that produces the best projection of the wavelet coefficients: T BM (α)=W S (t min ) T BM (α) is the threshold obtained from the Birgé-Massart strategy for a given penalty coefficient α; Step 2.6, for each terminal node, the coefficient corresponding to the pure noise interval is set to 0, and the remaining coefficients, i.e., signal and noise, are suppressed by the corresponding thresholds calculated in steps 2.4 and 2.5; Step 2.7: Reconstruct the denoised time response by applying the inverse wavelet packet transform to the improved coefficients.
3. The method for monitoring the flight attitude of a plant protection UAV based on adaptive wavelet packet denoising according to claim 1 or 2, characterized in that: The step 2 also includes: For the measurement of wavelet packet denoising parameters, the effectiveness of each wavelet parameter on denoising performance is evaluated by three quality assessment indicators: signal-to-noise ratio improvement, percentage of energy retained after denoising of the signal of interest, and entropy of wavelet coefficients; each of the three indicators is specifically selected to quantify the degree of approximately retaining the energy of the clean signal, that is, the percentage of retained energy, and the approximately enhancing the distinguishability of the clean signal from the noise, that is, the degree of signal-to-noise ratio improvement and entropy; a. Improvement of signal-to-noise ratio The signal-to-noise ratio is defined as the ratio between the power of the signal of interest and the power of the noise. To quantify the improvement in the signal-to-noise ratio, the signal-to-noise ratio after applying the WPD algorithm must be quantified. To accurately estimate the signal-to-noise ratio after denoising, i.e., the a posteriori signal-to-noise ratio, the WPD process is applied to the clean signal without any added noise. The reconstructed response corresponds only to the signal content retained from the WPD process, labeled as the denoised clean signal. Furthermore, the denoised clean signal is subtracted from the reconstructed response obtained by applying the WPD process to the clean signal with added noise to obtain the noise content remaining after denoising. Now, the signal-to-noise ratio improvement can be properly calculated as follows: In the formula, ΔSNR is the improvement in signal-to-noise ratio, SNR P is the a posteriori signal-to-noise ratio, SNR I is the initial signal-to-noise ratio, x sd is the denoised response without added noise, x d is the denoised response with added noise, x s is the signal of interest, x n is a noise signal; b. Signal energy retention percentage The percentage of energy remaining corresponding only to the signal of interest is calculated as the ratio between the L2 norm of the denoised response without added noise and the original signal of interest: In the formula, L2R is the L2 norm ratio. The ideal value of L2R is 1, which means that no energy is lost in the WPD process. ΔSNR and L2R need to be carefully checked to ensure that the ideal balance is maintained between removing noise and preserving energy. c. Wavelet coefficient entropy Entropy, as a measure of the disorder of quantized wavelet packet coefficients, can be calculated as follows: In the formula, Q j,k is the entropy of the kth node on the jth layer, W j,k represents the wavelet coefficient of the kth node on the jth layer, t corresponds to the coefficient index of the wavelet packet node, T j is the number of coefficients in the wavelet packet node of the jth layer. When the values of the coefficients are uniformly distributed, the entropy will be large. Fewer large-valued signal coefficients are expected to correspond to smaller entropy values, thereby enhancing the ability to distinguish signals of interest and transient noise events from environmental noise.
