Generic Droop Correction IIR Filter Design Algorithm

Generic Droop Correction IIR Filter Design Algorithm

Generic Droop Correction IIR Filter Design Algorithm Sumit Adhikari, Florian Schupfer and Christoph Grimm Institute of Computer Technology, Faculty of...

204KB Sizes 27 Downloads 208 Views

Generic Droop Correction IIR Filter Design Algorithm Sumit Adhikari, Florian Schupfer and Christoph Grimm Institute of Computer Technology, Faculty of Electrical Engineering, Vienna University of Technology, Gusshausstrasse 27-29/E384, 1040 Vienna, Austria (e-mail: {adhikari,schupfer,grimm}@ict.tuwien.ac.). Abstract: Cascaded Integrated Comb (CIC) or Multiplier-less Hogenauer structure for multirate signal processing has uncontrollable frequency response. State-of-Art (SOA) solution to achieve controllable frequency response is to cascade the Hogenauer filter with a droop-correction Finite Impulse Response (FIR) filter. Although FIR filters are linear phase and inherently stable, Infinite Impulse Response (IIR) filters provide excellent frequency response with the cost of less memory and hence less area and less current consumption, which have never been explored in the context of droop correction. This article introduces a novel algorithm which generates IIR structures to correct droop imposed by Hogenauer structures, which also can be used to save area and power with a better transition and stop-band response in comparison to the equivalent FIR filter. Furthermore, this algorithm can be assimilated as a part of existing algorithm design tool, like MATLAB or SciLab. Keywords: IIR Filter Design, Droop Correction Filter, Filter Design Algorithm, Power and Area Reduction. 1. INTRODUCTION

INTEGRATOR X(z)

With the introduction of Cascaded Integrated Comb (CIC) Structures by Hogenauer (1980); Hogenauer (1981), the usage of the cheaper solution of CIC took a flight due to its multiplier-less implementation, less number of taps and hence less area and power. Hogenauer CIC decimation structures are given by the transfer function, 

DIFFERENTIATOR ↓R

z −1

+ +

+-

DOWN SAMPLER

Y(z)

z −1

Fig. 1. A First Order CIC

Fig. 2. Passband Response of a 3rd order 1024 DownSampling CIC

The problem associated with Hogenauer’s proposal is the low-pass response introduced by N-number of integrators and the pole-zero compensation by N-number differentiator is them being coefficient-less. Because of implementation of H(z) in Equation 1 is multiplier-less, H(z) cannot

be arbitrated. The problem can be well understood by the Figure 2. In Figure 2, the plot in colour blue is the frequency response of the Equation 1 with R = 1024, M = 1 and N = 3. Plot in green is the proposed system output response. The Hogenauer filter has a gradual decay

Normalized Gain (dB)

N 1 − z −RM (1) 1 − z −1 where, R is the CIC down-sampling rate, M the is differential delay and N is the order of the integrator. Equation 1 uses N number of differentiators to compensate the poles introduced at zero frequency by N-number of integrators, which has been used in order to impose a low-pass response to the system which prevents aliasing during rate change (up/down sampling). This is the cheapest available solution till date for such requirements in comparison to poly-phase down-sampler which requires high number of coefficients and corresponding multiplier. The discrete time model of a first order CIC has been shown in Figure 1 with a delayed integrator. In this case N = 1 and M = 1. But, the controllability of a poly phase rate changer is good in terms of it’s transition band and stop band. H(z) =

0 −2 −4 −6 −8 −10 −12 0

100

200

300

400

500

Frequency (Hz)

throughout the pass-band and there is approximately 4dB loss in signal amplitude at 300Hz which is the band-edge (3dB cut-off) for the pass-band. This problem is called droop. Further observation says that the transition-band is also dependent on R and N selection whereas the need for the output response is different. The transition-band problem has been partially addressed by Jovanovic-Dolecek and Mitra (2005) by using Sharpened CIC. For similar reason, the stop-band attenuation is on the virtue of Equation 1. The State of Art (SOA) solution to tackle this problem is to modify H(z) to G(z) such that, G(z) = H(z)F (z) (2) in which G(z) is the proposed system response. In that case the newly introduced transfer function F (z) is called the correction filter or droop correction filter. The SOA solution for realization of F (z) is, N −1  bk z −k (3) F (z) = k=0

