1. Trang chủ
  2. » Giáo Dục - Đào Tạo

bg physiological signal processing 06 discrete filters2020mk 9652

260 1 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Discrete filters
Tác giả Nguyễn Công Phương
Chuyên ngành Physiological Signal Processing
Thể loại lecture notes
Năm xuất bản 2020
Định dạng
Số trang 260
Dung lượng 2,16 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Design of FIR Filtersa The Filter Design Problem b FIR Filters with Linear Phase c Design of FIR Filter by Windowing d Design of FIR Filter by Frequency Sampling e Chebyshev Polynomials

Trang 1

Nguyễn Công Phương

PHYSIOLOGICAL SIGNAL PROCESSING

Discrete Filters

Trang 2

I Introduction

II Introduction to Electrophysiology

III Signals and Systems

IV Fourier Analysis

V Signal Sampling and Reconstruction

VI The z-Transform

Trang 3

Discrete Filters

1 Types of Filters

2 Transfer Function and Frequency Response

3 Group Delay and Inverse System

4 Minimum and Linear Phase Filters

5 Design of FIR Filters

6 Design of IIR Filters

7 Structure of Realization of Discrete Filters

Trang 4

Types of Filters (1)

http://reactivex.io/documentation/operators/filter.html

Trang 5

Types of Filters (2)

FILTER

Trang 7

3 Group Delay and Inverse System

4 Minimum and Linear Phase Filters

5 Design of FIR Filters

6 Design of IIR Filters

7 Structure of Realization of Discrete Filters

Trang 8

=

( ) ( )

Trang 9

Transfer Function (2)

System

( ) ( )

Trang 10

( )

M

k k k N

k k k

Trang 13

Consider a system function

Find its corresponding difference equation?

1

2

1 2

( ) [ ] ( ) [ ]

Trang 15

3 Group Delay and Inverse System

4 Minimum and Linear Phase Filters

5 Design of FIR Filters

6 Design of IIR Filters

7 Structure of Realization of Discrete Filters

Trang 16

=

( ) ( )

H j

H j

ω ω





Trang 17

Frequency Response (1)

System

( ) ( )

H j

H j

ω ω

ω

=

Trang 18

( ) 2

cos

Trang 20

Frequency Response (4)

10 o

20 log ( ) 0.3 ( ) 207

dB

H j

ω ω

Trang 21

Frequency Response (5)

0.015 o

/ 2 10 0.9661

0 207

Y Y

Y Y

Trang 22

Frequency Response (6)

10 o

20 log ( ) 5.9 ( ) 345

dB

H j

ω ω

Trang 23

Frequency Response (7)

0.295 o

/ 2 10 0.5070

0 345

Y Y

Y Y

ω

=

Trang 26

Discrete Filters

1 Types of Filters

2 Transfer Function and Frequency Response

3 Group Delay and Inverse System

4 Minimum and Linear Phase Filters

5 Design of FIR Filters

6 Design of IIR Filters

7 Structure of Realization of Discrete Filters

Trang 27

Group Delay and Inverse System

j phase delay

dx

H e d

Trang 28

Group Delay and Inverse System

Trang 29

Group Delay and Inverse System

(3)

An LTI system H(z) with input x[n] and output y[n] is said to be invertible

if we can uniquely determine x[n] from y[n]

[ ] * inv [ ] [ ]

h n h n = δ n

1 ( ) inv ( )

( )

M

k k k

N

k k k

Trang 30

Discrete Filters

1 Types of Filters

2 Transfer Function and Frequency Response

3 Group Delay and Inverse System

4 Minimum and Linear Phase Filters

5 Design of FIR Filters

6 Design of IIR Filters

7 Structure of Realization of Discrete Filters

Trang 31

Minimum and Linear Phase

Filters (1)

A causal and stable system H(z) with a causal and stable inverse H inv (z) is known as a

• H (z) is minimum – phase if both its poles &

zeros are inside the unit circle.

Trang 32

Minimum and Linear Phase

We can obtain the minimum – phase system by replacing each factor (1 + az–1)

(|a| > 1), by a factor of the form a(1 + a–1z–1)

