65
1 Lecture 5: March 20, 2007 Topic s: 1. Design of Equiripple Linear- Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear-Phase FIR Digital Filters 3. Design of IIR Digital Filters from Analogue Filters (Part I)

1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

Embed Size (px)

Citation preview

Page 1: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

1

Lecture 5: March 20, 2007

Topics:1. Design of Equiripple Linear-Phase FIR

Digital Filters (cont.)

2. Comparison of Design Methods for Linear-Phase FIR Digital Filters

3. Design of IIR Digital Filters from Analogue Filters (Part I)

Page 2: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

2

4.2.6. Design of Equiripple Linear-Phase FIR Digital Filters

The windowing method and the frequency-sampling method are relatively simple techniques for designing linear-phase FIR filter. Here, a major problem, is a lack of precise control of the critical frequencies such cut off frequencies of pass-band and stop-band.

Previous Methods:

Page 3: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

3

The new filter design method described in this section is formulated as a Chebyshev approximation problem. It is viewed as an optimum design criterion in the sense that the maximum weighted approximation error between the desired frequency response and the actual frequency response is minimized. The resulting filter designs have ripples in both the pass-band and the stop-band.

New Method:

Page 4: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

4

The new filter design method described in this section is formulated as a Chebyshev approximation problem. It is viewed as an optimum design criterion in the sense that the maximum weighted approximation error between the desired frequency response and the actual frequency response is minimized. The resulting filter designs have ripples in both the pass-band and the stop-band.

New Method:

Page 5: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

5

The new filter design method described in this section is formulated as a Chebyshev approximation problem. It is viewed as an optimum design criterion in the sense that the maximum weighted approximation error between the desired frequency response and the actual frequency response is minimized. The resulting filter designs have ripples in both the pass-band and the stop-band.

New Method:

To describe the design procedure, let us recall the following basic filter specifications

Page 6: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

6

jH e

SP

pass band

11

11 1 : pass-band ripple

2

2 : stop-band ripple

stop band

transition band

Basic Filter Specifications: A Review

Page 7: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

7

Design of Equiripple Linear-Phase FIR Digital Filters (Summary)

Method: formulated as a Chebyshev approximation problem.

Optimum design criterion: minimizing the maximum weighted approximation error between the desired frequency response and the actual frequency response.

Result: filter possessing ripples (equirpple) in both the pass-band and the stop-band.

Solution: an iterative method based on an alternation theorem and Remez exchange algorithm application.

Page 8: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

8

Filter description:

1

0

( ) ( ) ( )M

k

y n h k x n k

1

0

( ) ( )M

j j k

k

H e h k e

Filter specifications:

Pass-band: 1 11 ( ) 1rH

Stop-band: 2 2( )rH

M: the number of impulse response coefficients

Page 9: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

9

Four different cases of linear phase FIR filters:

Case 1: symmetric impulse response [h(k)=h(M-1-k)], M odd.

Case 2: symmetric impulse response [h(k)=h(M-1-k)], M even.

Case 3: antisymmetric impulse response [h(k)=-h(M-1-k)], M odd.

Case 4: antisymmetric impulse response [h(k)=-h(M-1-k)], M even.

Page 10: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

10

1

2( ) ( )M

jjrH e H e

We have shown, that the frequency response of linear phase FIR digital filters can be expressed as follows:

where is the real-valued frequency response. ( )rH

Frequency response of the linear phase FIR filter

Page 11: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

11

Case 1: ( ) 1Q L=(M-1)/2

( ) cos2

Q Case 2: L=(M/2)-1

Case 3: ( ) sin2

Q L=(M-3)/2

Case 4: ( ) sin2

Q L=(M/2)-1

The represent the parameters of the filter which are linearly related to the unit sample response h(k).

( )k

( ) ( ) ( )rH Q P 0

( ) ( )cosL

k

P k k

where

Page 12: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

12

A. The actual real-valued frequency response of the filter:

( )rH

B. The desired (ideal) real-valued frequency response of the filter:

1( )

0dr

for in pass bandH

for in stop band

C. The weighting function of the approximation error:

2 1/( )

1

for in pass bandW

for in stop band

Page 13: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

13

The weighting function on the approximation error allows to choose the relative size of the approximation errors in the different frequency bands (i.e. in the pass-band and in the stop-band) differently. In particular, it is convenient to normalize

( )W

Comments on weighting function:

to the unity in the stop-band

( ) 1W and set

2 1( ) /W

in the pass-band.

Page 14: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

14

With regard to previous specifications of the desired (ideal) and actual real-valued frequency responses and the weighting function on the approximation error, we can now define the weighted approximation error as

