28
1 Digital Filter Realization From Computer and Electrical Dept. From Computer and Electrical Dept. Doaa’ Jaber 220039350 Doaa’ Jaber 220039350 Reham Habashi 220032945 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Noura EL–Ramlawi 220031500 Submitted to: Submitted to: Dr. Hatem El-Aydi Dr. Hatem El-Aydi F F I I L L T T E E R R S S

1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

Embed Size (px)

Citation preview

Page 1: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

1

Digital Filter RealizationDigital Filter Realization

From Computer and Electrical Dept.From Computer and Electrical Dept. Doaa’ Jaber 220039350Doaa’ Jaber 220039350

Reham Habashi 220032945Reham Habashi 220032945 Noura EL–Ramlawi 220031500Noura EL–Ramlawi 220031500

Submitted to: Submitted to: Dr. Hatem El-AydiDr. Hatem El-Aydi

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 2: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

2

Contents:Contents: Contents:Contents:

What is filtering?What is filtering? Digital FiltersDigital Filters Digital Filter CharacteristicsDigital Filter Characteristics Digital Filter ClassificationDigital Filter Classification IIR filter.IIR filter. Digital filter design.Digital filter design. What and why Realization?What and why Realization? Realization of IIR filters.Realization of IIR filters. Direct form realizationDirect form realization Cascade realizationCascade realization Parallel realizationParallel realization State variable realization.State variable realization. Direct Programming RealizationDirect Programming Realization Nested Programming RealizationNested Programming Realization Transformed State Vector RealizationTransformed State Vector Realization Conclusion.Conclusion. References.References.

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 3: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

3

What is filtering?What is filtering? What is filtering?What is filtering?

Filtering is a process of selecting, or Filtering is a process of selecting, or suppressing, certain frequency suppressing, certain frequency components of a signal.components of a signal.

Filtering is often done to suppress noise.Filtering is often done to suppress noise.

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 4: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

4

What is Digital Filters?What is Digital Filters? What is Digital Filters?What is Digital Filters?

Digital filterDigital filter is a discrete-time system is a discrete-time system that alters the spectral information that alters the spectral information contained in some discrete-time signal x contained in some discrete-time signal x producing a new discrete-time signal yproducing a new discrete-time signal y

Sampled signals are represented digitally Sampled signals are represented digitally as sequences of numbersas sequences of numbers

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 5: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

5

Digital Filter CharacteristicsDigital Filter Characteristics

Algorithm running on a processing core. Programmable. Easily designed, tested, and implemented on PC. Are not subject to drift or dependent on

temperature. Can accurately handle low-frequency signals.

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 6: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

6

Digital Filter ClassificationDigital Filter ClassificationDigital Filter ClassificationDigital Filter Classification

• Digital filter are characterized by their impulse Digital filter are characterized by their impulse response.response.

• A filter’s impulse response is its response to an A filter’s impulse response is its response to an impulse input.impulse input.

• Impulse response:Impulse response:

