Low-pass filtering method for digital periodic signal

By applying the sliding average filter in the digital cycle signal low -pass filtering method, the relationship between the signal frequency, sampling frequency and sliding cycle is used to solve the problem of poor effects and high complexity of the existing filtering method. The filter effect is suitable for embedded systems.

WO2025016236A1PCT designated stage expired Publication Date: 2025-01-23NANJING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
PCT/CN2024/104174
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-20
Filing Date
2024-07-08
Publication Date
2025-01-23

AI Technical Summary

Technical Problem

When the existing filtering methods process sinusoidal signals, the filtering effect is poor or the calculation complexity is high, and the overall filtering performance is poor.

Method used

Design a digital cycle signal low -pass filtering method. Based on the optimal filter parameters, the relationship between the signal frequency, sampling frequency, and the filter sliding period is used to apply the sliding average filter to real -time filtering.

Benefits of technology

It reduces the filtering complexity and improves the filtering application efficiency. It is suitable for filtering digital periodic signals and digital sinusoidal signals containing harmonics. It has strong anti-interference ability and is suitable for embedded systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024104174_23012025_PF_FP_ABST
    Figure CN2024104174_23012025_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to a low-pass filtering method for a digital periodic signal. On the basis of an optimal filtering parameter, according to relationships between a sampling frequency of a sampling sequence signal corresponding to a real-time target digital periodic signal, a sliding period of a sliding average filter applied to the sampling sequence signal corresponding to the real-time target digital periodic signal, and an application frequency of the real-time target digital periodic signal, the sliding average filter is applied according to the sliding period, so as to perform real-time filtering processing on the sampling sequence signal corresponding to the real-time target digital periodic signal. The entire design method is suitable for the filtering of digital periodic signals including harmonics, and digital sinusoidal signals, and has a simple and rational design solution, low software and hardware overheads and a relatively high anti-interference capability; and the design method is convenient and quick during actual calculation and suitable for use in an embedded system, and can be simply and rationally implemented to obtain accurate and reliable data, thereby having relatively wide application prospects.
Need to check novelty before this filing date? Find Prior Art

Description

A method for low-pass filtering of digital periodic signals Technical Field

[0001] The invention relates to a digital periodic signal low-pass filtering method, belonging to the technical field of signal filtering processing. Background Art

[0002] Filters have crucial applications in numerous fields, including electronic engineering and computer science. Sinusoidal signals, as a fundamental signal, have a wide range of applications, primarily in instrumentation, power systems, communications, radar, sonar, and speech processing. Filters are essential for processing sinusoidal signals. Filtering removes unwanted features from the signal, such as unwanted frequency signals and noise. Since a sinusoidal signal consists solely of pure sinusoidal signals and noise, the primary purpose of sinusoidal filtering is not only to reduce the noise amplitude but, more importantly, to increase the signal-to-noise ratio.

[0003] Traditional noise reduction methods include sliding average method, Savitzky-Golay method, outlier (gross error) processing method, FIR, IIR, wavelet denoising method, KALMAN filtering method, etc. However, the existing filtering methods have poor filtering effect or high computational complexity, and the overall filtering performance is poor.

[0004] Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a digital periodic signal low-pass filtering method, which reduces the filtering complexity and improves the filtering application efficiency based on the optimal filtering parameters and the relationship between the signal frequency, sampling frequency and filter sliding period.

