A cascaded filter and its fundamental wave extraction method
Through a cascade filter composed of FIR and recursive filter, the interpolation factor and parameters are adjusted, and combined with enhanced attenuation and compensation filters, the cascade filter has been solved, and the cascade filter has low efficiency and large area when the M value is large, achieving efficient fundamental wave extraction and area reduction.
Patent Information
- Application Number
- CN202111668389.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The existing cascade filters have low fundamental extraction efficiency and increase in calculation amount when the M value is large, resulting in an increase in the area of the metering chip.
A cascade filter composed of FIR filter and recursive filter is used to change the filter zero point position by adjusting the interpolation factor M and parameter B, and combined with an enhanced attenuation filter and a compensation filter, it reduces the impact of virtual images and reduces the calculation amount.
When the M value is large, the fundamental wave extraction efficiency is improved, and the area and calculation amount of the metering chip are reduced.
Smart Images

Figure CN114389578B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a cascaded filter and a fundamental wave extraction method thereof, belonging to the technical field of digital signal processing. Background Art
[0002] The task of electric energy metering is to accurately accumulate the instantaneous power of users into energy, providing a basis for the electricity settlement among power generation companies, power grid companies, and electricity users. Its accuracy directly affects the interests of the three parties and the rationality of transactions. Electric energy metering is divided into two categories: full-wave electric energy metering and harmonic electric energy metering. Full-wave electric energy metering directly calculates the total electric energy, mainly using the electric energy integration algorithm; harmonic electric energy metering separately calculates the fundamental wave electric energy and harmonic electric energy above the 1st order. Among them, the fundamental wave electric energy is calculated by extracting the fundamental wave component from the full-wave data through a fundamental wave low-pass filter, and the harmonic electric energy is calculated by subtracting the fundamental wave from the full-wave data. Therefore, the design of the fundamental wave low-pass filter is directly related to the accuracy of the fundamental wave electric energy and harmonic electric energy.
[0003] The fundamental wave low-pass filter needs to ensure that the frequency component of 50 ± 0.25 Hz can pass through without attenuation, and all harmonics above the 1st order can be attenuated (the stopband frequency point is 100 Hz) to accurately extract the fundamental wave component. In the case of the commonly used 6.4 KHz sampling rate, to meet the requirement of a narrow transition band, the order of the FIR filter designed by the optimal filter design method (PM_FIR) will reach 600 orders. A high order means more multipliers and adders, which will increase the area of the metering chip (the larger the order, the larger the area). The existing narrowband low-pass filter uses the interpolated FIR technology, that is, the narrowband filtering effect is achieved by cascading a shaping filter and a masking filter. The shaping filter applies the interpolated zero operation, but ultimately both are FIR filters. The design principle of interpolated FIR is as follows: First, determine the design indexes of the prototype filter (passband frequency point = fpass * M, stopband frequency point = fstop * M, passband ripple Attenpass, stopband attenuation Attenstop, where the value of M is a positive integer and variable) according to the target filter indexes (passband frequency point = fpass, stopband frequency point = fstop, passband ripple Attenpass, stopband attenuation Attenstop). After designing the prototype filter according to this index, insert M - 1 zeros between the two coefficients of the prototype filter to form a shaping filter. Due to the inserted zeros, the spectrum of the shaping filter is compressed and repeated M times, resulting in virtual images. Then, design a masking filter to remove the virtual images. Since the transition band and passband width of the prototype filter have become longer, the order of the prototype filter can be effectively reduced. Finally, the sum of the filter orders of the shaping filter and the masking filter is less than the order of directly designing the target filter (the non-zero coefficients in the shaping filter are the same as the coefficients of the prototype filter).
[0004] The existing fundamental low-pass filter adopts a cascaded design of a shaping filter and a masking filter, and reduces the order of the low-pass filter by adjusting the interpolation factor M value. The relationship between the M value and the order of each filter is as follows: increasing the M value makes the passband bandwidth of the prototype filter larger and the transition band longer, thereby reducing the non-zero order of the shaping filter. However, the larger the M value, the smaller the distance between the images of the shaping filter becomes. Therefore, a better image rejection filter is required, and thus the order of the masking filter will increase; when the M value is small, increasing the M value, the reduction in the order of the shaping filter is greater than the increase in the masking filter, so the computational complexity of the overall fundamental low-pass filter will decrease. When the M value continues to increase after reaching the optimal value, the reduction in the order of the shaping filter is less than the increase in the masking filter, resulting in an increase in the computational complexity of the overall filter. It can be seen that at the optimal interpolation factor M, the order of the low-pass filter is the smallest and the computational complexity is the smallest, which can reduce the computational complexity of the FIR filter by about 60%. However, for higher M value design requirements, the order of the low-pass filter increases, resulting in an increase in computational complexity, which will not only increase the area of the metering chip but also lead to low efficiency of fundamental wave extraction. Summary of the Invention
[0005] The purpose of this application is to provide a fundamental wave extraction method for a cascaded filter to solve the problem of low fundamental wave extraction efficiency of the existing cascaded filter when the M value is large; in addition, this application also provides a cascaded filter to solve the problem that the computational complexity of the existing cascaded filter increases when the M value is large, resulting in a large area of the metering chip.
[0006] To achieve the above object, this application proposes a technical solution for a fundamental wave extraction method of a cascaded filter, including the following steps:
[0007] 1) Determine the initial value of the interpolation factor M;
[0008] 2) Substitute the initial value of the interpolation factor into the cascaded filter to obtain the filtering result corresponding to the initial value; the cascaded filter includes a shaping filter and a masking filter. The shaping filter is an FIR filter, and the shaping filter is obtained by interpolating M - 1 zeros between adjacent impulse response coefficients of the prototype filter; the masking filter is a recursive filter used to attenuate the images of the shaping filter.
[0009] 3) Adjust the size of the interpolation factor, compare the filtering results corresponding to different interpolation factors, and use the value of the interpolation factor with the best filtering result as the final value of the interpolation factor;
[0010] 4) The cascaded filter performs fundamental wave extraction according to the final value of the interpolation factor.
[0011] The beneficial effects of the technical solution of the fundamental wave extraction method of the cascaded filter of the present invention are as follows: When performing fundamental wave extraction, the present invention uses a cascaded filter composed of an FIR filter and a recursive filter. As the value of M increases, the recursive filter changes the filter zero point position by adjusting the parameter B, so that most virtual images are outside the stopband frequency points of the recursive filter, achieving the purpose of attenuating virtual images without increasing the order of the recursive filter, and thus not affecting the computational amount of the overall cascaded filter. Therefore, when the value of M is large, the extraction efficiency of the fundamental wave is improved.
[0012] Further, the transfer function H rs (z) is:
[0013]
[0014] where B = 1 + 2cos(Mα), A = 1 + 2cos(α), and α is a variable parameter.
[0015] Further, the transfer function H sh (z) of the shaping filter is:
[0016]
[0017] where h p (k) is the k-th impulse response coefficient of the prototype filter; N p is the number of impulse response coefficients of the prototype filter.
[0018] Further, the cascaded filter further includes an enhanced attenuation filter for enhancing the attenuation of the mirror image of the shaping filter. The transfer function H au (z) is:
[0019]
[0020] where α is a variable parameter.
[0021] Further, the cascaded filter further includes a compensation filter for compensating the passband attenuation caused by the masking filter and the enhanced attenuation shaping filter. The transfer function H comp (z) is:
[0022]
[0023] where C is a constant, and C ∈ [4, 10].
[0024] Further, the initial value of the interpolation factor is calculated according to the required design indexes of the cascaded filter. The required design indexes include the required passband length and the required stopband length. The calculation process of the initial value of the interpolation factor is as follows:
[0025]
[0026] where f pass is the required passband length; f stop is the required stopband length.
[0027] In addition, the present application also proposes a technical solution of a cascaded filter. The cascaded filter includes a shaping filter and a masking filter. The shaping filter is an FIR filter, and the shaping filter is obtained by interpolating M - 1 zeros between adjacent impulse response coefficients of a prototype filter, where M is the interpolation factor; the masking filter is a recursive filter for attenuating the image of the shaping filter.
[0028] The beneficial effect of the technical solution of the cascaded filter of the present invention is that the cascaded filter of the present invention is composed of a shaping filter formed by an FIR filter and a masking filter formed by a recursive filter. The increase of the M value in the recursive filter does not affect the computational amount of the recursive filter. Based on the principle of increasing or decreasing the computational amount of the shaping filter according to the M value, the larger the M value, the smaller the complexity of the shaping filter, and thus the use of multipliers in the hardware implementation of the metering chip is reduced. In the case of a large M value, the area of the metering chip is reduced.
[0029] Further, the transfer function H rs (z) of the masking filter is:
[0030]
[0031] where B = 1 + 2cos(Mα), A = 1 + 2cos(α), and α is a variable parameter.
[0032] Further, the cascaded filter further includes an enhanced attenuation filter for enhancing the attenuation of the image of the shaping filter. The transfer function H au (z) of the enhanced attenuation filter is:
[0033]
[0034] where α is a variable parameter.
[0035] Further, the cascaded filter further includes a compensation filter for compensating the passband attenuation caused by the masking filter and the enhanced attenuation shaping filter. The transfer function H comp (z) of the compensation filter is:
[0036]
[0037] Among them, C is a constant, and C ∈ [4, 10]. Brief Description of the Drawings
[0038] Figure 1 is the structural block diagram of the cascade filter of the present invention;
[0039] Figure 2 is the frequency response curve of the prototype filter and the shaping filter of the present invention;
[0040] Figure 3 is the frequency response curve of the shaping filter and the masking filter of the present invention;
[0041] Figure 4 is the frequency response curve of the shaping + masking filter and the enhanced attenuation filter of the present invention;
[0042] Figure 5 is the frequency response curve of the shaping + masking + enhanced attenuation filter and the compensation filter of the present invention;
[0043] Figure 6 is the frequency response curve of the cascade filter of the present invention;
[0044] Figure 7 is the frequency response curve of the passband part of the cascade filter of the present invention;
[0045] Figure 8 is the frequency response curve of the traditional IFIR filter used in the present invention;
[0046] Figure 9 is the frequency response curve designed by the PM_FIR method in the present invention. Detailed Embodiment
[0047] Embodiment of the cascade filter:
[0048] The main concept of the present invention is that, based on the fact that both the existing shaping filter and the masking filter adopt FIR filters, which leads to a large amount of calculation and a large area of the metering chip when the value of M is large. Based on the principle that the change of the value of M in the recursive filter does not affect the amount of calculation, the masking filter is adopted as a recursive filter, so that the area of the metering chip can be reduced when the value of M increases.
[0049] The cascade filter is as Figure 1 shown. According to the signal transmission direction, a shaping filter, a masking filter, an enhanced attenuation filter, and a compensation filter are sequentially arranged, and the cascade filter is used to realize the low-pass filtering function and complete the extraction of the fundamental wave component.
[0050] The shaping filter is a FIR filter. The shaping filter is obtained by interpolating M-1 zeros between adjacent impulse response coefficients of the prototype filter. The specific process of forming the shaping filter is as follows:
[0051] a. Determine the magnitude of the required design specifications for achieving the target low-pass filtering. The required design specifications include the required passband length f pass , the required stopband length f stop , the required passband ripple Atten pass and the required stopband attenuation Atten stop . According to the required passband length f pass and the required stopband length f stop , determine the initial value of the interpolation factor M. The calculation process of the initial value of the interpolation factor M is as follows:
[0052]
[0053] Of course, the initial value of the interpolation factor M can also be set according to experience, and the present invention does not limit this.
[0054] b. Determine the parameters of the prototype filter. The parameters of the prototype filter include the passband length f p-pass , the stopband length f p-stop , the passband ripple Atten p-pass and the stopband attenuation Atten p-stop . The parameters of the prototype filter are as follows:
[0055]
[0056] c. According to the parameters of the prototype filter, use the designfilt function in matlab to design a FIR low-pass filter to obtain the k-th impulse response coefficient h p (k) (i.e., the time-domain impulse response coefficient). The number of impulse response coefficients N p of the prototype filter. The frequency-domain response curve of the prototype filter is as shown by the solid line in Figure 2 .
[0057] d. Insert M-1 zeros between adjacent impulse response coefficients h p (k) to form a shaping filter. The k-th impulse response coefficient of the shaping filter is h sh (k). The number of impulse response coefficients of the shaping filter is N sh = M*N p - M + 1. The number of non-zero impulse response coefficients in the shaping filter is the same as that in the prototype filter. The frequency-domain response curve of the shaping filter is as shown by the dashed line in Figure 2 .
[0058] The transfer function H of the shaping filter sh (z) is as follows:
[0059]
[0060] where h p (k) is the k-th impulse response coefficient of the prototype filter; N p is the number of impulse response coefficients of the prototype filter.
[0061] The masking filter is a recursive filter used to attenuate the images of the shaping filter. The transfer function H rs (z) of the masking filter is as follows:
[0062]
[0063] where B = 1 + 2cos(Mα), A = 1 + 2cos(α), and α is a variable parameter. Usually, the value of α The smaller α is, the faster the attenuation speed of the masking filter. The frequency response curve of the masking filter is as shown by the dotted line in Figure 3 , and Figure 3 the solid line in is the frequency response curve of the shaping filter.
[0064] Since the shaping filter is obtained by inserting zeros between the impulse response coefficients of the prototype filter, the spectral response of the shaping filter will have virtual images. Therefore, a masking filter is needed to filter out the virtual images. However, the traditional masking filter is designed as FIR and is limited by the value of M. Therefore, a recursive design is adopted to form the masking filter to reduce the influence of the M value.
[0065] Since the accuracy of fundamental component extraction is directly related to the calculation accuracy of fundamental and harmonic electric energy, during the fundamental component extraction process, not only should the harmonic components be attenuated as much as possible, but also no attenuation in the passband should be ensured. Therefore, an enhanced attenuation filter is cascaded after the masking filter to further attenuate the harmonic components and virtual images. The transfer function H au (z) of the enhanced attenuation filter is as follows:
[0066]
[0067] where α is a variable parameter and is the same as α in the transfer function of the masking filter; the enhanced attenuation filter can attenuate the harmonics outside the passband to 90 dB, and can eliminate the influence of harmonic components and virtual images. The frequency response curve of the enhanced attenuation filter is as shown by the dotted line in Figure 4 , and Figure 4 the implementation in is the frequency response curve of the shaping + masking filter.
[0068] Since the masking filter and the enhanced attenuation filter will cause attenuation in the passband, it is necessary to design a compensation filter to compensate for the attenuation in the passband, and cascade the compensation filter after the enhanced attenuation filter. The transfer function H comp (z) is as follows:
[0069]
[0070] where C is a constant, C ∈ [4, 10]. The constant C is variable, and its adjustment range is between 4 and 10. The frequency response curve of the compensation filter is as shown by the dashed line in Figure 5 , and the solid line in Figure 5 is the frequency response curve of the shaping + masking + enhanced attenuation filter.
[0071] The fundamental wave extraction method of the cascaded filter constructed based on the shaping filter, masking filter, enhanced attenuation filter, and compensation filter includes the following steps:
[0072] 1) Substitute the initial value of the interpolation factor M into the cascaded filter to obtain the filtering result corresponding to the initial value;
[0073] 2) Adjust the size of the interpolation factor, compare the filtering results corresponding to different interpolation factors, and take the value of the interpolation factor with the best filtering result as the final value of the interpolation factor;
[0074] 3) The cascaded filter extracts the fundamental wave component according to the final value of the interpolation factor.
[0075] When adjusting the difference factor M, as long as it involves M, it needs to be adjusted. Since the shaping filter is obtained by interpolating M - 1 zeros between adjacent impulse response coefficients of the prototype filter, during the adjustment of M, the shaping filter also needs to be re-established, and the M values of each transfer function also need to be adjusted until the corresponding M value with the best filtering result is found as the final value.
[0076] At the same time, in actual use, α and C can also be changed until the frequency response curve of the cascaded filter reaches the optimum. The frequency response curve of the cascaded filter is as shown in Figure 6 , and the frequency response curve of the passband part of the cascaded filter is as shown in Figure 7 .
[0077] The present invention does not limit the transfer functions of the shaping filter, masking filter, enhanced attenuation filter, and compensation filter, and other transfer functions with the same function can be used instead.
[0078] The masking filter in the cascaded filter of the present invention adopts a recursive design. The increase of the M value in the recursive filter does not affect the computational complexity of the recursive filter. Based on the principle of increasing or decreasing the computational complexity of the shaping filter with the increase of the M value, the larger the M value, the smaller the complexity of the shaping filter, thereby reducing the use of multipliers in the hardware implementation of the metering chip. In the case of a large M value, the area of the metering chip is reduced. To compare and verify the effectiveness and practicality of the cascaded filter of the present invention, the same target filter (passband frequency point 60 Hz, stopband frequency point 95 Hz, sampling rate 6400 Hz, passband ripple 0.01 dB, stopband attenuation 80 dB) is designed by using the traditional IFIR, PM_FIR method and the cascaded filter method of the present invention, and their respective spectral response diagrams are observed. Figure 8 The spectral response of the traditional IFIR (M = 14) filter is shown as Figure 9 The spectral response curve of the filter designed by the PM_FIR method is shown. From Figure 8 it can be seen that for the traditional IFIR with the same M value, although the spectrum can meet the design specifications of the target filter, the stopband attenuation is relatively smaller than that of the cascaded filter, and the order reaches 196. Figure 9 For the filter designed by the PM_FIR method, the spectrum can also meet the design specifications of the target filter, but the filter order reaches 753. Figure 6 The spectral response of the cascaded filter of the present invention is shown. It can be seen that the stopband attenuation can reach about 100 dB, and the filter order is only 65.
[0079] Embodiment of the fundamental wave extraction method of the cascaded filter:
[0080] The specific implementation process and effect of the fundamental wave extraction method of the cascaded filter have been introduced in the above cascaded filter embodiment.
Claims
1. A fundamental wave extraction method for a cascaded filter, characterized in that, It includes the following steps: 1) Determine the initial value of the interpolation factor M; the initial value of the interpolation factor is calculated according to the required design indexes of the cascaded filter, and the required design indexes include the required passband length and the required stopband length. The calculation process of the initial value of the interpolation factor is as follows: where f pass is the length of the required passband; f stop is the length of the required stopband; 2) Substitute the initial value of the interpolation factor into the cascaded filter to obtain the filtering result corresponding to the initial value; the cascaded filter includes a shaping filter, a masking filter, an enhanced attenuation filter, and a compensation filter. The shaping filter is an FIR filter, and the shaping filter is obtained by interpolating M - 1 zeros between adjacent impulse response coefficients of the prototype filter; the masking filter is a recursive filter used to attenuate the image of the shaping filter; the enhanced attenuation filter is used to enhance the attenuation of the image of the shaping filter; the compensation filter is used to compensate for the passband attenuation caused by the masking filter and the enhanced attenuation shaping filter. 3) Adjust the size of the interpolation factor, compare the filtering results corresponding to different interpolation factors, and use the value of the interpolation factor with the best filtering result as the final value of the interpolation factor. 4) The cascaded filter extracts the fundamental wave according to the final value of the interpolation factor.
2. The fundamental wave extraction method of the cascaded filter according to claim 1, characterized in that, The transfer function H rs (z) of the masking filter is as follows: Among them, B = 1 + 2cos(Mα), A = 1 + 2cos(α), where α is a variable parameter, 3. The fundamental wave extraction method of the cascade filter according to claim 1, characterized in that The transfer function H of the shaping filter sh (z) is as follows: where hp(k) is the k-th impulse response coefficient of the prototype filter; N p is the number of impulse response coefficients of the prototype filter.
4. The fundamental wave extraction method of the cascaded filter according to claim 1, characterized in that The transfer function H au (z) of the enhanced attenuation filter is as follows: where α is a variable parameter, 5. The fundamental wave extraction method of the cascaded filter according to claim 4, characterized in that, The transfer function H comp (z) of the compensation filter is as follows: Where C is a constant, and C ∈ [4, 10].
6. A cascaded filter, comprising a shaping filter and a masking filter, characterized in that It also includes an enhanced attenuation filter and a compensation filter; the shaping filter is an FIR filter, and the shaping filter is obtained by interpolating M - 1 zeros between adjacent impulse response coefficients of the prototype filter, where M is the interpolation factor; the masking filter is a recursive filter used to attenuate the image of the shaping filter. The enhanced attenuation filter is used to enhance the attenuation of the image of the shaping filter; the compensation filter is used to compensate for the passband attenuation caused by the masking filter and the enhanced attenuation shaping filter.
7. The cascaded filter according to claim 6, wherein The transfer function H rs (z) of the masking filter is as follows: where B = 1 + 2cos(Mα), A = 1 + 2cos(α), and α is a variable parameter.
8. The cascade filter according to claim 6, wherein The transfer function H au (z) of the enhanced attenuation filter is as follows: where α is a variable parameter, 9. The cascade filter according to claim 8, wherein The transfer function H comp (z) of the compensation filter is as follows: Where C is a constant, and C ∈ [4, 10].
Citation Information
Patent Citations
Signal reconstruction structure based on fast filter bank and design method thereof
CN111010146A
Harmonic electric energy metering modules based on special digital filter
CN206788245U