Trang 33

Minimum and Linear Phase

mix mix max

- 0.5 0 0.5 1 1.5

0 5 1

Trang 34

Minimum and Linear Phase

mix mix max

Trang 35

Minimum and Linear Phase

Trang 36

Minimum and Linear Phase

Trang 37

Minimum and Linear Phase

Trang 38

Discrete Filters

1 Types of Filters

2 Transfer Function and Frequency Response

3 Group Delay and Inverse System

4 Minimum and Linear Phase Filters

5 Design of FIR Filters

6 Design of IIR Filters

7 Structure of Realization of Discrete Filters

Trang 39

Design of FIR Filters

00

( )

1

k k

k k

Trang 40

Design of FIR Filters

a) The Filter Design Problem

b) FIR Filters with Linear Phase

c) Design of FIR Filter by Windowing

d) Design of FIR Filter by Frequency Sampling e) Chebyshev Polynomials & Minimax

Trang 41

The Filter Design Problem (1)

1

Filter Spec trum of input s ignal #2

0.2 0.2002 0.2004 0.2006 0.2008 0.201 0.2012 0.2014 0.2016 0.2018 0.202

Time

-2 -1 0 1

Spec trum of output s ignal #2

Trang 42

The Filter Design Problem (2)

1

Filter #2 Spec trum of input s ignal

0.2 0.2002 0.2004 0.2006 0.2008 0.201 0.2012 0.2014 0.2016 0.2018 0.202

Time

-2 -1 0 1

Spec trum of output s ignal #2

Trang 43

The Filter Design Problem (3)

1

Filter #2 Spec trum of input s ignal

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

/

0 0.5

Output s ignal #2

Trang 44

The Filter Design Problem (4)

1

Filter #2 Spec trum of input s ignal

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

/

0 0.5

Output s ignal #2

Trang 45

The Filter Design Problem (5)

Trang 46

The Filter Design Problem (6)

1 2

Trang 47

The Filter Design Problem (7)

Trang 48

The Filter Design Problem (8)

2 2

Trang 49

The Filter Design Problem (9)

Trang 50

Design of FIR Filters

a) The Filter Design Problem

b) FIR Filters with Linear Phase

c) Design of FIR Filter by Windowing

d) Design of FIR Filter by Frequency Sampling e) Chebyshev Polynomials & Minimax

Trang 51

FIR Filters with Linear Phase (1)

[ ]

c lp

= 6.5

-0.1 0 0.1 0.2 0.3 0.4

Trang 52

FIR Filters with Linear Phase (2)

Trang 53

FIR Filters with Linear Phase

Trang 54

FIR Filters with Linear Phase

Trang 55

FIR Filters with Linear Phase

Trang 56

FIR Filters with Linear Phase

Trang 57

FIR Filters with Linear Phase

Trang 58

FIR Filters with Linear Phase

Trang 59

FIR Filters with Linear Phase

2

M j

2 1

Trang 60

FIR Filters with Linear Phase

Trang 61

FIR Filters with Linear Phase

Trang 62

FIR Filters with Linear Phase

Trang 63

FIR Filters with Linear Phase

M j

2 1

Trang 64

FIR Filters with Linear Phase

Trang 65

FIR Filters with Linear Phase

Trang 66

FIR Filters with Linear Phase

( ) sin [ ]cos

2

M j

2 1

Trang 67

FIR Filters with Linear Phase

Trang 68

FIR Filters with Linear Phase

Trang 69

FIR Filters with Linear Phase (9)

Trang 70

FIR Filters with Linear Phase

(10)

( ) 0

1 [ ]cos

1 [ ]sin

Trang 71

FIR Filters with Linear Phase

(11)

( ) 0

Trang 72

FIR Filters with Linear Phase

ω

sin ω

sin 2

ω

Uses

LP, HP, BP, BS multiband filters

LP, BP

Differentiators, Hilbert transformers

Differentiators, Hilbert transformers

Trang 73

FIR Filters with Linear Phase

Trang 74

FIR Filters with Linear Phase

Trang 75

Design of FIR Filters

a) The Filter Design Problem

