sp2004f lecture07-01 digital signal processingberlin.csie.ntnu.edu.tw/pastcourses/2004-tcfst-audio...

54
Digital Signal Processing 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 Berlin Chen 2004

Upload: others

Post on 11-Oct-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

  • Digital Signal Processing

    References:1. X. Huang et. al., Spoken Language Processing, Chapters 5, 62. J. R. Deller et. al., Discrete-Time Processing of Speech Signals, Chapters 4-63. J. W. Picone, “Signal modeling techniques in speech recognition,”

    proceedings of the IEEE, September 1993, pp. 1215-1247

    Berlin Chen 2004

  • 2004 Speech - Berlin Chen 2

    Analog Signal to Digital Signal

    [ ] ( ) period sampling : , TnTxnx a=

    rate sampling 1TFs =

    Analog Signal

    Discrete-time Signal or Digital Signal

    nTt =

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

    Digital Signal:Discrete-time

    signal with discreteamplitude

  • 2004 Speech - Berlin Chen 3

    Analog Signal to Digital Signal (cont.)

    Impulse TrainTo

    Sequence [ ] ( ))( ˆ nTxnx a=

    Sampling

    ( )

    ( ) ( ) ( ) ( )

    ( ) ( ) [ ] ( )∑∑

    ∑∞

    −∞=

    −∞=

    −∞=

    −=−=

    −==

    nna

    naa

    s

    nTtnxnTtnTx

    nTttxtstx

    tx

    δδ

    δ

    ( )tx a

    Continuous-TimeSignal

    Discrete-TimeSignal

    Digital Signal

    Discrete-time signal with discrete

    amplitude

    [ ] nx

    Continuous-Time to Discrete-Time Conversion

    ( ) ( )∑∞−∞=

    −=n

    nTtts δPeriodic Impulse Train ( ) [ ]nxtxs by specifieduniquely becan

    switch

    ( )tx a

    ( ) ( )∑∞−∞=

    −=n

    nTtts δ

    ( )

    ( )∫∞

    ∞−

    =

    ≠∀=

    1

    0 ,0

    dtt

    tt

    δ

    δ1

    T0 2T 3T 4T 5T 6T 7T 8T-T-2T

  • 2004 Speech - Berlin Chen 4

    Analog Signal to Digital Signal (cont.)

    • A continuous signal sampled at different periods

    T

    1

    ( )tx a ( )tx a

    ( )

    ( ) ( ) ( ) ( )

    ( ) ( ) [ ] ( )∑∑

    ∑∞

    −∞=

    −∞=

    −∞=

    −=−=

    −==

    nna

    naa

    s

    nTtnxnTtnTx

    nTttxtstx

    tx

    δδ

    δ

  • 2004 Speech - Berlin Chen 5

    Analog Signal to Digital Signal (cont.)

    ( )ΩjXa

    frequency) (sampling22 ss FTππ ==Ω

    ⎟⎠⎞

    ⎜⎝⎛=ΩΩ

    TsNπ

    21

    aliasing distortion

    ( ) ( )∑∞−∞=

    Ω−Ω=Ωk

    skTjS δπ2

    ( ) ( ) ( )

    ( ) ( )( )∑∞

    −∞=

    Ω−Ω=Ω

    Ω∗Ω=Ω

    ksas

    as

    kjXT

    jX

    jSjXjX

    121π

    NΩ

    ( )⎭⎬⎫

    ⎩⎨⎧

    Ω>Ω⇒Ω>Ω−Ω

    2 NsNNsQ

    ( )⎭⎬⎫

    ⎩⎨⎧

  • 2004 Speech - Berlin Chen 6

    Analog Signal to Digital Signal (cont.)

    • To avoid aliasing (overlapping, fold over)– The sampling frequency should be greater than two times of

    frequency of the signal to be sampled →– (Nyquist) sampling theorem

    • To reconstruct the original continuous signal– Filtered with a low pass filter with band limit

    • Convolved in time domain sΩ

    ( ) tth sΩ= sinc( ) ( ) ( )

    ( ) ( )∑

    ∑∞

    −∞=

    −∞=

    −Ω=

    −=

    nsa

    naa

    nTtnTx

    nTthnTxtx

    sinc

    Ns Ω>Ω 2

  • 2004 Speech - Berlin Chen 7

    Two Main Approaches to Digital Signal Processing

    • Filtering

    • Parameter Extraction

    FilterSignal in Signal out

    [ ] nx [ ] ny

    ParameterExtraction

    Signal in Parameter out

    [ ] nx

    1

    12

    11

    ⎥⎥⎥⎥⎥⎥

    ⎢⎢⎢⎢⎢⎢

    mc

    cc

    2

    22

    21

    ⎥⎥⎥⎥⎥⎥

    ⎢⎢⎢⎢⎢⎢

    mc

    cc

    2

    1

    ⎥⎥⎥⎥⎥⎥

    ⎢⎢⎢⎢⎢⎢

    Lm

    L

    L

    c

    cc

    e.g.:1. Spectrum Estimation2. Parameters for Recognition

    Amplify or attenuate some frequencycomponents of [ ] nx

  • 2004 Speech - Berlin Chen 8

    Sinusoid Signals

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

    [ ] ( )φω += nAnx cos

    ωφ

    A

    Tf ππω 22 ==

    [ ] ⎟⎠⎞

    ⎜⎝⎛ −=

    2cos πωnAnx

    samples 25=T

    10frequency normalized:

    ≤≤ ff

    Period, represented by number of samples

  • 2004 Speech - Berlin Chen 9

    Sinusoid Signals (cont.)

    • is periodic with a period of N (samples)

    • Examples (sinusoid signals)

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

    [ ]nx[ ] [ ]nxNnx =+

    ( ) ( )φωφω +=++ nANnA cos)(cosπω 2=N

    Nπω 2=

    [ ] ( )4/cos1 nnx π=[ ] ( )8/3cos2 nnx π=[ ] ( )nnx cos3 =

  • 2004 Speech - Berlin Chen 10

    Sinusoid Signals (cont.)[ ] ( )

    ( )

    8

    integers positive are and 824

    44cos)(

    4cos

    4cos

    4/cos

    1

    11

    11

    1

    =∴

    ⋅⇒⋅=⇒

    ⎟⎠⎞

    ⎜⎝⎛ +=⎟

    ⎠⎞

    ⎜⎝⎛ +=⎟

    ⎠⎞

    ⎜⎝⎛=

    =

    N

    kNkkN

    NnNnn

    nnx

    ππ

    πππππ

    [ ] ( )

    ( )

    ( )

    16

    numbers positive are and 3

    1628

    3

    83

    83cos

    83cos

    83cos

    8/3cos

    2

    222

    22

    2

    =∴

    =⇒⋅=⋅⇒

    ⎟⎠⎞

    ⎜⎝⎛ ⋅+⋅=⎟

    ⎠⎞

    ⎜⎝⎛ +=⎟

    ⎠⎞

    ⎜⎝⎛ ⋅=

    =

    N

    kNkNkN

    NnNnn

    nnx

    ππ

    πππππ

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

    !exist t doesn' integers positive are and

    2 cos1cos1cos

    cos

    3

    3

    3

    33

    3

    NkN

    kNNnNnn

    nnx

    ⋅=⇒+=+⋅=⋅=

    =

    Q

    π

  • 2004 Speech - Berlin Chen 11

    Sinusoid Signals (cont.)

    • Complex Exponential Signal– Use Euler’s relation to express complex numbers

    ( )φφφ sincos

    jAAez

    jyxzj +==⇒

    +=( )number real a is A

    Re

    Im

    φφ

    sin cos

    AyAx

    ==

  • 2004 Speech - Berlin Chen 12

    Sinusoid Signals (cont.)

    • A Sinusoid Signal

    [ ] ( )( ){ }

    { }φωφω

    φω

    jnj

    nj

    eAeAe

    nAnx

    Re Re

    cos

    =

    =

    +=+

  • 2004 Speech - Berlin Chen 13

    Sinusoid Signals (cont.)

    • Sum of two complex exponential signals with same frequency

    – When only the real part is considered

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

    ( ) ( )

    ( )

    ( )φω

    φω

    φφω

    φωφω

    +

    ++

    =

    =

    +=

    +

    nj

    jnj

    jjnj

    njnj

    Ae

    Aee

    eAeAe

    eAeA10

    10

    10

    10

    ( ) ( ) ( )φωφωφω +=+++ nAnAnA coscoscos 1100

    numbers real are and , 10 AAA

  • 2004 Speech - Berlin Chen 14

    Some Digital Signals

  • 2004 Speech - Berlin Chen 15

    Some Digital Signals

    • Any signal sequence can be represented as a sum of shift and scaled unit impulse sequences (signals)

    [ ]nx

    [ ] [ ] [ ]knkxnxk

    −= ∑∞

    −∞=δ

    scale/weightedTime-shifted unit impulse sequence

    [ ] [ ] [ ] [ ] [ ]

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

    33221101122

    3

    2

    −+−−+−+++−++=−+−+−+++−++−=

    −=−= ∑∑−=

    −∞=

    nnnnnnnxnxnxnxnxnx

    knkxknkxnxkk

    δδδδδδδδδδδδ

    δδ

  • 2004 Speech - Berlin Chen 16

    Digital Systems

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

    [ ] [ ]{ }nxTny =

    [ ]nx { } T [ ]ny

  • 2004 Speech - Berlin Chen 17

    Properties of Digital Systems

    • Linear– Linear combination of inputs maps to linear

    combination of outputs

    • Time-invariant (Time-shift)– A time shift of in the input by m samples give a shift in

    the output by m samples

    [ ] [ ]{ } [ ]{ } [ ]{ }nxbTnxaTnbxnaxT 2121 +=+

    [ ] [ ]{ } mmnxTmny ∀±=± ,

  • 2004 Speech - Berlin Chen 18

    Properties of Digital Systems (cont.)

    • Linear time-invariant (LTI)– The system output can be expressed as a

    convolution (迴旋積分) of the input x[n] and the impulse response h[n]

    – The system can be characterized by the system’s impulse response h[n], which also is a signal sequence

    • If the input x[n] is impulse , the output is h[n][ ]nδ

  • 2004 Speech - Berlin Chen 19

    Properties of Digital Systems (cont.)

    • Linear time-invariant (LTI)– Explanation:

    [ ] [ ] [ ]knkxnxk

    −= ∑∞

    −∞=δ

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

    [ ] [ ][ ] [ ]nhnx

    knhkx

    knTkx

    knkxTnxT

    k

    k

    k

    ∗=

    −=

    −=

    −=⇒

    −∞=

    −∞=

    −∞=

    δ

    δ

    scale

    Time-shifted unit impulse sequence

    Time invariant

    DigitalSystem

    [ ]nδ [ ]nh

    linear

    Time-invariant

    [ ] [ ][ ] [ ]knhkn

    nhnT

    T

    −⎯→⎯−

    ⎯→⎯

    δ

    δ

    Impulse response

    convolution

  • 2004 Speech - Berlin Chen 20

    Properties of Digital Systems (cont.)

    • Linear time-invariant (LTI)– Convolution

    • Example

    [ ]nδ 0 12

    13

    -2[ ]nh

    LTI[ ]nx ?

    0 1 2

    23

    1

    0

    3

    0 12

    39

    -6

    1

    2

    1 23

    26

    -4

    LTI

    2

    1

    2 34

    1 3

    -2

    Length=M=3

    Length=L=3

    Length=L+M-1

    [ ]nδ⋅3

    [ ]12 −⋅ nδ

    [ ]21 −⋅ nδ

    0

    3

    1

    11

    2

    13

    -1

    4

    -2

    Sum up

    [ ]ny

    [ ]nh⋅3

    [ ]12 −⋅ nh

    [ ]2−nh

  • 2004 Speech - Berlin Chen 21

    Properties of Digital Systems (cont.)

    • Linear time-invariant (LTI)– Convolution: Generalization

    • Reflect h[k] about the origin (→ h[-k]) • Slide (h[-k] → h[-k+n] or h[-(k-n)] ), multiply it with

    x[k]• Sum up [ ]kx

    [ ]kh

    [ ]kh −

    Reflect Multiply

    slide

    Sum up

    n

    [ ] [ ] [ ]

    [ ] ( )[ ]nkhkx

    knhkxny

    k

    k

    −−=

    −=

    ∑∞

    −∞=

    −∞=

  • 2004 Speech - Berlin Chen 22

    0 12

    13

    -2

    0-1-2

    13

    -2

    0 1 2

    23

    1

    0

    3

    10-1

    13

    -21

    11

    210

    13

    -2

    1

    2

    321

    13

    -2 -1

    3

    432

    13

    -2 -2

    4

    0

    3

    1

    11

    2

    13

    -1

    4

    -2

    Sum up

    [ ]kh

    [ ]kx

    [ ]kh −[ ] 0, =nny

    [ ]1+−kh

    [ ]2+−kh

    [ ]3+−kh

    [ ]4+−kh

    [ ] 1, =nny

    [ ] 2, =nny

    [ ] 3, =nny

    [ ] 4, =nny

    [ ]ny

    Reflect [ ] [ ] [ ][ ] [ ]knhkx

    nhnxny

    k−=

    ∗=

    ∑∞

    −∞=

    Convolution

  • 2004 Speech - Berlin Chen 23

    Properties of Digital Systems (cont.)

    • Linear time-invariant (LTI)– Convolution is commutative and distributive

    [ ] [ ] [ ][ ] [ ]

    [ ] [ ]

    [ ] [ ]knxkh

    knhkx

    nxnhnhnxny

    k

    k

    −=

    −=

    ==

    −∞=

    −∞=

    * *

    [ ]nh 1 [ ]nh 2 [ ]nh 2 [ ]nh 1

    [ ]nh 2

    [ ]nh 1

    [ ] [ ]nhnh 21 +

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

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

    [ ] [ ] [ ][ ] [ ] [ ]nhnhnx

    nhnhnx

    12

    21

    ****

    =

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

    nhnhnx

    21

    21

    ***

    +=+

    Commutation

    Distribution

  • 2004 Speech - Berlin Chen 24

    Properties of Digital Systems (cont.)

    • Bounded Input and Bounded Output (BIBO): stable

    – A LTI system is BIBO if only if h[n] is absolutely summable

    [ ] ∞≤∑∞−∞=k

    kh

    [ ][ ] nBny

    nBnx

    y

    x

    ∀∞

  • 2004 Speech - Berlin Chen 25

    Properties of Digital Systems (cont.)

    • Causality– A system is “casual” if for every choice of n0, the output

    sequence value at indexing n=n0 depends on only the input sequence value for n≤n0

    – Any noncausal FIR can be made causal by adding sufficient long delay

    [ ] [ ] [ ]∑ ∑= =

    −+−=K

    k

    M

    mkkk mnxknyny

    1000 βα

    z-1

    z-1

    z-1

    0β [ ]ny[ ]nx1β

    z-1

    z-1

    z-1

  • 2004 Speech - Berlin Chen 26

    Discrete-Time Fourier Transform (DTFT)

    • Frequency Response– Defined as the discrete-time Fourier Transform of

    – is continuous and is periodic with period=

    – is a complex function of

    [ ]nh( )ωjeH

    π2( )ωjeH

    ω

    ( ) ( ) ( )( ) ( )ωω

    ωωω

    jeHjj

    ji

    jr

    j

    eeH

    ejHeHeH∠=

    +=

    magnitudephase

    ( )ωjeH

    proportional to twotimes of the samplingfrequency

  • 2004 Speech - Berlin Chen 27

    Discrete-Time Fourier Transform (cont.)

    • Representation of Sequences by Fourier Transform

    – A sufficient condition for the existence of Fourier transform

    [ ] ∞

  • 2004 Speech - Berlin Chen 28

    Discrete-Time Fourier Transform (cont.)• Convolution Property

    ( ) [ ]

    [ ] [ ] [ ]

    ( ) [ ] [ ]

    [ ] [ ]

    ( ) ( )

    [ ] ( ) ( )ωω

    ωω

    ωω

    ωω

    ωω

    jj

    jj

    nj

    nk

    kj

    nj

    n k

    j

    k

    n

    njj

    eHeXnhnx

    eHeX

    enhekx

    eknhkxeY

    knhkxnhnxny

    enheH

    ⇔∗∴

    =

    ⎟⎠

    ⎞⎜⎝

    ⎛=

    −=

    −=∗=

    =

    −∞

    −∞=

    −∞=

    −∞

    −∞=

    −∞=

    −∞=

    −∞=

    ∑∑

    ∑ ∑

    ][

    '

    ][][

    '

    '

    ( ) ( ) ( )( ) ( ) ( )( ) ( ) ( )ωωω

    ωωω

    ωωω

    jjj

    jjj

    jjj

    eHeXeY

    eHeXeY

    eHeXeY

    ∠+∠=∠⇒

    =⇒

    =

    knnknnknn

    −−=−⇒+=⇒−=

    ''

    '

  • 2004 Speech - Berlin Chen 29

    Discrete-Time Fourier Transform (cont.)

    • Parseval’s Theorem

    – Define the autocorrelation of signal

    [ ] ( )∫∑ −∞−∞=

    = ππω ω

    πdeXnx j

    n

    22 21

    power spectrum

    [ ]nx[ ]

    ( ) ][][][][

    ][][

    *

    *

    nxnxlnxlx

    mxnmxnR

    l

    mxx

    −∗=−−=

    +=

    ∗∞

    −∞=

    −∞=

    ( ) ( ) ( ) ( ) 2* ωωωω XXXS xx ==⇔

    [ ] ( ) ( )∫∫ −− ==π

    π

    ωπ

    π

    ω ωωπ

    ωωπ

    deXdeSnR njnjxxxx2

    21

    21

    [ ] [ ] [ ] [ ] ( )∑ ∫∑∞

    −∞=−

    −∞=

    ===

    =

    mmxx dXmxmxmxR

    πωω

    π22*

    210

    0Set

    The total energy of a signalcan be given in either the time or frequency domain.

    )(

    lnnlmnml

    −−=−=⇒+=

  • 2004 Speech - Berlin Chen 30

    Discrete-Time Fourier Transform (cont.)

  • 2004 Speech - Berlin Chen 31

    Z-Transform

    • z-transform is a generalization of (Discrete-Time) Fourier transform

    – z-transform of is defined as

    • Where , a complex-variable• For Fourier transform

    – z-transform evaluated on the unit circle

    ( ) [ ]∑∞−∞=

    −=n

    nznhzH

    [ ] ( )zHnh [ ] ( )ωjeHnh

    [ ]nh

    ωjrez =

    ( ) ( ) ωω jezj zHeH ==)1( == zez jω

    complex plan

    unit circle

    Im

    Re

  • 2004 Speech - Berlin Chen 32

    Z-Transform (cont.)

    • Fourier transform vs. z-transform– Fourier transform used to plot the frequency response of a filter– z-transform used to analyze more general filter characteristics, e.g.

    stability

    • ROC (Region of Converge)– Is the set of z for which z-transform exists (converges)

    – In general, ROC is a ring-shaped region and the Fourier transform exists if ROC includes the unit circle

    [ ] ∞

  • 2004 Speech - Berlin Chen 33

    Z-Transform (cont.)

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

    – Similarly, anti-causal can be defined as

    • An LTI system is defined to be stable, if for every bounded input it produces a bounded output– Necessary condition:

    • That is Fourier transform exists, and therefore z-transform include the unit circle in its region of converge

    [ ] 0for 0 = nnh

    Right-sided sequence

    Left-sided sequence

    [ ] ∞

  • 2004 Speech - Berlin Chen 34

    Z-Transform (cont.)

    • Right-Sided Sequence– E.g., the exponential signal

    [ ] [ ] [ ]⎩⎨⎧

    <≥

    ==0for 00for 1

    ere wh, .1 1 nn

    nunuanh n

    ( ) ( ) 111 11

    −∞=

    −−∞

    −∞= −=== ∑∑

    azazzazH

    n

    nn

    n

    n

    If 11 ∴ is 1

    Re

    Im

    a[ ] 1 if exists

    ofansformFourier tr

    1

  • 2004 Speech - Berlin Chen 35

    Z-Transform (cont.)

    • Left-Sided Sequence– E.g.

    [ ] [ ]1 .2 2 −−−= nuanh n( ) [ ]

    ( ) 111

    10

    1

    1

    12

    11

    11111

    1

    −−

    =

    −∞

    =

    −−

    −∞=

    −∞

    −∞=

    −=

    −−

    −=−

    −=−=−=

    −=−−−=

    ∑∑

    ∑∑

    azzaza

    zazaza

    zaznuazH

    n

    n

    n

    nn

    n

    n

    nn

    n

    n If 11

  • 2004 Speech - Berlin Chen 36

    Z-Transform (cont.)

    • Two-Sided Sequence– E.g.

    [ ] [ ] [ ]121

    31 .3 3 −−⎟

    ⎠⎞

    ⎜⎝⎛−⎟

    ⎠⎞

    ⎜⎝⎛−= nununh

    nn

    [ ]

    [ ]21 ,

    211

    1 121

    31 ,

    311

    1 31

    1

    1

    <−

    ⎯→←−−⎟⎠⎞

    ⎜⎝⎛−

    >+

    ⎯→←⎟⎠⎞

    ⎜⎝⎛ −

    zz

    nu

    zz

    nu

    zn

    zn

    Re

    Im

    ×

    the unit cycle

    ×21

    31

    − [ ]circleunit theincludet doesn' because

    exist,t doesn' of ansformFourier tr

    3

    3

    ROCnh

    31 and

    21 is 3 >

  • 2004 Speech - Berlin Chen 37

    Z-Transform (cont.)

    • Finite-length Sequence– E.g.

    [ ]⎩⎨⎧ −≤≤

    =others ,0

    10 , .3 4

    Nnanh

    n

    ( ) ( ) ( )azaz

    zazazazzazH

    NN

    N

    NN

    n

    nN

    n

    nn

    −−

    =−

    −=== −−

    −−

    =

    −−

    =

    − ∑∑ 11

    11

    0

    11

    04

    11

    1

    0except plane- entire is 4 =∴ zzROC

    13221 ..... −−−− ++++ NNNN azaazz

    Im

    ×

    the unit cycle

    31

    7 poles at zero A pole and zero at is cancelled az =

    ( ) 11 ,2

    −== ,..,N kaez Nkj

    k

    π

    If N=8

    0 N-1

    Re

  • 2004 Speech - Berlin Chen 38

    Z-Transform (cont.)

    • Properties of z-transform1. If is right-sided sequence, i.e. and if ROC

    is the exterior of some circle, the all finite for which will be in ROC

    • If ,ROC will include

    2. If is left-sided sequence, i.e. , the ROC is the interior of some circle,

    • If ,ROC will include 3. If is two-sided sequence, the ROC is a ring4. The ROC can’t contain any poles

    [ ]nh [ ] 1 ,0 nnnh ≤=

    01 ≥n

    0rz >z

    ∞=z

    [ ]nh [ ] 2 ,0 nnnh ≥=

    02

  • 2004 Speech - Berlin Chen 39

    Summary of the Fourier and z-transforms

  • 2004 Speech - Berlin Chen 40

    LTI Systems in the Frequency Domain

    • Example 1: A complex exponential sequence– System impulse response

    – Therefore, a complex exponential input to an LTI systemresults in the same complex exponential at the output, but modified by

    • The complex exponential is an eigenfunction of an LTI system, and is the associated eigenvalue

    [ ]nh[ ] [ ] [ ] [ ]

    [ ]

    ( ) njjkjnj

    knj

    eeH

    ekhe

    ekhnhnxny

    ωω

    ωω

    ω

    =

    =

    =∗=

    −∞

    ∞=

    −∞

    ∞=

    -k

    )(

    -k( )

    response.frequency system theas toreferredoften isIt

    response. impulse system the of ansformFourier tr the:ωjeH

    [ ] njenx ω= [ ] [ ] [ ][ ] [ ][ ] [ ]

    [ ] [ ]knxkh

    knhkx

    nxnhnhnxny

    k

    k

    −=

    −=

    ==

    −∞=

    −∞=

    * *

    [ ]{ } ( ) [ ]nxeHnxT jω=( )jωeH

    ( )jωeH

  • 2004 Speech - Berlin Chen 41

    [ ] ( ) ( )

    ( ) ( )[ ]

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

    00

    000

    0

    0000

    0000

    0

    )()(

    )()(

    cos 2

    2

    22

    jωjω

    njeHjjωnjeHjjω

    njjω*njjω

    njjjωnjjjω

    eHneHA

    eeeHeeeHA

    eeHeeHA

    eeAeHeeAeHny

    jωjω

    ∠++=

    +=

    +=

    +=

    +−∠−+∠

    +−+

    −−−

    φω

    φωφω

    φωφω

    ωφωφ

    LTI Systems in the Frequency Domain (cont.)

    • Example 2: A sinusoidal sequence

    – System impulse response

    [ ] ( )φ+= nwAnx 0cos[ ] ( )

    njjnjj eeAeeAnAnx

    00

    22

    cos 0ωφωφ

    φω

    −−+=

    +=

    [ ]nh( )θθ

    θ

    θ

    θ

    θθ

    θθ

    jj

    j

    j

    ee

    ieie

    +=⇒

    −=

    +=

    21cos

    sincossincos

    ( ) ( )( ) ( ) ( )000

    00

    jωeHjjωjω*

    jω*jω

    eeHeH

    eHeH∠−

    =

    =

    ( )( ) ( )

    ωωωω

    ωω

    ωω

    ω

    ω

    ω

    sincos sincos

    sincos *

    sincos *

    jje

    jejyxz

    jejyxz

    j

    j

    j

    −=−+−=

    −=⇒−=

    +=⇒+=

  • 2004 Speech - Berlin Chen 42

    LTI Systems in the Frequency Domain (cont.)

    • Example 3: A sum of sinusoidal sequences

    – A similar expression is obtained for an input consisting of a sum of complex exponentials

    [ ] ( )∑=

    +=K

    kkkk nAnx

    1cos φω

    [ ] ( ) ( )[ ]∑=

    ∠++=K

    k

    jkk

    jk

    kk eHneHAny1

    cos ωω φω

  • 2004 Speech - Berlin Chen 43

    LTI Systems in the Frequency Domain (cont.)

    • Example 4: Convolution Theorem

    [ ] [ ]∑∞−∞=

    −=k

    kPnnx δ

    [ ] [ ] 1 ,

  • 2004 Speech - Berlin Chen 44

    LTI Systems in the Frequency Domain (cont.)

    • Example 5: Windowing Theorem [ ] [ ] ( ) ( )ωωπ

    jj eXeWnwnx ∗⇔21

    [ ] [ ]∑∞−∞=

    −=k

    kPnnx δ

    [ ]⎪⎩

    ⎪⎨⎧

    −=⎟⎠⎞

    ⎜⎝⎛

    −−=

    otherwise 0

    1,......,1,0 ,1

    2cos46.054.0 NnN

    nnw

    πHamming window

    ( ) ( ) ( )

    ( )

    ( )

    ( )

    ∑ ∑

    −∞=

    ⎟⎠⎞

    ⎜⎝⎛ −

    −∞=

    ∞=

    −∞=

    −∞=

    −∞=

    ⎟⎟⎠

    ⎞⎜⎜⎝

    ⎛=

    ⎭⎬⎫

    ⎩⎨⎧

    ⎟⎠⎞

    ⎜⎝⎛ −−=

    ⎭⎬⎫

    ⎩⎨⎧

    ⎟⎠⎞

    ⎜⎝⎛ −∗=

    ⎟⎠⎞

    ⎜⎝⎛ −∗=

    ∗=

    k

    kP

    j

    k

    m

    m

    jm

    k

    j

    k

    j

    jjj

    eWP

    mkP

    eWP

    kP

    eWP

    kPP

    eW

    eXeWeY

    πω

    ω

    ω

    ωωω

    πωδ

    πωδ

    πωδππ

    π

    21

    2 1

    21

    2221

    21

  • 2004 Speech - Berlin Chen 45

    Difference Equation Realization for a Digital Filter

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

    [ ] [ ] [ ]∑ ∑= =

    −+−=N

    k

    M

    kkk knxknyny

    1 0βα

    ( ) ( ) ( ) kNk

    M

    kk

    kk zzXzzYzY

    = =

    −∑ ∑+=1 0

    βα

    delay property

    ( ) ( )( ) ∑

    =

    =

    −== N

    k

    kk

    M

    k

    kk

    z

    z

    zXzYzH

    1

    0

    1 α

    β

    [ ] ( )[ ] ( ) 00 nzzXnnx

    zXnx−→−

    →linearity and delay properties

    A rational transfer functionCausal:Rightsided, the ROC outside the outmost poleStable:The ROC includes the unit circleCausal and Stable:all poles must fall inside the unit circle (not including zeros)

    z-1

    z-1

    z-1

    0β [ ]ny[ ]nx1β

    z-1

    z-1

    z-1

  • 2004 Speech - Berlin Chen 46

    Difference Equation Realization for a Digital Filter (cont.)

  • 2004 Speech - Berlin Chen 47

    Magnitude-Phase Relationship

    • Minimum phase system:– The z-transform of a system impulse response sequence ( a

    rational transfer function) has all zeros as well as poles inside the unit cycle

    – Poles and zeros called “minimum phase components”– Maximum phase: all zeros (or poles) outside the unit cycle

    • All-pass system:– Consist a cascade of factor of the form

    – Characterized by a frequency responsewith unit (or flat) magnitude for all frequencies

    1

    111

    ±

    − ⎥⎦

    ⎤⎢⎣

    − azz-a*

    Poles and zeros occur at conjugate reciprocal locations

    111

    1 =− −azz-a*

  • 2004 Speech - Berlin Chen 48

    Magnitude-Phase Relationship (cont.)

    • Any digital filter can be represented by the cascade of a minimum-phase system and an all-pass system

    ( ) ( ) ( )zHzHzH apmin=

    ( )( )

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

    ( )( )( )( ) filter. pass-all a is 11

    filter. phase minimum a also is 1

    :where

    111

    filter) phase minimum a is ( 1

    :as expressed becan circle.unit theoutside

    1)( 1 zero oneonly has that Suppose

    1

    *

    11

    1

    *1

    1

    1*

    1

    −−

    −−

    −−

    −=

    −=

    <

    azza

    azzH

    azzaazzH

    zHzazHzH

    zH

    aa*zH

  • 2004 Speech - Berlin Chen 49

    FIR Filters

    • FIR (Finite Impulse Response)– The impulse response of an FIR filter has finite duration– Have no denominator in the rational function

    • No feedback in the difference equation

    – Can be implemented with simple a train of delay, multiple, and add operations

    ( )zH

    [ ] [ ]∑=

    −=M

    rr rnxny

    z-1

    z-1

    z-1

    1β0β

    [ ]ny[ ]nx

    [ ]⎩⎨⎧ ≤≤

    =otherwise ,00 , Mn

    nh nβ

    ( ) ( )( ) ∑=−==

    M

    k

    kk zzX

    zYzH0β

  • 2004 Speech - Berlin Chen 50

    First-Order FIR Filters

    • A special case of FIR filters

    [ ] [ ] [ ]1−+= nxnxny α ( ) 11 −+= zzH α( ) ωω α jj eeH −+= 1( ) ( )

    ( ) ( )

    ( ) ⎟⎠⎞

    ⎜⎝⎛

    +−=

    +=++=

    −+=

    ωαωαθ

    ωαωαωα

    ωωα

    ω

    ω

    cos1sinarctan

    cos21sincos1

    sincos122

    22

    j

    j

    e

    jeH

    ( ) 2log10 ωjeH

  • 2004 Speech - Berlin Chen 51

    Discrete Fourier Transform (DFT)

    • The Fourier transform of a discrete-time sequence is a continuous function of frequency– We need to sample the Fourier transform finely enough to be

    able to recover the sequence– For a sequence of finite length N, sampling yields the new

    transform referred to as discrete Fourier transform (DFT)

    ( ) [ ]

    [ ] [ ] 10 , 1

    10 ,

    21

    0

    21

    0

    −≤≤=

    −≤≤=

    ∑−

    =

    −−

    =

    NnekXN

    nx

    NnenxkX

    knN

    jN

    k

    knN

    jN

    π

    Inverse DFT, Synthesis

    DFT, Analysis

  • 2004 Speech - Berlin Chen 52

    Discrete Fourier Transform (cont.)

    [ ] [ ]

    ( )

    ( ) ( ) ( )

    [ ][ ]

    [ ]

    [ ][ ]

    [ ]⎥⎥⎥⎥

    ⎢⎢⎢⎢

    =

    ⎥⎥⎥⎥

    ⎢⎢⎢⎢

    −⎥⎥⎥⎥⎥

    ⎢⎢⎢⎢⎢

    −≤≤=

    −≤≤∀

    −⋅−−⋅−−

    −⋅−⋅−

    −−

    =∑

    1

    10

    1

    10

    1

    1

    111

    10 ,

    10

    112112

    112112

    21

    0

    NX

    XX

    Nx

    xx

    ee

    ee

    NnenxkX

    Nk

    NNN

    jNN

    j

    NN

    jN

    j

    knN

    jN

    n

    MM

    L

    MLMM

    L

    L

    ππ

    ππ

    π

  • 2004 Speech - Berlin Chen 53

    Discrete Fourier Transform (cont.)

    • Orthogonality of Complex Exponentials ( )

    ⎩⎨⎧ =

    =∑−

    =

    otherwise ,0 if ,11 1

    0

    2 mNk-re

    N

    N

    n

    nrkN

    j π

    [ ] [ ]

    [ ] [ ]( )

    [ ]( )

    [ ]

    [ ] [ ]kn

    Nj

    nrkN

    j

    nrkN

    jrnN

    j

    knN

    j

    enxkX

    rX

    eN

    kX

    ekXN

    enx

    ekXN

    nx

    N

    r

    N

    n

    N

    k

    N

    n

    N

    k

    N

    n

    N

    k

    π

    π

    ππ

    π

    2

    2

    22

    2

    1

    0

    1

    0

    1

    0

    1

    0

    1

    0

    1

    0

    1

    0

    1

    1

    1

    −−

    ∑∑

    ∑ ∑∑

    =

    =

    =

    =

    =

    =

    =

    =⇒

    =

    ⎥⎥⎦

    ⎢⎢⎣

    ⎡=

    =⇒

    =

    [ ] [ ][ ]rX

    mNrXkX=

    +=

  • 2004 Speech - Berlin Chen 54

    Discrete Fourier Transform (DFT)

    • Parseval’s theorem

    [ ] ( )∑∑−

    =

    =

    =1

    0

    21

    0

    2 1 N

    k

    N

    nkX

    Nnx Energy density

    /ColorImageDict > /JPEG2000ColorACSImageDict > /JPEG2000ColorImageDict > /AntiAliasGrayImages false /DownsampleGrayImages true /GrayImageDownsampleType /Bicubic /GrayImageResolution 300 /GrayImageDepth -1 /GrayImageDownsampleThreshold 1.50000 /EncodeGrayImages true /GrayImageFilter /DCTEncode /AutoFilterGrayImages true /GrayImageAutoFilterStrategy /JPEG /GrayACSImageDict > /GrayImageDict > /JPEG2000GrayACSImageDict > /JPEG2000GrayImageDict > /AntiAliasMonoImages false /DownsampleMonoImages true /MonoImageDownsampleType /Bicubic /MonoImageResolution 1200 /MonoImageDepth -1 /MonoImageDownsampleThreshold 1.50000 /EncodeMonoImages true /MonoImageFilter /CCITTFaxEncode /MonoImageDict > /AllowPSXObjects false /PDFX1aCheck false /PDFX3Check false /PDFXCompliantPDFOnly false /PDFXNoTrimBoxError true /PDFXTrimBoxToMediaBoxOffset [ 0.00000 0.00000 0.00000 0.00000 ] /PDFXSetBleedBoxToMediaBox true /PDFXBleedBoxToTrimBoxOffset [ 0.00000 0.00000 0.00000 0.00000 ] /PDFXOutputIntentProfile () /PDFXOutputCondition () /PDFXRegistryName (http://www.color.org) /PDFXTrapped /Unknown

    /Description >>> setdistillerparams> setpagedevice