Background of the Invention
The present invention relates to digital filters, and specifically to second-order digital filters. It is well known that any order of digital filters may be efficiently constructed from second-order building blocks.
Direct mechanization of digital filters is well understood by those skilled in the digital-filter art. The direct mechanization of a second-order digital filter requires five multipliers. Each multiplier used in the direct mechanization of the filter introduces round-off noise into the result because only a finite number of bits of the product can be carried forward. In addition, coefficient error is introduced because each multiplier coefficient is a finite number, having a finite number of bits. Therefore, the poles and zeros of the filter implemented in the direct form are not exact.
The normal-form of the second-order digital filter provides a digital filter structure with lower round-off noise, minimum coefficient inaccuracy errors, and an absence of limit cycles. Such a normal-form filter is described in the article by C. W. Barnes, "A Parametric Approach to the Realization of Second Order Digital Filter Sections", IEEE Trans. on Circuit and System, Vol. CAS-32 No. 6, June 1985, pages 530-539.
The normal-form filter provides better coefficient error and round-off error because inherent error correction is provided by the cross-coupling of the partial-product outputs within the filter.
A block diagram of the conventional second-order normal-form digital filter structure is shown in FIG. 1. The filter has an input 11 for receiving an input signal X, which may consist of a series of N-bit signal samples, x.sub.n. The signal is processed through a plurality of multipliers to produce intermediate results U and V the final result Y. The final result Y is placed on the filter output as the output signal. The intermediate results U and V are fed back and cross-coupled within the filter. The multipliers b.sub.1, b.sub.2, c.sub.1, and c.sub.2 determine the locations of the poles of the filter. The input multipliers a.sub.1 and a.sub.2 determine the input scaling. Once the other coefficients have been set, the multipliers a.sub.0, d.sub.1, and d.sub.2 determine the zero locations of the filter. The second-order normal-form filter has a total of nine multipliers. Element-by-element mechanizations of this filter, sometimes with variations as taught by Barnes, represents the prior art.
Nevertheless, the normal-form digital filter provides design difficulties for implementation and also is difficult to analyze. In addition, the large number of multipliers occupies a great deal of space on a semiconductor chip when this filter is implemented in microcircuitry. Therefore, efforts have been undertaken to reduce the number of multipliers in the second-order normal-form digital filter.
Summary of the Invention
The present invention greatly simplifies the second-order normal-form digital filter while providing increased accuracy by entirely eliminating the multipliers, and substituting one or more look-up tables stored in memory to provide partial-product outputs, which are subsequently summed and recursively used to address the memory.
The digital filter includes a filter input and a filter output. A memory has a first memory input connected to the filter input, and second and third inputs. The memory has a first output, a second output, ad a third output. A first adder has an input connected to the first memory output, and has its output connected to the filter output. A second adder has an input connected to the second memory output, and has its output connected to the second memory input. A third adder has an input connected to the third memory output and has its output connected to the third memory input .
Brief Description of the Drawings
FIG. 1 is a block diagram of a second-order normal-form digital filter.
FIG. 2 is a recharacterization of the normal-form digital filter shown in FIG. 1.
FIG. 3 shows a one-bit-at-a-time distributed arithmetic realization of a normal-form biquadratic digital filter incorporating the invention.
FIG. 4 shows a single memory one-bit-at-a-time digital filter incorporating the invention.
FIG. 5 shows a single memory four-bit-at-a-time digital filter incorporating the invention.
FIG. 6 shows a four memory sixteen-bit-at-a-time digital filter incorporating the invention using four-bit-at-a-time look-up tables.
FIG. 7 shows an eight memory sixteen-bit-at-a-time digital filter incorporating the invention using two-bit-at-a-time look-up tables.
FIG. 8 shows a block diagram of the normal-form of a biquadratic digital filter with error feedback.
FIG. 9 shows a one-bit-at-a-time distributed arithmetic realization of a normal-form biquadratic digital filter with error feedback.
Detailed Description of the Preferred Embodiments
The present invention entirely eliminates the multipliers of the normal-form digital filter by the use of distributed arithmetic to replace the multipliers with one or more memories containing look-up tables to produce each of the partial-products within the filter.
Distributed arithmetic (DA) is a bit-serial computational operation that forms the inner (dot) products of vectors in a single direct step.
The present invention is possible because the functions of the normal-form digital filter can be grouped into three similar blocks 21, 23, 25 in the manner shown in FIG. 2. Each block includes a summer or adder 31, 33, 35, three inputs 41-49 to the summer, a multiplier 51-59 on each input, and an output 61, 63, 65 from the summer 31, 33, 35 with a delay element 71, 73, 75. Each block 21, 23, 25 produces a dot product Y, U, and V. Each block also has as inputs the intermediate products U and V and the filter input signal X. Thus, in each block, each of the signals X, U, and V is multiplied by a weighting coefficient, and then summed and delayed by one sample time to produce the product. Each of these products can be obtained using a distributed arithmetic table look-up approach.
If each signal X, U, V, Y at a point in time has a multi-bit sample x.sub.n, u.sub.n, v.sub.n, y.sub.n, and at the immediately preceding sample clock period has a sample x.sub.n-1, u.sub.n-1, v.sub.n-1, y.sub.n-1, the configuration shown in FIG. 2 can be expressed mathematically as follows:
In vector-matrix notation, Equations (1)-(3) may be expressed: ##EQU1##
FIG. 3 shows a distributed arithmetic realization of a normal-form biquadratic digital filter for one-bit-at-a-time processing. The filter input 101 receives the input signal sample x.sub.n. Each such signal sample may consist of N bits. In the illustrated embodiment, the bits of the input signal sample x.sub.n are received serially, one bit at a time.
An addressing mechanism 103 receives the input signal sample x.sub.n and the recursive intermediate results u.sub.n and v.sub.n to generate an address for the product memory. In the embodiment shown, the recursive intermediate results u.sub.n and v.sub.n are also applied to the addressing mechanism serially, following a parallel-to-serial conversion in the feedback paths. The addressing mechanism 103 comprises exclusive-OR gates 105, 107, each of which receives the serially input signal x.sub.n and one of the serially input intermediate results u.sub.n or v.sub.n. The outputs of the exclusive-OR gates 105, 107 form the address for the partial product memory 109. The term "memory" refers to the combination of the partial-product memory 109 and the addressing logic 103.
The memory 109 may be any type of multi-bit digital storage device, such as a Read-Only-Memory (ROM). The memory has stored in it the partial-products of u, v, y that, when weighted by the factor 2.sup.-n and summed, form the intermediate and final results u.sub.n, v.sub.n, y.sub.n for each set of bits of the input signals x.sub.n-1, u.sub.n-1, v.sub.n-1. Single addressing of the memory for all three partial products can be used, as the same three input signals X, U, and V are input to each computation block 21, 23, 25 (FIG. 2). As there are three signal inputs to form the address for the memory, four values or words for each partial-product of u, v, y must be stored in the memory 109, as 1/2.times.2.sup.3 =4.
At each address in the memory are stored the partial-products that are required to form the results u.sub.n, v.sub.n, y.sub.n for that set of inputs. In the drawing, the ROM is conceptualized as comprising three parts, ROM A, ROM B, and ROM C. In this conceptualization, the partial-product values to form u are stored in the memory portion ROM A, the partial-product values to form v are stored in the memory portion ROM B, and the partial-product values to form y are stored in the memory portion ROM C. A scaling factor of -1/2 is included in each partial-product.
The four words that are stored in memory portion ROM A for the partial-products that form u.sub.n are:
The four words stored in memory portion ROM B for the partial-products that form v.sub.n are:
The four words stored in the memory portion ROM C for the partial-products that form y.sub.n are:
The corresponding words for each partial-product of u.sub.n, v.sub.n, y.sub.n have the same address. Consequently, the corresponding partial-product values are read out when a single address is applied to the memory. In the example provided above, the words (5), (9), and (13) have the same address. The words (6), (10), and (14) also have the same address, and so forth.
Ideally, the three corresponding partial-products simply form a single word at a single location of the memory, so that the divisions of ROM A, ROM B, and ROM C are purely conceptual. In the example shown, there are four words stored in the memory, each consisting of the three partial-products. Each partial-product portion of the addressed stored word is read out onto its own memory output lines 111, 113, 115. The partial products of y.sub.n are placed on the output 111. The partial products of u.sub.n are placed on the output 113, while the partial products of v.sub.n are placed on the output 115. In the example shown, each partial-product consists of 16 bits. Therefore, a 3.times.16=48-bit word is stored at each address of the ROM. Thus, the total memory requirement is 4.times.48=192 bits.
A 16-bit partial-product is produced on each 16-bit memory output line 111, 113, 115 each bit period, for each bit of the input signal sample word x.sub.n. A connecting or adding mechanism 121, 123, 125 comprising a summer 131, 133, 135, a shift/delay register 141, 143, 145, and an initial-condition register 151, 153, 155 is connected to each memory output 111, 113, 115 to generate the intermediate results u.sub.n and v.sub.n and the final product y.sub.n for each sample word x.sub.n of the input signal.
Each partial-product output is applied on a 16-bit parallel line 111, 113, 115 to a summer 131, 133, 135. In the summer the partial-product is added to or subtracted from the contents of the initial condition register 151, 53, 155 during the first bit clock time, when the least significant bit of x.sub.n is received. During the remaining clock times, the partial product output is added to or subtracted from a delayed and bit-shifted prior output for that partial-product output. The state of the Add/Subtract (A/S) line 157 controlling the summers determines whether the partial-product memory outputs are added or subtracted in the summer 131, 133, 135. The Add/Subtract signal is the output of a third exclusive-OR gate 159 having as its inputs the input signal x.sub.n and a timing signal T.sub.s. The timing signal is a pulse having a value 1 when the sign bit of the sample x.sub.n is being received, and is otherwise at a 0 level. When the signal on the Add/Subtract line 157 is 0, the summer is instructed to ado the partial-product emory output, while if the A/S signal is 1, the summer is instructed to subtract the partial-product memory output.
Each summed partial-product output from the summers 31, 133, 135 is bit-shifted one bit space and delayed one bit period in a delay/shift unit 141, 143, 145 and added to the partial-product memory output to form the aggregate of sums and thus form the intermediate results u.sub.n and v.sub.n, and the final result y.sub.n for the input sample word x.sub.n. As there are N bits in each input signal word x.sub.n, each bit period is (1/N)th the word or sample period. The bit shift is to the right in the present example, as each successive memory output corresponds to the next-most significant bit of the input signal sample x.sub.n and of the recirculated intermediate results u.sub.n and v.sub.n generated during the immediately preceding sample time.
To provide the initial conditions for when the first, least-significant bit of each input sample x.sub.n appears on the input line, an initial-condition register 151, 153, 155 stores the initial-condition partial-product values -1/2(a.sub.0 +d.sub.1 +d.sub.2) for y, -1/2(a.sub.1 +b.sub.1 +c.sub.1) for u, and -1/2(a.sub.2 +c.sub.2 +b.sub.2) for v. A switch causes the initial conditions for the products y.sub.n, u.sub.n, and v.sub.n, to be input to the summers 131, 133, 135. After the initial condition partial-product has been applied to the summers, the switches are returned to the state in which the delayed and bit-shifted partial-products output from the delay/shift units 141, 143, 145 are applied to their respective summers 131, 133, 135.
The final product output y.sub.n is applied to th system output 167, where it may appear delayed one word period because of processing time.
The intermediate results u.sub.n and v.sub.n are output from the adders 123, 125 and input to parallel-to-serial shift registers 163, 165 that also complete the one word or sample of the intermediate results u.sub.n and v.sub.n. The resulting delayed partial product is then applied serially to the exclusive-OR gates 105, 107 of the addresser 103 along with the next input signal word during the subsequent sample period to address the memory 109.
The device of FIG. 3 is shown in simplified form in FIG. 4, in which the single ROM 109 is addressed by one-bit signal lines. Each signal is represented by its more general symbol X, U, V, or Y. Again, the ROM 109 stores four words, each having 48 bits, to provide three 16-bit partial-products for the formation of the intermediate results U and V, and the final result Y. The three streams of serial data X, U, V are used to address the ROM, although the addressing circuitry itself is not shown. Three 16-bit output lines provide one line for each partial-product. One output bus 111 is for the partial-product for the output Y. The second output bus 113 is for the partial-product for the intermediate product U, and the third output bus 115 is for the partial-product for the intermediate result V. The partial-products output from the memory are summed and converted to serial data in the adders or summers 121, 123, 125 and parallel-to-serial shift registers 161, 163, 165.
The first summer 121 sums the partial-products output on the first memory output 111 to form each word of the final product Y. The second summer 123 combines the partial products on the second memory output 113 to form each word of the intermediate result U. The third summer 125 combines the partial-products on the third memory output 115 to form each word of the intermediate result V.
Each of the summers 121, 123, 125 shown in FIG. 4 incorporates the summer 131, 133, 135, shift/delay register 141, 143, 145, and initial condition register 151, 153, 155 shown in FIG. 3 for generating the aggregate sum for its associated partial-product. The parallel-to-serial registers 163, 165 correspond to the parallel-to-serial register shown in FIG. 3. The serialized and one-sample-time delayed intermediate products U and V are recursively applied to the memory addressing. The serialization of the filter output Y in the parallel-to-serial register 161 is optional.
Because the processor shown in FIGS. 3 and 4 operates on the input signal only one bit at a time, 16 clock cycles are required to perform the filtering function for each 16-bit input sample x.sub.n of the input signal X. To reduce or eliminate the delays caused by such bit-serial processing, parallel processing of the data bits can be employed in the filter structure incorporating the invention.
As mentioned above, distributed arithmetic is a bit-serial computational operation that forms the inner (dot) products in a single direct step. If the number of elements in each vector is commensurate with the number of bits in each vector element, the time required to input Q Q-bit words one at a time in parallel fashion is the same as the time required to process each of the Q words serially on Q parallel wires.
FIG. 5 illustrates an arrangement in which the speed of the processor may be increased by a factor of four by using the data four bits at a time. The input signal X, consisting of 16 bits per sample, and the intermediate products U and V are each applied four bits at a time to address the ROM 170. Because the input signals on the three input lines each consist of four bits, the memory required in the ROM is 1/2.times.2.sup.(3.times.4) =2048 words. As before, each stored word is 48 bits, comprising the three partial-products of 16 bits each necessary to form the final product Y and the intermediate products U and V. Thus, the total memory requirement is 98,304 bits. The tradeoff for this increased memory requirement is that the processing time has been reduced by a factor of four, to four clock periods per sample.
The ROM 170 outputs four partial products during each sample interval for each of the intermediate results U and V and the final result Y. The partial products that form each result Y, U, V are combined in the summers 171, 173, 175 into 16-bit products Y, U, and V. Each 16-bit product is then converted to four 4-bit segments in a parallel-to-serial register 176, 177, 178.
A further reduction in the processing time can be achieved with the filter structure embodiment shown in FIG. 6. The input signal X is carried on a line 16 bits wide, for 16-bit parallel processing. The 16-bit input signal X can be split into four separate signals, each four bits wide, to address four identical ROMs 170. Each ROM is identical to the ROM of the filter structure of FIG. 5 and produces 16-bit partial-product outputs to form the products U, V, and Y.
Each of the 16-bit partial-product outputs from each of the ROMs is input to a separate one of three summers 181, 183, 185. Each summer combines the aggregate partial-products from the four separate memories 170 to obtain a single system product. As illustrated, each system product also consists of a 16-bit word.
A first summer 181 sums the partial products &rom each of the four memories that form the output Y to produce the system product output Y. A second summer 183 sums the partial products that form the intermediate result U from the four memories to produce a 16-bit second product U, and a third summer 185 adds the partial products that form the intermediate result V from the four memories.
The summers also delay the product signals one input signal sample period. Each of the second and third products U and V are split into four-bit segments, and used to address the memory in the manner described in connection with the structure of FIG. 5. Thus, the structure shown in FIG. 6 processes the filter function for a 16-bit input signal X in one clock period.
Because the system shown in FIG. 6 and described above requires each of the four ROMs 170 to contain 98,304 bits of storage, which may be more than conveniently available to a person constructing the system, an alternative embodiment shown in FIG. 7 only requires memories of 1536 bits, yet still performs the filter function on a 16-bit input signal in one clock period.
Eight ROMs 190 are connected in parallel, each addressed by a separate two-bit segment of the input signal X, and separate two-bit segments of each of the products U and V. Thus, 16 bits of the input signal X are still processed in parallel. Based on the address provided by the 2-bit segments of each of the input signal X and the products U and V, each ROM outputs 16-bit partial products to form U, V, and Y. With the three 2-bit inputs, each memory 190 has a storage capacity of
As before, each stored word is 48 bits long, consisting of the three 16-bit partial-product portions. Therefore, each of the eight ROMs has a total capacity of 1536 bits. Three adder arrays 191, 193, 195 are arranged in parallel, each of which computes the products U, V, and Y from the partial-product portions from each memory. The first adder array 191 takes the Y partial-product output from each of the eight ROMs for summation into the single 16-bit system output Y. Similarly, the second array adder 193 takes the U partial-product output from each of the eight parallel ROMs to construct the system intermediate product U, and the third array adder 195 takes the V partial-product output from each of the ROMs to produce the system intermediate product V.
Following a one-clock-period (sample time) delay, each of the second and third system intermediate products U and V is split into eight two-bit segments. Each segment is used to address one of the eight ROMs 190.
The total memory for the system structure shown in FIG. 7 is 12,288 bits, which is substantially less than that required for each of the structures shown in FIGS. 5 and 6. The three adders 191, 193, 195 are each of the complexity of a 16-bit modified-Booth multiplier. Thus, the system of FIG. 7 reduces the memory size from the structures of FIGS. 5 or 6 at the expense of complicating the adders, although such adder arrays are known and widely used in the art without substantial difficulties, and in many environments, such a tradeoff yields substantial benefits.
In all of the embodiments shown in FIGS. 3-7, an error cancellation feedback loop may be incorporated in the adders to further reduce quantization noise effects, as taught by T. L. Chang and S. A. White in "An Error Cancellation Digital Filter Structure and It's Distributed Arithmetic Implementation", IEEE Trans. on Circuits and Systems, Vol. CAS-32 No. 4, Apr. 24, 1981, pages 352-55.
Each of the shift-and-add operations of the shift/delay unit and summer of the filter apparatus such as shown in FIG. 3 drops out a least-significant-bit on each shift operation. The collection of such bits is the round-off error. Thus, if those bits can be saved, the true round-off error is available for error correction to further improve the performance of the filter.
The error associated with the formation of the product U may be designated e.sub.1, and the error associated with the formation of the product V may be designated e.sub.2. Error feedback can then be used to minimize the error propagation.
Referring to FIG. 8, the normal-form biquadratic digital filter shown in FIG. 1 is reproduced with the addition of error feedback/correction 201 as shown within the dashed perimeter. Following the open-loop propagation of the errors e.sub.1 and e.sub.2 to the points designated A and B, and to the system output Y, the noise is:
The values having tildes (b.sub.1, c.sub.1, c.sub.2, d.sub.1, d.sub.2) are approximations designed to minimize the noise propagation with a minimum of arithmetic. Those approximations may be defined as follows:
The subscript "RNI" signifies that the value is rounded to the nearest integer.
Thus, the round-off errors e.sub.1 and e.sub.2 generated while forming the products U and V, respectively, during one sample time are used during the next sample time to approximately correct for the noise due to the round-off error during that next sample time.
The filter with such error correction may be implemented as shown in FIG. 9. The filter of FIG. 9 is the same as the filter of FIG. 3, with the addition of the error correction mechanization. Each adding mechanism 121, 123, 125 includes an error correction mechanism for adding a correction to the first partial product output from the memory 109 on each of the memory outputs 111, 113, 115. The corrections are based on error estimates e.sub.1 and e.sub.2 generated in the second and third adders 123, 125 that form the internal results u.sub.n and v.sub.n.
In the illustrated embodiment, the first error signal e.sub.1, which is the error generated during the combination of the second partial products to form the intermediate results u.sub.n, is multiplied by three corrective factors, -b.sub.1, -c.sub.2, and -d.sub.1 to create three correction signals. The second error signal e.sub.2, which is the error generated during the combination of the partial products to form the intermediate result v.sub.n, is multiplied by three other correction factors, -c.sub.1, -b.sub.2, and -d.sub.2 to create three additional correction signals. In implementation, the correction gain value multipliers b.sub.1, b.sub.2, c.sub.1, c.sub.2, d.sub.1, and d.sub.2 are at most a bit-shift, and thus are readily implemented.
The outputs of the first correction multiplier 211 for the first error e.sub.1 and the first correction multiplier 214 for the second error e.sub.2 become the correction for the adder 123 generating the intermediate product u.sub.n. The outputs of the second correction multiplier 212 for the first error e.sub.l and the second correction multiplier 215 for the second error e.sub.2 become the correction for the adder 125 generating the intermediate product v.sub.n. The outputs of the third correction multiplier 213 for the first error e.sub.1 and the third correction multiplier 216 for the second error e.sub.2 become the correction for the adder 121 generating the filter output y.sub.n.
In the preferred form illustrated, the adders 121, 123, 125 simultaneously add the initial conditions from the initial condition registers 151, 153, 155 and the correction signals to the partial products read out from the memory 109. This is accomplished in each adder 121, 123, 125 by adding in a secondary summer 221, 223, 225 the contents of the initial condition register 151, 153, 155 to the corrections output by the multipliers 211-216. The combined result is stored in a serial-to-parallel register 217, 219, 221. The correction signals and the initial conditions are combined and stored, in the serial-to-parallel registers 217, 219, 221 during one sample time or period, as the second and third adders 123, 125 generate the first and second error signals e.sub.1, e.sub.2. Then, as the least-significant-bit of the x.sub.n of the next sample time addresses the memory 109, the contents of each register 217, 219, 221 is added to the first partial product output on each of the lines 111, 113, 115.
If the error-correction mechanism shown within the dashed lines of FIG. 9 is redefined as an adder and a parallel-to-serial register, then the structure of the filter of FIG. 4 can be used to also provide error correction. If the adders fed by the initial conditions are L bit-at-a-time (such as 4 or 16) adders, then the error correction mechanism shown in FIG. 9 can be generalized for the filter structures shown in FIGS. 5-7.