XIII International PhD Workshop OWD 2011, 22–25 October...

4
42 The research of the novel hardware oriented method of an 1-D IIR filters coefficients determination Maksym Oleksiv, Lviv Polytechnic National University (01.12.2008, PhD. Volodymyr Puyda, Lviv Polytechnic National University) Abstract The paper is devoted to the research of the novel hardware oriented method of an 1-D infinite impulse response filters (IIR) coefficients determination [1]. The method provides reduction of hardware IIR filters hardware components quantity, their complexity and connections between them. This provides an increase of IIR filters accuracy, reliability and performance. The research of the suggested method was carried out for a high-pass and low-pass IIR filters with 2-10 quantity of poles for normalized cutoff frequencies 0.05 and 0.5. The research showed, that for high-pass and low- pass filters it is guaranteed that all the significant coefficients can be stored in the filter’s coefficients buffer. Coefficients that are smaller, than the minimum value that can be stored in the filter’s coefficients buffer, are equal to 0. So, they can be excluded from filter structure during filter implementation. Besides, for low-pass filters all of the coefficients are positive values. So, there is no need to implement signed arithmetic in hardware IIR filter. Multiplication operation implementation of A[0] on x[n-p] in high-pass filter can be simplified using shift register instead of multiplication unit. The examples of designed hardware structures for 4 pole high-pass and low-pass IIR filters are shown. 1. Introduction Infinite impulse response filters are well known technology in digital signal processing. The mathematical model of IIR filter is [3]: , ] [ ] [ ] [ ] [ ] [ NP 1 p NP 0 p = = - + - = p n y p B p n x p A n y (1) where x[n] - input signal, y[n] - output signal, NP - quantity of filter’s poles, А[p] - feedforward coefficients, B[p] - feedback coefficients. These filters can be used as alternative to finite impulse response (FIR) filters. They are preferred when it is needed to make manipulations with a signal which is defined in frequency domain such as audio signal. The main advantages of IIR filters over FIR filters are: simplicity of implementation, low hardware cost and calculation speed. Besides, they do not need to use filtering windows in filtering process. But, unfortunately, they make distortions with signals that are defined in time or space domain. Nevertheless, sometimes they are used with signals that are defined in time or space domain when processing time is critical and distortions are not so critical. They are even used in image filtering [2]. One of the serious disadvantages of IIR filters over FIR filters is complexity of their coefficients determination. There are multiple methods of IIR filters coefficients determination. Some of them use Z-transform, some use S transform while others use iterative methods or some others. But majority of them are not hardware oriented. So, their use and accuracy in hardware filter design problem is limited. Especially, when IIR filter with coefficients that have small bit-length and uses fixed point arithmetic is designed. As it is shown, there is a problem of an effective hardware oriented IIR filter’s coefficients determination method. Suggested solution of the problem is “The method of digital infinite impulse response filters recursion coefficients determination” [1]. The method provides reduction of hardware IIR filters hardware components quantity, their complexity and connections between them. This provides an increase of IIR filters accuracy, reliability and performance. The coefficients are determined according to the features of the target implementation hardware. 2. The hardware oriented method of an 1-D IIR filters coefficients determination The iterative hardware oriented method of an 1- D IIR filters coefficients determination is performed in three steps [1]. Before execution, presetting of the IIR filter’s desired frequency response, of the maximum number of iterations and of all the XIII International PhD Workshop OWD 2011, 22–25 October 2011

Transcript of XIII International PhD Workshop OWD 2011, 22–25 October...

Page 1: XIII International PhD Workshop OWD 2011, 22–25 October 2011mechatronika.polsl.pl/owd/pdf2011/042.pdf · 2011. 10. 31. · XIII International PhD Workshop OWD 2011, 22–25 October

42

The research of the novel hardware oriented method of an

1-D IIR filters coefficients determination

Maksym Oleksiv, Lviv Polytechnic National University (01.12.2008, PhD. Volodymyr Puyda, Lviv Polytechnic National University)

Abstract

The paper is devoted to the research of the novel hardware oriented method of an 1-D infinite impulse response filters (IIR) coefficients determination [1]. The method provides reduction of hardware IIR filters hardware components quantity, their complexity and connections between them. This provides an increase of IIR filters accuracy, reliability and performance.

The research of the suggested method was carried out for a high-pass and low-pass IIR filters with 2-10 quantity of poles for normalized cutoff frequencies 0.05 and 0.5.

The research showed, that for high-pass and low-pass filters it is guaranteed that all the significant coefficients can be stored in the filter’s coefficients buffer. Coefficients that are smaller, than the minimum value that can be stored in the filter’s coefficients buffer, are equal to 0. So, they can be excluded from filter structure during filter implementation. Besides, for low-pass filters all of the coefficients are positive values. So, there is no need to implement signed arithmetic in hardware IIR filter. Multiplication operation implementation of A[0] on x[n-p] in high-pass filter can be simplified using shift register instead of multiplication unit.

The examples of designed hardware structures for 4 pole high-pass and low-pass IIR filters are shown.

1. Introduction

Infinite impulse response filters are well known technology in digital signal processing. The mathematical model of IIR filter is [3]:

,][][][][][NP

1p

NP

0p∑∑

==

−+−= pnypBpnxpAny (1)

where x[n] - input signal, y[n] - output signal, NP - quantity of filter’s poles, А[p] - feedforward coefficients, B[p] - feedback coefficients.

These filters can be used as alternative to finite impulse response (FIR) filters. They are preferred

when it is needed to make manipulations with a signal which is defined in frequency domain such as audio signal. The main advantages of IIR filters over FIR filters are: simplicity of implementation, low hardware cost and calculation speed. Besides, they do not need to use filtering windows in filtering process. But, unfortunately, they make distortions with signals that are defined in time or space domain. Nevertheless, sometimes they are used with signals that are defined in time or space domain when processing time is critical and distortions are not so critical. They are even used in image filtering [2].

One of the serious disadvantages of IIR filters over FIR filters is complexity of their coefficients determination. There are multiple methods of IIR filters coefficients determination. Some of them use Z-transform, some use S transform while others use iterative methods or some others. But majority of them are not hardware oriented. So, their use and accuracy in hardware filter design problem is limited. Especially, when IIR filter with coefficients that have small bit-length and uses fixed point arithmetic is designed.

As it is shown, there is a problem of an effective hardware oriented IIR filter’s coefficients determination method. Suggested solution of the problem is “The method of digital infinite impulse response filters recursion coefficients determination” [1]. The method provides reduction of hardware IIR filters hardware components quantity, their complexity and connections between them. This provides an increase of IIR filters accuracy, reliability and performance. The coefficients are determined according to the features of the target implementation hardware.

2. The hardware oriented method of

an 1-D IIR filters coefficients

determination

The iterative hardware oriented method of an 1-D IIR filters coefficients determination is performed in three steps [1]. Before execution, presetting of the IIR filter’s desired frequency response, of the maximum number of iterations and of all the

XIII International PhD Workshop OWD 2011, 22–25 October 2011

Page 2: XIII International PhD Workshop OWD 2011, 22–25 October 2011mechatronika.polsl.pl/owd/pdf2011/042.pdf · 2011. 10. 31. · XIII International PhD Workshop OWD 2011, 22–25 October

43

remaining parameters is performed. In the first step slopes for feedforward coefficients values are determined. In the second step slopes for feedback coefficients values are determined. The third step consists in: performing feedforward and feedback coefficients modification; determining the modified IIR filter’s impulse response; determining the modified IIR filter’s frequency response; determining the standard deviation between the current iteration and the expected pre-defined IIR filter’s frequency response; determining iteration step change; repeating the first step while maximum number of iterations is not reached; otherwise - completing the target filter’s coefficients determination process.

3. The research conditions and

means

The research of the suggested method was carried out for a high-pass and low-pass Butterworth IIR filters with 2-10 quantity of poles for normalized cutoff frequencies 0.05 and 0.5. The bigger quantity of poles can make filter unstable [2]. This is the reason why the research is limited by 10 poles. Normalized cutoff frequencies 0.05 and 0.5 reflect the behavior of the method for the coefficients determination for filter’s low and high cutoff frequencies. The interface of the software, which is designed for the research, is shown on the fig. 1.

Fig.1. The interface of the software, which is

designed for the research.

The research software was designed in MS Visual Studio 2005 using MFC library. Before IIR filter’s coefficients determination of iteration step initial number (s0), incrementation constant (d), filter type,

filter’s poles quantity, iterations quantity (i), signal points quantity (n) and minimum value that can be correctly stored in filter’s coefficients buffer (m) must be set. Unlike the others methods coefficients, that are less than m, are set to zero. The other coefficients are determined considering this. This provides an increase of hardware IIR filter’s accuracy. Also reduction of hardware IIR filters hardware components quantity, their complexity and connections between them is provided. Besides, if it is possible, coefficients that are determined are unsigned (positive) numbers or multiples of|2-k|.

After setting these parameters the desired frequency response is loaded. It is generated for preset quantity of signal points using mathematical model of Butterworth filter in Matlab:

20 )/)((1

1)(

DuDuF

+= , (2)

where D0 is the filter’s cutoff frequency’s point position, D(u) – distance from point with position u

to the center of the filter, Nu ,1= , N – quantity of

signal points. The cutoff frequency for Butterworth filter is the frequency where signal attenuation is equal to -3 dB. The quantity n of signal points that are used in coefficients determination process (fig. 1) is calculated as:

12/ −= Nn . (3) Then the computation can be started. During

computations the software provides information about mean square error and the iteration step size on each iteration.

The research was carried on PC with 2.9 GHz CPU under such conditions: quantity of iterations і = 20 000; the desired frequency response is determined by n = 257 points, d = 0.00001, s0 = 0.01, m = 0.00000000023, that is equal to 2-32. So, the filter’s coefficients buffer size is k = 32 bits per coefficient.

4. The research results

The research results for high-pass Butterworth 1-D IIR filters are shown in the Tab.1. The research results for low-pass Butterworth 1-D IIR filters are shown in the Tab.2.

For high-pass filters it is guaranteed that all the significant coefficients can be stored in the filter’s coefficients buffer. Coefficients that are smaller, than the minimum value that can be stored in the filter’s coefficients buffer, are equal to 0. So, they can be excluded from filter structure during filter implementation. Implementation of multiplication operation of feedforward coefficient A[0] on x[n-p] can be simplified using shift register instead of multiplication unit.

Page 3: XIII International PhD Workshop OWD 2011, 22–25 October 2011mechatronika.polsl.pl/owd/pdf2011/042.pdf · 2011. 10. 31. · XIII International PhD Workshop OWD 2011, 22–25 October

44

Tab.1.

The research results for high-pass filters

Normali-zed cutoff frequency

Quantity of poles

MSE (%)

Quantity of coeffi-cients that are equal to 0

All coeffi-cients are positive

Quantity of coeffi-cients that are multiples of|2-k|

0.05 2 2.0 0 no 1 0.5 2 0.55 0 no 1

0.05 4 0.8 0 no 1 0.5 4 0.24 0 no 1

0.05 6 0.02 0 no 1 0.5 6 0.18 0 no 1

0.05 8 0.01 0 no 1 0.5 8 0.17 0 no 1

0.05 10 0.01 0 no 1 0.5 10 0.16 0 no 1

Tab.2.

The research results for low-pass filters

Normali-zed cutoff frequency

Quantity of poles

MSE (%)

Quantity of coeffi-cients that are equal to 0

All coeffi-cients are positive

Quantity of coeffi-cients that are multiples of|2-k|

0.05 2 3.0 0 yes 0 0.5 2 10.9 0 yes 0

0.05 4 2.3 0 yes 0 0.5 4 9.3 3 yes 0

0.05 6 1.7 0 yes 0 0.5 6 8.9 3 yes 0

0.05 8 1.3 0 yes 0 0.5 8 8.3 6 yes 0

0.05 10 0.9 0 yes 0 0.5 10 8.2 7 yes 0 For low-pass filters it is guaranteed that all the

significant coefficients can be stored in the filter’s coefficients buffer. Coefficients that are smaller than the minimum value that can be stored in the filter’s coefficients buffer are equal to 0. And they can be excluded from filter structure during filter implementation. Besides, all of the coefficients are positive values. So, we do not need to implement signed arithmetic in hardware IIR filter.

The maximum mean squared error between ideal Butterworth filter and approximated using suggested method for high-pass filter is less than 11% and for low-pass filter is less than 2%. That’s why the suggested IIR filter’s coefficients determination method can be used for developing Butterworth digital IIR hardware filters with lower hardware complexity, than known methods. Also a great variety of poles, frequencies, coefficients storage buffer’s bit-lengths, and use of unsigned arithmetic is provided.

5. The hardware structures of

designed IIR filters

On the fig. 2 the basic direct-form II of 4 poles IIR filter structure is shown. This structure is used during IIR filters implementation which coefficients are calculated using known methods.

XZ

R

D

R O

C

D

R O

C

RGD

R O

C

DD3

DD5

DD8

DD11

MPL

X

Y

Z

B[2]

Σ

X

Y

Z

XZ

MPLX

YZA[1]

MPLX

YZA[2]

Σ

X

YZ

Σ

X

Y

Z

DD1

DD2

DD6

DD7

DD9

DD10

DD13

D

R O

C

MPL

X

Y

Z

B[3]

Σ

X

Y

Z

DD20

MPL

X

Y

Z

B[4]

Σ

X

Y

Z

DD22

Σ

X

Y

Z

B[1]

Y

MPL

MPLX

YZ

DD14

MPLX

YZ

A[3]

A[4]

Σ

X

Y

Z

Σ

X

Y

Z

DOUT

Control Unit

DD12

DD15

DD16

DD17 DD18

DD21

DD23

С

RG

RG

RG

DIN

C

D

R O

C

RG

DD24

D

R O

C

RG

DD4

DInC

BSumC

D

R O

C

RG

DD19

DOutC

MPL

Fig.2. The basic direct-form II of a IIR filter structure.

XZ

R

D

R O

C

D

R O

C

RGD

R O

C

DD3

DD5

DD8

DD11

MPL

X

Y

Z

B[2]

Σ

X

Y

Z

RG>

XZ

MPLX

YZA[1]

MPLX

YZA[2]

Σ

X

YZ

Σ

X

Y

Z

DD1

DD2

DD6

DD7

DD9

DD10

DD13

D

R O

C

MPL

X

Y

Z

B[3]

Σ

X

Y

Z

DD20

MPL

X

Y

Z

B[4]

Σ

X

Y

Z

DD22

Σ

X

Y

Z

B[1]

Y

MPL

MPLX

YZ

DD14

MPLX

YZ

A[3]

A[4]

Σ

X

Y

Z

Σ

X

Y

Z

DOUT

Control Unit

DD12

DD15

DD16

DD17 DD18

DD21

DD23

С

RG

RG

RG

DIN

C

D

R O

C

RG

DD24

D

R O

C

RG

DD4

DInC

BSumC

D

R O

C

RG

DD19

DOutC

Fig.3. The modified direct-form II of the high-pass IIR filter structure with 0.01 cutoff normalized frequency.

Page 4: XIII International PhD Workshop OWD 2011, 22–25 October 2011mechatronika.polsl.pl/owd/pdf2011/042.pdf · 2011. 10. 31. · XIII International PhD Workshop OWD 2011, 22–25 October

45

Fig.4. The modified direct-form II of the low-pass IIR filter structure with 0.5 cutoff normalized frequency.

On the fig.3 the modified direct-form II of 4

poles Butterworth digital high-pass IIR filter structure with 0.01 cutoff normalized frequency is shown. With dashed line shift register which is used instead of multiplication unit is shown. The filter’s coefficients were calculated using suggested method and are equal to:

A[0] = 0.125; A[1] = -0.98390526182651528; A[2] = 0.18699331724491811; A[3] = 0.39311076974836168; A[4] = 0.27878680530674382; B[1] = 0.29158776788111984; B[2] = 0.35793255689872899; B[3] = 0.21191186025487005; B[4] = -0.038668930055785311. On the fig.4 the modified direct-form II of 4

poles Butterworth digital low-pass IIR filter structure with 0.5 cutoff normalized frequency is shown. The filter’s coefficients were calculated using suggested method and are equal to:

A[0]=0.76805122346307286; A[1]=0.22945632622809814; A[2]=0; A[3]=0.0094616631083143717; A[4]=0; B[1]=0.0000001079709266808; B[2]=0; B[3]=0.00000014710070216064; B[4]=0. The filters on figs. 2 - 4 have such external

signals: R – reset, DIN – data input, DOUT – data output, C – CLK input.

As shown, usage of the suggested method provided on 11% less usage of multiplication units in 4 poles digital high-pass IIR filter. And for implementation of 4 poles digital low-pass IIR filter we need on 25% delay elements, on 44.5% multiplication elements and on 50% summing elements less, than if we were using known methods.

5. Conclusions

The suggested IIR filter’s coefficients determination method can be used for developing Butterworth digital IIR hardware filters with lower hardware complexity than known methods using. A great variety of poles, frequencies, coefficients storage buffer’s bit-lengths, and use of unsigned arithmetic is provided.

Bibliography

[1] Oleksiv Maksym: Patent № 58778 U Ukraine. G06F17/00 The method of digital infinite impulse response filters recursion coefficients determination (Спосіб визначення значень коефіцієнтів рекурсії цифрових фільтрів з безконечною імпульсною

характеристикою – Ukrainian language), Industrial Property, Bulletin № 8, 2011, Kyiv, Ukraine.

[2] Forman A. V., Krivanek A., Nguyen D. T., LaPointe S. P., Mayercik M. J.: United States Patent № 7305145 B2, G06К 9/36, H04N 5/225, G01B 11/14, Method and apparatus for filtering an image, 2007.

[3] Steven W. Smith: Digital signal processing: a practical guide for engineers and scientists, Newnes, 2003, - 650 p.

Author:

MSc. Maksym Oleksiv

Lviv Polytechnic National University 12 St. Bandera Str. 79013 Lviv, Ukraine tel. +38 (032) 258 21 96

fax. +38 (032) 272 92 70 e-mail: [email protected]