i.e., F (z) is finite impulse response. The choice of FIR filters in many systems like audio and/or image applications are mainly due to the reason that FIR filters are linear phase in nature and does not distort phase of the input signal. In case of industrial applications like energy metering, IIR can be used with less memory, better transition-band and stop-band performances. Less memory also implies less current consumption owing to the equation, ⎞ ⎛ Np  i = γNp · Bw · Fclk = γ ⎝ Bi ⎠ · Fclk (4) i=1

Where Bw is the bit-width of each memory (or Bi is the bit-width of the ith memory), Fclk is the frequency of operation, Np is the number of coefficient of the filter and γ is a constant of proportionality. imin is achieved when Np (and/or {Bi }) is minimized. With these advantages of designing IIR-droop correction it was inevitable to have IIR-droop correction filters to be designed. But in reality, the droop-correction architectures which has been explored and used were FIR only. Descriptions of such FIR filters are given by Grati et al. (2001) and Zanjani et al. (2006); Mortazavi Zanjani et al. (2005). In this article, we propose a novel algorithm which leads us to generate IIR structures suitable to correct droops generated by multi-rates. The algorithm is simple, readily usable and can be implemented easily. This article only says about filter algorithm and a straight forward implementation for comparison purpose but does not says anything about corresponding filter architecture. Also, this work should be viewed as engineering novelty and not to be confused with scientific innovation. In our upcoming sections we first give the description of the algorithm, establish the algorithm by demonstrating results with a straight forward implementation and then conclude our work. 2. INTRODUCTION TO THE PROPOSED ALGORITHM Our approach to the problem relies on the first assumption which states that, there exists an inverse of the transfer function of Equation 1, say Γ(z), such that,



1 (5) H(z) and Γ(z) is defined within the down-sampled base-band. Or in other words Γ(z) has purely single-rate Nyquist response. Note, although H(z) is a linear phase FIR, Γ(z) is IIR. At this point we are only interested in the response of Γ(z) and stability of Γ(z) is not our current concern. Γ(z) =

Secondly, we assume that it is possible to design a IIR filter with transfer function, ⎤ ⎡ N −1  ⎢ bi z −i ⎥ ⎥ ⎢ ⎥ ⎢ i=0 (6) Λ(z) = ⎢ ⎥ M −1 ⎥ ⎢  ⎣a + −k ⎦ a z 0

k

k=1

such that, Λ(z) approximates the desired system response, the system transfer function can be written as, Θ(z) = H(z)Γ(z)Λ(z) (7) where, ideally H(z)Γ(z) = I(z), where I(z) is an all pass filter, and we can say the system transfer function Θ(z) is desired (Λ(z)). It would be interesting to ask why Equation 7 has been resolved into a cascade of two equation. This is because with single stringent specifications it will be difficult to stabilize the yulewalk algorithm Friedlander and Porat (1984) which has been used here and hence dividing them into a cascade of IIR structures reduces this algorithmic complexity. In order Equation 7 to be true, we will have to find out, Ω(z) = Γ(z)Λ(z) (8) Again, if Γ(z) is stable and Λ(z) is stable then stability of Ω(z) is guaranteed, which in turn guarantees the stability of Θ(z) as H(z) is FIR and hence inherently stable. Upcoming subsections gives an account of how to find out Γ(z), Λ(z) and Θ(z). 2.1 Finding out Inverse Transfer Function - Γ(z) This Subsection is the heart of the article. The problem for this Subsection is to find out the compensating response within the base-band described by the Equation 1. In order to achieve that, we perform following steps, (1) Compute the transfer function described by Equation 1, within the base-band of the system to obtain a set of data say {ξ}. (2) Normalize {ξ} considering that there is no d.c. gain (divide the array with d.c. gain) to obtain say {λ}. (3) Take inverse of {λ} to obtain say {ζ}. (4) Set ζ(i) to zero if the corresponding frequency exceeds the cut-off frequency FC . (5) Using {ζ} as referential data points, compute an IIR filter through yulewalk algorithm. This is Γ(z) For finer detail Algorithm 1 can be referred. Figure 3 is the 5th order IIR filter response obtained in such a way which compensates the droop of a 3rd order CIC with 1024 down-sample ratio. The baseband sampling frequency in this context is 1024Hz. This is an inexpensive step and usually the compensating response filter can be obtained through less number of coefficients. The smoothness of {ζ} ensures the need of less memory for a filter to be computed.

