Chapter 3 The Discrete-Time Fourier Transformcwlin/courses/dsp/notes/ch3_Mitra_dsp_2p.pdf ·...

34
2008/3/17 1 The Discrete-Time Fourier Transform Chapter 3 © The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides prepared by S. K. Mitra 3-1-1 清大電機系林嘉文 [email protected] 03-5731152 Continuous-Time Fourier Transform Definition – The CTFT of a continuous-time signal x a (t) is given by Often referred to as the Fourier spectrum or simply the spectrum of the continuous-time signal Definition – The inverse CTFT of a Fourier transform X a ( j) is given by © The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides prepared by S. K. Mitra 3-1-2 Often referred to as the Fourier integral A CTFT pair will be denoted as

Transcript of Chapter 3 The Discrete-Time Fourier Transformcwlin/courses/dsp/notes/ch3_Mitra_dsp_2p.pdf ·...

  • 2008/3/17

    1

    The Discrete-Time Fourier Transform

    Chapter 3

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

    清大電機系林嘉文

    [email protected]

    Continuous-Time Fourier Transform• Definition – The CTFT of a continuous-time signal xa(t)

    is given by

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

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

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

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

  • 2008/3/17

    2

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

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

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

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

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

    and the quantity θa(Ω) is called the phase spectrum• Both spectrums are real functions of Ω• In general, the CTFT Xa( jΩ) exists if xa(t) satisfies the

    Dirichlet conditions

    Dirichlet Conditions(a) The signal xa(t) has a finite number of discontinuities and a

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

    • If the Dirichlet conditions are satisfied, then

    ( ) ∞

  • 2008/3/17

    3

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

    complex signal xa(t) is given by

    which can also be rewritten as

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

    • Interchanging the order of the integration we get

    Energy Density Spectrum• Hence

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

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

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

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

  • 2008/3/17

    4

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

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

  • 2008/3/17

    5

    Discrete-Time Fourier Transform

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

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

    • Xre(ejω) and Xim(ejω ) are, respectively, the real and f ( j ) f f

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

    imaginary parts of X(ejω), and are real functions of ω• X(ejω) can alternately be expressed as

    where

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

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

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

    functions of ω whereas θ(ω) and X (ejω) are odd

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

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

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

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

  • 2008/3/17

    6

    Discrete-Time Fourier Transform• If not specified, we shall assume that the phase function θ(ω) is restricted to the following range of values:

    −π ≤ θ(ω)

  • 2008/3/17

    7

    Discrete-Time Fourier Transform

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

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

    Discrete-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

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

    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

  • 2008/3/17

    8

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

    Proof:

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

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

    converges uniformly, i.e. X(ejω) existsThen

    Discrete-Time Fourier Transform• Now

    Hence

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

  • 2008/3/17

    9

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

    may or may not converge• Let

    • Then for uniform convergence of X(ejω)

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

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

    Discrete-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

  • 2008/3/17

    10

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

    absolutely summable as

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

    • Since

    [ ] ∞<−

    == ∑∑∞

    =

    −∞= 0 11

    n

    n

    n

    n nα

    αμα

    [ ] [ ]∑ ∑∞ ∞

    ⎟⎠

    ⎞⎜⎝

    ⎛≤ nxnx

    22

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

    an absolutely summable sequence has always a finite energy

    • However, a finite-energy sequence is not necessarily absolutely summable

    [ ] [ ]∑ ∑−∞= −∞= ⎠⎝n n

    Discrete-Time Fourier Transform• Example – the sequence

    has a finite energy equal to

    • But, x[n] is not absolutely summable• To represent a finite energy sequence x[n] that is not

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

    absolutely summable by a DTFT X(ejω), it is necessary to consider mean square convergence of X(ejω)

    where

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

    π

    ωω deXeX jKj

    K

  • 2008/3/17

    11

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

    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 DTFT is no longer bounded

    • Example – Consider the following DTFT:

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

    Discrete-Time Fourier Transform• The inverse DTFT of HLP(ejω) is given by

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

    absolutely summable

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

    • As a result

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

  • 2008/3/17

    12

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

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

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

    Discrete-Time Fourier Transform• As can be seen from these plots, independent of the value

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

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

    • As K goes to infinity, the condition

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

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

    HLP(ejω) in the mean-square sense at a point of discontinuity is known as the Gibbs phenomenon

  • 2008/3/17

    13

    Discrete-Time Fourier Transform• The DTFT can also be defined for a certain class of

    sequences which are neither absolutely summable nor sq are s mmablesquare 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 possible using the Dirac delta function δ(ω), a function of ω with infinite height, zero width, and unit areaIt is the limiting form of a unit area pulse function p (ω)

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

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

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

    • Its DTFT is given by

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

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

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

  • 2008/3/17

    14

    Discrete-Time Fourier Transform

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

    • Thuse

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

    where we have used the sampling property of the impulse function δ(ω)

    Commonly Used DTFT Pairs

    Sequence DTFT

    ][nu

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

    αn.

  • 2008/3/17

    15

    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

  • 2008/3/17

    16

    General Properties of DTFT

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

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

    • 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

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

    • Using the differentiation property of DTFT (Table 3.2), we observe that the DTFT of nx[n] is given by

  • 2008/3/17

    17

    DTFT Properties• Next using the linearity property DTFT (Table 3.4) we

    arrive at

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

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

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

    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

    Energy Density Spectrum• 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 McGraw-Hill Companies, Inc., 2007Original PowerPoint slides prepared by S. K. Mitra 3-2-34

    spect u

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

  • 2008/3/17

    18

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

    • Here

    where

    • Therefore

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

    • Therefore

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

    DTFT Computation Using MATLAB (1/2)

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

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

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

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

  • 2008/3/17

    19

    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

    ω ω ω ωω

    ω ω ω ω

    − − − −

    − − − −

    − + − +=

    + + + +

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

    Linear 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ω)Y(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) Compute Y(ejω) = X(ejω)H(ejω)。

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

    3) Compute the IDFT y[n] of Y(ejω)

  • 2008/3/17

    20

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

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

    • 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)• 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πoriginal function by removing the discontinuities of 2π

    • Process of discontinuity removal is called unwrapping the phase

    • The unwrapped phase function will be denoted θc(ω)• In MATLAB, the unwrapping can be implemented using

    unwrap

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

  • 2008/3/17

    21

    The Frequency Response (1/6)• 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 signals 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 property

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

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

    The Frequency Response (2/6)• Consider the LTI discrete-time system with an impulse

    response {h[n]} shown below

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

    • If the input is of the form

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

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

    then it follows that the output is given by

  • 2008/3/17

    22

    The Frequency Response (3/6)• Let

    • Then we can write• Then we can writey[n] = H(e jω)ejωn

    • Thus for a complex exponential input signal ejωn, the output of an LTI discrete-time system is also a complex exponential signal of the same frequency multiplied by a complex constant H(ejω)Th j i i f ti f th t

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

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

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

    system

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

    2π, with its real and imaginary parts as follows:

    or, in terms of its magnitude and phase,

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

    • The function |H(ejω)| is called the magnitude responsed th f ti θ( ) i ll d th h f th

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

    and the function θ(ω) is called the phase response of the LTI discrete-time system

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

  • 2008/3/17

    23

    The Frequency Response (5/6)• In some cases, the magnitude function is specified in

    decibels asdBeHG j )(log20)( ωω

    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

    dBeHG j )(log20)( 10ω =

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

    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 Frequency Response (6/6)• Likewise, for a real impulse response h[n], Hre(ejω) is

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

    response given by

    • Its frequency response is then given by

    O

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

    • Or,( ) ( )

    ( )( )

    ( )

    0 0

    1 / 2

    1 1 1

    sin / 21 1 11 sin / 2

    j j n j n j n jM

    n n M n

    jMj M

    j

    H e e e e eM M

    Me eM e M

    ω ω ω ω ω

    ωω

    ω

    ωω

    ∞ ∞ ∞− − − −

    = = =

    −− −

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

    = ⋅ = ⋅−

    ∑ ∑ ∑

  • 2008/3/17

    24

    Computing Frequency Response Using MATLAB

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

    • From h, the real and imaginary parts can be computed using the functions real and imag, and the magnitude and 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)• Note that the frequency response also determines the

    steady-state response of an LTI discrete-time system to a sinusoidal inputsinusoidal input

    • Example – Determine the steady-state output y[n] of a real coefficient LTI discrete-time system with a frequency response H(ejω) for an input

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

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

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

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

    nj oe ω

  • 2008/3/17

    25

    Steady State Response (2/3)• Because of linearity, the response v[n] to an input g[n] is

    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)

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

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

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

    ( )0ωjeH

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

  • 2008/3/17

    26

    Response to a Causal Exponential Sequence

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

    • 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

    ∑∞

    −= knxkhny ][][][

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

    • we observe that for an inputx[n] = ejωnμ[n]

    • the output is given by

    ∑−∞=k

    knxkhny ][][][

    ( ) ][][][0

    nekhny knjn

    kμω ⎟⎠

    ⎞⎜⎝

    ⎛= −

    =∑

    Response to a Causal Exponential Sequence

    • Or, ][][][0

    neekhny njkjn

    k

    μωω ⎟⎟⎠

    ⎞⎜⎜⎝

    ⎛= −

    =∑

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

    • Or,0 0 1

    [ ] [ ] [ ] [ ]n

    j k j n j k j n j k j n

    k k k ny n h k e e h k e e h k e eω ω ω ω ω ω

    ∞ ∞− − −

    = = = +

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

    ( ) njkjnjj eekheeHny ωωωω ⎟⎠

    ⎞⎜⎝

    ⎛−= −

    ∑ ][][

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

    • 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:

    ( )nk

    y⎠⎝ +=

    ∑1

    ][][

  • 2008/3/17

    27

    Response to a Causal Exponential Sequence

    • 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 observe

    For a causal stable LTI IIR discrete time system h[n] is

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

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

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

    • 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 > Nimpulse 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

  • 2008/3/17

    28

    The Concept of Filtering (1/8)• Filtering is to pass certain frequency components in an

    input sequence without any distortion (if possible) while blocking other frequency componentsblocking 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

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

    p q• 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 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ω1n + Bcosω2n, 0 < ω1 < ωc < ω2 < π

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

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

    • As

    the output reduces to

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

    (lowpass filter)

  • 2008/3/17

    29

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

    of frequencies 0.1 rad/sample and 0.4 rad/sample• We need to design a highpass filter that will only pass the• We need to design a highpass filter that will only pass the

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

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

    • The convolution sum description of this filter is given by

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

    y[n] = h[0]x[n] + h[1]x[n − 1] + h[2]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 0.4 rad/sample

    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ω + β

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

    | ( )| βθ(ω) = −ω

    • 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 equal to one

  • 2008/3/17

    30

    The Concept of Filtering (5/8)• Thus, the two conditions that must be satisfied are

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

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

    α = −6.76195β =13.456335

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

    • Thus the output-input relation of the FIR filter is given byy[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 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

  • 2008/3/17

    31

    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 digit

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

    • It can be seen that, neglecting the least significant digity[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 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 andresult of assumed zero input sample values at n 1 and n = −2

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

    • Since the impulse response is of length 3, the steady-state is reached at n = N = 2Note also that the output is delayed version of the high

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

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

  • 2008/3/17

    32

    Phase Delay• If the input x[n] to an LTI system H(ejω) is a sinusoidal

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

    • 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(ω ( n − τ (ω ) + ϕ)) −∞ < n < ∞

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

    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 phase delay is an integer

    Group Delay• When the input is composed of several sinusoidal

    components with different frequencies that are not harmonicall related each component ill go thro ghharmonically related, each component will go through different phase delays

    • In this case, the signal delay is determined using the group delay defined by

    • In defining the group delay it is assumed that the phase

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

    • 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 y[n] and x[n]

  • 2008/3/17

    33

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

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

    • 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 obtained earlier by simulation

    Phase and Group Delay• Example - For the M-point moving-average filter

    the phase function is

    • Hence its group delay is

    ( ) ( )⎣ ⎦

    ∑=

    ⎟⎠⎞

    ⎜⎝⎛ −+

    −−=

    2/

    1

    22

    1 M

    k MkM πωμπωωθ

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

    Hence its group delay is

  • 2008/3/17

    34

    Computing Phase and Group Delay Using MTALAB

    • Phase delay can be computed using the function phasedelay

    • Group delay can be computed using the function grpdelay

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