18.01.2013 Views

Designing Special IIR-Filters by Approximating the Magnitude ...

Designing Special IIR-Filters by Approximating the Magnitude ...

Designing Special IIR-Filters by Approximating the Magnitude ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Designing</strong> <strong>Special</strong> <strong>IIR</strong>-<strong>Filters</strong> <strong>by</strong> <strong>Approximating</strong> <strong>the</strong> <strong>Magnitude</strong> Frequency<br />

Characteristic of an Analogue Prototype System<br />

Peter Möhringer, Tristan Schneider,<br />

Faculty of Electrical Engineering<br />

University of Applied Sciences<br />

Fachhochschule Würzburg-Schweinfurt<br />

D-97421 Schweinfurt, Ignaz-Schön-Str. 11<br />

Germany<br />

pmoehrin@fh-sw.de<br />

Abstract - The design of special <strong>IIR</strong>-filters using<br />

optimization procedures is a well known practice. In<br />

<strong>the</strong> following, a combination of approximation and<br />

transformation is proposed for <strong>the</strong> design of digital<br />

<strong>IIR</strong>-filters with special demands for <strong>the</strong> magnitude<br />

frequency characteristic. The design is realized <strong>by</strong><br />

four steps. The desired squared magnitude<br />

characteristic via frequency is defined for <strong>the</strong> digital<br />

filter, first. Then <strong>the</strong> prescription is transformed to<br />

<strong>the</strong> analogue domain <strong>by</strong> inverse bilinear transform,<br />

this is followed <strong>by</strong> an optimization procedure of <strong>the</strong><br />

analogue frequency response. Finally <strong>the</strong> optimized<br />

result is transformed back to <strong>the</strong> digital domain<br />

yielding <strong>the</strong> desired <strong>IIR</strong>-filter.<br />

I. INTRODUCTION<br />

Starting with <strong>the</strong> definition of <strong>the</strong> desired<br />

magnitude frequency characteristic digital <strong>IIR</strong><br />

filters are designed using <strong>the</strong> bilinear transform to<br />

allow an optimization in <strong>the</strong> analogue domain. The<br />

appropriately selected function yields stable<br />

systems, automatically and <strong>the</strong> nonlinear distortion<br />

of <strong>the</strong> frequency axis is equalized <strong>by</strong> using <strong>the</strong><br />

bilinear transform back and forth. First, from digital<br />

to analogue domain and second, after <strong>the</strong><br />

optimization, back to <strong>the</strong> digital domain again. A<br />

program for MATLAB was developed and <strong>the</strong><br />

capability of <strong>the</strong> method was tested <strong>by</strong> optimizing a<br />

digital to analogue converter equalizing filter.<br />

[1,2,3]<br />

II. THE DESIGN METHOD<br />

First we define <strong>the</strong> magnitude characteristic of <strong>the</strong><br />

desired filter in <strong>the</strong> digital domain. This design<br />

goal HW(jω) is squared and <strong>the</strong>n transformed to <strong>the</strong><br />

analogue domain <strong>by</strong> means of <strong>the</strong> bilinear<br />

transformation following equ. (1). In <strong>the</strong> analogue<br />

domain we choose an appropriate complex<br />

function, e. g. Hist(s 2 ) as proposed in [2]. The<br />

chosen function is a separable product of a stable<br />

system H(s) and an instable system H(-s). See equ.<br />

(2). Optimizing Hist(s 2 ) using a least squares<br />

method to approximate <strong>the</strong> required frequency<br />

characteristic and hereafter separating <strong>the</strong> stable<br />

system H(s) from <strong>the</strong> product are <strong>the</strong> next steps.<br />

Fig. 1 shows <strong>the</strong> poles and <strong>the</strong> zeroes of an<br />

example system combination H(s)H(-s). The stable<br />

system is selected <strong>by</strong> taking <strong>the</strong> poles in <strong>the</strong> left<br />

open half plane and splitting <strong>the</strong> double zeroes on<br />

<strong>the</strong> imaginary axis for H(s) and H(-s).<br />

z −1<br />

1 + s<br />

s = ; z =<br />

(1)<br />

z + 1 1 − s<br />

(2)<br />

(3)<br />

Fig. 1: Poles and zeroes of <strong>the</strong> analogue system<br />

Hist(s 2 )<br />

omega-analog<br />

6<br />

5<br />

4<br />

3<br />

2<br />

1<br />

bilinear transform axis distortion<br />

0<br />

0 0.2 0.4 0.6 0.8 1 1.2 1.4<br />

omega-digital<br />

Fig. 2. Distortion of <strong>the</strong> frequency axis


D →<br />

A<br />

s =<br />

z − 1<br />

z + 1<br />

equ .( 4)<br />

ω A = tan( ω D T / 2)<br />

A → D<br />

1 + s<br />

z =<br />

1 − s<br />

jω<br />

DT<br />

e<br />

1 +<br />

=<br />

1 −<br />

jω<br />

A<br />

jω<br />

A<br />

equ .( 5)<br />

ω D<br />

2<br />

= arctan( ω A )<br />

T<br />

Equations (4) and (5)<br />

In <strong>the</strong> following step,<br />

<strong>the</strong> analogue filter is<br />

transformed back to<br />

<strong>the</strong> digital domain,<br />

again using <strong>the</strong><br />

bilinear transform and,<br />

thus equalizing <strong>the</strong><br />

distortion of <strong>the</strong><br />

frequency axis. See<br />

Fig. 2 and equ. (4) and<br />

equ. (5) The effect of<br />

distortion of <strong>the</strong><br />

frequency axis and its<br />

equalization are<br />

explained in Fig. 3.<br />

The poles and zeroes<br />

