Chapter 2 Review of Fundamentals of Digital Signal Processing 1 - - PowerPoint PPT Presentation

chapter 2
SMART_READER_LITE
LIVE PREVIEW

Chapter 2 Review of Fundamentals of Digital Signal Processing 1 - - PowerPoint PPT Presentation

Chapter 2 Review of Fundamentals of Digital Signal Processing 1 Outline DSP and Discrete Signals LTI Systems z-Transform Representations Discrete-Time Fourier Transform (DTFT) Discrete Fourier


slide-1
SLIDE 1

Chapter 2

Review of Fundamentals of Digital Signal Processing 数字信号处理基础回顾

1

slide-2
SLIDE 2

Outline

  • DSP and Discrete Signals
  • LTI Systems
  • z-Transform Representations
  • Discrete-Time Fourier Transform (DTFT)
  • Discrete Fourier Transform (DFT)
  • Digital Filtering
  • Sampling

2

slide-3
SLIDE 3

DSP and Discrete Signals

3

slide-4
SLIDE 4

What is DSP?

  • Digital

– Method to represent a quantity, a phenomenon or an event

  • Signal

– something (e.g., a sound, gesture, or object) that carries information – a detectable physical quantity (e.g., a voltage, current, or magnetic field strength) by which messages or information can be transmitted

  • Processing

– Filtering/spectral analysis – Analysis, recognition, synthesis and coding of real world signals – Detection and estimation of signals in the presence of noise or interference

4

slide-5
SLIDE 5

Digital Processing of Analog Signals

  • A-to-D conversion: bandwidth control, sampling and

quantization

  • Computational processing: implemented on computers or

ASICs(专用集成电路) with finite-precision arithmetic

– basic numerical processing: add, subtract, multiply (scaling, amplification, attenuation), mute, … – algorithmic numerical processing: convolution or linear filtering, non-linear filtering (e.g., median filtering), difference equations, DFT, inverse filtering, MAX/MIN, …

  • D-to-A conversion: re-quantification and filtering (or

interpolation) for reconstruction

5

slide-6
SLIDE 6

Discrete-Time Signals

  • A sequence of numbers
  • Mathematical representation
  • Sampled from an analog signal, , at time
  • is called the sampling period(采样周期), and its

reciprocal is called the sampling frequency(采样频 率)

6

[ ], x n n − ∞ < < ∞ ( )

a

x t t nT = [ ] ( ),

a

x n x nT n = − ∞ < < ∞ T 1/

s

F T = 8000Hz 1/ 8000 125 sec 10000Hz 1/10000 100 sec 16000Hz 1/16000 62.5 sec 20000Hz 1/ 20000 50 sec

s s s s

F T F T F T F T µ µ µ µ = ↔ = = = ↔ = = = ↔ = = = ↔ = =

slide-7
SLIDE 7

Speech Waveform Display

7

slide-8
SLIDE 8

Varying Sampling Rates

8

200 400 600 800 1000 1200 1400 1600

  • 0.5

0.5 16kHz 100 200 300 400 500 600 700 800 900 1000

  • 0.5

0.5 10kHz 100 200 300 400 500 600 700 800

  • 0.5

0.5 8kHz samples

slide-9
SLIDE 9

Quantization

  • Transforming a continuously

valued input into a representation that assumes one out of a finite set of values

  • The finite set of output values is

indexed; e.g., the value 1.8 has an index of 6, or (110) in binary representation

  • Storage or transmission uses

binary representation; a quantization table is needed

9

slide-10
SLIDE 10

Discrete Signals

10

slide-11
SLIDE 11

Issues with Discrete Signals

  • what sampling rate is appropriate

– 6.4 kHz (telephone bandwidth), 8 kHz (extended telephone BW), 10 kHz (extended bandwidth), 16 kHz (Hi-Fi speech)

  • how many quantization levels are necessary at

each bit rate (bits/sample)

– 16, 12, 8, … => ultimately determines the S/N ratio of the speech – speech coding is concerned with answering this question in an optimal manner

11

slide-12
SLIDE 12

The Sampling Theorem

  • A bandlimited signal can be reconstructed exactly from

samples taken with sampling frequency

12

max max

1 2 2

  • r

2

s s

F f T T π ω ω = ≥ = ≥