Let us consider specification of a proposed system transfer function defined by Table 1, which is a tight and stringent specification adopted here mainly to show the striking differences with an equivalent FIR filter which will be showed later. Figure 4 is a 10th order elliptic IIR response meeting the specification described by Table 1. This is Λ(z) as described by Equation 6 and is our target system transfer function. This step decides about the number of memory associated with the proposed droop correction filter.

Gain (dB)

4 3 2 1 0 0

100

200

300

400

0

500

−20

Algorithm 1 Γ(z) Computation Algorithm 1: function Gamma(FS , R, N, M, FC , T )  FS = Sampling Frequency, R = Down-sampling Ratio, N = Order of CIC, M = Differential delay, FC = Baseband Cut-Off Frequency and T = Order of the requested compensating IIR FS 2: P ← 2R 1 3: ΔP ← FS 4: Facc ← 0 5: for i ← 1, P do 6: Facc ← Facc + ΔP 7: f (i) ← Facc   1.0 − exp [2πjf (i)RM ]N     8: H(i) ←     1.0 − exp [2πjf (i)] √ where j= −1 H(i) 9: H(i) ← H(1) 1 10: G(i) ← H(i) 11: if f (i) < FC then 12: A(i) ← G(i) 13: else 14: A(i) ← 0 15: end if 16: end for 1 1 P 17: fD ← : : P P P 18: [b, a] ← yulewalk(T, fD , A) 19: return [b, a] 20: end function The passband attenuation generally gets affected for lower order of IIR filters and the impact is rather small with respect to the order of the filter. Table 1. System Response Specification Specification Baseband Sampling Frequency Passband Edge (3dB cut-off) Passband Ripple Stopband Frequency Stopband Attenuation

Value 1024Hz 300Hz 0.1dB 325Hz 80dB

−40 −60 −80 −100 −120 −140

0

100

200

300

400

500

Frequency (Hz) Fig. 4. Target IIR System Response - Λ(z) 2.2 IIR Droop Correction Filter Transfer Function - Ω(z)

0 −20 Gain (dB)

Fig. 3. Γ(z) - Compensation Response of CIC

Gain (dB)

Frequency (Hz)

−40 −60 −80 −100 −120 −140

0

100

200

300

400

500

Frequency (Hz) Fig. 5. Desired IIR Droop Correction - Ω(z) This Subsection deals with the designing of droop correction IIR proposed in this article. This is achieved by cascading Γ(z) and Λ(z) as proposed in Equation 8. Figure 5 shows the final IIR droop correction filter. The filter characterized by the transfer function of Figure 5 has only 30 taps. Figure 6 shows the pass band response and ripples in greater detail. The stability analysis of Ω(z) has been shown by the pole zero plot in Figure 7. All poles are clearly within the unit circle and hence the system is stable. This section dealt with designing of an IIR droop correction which met our requirement resulting to a stable filter with less number of memories needed (30 taps). Figure 8 is the same filter for an arbitrary bandpass system response.

0

2.5

−10

2

−20

1.5

−30

Magnitude (dB)

Gain (dB)

Magnitude Response (dB)

3

1 0.5

−40 −50 −60

0

−70

0

50

100

150

200

250

−80

300

−90

Frequency (Hz)

0

Fig. 6. Desired IIR Droop Correction Response with PassBand Zoomed

50

100

150

200

250 300 Frequency (Hz)

350

400

450

500

Fig. 9. Equivalent FIR Response Table 2. Performance Comparison Table

Transm ission zeros and poles 1.5

Measurable Number of Taps Area for Implementation Current Consumption Implementation Effort Phase Distortion Settling Time Stability Limit Cycle Oscillation

Zeros Poles 1.0

Im aginary axis

0.5

0.0

FIR 151 5X 5X Low No Low Not Applicable Not Applicable

IIR 30 X X High Yes High Yes Not Observed

-0.5

-1.0

-1.5 -2.0

-1.5

-1.0

-0.5

0.0 Real axis

0.5

1.0

1.5

2.0

Fig. 7. Stability Analysis 0 Gain (dB)

−20 −40