( )E

( )( ) ( ) ( )

( )drH

W Q PQ

( ) ( ) ( ) ( )drW H Q P

( ) ( ) ( )dr rW H H

Page 15: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

15

The modified real-valued desired frequency response:

( ) ( ) ( )W W Q

The modified weighting function on the approximation error:

( )( )

( )dr

drH

HQ

The weighted approximation error:

0

( ) ( ) ( ) ( )

( ) ( ) ( )cos

dr

L

dr

k

E W H P

W H k k

for all different types of linear-phase FIR filters.

Page 16: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

16

Given the error function , the Chebyshev’s approximation problem is basically to determine the filter parameters that minimize the maximum absolute value over the frequency bands in which the approximation is to be performed (set: S). In mathematical terms we seek the solution of the problem:

( )E

( )k( )E

( )min max ( )

over k SE

( )min max ( ) ( ) ( )dr

over k SW H P

( )0

min max ( ) ( ) ( )cosL

drover k S

k

W H k k

Page 17: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

17

( )min max ( ) ( ) ( )dr

over k SW H P

Note A.:

Here, S represents the set (disjoint union) of frequency bands over which the optimization is to be performed. Basically, the set S consists of the pass-bands and stop-bands of the desired frequency response of the filter.

( )min max ( )

over k SE

( )0

min max ( ) ( ) ( )cosL

drover k S

k

W H k k

Page 18: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

18

Note B.:

The described criterion refered to as Chebyshev’s mini-max criterion leads to an equiripple filter i.e. to a filter whose magnitude response oscillates uniformly between the tolerance bounds of each band.

( )min max ( ) ( ) ( )dr

over k SW H P

( )min max ( )

over k SE

( )0

min max ( ) ( ) ( )cosL

drover k S

k

W H k k

Page 19: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

19

The solution to the Chebyshev’s approximation problem has been due to Parks and McClellan. Their solution is based on the combination of the alternation theorem with the Remez exchange algorithm.

From a formal point of view, Parks’ and McClellan’s solution is represented by a numerical iterative method. Therefore, this method is clearly improper for „the conventional hand-made approach“.

Solution: a computer program for designing the FIR filter has been reported by Parks and McClellan. This program represented by sophisticated software tools can be applied for designing all basic kinds of linear phase FIR digital filters as well as digital differentiators and Hilbert transformers.

Page 20: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

20

4.2.6.1. MATLAB Function for Optimal Equiripple FIR Filter Design:

b=remez(N,F,A)

REMEZ Parks-McClellan optimal equiripple FIR filter design. b=remez(N,F,A) returns a length N+1 linear phase (real, symmetric coefficients) FIR filter having the best approximation of the desired frequency response described by F and A in the mini-max sense. F is a vector of frequency band edges in pairs, in ascending order between “0” and “1”. “1” corresponds to the Nyquist frequency or half of the sampling frequency. A is a real vector the same size as F. It specifies the desired amplitude of the frequency response of the resultant filter b.

Page 21: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

21

4.2.6.1. MATLAB Function for Optimal Equiripple FIR Filter Design:

b=remez(N,F,A)

REMEZ Parks-McClellan optimal equiripple FIR filter design. b=remez(N,F,A) returns a length N+1 linear phase (real, symmetric coefficients) FIR filter having the best approximation of the desired frequency response described by F and A in the mini-max sense. F is a vector of frequency band edges in pairs, in ascending order between “0” and “1”. “1” corresponds to the Nyquist frequency or half of the sampling frequency. A is a real vector the same size as F. It specifies the desired amplitude of the frequency response of the resultant filter b.

Page 22: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

22

4.2.6.1. MATLAB Function for Optimal Equiripple FIR Filter Design:

b=remez(N,F,A)

REMEZ Parks-McClellan optimal equiripple FIR filter design. b=remez(N,F,A) returns a length N+1 linear phase (real, symmetric coefficients) FIR filter having the best approximation of the desired frequency response described by F and A in the mini-max sense. F is a vector of frequency band edges in pairs, in ascending order between “0” and “1”. “1” corresponds to the Nyquist frequency or half of the sampling frequency. A is a real vector the same size as F. It specifies the desired amplitude of the frequency response of the resultant filter b.

Page 23: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

23

4.2.6.1. MATLAB Function for Optimal Equiripple FIR Filter Design:

b=remez(N,F,A)