slide-13
SLIDE 13

Demo Examples

  • 5 kHz analog bandwidth

– sampled at 10, 5, 2.5, 1.25 kHz (notice the aliasing that arises when the sampling rate is below 10 kHz)

  • quantization to various levels

– 16,12,8, and 4 bit quantization (notice the distortion introduced when the number of bits is too low)

13

slide-14
SLIDE 14

Discrete-Time (DT) Signals are Sequences

  • x[n] denotes the “sequence value at ‘time’ n”
  • Sources of sequences

– Sampling a continuous-time signal – Mathematical formulas – generative system

14

[ ] ( ) ( )

c c t NT

x n x nT x t

=

= = e.g., [ ] 0.3 [ 1] 1; [0] 40 x n x n x = − − =

T

slide-15
SLIDE 15

Impulse Representation of Sequences

15

A sequence, a function Value of the function at k

[ ] [ ] [ ]

k

x n x k n k δ

∞ =−∞

= −

3 1 2 7

[ ] [ 3] [ 1] [ 2] [ 7] x n a n a n a n a n δ δ δ δ

= + + − + − + −

3 [

3] a n δ

+

1 [

1] a n δ −

2 [

2] a n δ −

7 [

7] a n δ −

slide-16
SLIDE 16

Some Useful Sequences

16

unit sample real exponential unit step sine wave 1, [ ] 0, n n n δ =  =  ≠  [ ]

n

x n α = 1, [ ] 0, n u n n ≥  =  <  [ ] cos( ) x n A n ω φ = +

slide-17
SLIDE 17

Variants on Discrete-Time Step Function

signal flips around 0

17

[ ] u n [ ] u n n − [ ] u n n − n n → − ⇔

slide-18
SLIDE 18

LTI Systems

18

slide-19
SLIDE 19

Signal Processing

  • Transform digital signal into more desirable form

19

single input—single output single input—multiple output, e.g., filter bank analysis, etc.

slide-20
SLIDE 20

LTI Discrete-Time Systems

  • Linearity (superposition)
  • Time-Invariance (shift-invariance)
  • LTI implies discrete convolution

20

1 2 1 2

T{ [ ] [ ]} T{ [ ]} T{ [ ]} ax n bx n a x n b x n + = +

1 1

[ ] [ ] [ ] [ ]

d d

x n x n n y n y n n = − ⇒ = − [ ] [ ] [ ] [ ] [ ] [ ] [ ]

k

y n x k h n k x n h n h n x n

∞ =−∞

= − = ∗ = ∗

slide-21
SLIDE 21

LTI Discrete-Time Systems

21

Example

Is system y[n] = x[n]+ 2x[n +1]+3 linear? x1[n] → y1 [n] = x1 [n]+ 2x1 [n +1]+3 x2[n] → y2 [n] = x2 [n]+ 2x2 [n +1]+3 x1 [n]+ x2 [n] → y3[n] = x1 [n]+ x2 [n]+ 2x1 [n +1]+ 2x2 [n +1]+3≠y1[n]+ y2[n] ⇒ Not a linear system! Is system y[n] = x[n]+2x[n +1]+3 time/shift invariant? y[n] = x[n]+ 2x[n +1]+3 y[n −n0] = x[n −n0]+ 2x[n −n0 +1]+3 ⇒ System is time invariant! Is system y[n] = x[n]+2x[n +1]+3 causal? y[n] depends on x[n +1] ⇒ System is not causal !

slide-22
SLIDE 22

Convolution Example

22

1, 0 3 [ ] 0, otherwise n x n ≤ ≤  =   1, 0 3 [ ] 0, otherwise n h n ≤ ≤  =   What is y[n] for this system? Solution

3 3

[ ] [ ] [ ] [ ] [ ] 1 1 1, 3 1 1 7 , 4 6 0,

  • therwise

m n m m n

y n x n h n h m x n m n n n n

∞ =−∞ = = −

= ∗ = −  ⋅ = + ≤ ≤    = ⋅ = − ≤ ≤     

∑ ∑ ∑

slide-23
SLIDE 23

23

slide-24
SLIDE 24

Convolution Example

The impulse response of an LTI system is of the form and the input to the system is of the form Determine the output of the system using the formula for discrete convolution.

Solution

24