[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions: The present invention designs a digital periodic signal low-pass filtering method, based on the sampling frequency f of the sampling sequence signal corresponding to the real-time target digital periodic signal. S , the sliding period M of the sliding mean filter applied to the sampling sequence signal corresponding to the real-time target digital periodic signal, and the application frequency f of the real-time target digital periodic signal Y The relationship between the three is as follows:

[0007] According to the sliding period M, a sliding mean filter is applied to perform real-time filtering processing on the sampling sequence signal corresponding to the real-time target digital periodic signal.

[0008] As a preferred technical solution of the present invention, if the analog signal frequency of the real-time target digital periodic signal is unknown, the following steps are performed:

[0009] Step A1: sampling at a preset frequency f that is greater than the frequency of the analog signal of the real-time target digital periodic signal.S , sampling the real-time target digital periodic signal, obtaining a sampling sequence signal corresponding to the real-time target digital periodic signal, and proceeding to step A2;

[0010] Step A2. Obtain the measured / estimated frequency of the analog signal of the sampling sequence signal corresponding to the real-time target digital periodic signal as the application frequency f of the real-time target digital periodic signal. Y , and according to the sampling frequency f S , sliding period M, and application frequency f Y The relationship between the three is calculated to obtain the sliding period M of the sliding mean filter applied to the sampling sequence signal corresponding to the real-time target digital periodic signal, and then enter step A3;

[0011] Step A3. According to the sliding period M, a sliding mean filter is applied to filter the sampling sequence signal corresponding to the real-time target digital periodic signal, and then proceed to step A4;

[0012] Step A4. Obtain the measured / estimated frequency of the analog signal after filtering, and the application frequency f corresponding to the real-time target digital periodic signal. Y , define the sliding period M0 to be compared, corresponding to the sliding period M, according to the sampling frequency f S , sliding period M, and application frequency f Y The relationship between the three is calculated to obtain the sliding period M0 to be compared, and then the process goes to step A5;

[0013] Step A5. Determine whether the sliding period M0 to be compared exceeds the threshold of the sliding period M. If so, update the sliding period M0 to be compared with the sliding period M, and wait until the next moment, proceed to step A6; otherwise, wait until the next moment, proceed to step A6;

[0014] Step A6. According to the sampling frequency f S , sample the real-time target digital periodic signal, obtain the sampling sequence signal corresponding to the real-time target digital periodic signal, and return to step A3.

[0015] As a preferred technical solution of the present invention: if the analog signal frequency of the real-time target digital periodic signal is known, the analog signal frequency of the real-time target digital periodic signal is used as the application frequency f of the real-time target digital periodic signal. Y , and perform the following steps:

[0016] Step B1. Apply a sliding mean filter with a sliding period M=2 based on the sampling sequence signal corresponding to the real-time target digital periodic signal. N , according to the sampling frequency f S , sliding period M, and application frequency f YThe relationship between the three is calculated to obtain the sampling frequency f S , or use any sampling frequency as the sampling frequency f S , according to the sampling frequency f S , sampling the real-time target digital periodic signal, obtaining a sampling sequence signal corresponding to the real-time target digital periodic signal, and proceeding to step B2;

[0017] Step B2. If the sampling frequency f S According to the sampling frequency f S , sliding period M, and application frequency f Y The relationship between the three is calculated, and then the sliding mean filter is applied to the sampling sequence signal corresponding to the real-time target digital periodic signal according to the sliding period M, and when entering the next moment, return to step B1;

[0018] If the sampling frequency f S For any sampling frequency, according to the sampling frequency f S , sliding period M, and application frequency f Y The relationship between the three is used to calculate the sliding period M, and a sliding mean filter is applied to filter the sampling sequence signal corresponding to the real-time target digital periodic signal. When entering the next moment, return to step B1.

[0019] As a preferred technical solution of the present invention: the sampling sequence signal corresponding to the real-time target digital periodic signal is subjected to a sliding period M of a sliding mean filter. If the value of the sliding period M is rounded and updated, the sampling sequence signal corresponding to the real-time target digital periodic signal is filtered by the sliding mean filter, and the output is the mean of M sampling signal values ​​in sequence from the last time point to the historical time direction;

[0020] If the value of the sliding period M contains a decimal, a sliding mean filter is applied to filter the sampling sequence signal corresponding to the real-time target digital periodic signal. The output is the area integration and average of the envelope composed of the various sampling signal values ​​in the continuous sampling sequence signal including the last time point according to the sliding period M.

[0021] As a preferred technical solution of the present invention: the area integral is a trapezoidal integral, a rectangular integral, or a mixed integral of the trapezoidal integral and the rectangular integral.

[0022] As a preferred technical solution of the present invention: the real-time target digital periodic signal is any one of a digital periodic signal containing harmonics and a digital sinusoidal signal.

[0023] The digital periodic signal low-pass filtering method of the present invention, using the above technical solution, has the following technical effects compared with the prior art:

[0024] The present invention designs a digital periodic signal low-pass filtering method. Based on optimal filtering parameters, according to the relationship among the sampling frequency of a sampling sequence signal corresponding to the real-time target digital periodic signal, the sliding period of a sliding mean filter applied to the sampling sequence signal corresponding to the real-time target digital periodic signal, and the application frequency of the real-time target digital periodic signal, the sliding mean filter is applied to perform real-time filtering processing on the sampling sequence signal corresponding to the real-time target digital periodic signal according to the sliding period. The entire design method is suitable for filtering digital periodic signals containing harmonics and digital sinusoidal signals. The design scheme is simple and reasonable, the software and hardware overhead is small, the method has strong anti-interference ability, is convenient and simple in actual calculation, is suitable for use in embedded systems, is simple and reasonable to implement, and the data is accurate and reliable, with a wide range of application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] FIG1 is a schematic diagram showing the maximum output value obtained after filtering when an M-1 order FIR filter with the same coefficients is applied to the first term of formula (4) with 24 sampling points per cycle, M being an even number M=6, and M being an odd number M=7;