b) FIR Filters with Linear Phase

c) Design of FIR Filter by Windowing

i Direct Truncation of an Ideal Impulse Response

ii Smoothing the Frequency Response Using Fixed

Windows iii Filter Design Using the Adjustable Kaiser Window

d) Design of FIR Filter by Frequency Sampling

e) Chebyshev Polynomials & Minimax Approximation f) Equiripple Optimum Chebyshev FIR Filter Design g) Design of Some Special FIR Filters

Trang 77

sin( / 2) 1

j M M

j n

Trang 79

Direct Truncation of

an Ideal Impulse Response (4)

ω π

Trang 81

Design of FIR Filters

a) The Filter Design Problem

b) FIR Filters with Linear Phase

c) Design of FIR Filter by Windowing

i Direct Truncation of an Ideal Impulse Response

ii Smoothing the Frequency Response Using Fixed

Windows

iii Filter Design Using the Adjustable Kaiser Window

d) Design of FIR Filter by Frequency Sampling

e) Chebyshev Polynomials & Minimax Approximation f) Equiripple Optimum Chebyshev FIR Filter Design g) Design of Some Special FIR Filters

Trang 82

Smoothing the Frequency Response

Using Fixed Windows (1)

2 / , 0 / 2, [ ] 2 2 / , / 2

0, 5 0,5 cos(2 / ), 0 [ ]

Trang 83

Smoothing the Frequency Response

Using Fixed Windows (2)

Trang 84

Smoothing the Frequency Response

Using Fixed Windows (3)

Window Side lobe

Trang 85

Smoothing the Frequency Response

Using Fixed Windows (4)

Trang 86

Smoothing the Frequency Response

Using Fixed Windows (5)

1 Given the design specification {ω p , ω s , A p , A s }, determine the

ripples δ p , δ s , and set δ = min{δ p , δ s }.

2 Determine the cutoff frequency of the ideal lowpass prototype by

ω

c = (ω p + ω s )/2.

3 Determine the design parameters A = –20log 10 δ & Δω = ω s – ω p

4 From the table choose the window function that provides the

smallest stopband attenuation greater than A.

5 Determine M = L – 1 from Δω in the table If M is odd, we may

increase it by one.

6 Determine the impulse response of the ideal lowpass filter by

7 Compute the impulse response h[n] = h d [n]w[n].

8 Check whether the designed filter satisfies the prescribed

specifications; if not, increase the order M and go back to step 6.

c d

n M

h n

n M

ω π

=

Trang 87

Smoothing the Frequency Response

Using Fixed Windows (6)

Design a lowpass linear-phase FIR to satisfy the following specifications:

Δω (exact)

δ p ≈ δ s A p

(dB)

A s (dB)

Rect –13 4π/L 1.8π/L 0.09 0.75 21Bartlett –25 8π/L 6.1π/L 0.05 0.45 26Hann –31 8π/L 6.2π/L 0.0063 0.055 44Hamming –41 8π/L 6.6π/L 0.0022 0.019 53Blackman –57 12π/L 11π/L 0.0002 0.0017 74

Trang 88

Smoothing the Frequency Response

Using Fixed Windows (7)

Design a lowpass linear-phase FIR to satisfy the following specifications:

-3 Approximation error

Trang 89

Design of FIR Filters

a) The Filter Design Problem

b) FIR Filters with Linear Phase

c) Design of FIR Filter by Windowing

i Direct Truncation of an Ideal Impulse Response

ii Smoothing the Frequency Response Using Fixed

Windows

iii Filter Design Using the Adjustable Kaiser Window

d) Design of FIR Filter by Frequency Sampling

e) Chebyshev Polynomials & Minimax Approximation f) Equiripple Optimum Chebyshev FIR Filter Design g) Design of Some Special FIR Filters

Trang 90

Filter Design Using the

Adjustable Kaiser Window (1)

2 0

A M

ω

=

Trang 91

Filter Design Using the Adjustable Kaiser Window (2)

20

0.2 0.4 0.6 0.8 1

Kaiser, M = 20

= 0 = 5 = 8

-100 -80 -60 -40 -20

Trang 92