REMEZ Parks-McClellan optimal equiripple FIR filter design. b=remez(N,F,A) returns a length N+1 linear phase (real, symmetric coefficients) FIR filter having the best approximation of the desired frequency response described by F and A in the mini-max sense. F is a vector of frequency band edges in pairs, in ascending order between “0” and “1”. “1” corresponds to the Nyquist frequency or half of the sampling frequency. A is a real vector the same size as F. It specifies the desired amplitude of the frequency response of the resultant filter b.

Page 24: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

24

Example:

By using MATLAB, design a low-pass optimum equiripple FIR filters of length M=21, M=41, M=61, M=101 with the pass-band edge frequency

/ 2.S

/ 4P

and stop-band edge frequency

Page 25: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

25

F=[0 0.25 0.5 1];

Solution and Results:

/ 4P / 2S

A=[1 1 0 0];

 b21=remez(20,F,A); b41=remez(40,F,A);

b61=remez(60,F,A); b101=remez(100,F,A);

application of MATLAB function b=remez(N,F,A)

Then, the magnitude responses of the designed filters are given in the next figures.

Page 26: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

26

Magnitude Responses

1020*log jH e [dB]

M=21

M=41

M=61M=101

Details: the next figures

Page 27: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

27

Magnitude Responses: Details

[dB]

[dB][dB]

[dB]

[dB]

M=21 M=41

M=61 M=101

Page 28: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

28

4.3. Comparison of Design Methods for Linear-Phase FIR Digital Filters

Historically, the design method based on the use of windows to truncate the impulse response and to obtain the desired spectral shaping was the first method proposed for designing linear-phase FIR filters. The frequency-sampling method and the Chebyshev approximation method were developed in the 1970s and have since became very popular in the design of practical linear-phase filters.

Page 29: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

29

4.3. Comparison of Design Methods for Linear-Phase FIR Digital Filters

Historically, the design method based on the use of windows to truncate the impulse response and to obtain the desired spectral shaping was the first method proposed for designing linear-phase FIR filters. The frequency-sampling method and the Chebyshev approximation method were developed in the 1970s and have since became very popular in the design of practical linear-phase filters.

Page 30: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

30

B. The Frequency Sampling Method:

The method provides an improvement over the window design method, since is specified at the frequencies , and the transition band is a multiple of . This filter design method is particularly attractive when the FIR filter is realized either in the frequency domain by means of the FFT or in any of the frequency sampling realizations. The attractive feature of these realizations is that is either zero or unity at all frequencies, except in the transition band.

( )rH 2 /k k M 2 / M

( )rH

Page 31: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

31

C. The Chebyshev Design Procedure Based on the Remez Exchange Algorithm

The Chebyshev approximation method provides total control of the filter specifications. It is usually preferable over the other two methods. For a low-pass filter, the specification are given in terms of the parameters: M, 1 2, , , .P S

However, it is more natural in filter design to specify

1 2, , ,P S

and to determine the filter length M that satisfies the specifications.

Page 32: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

32

Although there is no simple formula to determine the filter length from these specifications, a number of approximations have been proposed for estimating M from . A particularly, simple formula attributed to Kaiser for approximating M is

1 2, , ,P S

10 1 220log 131

14.6M

f

where the transition band is defined as:

( ) / 2S Pf

Page 33: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

33

A more accurate formula proposed by Herrmann et al. is

21 2 1 2, ,1

D f fM

f

where

210 1 10 10.005309 log 0.07114log 0.4761O

210 1 10 10.00266 log 0.5941log 0.4278S

1 2 10 2, logD O S

1 2 10 1 10 2, 11.012 0.51244 log logf

( ) / 2 .S Pf

Page 34: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

34

5. Design of IIR Digital Filters from Analogue Filters

5.1. Introduction

Page 35: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

35

Just as in the FIR filter design, there are several methods that can be used to design digital filters having an infinite-duration of unit sample response.

The methods described in this section are all based on taking an analogue filter and converting it to a digital filter.

Analogue filter design is well-developed field, so it is not surprising that we begin the design of digital filters in the analogue domain and then convert the design into the digital domain.

Page 36: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

36

input signal

( ), ( )Ah t H p

Analogue filter

output signal

( )y t

( ) ( )Y p L y t

( )x t

( ) ( )X p L x t

( ) ( ) ptY p y t e dt

( ) ( ) ptX p x t e dt

( ) ( ) pt

AH p h t e dt

Analogue filter description

Page 37: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

37

B. System (transfer) function:

0

0

( ) ( )( )

( ) ( )

Mk

kk

A Nk

kk

b pL y t B p

H pL x t A p a p

A. The linear constant-coefficient differential equation:

0 0

( ) ( )k kN M

k kk kk k

d y t d x ta b