[0026] FIG2 is a schematic diagram of the forward trapezoidal interpolation method used to calculate the integral area when M=5.6;

[0027] FIG3 is a schematic diagram of calculating the integral area using the backward trapezoidal interpolation method when M=5.6;

[0028] FIG4 is a schematic diagram of the forward rectangular interpolation method used to calculate the integral area when M=5.6. The amplitude of the first rectangle used for integration on the left is the amplitude of sampling point 0;

[0029] FIG5 is a schematic diagram of the forward rectangular interpolation method used to calculate the integral area when M = 5.6. The height of the first rectangle used for integration on the left is the amplitude of the linear interpolation between sampling points 0 and 1 based on the fractional part of M 0.6;

[0030] FIG6 is a schematic diagram of using the forward rectangular interpolation method to calculate the integral area when M=5.6. The height of the first rectangle used for integration on the left is the amplitude of sampling point 1;

[0031] FIG7 is a schematic diagram of calculating the integral area using the backward rectangular interpolation method when M=5.6. The height of the first rectangle used for integration on the left is the amplitude of the sampling point -1;

[0032] FIG8 is a schematic diagram of the backward rectangular interpolation method for calculating the integral area when M=5.6. The height of the first rectangle used for integration on the left is the amplitude of the linear interpolation between the sampling point -1 and the sampling point 0 based on the fractional part of M 0.6;

[0033] FIG9 is a schematic diagram showing the backward rectangular interpolation method used to calculate the integral area when M=5.6. The height of the first rectangle used for integration on the left is the amplitude of sampling point 0. DETAILED DESCRIPTION

[0034] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0035] Regarding the sampling frequency f of the sampling sequence signal corresponding to the real-time target digital periodic signal S , the sliding period M of the sliding mean filter applied to the sampling sequence signal corresponding to the real-time target digital periodic signal, and the application frequency f of the real-time target digital periodic signal Y The filter parameter ρ involved in the relationship between the three is considered in actual analysis.

[0036] When the frequency, amplitude, phase and other parameters of the sinusoidal digital signal are unknown, the mathematical model of the measured sinusoidal digital signal is assumed to be:

[0037] Where A is the amplitude of the sinusoidal signal, f is the frequency, is the phase, n=0,1,2,…,z(n) satisfies N(0,σ 2 ) is normally distributed.

[0038] The FIR filter is a filter with a finite length impulse response. The response of the pulse input signal will become 0 within a finite time. The difference equation of an M-1 order FIR filter can be described as:

[0039] For the convenience of subsequent discussion, let b k The sum of is 1, then:

[0040] The output signal of the signal in formula (1) after passing through the FIR filter can be expressed as:

[0041] The first term in formula (4) determines the signal amplitude of y(n); the second term in formula (4) determines the variance of the noise in y(n). Both the first and second terms in formula (4) are affected by the coefficients of the FIR filter. First, we analyze the effects of the FIR filter on the noise signal and the sinusoidal digital signal separately, and then analyze the combined effects of the FIR filter on the sinusoidal digital signal and the noise signal.

