Method and apparatus for implementing finite impulse response filters without the use of multipliers
View Patent ↗A finite impulse response filter is implemented as a sum of individual component, running-sum filters. The sum of all of the component filters required for a desired filter response is calculated in an accumulator and only the component filters' update terms, which are the difference between a new and an old discarded sample, is calculated for each component filter. A desired impulse response is decomposed into a sum of rectangular impulse responses of equal height, each of which implemented as a running sum requiring a subtraction and an addition. Using circuits running at a multiple of the sampling clock, multiple running sums may be implemented on the same hardware. A whole filter of arbitrary impulse response shapes and lengths may be implemented using memory and two arithmetic units. Two or more such filters may be cascaded to obtain a better approximation of the desired frequency characteristic. The invention saves significant chip resources and manufacturing costs.
1. A method for filtering a signal using a desired impulse response comprising:
decomposing the desired impulse response into a plurality of rectangular component impulse responses;
inputting the signal to each one of a plurality of individual component hardware filters, each of the plurality of individual component hardware filters associated with a respective one of the plurality of rectangular component impulse responses;
convolving, within each one of the plurality of individual component hardware filters, the input signal with a respective one of the plurality of rectangular component impulse responses; and
summing the plurality of convolutions, wherein a result of the summing is the response of the desired impulse response to the input signal.
2. The method according to claim 1 wherein convolving further comprises using a running sum.
3. The method according to claim 2 wherein decomposing further comprises:
calculating a frequency response for the desired impulse response;
specifying a quantity of component rectangular impulse responses;
decomposing the desired impulse response into a candidate response, the candidate response comprises the quantity of component rectangular impulse responses such that each component rectangular impulse response has either a positive or negative amplitude and when summed together approximate the desired impulse response;
refining the candidate impulse response iteratively comprising:
a) calculating a frequency response for the candidate response; and
b) comparing the candidate frequency response with the desired frequency response, wherein if the candidate frequency response is within the predefined range, use the candidate response, and if the candidate frequency response is not within a predefined range, adjust one or more of the candidate response component rectangular impulse response lengths, repeating steps a) and b).
4. A computer-implemented method for decomposing a desired impulse response into component rectangular impulse responses comprising:
executing software to calculate a frequency response for the desired impulse response;
executing software to specify a quantity of component rectangular impulse responses; and
executing software to decompose the desired impulse response into a candidate response,
wherein the candidate response comprises the quantity of component rectangular impulse responses such that each component rectangular impulse response has either a positive or negative amplitude and when summed together approximate the desired impulse response.
5. The method according to claim 4 further comprising executing software to refine the candidate impulse response, wherein refining comprises:
executing software to calculate a frequency response for the candidate response; and
executing software to compare the candidate frequency response with the desired frequency response,
wherein if the candidate frequency response is not within a predefined range, executing software to adjust one or more of the candidate response component rectangular impulse response lengths as a subsequent candidate response, and if the candidate frequency response is within the predefined range, use the candidate response.
6. The method according to claim 5 further comprising:
executing software to calculate a frequency response for a subsequent candidate response;
executing software to compare the subsequent frequency response with the desired frequency response,
wherein if the subsequent candidate frequency response is not within the predefined range, executing software to adjust one or more of the subsequent candidate response component rectangular impulse response lengths as another subsequent candidate response.
7. The method according to claim 6 wherein executing software to refine a candidate response further comprises executing software to observe if a candidate frequency response is converging or diverging.
8. The method according to claim 7 wherein if a candidate frequency response is converging, the executing of software to refine continues.
9. The method according to claim 8 wherein if a candidate frequency response is diverging, the prior subsequent candidate response is used.
10. The method according to claim 9 wherein the desired impulse response has a predefined length.
11. The method according to claim 10 wherein each component rectangular impulse response has an absolute magnitude of one.