[ ] [ ] 1,

n

x n b u n b b a = < ≠ [ ] [ ] 1

n

h n a u n a = <

1 1 1

[ ] [ ] [ ] [ ] ( / ) [ ] 1 ( / ) [ ] [ ] 1 ( / )

m n m m n n n m m n m m m n n n n

y n a u m b u n m b a b u n b a b u n a b b a b u n u n a b b a

∞ − =−∞ − = = + + +

= − = =     − − = =     − −    

∑ ∑ ∑

slide-25
SLIDE 25

Convolution Example

Consider a digital system with input x[n] =1 for n=0,1,2,3 and 0 everywhere else, and with impulse response Determine the response y[n] of this linear system.

Solution

  • We recognize that x[n] can be written as the difference between two step

functions, i.e., x[n]= u[n]- u[n-4].

  • Hence we can solve for y[n] as the difference between the output of the

linear system with a step input and the output of the linear system with a delayed step input.

  • Thus we solve for the response to a unit step as:

25

[ ] [ ], 1

n

h n a u n a = <

1 1 1 1 1

[ ] [ ] [ ] [ ] 1 [ ] [ ] [ 4]

n n m m

a a y n u m a u n m u n a y n y n y n

− ∞ − − =−∞

  − = − =   −   = − −

slide-26
SLIDE 26

Linear Time-Invariant Systems

  • easiest to understand
  • easiest to manipulate
  • powerful processing capabilities
  • characterized completely by their response to unit sample,

h[n], via convolution relationship

  • basis for linear filtering
  • used as models for speech production (source convolved with

system)

26

[ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]

k k

y n x n h n x k h n k h k x n k h n x n

∞ ∞ =−∞ =−∞

= ∗ = − = − = ∗

∑ ∑

slide-27
SLIDE 27

Signal Processing Operations

27

D is a delay of 1-sample Can replace D with delay element z-1

slide-28
SLIDE 28

Equivalent LTI Systems

28

slide-29
SLIDE 29

More Complex Filter Interconnections

29

1 2 3 4

[ ] [ ] [ ] [ ] [ ] ( [ ] [ ]) [ ]

c c

y n x n h n h n h n h n h n h n = ∗ = ∗ + +

slide-30
SLIDE 30

Network View of Filtering (FIR Filter)

30

1 1

[ ] [ ] [ 1] ... [ 1] [ ]

M M

y n b x n b x n b x n M b x n M

= + − + + − + + −

slide-31
SLIDE 31

Network View of Filtering (IIR Filter)

31

1 1

[ ] [ 1] [ ] [ 1] y n a y n b x n b x n = − − + + −

slide-32
SLIDE 32

z-Transform Representations

32

slide-33
SLIDE 33

Transform Representations

  • z-Transform

33

1

[ ] ( ) ( ) [ ] 1 [ ] ( ) 2

n n n C

x n X z X z x n z x n X z z dz j π

∞ − =−∞ −

↔ = =

∑ ∫ 

Infinite power series in z-1, with x[n] as coefficients of term in z-n

  • direct evaluation using residue theorem

(留数定理)

  • partial fraction expansion (部分分式展

开)of X(z)

  • long division (长除法)
  • power series expansion(幂级数展开)
slide-34
SLIDE 34

Transform Representations

  • X(z) converges (is finite) only for certain values of z

– Sufficient condition for convergence

  • region of convergence

34

[ ]

n n

x n z

∞ − =−∞

< ∞

1 2

R z R < <

slide-35
SLIDE 35

Examples of Converge Regions

  • 1. Delayed impulse

converges for

  • 2. Box pulse

all finite length sequences converge in the region 3. all infinite duration sequences which are non-zero for n≥0 converge in the region

35

[ ] [ ] x n n n δ = − ( )

n

X z z− = 0, 0; , 0; , z n z n z n > > < ∞ < ∀ = [ ] [ ] [ ] x n u n u n N = − −

1 1

1 ( ) 1

N N n n

z X z z z

− − − − =

− = = −

converges for 0 z < < ∞ z < < ∞ [ ] [ ] ( 1)

n

x n a u n a = <

1

1 ( ) 1

n n n

X z a z az

∞ − − =

= = −

converges for z a >

1

z R >

slide-36
SLIDE 36

Examples of Converge Regions

4. all infinite duration sequences which are non-zero for n<0 converge in the region 5. x[n] non-zero for -∞<n< ∞ can be viewed as a combination of 3 and 4, giving a convergence region of the form

– sub-sequence for n≥0 ⇒ – sub-sequence for n<0 ⇒ – total sequence ⇒

36

[ ] [ 1]

n

x n b u n = − − −

1 1

1 ( ) 1

n n n

X z b z bz

− − − =−∞

= − = −

converges for z b <

2

z R <

1 2

R z R < <

2

z R <

1

z R >

1 2

R z R < <

slide-37
SLIDE 37

Examples

If x[n] has z-transform X(z) with ROC of ri<|z|<ro , find the z- transform, Y(z), and the region of convergence for the sequence y[n]=an x[n] in terms of X(z) Solution

37

( ) [ ] ( ) [ ] [ ] [ ]( / ) ( / ) ROC:

n n n n n n n n n i

  • X z

x n z Y z y n z a x n z x n z a X z a a r z a r

∞ − =−∞ ∞ ∞ − − =−∞ =−∞ ∞ − =−∞

= = = = = < <

∑ ∑ ∑ ∑

slide-38
SLIDE 38

Examples

The sequence x[n] has z-transform X(z). Show that the sequence nx[n] has z-transform –zdX(z)/dz Solution

38

1

( ) [ ] ( ) 1 [ ] [ ] 1 ( [ ])

n n n n n n

X z x n z dX z nx n z nx n z dz z Z nx n z

∞ − =−∞ ∞ ∞ − − − =−∞ =−∞

= = − = − = −

∑ ∑ ∑

slide-39
SLIDE 39

Inverse z-Transform

where C is a closed contour that encircles the origin of the z- plane and lies inside the region of convergence

39

1

1 [ ] ( ) 2

n C

x n X z z dz j π

=

∫ 

for X(z) rational(有理), can use a partial fraction expansion (部分分式展开) for finding inverse transforms

slide-40
SLIDE 40

Partial Fraction Expansion

40

slide-41
SLIDE 41

Example of Partial Fractions

41

slide-42
SLIDE 42

Transform Properties

42

Linearity Shift Exponential Weighting Linear Weighting Time Reversal Convolution Multiplication of Sequences

1 2

[ ] [ ] ax n bx n +

1 2

( ) ( ) aX z bX z + [ ] x n n − ( )

n

z X z

[ ]

n

a x n

1

( ) X a z

[ ] nx n d ( ) / d z X z z − [ ] x n −

1

( ) X z− [ ] [ ] x n h n ∗ ( ) ( ) X z H z [ ] [ ] x n w n

1

1 ( ) ( / ) 2

C X v W z v v dz

j π

∫ 

slide-43
SLIDE 43

Discrete-Time Fourier Transform (DTFT)

43

slide-44
SLIDE 44

Discrete-Time Fourier Transform

  • evaluation of X(z) on the unit circle in the z-plane
  • sufficient condition for existence of Fourier transform is

44

( ) ( ) [ ] 1 [ ] ( ) d 2

j

j j n z e n j j n

X e X z x n e x n X e e

ω

ω ω π ω ω π

ω π

∞ − = =−∞ −

= = =

∑ ∫

[ ] [ ] , since 1

n n n

x n z x n z

∞ ∞ − =−∞ =−∞

= < ∞ =

∑ ∑

slide-45
SLIDE 45

Simple DTFTs

45

Impulse Delayed impulse Step function Rectangular window Exponential Backward exponential

slide-46
SLIDE 46

DTFT Examples

46

slide-47
SLIDE 47

DTFT Examples

Within interval is comprised of a pair of impulses at

47

, ( )

j

X e ω π ω π − < < ω ±

slide-48
SLIDE 48

DTFT Examples

48

slide-49
SLIDE 49

DTFT Examples

49

slide-50
SLIDE 50

Fourier Transform Properties

  • Periodicity in ω
  • Period of 2π corresponds to once around unit circle in the z-

plane

50

( 2 )

( ) ( )

j j k

X e X e

ω ω π +

=

  • normalized frequency: f, 0→0.5 →1 (independent of Fs)
  • normalized radian frequency: ω, 0→π →2π (independent of Fs)
  • digital frequency : fD=f*Fs, 0→0.5Fs →Fs
  • digital radian frequency : ωD= ω*Fs, 0→πFs→2πFs
slide-51
SLIDE 51

Discrete Fourier Transform (DFT)

51

slide-52
SLIDE 52

Discrete-Time Fourier Series

  • consider a periodic signal with period N (samples)

can be represented exactly by a discrete sum of sinusoids

52

[ ] [ ], x n x n N n = + − ∞ < < ∞   [ ] x n 

1 2 / 1 2 /

[ ] [ ] 1 [ ] [ ]

N j kn N n N j kn N k

X k x n e x n X k e N

π π − − = − =

= =

∑ ∑

   

  • N Fourier series coefficients
  • N-sequence values
slide-53
SLIDE 53

Finite Length Sequences

  • consider a finite length (but not periodic) sequence, x[n], that

is zero outside the interval 0≤n ≤N-1

  • evaluate X(z) at equally spaced points on the unit circle,

– looks like discrete-time Fourier series of periodic sequence

53

1

( ) [ ]

N n n

X z x n z

− − =

=∑

2 / 1 2 / 2 /

, 0,1,..., 1 [ ] ( ) [ ] , 0,1,..., 1

j k N k N j k N j kn N n

z e k N X k X e x n e k N

π π π − − =

= = − = = = −

slide-54
SLIDE 54

Relation to Periodic Sequence

  • consider a periodic sequence, , consisting of an infinite

sequence of replicas of

  • The Fourier coefficients, , are then identical to the values
  • f for the finite duration sequence ⇒

a sequence of N length can be exactly represented by a DFT representation of the form

54

[ ] x n  [ ] x n [ ] [ ]

r

x n x n rN

∞ =−∞

= +

 [ ] X k 

2 /

( )

j k N

X e

π 1 2 / 1 2 /

[ ] [ ] , 0 1 1 [ ] [ ] , 0 1

N j kn N n N j kn N n

X k x n e k N x n X k e n N N

π π − − = − =

= ≤ ≤ − = ≤ ≤ −

∑ ∑

slide-55
SLIDE 55

Periodic and Finite Length Sequences

55

slide-56
SLIDE 56

Sampling in Frequency (Time Domain Aliasing)

56

slide-57
SLIDE 57

Sampling in Frequency (Time Domain Aliasing)

57

slide-58
SLIDE 58

Time Domain Aliasing Example

58

slide-59
SLIDE 59

DFT Properties

  • when using DFT representation, all sequences behave as if they

were infinitely periodic ⇒ DFT is really the representation of the extended periodic function

59

Periodic Sequence Finite Sequence Period = N Length = N Sequence defined for all n Sequence defined for n = 0,1,…, N-1 DFS defined for k = 0,1,…, N-1 DTFT defined for all ω

[ ] [ ] x n x n rN

∞ −∞

= +

slide-60
SLIDE 60

DFT Properties for Finite Sequences

  • X[k], the DFT of the finite sequence x[n], can be viewed as a

sampled version of the z-transform (or Fourier transform) of the finite sequence (used to design finite length filters via frequency sampling method)

  • the DFT has properties very similar to those of the z-transform

and the Fourier transform

  • the N values of X[k] can be computed very efficiently (time

proportional to N log N) using the set of FFT methods

  • DFT used in computing spectral estimates, correlation

functions, and in implementing digital filters via convolutional methods

60

slide-61
SLIDE 61

DFT Properties

61

N-point sequences N-point DFT Linearity Shift Time Reversal Convolution Multiplication

1 2

[ ] [ ] ax n bx n +

1 2

[ ] [ ] aX k bX k + ([ ])N x n n −

2 /

[ ]

j kn N

e X k

π − *[ ]

X k

1

[ ] ([ ])

N N m

x m h n m

− =

[ ] [ ] X k H k [ ] [ ] x n w n

1

1 [ ] ([ ])

N N r

X r W k r N

− =

([ ])N x n −

slide-62
SLIDE 62

Circular Shifting Sequences

62

slide-63
SLIDE 63

Digital Filters

63

slide-64
SLIDE 64

Digital Filters

  • digital filter is a discrete-time linear, shift invariant system

with input-output relation

  • is the system function (系统函数) with as the

complex frequency response (频率响应)

64

[ ] [ ] [ ] [ ] [ ] ( ) ( ) ( )

m

y n x n h n x m h n m Y z X z H z

∞ =−∞

= ∗ = − = ⋅

( ) H z ( )

j

H e ω

arg[ ( )]

( ) ( ) ( ) ( ) ( ) log ( ) log ( ) arg[ ( )] log ( ) Re[log ( )] arg[ ( )] Im[log ( )]

j

j j j r i j j j H e j j j j j j j

H e H e jH e H e H e e H e H e j H e H e H e H e H e

ω

ω ω ω ω ω ω ω ω ω ω ω ω

= + = = + = =

slide-65
SLIDE 65

Digital Filters

  • causal linear shift-invariant

⇒ h[n]=0 for n<0

  • stable system

⇒ every bounded input produces a bounded output ⇒ a necessary and sufficient condition for stability and for the existence of

65

( )

j

H e ω [ ]

n

h n

∞ =−∞

< ∞

slide-66
SLIDE 66

Digital Filters

  • input and output satisfy linear difference equation (线性差分

方程) of the form

  • evaluating z-transforms of both sides gives:

66

1

[ ] [ ] [ ]

N M k r k r

y n a y n k b x n r

= =

− − = −

∑ ∑

1 1

( ) ( ) ( ) ( ) ( ) ( ) 1

N M k r k r k r M r r r N k k k

Y z a z Y z b z X z b z Y z H z X z a z

− − = = − = − =

− = = = −

∑ ∑ ∑ ∑

slide-67
SLIDE 67

Digital Filters

  • H(z) is a rational function of z-1 with M zeros and N poles
  • converges for |z|>R1, with R1 <1 for stability ⇒

all poles of H(z) inside the unit circle for a stable, causal system

67

1 1 1 1

(1 ) ( ) (1 )

M r r N k k

A c z H z d z

− = − =

− = −

∏ ∏

slide-68
SLIDE 68

Ideal Filter Responses

68

slide-69
SLIDE 69

FIR System

  • If ak=0, all k, then

1) 2) ⇒ M zeros 3) if (symmetric, anti-symmetric) real(symmetric), imaginary(anti-symmetric)

69

1

[ ] [ ] [ ] [ 1] ... [ ]

M r M r

y n b x n r b x n b x n b x n M

=

= − = + − + + − ⇒

[ ]

  • therwise

n

h n b n M = ≤ ≤ =

1 1

( ) (1 )

M M n n m n m

H z b z c z

− − = =

= = −

∑ ∏

[ ] [ ] h n h M n = ± −

/2

( ) ( ) ( )

j j j M j

H e A e e A e

ω ω ω ω −

= =

slide-70
SLIDE 70

Linear Phase Filter

  • no signal dispersion (散布) because of non-linear phase ⇒

precise time alignment of events in signal

70

slide-71
SLIDE 71

FIR Filters

  • cost of linear phase filter designs

– can theoretically approximate any desired response to any degree of accuracy – requires longer filters than non-linear phase designs

  • FIR filter design methods

– window approximation ⇒ analytical, closed form method – frequency sampling approximation ⇒ optimization method – optimal (minimax error) approximation ⇒ optimization method

71

slide-72
SLIDE 72

Matlab FIR Design

72

slide-73
SLIDE 73

Lowpass Filter Design Example

73

slide-74
SLIDE 74

FIR Implementation

  • linear phase filters can be implemented with half the

multiplications (because of the symmetry of the coefficients)

74

slide-75
SLIDE 75

IIR Systems

  • y[n] depends on y [n-1],…, y[n-N] as well as x[n], …, x[n-M]
  • for M<N

an infinite duration impulse response

75

1

[ ] [ ] [ ]

N M k r k r

y n a y n k b x n r

= =

= − + −

∑ ∑

1 1 1 1

( ) 1 1 [ ] ( ) [ ]

M r r N r k N k k k k k N n k k k

b z A H z d z a z h n A d u n

− = − − = = =

= = − − =

∑ ∑ ∑ ∑

(partial fraction expansion) (for casual systems)

slide-76
SLIDE 76

IIR Filters

  • IIR filter issues

– efficient implementations in terms of computations – can approximate any desired magnitude response with arbitrarily small error – non-linear phase ⇒time dispersion of waveform

76

slide-77
SLIDE 77

IIR Design Methods

  • Analog filter design

– Butterworth designs: maximally flat amplitude – Bessel designs: maximally flat group delay – Chebyshev designs: equi-ripple in either passband or stopband – Elliptic designs: equi-ripple in both passband and stopband

  • Transform to digital filter

– Impulse invariant transformation 冲击不变法

  • match the analog impulse response by sampling
  • resulting frequency response is aliased version of analog frequency response

– Bilinear transformation 双线性变换法

  • use a transformation to map an analog filter to a digital filter by warping the

analog frequency scale (0 to infinity) to the digital frequency scale (0 to pi)

  • use frequency pre-warping to preserve critical frequencies of transformation

(i.e., filter cutoff frequencies)

77

slide-78
SLIDE 78

Matlab Elliptic Filter Design

78

slide-79
SLIDE 79

Matlab Elliptic Filter Design

79

slide-80
SLIDE 80

IIR Filter Implementation

80

slide-81
SLIDE 81

IIR Filter Implementation

81

slide-82
SLIDE 82

IIR Filter Implementation

82

slide-83
SLIDE 83

Sampling

83

slide-84
SLIDE 84

Sampling of Waveforms

84

[ ] ( ),

a

x n x nT n = − ∞ < < ∞ 8000Hz 1/ 8000 125 sec 10000Hz 1/10000 100 sec 16000Hz 1/16000 62.5 sec 20000Hz 1/ 20000 50 sec

s s s s

F T F T F T F T µ µ µ µ = ↔ = = = ↔ = = = ↔ = = = ↔ = =

slide-85
SLIDE 85

The Sampling Theorem

If a signal xa(t) has a bandlimited Fourier transform Xa(jΩ) such that Xa(jΩ) =0 for Ω ≥ 2πFN, then xa(t) can be uniquely reconstructed from equally spaced samples xa (nT), -∞<n<∞, if 1/T ≥ 2 FN (FS ≥ 2FN) (A-D or C/D converter)

85

slide-86
SLIDE 86

Sampling Theorem Equations

86

slide-87
SLIDE 87

Sampling Theorem Interpretation

87

slide-88
SLIDE 88

Sampling Rates

  • FN = Nyquist frequency (highest frequency with significant

spectral level in signal)

  • must sample at least twice the Nyquist frequency to prevent

aliasing (frequency overlap) – telephone speech (300-3200 Hz)⇒ FS =6400 Hz – wideband speech (100-7200 Hz) ⇒ FS =14400 Hz – audio signal (50-21000 Hz) ⇒ FS =42000 Hz – AM broadcast (100-7500 Hz) ⇒ FS =15000 Hz

  • can always sample at rates higher than twice the Nyquist

frequency (but that is wasteful of processing)

88

slide-89
SLIDE 89

Recovery from Sampled Signal

  • If 1/T > 2 FN , the Fourier transform of the sequence of

samples is proportional to the Fourier transform of the

  • riginal signal in the baseband, i.e.,
  • can show that the original signal can be recovered from the

sampled signal by interpolation using an ideal LPF of bandwidth π /T, i.e.,

– digital-to-analog converter

89

1 ( ) ( ),

j T a

X e X j T T π

= Ω Ω < sin( ( ) / ) ( ) ( ) ( ) /

a a n

t nT T x t x nT t nT T π π

∞ =−∞

  − =   −  

slide-90
SLIDE 90

Decimation(抽取) and Interpolation(内插)

  • f Sampled Waveforms
  • CD rate (44.06 kHz) to DAT rate (48 kHz)—media conversion
  • Wideband (16 kHz) to narrowband speech rates (8kHz, 6.67

kHz)—storage

  • oversampled to correctly sampled rates--coding

90

slide-91
SLIDE 91

Decimation and Interpolation of Sampled Waveforms

91

slide-92
SLIDE 92

Decimation

  • Standard Sampling: begin with

digitized signal

  • can achieve perfect recovery of

xa(t) from digitized sample under these conditions

92

slide-93
SLIDE 93

Decimation

  • to reduce sampling rate of sampled signal by factor of M ≥ 2
  • to compute new signal xd[n] with sampling rate

such that xd[n]= xa(nT’) with no aliasing

  • one solution is to downsample x[n]= xa(nT) by retaining one
  • ut of every M samples of x[n] , giving xd[n]=x[nM]

93

' 1/ ' 1/ ( ) /

s s

F T MT F M = = =

slide-94
SLIDE 94

Decimation

  • need Fs’ ≥ 2 FN to

avoid aliasing for M=2

  • when Fs’ < 2 FN , we

get aliasing for M=2

94

slide-95
SLIDE 95

Decimation

  • to decimate by factor of M with no aliasing, need to ensure

that the highest frequency in x[n] is no greater than Fs/(2M)

  • thus we need to filter x[n] using an ideal lowpass filter with

response

  • using the appropriate lowpass filter, we can downsample the

reuslting lowpass-filtered signal by a factor of M without aliasing

95

1 / ( ) /

j d

M H e M

ω

ω π π ω π  <  =  < ≤  

slide-96
SLIDE 96

Interpolation

  • assume we have x[n]= xa(nT) (no aliasing) and we wish to increase the

sampling rate by the integer factor of L

  • we need to compute a new sequence of samples of xa(t) with period

T’’= T / L, i.e., xi[n]= xa(nT’’)= xa(nT/L)

  • It is clear that we can create the signal

xi[n]=x[n/L] for n = 0, ±L, ±2L, … but we need to fill in the unknown samples by an interpolation process

  • can readily show that what we want is
  • equivalently with T’’= T / L, x[n]= xa(nT) , we get

which relates xi[n] to x[n] directly

96

sin( ( '' ) / ) [ ] ( '') ( ) ( '' ) /

i a a k

nT kT T x n x nT x kT nT kT T π π

∞ =−∞

  − = =   −  

sin( ( / )) [ ] ( '') [ ] ( / )

i a k

n L k x n x nT x k n L k π π

∞ =−∞

  − = =   −  

slide-97
SLIDE 97

Interpolation

  • implementing the previous equation by filtering the upsampled sequence
  • xu[n] has the correct samples for n = 0, ±L, ±2L, … , but it has zero-valued

samples in between (from the upsampling operation)

  • The Fourier transform of xu[n] is simply
  • Thus is periodic with two periods, namely with period 2π/L due to

upsampling and 2π due to being a digital signal

97

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

  • therwise

u

x n L n L L x n = ± ±  =  

''

( )

j T u

X e Ω

slide-98
SLIDE 98

Interpolation

98

slide-99
SLIDE 99

Interpolation

  • Original signal, x[n] , at sampling period, T, is first upsampled

to give signal xu[n] with sampling period T’’= T / L

  • lowpass filter removes images of original spectrum giving

xi [n]= xa(nT’’)= xa(nT/L)

99

slide-100
SLIDE 100

SR Conversion by Non-Integer Factors

  • T’=MT/L ⇒ convert rate by factor of M/L
  • need to interpolate by L, then decimate by M (why can’t it be

done in the reverse order?)

– can approximate almost any rate conversion with appropriate values of L and M – for large values of L, or M, or both, can implement in stages, i.e., L =1024, use L1=32 followed by L2=32

100

slide-101
SLIDE 101

Summary - 1

  • speech signals are inherently bandlimited => must sample

appropriately in time and amplitude

  • LTI systems of most interest in speech processing; can characterize

them completely by impulse response, h(n)

  • the z-transform and Fourier transform representations enable us to

efficiently process signals in both the time and frequency domains

  • both periodic and time-limited digital signals can be represented in

terms of their Discrete Fourier transforms

  • sampling in time leads to aliasing in frequency; sampling in

frequency leads to aliasing in time => when processing time-limited signals, must be careful to sample in frequency at a sufficiently high rate to avoid time-aliasing

101

slide-102
SLIDE 102

Summary - 2

  • digital filtering provides a convenient way of processing

signals in the time and frequency domains

  • can approximate arbitrary spectral characteristics via either

IIR or FIR filters, with various levels of approximation

  • can realize digital filters with a variety of structures, including

direct forms, serial and parallel forms

  • once a digital signal has been obtain via appropriate sampling

methods, its sampling rate can be changed digitally (either up

  • r down) via appropriate filtering and decimation or

interpolation

102