[0042] The second term of formula (1) is the noise signal after passing through the FIR filter. The analysis of the influence of the FIR filter on the noise is as follows:

[0043] The expression of the noise average value after the noise is filtered by the FIR filter is as shown in formula (5):

[0044] Formula (5) shows that the mean of the noise after filtering is still 0. The expression of the noise variance after the noise is filtered by the FIR filter is as shown in formula (6):

[0045] From formula (6), we can see that the noise variance after filtering is not only related to the noise variance in the input signal x(n), but also related to the coefficients of the FIR filter. The minimum value calculated by formula (6) is the minimum value of the noise variance after filtering.

[0046] Construct the Cauchy inequality, as shown in formula (7):

[0047] So:

[0048] Combined with formula (6), then:

[0049] From the conclusion of Cauchy's inequality, we know that when b0=b1=…=b M-1 =1 / M, the equal signs in formulas (7), (8), and (9) can hold. In the above case, the calculation result of formula (6) will obtain the minimum variance, so the noise variance of the filtered signal is That is, the noise after filtering meets N(0,σ 2 The above conclusions reveal that an FIR filter with the same coefficients may be the best low-pass filter for sinusoidal signals.

[0050] Formula (9) also shows that when M approaches infinity, the noise variance of the filtered signal will approach 0. Because the FIR filter is a filter with a finite impulse response, the value of M cannot be infinite, so further discussion is needed on how to select a suitable M.

[0051] The first term of formula (1) is the sinusoidal digital signal after it passes through the FIR filter. The analysis of the influence of the FIR filter on the sinusoidal digital signal is as follows:

[0052] An M-1-order FIR filter with identical coefficients averages M consecutive samples of the input signal x(n) to produce a filtered signal. This filter reduces the noise in the signal while also reducing the amplitude of the sinusoidal digital signal. Therefore, it is reasonable to assume that there exists an optimal value, M, under which the FIR filter can achieve the best filtering effect on the sinusoidal signal.

[0053] Assume that the frequency of the measured sinusoidal signal is 1 Hz and the number of sampling points per cycle is N. When M = N, the first term of formula (4) will be 0. At this time, the signal output by the filter will not contain the sinusoidal signal but only the residual noise signal. This also shows that the value of M should not be too large. Therefore, set M <N。

[0054] When an M-1 order FIR filter with the same coefficients acts on the first term of formula (4), its function is to integrate and average the M consecutive sinusoidal digital sampling values. When 24 points are sampled per cycle and M is an even number of 6, the output value of the filter can only obtain the maximum value when the selected M sinusoidal digital sampling values ​​are arranged as shown in the upper figure of Figure 1; when 24 points are sampled per cycle and M is an odd number of 7, the output value of the filter can only obtain the maximum value when the selected M sinusoidal digital sampling values ​​are arranged as shown in the lower figure of Figure 1. Figure 1 shows that the output of the FIR filter with the same coefficients can only obtain the maximum value when the selected sinusoidal digital sampling values ​​are concentrated at the top of the sinusoidal digital signal. However, regardless of the oddness of M, the integral interval of the sinusoidal digital signal when the filter outputs the maximum value is When the analog signal frequency is 1 Hz and N points are sampled per cycle, then f in formula (1) = 1 / N. From the integral formula of the sinusoidal signal, the maximum output value of the M-1 order FIR filter with the same coefficients can be expressed as:

[0055] After the noise signal and the sinusoidal digital signal in formula (1) pass through the FIR filter, the combined impact of the FIR filter on the sinusoidal digital signal and the noise signal is analyzed as follows:

[0056] Combining formulas (9) and (10), the signal-to-noise ratio of the filtered signal is:

[0057] Therefore, to obtain the maximum signal-to-noise ratio of the filtered signal is to find the maximum value of formula (11). Let N be a constant and take the derivative of the parameter M in formula (11) to obtain:

[0058] To obtain the maximum value of SNR1 in formula (11), SNR'1 must be equal to 0, then:

[0059] Formula (13) can be simplified as:

[0060] When the numerical solution When M≈0.371009648203552×N, formula (14) can be satisfied. This means that when filtering a sinusoidal digital signal, the maximum signal-to-noise ratio of the filtered signal can be obtained when an FIR filter with the same coefficients is used and the order of the filter is N×0.371009648203552-1. This also means that the filtering effect obtained in this case is the best effect of filtering using a low-pass FIR filter. The ratio of the signal-to-noise ratio after filtering to the signal-to-noise ratio before filtering is:

[0061] Formula (15) shows that when a sinusoidal signal is sampled at N sampling points per cycle, the ratio of the output signal's signal-to-noise ratio to the original signal's signal-to-noise ratio is maximized after filtering using a special FIR filter with an order of N × 0.371009648203552-1 and identical coefficients, achieving the best filtering effect. An FIR filter with identical coefficients is a sliding mean filter. The above derivation is based on a sinusoidal signal, but M can also be a real number containing decimals. The above derivation is based on a sinusoidal signal, and the method in this paper is also applicable to periodic signals containing harmonics.

[0062] That is, construct the sampling frequency f of the sampling sequence signal corresponding to the real-time target digital periodic signal S , the sliding period M of the sliding mean filter applied to the sampling sequence signal corresponding to the real-time target digital periodic signal, and the application frequency f of the real-time target digital periodic signal Y The relationship between the three is as follows:

[0063] The present invention designs a digital periodic signal low-pass filtering method based on the sampling frequency f of the sampling sequence signal corresponding to the real-time target digital periodic signal. S , the sliding period M of the sliding mean filter applied to the sampling sequence signal corresponding to the real-time target digital periodic signal, and the application frequency f of the real-time target digital periodic signal Y The relationship between the three is that according to the sliding period M, a sliding mean filter is applied to perform real-time filtering processing on the sampling sequence signal corresponding to the real-time target digital periodic signal.

[0064] Regarding the practical application of the above design scheme, there are two specific scenarios. First, the analog signal frequency of the real-time target digital periodic signal is unknown; second, the analog signal frequency of the real-time target digital periodic signal is known. The above ideas are implemented for these two scenarios respectively, as follows.

[0065] If the analog signal frequency of the real-time target digital periodic signal is unknown, according to the above design idea, the following steps are performed:

[0066] Step A1: sampling at a preset frequency f that is greater than the frequency of the analog signal of the real-time target digital periodic signal. S , sample the real-time target digital periodic signal, obtain the sampling sequence signal corresponding to the real-time target digital periodic signal, and enter step A2.

[0067] Step A2. Obtain the measured / estimated frequency of the analog signal of the sampling sequence signal corresponding to the real-time target digital periodic signal as the application frequency f of the real-time target digital periodic signal. Y , and according to the sampling frequency f S , sliding period M, and application frequency f Y The relationship between the three is calculated to obtain the sliding period M of the sliding mean filter applied to the sampling sequence signal corresponding to the real-time target digital periodic signal, and then enter step A3.

[0068] Step A3. According to the sliding period M, apply a sliding mean filter to filter the sampling sequence signal corresponding to the real-time target digital periodic signal, and then proceed to step A4.

[0069] Step A4. Obtain the measured / estimated frequency of the analog signal after filtering, and the application frequency f corresponding to the real-time target digital periodic signal. Y , define the sliding period M0 to be compared, corresponding to the sliding period M, according to the sampling frequency f S , sliding period M, and application frequency f Y The relationship between the three is calculated to obtain the sliding period M0 to be compared, and then the process goes to step A5.

[0070] Step A5. Determine whether the sliding period M0 to be compared exceeds the threshold of the sliding period M. If so, update the sliding period M using the sliding period M0 to be compared, and proceed to step A6 when entering the next moment; otherwise, proceed to step A6 when entering the next moment.

[0071] Step A6. According to the sampling frequency f S , sample the real-time target digital periodic signal, obtain the sampling sequence signal corresponding to the real-time target digital periodic signal, and return to step A3.