Filter Design Using the Adjustable Kaiser Window (3)

1 Given the design specification {ω p , ω s , A p , A s }, determine the

ripples δ p , δ s , and set δ = max{δ p , δ s }.

2 Determine the cutoff frequency of the ideal lowpass prototype by

ω

c = (ω p + ω s )/2.

3 Determine the design parameters A = –20log 10 δ & Δω = ω s – ω p

4 Determine the required values of & M from formulae If M is odd,

we may increase it by one.

5 Determine the impulse response of the ideal lowpass filter by

6 Compute the impulse response h[n] = h d [n]w[n].

7 Check whether the designed filter satisfies the prescribed

specifications; if not, increase the order M and go back to step 6.

c d

n M

h n

n M

ω π

=

Trang 93

Filter Design Using the Adjustable Kaiser Window (4)

Design a lowpass linear-phase FIR to satisfy the following specifications:

Trang 94

Filter Design Using the Adjustable Kaiser Window (5)

Design a lowpass linear-phase FIR to satisfy the following specifications:

10-3 Approximation error

Trang 95

Filter Design Using the Adjustable Kaiser Window (6)

Ex 2

Design a bandpass filter using a Kaiser window:

( ) 0.01, 0.2 0.99 ( ) 1.01, 0.3 0.7

Trang 96

Filter Design Using the Adjustable Kaiser Window (7)

=

1 1

40 8

55.7 2.285(0.08 )

Trang 97

Filter Design Using the Adjustable Kaiser Window (8)

10-3 Approxim ation error

Trang 98

Design of FIR Filters

a) The Filter Design Problem

b) FIR Filters with Linear Phase

c) Design of FIR Filter by Windowing

d) Design of FIR Filter by Frequency Sampling

e) Chebyshev Polynomials & Minimax

Trang 99

Design of FIR Filter by Frequency Sampling (1)

Trang 100

Design of FIR Filter by

L

Q  − 

=  

Trang 101

Design of FIR Filter by Frequency Sampling (3)

ω π

Trang 102

Design of FIR Filter by Frequency Sampling (4)

/ 0

/ 0

Trang 103

Design of FIR Filter by Frequency Sampling (5)

/ 0

Trang 104

Design of FIR Filter by Frequency Sampling (6)

1 Choose the order of the filter M by placing at least

two samples in the transition band.

2 For a window design approach obtain samples of the

desired frequency response H d [k] For a smooth

transition band approach, use a straight-line or a

raised-cosine.

3 Compute the (M + 1)-point IDFT of H d [k] to obtain

h [n] For a window design approach multiply h[n] by

the appropriate window function.

4 Compute response H d (e jω ) and verify the design over

passband & stopband.

5 If the specifications are not met, increase M & go back

to step 1.

Trang 105

Design of FIR Filter by Frequency Sampling (7)

Design a lowpass linear-phase FIR to satisfy the following specifications:

Trang 106

Design of FIR Filter by Frequency Sampling (8)

Ex 1

Trang 107

Design of FIR Filters

a) The Filter Design Problem

b) FIR Filters with Linear Phase

c) Design of FIR Filter by Windowing

d) Design of FIR Filter by Frequency Sampling

e) Chebyshev Polynomials & Minimax

Trang 108

Chebyshev Polynomials &

Trang 109

Chebyshev Polynomials &

Trang 110

Chebyshev Polynomials &

Trang 111

Chebyshev Polynomials &

Minimax Approximation (4)

• Chebyshev’s theorem : Off all polynomials of

degree m with coefficient of x m equal to 1, the

Chebyshev polynomial T m (x) multiplied by

2 –(m – 1) has the least maximum amplitude on the interval [–1, 1].

• Alternation theorem : Suppose that f(x) is a

continuous function Then P m (x) is the best

minimax approximating polynomial to f(x) if and only if the error e(x) = f(x) – P m (x) has an (m+2)-point equiripple property.

Trang 112

Chebyshev Polynomials &

( ) ( ) ( ) 0.125

e x = xP x = x − + x

Trang 113

Design of FIR Filters

a) The Filter Design Problem

b) FIR Filters with Linear Phase

