EELE 4310: Digital Signal Processing...

13
EELE 4310: Digital Signal Processing (DSP) Chapter # 10 : Digital Filter Design (Part Two) Spring, 2012/2013 EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 1 / 13

Transcript of EELE 4310: Digital Signal Processing...

  • EELE 4310: Digital Signal Processing (DSP)

    Chapter # 10 : Digital Filter Design

    (Part Two)

    Spring, 2012/2013

    EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 1 / 13

  • Outline

    1 Impulse Invariant Design

    2 Minimization of Mean Squared Error IIR Filter Design

    3 FIR Filter Design

    EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 2 / 13

  • Impulse Invariant Design ... 1

    This method was developed in the early time of the design of thedigital filter.

    The method is based on preserving the response to an impulse.

    If ha(t) represents the response of an analog filter to a unit impulseδ(t), then the unit sample response of a discrete-time filter used inan A/D − H(z)− D/A structure is selected to be the sampledversion of h(t).

    The discrete-time filter is characterized by the system function H(z)given by

    H(z) = Z{h(n)} = Z{ha(t)|t=nT}If we are given an analog filter with system function Ha(s), thecorresponding impulse invariant design filter has an H(z) as

    H(z) = Z({L−1 [Ha(s)]}|t=nT

    )EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 3 / 13

  • Impulse Invariant Design ... 2

    EX. Find the corresponding to the impulse invariant design using asample rate 1/T samples/sec for ana analog filter Ha(s) specified asfollows: Ha(s) = A/(s + α)

    The analog system is obtained by taking the inverse Laplace transform ofHa(s) to give ha(t) as

    ha(t) = Ae−αtu(t)

    The corresponding h(n) is then given by

    h(n) = Ae−αnTu(nT ) = A(e−αT )nu(n)

    and therefore the discrete-time filter has the following z-transform:

    H(z) = Z[h(n)] = Z[A(e−αT )nu(n)] = Azz−e−αT

    EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 4 / 13

  • Impulse Invariant Design ... 3

    In many cases the transfer function Ha(s) is given by a sum of Nterms with unique αk as follows:

    Ha(s) =∑N

    k=1Ak

    s+αk

    For this case the impulse inpatient design H(z) is given by

    H(z) =∑N

    k=1Akz

    z−e−αkT

    How does the equivalent frequency response of the A/D − H(z)− D/Astructure using this H(z) compare to the frequency response of theoriginal system specified by Ha(s)?.

    Good results using the impulse invariant designs are obtained providedthe time between samples is selected small enough which it could bedifficult to assess.

    EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 5 / 13

  • Minimization of Mean Squared Error IIR FilterDesign

    There are many digital filter design procedures that do not rely onanalog methods or transformations.

    Its possible to adjust the filter parameters in some methodicalfashion to satisfy the desired properties.

    One possible way is the minimization of the mean square error.

    Suppose we specify a set of digital frequencies{ωi : i = 1, 2, · · · ,M} and a desired frequency response magnitudeat those frequencies of |Hd(e jω)|.Assume we want to get as close as possible to match this magnitudewith a filter with the following form :

    H(z) = A.∏K

    k=11+akz

    −1+bkz−2

    1+ckz−1+dkz−2= AG (z)

    Closeness is measured by the mean squared error E defined by

    E =∑M

    i=1[|H(e jωi )| − |Hd(e jωi )|]2

    The problem can be solved by finding the different parameters thatwill give the minimum error and inside the unit circle poles.

    EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 6 / 13

  • FIR Filter Design ... 1

    Previously, digital filters were designed to give a desired frequencyresponse magnitude without regard to the phase response.

    In many cases, a linear phase is required to preserve the the shape ofthe signal within the passband.

    Example, assume a low-pass filter with frequency response H(e jω)given by

    H(e jω) =

    e−jωα |ω| < ω0

    0 ω0 < |ω| < πperiodic for all other ω

    If X (e jω) represents the Fourier transform of the input sequencex(n) and is entirely within the bandpass of H(e jω), then the outputsequence is

    Y (e jω) = X (e jω) · e jω ⇒ y(n) = x(n − α)

    EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 7 / 13

  • FIR Filter Design ... 2

    The linear phase does not alter the shape of the original signal,simply it translates it by amount of α.

    If the phase response is not linear, the output signal can be adistorted version of the input signal.

    Generally, the causal IIR filter cannot produce a linear phasecharacteristics, and only special forms of causal FIR filters can givelinear phase.

    Theorem

    If h(n) represents the impulse response of a discrete-time system, anecessary and sufficient condition for linear phase is that h(n) have finiteduration N, and that it be symmetric about its midpoint.

    EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 8 / 13

  • FIR Filter Design ... 3

    EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 9 / 13

  • FIR Filter Design ... 4

    EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 10 / 13

  • FIR Filter Design ... 5

    For a causal FIR filter whose impulse response begins at zero andends at N − 1, h(n) must satisfy the following:

    h(n) = h(N − 1− n) for n = 0, 1, · · · ,N − 1

    For N odd, the slope causes a delay in the output of (N − 1)/2,which is an integer number of samples.

    When N is even, the caused delay is noninteger, which is in somecases may be undesirable.

    EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 11 / 13

  • FIR Filter DesignDesign of FIR filters using Windows ... 1

    The easiest way to obtain an FIR filter is to simply truncate theimpulse response of an IIR filter.

    If hd(n) represents the impulse response of a desired IIR filter, thenan FIR filter with impulse response h(n) can be obtained as follows:

    h(n) =

    {hd(n) N1 ≤ n ≤ N2

    0 Otherwise

    Generally, h(n) can be thought of as being formed by the product ofhd(n) and a ”window function”, w(n), as follows:

    h(n) = hd(n) · w(n)When w(n) is said to be rectangular window, its given as

    h(n) =

    {1 N1 ≤ n ≤ N20 Otherwise

    From the Fourier transform properties, H(ω) is given as

    H(ω) = Hd(ω) ∗W (ω)

    EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 12 / 13

  • FIR Filter DesignDesign of FIR filters using Windows ... 2

    The convolution produces a smeared version of the ideal low-passfrequency response Hd(ω).

    The wider the main lobe of W (ω), the more spreading.

    The narrower the main lobe (larger N), the closer |H(ω)| comes to|Hd(ω)|.We are left with a trade-off of making N large enough so thatsmearing is minimized, and small enough to allow reasonableimplementation.

    EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 13 / 13

    Impulse Invariant DesignMinimization of Mean Squared Error IIR Filter DesignFIR Filter Design