[0072] If the analog signal frequency of the real-time target digital periodic signal is known, according to the above design idea, the analog signal frequency of the real-time target digital periodic signal is used as the application frequency f of the real-time target digital periodic signal. Y , and perform the following steps:

[0073] Step B1. Apply a sliding mean filter with a sliding period M=2 based on the sampling sequence signal corresponding to the real-time target digital periodic signal. N , according to the sampling frequency f S , sliding period M, and application frequency f Y The relationship between the three is calculated to obtain the sampling frequency f S , or use any sampling frequency as the sampling frequency f S , according to the sampling frequency f S , sample the real-time target digital periodic signal, obtain the sampling sequence signal corresponding to the real-time target digital periodic signal, and enter step B2.

[0074] Step B2. If the sampling frequency f S According to the sampling frequency f S , sliding period M, and application frequency f Y The relationship between the three is calculated, and then the sliding mean filter is applied to the sampling sequence signal corresponding to the real-time target digital periodic signal according to the sliding period M, and when entering the next moment, return to step B1;

[0075] If the sampling frequency f S For any sampling frequency, according to the sampling frequency f S , sliding period M, and application frequency f Y The relationship between the three is used to calculate the sliding period M, and a sliding mean filter is applied to filter the sampling sequence signal corresponding to the real-time target digital periodic signal. When entering the next moment, return to step B1.

[0076] In actual application of the above specific design scheme, the sampling sequence signal corresponding to the real-time target digital periodic signal is applied with the sliding period M of the sliding mean filter. If the value of the sliding period M is rounded and updated, the sliding mean filter is applied to filter the sampling sequence signal corresponding to the real-time target digital periodic signal, and the output is the mean of the M sampling signal values ​​in sequence from the last time point to the historical time direction.

[0077] If the sliding period M contains a decimal, a sliding mean filter is applied to the sample sequence signal corresponding to the real-time target digital periodic signal. The output is the area integral and average of the envelope consisting of the sample signal values ​​in the continuous sample sequence signal including the last time point according to the sliding period M. The area integral here can be a trapezoidal integral, a rectangular integral, or a combination of trapezoidal and rectangular integrals.

[0078] When the sliding period M contains decimals, the specific area integrals in practical applications are shown in Figures 2 through 9. The horizontal axis in the figures is time, the vertical axis is voltage, the circles in the figures are sampling points, the numbers near the sampling points are the sampling point numbers, and the triangular points are the interpolation points obtained based on the decimals of M. Figure 2 shows a schematic diagram of the forward trapezoidal interpolation method used to calculate the integral area when M = 5.6. Because sampling point 5 is the most recent sampled value, the rectangular integration method is used when integrating forward from sampling point 5. Figure 3 shows a schematic diagram of the backward trapezoidal interpolation method used to calculate the integral area when M = 5.6. The leftmost integrals caused by the decimals of M in Figures 2 and 3 use trapezoidal interpolation to obtain the interpolation points. The leftmost integrals can also use the rectangular integration method as shown in Figures 4, 5, and 6.

[0079] FIG4 is a schematic diagram of the forward rectangular interpolation method used to calculate the integral area when M=5.6, and the amplitude of the first rectangle used for integration on the left is the amplitude of sampling point 0; FIG5 is a schematic diagram of the forward rectangular interpolation method used to calculate the integral area when M=5.6, and the height of the first rectangle used for integration on the left is the amplitude of linear interpolation between sampling point 0 and sampling point 1 based on the decimal part of M 0.6; FIG6 is a schematic diagram of the forward rectangular interpolation method used to calculate the integral area when M=5.6, and the height of the first rectangle used for integration on the left is the amplitude of sampling point 1; FIG7 is a schematic diagram of the forward rectangular interpolation method used to calculate the integral area when M=5.6, and the height of the first rectangle used for integration on the left is the amplitude of sampling point 1; FIG8 is a schematic diagram of the forward rectangular interpolation method used to calculate the integral area when M=5.6, and the height of the first rectangle used for integration on the left is the amplitude of sampling point 1. Figure 7 is a schematic diagram of the backward rectangular interpolation method used to calculate the integral area when M = 5.6. The height of the first rectangle used for integration on the left is the amplitude of sampling point -1. Figure 8 is a schematic diagram of the backward rectangular interpolation method used to calculate the integral area when M = 5.6. The height of the first rectangle used for integration on the left is the amplitude of linear interpolation between sampling point -1 and sampling point 0 based on the decimal part of M 0.6. Figure 9 is a schematic diagram of the backward rectangular interpolation method used to calculate the integral area when M = 5.6. The height of the first rectangle used for integration on the left is the amplitude of sampling point 0. The leftmost integral caused by the decimal of M in Figures 4, 5, 6, 7, 8, and 9 uses rectangular interpolation to obtain the interpolation point. The leftmost integral can also use the trapezoidal integral interpolation method as shown in Figures 2 and 3.