of a resulting digital<br />

system HDist are shown<br />

in Fig. 4.<br />

Fig. 3. Distortion and equalization of <strong>the</strong><br />

frequency axis.<br />

top: desired digital characteristic, normalized<br />

middle: transformed to <strong>the</strong> analogue domain<br />

bottom: back in <strong>the</strong> digital domain, fa=44.1kHz<br />

Although <strong>the</strong> bilinear transform is commonly not<br />

applicable for <strong>the</strong> design of equalizing filters, <strong>the</strong><br />

way of using <strong>the</strong> transform back and forth allows a<br />

wide variety of designs, avoiding <strong>the</strong> distortion of<br />

<strong>the</strong> frequency axis.<br />

Fig. 4 poles and zeroes of a resulting digital<br />

system.<br />

III. DESIGN OF A POST DAC FILTER<br />

To show <strong>the</strong> capability of <strong>the</strong> proposed method, a<br />

digital to analogue converter equalizing filter (DAC<br />

filter) was designed<br />

H DA ( jω)<br />

T<br />

sin ω<br />

=<br />

2<br />

T<br />

ω<br />

2<br />

(6)<br />

and measured. The magnitude frequency<br />

characteristic of <strong>the</strong> DAC HDA(jω), equ. (6), shall<br />

be equalized in <strong>the</strong> passband and <strong>the</strong> step function<br />

shall be smoo<strong>the</strong>d, thus suppressing <strong>the</strong> aliasing<br />

spectra. The desired frequency response HW(jω) is<br />

defined in equ. (7) and <strong>the</strong> squared response is<br />

shown in Fig. 5.<br />

H<br />

0<br />

W<br />

T<br />

sin ω<br />

( jω)<br />

=<br />

2<br />

T<br />

ω<br />

2<br />

−1<br />

ωωa/2<br />

IV. MEASURED RESULTS<br />

Finally <strong>the</strong> example <strong>IIR</strong>-filter was implemented on<br />

a signal processor test board and frequency<br />

response as well as pulse response were measured<br />

and compared to <strong>the</strong> desired solution. Fig. 6 shows<br />

<strong>the</strong> measuring circuit. The DAC of <strong>the</strong> test board<br />

was used for <strong>the</strong> distortion and <strong>the</strong> tested filter<br />

frequency response is used for <strong>the</strong> equalizing. The<br />

plot in Fig. 7 shows <strong>the</strong> product result of DAC<br />

magnitude distortion and <strong>the</strong> equalizer. As can be<br />

seen, <strong>the</strong> desired characteristic is closely met.


Fig. 5. The squared frequency response, <strong>the</strong><br />

optimized result and <strong>the</strong> difference<br />

Fig. 6. Measuring circuit for time and frequency<br />

response<br />

V. CONCLUSION<br />

As was shown <strong>by</strong> example, <strong>the</strong> combination of a<br />

well known classic analogue filter design method<br />

and <strong>the</strong> bilinear transform used back and forth<br />

yields <strong>IIR</strong> digital filters closely meeting <strong>the</strong> desired<br />

prescriptions. The method was programmed in<br />

Fig. 7. Measured frequency characteristic,<br />

product of DAC and filter frequency response<br />

MATLAB and results were tested <strong>by</strong> implementing<br />

<strong>the</strong> resulting filters on a signal processor board and<br />

measuring <strong>the</strong> overall performance.<br />

VI. ACKNOWLEDGMENT<br />

<strong>Special</strong> thanks for review and support in layout to<br />

H. Endres, P. Dückert and Stefanie Möhringer<br />

VII. REFERENCES<br />

[1] Schüßler H.W.: „Digitale Systeme zur<br />

Signalverarbeitung“, Springer Verlag 1973<br />

[2] Möhringer P.: „Beitrag zum Entwurf von<br />

Filtern zur A/D- und D/A-Wandlung”,<br />

Dissertation Uni Erlangen/Nürnberg 1982<br />

[3] Schneider, T.: „Entwurf rekursiver Digitalfilter<br />

mit besonderer Anforderung an den<br />

Frequenzgang“, Diplomarbeit, University of<br />

Applied Sciences FH-WS 2007<br />

VIII. THE AUTHORS<br />

Prof. Dr.-Ing. Peter Möhringer, University of<br />

Applied Sciences, Fachhochschule Würzburg-<br />

Schweinfurt, is head of <strong>the</strong> communication systems<br />

branch of <strong>the</strong> faculty of electrical engineering.<br />

Dipl.-Ing. (FH) Tristan Schneider developed <strong>the</strong><br />

program, provided <strong>the</strong> examples and did <strong>the</strong><br />

measurements in <strong>the</strong> frame of his diploma <strong>the</strong>sis.<br />

IX. APPENDIX<br />

Poles and zeroes of <strong>the</strong> tested equalizing filter.<br />

Analogue prototype and <strong>the</strong> digital <strong>IIR</strong> filter result.<br />

Analogue prototype of degree 5<br />

Zeroes: Poles:<br />

0 + 5.6707j -6.1801<br />

0 + 5.971j -0.82268 - 2.2j<br />

0 - 5.6707j -0.82268 + 2.2j<br />

0 - 5.971j -5.5708 + 0.3j<br />

-5.5708 - 0.3j<br />

Resulting digital <strong>IIR</strong> filter of degree 5<br />

Zeroes: Poles:<br />

-1 -0.51101<br />

-0.77874 + 0.62735j -0.11843 - 0.6871j<br />

-0.77874 - 0.62735j -0.11843 + 0.6871j<br />

-0.79825 + 0.60233j -0.47248 + 0.020903j<br />

-0.79825 - 0.60233j -0.47248 - 0.020903j

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!