Home > Articles > Software Development & Management > Architecture and Design

  • Print
  • + Share This
This chapter is from the book

11.4 Hogenauer Filter

The CIC filter is used in both up sampling and down sampling applications. The CIC contains two subfilters, the comb and the integrator, which can be applied in either order. If the filter is applied to an up-sampling task, the comb filter is placed at the input to the CIC filter. On the other hand, if the CIC is applied to a down-sampling task, the comb filter is placed at the output of the CIC filter. This ordering is established to permit the application of the noble identity and thus enable the reordering of the resampling switch and the comb filter. This reordering is illustrated in Figure 11.13 for the two cases of up sampling and of down sampling. Note that the comb filter becomes a differentiator at the low data rate after it is reordered with the resampling switch. When the CIC absorbs the resampling switch the filter structure is known as a Hogenauer filter. Remember that when ordering the three components in a resampling mode, the integrator always operates at the higher of the two rates, the differentiator operates at the lower rate, and the resampler resides between the pair.

11fig14.gifFigure 11.13 Order and Reordering of Resampling Switch and Subfilters of CIC Filter for Up Sampling and for Down Sampling

A CIC filter with any number of stages can be similarly converted to a Hogenauer filter by first ordering all the integrators on one side of the filter and the comb filters on the other side, then applying the noble identity to interchange the resampling switch and the multiple comb filters. This reordering for a three-stage down-sampling CIC filter is shown in Figure 11.14. The up-sampling version of this same process is similar except that the derivatives are at the input and the integrators are at the output.

11fig15.gifFigure 11.14 Down-sampled Three-stage CIC Filter, Rearranged and Converted to a Hogenauer Filter

11.4.1 Accumulator Bit Width

We observed earlier that in spite of overflowing accumulators the composite CIC filter would compute correct filter outputs provided the additions were performed with 2's-complement arithmetic and provided the bit field width of the accumulator exceeded the word width required by the output sequence. The required bit width is the number of bits in the input data words plus the number of bits required to accommodate the maximum filter gain. This is shown in (11.17). The gain of a K-stage filter with length-M comb filters is the product of the DC gains of each prototype boxcar filter as shown in (11.18). Substituting (11.18) in (11.17) we determine the bit width required of the CIC accumulators as indicated in (11.19).

Equation 11.17

11equ17.gif


Equation 11.18

11equ18.gif


Equation 11.19

11equ19.gif


As an example, suppose we have a 2-stage CIC with length-20 comb filters processing 7-bit input. The gain of the filter is 20*20 or 400 for which we require 9-bits to provide for the signal growth through the filter. The required accumulator width is 9-bits of growth added to the 7-bits of input data or 16 bits. Figure 11.15 presents the time series at the outputs of a CICs two 16-bit integrators and two comb filters. The input to the CIC is a cosine of amplitude 63 with period equal to 1,000 samples. Note the overflow of the second integrator and the recovery from the overflow by the two comb filters.

11fig16.gifFigure 11.15 Two-stage CIC Filter, 20-tap Comb, 16-bit Accumulator, 7-bit Input

For comparison with a properly operating CIC we examine the performance of an improperly operating filter. Figure 11.16 presents the time series from a similar two-stage CIC filter operating on the same input signal except that the accumulator bit width of this CIC filter is 15-bits. As in the previous example, the second accumulator overflows, and the two comb filters attempt to reverse the overflow. We observe that the output of the second comb filter has not successfully recovered from the overflow and that there is a residual overflow of a single bit at its output. When the input signal level is reduced by a factor of two, the filter successfully recovers from the internal overflow since the reduced input level results in a reduced output level supportable by the 15-bit accumulator width.

11fig17.gifFigure 11.16 Two-stage CIC Filter, 20-tap Comb, 15-bit Accumulator, 7-bit Input

11.4.2 Pruning Accumulator Width

In the previous section we identified the bit growth required in a CIC to successfully recover from internal accumulator overflow. The bit growth reflects the filter gain between input and output of the filter. In an up-sampling filter, this growth occurs in successive integrator stages, and the integrators at the beginning of the chain do not require the same bit width as does the final integrator. We can prune the most significant bits of accumulators to the level corresponding to the maximum gain of each integrator. In a down-sampling filter the growth appears immediately in the first integrator stage, and all subsequent integrators and comb filters must honor the most significant bit of the first integrator stage. Scaling applied at the output of the CIC to remove the filter processing gain discards the lower order bits of the CIC process. We can prune lower order bits early in the filtering chain to the bit position in any stage that cannot grow beyond the least significant bit of the output word. We now examine the two cases of most significant bit (MSB) pruning for up-sampling CIC filters and of least significant bit (LSB) pruning for down-sampling CIC filters.