[0080] The present invention can also use other hybrid trapezoidal and rectangular integration methods to complete the integration operation. As can be seen from Figures 2 to 9, the filter output obtained using trapezoidal integration and trapezoidal interpolation is the most accurate. Of course, as the number of sampling points increases, this error will become smaller and smaller. Considering the characteristics of embedded systems, the preferred solution is to use trapezoidal integration and rectangular interpolation to calculate the filter output.

[0081] When the value of M is an integer, only one addition, one subtraction, and one division are required based on the previous sum to complete the calculation of the filter output value. When the value of M is a real number containing a decimal, the processing method shown in Figures 4, 6, 7, and 8 is adopted, and one multiplication, two additions, two subtractions, and one division are required based on the previous sum to complete the calculation of the filter output value. In summary, when the value of M is an integer, the computational complexity of completing a filter output value calculation is O(3); when the value of M is an integer containing a decimal, the computational complexity of completing a filter output value calculation is at least O(6).

[0082] The digital periodic signal low-pass filtering method designed by the present invention is based on optimal filtering parameters and according to the relationship among the sampling frequency of the sampling sequence signal corresponding to the real-time target digital periodic signal, the sliding period of the sliding mean filter applied to the sampling sequence signal corresponding to the real-time target digital periodic signal, and the application frequency of the real-time target digital periodic signal. According to the sliding period, the sliding mean filter is applied to the sampling sequence signal corresponding to the real-time target digital periodic signal to perform real-time filtering processing. The entire design method is suitable for filtering digital periodic signals containing harmonics and digital sinusoidal signals. The design scheme is simple and reasonable, the software and hardware overhead is small, the method has strong anti-interference ability, is convenient and simple in actual calculation, is suitable for use in embedded systems, is simple and reasonable to implement, and the data is accurate and reliable. The method has a wide range of application prospects.

[0083] The embodiments of the present invention are described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Various changes can be made within the scope of knowledge possessed by ordinary technicians in this field without departing from the spirit of the present invention.

Claims

1. A digital periodic signal low-pass filtering method, characterized in that: The sampling frequency f of the sampling sequence signal corresponding to the real-time target digital periodic signal S , the sliding period M of the sliding mean filter applied to the sampling sequence signal corresponding to the real-time target digital periodic signal, and the application frequency f of the real-time target digital periodic signal Y The relationship between the three is as follows: According to the sliding period M, a sliding mean filter is applied to perform real-time filtering processing on the sampling sequence signal corresponding to the real-time target digital periodic signal.