c) Design of FIR Filter by Windowing

d) Design of FIR Filter by Frequency Sampling e) Chebyshev Polynomials & Minimax

Trang 114

Equiripple Optimum Chebyshev

FIR Filter Design (1)

sin , sin( / 2),

odd even

Trang 115

Equiripple Optimum Chebyshev

FIR Filter Design (2)

Trang 116

Equiripple Optimum Chebyshev

FIR Filter Design (3)

R j

then a necessary and sufficient condition that P(e) be the unique solution of

is that the weighted error function E(ω) exhibit at least R + 2 alternation in B.

That is, there must exist R + 2 extremal frequencies ω1 < ω2 < …< ωR+2

such that for every k = 1, 2, …, R + 2:

Trang 117

Equiripple Optimum Chebyshev

FIR Filter Design (4)

Trang 118

Equiripple Optimum Chebyshev

FIR Filter Design (5)

Calculate error E(ω)

& find local maxima

Trang 119

Equiripple Optimum Chebyshev

FIR Filter Design (6)

Design a lowpass linear-phase FIR to satisfy the following specifications:

Trang 120

Equiripple Optimum Chebyshev

FIR Filter Design (7)

Design a lowpass linear-phase FIR to satisfy the following specifications:

ωp = 0.25π; ωs = 0.35π; Ap = 0.1dB; As = 50dB.

Ex 1

Trang 121

Equiripple Optimum Chebyshev

FIR Filter Design (8)

Trang 122

Equiripple Optimum Chebyshev

FIR Filter Design (9)

Ex 2

Design a bandpass filter using a Kaiser window:

( ) 0.01, 0.2 0.99 ( ) 1.01, 0.3 0.7

( ) 0.01, 0.78

j j j

H e

H e

H e

ωωω

Trang 123

Equiripple Optimum Chebyshev

FIR Filter Design (10)

Ex 2

Trang 124

Design of FIR Filters

a) The Filter Design Problem

b) FIR Filters with Linear Phase

c) Design of FIR Filter by Windowing

d) Design of FIR Filter by Frequency Sampling

e) Chebyshev Polynomials & Minimax Approximation f) Equiripple Optimum Chebyshev FIR Filter Design

g) Design of Some Special FIR Filters

i Discrete-Time Differentiators

ii Discrete-Time Hilbert Transformers

iii Ideal Raised-Cosine Pulse-Shaping Lowpass Filter

Trang 126

Discrete-Time Differentiators (2)

Trang 127

Design of FIR Filters

a) The Filter Design Problem

b) FIR Filters with Linear Phase

c) Design of FIR Filter by Windowing

d) Design of FIR Filter by Frequency Sampling

e) Chebyshev Polynomials & Minimax Approximation f) Equiripple Optimum Chebyshev FIR Filter Design

g) Design of Some Special FIR Filters

i Discrete-Time Differentiators

ii Discrete-Time Hilbert Transformers

iii Ideal Raised-Cosine Pulse-Shaping Lowpass Filter

Trang 128

Hamming window method

/

0 0.2 0.4 0.6 0.8 1

Frequency sampling method

Trang 129

Design of FIR Filters

a) The Filter Design Problem

b) FIR Filters with Linear Phase

c) Design of FIR Filter by Windowing

d) Design of FIR Filter by Frequency Sampling

e) Chebyshev Polynomials & Minimax Approximation f) Equiripple Optimum Chebyshev FIR Filter Design

g) Design of Some Special FIR Filters

i Discrete-Time Differentiators

ii Discrete-Time Hilbert Transformers

iii Ideal Raised-Cosine Pulse-Shaping Lowpass Filter

Trang 130

Ideal Raised-Cosine Pulse-Shaping Lowpass Filters

n

0 0.1 0.2 0.3

Trang 131

Discrete Filters

1 Types of Filters

2 Transfer Function and Frequency Response

3 Group Delay and Inverse System

4 Minimum and Linear Phase Filters

5 Design of FIR Filters

6 Design of IIR Filters

7 Structure of Realization of Discrete Filters

Ngày đăng: 12/12/2022, 21:46