40
Email: [email protected] [email protected] Cell: 9952749533 www.researchprojects.info PAIYANOOR, OMR, CHENNAI Call For Research Projects Final year students of B.E in EEE, ECE, EI, M.E (Power Systems), M.E (Applied Electronics), M.E (Power Electronics) Ph.D Electrical and Electronics. Students can assemble their hardware in our Research labs. Experts will be guiding the projects.

Digital fiiter

Embed Size (px)

Citation preview

Page 1: Digital fiiter

EXPERT SYSTEMS AND SOLUTIONS

Email: [email protected]@yahoo.comCell: 9952749533

www.researchprojects.info PAIYANOOR, OMR, CHENNAI

Call For Research Projects Final year students of B.E in EEE, ECE, EI, M.E (Power Systems), M.E (Applied

Electronics), M.E (Power Electronics)Ph.D Electrical and Electronics.

Students can assemble their hardware in our Research labs. Experts will be guiding the

projects.

Page 2: Digital fiiter

Digital Filter Structures

Content

Introduction

IIR Filter Structures

FIR Filter Structures

Page 3: Digital fiiter

Introduction

What is a digital filter A filter is a system that is designed to remove some

component or modify some characteristic of a signal

A digital filter is a discrete-time LTI system which can process the discrete-time signal.

There are various structures for the implementation of digital filters

The actual implementation of an LTI digital filter can be either in software or hardware form, depending on applications

Page 4: Digital fiiter

Introduction

Basic elements of digital filter structures

Adder has two inputs and one output. Multiplier (gain) has single-input, single-output. Delay element delays the signal passing through it by

one sample. It is implemented by using a shift register.

z-1

a z-1

a

Page 5: Digital fiiter

a1

z-1

z-1a2

