Smooth and fast updating method, system, medium and device for filter array
By dividing the filter array by the upper passband boundary and expanding the frequency parameters, the downsampling filter is constructed, which solves the problem of large amount of calculation of digital filter arrays, and reduces hardware costs and increases battery life.
Patent Information
- Application Number
- CN202010825706.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-17
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2040-08-17
AI Technical Summary
When pursuing better results, existing digital filter arrays are designed to have high order, large quantity, and high sampling frequency, resulting in large calculation volume, high hardware cost, increased heating and reduced battery life.
By arranging the filter array from high to bottom according to the upper bound of the passband, dividing it into multiple packets, and expanding the frequency design parameters of the filter group, a downsampling anti-aliasing filter is constructed to reduce the sampling rate of the input signal and reduce the calculation requirements. .
It effectively reduces the computing demand of filter arrays, reduces hardware costs, improves computing speed, reduces heating, and increases battery life.
Smart Images

Figure CN114079440B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of filter technology, and in particular to a method, system, medium and device for smoothly and quickly updating a filter array. Background Art
[0002] Digital filtering is one of the most important components in digital signal analysis. Compared with analog filtering, digital filtering has the advantages of high accuracy and stability, easy change of system function, high flexibility, no impedance matching problems, easy large-scale integration, and multi-dimensional filtering.
[0003] The function of digital filter is to process the input signal waveform (or spectrum) by using the characteristics of discrete time system, or to transform the signal according to the predetermined requirements by using digital method. The input sequence x(n) is transformed into a certain output sequence y(n) to achieve the purpose of changing the signal spectrum.
[0004] A digital filter is an algorithm or device composed of a digital multiplier, an adder, and a delay unit. The function of a digital filter is to process the digital code of the input discrete signal to achieve the purpose of changing the signal spectrum.
[0005] Digital filters are of various types, such as low-pass, high-pass, band-pass, band-stop and all-pass. They can be time-invariant or time-varying, causal or non-causal, linear or non-linear. The most widely used are linear, time-invariant digital filters, and FIR filters.
[0006] In the process of implementing the present invention, the inventors found that the prior art has at least the following problems.
[0007] For digital filter arrays, in order to achieve better results, they tend to be designed with high order, large number, and high sampling frequency. The amount of calculation required to update its state is quite large, which will increase hardware costs, increase heat generation, and reduce battery life.
[0008] Therefore, it is hoped that the problem of how to reduce the amount of calculation and lower the hardware cost can be solved. Summary of the invention
[0009] In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a method, system, medium and device for smooth and fast updating of a filter array, so as to solve the problem of how to reduce the amount of calculation and lower the hardware cost in the prior art.
[0010] To achieve the above-mentioned object and other related objects, the present invention provides a method for smoothing and fast updating of a filter array, comprising the following steps: arranging the filters in the filter array from high to low according to the upper limit of the passband of the filters, dividing the arranged filters into N groups according to the upper limit of the passband, denoted as [G1, G2, ..., G N ]; the filter bank G i Frequency design parameter expansion M i-1 times, M is an integer, M≥2; i is an integer, i∈[1,N]; construct N-1 downsampling anti-aliasing filters denoted as [D2,D3,...,D N ], downsampling anti-aliasing filter D r The downsampling factor is M r-1 times, where r is an integer, r∈[2,N]; each sample of the original input time domain discrete signal S is input into all D r ; Input each sample in S to the filter bank G1; When the Mth sample in S r-2 *(1+k*M) samples are input to D r After that, D r The output is input to G i , where k is an integer, k∈[0,∞).
[0011] In one embodiment of the present invention, the filter is a low-pass filter or a band-pass filter.
[0012] In one embodiment of the present invention, the filter group G i The upper limit of the filter passband is Where i is an integer, i∈[1,N-1], M is an integer, M≥2, and Fs is the sampling rate of the original input time domain discrete signal. N Contains all remaining filters.
[0013] To achieve the above object, the present invention also provides a smooth and fast update system for a filter array, comprising: an original input module, a division module, a parameter expansion module, a construction module and an input module; the division module is used to arrange the filters in the filter array from high to low according to the upper limit of the passband of the filter, and divide the arranged filters into N groups according to the upper limit of the passband, recorded as [G1, G2, ..., G N ]; the parameter expansion module is used to expand the filter group G i Frequency design parameter expansion M i-1 times, M is an integer, M≥2; i is an integer, i∈[1,N]; the construction module is used to construct N-1 downsampling anti-aliasing filters, denoted as [D2,D3,...,D N ], downsampling anti-aliasing filter D r The downsampling factor is Mr-1 times, where r is an integer, r∈[2,N]; the input module is used to input each sample of the original input time domain discrete signal S into all D r ; Input each sample of S into the filter bank G1; When the Mth sample in S r-2 *(1+k*M) samples are input to D r After that, D r The output is input to G i , where k is an integer, k∈[0,∞).
[0014] In one embodiment of the present invention, the filter is a low-pass filter or a band-pass filter.
[0015] In one embodiment of the present invention, the filter group G i The upper limit of the filter passband is Where i is an integer, i∈[1,N-1], M is an integer, M≥2, and Fs is the sampling rate of the original input time domain discrete signal. N Contains all remaining filters.
[0016] To achieve the above object, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the above-mentioned methods for smoothing and fast updating of the filter array.
[0017] To achieve the above-mentioned purpose, the present invention also provides a smooth and fast update device for a filter array, comprising: a processor and a memory; the memory is used to store a computer program; the processor is connected to the memory, and is used to execute the computer program stored in the memory, so that the smooth and fast update device for the filter array performs any of the above-mentioned smooth and fast update methods for the filter array.
[0018] As described above, the smooth and fast update method, system, medium and device of the filter array of the present invention have the following beneficial effects: reducing the calculation requirements of the filter array and reducing hardware costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flow chart showing a smooth fast updating method of a filter array of the present invention in one embodiment;
[0020] Figure 2 It is a schematic diagram showing the structure of a smooth and fast update system of a filter array of the present invention in one embodiment;
[0021] Figure 3 It is a schematic diagram showing the structure of a smooth and fast updating device of a filter array of the present invention in one embodiment.
[0022] Component number description
[0023] 21 Raw Input Module
[0024] 22 Divide Modules
[0025] 23 Parameter expansion module
[0026] 24 Construction Modules
[0027] 25 Input Module
[0028] 31 Processor
[0029] 32 Memory DETAILED DESCRIPTION
[0030] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0031] It should be noted that the illustrations provided in the following embodiments are only used to illustrate the basic concept of the present invention in a schematic manner. Therefore, the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0032] The smooth and fast updating method, system, medium and device of the filter array of the present invention are used to reduce the calculation requirements of the filter array and reduce the hardware cost.
[0033] like Figure 1 As shown, in one embodiment, the smooth and fast updating method of the filter array of the present invention comprises the following steps:
[0034] Specifically, the original input time-domain discrete signal is denoted as S, and its sampling rate is denoted as Fs.
[0035] Specifically, the discrete-time signal is a signal that has values only at a series of discrete time points n (n is an integer, n=0, ±1, ±2, ...). It is also called a discrete-time signal sequence. A discrete-time signal can be represented by a discrete-time digital sequence. Because analog signals exist in the real world, the first problem of digital signal processing is to discretize the signal (sample), then quantize and encode it, and finally perform digital processing. A common method for converting a continuous signal into a discrete signal is to sample at equal or unequal intervals period T. T is called the sampling period, and the reciprocal of T is called the sampling frequency or sampling rate Fs.
[0036] Step S11: Arrange the filters in the filter array from high to low according to the upper limit of the passband of the filters, and divide the arranged filters into N groups according to the upper limit of the passband, denoted as [G1, G2, ..., G N ];
[0037] Specifically, the filter is a low-pass elliptic filter. The elliptic low-pass filter is a zero-pole type filter, which has transmission zeros and poles within a limited frequency range. The passband and stopband of the elliptic low-pass filter both have equal ripple characteristics, so the passband and stopband approximation characteristics are good. For the same performance requirements, it has a lower order than other filters, and its transition band is narrower.
[0038] Specifically, the filter is divided into N groups according to the upper limit of the passband, and is divided into N groups within a preset pitch range. For example, in the pitch range of [C2, C10), it is divided into 8 groups. In the pitch range of [C2, C10), filters are set every 25 cents, for a total of 384 filters. The passband ratio of all filters is 50 cents, Apass (passband ripple) is 3dB, and Astop (stopband attenuation) is 80dB. The 384 filters are divided into 8 groups according to 2 times the frequency:
[0039] G1 pitch range [C9, C10], with 48 filters.
[0040] G2 pitch range [C8,C9], with 48 filters.
[0041] …
[0042] G8 pitch range [C2, C3], with 48 filters.
[0043] Specifically, the filter group G i The upper passband interval is M is an integer, M≥2, and Fs is the sampling rate of the original input discrete time domain signal. When the upper limit of the filter's passband (the passband refers to a frequency interval, and the end point of the interval is still the frequency, so this upper limit is a frequency value) and the acceptable transition band (still a frequency range) are lower than half of the sampling frequency, the downsampled signal (the sampling rate is reduced) can be used to replace the original signal (the downsampling operation is synchronous, and it does not generate another completely unrelated signal) to input to the filter in order to reduce the amount of calculation (because the sampling rate is lower, and the amount of calculation of the digital filter is proportional to the number of samples).
[0044] Step S12: filter group G i Frequency design parameter expansion M i-1 times, M is an integer, M≥2; i is an integer, i∈[1,N]. Because the sampling rate of the input to the filter is reduced, the various frequency design parameters of the filter also need to be improved accordingly. If the sampling rate is reduced to 1 / M of the original sampling rate, the filter parameters must be increased to M times the original. G i Refers to [G1,G2,...,G N ] a specific one.
[0045] Step S13: construct N-1 downsampling anti-aliasing filters, denoted as [D2, D3, ..., D N ], downsampling anti-aliasing filter D r The downsampling factor is M r-1 times, where r is an integer, r∈[2,N].
[0046] Specifically, since non-integer multiple downsampling will bring significant additional computational overhead and has no practical value, only integer multiple downsampling is used in the description of this patent. Downsampling will produce a phenomenon called "aliasing", and the downsampling anti-aliasing filter can be regarded as a black box that handles the aliasing problem. It is a low-pass filter inside. D r Refers to [D2,D3,...,D N ] any one.
[0047] Step S14: input each sample of the original input time domain discrete signal S into all D r ; Input each sample in S to the filter bank G1; When the Mth sample in S r-2 *(1+k*M) samples are input to D r After that, D r The output is input to G i , where k is an integer, k∈[0,∞).
[0048] Specifically, each sample of S is input into all D i, where i is an integer, i∈[2,N]. That is, each sample of S is input into all D2,D3,...,DN.
[0049] Each sample of S is input into filter bank G1.
[0050] Specifically, each sample of S is sequentially input into the filter bank G1.
[0051] When the Mth r-2 *(1+k*M) samples are input to D r After that, D r The output is input to G i , where k is an integer, k∈[0,∞).
[0052] Specifically, D r The output is input to G i , where r and i are the same number. That is, the output of D3 is input to G3. The smooth and fast update method of the filter array can greatly improve the calculation speed without affecting the function, and can perform streaming calculations. It reduces hardware costs, reduces heat generation and increases battery life.
[0053] Specifically, the filter is a low-pass or band-pass filter.
[0054] Specifically, different filters update their outputs at different frequencies (here the frequency is relative to the original input, or the sampling rate of the input discrete time domain signal, for example: each input sample is updated once, every 2 input samples are updated once, every 4 input samples are updated once, etc.), so there is room for peak and valley adjustment.
[0055] Specifically, in one embodiment, the music audio is processed as follows: in the pitch range of [C2, C10), filters are set every 25 cents, for a total of 384 filters. The passband of all filters is 50 cents, Apass is 3dB, and Astop is 80dB.
[0056] Divide the 384 filters into 8 groups according to the 2-fold frequency:
[0057] G1 pitch range [C9, C10], with 48 filters.
[0058] G2 pitch range [C8,C9], with 48 filters.
[0059] …
[0060] G8 pitch range [C2, C3], with 48 filters.
[0061] Due to the geometric relationship of frequencies, the coefficients of the digital filter group [G2 to G8] are the same as those of G1, so the coefficients use the coefficients of G1.
[0062] Set up 7 downsamplers denoted as [D2~D8], each containing a 6th order low pass elliptic filter. The low pass filter is updated every sample. The downsampling multiples are [2,4,8,16,32,64,128]. The signal output by the downsampler is denoted as [S2~S8]. The original sequence number without downsampling is denoted as S1.
[0063] The G1 group is updated every sampling. Each sampling reads a sequence number in sequence with a cycle of 128, and selects the group with the corresponding sequence number in [G2~G8] to update.
[0064] [2,3,2,4,2,3,2,5,2,3,2,4,2,3,2,6,2,3,2,4,2,3,2,5,2,3,2,4,2,3,2,7,2,3,2,4,2,3,2,5,2,3,2,4,2,3,2,6,2,3,2,4,2,3,2,5,2,3,2,4,2,3,2,8, 2,3,2,4,2,3,2,5,2,3,2,4,2,3,2,6,2,3,2,4,2,3,2,5,2,3,2,4,2,3,2,7,2,3,2,4,2,3,2,5,2,3,2,4,2,3,2,6,2,3,2,4,2,3,2,5,2,3,2,4,2,3,2,byes].
[0065] Specifically, the time complexity of the present invention is directly optimized from O(N) to O(1). The amount of computation required to process each sample has a very small upper bound, and there will be no peak and valley problem. The filter array is divided into N groups according to the M-frequency relationship. For example, the update cost of each group of filters is set to unit 1, and the original computational cost Cost of the present invention is not used. orig = N. The present invention calculates the overhead Bounded. No matter how long the sensor array is, its computational overhead is less than a fixed value. For 2x frequency grouping, the computational overhead is less than 2 groups; for 3x frequency grouping, the computational overhead is less than 1.5 groups. The speedup ratio is greater than N*(M-1) / M. The longer the array, the greater the speedup ratio. If the frequency parameters of the filter group are in geometric relationship and other parameters are the same, the filter parameters of the highest frequency group can be shared.
[0066] like Figure 2 As shown, in one embodiment, the smooth and fast update system of the filter array of the present invention comprises a division module 21 , a parameter expansion module 22 , a construction module 23 and an input module 24 .
[0067] The division module 21 is used to arrange the filters in the filter array from high to low according to the upper limit of the passband of the filters, and divide the arranged filters into N groups according to the upper limit of the passband, which are recorded as [G1, G2, ..., G N ].
[0068] The parameter expansion module 22 is used to increase the filter group G i Frequency design parameter expansion M i-1 times, M is an integer, M≥2; i is an integer, i∈[1,N].
[0069] The construction module 23 is used to construct N-1 downsampling anti-aliasing filters, denoted as [D2, D3, ..., D N ], downsampling anti-aliasing filter D r The downsampling factor is M r-1 times, where r is an integer, r∈[2,N].
[0070] The input module 24 is used to input each sample of the original input time domain discrete signal S into all D r ; Input each sample in S to the filter bank G1; When the Mth sample in S r-2 *(1+k*M) samples are input to D r After that, D r The output is input to G i , where k is an integer, k∈[0,∞).
[0071] Specifically, the filter is a low-pass or band-pass filter.
[0072] Specifically, the filter is divided into N groups according to the upper limit of the passband, and is divided into N groups within a preset pitch range.
[0073] Specifically, the filter group G i The upper limit of the filter passband is Where i is an integer, i∈[1,N-1], M is an integer, M≥2, and Fs is the sampling rate of the original input time domain discrete signal. N Contains all remaining filters.
[0074] It should be noted that the structures and principles of the division module 21, parameter expansion module 22, construction module 23 and input module 24 correspond one to one with the steps in the above-mentioned smooth and fast update method of the filter array, so they are not repeated here.
[0075] It should be noted that it should be understood that the division of the various modules of the above system is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the x module can be a separately established processing element, or it can be integrated in a chip of the above device for implementation. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0076] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (MPU), or one or more field programmable gate arrays (FPGA). For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0077] In one embodiment of the present invention, the present invention further includes a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the method for smoothing and fast updating of any of the filter arrays described above is implemented.
[0078] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0079] like Figure 3 As shown, in one embodiment, the smooth and fast update device of the filter array of the present invention includes: a processor 31 and a memory 32; the memory 32 is used to store computer programs; the processor 31 is connected to the memory 32, and is used to execute the computer program stored in the memory 32, so that the smooth and fast update device of the filter array executes any of the smooth and fast update methods of the filter array.
[0080] Specifically, the memory 32 includes: ROM, RAM, disk, USB flash drive, memory card or optical disk, etc., which can store program codes.
[0081] Preferably, the processor 31 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0082] In summary, the smooth and fast update method, system, medium and device of the filter array of the present invention reduce the calculation requirements of the filter array and reduce the hardware cost. Therefore, the present invention effectively overcomes various shortcomings in the prior art and has high industrial utilization value.
[0083] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A method for smooth and fast updating of a filter array, characterized in that: The following steps are involved: Arrange the filters in the filter array from high to low according to the upper limit of the filter passband, and divide the arranged filters into N groups according to the upper limit of the passband, denoted as [G1, G2, ..., G N ]; The filter bank G i Frequency design parameter expansion M i-1 times, M is an integer, M≥2; i is an integer, i∈[1,N]; Construct N-1 downsampling anti-aliasing filters denoted as [D2,D3,...,D N ], downsampling anti-aliasing filter D r The downsampling factor is M r-1 times, where r is an integer, r∈[2,N]; Each sample of the original input time domain discrete signal S is input into all D r ; Input each sample in S to the filter bank G1; When the Mth sample in S r-2 *(1+k*M) samples are input to D r After that, D r The output is input to G i , where k is an integer, k∈[0,∞).
2. The smooth and fast update method of the filter array according to claim 1, characterized in that: The filter is a low-pass or band-pass filter.
3. The smooth and fast update method of the filter array according to claim 1, characterized in that: The filter bank G i The upper limit of the filter passband is Where i is an integer, i∈[1,N-1], M is an integer, M≥2, Fs is the sampling rate of the original input time domain discrete signal, G N Contains all remaining filters.
4. A smooth and fast update system for a filter array, characterized in that: include: Partition module, parameter expansion module, construction module and input module; The partitioning module is used to arrange the filters in the filter array from high to low according to the upper passband limit of the filters, and divide the arranged filters into N groups according to the upper passband limit, which are recorded as [G1, G2, ..., G N ]; The parameter expansion module is used to expand the filter group G i Frequency design parameter expansion M i-1 times, M is an integer, M≥2; i is an integer, i∈[1,N]; The construction module is used to construct N-1 downsampling anti-aliasing filters, denoted as [D2, D3, ..., D N ], downsampling anti-aliasing filter D r The downsampling factor is M r-1 times, where r is an integer, r∈[2,N]; The input module is used to input each sample of the original input time domain discrete signal S into all D r ; Input each sample of S into the filter bank G1; When the Mth sample in S r-2 *(1+k*M) samples are input to D r After that, D r The output is input to G i , where k is an integer, k∈[0,∞).
5. The smooth and fast update system of the filter array according to claim 4, characterized in that: The filter is a low-pass or band-pass filter.
6. The smooth and fast update system of the filter array according to claim 4, characterized in that: The filter bank G i The upper limit of the filter passband is Where i is an integer, i∈[1,N-1], M is an integer, M≥2, Fs is the sampling rate of the original input time domain discrete signal, G N Contains all remaining filters.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is executed by a processor to implement the smooth and fast update method of the filter array according to any one of claims 1 to 3.
8. A smooth and fast update device for a filter array, characterized in that: include: Processor and memory; The memory is used to store computer programs; The processor is connected to the memory and is used to execute the computer program stored in the memory, so that the smoothing and fast updating device of the filter array executes the smoothing and fast updating method of the filter array according to any one of claims 1 to 3.