towards 5 times more current consumption and 5 times more area requirement for the equivalent FIR in comparison to designed IIR. A dirty and fast try to implement them showed us that FIR implementation effort is low but the IIR design implementation effort is high. The lack of phase linearity for the IIR filter prevents it to be used in many applications like audio. But, it can be used safely and efficiently in many industrial applications like in energy measurement as shown by Adhikari et al. (2011). Many other instrumentation applications will be highly suitable for usage of the proposed filter. 4. CONCLUSION

−60 −80 −100 −120 −140 0

100

200

300

400

500

Frequency (Hz) Fig. 8. IIR Droop Correction for a Band-Pass Response 3. QUALITY OF RESULT - COMPARISON WITH EQUIVALENT FIR This Section compares the result with a standard equivalent FIR. Figure 9 shows an equivalent FIR (equivalent to Ω(z) in terms of transfer function). Figure 9 shows the transfer function plot of a droop correction FIR obtained through MATLAB filterbuilder toolbox. The results have been summarized in Table 2. The equivalent FIR needs 5 times more memory than the designed IIR. This points

In this article we have discussed the lack of droop correction IIR filters which are suitable to be used in cascade with Hogeneur class of multi-rate filters. We proposed the suitability of using an IIR filter which can be use as a droop corrector. We proposed a detailed algorithm in Section 2 to show how it can be designed. A complete set of mathematical equations have been provided for a better understanding. A systematic step-by-step frequency response design method and corresponding results has been provided. Section 2 led to a stable droop correction IIR filter algorithm extraction. Section 3 compared obtained results with an equivalent FIR filter. The results showed that the proposed IIR filter saves 5X area and 5X current at the cost of implementation effort and phase linearity. Proposed filter has a wide area of application like industrial and instrumentation. Algorithm 1 has also been provided so that interested users can implement them. It shows that the algorithm can be easily implemented using algorithm design tool like MATLAB or SciLab. Furthermore, this algorithm can be made a part of the existing filter design toolboxes provided by MATLAB and SciLab.

Future work in this context will be the efficient implementation of the proposed algorithm into an architecture which might lead to area and/or power saving in comparison to existing architectures. ACKNOWLEDGEMENT This work has been has been funded by the Vienna Science and Technology Fund (WWTF) through project ICT08012. REFERENCES Adhikari, S., Zaidi, Y., and Grimm, C. (2011). Architectural mitigation for high performance energy measurement. In Circuit Theory and Design (ECCTD), 2011 20th European Conference on, 202–205. IEEE. Friedlander, B. and Porat, B. (1984). The Modified Yule-Walker Method of ARMA Spectral Estimation. Aerospace and Electronic Systems, IEEE Transactions on, AES-20(2), 158 –173. doi: 10.1109/TAES.1984.310437. Grati, K., Ghazel, A., Naviner, L., and Moatamri, F. (2001). Design and Implementation of Cascade Decimation Filter for Radio Communications. In Electronics, Circuits and Systems, 2001. ICECS 2001. The 8th IEEE International Conference on, volume 3, 1603 – 1606 vol.3. doi:10.1109/ICECS.2001.957524. Hogenauer, E. (1980). A Class of Digital Filters for Decimation and Interpolation. In Acoustics, Speech, and Signal Processing, IEEE International Conference on ICASSP ’80., volume 5, 271–274. doi: 10.1109/ICASSP.1980.1170846. Hogenauer, E. (1981). An Economical Class of Digital Filters for Decimation and Interpolation. Acoustics, Speech and Signal Processing, IEEE Transactions on, 29(2), 155–162. doi:10.1109/TASSP.1981.1163535. Jovanovic-Dolecek, G. and Mitra, S. (2005). A New TwoStage Sharpened comb Decimator. Circuits and Systems I: Regular Papers, IEEE Transactions on, 52(7), 1414– 1420. doi:10.1109/TCSI.2005.851390. Mortazavi Zanjani, S., Fakhraie, S., and Shoaei, O. (2005). A Comparative Study and Design of Decimation Filter for High-Precision Audio Data Converters. In Microelectronics, 2005. ICM 2005. The 17th International Conference on, 139 – 143. doi:10.1109/ICM.2005.1590055. Zanjani, S., Omam, S., Fakhraie, S., and Shoaei, O. (2006). Algorithmic Design of High-Precision LowPower Multi-Stage Decimation Filters. In Circuits and Systems, 2006. MWSCAS ’06. 49th IEEE International Midwest Symposium on, volume 2, 184 –187. doi: 10.1109/MWSCAS.2006.382240.