dt dt

Basic Characteristics/Models of Analogue Filters

C. Impulse response h(t) is related to HA(p) by:

( ) ( ) ptAH p h t e dt

Page 38: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

38

Each of these three equivalent characterizations of analogue filters leads to alternative method for converting the analogue filters into the digital domain (into digital filters).

Page 39: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

39

1. The left-half p-plane should be mapped into the inside of the unite circle in the z-plane. Thus the stable analogue filter has to be converted to a stable digital filter.

2. The axis in the p-plane should be mapped into the unit circle in the z-plane. Thus there has to exist direct relationship between the two frequency variables in the two domains .

j

( )

Consequently, if the conversion method of analogue filters into digital filters is to be effective, it should possess the following desirable properties:

We recall that an analog linear time-invariant system with transfer (system) function is stable if and only if all of its poles lies in the left-half p-plane.

( )AH p

Page 40: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

40

It can be shown that physically realizable (causal) and stable IIR filters cannot have linear phase. If the restriction on causality is removed, it is possible to obtain a linear phase IIR filters, at least in principle.

Therefore, in the design of IIR filters, we shall specify the desired filter characteristics for the magnitude response only. This does not mean that we consider the phase response unimportant. Since the magnitude and phase characteristics are related, we specify the desired magnitude characteristics and accept the phase response that is obtained from the design methodology.

Page 41: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

41

It can be shown that physically realizable (causal) and stable IIR filters cannot have linear phase. If the restriction on causality is removed, it is possible to obtain a linear phase IIR filters, at least in principle.

Therefore, in the design of IIR filters, we shall specify the desired filter characteristics for the magnitude response only. This does not mean that we consider the phase response unimportant. Since the magnitude and phase characteristics are related, we specify the desired magnitude characteristics and accept the phase response that is obtained from the design methodology.

Page 42: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

42

Therefore, in the design of IIR filters, we shall specify the desired filter characteristics for the magnitude response only. This does not mean that we consider the phase response unimportant. Since the magnitude and phase characteristics are related, we specify the desired magnitude characteristics and accept the phase response that is obtained from the design methodology.

It can be shown that physically realizable (causal) and stable IIR filters cannot have linear phase. If the restriction on causality is removed, it is possible to obtain a linear phase IIR filters, at least in principle.

Page 43: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

43

Therefore, in the design of IIR filters, we shall specify the desired filter characteristics for the magnitude response only. This does not mean that we consider the phase response unimportant. Since the magnitude and phase characteristics are related, we specify the desired magnitude characteristics and accept the phase response that is obtained from the design methodology.

It can be shown that physically realizable (causal) and stable IIR filters cannot have linear phase. If the restriction on causality is removed, it is possible to obtain a linear phase IIR filters, at least in principle.

Page 44: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

44

Therefore, in the design of IIR filters, we shall specify the desired filter characteristics for the magnitude response only. This does not mean that we consider the phase response unimportant. Since the magnitude and phase characteristics are related, we specify the desired magnitude characteristics and accept the phase response that is obtained from the design methodology.

It can be shown that physically realizable (causal) and stable IIR filters cannot have linear phase. If the restriction on causality is removed, it is possible to obtain a linear phase IIR filters, at least in principle.

Page 45: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

45

Therefore, in the design of IIR filters, we shall specify the desired filter characteristics for the magnitude response only. This does not mean that we consider the phase response unimportant. Since the magnitude and phase characteristics are related, we specify the desired magnitude characteristics and accept the phase response that is obtained from the design methodology.

It can be shown that physically realizable (causal) and stable IIR filters cannot have linear phase. If the restriction on causality is removed, it is possible to obtain a linear phase IIR filters, at least in principle.

Page 46: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

46

The procedures for digital filter design from analogue filters to be discussed in this course:

1. Method of approximation of derivatives.

2. Impulse-invariant method (impulse invariant transformation).

3. The matched Z-transformation method.

4. Bilinear transformation method.

Page 47: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

47

5.2. Method of Approximation of Derivatives

Page 48: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

48

Basic idea: approximation of the differential equation:

0 0

( ) ( )k kN M

k kk kk k

d y t d x ta b

dt dt

by an equivalent difference equation.

Basic principle: to substitute derivative at time t=nT by the backward difference:

( ) ( ) ( )

t nT

dy t y nT y nT T

dt T

where T represents the sampling interval.

Page 49: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

49

Analogue differentiator

The output: ( )

t nT

dy t

dt

The input: ( )y t

Transfer function:

( )H p p

Digital differentiator

The input: ( )y nT

The output:

