The field of the invention is digital signal filtering and in particular methods to improve low frequency resolution without increasing processing requirements.
Broadband digital signals often require filtering for their intended use. For example, in audio systems, signals may be filtered (often referred to as equalizing) to compensate for characteristics of speakers and the listening environment. Such digital signals must be at a sufficiently high sample rate to carry the high frequency signal components. Finite Impulse Response (FIR) (or transversal) filters are preferred in many applications to maintain linear phase or minimum phase for accurate sound reproduction. In order to filter such signals using a single FIR filter, the filtering must be performed at the high sample rate of the digital signal, and to achieve high resolution filtering for low frequencies present in the signal, a very long FIR filter is also required. In some audio systems the resulting processing requirements cannot be performed economically.
Multi-rate filters have been introduced to overcome the very long FIR filter requirement of single filter implementations. Such multi-rate filters separate the digital signal into at least two bands. A high frequency signal band is processed at the high sample rate of the original signal using a short FIR filter and a parallel low frequency band is first down sampled to a lower sample rate, filtered using a FIR filter which may be much shorter than the traditional filter required by the single filter implementation, and up sampled back to the original sample rate. The two filtered signals are then summed to provide the desired filtered signal. Such multi-rate filters include a high pass filter to provide the high frequency signal, and a separate low pass filter to provide the separate parallel low frequency signal. While Infinite Impulse Response (IIR) high pass and low pass filters might be used in the multi-rate filter, but unfortunately such IIR filters introduce differing group delay above and below the transition frequency and may distort the resulting audio signal. Alternatively, linear phase FIR's may be used, but unfortunately the FIR high and low pass filters are computationally intense, and minimize the benefit of the multi-rate filtering approach.
The present invention addresses the above and other needs by providing a filtering method which approximates a target Finite Impulse Response (FIR) (or transversal) filter and reduces computational requirements by eliminating high pass filtering required by known multi-rate filters. An input signal is copied into two identical signals and processed in parallel by a full-rate path, and by a reduced-rate path. Parallel filters are computed and applied in each path, the reduced-rate signal is up-sampled, and the two signals summed. The high pass filter required by known multi-rate filters is eliminated and the low pass filter in the prior art is implicit in a down sampling. Linear phase FIR filters are used for down and up sampling, resulting in constant group delay. Added benefits include the option of zero added latency through the filtering and the constant group delay added to the target FIR filter. The user may choose criteria such as minimum resolution in each band.
In accordance with one aspect of the invention, there is provided a method of calculating a pair of FIR filters, and a corresponding signal processing diagram for applying the calculated filters. The filters are derived to eliminate the need for a separate high pass filter required by known multi-rate filters.
In accordance with another aspect of the invention, there is provided a signal filtering method which includes an option of zero added latency through the filtering and constant group delay added to the target FIR.
In accordance with another aspect of the invention, the user may choose criteria such as minimum resolution in each band for an approximation of the target FIR filter.
The above and other aspects, features and advantages of the present invention will be more apparent from the following more particular description thereof, presented in conjunction with the following drawings wherein:
Corresponding reference characters indicate corresponding components throughout the several views of the drawings.
The following description is of the best mode presently contemplated for carrying out the invention. This description is not to be taken in a limiting sense, but is made merely for the purpose of describing one or more preferred embodiments of the invention. The scope of the invention should be determined with reference to the claims.
A prior art digital filter with a single Finite Impulse Response (FIR) filter (the target FIR filter) 10 applied to an input signal 12 to produce a filtered signal 14. The Target FIR filter 10 must perform operations at the high sample rate of the input signal 12 and also be of sufficient length to provide accurate filtering to low frequency components in the input signal. The resulting processing may require a very large number of operations at the high sample rate.
A prior art multi-rate digital filter 20 with two parallel FIR filters, FIRH 24 and FIRL 34, applied to the input signal 12 is shown in
An improved multi-rate filter 40 according to the present invention is shown applied to the input signal 12 in
The full-rate filter FIRF 42 filters the input signal 12 to provide a filtered full-rate signal 43. A second down-sampler 44 down samples the input signal 12 to provide a down sampled (or reduced-rate) signal 45. The reduced-rate filter FIRR 46 filters the reduced-rate signal 45 to provide a filtered reduced-rate signal 47. A second up sampler 48 up samples the filtered reduced-rate signal 47 to provide an up sampled filtered signal 49. The summer 26 sums the filtered full-rate signal 43 with the up sampled filtered signal 49 to provide the filtered signal 14. The resulting filter 40 thus reduces overall computational requirements by eliminating high pass filter 22 in the known multi-rate filter 20. The resulting filter 40 provides added benefits including the option of zero added latency through the filtering and constant group delay added to the target FIR because the IIR high and low pass filters are no longer included.
While a separate low pass filter is not present in the filter 40, an anti-aliasing filter is present as part of the down-sampler 44 and applied in a single step with the down sampling. Further, the up-sampler 48 includes “reconstruction or “anti-imaging” filtering. The up sampling and reconstruction filter are also preferably applied in a single step, since only 1/n samples of the reconstruction filter input are non-zero. Various up-samplers are known in the art and suitable for use with the present invention.
Where a linear phase filter is used, the high rate filter FIRF is symmetrically windowed, resulting in a reduced-rate filter FIRR with zeros in the center. An efficient implementation of the reduced-rate filter FIRR is obtained by breaking the reduced-rate filter FIRL into two non-zero parts and applying in a delay (or gap), corresponding to the number of zero sample discarded, to signal samples between the first non-zero part and the second non-zero part of the reduced-rate filter FIRR.
Impulse and frequency response plots are provided to show the results of each signal processing step of the present invention in
FIR=(c1, c2, c2, . . . , cN)
A window function W for windowing the target FIR filter 10 to obtain the full-rate filter FIRF 42 is shown in
W=(w1, w2, w3, . . . wM)
The length M of the window function W is preferably selected based on desired properties of the full-rate path and reduced-rate path. Zero latency is achieved by including 1.0's to compensate for the group delay of the reduced-rate path, but this requires a trade-off in the transition region of the window function W (the path from 1.0 s to approximately 0 at the end, i.e., the right half of the window function W). The overall length of the window function W is determined by the desired length of the full-rate filter, or vice-versa. The overall length M of the window function W, the number of 1.0 s, and the shape of the right half of the window function W, may all be adjusted to trade off characteristics, e.g., windowing over too short a region will induce artifacts comparable to truncation (i.e., rectangular windowing).
The window function W is applied to the target FIR filter 10 by term by term multiplying each sample of the target FIR filter 10 by the corresponding term of the window function W up to the length M of the window. The full-rate filter FIRF 42 is thus length M:
FIRF=(c1wi, c2w2, c3w3, . . . cMwM)
The length M of the window W is preferably selected based on parameters of the reduced-rate path. Zero added latency is accomplished by setting the number of 1.0 elements (i.e., M/2) of the window W to the total group delay of the reduced-rate path's decimation and interpolation filters (not necessarily the same filter), as well as the residual FIR anti-aliasing filter A (which may or may not be the same as the signal decimation/interpolation filter(s)).
The latency may be adjusted as desired, but must be compensated for by a delay in either the full-rate path or the reduced-rate path if the total group delay of the reduced-rate path is made more or less than the full-rate path. In the simplest case, there are no 1.0's in the window, and the entire reduced-rate path latency must be taken into account by applying a delay to the full-rate path before the summation. In the opposite case, one might apply a window W to the target FIR filter with more 1.0's than necessary for zero latency (because optimal windowing may be target-filter-dependent) and elect to apply a delay to the reduced-rate path.
An impulse response of the full-rate filter FIRF 42 is shown in
The residual filter R is obtained by subtracting (term by term) the windowed full-rate filter FIRF 42 having a length M from the first M elements of target FIR filter 10 having a length N to obtain R having a length of N:
R=FIR−FIRF=(c1−c1w1, c2−c2w2, . . . cM−cMwM, cM+1, . . . cN)
The impulse response of the N element residual filter R is shown in
R=(0, 0, 0 . . . 0, rM/2+. . . rN)
Such leading zeros may be removed leaving R′ having N-128 (896 in this example) elements:
R′=(rM/2+1 . . . rN)
Proper sizing of the leading 1.0 flat region of the window function W allows the reduced-rate path response to be summed with the full-rate path response without a need to apply delay to the full-rate path. The length of the flat 1.0 leading region of half the length of the window W is an approximate preferred length. The actual length of the 1.0 leading region may vary depending on applications and multi-rate filters computed using a window W with the 1.0 leading region greater than or less than half the window W length are intended to come within the scope of the present invention.
The down sampler 44 (see
A=(a1, a2, a3 . . . aj)
An impulse response of the reduced-rate filter 46 according to the present invention is shown in
FIRg(n)=Σj−1j−JA(j)R′(n−f)
Where the length of the reduced-rate filter FIRR 46 is the sum of the lengths of the anti-aliasing filter A and the residual filter R′ minus one, or:
896+85−1=980
and decimation by four results in a 245 element reduced-rate filter FIRR.
An impulse response of the up-sampled signal 49 (see
An impulse response of the summed signal 14 (see
The present invention is described above for cases where the target filter is efficiently performed using a full-rate path and a single reduced-rate path. In other instances, the single reduced-rate path shown in
A potential problem arises when the desired decimation filters are not nx+1 in length (where n is the decimation factor, and x is a positive integer >1). The resulting down sampled (every n−1 out of n samples are removed) filter is always asymmetric. For example, any even anti-aliasing filter A when decimated by an even factor, n exhibits asymmetry. A resulting asymmetric impulse response is not linear phase and does not have constant delay for all frequencies. In the case of any multi-rate processing, where the reduced-rate signal must be able to maintain the same phase as the full-rate signal (whether high-pass filtered or not), this would make even length FIR filters unacceptable for use as anti-aliasing filters. This may be addressed by taking advantage of a characteristic of FIR filters, that is, when an arbitrary FIR filter is convolved with the time-reverse of itself, the result is a symmetric filter having a linear phase impulse response. Such convolution may be applied to achieve constant group delay through the reduced-rate path of a multi-rate filter by including a down sampled and reversed filter RV 52 version of the anti-aliasing filter A in the reduced-rate signal path after the down-sampler as shown in
In the instance where a reduced-rate filter can be derived by down-sampling a full-rate filter (for example, utilizing the filter calculation procedure of the present invention used to compute the reduced-rate filter FIRR 46), the reverse filter RV may effectively be implemented by convolving the anti-aliasing filter A with a full-rate filter (for example, the residual filter R) and down sampling the result, and further incorporating a different phase (or offset) in the down-sampling process. Rather than keeping the first sample, and discarding the following n−1 samples leaving (a1, an+1, a2n+1, . . . ), an offset OS (in samples), is applied during the down sampling so the retained samples become (a1+OS, an+1+OS, a2n+1+OS, . . . ) Doing this with the correct “phase” (or offset) has the same effect as reversing the down-sampled decimation filter because the original filter was symmetrical. The same anti-aliasing filter A may also be used in the down sampler 44 (see
While the invention herein disclosed has been described by means of specific embodiments and applications thereof, numerous modifications and variations could be made thereto by those skilled in the art without departing from the scope of the invention set forth in the claims.