11.4.2.1 Up-sampling CIC

Figure 11.17 is a block diagram of a 4-stage CIC up-sampling filter. The output of each integrator in the chain is identified and is available at the indicated tap points.

11fig18.gifFigure 11.17 Four-stage Up-sampling CIC Filter with Integrator Outputs Identified

The transfer functions from the input to each integrator output are identified in (11.20) . Here, at each position, the included integrators are coupled with a matching comb filter with the unmatched or excess comb filters listed separately as a preprocessor to the equivalent boxcar filters.

Equation 11.20

11equ20.gif


Figure 11.18 presents the impulse response from the input to the four integrator positions when there are 20 delays in each comb filter. Note the successively larger output levels at the outputs of the successive integrators.

11fig19.gifFigure 11.18 Impulse Responses at Integrators of Four-stage CIC Filter with 20-tap Comb

To determine the maximum signal gain from the input to yk(n) the output of integrator k we apply the input sequences xk(n) satisfying (11.21).

Equation 11.21

11equ21.gif


The sequences that maximize the output levels at each of the integrator stages are shown in Figure 11.19.

11fig20.jpgFigure 11.19 Input Sequences to Maximize Output from Integrators in Four-Stage CIC

The sequence that maximizes the output at a selected integrator lead to nonmaximum output levels at the remaining integrators. This can be seen in Table 11-4 which lists the maximum level obtained at each integrator for the four input sequences identified in Figure 11.19. The bold entries in the table correspond to the maximum level that integrator can exhibit for sequences that result in stable responses at the final output stage. Figure 11.20 presents the integrator responses for the input sequences shown in Figure 11.19 designed to maximize the amplitude response for the selected integrator.

11fig21.gifFigure 11.20 Integrator Responses for Input Sequence Selected to Maximize Output Level

Table 11-4. Maximum Integrator Response Levels for Sequences that Maximize Selected Integrator Response

 

Sequence Int-1

Sequence Int-2

Sequence Int-3

Sequence Int-4

Integrator 1

–160

109

80

40

Integrator 2

858

1068

640

267

Integrator 3

–6,821

9,848

10,680

5,340

Integrator 4

73,725

113,496

141,626

160,000

Each comb filter in the processing sequence, with one addition per stage, has a gain of 2 with a cumulative gain at the kth stage of 2k. The impulse weights of a comb filter cascade are the terms of Pascal's triangle with alternating signs. These terms are shown in Figure 11.21. To maximize the sum at the output of each comb filter, as we did for the integrators, we set the input sequence to the sign of the comb filter impulse response. To also probe the response of the integrator chain while probing the comb filters, we extend the samples for the M-sample interval between samples of the comb filter response. The probe signals to test both the comb and the integrator segments of the CIC are shown in Figure 11.22. We note that the successive sequences use the previous sequence as a prefix and simply add one more segment. Consequently, we will find that the sequence that maximizes the output for comb filter k also maximizes the output for comb filter k–1.

11fig22.gifFigure 11.21 Impulse Responses at Comb Filters of Four-stage CIC Filter with 20-tap Comb

11fig23.jpgFigure 11.22 Input Sequences to Maximize Output from Comb Filters in Four-stage CIC

Table 11-5 lists the maximum level obtained at each comb filter and at each integrator output for the four input sequences identified in Figure 11.21. The bold entries in the table correspond to the predicted maximum levels that comb filter can exhibit; we also see the peak values of the integrators obtained while maximizing the output of the comb filters. For ease of comparison, we also list from Table 11-4, the maximum values of the integrator outputs.

Table 11-5. Maximum Comb Response Levels for Sequences that Maximize Selected Comb Response

 

Sequence Comb-1

Sequence Comb-2

Sequence Comb-3

Sequence Comb-4

Maximum Level

Comb-1

2

2

2

2

2

Comb-2

3

4

4

4

4

Comb-3

6

7

8

8

8

Comb-4

10

14

15

16

16

Integrator-1

120

140

–160

160

160

Integrator-2

720

900

855

855

1068

Integrator-3

-8,020

6,821

–6,821

6,821

10,680

Integrator-4

73,710

73,725

73,725

73,725

160,000

The bit-width results determined from the two sets of probes applied to the up-sampling CIC filter of Figure 11.17 are tabulated in Table 11-6.

Table 11-6. Maximum Comb and Integrator Response and Required Bit Field Width

 

Maximum Gain

Growth Bits

Comb-1

2

1

Comb-2

4

2