Completely (LTI) systems.Completely (LTI) systems. Uniquely determines frequency response.Uniquely determines frequency response. Finite duration (FIR) or infinite duration (IIRFinite duration (FIR) or infinite duration (IIR).

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 7: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

7

IIR FiltersIIR FiltersIIR FiltersIIR Filters

IIR (infinite impulse response) filters IIR (infinite impulse response) filters allow zeros and poles; FIR allow zeros allow zeros and poles; FIR allow zeros only. IIR can be more selective for a only. IIR can be more selective for a given filter order.given filter order.

IIR also called recursive filters: output IIR also called recursive filters: output depends on past inputs and past outputs.depends on past inputs and past outputs.

IIR designs are not guaranteed to be IIR designs are not guaranteed to be stable.stable.

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 8: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

8

Digital filter designDigital filter designDigital filter designDigital filter design

Digital Digital filter designfilter design is a process in which we is a process in which we construct a digital hardware or a program construct a digital hardware or a program (software) that meets the given specification(software) that meets the given specification FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Define the specifications of filterDefine the specifications of filter Selection of appropriate technique for Selection of appropriate technique for

filter’s coefficient evaluationfilter’s coefficient evaluation Selection of appropriate structure of filterSelection of appropriate structure of filter Analysis of finite word-length effectAnalysis of finite word-length effect ImplementationImplementation

Page 9: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

9

What and why Realization?What and why Realization? What and why Realization?What and why Realization?

RealizationRealization is the process of converting the is the process of converting the transfer function into a block diagram or transfer function into a block diagram or program (software); this block diagram or program (software); this block diagram or software is called the realizationsoftware is called the realization

Designers are interested in realizations which Designers are interested in realizations which are economical, simple, and cheap, with short are economical, simple, and cheap, with short word-length and high dynamic rangeword-length and high dynamic range

Numerical values of the coefficients are Numerical values of the coefficients are calculated from the transfer function.calculated from the transfer function.

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 10: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

10

Realization of IIR filters.Realization of IIR filters.Realization of IIR filters.Realization of IIR filters.

Forms of realization of IIR filters:Forms of realization of IIR filters: Direct.Direct. Cascade.Cascade. Parallel.Parallel. State Variable.State Variable.

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 11: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

11

Direct-form Realization.Direct-form Realization.Direct-form Realization.Direct-form Realization.

Direct-form IDirect-form I filters are realized directly from the difference filters are realized directly from the difference

equation:equation:

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS)()()(

01

knxbknyanyM

kk

N

kk

Page 12: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

12

By breaking H(z) into a product of two transfer By breaking H(z) into a product of two transfer functions:functions:By breaking H(z) into a product of two transfer By breaking H(z) into a product of two transfer functions:functions:

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Direct-form IIDirect-form II

Page 13: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

13

Example(1)Example(1)Example(1)Example(1)

Find the direct form I and direct form II of:Find the direct form I and direct form II of:

Solu:Solu:

First H(z) should be changed to rational poly in First H(z) should be changed to rational poly in

Then solution is:Then solution is:

21

41

211482

23

zzz

zzzzH

1z

321321

8

1

43

45

121148 zzzzzzzH

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 14: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

14

Realization blocksRealization blocksRealization blocksRealization blocks

Direct form IDirect form I

Direct form IIDirect form II

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 15: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

15

Cascade Realization of IIR Filter:Cascade Realization of IIR Filter:Cascade Realization of IIR Filter:Cascade Realization of IIR Filter:

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

)().........()()( 11 zHzHzHzH KK

In the cascade realization, H(z) is broken into a In the cascade realization, H(z) is broken into a product of transfer functions H1(z), H2(z), ... ,Hi(z), product of transfer functions H1(z), H2(z), ... ,Hi(z), each a rational expression in zeach a rational expression in z1-1- as follows: as follows:

Also output equation is:Also output equation is:

)()().........()()( 11 zXzHzHzHzY KK

Page 16: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

16

Cont:Cont:Cont:Cont:

filters are realized as a cascade of first-order and filters are realized as a cascade of first-order and second-order sections. Each section can be second-order sections. Each section can be realized as direct-form I, direct-form II, or any realized as direct-form I, direct-form II, or any other type.other type.

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 17: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

17

Parallel realizationParallel realizationParallel realizationParallel realization

(z)X(z)H...(z)X(z)H(z)X(z)HY(z) k21

filters are realized as a filters are realized as a parallel connection of first-parallel connection of first-order and second-order order and second-order sections, that is, the outputs sections, that is, the outputs of the lower-order sections of the lower-order sections are connected to an adder. are connected to an adder. Each section can be realized Each section can be realized as direct-form I, direct-form as direct-form I, direct-form II, or any other type.II, or any other type.

)(...)()()( 21 zHzHzHzH k

Page 18: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

18

State variable representationState variable representationState variable representationState variable representation

)()()(01

knxbknyanyM

kk

N

kk

It is useful to represent a linear constant It is useful to represent a linear constant coefficient difference eq. by a system of first-coefficient difference eq. by a system of first-order linear constant coefficient differenceorder linear constant coefficient difference

Definition:Definition: The state of the system is the The state of the system is the minimal information required that along the minimal information required that along the input allows the determination of the output.input allows the determination of the output.

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 19: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

19

Cont.Cont.Cont.Cont.

)(

.

.

)(

)(

)(2

1

nv

nv

nv

nv

N

)(

)(

.

.

)(

)(

......)(2

1

21 ndx

nv

nv

nv

cccny

N

N

NT cccC ......21letlet

So y(n)=So y(n)=CTv(n)+v(n)+ddx(n)x(n)

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 20: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

20

Cont.Cont.Cont.Cont.

NNNNNN

N

N

N b

b

b

nv

nv

nv

aaa

aaa

aaa

nv

nv

nv

.

.

)(

.

.

)(

)(

..

.....

.....

..

..

)1(

.

.

)1(

)1(

2

1

2

1

21

22221

11211

2

1

y(n)=y(n)=AAv(n)+v(n)+BBx(n)x(n)

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 21: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

21

Direct Programming RealizationDirect Programming RealizationDirect Programming RealizationDirect Programming Realization

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 22: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

22

Nested Programming RealizationNested Programming RealizationNested Programming RealizationNested Programming Realization

(n)b(n)(n)

)()([)(

01

1

1

xvy

knxbknyanvN

k

kk

)(

.

.

)(

.

.

)(

)(

00.0

.....

.....

0100

0001

)1(

.

.

)1(

)1(

0

022

011

2

1

2

1

2

1

nx

bab

bab

bab

nv

nv

nv

a

a

a

nv

nv

nv

NNNNN

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 23: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

23

Transformed State Vector Realization.Transformed State Vector Realization.Transformed State Vector Realization.Transformed State Vector Realization.

An infinite number of state variable representations can be An infinite number of state variable representations can be obtained by performing special type of linear obtained by performing special type of linear transformation on an existing state variable representation.transformation on an existing state variable representation.

Let state model of the output eq is:Let state model of the output eq is:

ndxnvCny

nBxnAvnVT

1

nv 'Define Define

as product of v(n)by nonsingular matrix Q then:as product of v(n)by nonsingular matrix Q then:

NN

nQvnv '

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 24: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

24

Cont:Cont:Cont:Cont:

Then inserting an identity matrixThen inserting an identity matrix then we get: then we get:

RecognizeRecognize

And insert an identity matrix between and v(n) we get:And insert an identity matrix between and v(n) we get:

QQ 1

nQBxnQvQAQnQv 11

thennvAsnandQvnvAsnQv ,,,1,1 '' TC

nxdnvCny

nxBnvAnv'''

'''' 1

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 25: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

25

Cont:Cont:Cont:Cont:

To join with main equations new variables defined as:To join with main equations new variables defined as:

Which providing an infinite number of possible state Which providing an infinite number of possible state variable realization.variable realization.

dT dQCC

QBBQAQA

'1'

'1'

,

,FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 26: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

26

Conclusion:Conclusion:Conclusion:Conclusion:

In this presentation we learn more about digital In this presentation we learn more about digital filter characteristics.filter characteristics.

The definition of realization and its need for The definition of realization and its need for use are also mentioned.use are also mentioned.

Many form of realization are used in order to Many form of realization are used in order to get the best structure of the filter.get the best structure of the filter.

Matlab program is use for implement the block Matlab program is use for implement the block diagram of the filter easily.diagram of the filter easily.

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 27: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

27

ReferencesReferencesReferencesReferences

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS

Page 28: 1 Digital Filter Realization From Computer and Electrical Dept. Doaa’ Jaber 220039350 Reham Habashi 220032945 Noura EL–Ramlawi 220031500 Submitted to:

28

Thanks

FF

II

LL

TT

EE

RR

SS

FF

II

LL

TT

EE

RR

SS