67
Chapter 3 Chapter 3 The Discrete-Time Fourier Transform Transform 清大電機系林嘉文 [email protected] 03 5731152 © The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides prepared by S. K. Mitra 3-1-1 03-5731152

Chapter 3Chapter 3 The Discrete-Time Fourier Transformcwlin/courses/dsp/notes/ch3_Mitra_dsp_c.pdfContinuous-Time Fourier TransformTime Fourier Transform • Deetofinition – Thee

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

  • Chapter 3Chapter 3

    The Discrete-Time Fourier TransformTransform

    清大電機系林嘉文

    [email protected] 5731152

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-1

    03-5731152

  • Continuous Time Fourier TransformContinuous-Time Fourier Transform• Definition – The CTFT of a continuous-time signal xa(t) e t o e C o a co uous e s g a a(t)

    is given by

    • Often referred to as the Fourier spectrum or simply the spectrum of the continuous-time signalspectrum of the continuous time signal

    • Definition – The inverse CTFT of a Fourier transform Xa( jΩ) is given bya( j ) g y

    • Often referred to as the Fourier integral• A CTFT pair will be denoted as

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-2

    p

  • Continuous Time Fourier TransformContinuous-Time Fourier Transform• Ω is real and denotes the continuous-time angular• Ω is real and denotes the continuous-time angular

    frequency variable in radians• In general, the CTFT is a complex function of Ω in theIn general, the CTFT is a complex function of Ω in the

    range − ∞ < Ω < ∞• It can be expressed in the polar form asp p

    The quantity ǀX ( jΩ)ǀ is called the magnitude spectrumwhere

    • The quantity ǀXa( jΩ)ǀ is called the magnitude spectrumand the quantity θa(Ω) is called the phase spectrumB th t l f ti f Ω• Both spectrums are real functions of Ω

    • In general, the CTFT Xa( jΩ) exists if xa(t) satisfies the Dirichlet conditions

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-3

    Dirichlet conditions

  • Dirichlet ConditionsDirichlet Conditions(a) The signal xa(t) has a finite number of discontinuities and a (a) e s g a a(t) as a te u be o d sco t u t es a d a

    finite number of maxima and minima in any finite interval(b) The signal is absolutely integrable, i.e.,( ) g y g

    ( ) ∞

  • Energy Density SpectrumEnergy Density Spectrum• The total energy E of a finite energy continuous-time• The total energy Ex of a finite energy continuous-time

    complex signal xa(t) is given by

    which can also be rewritten aswhich can also be rewritten as

    • Interchanging the order of the integration we get

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-5

  • Energy Density SpectrumEnergy Density Spectrum• Hence• Hence

    • This is commonly known as the Parseval’s relation for finite-energy continuous-time signalsgy g

    • The quantity ǀXa( jΩ)ǀ2 is called the energy density spectrum of xa(t) and usually denoted as

    • The energy over a specified range of Ωa ≤ Ω ≤ Ωb can be gy g a b computed using

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-6

  • Band-limited Continuous-Time Signals (1/2)

    • A full-band, finite-energy, continuous-time signal has a spectrum occupying the whole frequency range −∞

  • Band-limited Continuous-Time Signals (2/2)

    • Band-limited signals are classified according to the frequency range where most of the signal’s energy is concentratedconcentrated

    • A lowpass, continuous-time signal has a spectrum occupying the frequency range ǀΩǀ ≤ Ω < ∞ where Ω isoccupying the frequency range ǀΩǀ ≤ Ωp < , where Ωp is called the bandwidth of the signal

    • A highpass, continuous-time signal has a spectrum g pass, co uous e s g a as a spec uoccupying the frequency range 0 < Ωp ≤ ǀΩǀ < ∞ where the bandwidth of the signal is from Ωp to ∞

    • A bandpass, continuous-time signal has a spectrum occupying the frequency range 0 < ΩL ≤ ǀΩǀ ≤ ΩH < ∞,

    h Ω Ω i th b d idth

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-8

    where ΩH − ΩL is the bandwidth

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform

    Definition The discrete time Fourier transform (DTFT)• Definition - The discrete-time Fourier transform (DTFT)X (e jω) of a sequence x[n] is given by

    • In general X(ejω) is a complex function of ω as follows• In general, X(ejω) is a complex function of ω as follows

    • X (ejω) and X (ejω ) are respectively the real and• Xre(ejω) and Xim(ejω ) are, respectively, the real and imaginary parts of X(ejω), and are real functions of ω

    • X(ejω) can alternately be expressed as• X(ej ) can alternately be expressed as

    where

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-9

    where

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform• ǀX(ejω)ǀ is called the magnitude function• ǀX(ej )ǀ is called the magnitude function• θ(ω) is called the phase function • In many applications the DTFT is called the Fourier• In many applications, the DTFT is called the Fourier

    spectrum• Likewise ǀX(ejω)ǀ and θ(ω) are called the magnitude andLikewise, ǀX(e )ǀ and θ(ω) are called the magnitude and

    phase spectra• For a real sequence x[n], ǀX(ejω)ǀ and Xre(ejω) are even q [ ], ( ) re( )

    functions of ω, whereas, θ(ω) and Xim(ejω) are odd functions of ω

    • Note:The phase function θ(ω) cannot be uniquely specified for

    )()2)(( )()()( ωθωπωθωω jjkjjj eeXeeXeX == +

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-10

    any DTFT

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform• If not specified, we shall assume that the phase function ot spec ed, e s a assu e t at t e p ase u ct oθ(ω) is restricted to the following range of values:

    −π ≤ θ(ω)

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform• Example – The DTFT of unit sample sequence δ[n] is

    given by

    • Example – Consider the causal sequence

    • Its DTFT is given by• Its DTFT is given by

    ( ) ωωω αμα njnnjnj eeneX∞

    −∞

    − == ∑∑ ][

    ( ) ωω αα jnj

    nn

    e −∞

    =−∞=

    ==∑ 11

    0

    as 1

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform

    • The magnitude and phase of the DTFT X (e jω) =1/(1− 0.5e− jω) are shown below

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-13

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform• The DTFT X(ejω) of x[n] is a continuous function of ω • It is also a periodic function of ω with a period 2π:

    • Therefore

    represents the Fourier series representation of the periodic function

    • As a result, the Fourier coefficients x[n] can be computed from using the Fourier integral

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-14

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform• Inverse discrete-time Fourier transform:

    Proof:

    • The order of integration and summation can be interchanged if the summation inside the bracketsinterchanged if the summation inside the brackets converges uniformly, i.e. X(ejω) existsThenThen

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-15

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform• Now• Now

    HenceHence

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-16

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform• Convergence Condition - An infinite series of the form

    may or may not converge• Let

    • Then for uniform convergence of X(ejω)

    • Now, if x[n] is an absolutely summable sequence, i.e., if

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-17

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform

    • Then

    for all values of ω• Thus, the absolute summability of x[n] is a sufficient

    condition for the existence of the DTFT X(ejω)

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-18

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform• Example – the sequence x[n] = αnμ[n] for |α| < 1 is• Example – the sequence x[n] = α μ[n] for |α| < 1 is

    absolutely summable as

    [ ] ∑∑∞∞ 1nn

    and its DTFT X(ejω) therefore converges to 1/(1− αe−jω)

    [ ] ∞<−

    == ∑∑=−∞= 0 1

    1n

    n

    n

    n nα

    αμα

    and its DTFT X(e ) therefore converges to 1/(1 αe )uniformly

    • Since[ ] [ ]∑ ∑

    ∞ ∞

    ⎟⎞

    ⎜⎛

    22

    an absolutely summable sequence has always a finite

    [ ] [ ]∑ ∑−∞= −∞=

    ⎟⎠

    ⎞⎜⎝

    ⎛≤

    n nnxnx 2

    an absolutely summable sequence has always a finite energy

    • However, a finite-energy sequence is not necessarily

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-19

    , gy q yabsolutely summable

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform• Example – the sequence

    h fi it l thas a finite energy equal to

    • But, x[n] is not absolutely summableT t fi it [ ] th t i t• To represent a finite energy sequence x[n] that is not absolutely summable by a DTFT X(ejω), it is necessary to consider mean square convergence of X(ejω)consider mean square convergence of X(e )

    ( ) ( ) 0lim 2 =−∫−∞→ ωπ

    π

    ωω deXeX jKj

    K

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-20

    where

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform• Here the total energy of the error• Here, the total energy of the error

    must approach zero at each value of ω as K goes to ∞must approach zero at each value of ω as K goes to ∞• In such a case, the absolute value of the error |X(ejω) −

    XK(ejω)| may not go to zero as K goes to ∞ and the DTFTXK(e )| may not go to zero as K goes to and the DTFT is no longer bounded

    • Example – Consider the following DTFT:p g

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-21

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform• The inverse DTFT of HLP(ejω) is given bye e se o LP(e ) s g e by

    Th f h [ ] i i b /• The energy of hLP[n] is given by ωc / π• hLP[n] is a finite-energy sequence, but it is not

    absolutely summableabsolutely summable• As a result

    does not uniformly converge to HLP(ejω) for all values of ω but converges to H (ejω) in the mean square sense

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-22

    ω, but converges to HLP(ejω) in the mean-square sense

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform• The mean-square convergence property of the

    sequence hLP[n] can be further illustrated by examining the plot of the function

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-23

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform• As can be seen from these plots, independent of the value s ca be see o t ese p ots, depe de t o t e a ue

    of K there are ripples in the plot of HLP,K(ejω) around both sides of the point ω = ωc

    • The number of ripples increases as K increases with the height of the largest ripple remaining the same for all

    l f Kvalues of K • As K goes to infinity, the condition

    holds indicating the convergence of HLP K(ejω) to HLP(ejω)holds indicating the convergence of HLP,K(e ) to HLP(e )• The oscillatory behavior of HLP,K(ejω) approximating

    HLP(ejω) in the mean-square sense at a point of

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-24

    LP( ) q pdiscontinuity is known as the Gibbs phenomenon

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform• The DTFT can also be defined for a certain class of e ca a so be de ed o a ce ta c ass o

    sequences which are neither absolutely summable nor square summable– e.g., the unit step sequence μ[n], the sinusoidal sequence

    cos(ωon + φ), and the exponential sequence Aαn

    • For this type of sequences a DTFT representation is• For this type of sequences, a DTFT representation is possible using the Dirac delta function δ(ω), a function of ω with infinite height, zero width, and unit areao ω t te e g t, e o dt , a d u t a ea

    • It is the limiting form of a unit area pulse function p∆(ω)as ∆ goes to zero satisfyingg y g

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-25

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform• Example – Consider the following exponential sequence

    • Its DTFT is given by• Its DTFT is given by

    where δ(ω) is an impulse function of ω and − π ≤ ωo ≤ π• The functionThe function

    is a periodic function of ω with a period 2π and is calledis a periodic function of ω with a period 2π and is called a periodic impulse train

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-26

  • Discrete Time Fourier TransformDiscrete-Time Fourier Transform

    j• To verify that X(ejω) given above is indeed the DTFT of x[n] = we compute the inverse DTFT of X(ejω)Th

    0j ne ω• Thus

    where we have used the sampling property of the impulse p g p p y pfunction δ(ω)

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-27

  • Commonly Used DTFT PairsCommonly Used DTFT Pairs

    Sequence DTFT

    ][nu

    αn.

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-28

  • DTFT Properties: Symmetry Relations (Complex Sequences)

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-29

  • DTFT Properties: Symmetry Relations (Real Sequences)

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-30

  • General Properties of DTFTGeneral Properties of DTFT

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-1-31

  • DTFT PropertiesDTFT Properties• Example – Determine the DTFT Y(ejω) of y[n] Example Determine the DTFT Y(e ) of y[n]

    Let x[n] = αnμ[n] | | < 1• Let x[n] = αnμ[n], |α| < 1• We can therefore write

    [ ] [ ] + [ ]y[n] = nx[n] + x[n]• From Table 3.3, the DTFT of x[n] is given by

    U i th diff ti ti t f DTFT (T bl 3 2)• Using the differentiation property of DTFT (Table 3.2), we observe that the DTFT of nx[n] is given by

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-32

  • DTFT PropertiesDTFT Properties• Next using the linearity property DTFT (Table 3.4) we e t us g t e ea ty p ope ty ( ab e 3 ) e

    arrive at

    • Example – Determine the DTFT V(ejω) of v[n]p ( ) [ ]d0v[n] + d1v[n −1] = p0δ[n] + p1δ[n −1]

    • Using the time-shifting property of DTFT (Table 3.4) we g g p p y ( )observe that the DTFT of δ[n −1] is e−jω and the DTFT of v[n −1] is e−jωV(ejω)

    • Using the linearity property we then obtain the frequency-domain representation of

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-33

  • Energy Density SpectrumEnergy Density Spectrum• The total energy of a finite-energy sequence g[n] is given by• The total energy of a finite-energy sequence g[n] is given by

    • From Parseval’s relation we observe that

    • The following quantity is called the energy density spectrum

    • The area under this curve in the range − π ≤ ω ≤ π divided by 2π is the energy of the sequence

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-34

  • Energy Density SpectrumEnergy Density Spectrum• Example – Compute the energy of the sequence• Example – Compute the energy of the sequence

    H• Here

    where

    • Therefore

    • Hence hLP[n] is a finite-energy lowpass sequence

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-35

    LP[ ] gy p q

  • DTFT Computation Using MATLAB (1/2)DTFT Computation Using MATLAB (1/2)

    The function freqz can be used to compute the values of• The function freqz can be used to compute the values of the DTFT of a sequence, described as a rational function in the form ofin the form of

    Usage: H = freqz(num,den,w)• The function returns the frequency response values as a

    vector H of a DTFT defined in terms of the vectors numand den containing the coefficients {p } and {d }and den containing the coefficients {pi} and {di}, respectively at a prescribed set of frequencies between 0 and 2π given by the vector w

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-36

    g y

  • DTFT Computation Using MATLAB (2/2)DTFT Computation Using MATLAB (2/2)2 3 4

    2 3 4

    0.008 0.033 0.05 0.033 0.008( )1 2 37 2 7 1 6 0 41

    j j j jj

    j j j j

    e e e eX ee e e e

    ω ω ω ωω

    ω ω ω ω

    − − − −

    − − − −

    − + − +=

    + + + +1 2.37 2.7 1.6 0.41e e e e+ + + +

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-37

  • Linear Convolution Using DTFTLinear Convolution Using DTFT• The convolution theorem states that if y[n] = x[n] h[n],

    then the DTFT Y(ejω) of y[n] is given byY(ejω) = X(ejω)H(ejω)

    • An implication of this result is that the linear convolution y[n] of x[n] and h[n] can be performed as follows:

    1) Compute the DTFTs X(ejω) and H(ejω) of the sequences x[n] and h[n], respectively

    2) C t Y( j ) X( j )H( j )2) Compute Y(ejω) = X(ejω)H(ejω)。3) Compute the IDFT y[n] of Y(ejω)

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-38

  • Unwrapping the Phase (1/2)Unwrapping the Phase (1/2)• In numerical computation when the computed phase• In numerical computation, when the computed phase

    function is outside the range [−π,π], the phase is computed modulo 2π, to bring the computed value to [−π,π]g p [ ]

    • Thus, the phase functions of some sequences exhibit discontinuities of radians in the plot

    2 3 4

    2 3 4

    0.008 0.033 0.05 0.033 0.008( )1 2.37 2.7 1.6 0.41

    j j j jj

    j j j j

    e e e eX ee e e e

    ω ω ω ωω

    ω ω ω ω

    − − − −

    − − − −

    − + − +=

    + + + +

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-39

  • Unwrapping the Phase (2/2)Unwrapping the Phase (2/2)• In such cases, often an alternate type of phase function

    that is continuous function of ω is derived from the original function by removing the discontinuities of 2π

    • Process of discontinuity removal is called unwrapping the phaseTh d h f ti ill b d t d θ ( )• The unwrapped phase function will be denoted θc(ω)

    • In MATLAB, the unwrapping can be implemented using unwrapunwrap

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-40

  • The Frequency Response (1/6)The Frequency Response (1/6)• Most discrete-time signals encountered in practice can• Most discrete-time signals encountered in practice can

    be represented as a linear combination of a very large, maybe infinite, number of sinusoidal discrete-time ysignals of different angular frequencies

    • Thus, knowing the response of the LTI system to a single sinusoidal signal, we can determine its response to more complicated signals by making use of the superposition propertysuperposition property

    • An important property of an LTI system is that for certain types of input signals called eigen functions the outputtypes of input signals, called eigen functions, the output signal is the input signal multiplied by a complex constant

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-41

  • The Frequency Response (2/6)The Frequency Response (2/6)• Consider the LTI discrete-time system with an impulse Co s de t e d sc ete t e syste t a pu se

    response {h[n]} shown below

    • Its input-output relationship in the time-domain is given by th l tithe convolution sum

    • If the input is of the formx[n] = ejωn, − ∞ < n < ∞x[n] e , n

    then it follows that the output is given by

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-42

  • The Frequency Response (3/6)The Frequency Response (3/6)• Let

    • Then we can writej jy[n] = H(e jω)ejωn

    • Thus for a complex exponential input signal ejωn, the t t f LTI di t ti t i l loutput of an LTI discrete-time system is also a complex

    exponential signal of the same frequency multiplied by a complex constant H(ejω)complex constant H(ej )

    • Thus ejωn is an eigen function of the system• The quantity H(ejω) is called the frequency response of• The quantity H(ej ) is called the frequency response of

    the LTI discrete-time system• H(ejω) provides a frequency-domain description of the

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-43

    H(e ) provides a frequency domain description of the system

  • The Frequency Response (4/6)The Frequency Response (4/6)• H(ejω), in general, is a complex function of ω with a period

    2 ith it l d i i t f ll2π, with its real and imaginary parts as follows:

    or, in terms of its magnitude and phase,

    wherewhereθ(ω) = arg H(ejω)

    • The function |H(ejω)| is called the magnitude response• The function |H(ejω)| is called the magnitude responseand the function θ(ω) is called the phase response of the LTI discrete-time systemLTI discrete time system

    • Design specifications for the LTI discrete-time system, in many applications, are given in terms of the magnitude

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-44

    y pp g gresponse or the phase response or both

  • The Frequency Response (5/6)The Frequency Response (5/6)• In some cases, the magnitude function is specified in so e cases, t e ag tude u ct o s spec ed

    decibels asdBeHG j )(log20)( 10

    ωω =

    where G(ω) is called the gain function• The negative of the gain function

    A(ω) = −G(ω)is called the attenuation or loss function

    • If the impulse response h[n] is real then the magnitude function is an even function of ω

    |H(ejω)| = |H(e−jω)|and the phase function is an odd function of ω:

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-45

    θ(ω) = −θ(−ω)

  • The Frequency Response (6/6)The Frequency Response (6/6)• Likewise, for a real impulse response h[n], Hre(ejω) is e se, o a ea pu se espo se [ ], re(e ) s

    even and Him(ejω ) is odd• Example - M-point moving average filter with an impulse p p g g p

    response given by

    • Its frequency response is then given by

    • Or,( ) ( )1 1 1j j n j n j n jMH e e e e eω ω ω ω ω

    ∞ ∞ ∞− − − −⎛ ⎞ ⎛ ⎞= − = −⎜ ⎟ ⎜ ⎟∑ ∑ ∑( ) ( )

    ( )( )

    ( )

    0 0

    1 / 2

    1

    sin / 21 1 1n n M n

    jMj M

    j

    H e e e e eM M

    Me eω

    ωω= = =

    −− −

    = =⎜ ⎟ ⎜ ⎟⎝ ⎠ ⎝ ⎠−

    = ⋅ = ⋅

    ∑ ∑ ∑

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-46

    ( )1 sin / 2je

    M e Mω ω−−

  • Computing Frequency Response Using MATLAB

    The function freqz(h 1 w) can be used to determine the• The function freqz(h,1,w) can be used to determine the values of the frequency response vector h at a set of given frequency points wgiven frequency points w

    • From h, the real and imaginary parts can be computed using the functions real and imag, and the magnitude g g, gand phase functions using the functions abs and angle

    M-point moving average filter

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-47

  • Steady State Response (1/3)Steady State Response (1/3)• Note that the frequency response also determines the

    t d t t f LTI di t ti t tsteady-state response of an LTI discrete-time system to a sinusoidal inputE ample Determine the stead state o tp t [n] of a• Example – Determine the steady-state output y[n] of a real coefficient LTI discrete-time system with a frequency response H(ejω) for an inputresponse H(e ) for an input

    x[n] = Acos(ωon + ϕ), −∞ < n < ∞• We can express the input x[n] asWe can express the input x[n] as

    x[n] = g[n] + g*[n]

    where• Now the output of the system for an input is simply

    nj oe ω

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-48

  • Steady State Response (2/3)Steady State Response (2/3)• Because of linearity, the response v[n] to an input g[n] is ecause o ea ty, t e espo se [ ] to a put g[ ] s

    given by

    • Because of linearity, the response v*[n] to an input g*[n] is given by

    • Combining the last two equations we get

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-49

  • Steady State Response (2/3)Steady State Response (2/3)

    • Thus, the output y[n] has the same sinusoidal waveform as the input with two differences:

    ( )1) the amplitude is multiplied by the value of the magnitude function at ω = ωo

    ( )0ωjeH

    2) the output has a phase lag relative to the input by an amount θ(ωo), the value the value of the phase function at ω ωat ω = ωo

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-50

  • Response to a Causal Exponential Sequence

    • The expression for the steady-state response developed• The expression for the steady-state response developed earlier assumes that the system is initially relaxed before the application of the input x[n]pp p [ ]

    • In practice, excitation x[n] to a system is usually a right-sided sequence applied at some sample index n = no

    • Without any loss of generality, assume x[n] = 0 for n < 0• From the input-output relation

    • we observe that for an input∑∞

    −∞=

    −=k

    knxkhny ][][][

    x[n] = ejωnμ[n] • the output is given by ( ) ][][][ kh knj

    nω ⎟

    ⎞⎜⎛ −∑

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-51

    p g y ( ) ][][][0

    nekhny knjk

    μω ⎟⎠

    ⎜⎝

    ==∑

  • Response to a Causal Exponential Sequence

    ][][][ kh njkjn

    ωω ⎟⎞

    ⎜⎛ −∑• Or,

    • The output for n < 0 is y[n] = 0

    ][][][0

    neekhny njkjk

    μωω ⎟⎟⎠

    ⎜⎜⎝

    ==∑

    • The output for n < 0 is y[n] = 0• The output for n≧0 is given by

    n ∞ ∞⎛ ⎞ ⎛ ⎞ ⎛ ⎞∑ ∑ ∑

    • Or,0 0 1

    [ ] [ ] [ ] [ ]j k j n j k j n j k j nk k k n

    y n h k e e h k e e h k e eω ω ω ω ω ω− − −= = = +

    ⎛ ⎞ ⎛ ⎞ ⎛ ⎞= = −⎜ ⎟ ⎜ ⎟ ⎜ ⎟⎝ ⎠ ⎝ ⎠ ⎝ ⎠∑ ∑ ∑

    ( ) ⎟⎞⎜⎛∞Or,

    • The first term on the RHS is the same as that obtained

    ( ) njkjnk

    njj eekheeHny ωωωω ⎟⎠

    ⎞⎜⎝

    ⎛−= −

    +=∑

    1][][

    The first term on the RHS is the same as that obtained when the input is applied at n = 0 to an initially relaxed system and is the steady-state response:

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-52

  • Response to a Causal Exponential Sequence

    • The second term on the RHS is called the transient• The second term on the RHS is called the transient response:

    • To determine the effect of the above term on the total output response we observeoutput response, we observe

    • For a causal, stable LTI IIR discrete-time system, h[n] is absolutely summabley

    • As a result, the transient response ytr[n] is a bounded sequence

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-53

    • Moreover, as n → ∞

  • Response to a Causal Exponential Sequence

    • For a causal FIR LTI discrete-time system with an impulse response h[n], of length N + 1, h[n] = 0 for n > N

    • Hence, ytr[n] = 0 n > N −1

    • Here the output reaches the steady-state value ysr[n] = H(ejω) ejω at n = N

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-54

  • The Concept of Filtering (1/8)The Concept of Filtering (1/8)• Filtering is to pass certain frequency components in an te g s to pass ce ta eque cy co po e ts a

    input sequence without any distortion (if possible) while blocking other frequency components

    • The key to the filtering process is

    • It expresses an arbitrary input as a linear weighted sum of an infinite number of exponential/sinusoidal sequences

    • Thus, by appropriately choosing the values of |H(ejω)| of the filter at concerned frequencies, some of these components can be selectively heavily attenuated or filtered with respect to the others

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-55

    filtered with respect to the others

  • The Concept of Filtering (2/8)The Concept of Filtering (2/8)• Consider a real-coefficient LTI discrete-time system

    characterized by a magnitude function

    • We apply the following input to the systemx[n] = Acosω n + Bcosω n 0 < ω < ω < ω < πx[n] = Acosω1n + Bcosω2n, 0 < ω1 < ωc < ω2 < π

    • Because of linearity, the output of this system is of the form

    • As( ) ( )1 21 0j jH e H eω ω≅ ≅

    the output reduces to

    ( ) ( )

    (l filt )

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-56

    (lowpass filter)

  • The Concept of Filtering (3/8)The Concept of Filtering (3/8)• Example - The input consists of two sinusoidal sequences

    f f i 0 1 d/ l d 0 4 d/ lof frequencies 0.1 rad/sample and 0.4 rad/sample• We need to design a highpass filter that will only pass the

    high freq enc component of the inp thigh-frequency component of the input• Assume the filter to be an FIR filter of length 3 with an

    impulse response:impulse response:h[0] = h[2] = α, h[1] = β

    • The convolution sum description of this filter is given by• The convolution sum description of this filter is given byy[n] = h[0]x[n] + h[1]x[n − 1] + h[2]x[n − 2]

    = αx[n] + βx[n 1] + αx[n 2]= αx[n] + βx[n −1] + αx[n − 2]• Design Objective: Choose suitable values of α and β so

    that the output is a sinusoidal sequence with a frequency

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-57

    that the output is a sinusoidal sequence with a frequency 0.4 rad/sample

  • The Concept of Filtering (4/8)The Concept of Filtering (4/8)• The frequency response of the FIR filter is given by

    • The magnitude and phase functions are|H(ejω)| = 2α cosω + β

    θ(ω) = −ωf• To block the low-frequency component and pass the

    high-frequency one, the magnitude function at ω = 0.1 should be equal to zero while that at ω = 0 4 should be

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-58

    should be equal to zero, while that at ω = 0.4 should be equal to one

  • The Concept of Filtering (5/8)The Concept of Filtering (5/8)• Thus, the two conditions that must be satisfied areus, e o co d o s a us be sa s ed a e

    |H(ej0.1)| = 2αcos(0.1) + β = 0

    ( j0 4) ( ) β|H(ej0.4)| = 2αcos(0.4) + β = 0• Solving the above two equations we get

    α = −6.76195β =13 456335β 13.456335

    • Thus the output-input relation of the FIR filter is given byy[n] = 6 76195(x[n] + x[n 2]) + 13 456335x[n 1]y[n] = −6.76195(x[n] + x[n − 2]) + 13.456335x[n −1]

    where the input isx[n] {cos(0 1n) + cos(0 4n)}μ[n]

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-59

    x[n] = {cos(0.1n) + cos(0.4n)}μ[n]

  • The Concept of Filtering (6/8)The Concept of Filtering (6/8)• The waveforms of input and output signals are shown

    below

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-60

  • The Concept of Filtering (7/8)The Concept of Filtering (7/8)• The first seven samples of the output are shown below

    • It can be seen that, neglecting the least significant digity[n] = cos(0.4(n −1)) for n ≥ 2y[n] cos(0.4(n 1)) for n 2

    • Computation of the present output value requires the knowledge of the present and two previous input samples

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-61

    g p p p p

  • The Concept of Filtering (8/8)The Concept of Filtering (8/8)

    • Hence, the first two output samples, y[0] and y[1], are the result of assumed zero input sample values at n = −1 and n = −2n = −2

    • Therefore, first two output samples constitute the transient part of the outputpart of the output

    • Since the impulse response is of length 3, the steady-state is reached at n = N = 2

    • Note also that the output is delayed version of the high-frequency component cos(0.4n) of the input, and the q y p ( ) pdelay is one sample period

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-62

  • Phase DelayPhase Delay• If the input x[n] to an LTI system H(ejω) is a sinusoidal e pu [ ] o a sys e (e ) s a s uso da

    signal of frequency ωox[n] = Acos(ωon + ϕ), −∞ < n < ∞[ ] ( o ϕ)

    • Then, the output y[n] is also a sinusoidal signal of the same frequency ωo but lagging in phase by θ(ωo) radians:

    x[n] = A|H(ejω)| cos(ωon + θ(ωo) + ϕ), −∞ < n < ∞• We can rewrite the output expression as

    x[n] = A|H(ejω)| cos(ωo( n − τp(ωo) + ϕ)), −∞ < n < ∞where τp(ωo) = θ(ωo) / ωo is called the phase delay

    • The minus sign in front indicates phase lag• In general, y[n] will not be a delayed replica of x[n] unless

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-63

    the phase delay is an integer

  • Group DelayGroup Delay• When the input is composed of several sinusoidal e t e put s co posed o se e a s uso da

    components with different frequencies that are not harmonically related, each component will go through different phase delays

    • In this case, the signal delay is determined using the group d l d fi d bdelay defined by

    • In defining the group delay, it is assumed that the phase function is unwrapped so that its derivatives exist

    • Group delay has a physical meaning only with respect to the underlying continuous-time functions associated with

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-64

    y[n] and x[n]

  • Phase and Group DelayPhase and Group Delay• A graphical comparison of the two types of delays:

    • Example - The phase function of the FIR filter y[n] = αx[n]Example The phase function of the FIR filter y[n] αx[n] + βx[n −1] + αx[n − 2] is θ(ω) = −ω

    • Hence its group delay τg(ω) is given by verifying the result

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-65

    g p y g( ) g y y gobtained earlier by simulation

  • Phase and Group DelayPhase and Group Delay• Example - For the M-point moving-average filtera p e o e po o g a e age e

    the phase function is

    ( ) ⎣ ⎦ ⎞⎛2/ 21 M kM( ) ( )⎣ ⎦

    ∑=

    ⎟⎠

    ⎞⎜⎝

    ⎛ −+−

    −=2/

    1

    22

    1 M

    k MkM πωμπωωθ

    • Hence its group delay is

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-66

  • Computing Phase and Group Delay Using MTALAB

    • Phase delay can be computed using the function ase de ay ca be co puted us g t e u ct ophasedelay

    • Group delay can be computed using the function p y p ggrpdelay

    © The McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-67