Comb-3

8

3

Comb-4

16

4

Integrator-1

160

9

Integrator-2

1068

10

Integrator-3

10,680

14

Integrator-4

160,000

18

The bit growth per processing stage can be visualized by the graph of bit-field width shown in Figure 11.23. Each stripe in the graph indicates the number of bits entering and the number of bits leaving the indicated process. For the example just concluded we can see how the total of 18-bit growth from input to output is distributed between the comb filters and the integrators.

11fig24.jpgFigure 11.23 Graphs Showing Required Bit Field at Input and Output of Each Process in CIC

11.4.2.2 Down-Sampling CIC

Figure 11.24 is a block diagram of a 4-stage CIC down-sampling filter. Pruning of this process will by performed be discarding lower-order bits in each accumulator. The discarded bits will be treated as additive noise to each integrator. Our interest here is the noise gain from each integrator and from each comb filter to the output port. The input of each integrator in the chain is identified and is available at the indicated input points from which we will determine the noise gains.

11fig25.gifFigure 11.24 Four-stage Down-sampling CIC Filter with Integrator Inputs Identified

The transfer functions from the input of each integrator to the CIC output are identical to the transfer functions identified in (11.20) and repeated here as (11.22) to reflect the change of input and output variables. Here, at each position, the integrators included in the signal path are coupled with a matching comb filter, with the unmatched or excess comb filters listed separately as post processor to the equivalent boxcar filters.

Equation 11.22

11equ22.gif


Figure 11.25 presents the impulse response from the four-integrator input positions to the output when there are 20 delays in each comb filter. Note the successively reduced output levels at the output when there are a reduced number of integrators between the selected input and the CIC output.

11fig26.gifFigure 11.25 Impulse Responses from Integrators of 4-Stage CIC Filter with 20-Tap Comb

The noise power measured at the output due to noise inserted at the input to integrator k is shown in (11.23).

Equation 11.23

11equ23.gif


The standard deviation of the output noise due to the gain from each integrator is listed in Table 11-7. In a similar manner, noise inserted at the input to the comb filters can be formed using the comb filter impulse response. The comb filter impulse responses are the same as those shown in Figure 11.21. Table 11-7 shows the noise gain for each of the integrator and comb filter stages in the CIC.

Table 11-7. Noise Gain from Each CIC Stage to Output

 

SQRT(Noise Gain)

Noise Bit Growth

Integrator-1

24,785

14.6

Integrator-2

1,462.4

10.5

Integrator-3

146.3

7.2

Integrator-4

20

4.3

Comb-1

8.4

3.1

Comb-2

4.5

2.2

Comb-3

2.5

1.3

Comb-4

1.4

0.5

The total noise contributed to the output by the separate noise sources injected at each stage due to pruning the least significant bits (LSB) in each of the 2K filter segment is shown in (11.24).

Equation 11.24

11equ24.gif


It is reasonable to assign equal levels of noise contribution from each noise source. For this condition, the noise contributed by each source must satisfy (11.25).

Equation 11.25

11equ25.gif


The acceptable noise level that can be inserted at each noise source must account for the 1/2K of (11.25). Since the least significant bit level defines the additive noise level at each insertion point, we convert the 1/2K to bits as is done in (11.26).

Equation 11.26

11equ26.gif


Our 4-stage example, with 8-noise terms, requires the noise terms to drop an additional 3-bits for the overall noise to be below the specified output LSB. When we incorporate the additional attenuation of the scaled noise in our example, we obtain the parameters listed in Table 11-8.

Table 11-8. Bit Locations Below Output LSB for Register Pruning

 

Bits Below Output LSB

Integer Number of Bits

Integrator-1

14.6 + 3 = 17.6

18

Integrator-2

10.5 + 3 = 13.5

14

Integrator-3

7.2 + 3 = 10.2

11

Integrator-4

4.3 + 3 = 7.3

8

Comb-1

3.1 + 3 = 6.1

7

Comb-2

2.2 + 3 = 5.2

6

Comb-3

1.3 + 3 = 4.3

5

Comb-4

0.5 + 3 = 3.5

4

The LSB bit pruning per processing stage can be visualized by the graph of bit-field width shown in Figure 11.26. Each stripe in the graph indicates the number of bits entering and the number of bits leaving the indicated process. For the example just concluded we can see how the total of 18-bit growth occurring at the input stage permits the LSB pruning as we progress from input to output through the integrators and the comb filters.

11fig27.jpgFigure 11.26 Graph Showing Required Bit Field at Input and Output of Each Process in CIC

  • + Share This
  • 🔖 Save To Your Account