( ) ( ) /y nT y nT T T

Transfer function: 11

( )z

H zT

11 zp

T

Transform-domain equivalent

Page 50: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

50

The second derivative is replaced by the second backward difference:

2

2

( )

t nT

d y t

dt

1 12

( ) ( )( )

y nT y nT Ty nT

T

2 1 1( ) ( )y nT y nT

( )

t nT

d dy t

dt dt

Page 51: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

51

1

( ) ((

))

y nT y nTy nT

T

T

1

( ) ( 2( )

)y nTy nT

T y n T

TT

T

2

( ) ( )

( )

( ) ( 2 )y

y nT

y nT nT

T

y nT TT

T y nT TT

2 2

( ) 2 ( ) ( 2 )( )

y nT y nT T y nT Ty nT

T

1 12

( ) ( )( )

y nT y nT Ty nT

T

Page 52: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

52

2

2 2

( ) ( ) 2 ( ) ( 2 )

t nT

d y t y nT y nT T y nT T

dt T

Transform-domain equivalent: 21 2 1

22

1 2 1z z zp

T T

It is easily to see from the previous expression that the substitution for the k-th derivative of y(t) results in the equivalent transfer-domain relationship

11k

k zp

T

!

Page 53: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

53

Consequently, the transfer function of the digital IIR filter obtained as a result of the approximation of the derivatives by the finite backward differences is

1(1 ) /( ) ( )A p z T

H z H p

p-z Mapping 11 1

1

zp z

T pT

Page 54: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

54

1 11

2 1

j T j T

j T

2

2

2

11 11 1

2 21

jarctg Tj arctg T

jarctg T

T ee

eT

If : p j

1

1z

pT

1

1 j T

1 11

2 1

j T

j T

Properties:

Page 55: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

55

Taking real and imaginary parts of z gives

cos 21Re

2 2

arctg Tz

sin 2Im

2

arctg Tz

Thus the line from p-plane is mapped into the z-plane into the circle described

,p j for

2 2

21 1Re Im

2 2z z

Page 56: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

56

p-plane

0

Im[ ]j p

Re[ ]p

Mapping:1

1z

pT

0 1

Unit Circle

Re[ ]z

Im[ ]z

z-plane

Image of p j

2 2

21 1Re Im

2 2z z

Page 57: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

57

Therefore, the axis maps onto perimeter of the circle of radius 1/2 in the z-plane. Except for extremely small values of , the image of the axis of the p-plane is off the unit circle in the z-plane. Therefore, the property 2 is not fulfiled.

jj

j

Page 58: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

58

To see whether the 1st property of p-z mapping is satisfied, we set

, 0pT a jb for a b R and a

1

1z

pT

2 2 1

1

1b

jarctgaa b e

2 2

11

1z

a b

into

1

1z

a bj

Page 59: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

59

Stable analogue filters are mapped into stable digital filters but their frequency properties are not maintained, i.e. this mapping does not preserve the shape of the analogue frequency characteristics (the imaginary axis of p-plane does not map onto the unit circle).

The left-half p-plane is mapped inside a circle with the center at Re[z]=1/2 and radius 1/2. The right-half p-plane maps into the region outside the circle with the center at Re[z]=1/2 and radius 1/2 .

Results:

Page 60: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

60

Mapping:1

1z

pT

10

Unit Circle

Re[ ]z

Im[ ]z

z-planep-plane

Im[ ]j p

Re[ ]p 0

Image of the left-half of p-plane

Page 61: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

61

If T is decreased, more of the frequency response will be concentrated near z=1. For a low-pass filter, this improved the matching between the analog and digital filter frequency responses, but significant distortion will still exists and T may have to be inordinately small.

The possible location of the poles of the digital filter are confined to relatively small frequencies and, as a consequence, the mapping is restricted to design of low-pass filters and band-pass filters having relatively small resonant frequencies.

Page 62: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

62

10

Unit Circle

Re[ ]z

Im[ ]z

z-plane

Page 63: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

63

If the desired filter is not low-pass (e.g. if it is high-pass or band-stop filter), the above mentioned procedure (T decreasing) typically cannot be applied.

As a result, the backward difference transformation is seldom used.

Page 64: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

64

Example:

Use the backward difference approximation of the derivative to convert the analog low-pass filter with the transfer function

1( )

1AH pp

into a digital IIR filter.

Page 65: 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase

65

1(1 ) /( ) ( )A p z T

H z H p

1(1 ) /

1

1p z T

p

1

11

1z

T

11

T

z T 1(1 )

T

T z

1

11

11

TT

zT

Solution: