Speech Signal Representations Part 1: Digital Signal Processing - - PowerPoint PPT Presentation

speech signal representations part 1 digital signal
SMART_READER_LITE
LIVE PREVIEW

Speech Signal Representations Part 1: Digital Signal Processing - - PowerPoint PPT Presentation

Speech Signal Representations Part 1: Digital Signal Processing Hsin-min Wang References: 1 X. Huang et al., Spoken Language Processing, Chapters 5-6 2 J. R. Deller et al., Discrete-Time Processing of Speech Signals, Chapters 4-6 3 J. W.


slide-1
SLIDE 1

1

Speech Signal Representations

Part 1: Digital Signal Processing

Hsin-min Wang

References:

1 X. Huang et al., Spoken Language Processing, Chapters 5-6 2 J. R. Deller et al., Discrete-Time Processing of Speech Signals, Chapters 4-6 3 J. W. Picone, “Signal modeling techniques in speech recognition,” proceedings of the IEEE, September 1993, pp. 1215-1247

slide-2
SLIDE 2

2

Introduction

Current speech recognition systems are mainly composed of:

− A front-end feature extractor (feature extraction module)

  • Discover salient characteristics suited for classification
  • Based on scientific and/or heuristic knowledge about patterns to

recognize

− A back-end classifier (classification module)

  • Set class boundaries accurately in the feature space
  • Statistically designed according to the fundamental Bayes’ decision

theory

slide-3
SLIDE 3

3

Analog Signal to Digital Signal

[ ]

( )

period; sampling : , T nT x n x

a

=

Analog Signal

nT t =

Digital Signal:

Discrete-time signal with discrete amplitude

Discrete-time Signal or Digital Signal

rate sampling 1T Fs =

sampling period=125μs =>sampling rate=8kHz

slide-4
SLIDE 4

4

Two Main Approaches to Digital Signal Processing

Filtering Parameter Extraction

Signal in Signal out

Filter

[ ]

n x

[ ]

n y

Amplify or attenuate some frequency components of [ ]

n x

Signal in Parameter out Parameter Extraction

[ ]

n x

2 22 21

               

m

c c c

2 1

               

Lm L L

c c c

1 12 11

               

m

c c c

e.g.:

  • 1. Spectrum Estimation
  • 2. Parameter for Recognition
slide-5
SLIDE 5

5

5.1 Digital Signals and Systems

slide-6
SLIDE 6

6

Sinusoidal Signals

− : amplitude (振幅) − : angular frequency (角頻率), − : phase (相角)

[ ]

( )

φ ω + = n A n x cos

ω φ A f π ω 2 =

[ ]

      − = 2 cos π ωn A n x

04 : frequency samples 25 : period . f T = =

1 frequency normalized : ≤ ≤ f f

slide-7
SLIDE 7

7

Sinusoidal Signals – periodic vs. non-periodic

Examples

− is periodic with period N=8 − is periodic with period N=16 − is not periodic

( ) ( )

φ ω φ ω + = + + n A N n A cos ) ( cos π ω 2 = N N π ω 2 =

[ ]

( )

4 / cos

1

n n x π =

[ ] ( )

8 / 3 cos

2

n n x π =

[ ] ( )

n n x cos

3

=

[ ]

n x

[ ] [ ]

n x N n x = +

is periodic with period N if and only if

is not periodic for all values of w

( )

φ ω + n Acos

slide-8
SLIDE 8

8

Sinusoidal Signals – periodic vs. non-periodic

(cont.)

[ ] ( )

8 period intergers) are and (both 8 2 4 4 4 cos ) ( 4 cos 4 / cos

1 2 1 1 1 1 1

= ∴ = ⇒ ⋅ = ⇒       + =       + = = N k N k N k N N n N n n n x π π π π π π

[ ] ( )

16 period intergers) are and (both 3 16 2 8 3 8 3 8 3 cos ) ( 8 3 cos 8 / 3 cos

2 2 2 2 2 2 2

= ∴ = ⇒ ⋅ = ⇒       + =       + = = N k N k N k N N n N n n n x π π π π π π

[ ] ( )

periodic

  • non

intergers are and both that condition under the equation this satistify that find t can' 2 ) cos( cos

3 3 3 3 3

⇒ ⋅ = ⇒ + = = k N N k N N n n n x π

slide-9
SLIDE 9

9

Sinusoidal Signals – complex exponential

expression

A complex number z can be expressed in Cartesian form The complex can also be expressed in polar form phase the is and amplitude the is where , φ

φ

A Ae z

j

=

[ ]

( )

( )

{ }

φ ω

φ ω

+

= + =

n j

Ae n A n x Re cos

A sinusoidal signal can be expressed as the real part of the corresponding complex exponential

φ φ

φ

sin cos j e j + =

1 , − = + = j jy x z

) sin( ), cos( φ φ A y A x = =

slide-10
SLIDE 10

10

Sinusoidal Signals – sum of two signals

The sum of two complex exponential signals with same frequency

− taking the real part

( ) ( )

( )

( )

φ ω φ ω φ φ ω φ ω φ ω + + +

= = + = +

n j j n j j j n j n j n j

Ae Ae e e A e A e e A e A

1 1

1 1

( ) ( ) ( )

φ ω φ ω φ ω + = + + + n A n A n A cos cos cos

1 1

numbers real are and ,

1

A A A

The sum of N sinusoids of the same frequency is another sinusoid of the same frequency

slide-11
SLIDE 11

11

Some Digital Signals

slide-12
SLIDE 12

12

Some Digital Signals – (cont.)

Any sequence x[n] can be represented as a sum of shift and scaled unit impulse sequences (signals)

[ ] [ ] [ ]

k n k x n x

k

− =

∞ −∞ =

δ

Scale/weighted Time-shifted unit impulse sequence

slide-13
SLIDE 13

13

Digital Systems

A digital system T is a system that, given an input signal x[n], generates an output signal y[n] Properties of digital systems

− Linear:

  • Linear combination of inputs maps to linear combination of outputs

− Time-invariant:

  • A time shift in the input by n0 samples gives a shift in the output by

n0 samples

[ ] [ ]

{ }

n x T n y =

[ ] [ ] { } [ ] { } [ ] { }

n x bT n x aT n bx n ax T

2 1 2 1

+ = +

[ ] [ ]

{ }

n n x T n n y − = −

slide-14
SLIDE 14

14

LTI Systems

Linear-time-invariant (LTI): system output can be expressed as a convolution (迴旋積分) of the input x[n] and the impulse response h[n]

[ ]

{ }

[ ] [ ]

{ }

[ ] [ ]

{ }

[ ] [ ] [ ] [ ]

n h n x k n h k x k n T k x k n k x T n x T

k k k

∗ = − = − = − = ⇒

∑ ∑ ∑

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

δ δ

[ ] [ ] [ ]

k n k x n x

k

− =

∞ −∞ =

δ

scale Time-shifted unit impulse sequence linear convolution Time-invariant Time invariant

Digital System

[ ]

n δ

[ ]

n h

[ ] [ ] [ ] [ ]

k n h k n n h n

T T

− →  − →  δ δ

Impulse response

Unit impulse

slide-15
SLIDE 15

15

LTI Systems (cont.)

1 2 1 3

  • 2

Length=M=3

[ ]

n δ

[ ]

n h LTI LTI

[ ]

n x

?

0 1 2 2 3 1 Length=L=3 Length=L+M-1 3

[ ]

n δ ⋅ 3

0 1 2 3 9

  • 6

[ ]

n h ⋅ 3

1 2

[ ]

1 2 − ⋅ n δ

1 2 3 2 6

  • 4

[ ]

1 2 − ⋅ n h

2 1

[ ]

2 1 − ⋅ n δ

2 3 4 1 3

  • 2

[ ]

2 − n h

Sum up

3 1 11 2 1 3

  • 1

4

  • 2

[ ]

n y

slide-16
SLIDE 16

16

LTI Systems - convolution

Reflect h[k] about the origin (→ h[-k]) Slide (h[-k] → h[-k+n] or h[-(k-n)] ), multiply with x[k] Sum up [ ]

k x

[ ]

k h

[ ]

k h −

Reflect Multiply Sum up slide

slide-17
SLIDE 17

17 0 1 2 1 3

  • 2
  • 1
  • 2

1 3

  • 2

0 1 2 2 3 1 1

  • 1

1 3

  • 2

2 1 1 3

  • 2

2 1 1 3

  • 2

3 2 1 3

  • 2

[ ]

k h

[ ]

k x

[ ]

k h −

[ ]

1 + −k h

[ ]

2 + −k h

[ ]

3 + −k h

[ ]

4 + −k h

[ ] [ ] [ ] [ ] [ ]

k n h k x n h n x n y

k

− = ∗ =

∞ −∞ =

Reflect

3 11 1

  • 1

3 4

[ ]

, = n n y

[ ]

1 , = n n y

[ ]

2 , = n n y

[ ]

3 , = n n y

[ ]

4 , = n n y

3 1 11 2 1 3

  • 1

4

  • 2

Sum up

[ ]

n y

1 2 3 4

  • 2
slide-18
SLIDE 18

18

LTI Systems – convolution (cont.)

Convolution is commutative and distributive

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

n h n h n x n h n h n x

1 2 2 1

* * * * =

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

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

k k

− = − = = =

∑ ∑

∞ −∞ = ∞ −∞ =

* *

– An impulse response has finite duration » Finite-Impulse Response (FIR) – An impulse response has infinite duration » Infinite-Impulse Response (IIR)

[ ]

n h 1

[ ]

n h 2

[ ]

n h 1

[ ]

n h 2

Commutation

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

n h n x n h n x n h n h n x

2 1 2 1

* * * + = +

[ ]

n h 2

[ ]

n h 1

[ ] [ ]

n h n h

2 1

+

Distribution

slide-19
SLIDE 19

19

5.2 Continuous-Frequency Transforms

slide-20
SLIDE 20

20

Discrete-Time Fourier Transform (DTFT)

[ ]

n h

n jw

e n x ] [ =

y[n]=?

( )

] [ ] [ ] [

) ( ω ω ω ω ω j n j k k j n j k k n j

e H e e k h e e k h n y

∑ ∑

∞ −∞ = − ∞ −∞ = −

= = =

( )

∞ −∞ = −

=

n jwn j

e n h e H ] [

ω

When the input is a complex exponential, the output is another complex exponential of the same frequency and amplitude multiplied by the complex quantity given by

( )

ω j

e H

The discrete-time Fourier transform of h[n]

slide-21
SLIDE 21

21

Discrete-Time Fourier Transform (cont.)

The discrete-time Fourier transform of h[n], , is a periodic function of w with period 2π

− One period can fully describe it, typically –π<w< π − is a complex function of w, it can be expressed as

( )

ω j

e H

( ) ( ) ( ) ( )

( )

ω

ω ω ω ω

j

e H j j j i j r j

e e H e jH e H e H

= + =

magnitude phase

( )

ω j

e H real part imaginary part Cartesian form Polar form

slide-22
SLIDE 22

22

The DTFT and IDTFT pairs

A sufficient condition for the existence of Fourier transform

[ ]

∞ <

∞ −∞ = n

n h

[ ]

( ) ( ) [ ]

m n n m n m m n m n e m n j d e

m n j m n j

− =    ≠ = = − − = − =

− − − −

δ π π π ω π

π π ω π π ω

, , 1 sin ) ( 2 1 2 1

) ( ) (

( )

[ ]

( )

[ ] [ ] [ ] [ ] [ ]

n h m n m h d e m h d e e m h d e e H e n h e H

m m n j m n j m m j n j j n n j j

= − = = = =

∑ ∫ ∑ ∫ ∑ ∫ ∑

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

δ ω π ω π ω π

π π ω π π ω ω π π ω ω ω ω

2 1 2 1 2 1 : invertible is ansform Fourier tr

) (

( )

[ ] [ ]

( )

∫ ∑

− ∞ −∞ = −

= =

π π ω ω ω ω

ω π d e e H n h e n h e H

n j j n n j j

2 1

absolutely summable DTFT Inverse DTFT

slide-23
SLIDE 23

23

Z-Transform

z-transform is a generalization of Discrete-Time Fourier transform

− z-transform of h[n] is defined as

  • Where is a complex variable
  • The Fourier transform equals its z-transform evaluated at

( )

[ ]

∞ −∞ = −

=

n n

z n h z H

[ ] ( )

z H n h

[ ]

( )

ω j

e H n h

ω j

re z =

( )

( )

ω

ω

j

e z j

z H e H

=

=

) 1 ( = = z e z

complex plane

unit circle Im Re

ω j

e z =

  • Fourier transform used to plot the filter’s

frequency response

  • z-transform used to analyze more general

filter characteristics, e.g. stability

slide-24
SLIDE 24

24

Region of Convergence

ROC is the set of z for which z-transform exists

− In general, ROC is a ring-shaped region and the Fourier transform exists if its ROC includes the unit cycle

An LTI system is defined to be stable if for every bounded input it produces a bounded output

− Necessary and sufficient condition:

  • h[n] has a Fourier transform
  • Its z-transform includes the unit circle in its region of converge

[ ]

∞ <

− ∞ −∞ =

n n

z n h

complex plane

R1 R2 Re Im

[ ]

∞ <

∞ −∞ = n

n h

A sufficient condition for the existence of Fourier transform

slide-25
SLIDE 25

25

Causality

An LTI system is defined to be causal if its impulse response is a causal signal, i.e.,

− Similarly, an LTI system is anti-causal if

[ ]

for < = n n h

[ ]

for > = n n h

All physical systems are causal

slide-26
SLIDE 26

26

Z-Transform of Right-Sided Complex Exponentials

[ ] [ ] [ ]

   < ≥ = = for for 1 ere wh ,

1

n n n u n u a n h

n

( )

( )

1 1 1

1 1

− ∞ = − − ∞ =

− = ∑ = ∑ = az az z a z H

n n n n n

If

1

1 < −

az

have a pole at z=a (Pole: z-transform goes to infinity)

a z ROC > ∴ is

1

Re Im

a

[ ]

1 if exists

  • f

ansform Fourier tr

1

< a n h

×

the unit cycle

A causal and stable system has all its poles inside unit circle

slide-27
SLIDE 27

27

Z-Transform of Left-Sided Complex Exponentials

[ ] [ ]

1

2

− − − = n u a n h

n

( ) [ ]

( )

1 1 1 1 1 1 1 2

1 1 1 1 1 1 1 1

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

− = − − − = − − = − = − = − = − − − =

∑ ∑ ∑ ∑

az z a z a z a z a z a z a z n u a z H

n n n n n n n n n n n

If

1

1

<

− z

a

  • 1

a z ROC < ∴ is

2

Re Im

a

[ ] [ ]

−∞ → < n n h n h a as lly exponentia go will because exist, t doesn'

  • f

ansform Fourier tr the , 1 when

2 2

×

the unit cycle

slide-28
SLIDE 28

28

Z-Transform of Two-Sided Sequences

[ ] [ ] [ ]

1 2 1 3 1

3

− −       −      − = n u n u n h

n n

( )

      −       +       − = − + + =

− −

2 1 3 1 12 1 2 2 1 1 1 3 1 1 1

1 1 3

z z z z z z z H

[ ] [ ]

2 1 , 2 1 1 1 1 2 1 3 1 , 3 1 1 1 3 1

1 1

< − → ← − −       − > + → ←       −

− −

z z n u z z n u

z n z n

Re Im

×

the unit cycle

×

2 1 3 1 −

[ ]

circle unit the include t doesn' because exist, t doesn'

  • f

ansform Fourier tr

3 3

ROC n h

3 1 and 2 1 is

3

> < ∴ z z ROC

slide-29
SLIDE 29

29

Z-Transform of Finite-Length Sequences

[ ]

   − ≤ ≤ =

  • thers

, 1 ,

4

N n a n h

n

( )

( ) ( )

a z a z z az az az z a z H

N N N N N n n N n n n

− − = − − = = =

− − − − = − − = −

∑ ∑

1 1 1 1 1 1 4

1 1 1

1 3 2 2 1

.....

− − − −

+ + + +

N N N N

a z a az z

except plane

  • entire

the is

4

= ∴ z z ROC

Im

×

the unit cycle

3 1 −

7 poles at zero A pole and zero at is cancelled

a z =

4 π

( )

1 1 ,

2

− = = ,..,N k ae z

N k j k π

If N=8

slide-30
SLIDE 30

30

Summary of the Fourier and z-transforms

slide-31
SLIDE 31

31

Summary of the Fourier and z-transforms

(cont.)

{ } { } { } { } { } { }

{ } { }

{ }

{ }

[ ] ( ) { }

{ }

( ) { }

) ( ] [ ] [ ] [ ) ( ] [ ] [ ] [ ) ( Im ) ( ) ( 2 1 2 / ]) [ ] [ ( ] [ Odd ) ( Re ) ( ) ( 2 1 ] [ ] [ 2 1 2 / ]) [ ] [ ( ] [ Even ) ( ) ( if

  • nly

and if

  • dd

is ) ( ) ( ) ( if

  • nly

and if even is ) (

  • dd

is ) ( arg even, is ) ( ) ( ) ( ) (

  • dd

is ) ( Im even, is ) ( Re ) ( Im ) ( Re ) ( Im ) ( Re ) ( ) ( ) ( real ] [ ) ( )] ]( [ [ ) ]( [ ] [ ) ( )] ]( [ [ ) ]( [ ] [ ] [ ) ( ] [ ] [ ] [ ] [ ) ( ] [

) ( ) ( ) ( ) ( arg ) ( arg * * * * * * ) ( * * * * ) ( * ) ( * * * ) )( ( w w j n n w w j n jwn n jw n jw jwn jw jwn n n n jw n jwn jw jw jw jw jw jw n jwn n jwn jw jw e X j jw e X j jw jw jw jw jw jw jw jw jw jw jw jw n jwn n n jw jw n n w j n n w j n jwn jw n n w j n jwn n jwn jw

e X e n x e e n x e n x e e X e e n n x e n n x n n x e X j e X e X n x n x n x e X e X e X e n x e n x n x n x n x x f x f x f x f x f x f e X e X e e X e e X e X e X e X e X j e X e X j e X e X e X e X n x e X e n x e n x n x e X e n x e n x e n x n x e X e n x e n x n x e n x e X n x

jw jw

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

= ∑ = ∑ ↔ = ∑ − = ∑ − ↔ − = − ↔ − − = = + = ∑ − + ∑ ↔ − + =       − = − = −           ⇒ = =         ⇒ + = − = ⇔ = ⇔ = ∑ = ∑ − ↔ − = ∑ = ∑ = ∑ ↔ = ∑ − = ∑ − ↔ − ∑ = ↔

slide-32
SLIDE 32

32

The Convolution Property

[ ] [ ] [ ]

] [ ] [ ] [ * z H z X z Y n h n x n y = ↔ =

[ ] [ ] [ ] [ ] [ ]

) ( ) ( ) ( ] [ ) (

) (

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

k k k k k n n n n k n n

= =       − =       − = =

∑ ∑ ∑ ∑ ∑ ∑

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

The z-transform of the convolution of two signals is the product of their z-transforms

( )

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

( ) ( )

jw jw jwn n k jwk k jwk k n jw n jwn n k jw

e H e X e n h e k x e e k n h k x e k n h k x e Y =       ∑ ∑ = ∑       ∑ − = ∑       ∑ − =

− ∞ −∞ = ∞ −∞ = − ∞ −∞ = − − − ∞ −∞ = − ∞ −∞ = ∞ −∞ = ) (

( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )

jw jw jw jw jw jw jw jw jw

e H e X e Y e H e X e Y e H e X e Y ∠ + ∠ = ∠ = ⇒ = ,

[ ] [ ] [ ]

) ( ) ( ) ( *

jw jw jw

e H e X e Y n h n x n y = ↔ =

slide-33
SLIDE 33

33

The Convolution Property (cont.)

[ ] [ ] [ ]

) ( ) ( 2 1

jw jw

e H e X n h n x n y ∗ ↔ = π ] [ ] [ ] [ ) ( 2 1 ) ( 2 1 ) ( 2 1 ) ( ) ( 2 1 2 1 ) ( ) ( 2 1 2 1

) ( ) ( ) (

n h n x n h d e e X d e dw e e H e X dw e d e H e X dw e e H e X

n j j n j n w j w j j jwn j j jwn jw jw

= × ∫ =       ∫ ∫ = ∫       ∫ = ∫       ∗

− − − − − − − − −

τ π τ π π τ π π π π

τ π π τ τ τ π π τ π π τ π π τ ω π π τ π π

slide-34
SLIDE 34

34

Power Spectrum and Parseval’s Theorem

We can compute the signal’s energy in the time domain or in the frequency domain.

[ ]

( )

∫ = ∑

− ∞ −∞ = π π ω

ω π d e X n x

j n 2 2

2 1

power spectrum

[ ]

( )

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

* *

n x n x l n x l x m x n m x n R

l m xx

− ∗ = − − ∑ = ∑ + =

∗ ∞ −∞ = ∞ −∞ =

[ ]

( ) ( ) ( ) ( )

2 *

ω ω ω ω X X X S n R

xx F xx

= = ↔

[ ] ( ) ( )

∫ = ∫ =

− − π π ω π π ω

ω π ω π dw e X dw e S n R

n j n j xx xx 2

2 1 2 1

[ ] [ ] [ ] [ ] ( )

∑ ∫ ∑

∞ −∞ = − ∞ −∞ =

= = =

n n xx

d X n x n x n x R

π π

ω ω π

2 2 *

2 1

The autocorrelation of signal x[n]

slide-35
SLIDE 35

35

Output of LTI Systems – Ex 1

Given an complex exponential input and impulse response , the output y[n] is

− The output of a LTI system to a complex exponential is another complex exponential

  • Complex exponentials are eigensignals of LTI systems, with the

quantity being their eigenvalue

[ ]

n h

[ ] [ ] [ ] [ ] [ ]

( )

n j k j n j k n j

e ω H e k h e e k h n h n x n y

ω ω ω ω

= = = ∗ =

− ∞ ∞ = − ∞ ∞ =

∑ ∑

  • k

) (

  • k

( )

.

  • r

s system' the as to referred

  • ften

is It response. impulse system the

  • f

ansform Fourier tr the : unction transfer f response frequency ω H

( )

jw

e H

[ ]

n j

e n x

ω

=

x Ax λ =

slide-36
SLIDE 36

36

Output of LTI Systems – Ex 2

Given a sinusoidal sequence input , and impulse response h[n] , the output y[n] is

[ ] ( )

φ + = n w A n x cos

[ ] ( )

n jw j n jw j

e e A e e A n w A n x 2 2 cos

− −

+ = + =

φ φ

φ

[ ] ( ) ( ) ( ) ( )

[ ]

( )

( )

( )

( )

[ ]

( ) ( ) [ ]

) ( ) ( ) ( ) (

cos 2 2 2 2 ω H n ω H A e e ω H e e ω H A e ω H e ω H A e e A ω H e e A ω H n y

n j ω H j n j ω H j n j * n j n j j n j j

∠ + + = + = + = − + =

+ − ∠ − + ∠ + − + − −

φ ω

φ ω φ ω φ ω φ ω ω φ ω φ

If |H(w0)|>1, the LTI system will amplify that frequency. If |H(w0)|<1, it will attenuate it.

slide-37
SLIDE 37

37

Output of LTI Systems – Ex 3

If the input is a sum of sinusoidal sequences the output is

− Speech signals can be decomposed as sums of sinusoids − A similar expression is obtained for an input consisting of a sum

  • f complex exponentials

[ ]

( )

=

+ =

K k k k k

n A n x

1

cos φ ω

[ ]

( ) ( )

[ ]

=

∠ + + =

K k k k k k k

H n H A n y

1

cos ω φ ω ω

slide-38
SLIDE 38

38

5.3 Discrete-Frequency Transforms

slide-39
SLIDE 39

39

Discrete Fourier Transform (DFT)

The Discrete Fourier Transform (DFT) of a periodic signal xN[n] is defined as xN[n]=xN[n+N]

[ ] [ ] [ ] [ ]

1 , 1 1 ,

/ 2 1 / 2 1

− ≤ ≤ ∑ = − ≤ ≤ ∑ =

− = − − =

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

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

Inverse DFT, Synthesis DFT, Analysis

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

( )

[ ] [ ]

( )

[ ]

( )

[ ] [ ] [ ]

∑ ∠ + + = ∑ + + = ∑ + − + = = − ∑ =

= = = − − = 18 1 18 1 / 2 * / 2 18 1 / 2 / ) ( 2 * / 2 18 18

) / 2 cos( 2 1 1 1 ~

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

k X N kn k X N N X e k X e k X N N X e k X e k X N N X k X k X e k X N n x π

π π π π π

slide-40
SLIDE 40

40

Fourier Transforms of Periodic Signals – the

complex exponential

[n] ) ( lim ) ( , 1 ) ( / 1 ) (

  • δ

δ w d w dw w d

  • therwise

w w d

∆ → ∆ ∞ ∞ ∆ ∆

≡ > ∆ ∀ ∫ = ⇒    ∆ < ≤ ∆ ≡

The Dirac delta The Kronecker delta

∆ 1

w

∆ ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) (

  • w

w X du u w w u X w w w X w w w X w w w X − ∫ = − − = − ∗ − = −

∞ ∞

δ δ δ δ

n jw jwn jwn

e dw w w e e w X

  • 0)

( ) ( Let ∫ = − ⇒ =

∞ ∞

δ ) ( ) ( ) ( ) ( ) ( lim ) ( ) ( ) ( lim ) ( ) (

  • w

X dw w w w X X dw w d X dw w d w X dw w w X ∫ = − = ∫ = ∫ = ∫

∞ ∞ ∞ ∞ ∆ → ∆ ∞ ∞ ∆ → ∆ ∞ ∞

δ δ

( )

) ( 2 ) ( 2 2 1

  • w

w e e dw w w e

n jw n jw jwn

− ↔ ∴ ∫ = −

∞ ∞

πδ πδ π

∫ =

− π π ω ω

ω π d e e H n h

n j j

) ( 2 1 ] [

slide-41
SLIDE 41

41

Fourier Transforms of Periodic Signals – the

impulse train

∑ − =

∞ −∞ = k N

kN n n p ] [ ] [ δ

[ ]

∑ = ∑ = ⇒ = ∑ =

− = − = − = − 1 / 2 1 / 2 1 / 2

1 ] [ 1 ] [ 1 ] [

N k N nk j N k N nk j N N N n N nk j N N

e N e k P N n p e n p k P

π π π

The impulse train is periodic with period N Alternate expression of an impulse train

) ( 2 w w e

n jw

− ↔ πδ Q ∑ − = ∴

− = 1

) / 2 ( 2 ) (

N k jw N

N k w N e P π δ π

The Fourier transform of an impulse train signal is also an impulse train

slide-42
SLIDE 42

42

Output of LTI Systems – Ex 4

[ ] [ ]

∞ −∞ =

− =

k

kP n n x δ

[ ] [ ]

1 , < = ∑

∞ −∞ =

a n u a n h

k n

DTFT

( )

            − =

∞ −∞ =

k P P X

k

π ω δ π ω 2 2

( )

jw

ae H

− = 1 1 ω

DTFT

[ ] [ ]

( ) ( )

jw jw

e X e H n h n x ⇔ ∗

( ) ( ) ( )

            − − =             − − = =

∑ ∑

∞ −∞ = − ∞ −∞ = −

k P ae P k P P ae X H Y

k k P j k j

π ω δ π π ω δ π ω ω ω

π ω

2 1 1 2 2 2 1 1

2

slide-43
SLIDE 43

43

Fourier Transforms of Periodic Signals –

general periodic signals

∑ − =         ∑ − =

− = − = 1 / 2 1

) / 2 ( ) ( 2 ) / 2 ( 2 ) ( ) (

N k N k j N k jw jw N

N k w e X N N k w N e X e X π δ π π δ π

π

[ ]

] [ ] [ ] [ ] [ ] [ n p n x kN n n x kN n x n x

N k k N

∗ = ∑ − ∗ = ∑ − =

∞ −∞ = ∞ −∞ =

δ ] [ ] [ let    < ≤ ≡

  • therwise

N n n x n x

N

Given a periodic signal xN[n] with period N, Then

slide-44
SLIDE 44

44

5.4 Digital Filters and Windows

slide-45
SLIDE 45

45

The Ideal Low-Pass Filter

   < =

  • therwise

w w e H

jw

| | 1 ) (

It lets all frequencies below w0 pass through unaffected and completely blocks frequencies above w0

) 2 sinc( ) sin( 2 ) sin( 2 2 ) ( 2 1 ] [ n f n n jn n j jn e e d e n h

n j n j w w n j

π π ω π ω π ω π ω π

ω ω ω

      = = = − = ∫ =

− −

x x x π π ) sin( ) sinc( ≡

slide-46
SLIDE 46

46

The Rectangular Window

( ) ( )

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

) ( ) 2 / sin( ) 2 / sin( 1 1 ) ( 1 1 ) ( ] [ ] [ ] [

− − − − − − − − − − − − − = −

= = − − = − − = − − = ∑ = − − ≡

N jw N jw jw jw jw jwN jwN jwN jw jwN jw N N n n

e w A e w wN e e e e e e e e e H z z z z H N n u n u n h

π π π

N-1

n 1

(w/2π)

N w π 2 =

0.02

,...} 2 , , { / 2 for , ) ( N N k N k w w A

k

± ± ≠ = = π

slide-47
SLIDE 47

47

The Generalized Hamming Window

The generalized Hamming window is defined as

) / 2 cos( ) 1 ( ] [    < ≤ − − ≡

  • therwise

N n N n n hh π α α

) ( ) 2 / ( ) ( ) 2 / ( ) ( ) 1 ( ) ( ] [ ) 2 / ( ] [ ) 2 / ( ] [ ) 1 ( ) / 2 cos( ] [ ] [ ) 1 ( ] [

) / 2 ( ) / 2 ( / 2 / 2 N w j N w j jw jw h N n j N n j h

e H e H e H e H e n h e n h n h N n n h n h n h

π π π π π π π π π π π π

α α α α α α π α α

+ − −

− − − = − − − = − − =

31 dB 44 dB 31 dB 44 dB

Decay with frequency rapidly Constant for all frequencies

N π 4 N π 4

window Hamming the 46 . window Hanning the 5 . ⇒ = ⇒ = α α

slide-48
SLIDE 48

48

Output of LTI Systems – Ex 5

[ ] [ ]

∞ −∞ =

− =

k

kP n n x δ [ ]

     − =       − − =

  • therwise

1 ,......, 1 , , 1 2 cos 46 . 54 . N n N n n w π

Hamming window

[ ] [ ]

( ) ( )

jw jw

e X e W n w n x ∗ ⇔ π 2 1 ( ) ( ) ( ) ( ) ( ) ( )

∑       − = ∑       ∫       − − = ∑       − ∗ =       − ∑ ∗ = ∗ =

∞ −∞ = ∞ −∞ = ∞ ∞ − ∞ −∞ = ∞ −∞ = k k k k

k P W P d k P W P k P W P k P P W X W Y π ω τ τ π ω δ τ π ω δ ω π ω δ π ω π ω ω π ω 2 1 2 1 2 1 2 2 2 1 2 1

slide-49
SLIDE 49

49

FIR Filters

FIR (Finite Impulse Response)

− The impulse response of an FIR filter has finite duration − Have no denominator in the rational function H(z)

  • No feedback in the difference equation

− Can be implemented with a simple train of delay, multiple, and add operations − FIR systems are always stable

[ ] [ ]

∑ − = ∑ − =

= = M r r M r

r n x b r n x r h n y ] [ ] [

z-1 z-1 z-1 M

b

1

b b

[ ]

n y

[ ]

n x

[ ]

   ≤ ≤ =

  • therwise

, , M n b n h

n

( ) ( ) ( )

∑ = =

= − M r r r z

b z X z Y z H

finite is ∑

= M r r

b Q

slide-50
SLIDE 50

50

Linear-Phase FIR Filters

] [ ] [ and , 2 real, is ] [ If M-n h n h L M n h = =

( ) ( )

phase linear be to ] [ for condition sufficient a is ] [ ] [ system a called is ] [ so ,

  • f

function linear a , ) (

  • f

function even and real a is ) ( so cosines,

  • f

n combinatio linear a is ) ( ) ( ) cos( ] [ 2 ] [ )) ( cos( ] [ 2 ] [ ] [ ] [ ] [ ] [ ] [ ] [ ) (

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

n h n M h n h se linear-pha n h w Lw e H w w A w A e w A e wn L n h L h e L n w n h L h e e e n h e L h e n M h e n h e L h e n h e H

jw jwL jwL L n jwL L n jwL L n L n jw L n jw jwL L n n L jw jwn jwL M n jwn jw

− ± = − = ∠ =       ∑ + + =       ∑ − + = ∑ + + = ∑ − + + = ∑ =

− − = − − = − − = − − − − − = − − − − = − 2L h[L] h[2L] h[0] L

L-1 -w1 0 -wL L+L wL L+1 w cos(w)=cos(-w) h[L+1]=h[L-1]

slide-51
SLIDE 51

51

First-Order FIR Filters

[ ] [ ] [ ]

1 − + = n x n x n y α

( )

1

1

+ = z z H α

( )

jw jw

e e H

+ = α 1

( )

( ) ( ) ( )

( )

      + − = + = + + = − + = ω α ω α θ ω α ω α ω α ω ω α

ω ω

cos 1 sin arctan cos 2 1 sin cos 1 sin cos 1

2 2 2 2 j j

e j e H

( )

2

log 10

ω j

e H

α>0: low-pass filter α<0: high-pass filter α controls the slope of the curve

slide-52
SLIDE 52

52

IIR Filters

The relation between the output and input of a digital filter can be expressed by

[ ] [ ] [ ]

∑ ∑

= =

− + − =

N k M k k k

k n x b k n y a n y

1

( ) ( ) ( )

k N k M k k k k

z z X b z z Y a z Y

− = = −

∑ ∑

+ =

1

( ) ( ) ( )

∑ ∑

= − = −

− = =

N k k k M k k k

z a z b z X z Y z H

1

1

delay property

[ ] ( ) [ ] ( )

n

z z X n n x z X n x

→ − →

linearity and delay properties A rational transfer function

z-1 z-1 z-1 M

b

2

b b

[ ]

n y

[ ]

n x

1

b

z-1 z-1 z-1 1

a

2

a

N

a

( )

( ) ( )

∏ ∏

= − − = − −

− − =

N k k L M r r L

z d z c Az z H

1 1 1 1

1 1 zeros poles

slide-53
SLIDE 53

53

IIR Filters (cont.)

( ) ∑

= −

− =

N k k k

z d A z H

1 1

1

If M<N

( )

∑ ∑

− = − = −

+ − =

N M k k k N k k k

z B z d A z H

1 1

1

If M≥N

( ) ( ) ( )

causal and stable both is ] [ 1 ] [ ] [ 1 If stable is ] [ 1 ] 1 [ ] [ 1 If 1 ] [ ] [ 1 If

1 1 1

n h z d A z H n u d A n h d n h z d A z H n u d A n h d z d A z H n u d A n h d

k k k k n k k k k k k k k n k k k k k k k n k k k k − − −

− = ↔ = <        − = ↔ − − − = > − = ↔ = <

=

+ =

N k n k k n

n u d A B n h

1

] [ ] [

has an infinite impulse response IIR is not guaranteed to be stable and causal like FIR, IIR do not have linear phase, IIR is more efficient than FIR in realizing steeper roll-offs with fewer coefficients.

slide-54
SLIDE 54

54

IIR Filters (cont.)

slide-55
SLIDE 55

55

First-Order IIR Filters

w A e H e A e H n u A n h z A z H n y n Ax n y

jw jw jw n

cos 2 1 | | | ) ( | is square magnitude The 1 ) ( is ansform Fourier tr The ] [ ] [ is response impulse The 1 ) ( is function transfer The ] 1 [ ] [ ] [

2 2 2 1

α α α α α α − + = ⇒ − = ⇒ = ⇒ − = ⇒ − + =

− −

  • The system has one pole and no zeros
  • A necessary condition for this system to

be both stable and causal is |α|<1

  • The impulse response is infinite
slide-56
SLIDE 56

56

Second-Order IIR Filters

2 2 1 1 1 2 2 1 2 2 1 2 2 1 1 2 1 2 2 1 1 2 1

) cos( 2 1 ) 1 )( 1 ( ) ( conjugate complex are roots two 4 If : II Case systems

  • rder
  • first

two to degenerate roots real two 4 If : I Case 2 4 by given are poles two the real, are and , , If zeros. no and poles two has system This 1 ) ( is function transfer The ] 2 [ ] 1 [ ] [ ] [

− − − − − − − − + − ± − − −

+ − = − − = ⇒ = ⇒ ⇒ < + ⇒ ⇒ > + + ± = ⇒ − − = ⇒ − + − + = z e z w e A z e z e A z H e z a a a a a a a z a a A z a z a A z H n y a n y a n Ax n y

jw jw jw σ σ σ σ σ

A bandpass filter it favors frequencies in a band around w0

slide-57
SLIDE 57

57

5.5 Digital Processing of Analog Signals

slide-58
SLIDE 58

58

Fourier Transform of Analog Signals

The Fourier transform of an analog signal x(t) is defined as

dt e t x X

t j

∞ ∞ − Ω −

= Ω ) ( ) (

with its inverse transform being

Ω Ω =

∞ ∞ − Ω d

e X t x

t j

) ( 2 1 ) ( π dt e t x X

t j

∞ ∞ − Ω −

= Ω ) ( ) ( Ω Ω =

∞ ∞ − Ω d

e X t x

t j

) ( 2 1 ) ( π

∞ −∞ = −

=

n jwn jw

e n x e X ] [ ) ( dw e e X n x

jwt jw

=

π π

π ) ( 2 1 ] [

Discrete time Fourier transform of x[n]

slide-59
SLIDE 59

59

The Sampling Theorem

Impulse Train To Sequence

)) ( ( ] [ nT x n x =

( ) ( )

∞ −∞ =

− =

n

nT t t p δ

Sampling

∑ ∑ ∑

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

− = − = − = =

n n n p

nT t n x nT t nT x nT t t x t p t x t x ) ( ] [ ) ( ) ( ) ( ) ( ) ( ) ( ) ( δ δ δ

) (t x

[ ]

ˆ n x

Continuous-Time to Discrete-Time Conversion Periodic Impulse Train Discrete-Time Signal Continuous-Time Signal Digital Signal

) (t x

∞ −∞ =

− =

n

nT t t p ) ( ) ( δ

∫ = ≠ ∀ =

∞ ∞ −

1 ) ( , ) ( dt t t t δ δ

Discrete-time signal with discrete amplitude

slide-60
SLIDE 60

60

The Sampling Theorem (cont.)

( )

Ω j X p

( )

Ω j X p

( )

Ω j P

frequency) (sampling 2 2

s s

F T π π = = Ω

     = Ω < Ω T

s N

π 2 1      = Ω > Ω T

s N

π 2 1

aliasing distortion ( ) ( )

∞ −∞ =

Ω − Ω = Ω

k s

k T j P δ π 2

( ) ( ) ( ) ( ) ( ) ( )

∞ −∞ =

Ω − Ω = Ω Ω ∗ Ω = Ω

k s p p

k j X T j X j P j X j X 1 2 1 π

frequency the : 2 / Nyquist Fs

N

Ω −

( )

Ω j X

N