2. A digital periodic signal low-pass filtering method according to claim 1, characterized in that: If the analog signal frequency of the real-time target digital periodic signal is unknown, perform the following steps: Step A1. Sampling at a preset sampling frequency f that is greater than the analog signal frequency of the real-time target digital periodic signal S , sample the real-time target digital periodic signal, obtain the sampling sequence signal corresponding to the real-time target digital periodic signal, and enter step A2; Step A2. Obtain the measured / estimated frequency of the analog signal of the sampling sequence signal corresponding to the real-time target digital periodic signal as the application frequency f of the real-time target digital periodic signal Y , and according to the sampling frequency f S , sliding period M, and application frequency f Y The relationship between the three is calculated to obtain the sliding period M of the sliding mean filter applied to the sampling sequence signal corresponding to the real-time target digital periodic signal, and then enter step A3; Step A3. According to the sliding period M, a sliding mean filter is applied to filter the sampling sequence signal corresponding to the real-time target digital periodic signal, and then proceed to step A4; Step A4. Obtain the measured / estimated frequency of the analog signal of the filtered signal, and the application frequency f corresponding to the real-time target digital periodic signal Y , define the sliding period M0 to be compared, corresponding to the sliding period M, according to the sampling frequency f S , sliding period M, and application frequency f Y The relationship between the three is calculated to obtain the sliding period M0 to be compared, and then the process goes to step A5; Step A5. Determine whether the sliding period M0 to be compared exceeds the threshold of the sliding period M. If yes, update the sliding period M0 to be compared with respect to the sliding period M, and wait until the next moment, and then proceed to step A6; Otherwise, wait until the next moment and go to step A6; Step A6. According to the sampling frequency f S , sample the real-time target digital periodic signal, obtain the sampling sequence signal corresponding to the real-time target digital periodic signal, and return to step A3.

3. A digital periodic signal low-pass filtering method according to claim 1, characterized in that: If the analog signal frequency of the real-time target digital periodic signal is known, the analog signal frequency of the real-time target digital periodic signal is used as the application frequency f of the real-time target digital periodic signal. Y , and perform the following steps: Step B1. Apply a sliding mean filter with a sliding period M=2 based on the sampling sequence signal corresponding to the real-time target digital periodic signal. N , according to the sampling frequency f S , sliding period M, and application frequency f Y The relationship between the three is calculated to obtain the sampling Frequency f S , or use any sampling frequency as the sampling frequency f S , according to the sampling frequency f S , sample the real-time target digital periodic signal, obtain the sampling sequence signal corresponding to the real-time target digital periodic signal, and enter step B2; Step B2. If the sampling frequency f S According to the sampling frequency f S , sliding period M, and application frequency f Y The relationship between the three is calculated, and then according to the sliding period M, a sliding mean filter is applied to filter the sampling sequence signal corresponding to the real-time target digital periodic signal, and when entering the next moment, return to step B1; If the sampling frequency f S For any sampling frequency, according to the sampling frequency f S , sliding period M, and application frequency f Y The relationship between the three is used to calculate the sliding period M, and a sliding mean filter is applied to filter the sampling sequence signal corresponding to the real-time target digital periodic signal, and when entering the next moment, return to step B1.

4. A digital periodic signal low-pass filtering method according to any one of claims 1 to 3, characterized in that: The sampling sequence signal corresponding to the real-time target digital periodic signal is applied with a sliding period M of a sliding mean filter. If the value of the sliding period M is rounded and updated, the sliding mean filter is applied to filter the sampling sequence signal corresponding to the real-time target digital periodic signal, and the output is the mean of the M sampling signal values ​​in the order from the last time point to the historical time direction; If the value of the sliding period M contains a decimal, a sliding mean filter is applied to filter the sampling sequence signal corresponding to the real-time target digital periodic signal, and the output is an envelope composed of each sampling signal value in the continuous sampling sequence signal including the last time point, which is area integrated and averaged according to the sliding period M.

5. A digital periodic signal low-pass filtering method according to claim 4, characterized in that: The area integral is a trapezoidal integral, a rectangular integral, or a mixed integral of a trapezoidal integral and a rectangular integral.

6. A digital periodic signal low-pass filtering method according to claim 4, characterized in that: The real-time target digital periodic signal is any one of a digital periodic signal containing harmonics and a digital sinusoidal signal.

Citation Information

Patent Citations

  • Analog quantity filtering method and device based on embedded system

    CN112290907A

  • Digital periodic signal low-pass filtering method

    CN116865720A

  • Method for complexity-reduced digital filtering and parameter estimation of analog signals

    EP2075912A1

  • Digital low / high pass filter and method thereof

    JP2004120197A

  • Efficient Asynchronous Sample Rate Conversion

    US20090319065A1

Cited By

  • Enterprise management report merging budget cooperation system based on multi-dimensional data model

    CN120850969A