b0)(nx )(ny

)(nx )(ny

a1

a2

b0

z-1

z-1

1 2

3

4

5

)2()1()()()()()2()1()()()(

)2()1()()1()1()(

)()(

210501

2142315

34

23

2

nyanyanxbnwnxbnwnyanyanwanwanw

nynwnwnynwnw

nynw)2()1()()( 210 nyanyanxbny

Page 6: Digital fiiter

Introduction

Computational complexity refers to the number of arithmetic operations (multiplications,

divisions, and additions) required to compute an output value y(n) for the system.

Memory requirements refers to the number of memory locations required to store the

system parameters, past inputs, past outputs, and any intermediate computed values.

Finite-word-length effects in the computations refers to the quantization effects that are inherent in any digital

implementation of the system, either in hardware or in software.

The major factors that influence the choice of a specific structure

Page 7: Digital fiiter

IIR Filter Structures

The characteristics of the IIR filter IIR filters have Infinite-duration Impulse Responses The system function H(z) has poles in An IIR filter is a recursive system

||0 z

)(11)()(

)(1

1

110

1

0N

N

MM

N

k

kk

M

k

kk

zaza

zbzbb

za

zb

zXzY

zH

The order of such an IIR filter is called N if aN≠0

M

kk

N

kk knxbknyany

01

)()()(

Page 8: Digital fiiter

IIR Filter Structures

In this form the difference equation is implemented directly as given. There are two parts to this filter, namely the moving average part and the recursive part (or the numerator and denominator parts). Therefore this implementation leads to two versions: direct form I and direct form II structures

Direct form

N

kk

M

kk knyaknxbny

10

)()()(

N

k

kk

M

k

kk

za

zbzH

1

0

1)(

Page 9: Digital fiiter

Direct form I

)(2 ny)(nx

b1

b2

b0

z-1

z-1

bM-1

z-1bM

)1( nx

)2( nx

)1( Mnx

)( Mnx

)(ny

a1

a2

z-1

z-1

aN-1

z-1aN

)1( ny

)2( ny

)1( Nny

)( Nny

)(1 ny

N

kk

M

kk knyaknxbny

10

)()()(

Page 10: Digital fiiter

Direct form II

b1

b2

b0

z-1

z-1

bM-1

z-1bM

)(nx )(nyz-1

z-1

z-1

a1

a2

aN-1

aN

For an LTI cascade system, we can change the order of the systems without changing the overall system response

Page 11: Digital fiiter

IIR Filter Structures

In this form the system function H(z) is written as a product of second-order sections with real coefficients

Cascade form

21

21

1

11

1

1

1

11

1

1

1

0

)1)(1()1(

)1)(1()1(

1)(

N

kkk

N

kk

M

kkk

M

kk

N

k

kk

M

k

kk

zdzdzc

zqzqzpA

za

zbzH

21

21

1

22

11

1

1

1

22

11

1

1

)1()1(

)1()1()(

N

kkk

N

kk

M

kkk

M

kk

zazazc

zbzbzpAzH 21

21

22NNNMMM

Page 12: Digital fiiter

IIR Filter Structures

kk

k kk

kk zHAzaza

zbzbAzH )(

1

1)(

22

11

22

11

Each second-order section (called biquads) is implemented in a direct form ,and the entire system function is implemented as a cascade of biquads. If N=M, there are totally biquads.

21N

If N>M, some of the biquads have numerator coefficients that are zero, that is, either b2k = 0 or b1k = 0 or both b2k

= b1k = 0 for some k.

if N>M and N is odd, one of the biquads must have ak2 = 0, so that this biquad become a first-order section.

Page 13: Digital fiiter

22

11

22

11

1

1)(

zaza

zbzbzH

kk

kkkb1k

b2k

z-1a1k

a2k

biquad

z-1

First-order section

b1kz-1a1kb1kz-1a1k

a2kz-1

z-1a1k

a2kz-1

z-1a1k

Page 14: Digital fiiter

Example 321

321

81

43

451

21148)(

zzz

zzzzH

)5.01)(25.01()2644.52402.14)(3799.02(

)(211

211

zzz

zzzzH

-1.2402

5.2644

z-1

-0.5 z-1

z-10.25

4 2

-0.3799

)(nx )(ny

Page 15: Digital fiiter

IIR Filter Structures

Parallel form

In this form the system function H(z) is written as a sum of sections using partial fraction expansion. Each section is implemented in a direct form. The entire system function is implemented as a parallel of every section.

21

12

21

1

110

110

1

0

111

)(N

k kk

kkN

k k

kN

k

kk

M

k

kk

zaza

zbb

zc

AG

za

zbzH

21 2NNN

Suppose M=N

Page 16: Digital fiiter

IIR Filter Structures

2

1

11

21

1

110

0 1)(

N

k kk

kk

zaza

zbbGzH

if N is odd, the system has one first-order

section and second-order sections.

if N is even, the system has second-order

sections.

21N

2N

Page 17: Digital fiiter

Example

1111

111

)21

21(1)

21

21(1)

811)(

431(

)21)(321)(

211(10

)(zjzjzz

zzzzH

1

4

1

3

1

2

1

1

)21

21(1)

21

21(1)

811()

431(

)(

zj

A

zj

A

z

A

z

AzH

57.1425.12 ,57.1425.12 ,68.17 ,93.2 4321 jAjAAA

21

1

21

1

211

82.2650.24

323

871

90.1275.14)(

zz

z

zz

zzH

Page 18: Digital fiiter

21

1

21

1

211

82.2650.24

323

871

90.1275.14)(

zz

z

zz

zzH

-12.9z-17/8

-3/32 z-1

-14.75

26.82z-11

-1/2 z-1

24. 5

)(nx )(ny

Page 19: Digital fiiter

IIR Filter Structures

Transposition theorem

If we reverse the directions of all branch transmittances and interchange the input and output in the flow graph, the system function remains unchanged.

The resulting structure is called a transposed structure or a transposed form.

Page 20: Digital fiiter

FIR Filter Structures

The characteristics of the FIR filter FIR filters have Finite-duration Impulse Responses,

thus they can be realized by means of DFT The system function H(z) has the ROC of ,

thus it is a causal system An FIR filter is a nonrecursive system FIR filters can be designed to have a linear-phase

response

0|| z

1

0

)()(N

n

nznhzHIt has N-1 order poles at

and N-1 zeros in 0|| z0z

The order of such an FIR filter is N-1

Page 21: Digital fiiter

FIR Filter Structures

In this form the difference equation is implemented directly as given.

Direct form

1

0

)()()(N

m

mnxmhny

z-1

h(1)

z-1z-1

h(2)

)(nx

)(nyh(0) h(N-2) h(N-1)

It requires N multiplications

Page 22: Digital fiiter

FIR Filter Structures

In this form the system function H(z) is converted into products of second-order sections with real coefficients

Cascade form

2

1

22

110

1

0

)()()(

N

kkkk

N

n

n zbzbbznhzH

It requires (3N/2) multiplications

z-1

z-1

z-1

z-1

z-1

z-1

b11

b21

b01

b12

b22

b02

b1x

b2x

b0x)(nx )(ny

Page 23: Digital fiiter

FIR Filter Structures

Linear-phase form

When an FIR filter has a linear phase response, its impulse response exhibits the above symmetry conditions. In this form we exploit these symmetry relations to reduce multiplications by about half.

Linear phase:The phase response is a linear function of frequency

Linear-phase condition

)1()()1()(nNhnhnNhnh

Symmetric impulse response

Antisymmetric impulse response

Page 24: Digital fiiter

If N is odd

211

21

0

)1(

12

1

0

)1(211

21

0

1

12

1

211

21

0

1

0

)2

1(])[(

)1()2

1()(

)()2

1()(

)()(

NN

n

nNn

N

m

mNN

N

n

n

N

Nn

nN

N

n

n

N

n

n

zNhzznh

zmNhzNhznh

znhzNhznh

znhzH

mNnlet 1

mnlet

)1()( nNhnh

Page 25: Digital fiiter

If N is odd

211

21

0

)1( )2

1(])[()(

N

N

n

nNn zNhzznhzH

1 for symmetric -1 for antisymmetric

z-1

±1z-1

z-1

±1z-1

±1

z-1

±1z-1

)12

1( Nh )2

1( Nh)2(h)1(h)0(h

)(nx

)(ny

Page 26: Digital fiiter

If N is even

12

0

)1(

12

0

)1(

12

0

1

2

12

0

1

0

])[(

)1()(

)()()()(

N

n

nNn

N

m

mN

N

n

n

N

Nn

n

N

n

nN

n

n

zznh

zmNhznh

znhznhznhzH

mNnlet 1

mnlet

)1()( nNhnh

Page 27: Digital fiiter

If N is even

1

2

0

)1( ])[( )(

N

n

nNn zznhzH

1 for symmetric -1 for antisymmetric

z-1

±1z-1

z-1

±1z-1

±1

z-1

±1z-1

)22

( Nh )12

( Nh)2(h)1(h)0(h

)(nx

)(ny

z-1±1

The linear-phase filter structure requires 50% fewer multiplications than the direct form.

Page 28: Digital fiiter

FIR Filter Structures

Frequency sampling form

This structure is based on the DFT of the impulse response h(n) and leads to a parallel structure. It is also suitable for a design technique based on the sampling of frequency response H(z)

1

0

1

01

)()(11

)(1)1()(N

kkc

N

kk

N

N zHzHNzW

kHN

zzH

Page 29: Digital fiiter

Nc zzH 1)(

It has N equally spaced zeros on the unit circle 1,,1,0 ,

2

Nkezk

Nj

k

)2

sin(21)( 2 NjeeeHNjNjj

c

)2

sin(2)( NeH jc

Nz

N2

N4

)( jc eH

0

2

All-zero filter or comb filter

Page 30: Digital fiiter

It has N equally spaced poles on the unit circle

1

01

1

0 1)(

)(N

kk

N

N

kk zW

kHzH

1,,1,0 ,2

Nkezk

Nj

k

resonant filter

The pole locations are identical to the zero locations and that

both occur at , which are the frequencies at which

the designed frequency response is specified. The gains of

the filter at these frequencies are simply the complex-valued

parameters

kN 2

)(kH

Page 31: Digital fiiter

1

0

1

01

)()(11

)(1)1()(N

kkc

N

kk

N

N zHzHNzW

kHN

zzH

Nz

z-10NW

)0(H

z-11NW

)1(H

z-1)1( NNW

)1( NH

)(nx )(ny

Page 32: Digital fiiter

FIR Filter Structures

Problems

It requires a complex arithmetic implementation

It is possible to obtain an alternate realization in which only real arithmetic is used. This realization is derived using the symmetric properties of the DFT and the factor.k

NW

It has poles on the unit circle, which makes this filter critically unstable

We can avoid this problem by sampling H(z) on a circle |z|=r where the radius r is very close to one but is less than one.

Page 33: Digital fiiter

1

011

)(1)(N

kk

N

rNN

zrW

kHNzrzH

r

jIm[z]

Re[z]

unit circle

)()( kHkH r

)(kH

)(kH r

1

011

)(1)(N

kk

N

NN

zrWkH

NzrzH

1

011

)(1)(N

kk

N

N

zWkH

NzzH

Page 34: Digital fiiter

1

011

)(1)(N

kk

N

NN

zrWkH

NzrzH

By using the symmetric properties of the DFT and the factor, a pair of single-pole filters can be combined to form a single two-pole filter with real-valued parameters.

kNW

1,,1,0 ,2

Nkezk

Nj

k

For poles

kkN zz

kN

kN

kNjkN

NjkN

N rWWrerrerW )()(2)(2

)(

h(n) is a real-valued sequence, so

)())(()( kRkNHkH NN

Page 35: Digital fiiter

So the kth and (N-k)th resonant filters can be combined to form a second-order section with real-valued coefficients)(zH k

221

110

11

1)(1

)2cos(211)(

1)(

1)(

1)(

)(

zrkN

rz

zbb

zrWkH

zrWkH

zrWkNH

zrWkH

zH

kkkN

kN

kNN

kN

k

even is ,12

,,2,1

odd is ,2

1,,2,1

NNk

NNk

])(Re[2

)](Re[2

1

0kNk

k

WkHrb

kHb

Page 36: Digital fiiter

If N is even, the filter has a pair of real-valued poles rz

If N is odd, the filter has a single real-valued pole rz

1

)2()(

1)0(

)(1

210

rz

NHzH

rzH

zH N

1

)0()(

10

rzH

zH

jIm[z]

Re[z]

N is even

|z|=r

0k2Nk

jIm[z]

Re[z]

N is odd

|z|=r

0k2Nk

Page 37: Digital fiiter

second-order section

b1kz-1

z-1

b0k

)2cos(2 kN

r

2r

first-order sections

z-1 r

)0(H

)(0 zH

z-1 r

)2(NH

)(2zHN

Page 38: Digital fiiter

N is even

12

120 )()()(1)(

N

kkN

NN

zHzHzHNzrzH

N is odd

2)1(

10 )()(1)(

N

kk

NN

zHzHNzrzH

NN zr

)(0 zH

)(1 zH

)(zH k

)(2zHN

N1

)(nx )(ny

Page 39: Digital fiiter

FIR Filter Structures

Fast convolution form

x(n): N1-point sequence

h(n): N2-point sequence

L ≥ N1 + N2 - 1

)(kXL-point

DFT

L-pointDFT

L-pointIDFT

)(nx

)(ny

)(kH

)(kY

)(nh

Page 40: Digital fiiter

Copyright © 2005. Shi Ping CUC

return

0 1 2 3 4 5 6 7 8 9 100

2

4

6

h(n)=h(N-1-n)

n

0 1 2 3 4 5 6 7 8 90

2

4

6

h(n)=h(N-1-n)

n

0 1 2 3 4 5 6 7 8 9 10-4

-2

0

2

4h(n)=-h(N-1-n)

n

0 1 2 3 4 5 6 7 8 9-4

-2

0

2

4h(n)=-h(N-1-n)

n

11N

10N

11N

10N