SlideShare a Scribd company logo
EC533: Digital Signal Processing
  5          l      l

          Lecture 8
      FIR Filter Design
8.1 – FIR Filter
    The basic FIR filter is characterized by the following:
                                  N −1
                       y (n) = ∑ h(k ) x(n − k )
                                  k =0
                                         N −1
                          H ( z) = ∑ h(k ) z −k
                                         k =0
where, h(k); k=0,1,…, N-1 are the impulse response coefficients of the filter.
• Filter order= N-1.
• Filter Length N
         Length=N


• FIR filters can have an exactly linear phase response.
8.2 – Linear Phase Response & Its Implications
• A filter is said to have linear phase response if its phase response satisfies one of
the following relationships;
                             θ (ω ) = −αω                 1

                             θ (ω) = β −αω                2
•where α, β are constants.
        ,

   If condition 1 is satisfied, the filter will have a constant group & constant
phase delay responses & the impulse response of the filter must have positive
(even) symmetry. i
(      )         i.e.,                     ⎧                 N −1                ⎫
                                           ⎪n = 0,1........        if N is odd ⎪
                                                              2
                                           ⎪                                     ⎪
                                           ⎪ ( i bl f all types of fil ) ⎪
                                              (suitable for ll        f filters)
         h(n) = h( N − n − 1);             ⎨                                     ⎬
                                           ⎪n = 0,1........ N - 1 if N is even⎪
                                           ⎪                2                    ⎪
                                           ⎪                                     ⎪
            α = ( N − 1) 2                 ⎩      (not suitable for HPF)         ⎭
8.2 – Linear Phase Response & Its Implications
                   – cont.

   When condition 2 is satisfied, the filter will have a constant group delay only
 & the impulse response of the filter will have a negative (odd) symmetry. i.e.,

                              ⎧                       N −1                            ⎫
                              ⎪       n = 0,1........         if N is odd             ⎪
                                                        2
                              ⎪                                                       ⎪
                              ⎪                       N                               ⎪
h(n) = −h( N − n − 1);        ⎨       n = 0,1........ - 1 if N is even                ⎬
                              ⎪                       2                               ⎪
                              ⎪(suitable for Hilbert Transformers and Diffrentiators) ⎪
                              ⎪                                                       ⎪
                              ⎩                                                       ⎭
                               α = ( N − 1) 2 ;
                              β =π /2
8.3 - Filter Types
• The desired (Ideal) frequency response of different filters:


  LPF                                       HPF


                                                                               ω (normalized)




   BPF                                       BSF


                 ω1         ω2                           ω1       ω2



The amplitude response is periodic in frequency with a period ωs & symmetric around the
Nyquist frequency ωN = ωs /2.
8.4 – Deriving Filter Impulse Response
  As HD(ω) is the desired amplitude response & it is periodic in frequency with
period ωs ,We can obtain the filter impulse response hD(n) – filter coefficients ak’s-
                                                                                    s
by evaluating the IDTFT of HD(ω) as follows;
                                       ∞
                                                      − jω n
                      H D (ω ) = ∑ h D ( n ).e                                DTFT
                                     m = −∞
             1 π                jω n                      1 ωc        jω n
hD ( n ) =
            2π  ∫− π H D (ω ).e d ω                   =
                                                         2π  ∫− ω c1.e d ω
                             ωc
              1 ⎡e    jω n
                           ⎤          fc               ⎡ 2 sin( n ω c ) ⎤
          =       ⎢        ⎥     =                     ⎢                   ⎥
             2 π ⎣ jn ⎦ − ω
                      j              2π                ⎣      nf c
                                                                f          ⎦
                                        c

              2 f c sin( n ω c )
            =
                     nω c
Where fc is the normalized cutoff frequency
8.5 – Ideal Impulse Response for Different Filter Types




where fc,f1 and f2 are the normalized passband or stopband edge frequencies.
8.6 - FIR Filter Specification
                                    jw
                              H(e        )




• ωp   ‐   passband edge frequency
• ωs   ‐   stopband edge frequency
• δp   ‐   peak ripple value in the passband
• δs   ‐   peak ripple value in the stopband
                         Ap = 20 log10 (1 + δp) dB      Peak passband ripple (dB)
                                                             p          pp ( )
                          As = -20 log10 (δs) dB        Stopband attenuation (dB)
                      ∆(ω)= ωs - ωp≡ Transition width   Transition Width
8.7 – FIR coefficient Calculation Methods


• The filter coefficients - h(n)- can be calculated by using
several methods as the window, optimal, & frequency
sampling methods.
     li      h d



• All of these methods can lead to linear phase FIR filter.
8.8 – Window Method
               H(ejw )

                                          1

                                               -∞                                                         ∞
                                   ω
                 W(ejw )                                                    w(nT)                          2

                                                                                                   noncausal



                                    ω                                                                 ω
                                                             − (N - 1 ) 2           (N - 1 )   2

  Gibb’s                          jωT              jωT                      h w (n) = h(nT).w(nT)
Oscillations               H (e         ) ⊗ W (e         )
                                                                                       Noncausal change 
                                                                                       to causal by shifting 
                                                                                       by (N‐1)/2 
8.8.1 – Effect of the Window Size
   As we increase the width of the window (n), its spectrum will be sharper & the
result of convolution will be near to ideal.
   As th
   A the resulting ideal impulse response does not lead to FIR filter, the ideal
              lti id l i       l             d     tl dt        filt th id l
impulse response can be truncated by setting hD(n)=0; for n>M (say). But this
introduces the so called Gibb’s oscillations.
  Filter designed by windowing method has equal passband and stopband ripples




         M=5                         M=20                         M=50


  This is done by multiplying the ideal impulse response by rectangular window of
the form:
                      ⎧1      ; n = 0,1,..., M     ; M = ( N − 1) 2
               w(n) = ⎨
                      ⎩0       ; else where
8.9 – Some Common Window Functions
• A practical approach to design an FIR filter is to multiply the ideal impulse
response by a window function, w(n), whose duration is finite other than the
rectangular window. This l d to the resulting impulse response decaying
         l      d     Th leads      h      l          l             d
smoothly towards zero, so the Gibb’s oscillations will be reduced. But the
transition width will be wider than the case when the rectangular window is used.
8.9.1 – Rectangular Window

       ⎧1     ; n = 0,1,..., M   ; M = ( N − 1) 2
w(n) = ⎨
       ⎩0     ; else where




       time                                 frequency
8.9.2 – Hanning Window

       ⎧ 0 .5 + 0 .5 cos( 2π n )       ⎧− (N − 2) 2 ≤ n ≤ (N − 2) 2 (N odd)
       ⎪                               ⎨
w(n) = ⎨                        N            −N 2≤n≤ N 2
       ⎪              0 ; else where   ⎩                           (N even)
       ⎩




                  time                               frequency
8.9.3 – Hamming Window

       ⎧0.54 + 0.46 cos(2πn ) ⎨     ⎧− (N − 2) 2 ≤ n ≤ (N − 2) 2 (N odd)
       ⎪               (
w(n) = ⎨                       N          −N 2≤n≤ N 2
                       ; else where ⎩
                                                                (N even)
       ⎪
       ⎩           0




               time                               frequency
8.9.4 – Blackman Window
       ⎧                2πn               4πn
       ⎪0.42 + 0.5 cos(     ) + 0.08cos(      )
w(n) = ⎨                N −1              N −1
       ⎪
       ⎩                   0 ; else where
                                              ⎧−(N−2) 2≤n≤(N−2) 2    (N odd)
                                            ⎨
                                            ⎩    −N 2≤n≤ N 2        (N even)




               time                               frequency
8.10 – Summary of Important Features of Common
              Window Functions
8.11 – FIR Design Steps by Windowing
  Step 1: Specify the ‘ideal’ or desired frequency response of filter, HD(ω).

   Step 2: Obtain the impulse response, hD(n), of the desired filter by evaluating
      p                 p        p         ( ) f              f       y          g
the inverse DTFT. For the standard frequency selective filters the expressions for
hD(n) are summarized in table stated in slide 7

  Step 3: Select a window function that satisfies the passband or attenuation
specifications & then determine the number of filter coefficients using the
appropriate relationship between the filter length & the transition width, ∆f
(expressed as a fraction of the sampling frequency).

   Step 4: Obtain values of w(n) for the chosen window function & the values of
the actual FIR coefficients, h(n), by multiplying hD(n) by w(n) h(n)= hD(n) w(n)

  Step 5: shift the filter coefficients by (N-1)/2 to achieve a causal filter

  It is clear that the window method is straightforward & involves a minimal amount of 
  computational effort. On the other hand, it should be said that the resulting filter is 
  not optimal, that is in many cases a filter with a smaller number of coefficients can 
  be designed using other methods.
Example
   Obtain the coefficients of an FIR LPF to meet the specifications
given below;
• Passband edge frequency   1.5 kHz
• Transition width          0.5 kHz
• Stopband attenuation      >50 dB
• Sampling frequency        8 kHz
  Solution                                              sin(nωc )
Select hD(n) for LPF which is given by   hD (n) = 2 f c           ;n ≠ 0
                                                           nω c
                                         hD (n) = 2 f c ; n = 0
The table in slide 17 indicates that the Hamming, Blackman, or Kaiser window
will satisfy the stopband attenuation requirements. We will use the Hamming
  ill i f h          b d          i        i        W ill        h H    i
window for simplicity.
Now ∆f =0.5/8=0.0625.
From N=3.3/ ∆f =3.3/0.0625=52.8, l t N=53
F      N 3 3/       3 3/0 0625 52 8 let N 53                        odd
Example – cont.
The filte coefficients are obtained from h(n)= hD(n) w(n);
 he filter             ae           f om h(n)                     -26 ≤ n ≤ 26
                                                                    6        6
where                                   sin( nωc )
                          hD (n) = 2 f c              ;n ≠ 0
                                             nω c
                          hD (n) = 2 f c ; n = 0
              w(n) = 0.54 + 0.46 cos(2πn );−26 ≤ n ≤ 26
                                                    53
Because of the smearing effect of the window on the filter response, the cutoff
frequency of the resulting filter will be different from that given in the specifications.
To account for this, we will use fc that is centered on the transition band:
      ′
    fc = fc + ∆f         = (1.5 + 0.25)kHz = 1.75kHz                1.75/8 = 0.21875
                     2
Nothing that h(n) is symmetrical, we need only to compute values for h(0),h(1), …,h(26)
      g       ( )     y          ,           y       p             f  ( ), ( ), , ( )
& then use the symmetry property to obtain the other coefficients.
n=0: hD(0) = 2 fc = 2 * 0.21875 = 0.4375
      w(0) = 0.54 + 0.46 cos(0) = 1
      h(0) = hD(0) w(0) = 0.4375
Example – cont.
                   2 × 0.21875                      sin(360 × 0.21875)
n 1:
n=1:   hD (1) =                sin( 2π × 0.21875) =                    = 0.31219
                  2π × 0.21875                              π
       w(1) = 0.54 + 0.46 cos(2π/53) = 0.54 + 0.46 cos(360/53) = 0.99677
       h(1) = h(-1) = hD(1) w(1) = 0 31118
              h( 1)                0.31118

                     2 × 0.21875                            sin(157.5)
n=2:   hD (2) =                    sin( 2 × 2π × 0.21875) =            = 0.06013
                  2 × 2π × 0.21875                              2π
       w(2) = 0.54 + 0.46 cos(2π*2/53) = 0.54 + 0.46 cos(720/53) = 0.98713
       h(2) = h(-2) = hD(2) w(2) = 0.06012



                        2 × 0.21875
n=26: hD ( 26) =                       sin( 26 × 2π × 0.21875) = −0.01131
                     26 × 2π × 0.21875
        w(26) = 0.54 + 0.46 cos(2π*26/53) = 0.54 + 0.46 cos(9360/53) = 0.08081
        h(26) = h(-26) = hD(26) w(26) = - 0 000914
                h( 26)                    0.000914
Example – cont.
• We note that the indices of the filter coefficients run from -26 to 26. To make the filter
causal (necessary for implementation) we add 26 to each index so that the indices start at
zero. The filter coefficients, with indices adjusted, are listed in the following table. The
spectrum of the filter (is plotted) would indicate that the specifications were satisfied.

More Related Content

What's hot

DSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter DesignDSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
Amr E. Mohamed
 
Radix-2 DIT FFT
Radix-2 DIT FFT Radix-2 DIT FFT
Radix-2 DIT FFT
Sarang Joshi
 
DSP_FOEHU - Lec 07 - Digital Filters
DSP_FOEHU - Lec 07 - Digital FiltersDSP_FOEHU - Lec 07 - Digital Filters
DSP_FOEHU - Lec 07 - Digital Filters
Amr E. Mohamed
 
Chapter2 - Linear Time-Invariant System
Chapter2 - Linear Time-Invariant SystemChapter2 - Linear Time-Invariant System
Chapter2 - Linear Time-Invariant System
Attaporn Ninsuwan
 
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time SignalsDSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
Amr E. Mohamed
 
Decimation and Interpolation
Decimation and InterpolationDecimation and Interpolation
Decimation and Interpolation
Fernando Ojeda
 
Multirate DSP
Multirate DSPMultirate DSP
Multirate DSP
@zenafaris91
 
Chapter4 - The Continuous-Time Fourier Transform
Chapter4 - The Continuous-Time Fourier TransformChapter4 - The Continuous-Time Fourier Transform
Chapter4 - The Continuous-Time Fourier Transform
Attaporn Ninsuwan
 
Pre-emphasis and De-emphasis.pptx
Pre-emphasis and De-emphasis.pptxPre-emphasis and De-emphasis.pptx
Pre-emphasis and De-emphasis.pptx
swatihalunde
 
Pulse modulation
Pulse modulationPulse modulation
Pulse modulation
stk_gpg
 
Angle Modulation
Angle ModulationAngle Modulation
Angle Modulation
sangeetha rakhi
 
Design of FIR filters
Design of FIR filtersDesign of FIR filters
Design of FIR filters
op205
 
Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processingDsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
Amr E. Mohamed
 
Butterworth filter design
Butterworth filter designButterworth filter design
Butterworth filter designSushant Shankar
 
Fir filter_utkarsh_kulshrestha
Fir filter_utkarsh_kulshresthaFir filter_utkarsh_kulshrestha
Fir filter_utkarsh_kulshrestha
Utkarsh Kulshrestha
 
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and SystemsDSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
Amr E. Mohamed
 
Overview of sampling
Overview of samplingOverview of sampling
Overview of sampling
Sagar Kumar
 
Signal classification of signal
Signal classification of signalSignal classification of signal
Signal classification of signal
001Abhishek1
 
DSP_2018_FOEHU - Lec 04 - The z-Transform
DSP_2018_FOEHU - Lec 04 - The z-TransformDSP_2018_FOEHU - Lec 04 - The z-Transform
DSP_2018_FOEHU - Lec 04 - The z-Transform
Amr E. Mohamed
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier TransformShahryar Ali
 

What's hot (20)

DSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter DesignDSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
 
Radix-2 DIT FFT
Radix-2 DIT FFT Radix-2 DIT FFT
Radix-2 DIT FFT
 
DSP_FOEHU - Lec 07 - Digital Filters
DSP_FOEHU - Lec 07 - Digital FiltersDSP_FOEHU - Lec 07 - Digital Filters
DSP_FOEHU - Lec 07 - Digital Filters
 
Chapter2 - Linear Time-Invariant System
Chapter2 - Linear Time-Invariant SystemChapter2 - Linear Time-Invariant System
Chapter2 - Linear Time-Invariant System
 
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time SignalsDSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
 
Decimation and Interpolation
Decimation and InterpolationDecimation and Interpolation
Decimation and Interpolation
 
Multirate DSP
Multirate DSPMultirate DSP
Multirate DSP
 
Chapter4 - The Continuous-Time Fourier Transform
Chapter4 - The Continuous-Time Fourier TransformChapter4 - The Continuous-Time Fourier Transform
Chapter4 - The Continuous-Time Fourier Transform
 
Pre-emphasis and De-emphasis.pptx
Pre-emphasis and De-emphasis.pptxPre-emphasis and De-emphasis.pptx
Pre-emphasis and De-emphasis.pptx
 
Pulse modulation
Pulse modulationPulse modulation
Pulse modulation
 
Angle Modulation
Angle ModulationAngle Modulation
Angle Modulation
 
Design of FIR filters
Design of FIR filtersDesign of FIR filters
Design of FIR filters
 
Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processingDsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
 
Butterworth filter design
Butterworth filter designButterworth filter design
Butterworth filter design
 
Fir filter_utkarsh_kulshrestha
Fir filter_utkarsh_kulshresthaFir filter_utkarsh_kulshrestha
Fir filter_utkarsh_kulshrestha
 
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and SystemsDSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
 
Overview of sampling
Overview of samplingOverview of sampling
Overview of sampling
 
Signal classification of signal
Signal classification of signalSignal classification of signal
Signal classification of signal
 
DSP_2018_FOEHU - Lec 04 - The z-Transform
DSP_2018_FOEHU - Lec 04 - The z-TransformDSP_2018_FOEHU - Lec 04 - The z-Transform
DSP_2018_FOEHU - Lec 04 - The z-Transform
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier Transform
 

Viewers also liked

Dsp U Lec09 Iir Filter Design
Dsp U   Lec09 Iir Filter DesignDsp U   Lec09 Iir Filter Design
Dsp U Lec09 Iir Filter Design
taha25
 
Fir and iir filter_design
Fir and iir filter_designFir and iir filter_design
Fir and iir filter_designshrinivasgnaik
 
Dsp U Lec07 Realization Of Discrete Time Systems
Dsp U   Lec07 Realization Of Discrete Time SystemsDsp U   Lec07 Realization Of Discrete Time Systems
Dsp U Lec07 Realization Of Discrete Time Systems
taha25
 
Basics of Digital Filters
Basics of Digital FiltersBasics of Digital Filters
Basics of Digital Filters
op205
 
Digital Filters Part 1
Digital Filters Part 1Digital Filters Part 1
Digital Filters Part 1
Premier Farnell
 
Dsp U Lec01 Real Time Dsp Systems
Dsp U   Lec01 Real Time Dsp SystemsDsp U   Lec01 Real Time Dsp Systems
Dsp U Lec01 Real Time Dsp Systems
taha25
 
Dsp U Lec04 Discrete Time Signals & Systems
Dsp U   Lec04 Discrete Time Signals & SystemsDsp U   Lec04 Discrete Time Signals & Systems
Dsp U Lec04 Discrete Time Signals & Systems
taha25
 
Dsp U Lec10 DFT And FFT
Dsp U   Lec10  DFT And  FFTDsp U   Lec10  DFT And  FFT
Dsp U Lec10 DFT And FFT
taha25
 
Design of IIR filters
Design of IIR filtersDesign of IIR filters
Design of IIR filters
op205
 
Windowing techniques of fir filter design
Windowing techniques of fir filter designWindowing techniques of fir filter design
Windowing techniques of fir filter design
Rohan Nagpal
 
Design of FIR Filters
Design of FIR FiltersDesign of FIR Filters
Design of FIR Filters
Aranya Sarkar
 
Utp pds_s11_filtros [modo de compatibilidad]
 Utp pds_s11_filtros [modo de compatibilidad] Utp pds_s11_filtros [modo de compatibilidad]
Utp pds_s11_filtros [modo de compatibilidad]jcbenitezp
 
Frequency Estimation
Frequency EstimationFrequency Estimation
Frequency Estimation
Peter Kootsookos
 
Dsp course contents
Dsp course contentsDsp course contents
Dsp course contentsmadhurikad
 
Digital multimeter-htc-23
Digital multimeter-htc-23Digital multimeter-htc-23
Digital multimeter-htc-23guest1471817
 

Viewers also liked (20)

Dsp U Lec09 Iir Filter Design
Dsp U   Lec09 Iir Filter DesignDsp U   Lec09 Iir Filter Design
Dsp U Lec09 Iir Filter Design
 
Fir and iir filter_design
Fir and iir filter_designFir and iir filter_design
Fir and iir filter_design
 
Dsp U Lec07 Realization Of Discrete Time Systems
Dsp U   Lec07 Realization Of Discrete Time SystemsDsp U   Lec07 Realization Of Discrete Time Systems
Dsp U Lec07 Realization Of Discrete Time Systems
 
Basics of Digital Filters
Basics of Digital FiltersBasics of Digital Filters
Basics of Digital Filters
 
Digital Filters Part 1
Digital Filters Part 1Digital Filters Part 1
Digital Filters Part 1
 
Dsp U Lec01 Real Time Dsp Systems
Dsp U   Lec01 Real Time Dsp SystemsDsp U   Lec01 Real Time Dsp Systems
Dsp U Lec01 Real Time Dsp Systems
 
Dsp U Lec04 Discrete Time Signals & Systems
Dsp U   Lec04 Discrete Time Signals & SystemsDsp U   Lec04 Discrete Time Signals & Systems
Dsp U Lec04 Discrete Time Signals & Systems
 
Dsp U Lec10 DFT And FFT
Dsp U   Lec10  DFT And  FFTDsp U   Lec10  DFT And  FFT
Dsp U Lec10 DFT And FFT
 
Design of Filters PPT
Design of Filters PPTDesign of Filters PPT
Design of Filters PPT
 
Design of IIR filters
Design of IIR filtersDesign of IIR filters
Design of IIR filters
 
Windowing techniques of fir filter design
Windowing techniques of fir filter designWindowing techniques of fir filter design
Windowing techniques of fir filter design
 
Design of FIR Filters
Design of FIR FiltersDesign of FIR Filters
Design of FIR Filters
 
Chapter6 sampling
Chapter6 samplingChapter6 sampling
Chapter6 sampling
 
Utp pds_s11_filtros [modo de compatibilidad]
 Utp pds_s11_filtros [modo de compatibilidad] Utp pds_s11_filtros [modo de compatibilidad]
Utp pds_s11_filtros [modo de compatibilidad]
 
Digfilt
DigfiltDigfilt
Digfilt
 
Chapter14
Chapter14Chapter14
Chapter14
 
Frequency Estimation
Frequency EstimationFrequency Estimation
Frequency Estimation
 
Dsp course contents
Dsp course contentsDsp course contents
Dsp course contents
 
Dsp lecture vol 7 adaptive filter
Dsp lecture vol 7 adaptive filterDsp lecture vol 7 adaptive filter
Dsp lecture vol 7 adaptive filter
 
Digital multimeter-htc-23
Digital multimeter-htc-23Digital multimeter-htc-23
Digital multimeter-htc-23
 

Similar to Dsp U Lec08 Fir Filter Design

WAVELET-PACKET-BASED ADAPTIVE ALGORITHM FOR SPARSE IMPULSE RESPONSE IDENTIFI...
WAVELET-PACKET-BASED ADAPTIVE ALGORITHM FOR  SPARSE IMPULSE RESPONSE IDENTIFI...WAVELET-PACKET-BASED ADAPTIVE ALGORITHM FOR  SPARSE IMPULSE RESPONSE IDENTIFI...
WAVELET-PACKET-BASED ADAPTIVE ALGORITHM FOR SPARSE IMPULSE RESPONSE IDENTIFI...
bermudez_jcm
 
Sls clm demo_new
Sls clm demo_newSls clm demo_new
Sls clm demo_newtvpszen
 
Basics of Analogue Filters
Basics of Analogue FiltersBasics of Analogue Filters
Basics of Analogue Filters
op205
 
02 2d systems matrix
02 2d systems matrix02 2d systems matrix
02 2d systems matrix
Rumah Belajar
 
Dsp U Lec06 The Z Transform And Its Application
Dsp U   Lec06 The Z Transform And Its ApplicationDsp U   Lec06 The Z Transform And Its Application
Dsp U Lec06 The Z Transform And Its Application
taha25
 
Alternative Approach for Computing the Activation Factor of the PNLMS Algorithm
Alternative Approach for Computing the Activation Factor of the PNLMS AlgorithmAlternative Approach for Computing the Activation Factor of the PNLMS Algorithm
Alternative Approach for Computing the Activation Factor of the PNLMS Algorithm
Francisco Souza
 
A Novel Methodology for Designing Linear Phase IIR Filters
A Novel Methodology for Designing Linear Phase IIR FiltersA Novel Methodology for Designing Linear Phase IIR Filters
A Novel Methodology for Designing Linear Phase IIR Filters
IDES Editor
 
Speech signal time frequency representation
Speech signal time frequency representationSpeech signal time frequency representation
Speech signal time frequency representationNikolay Karpov
 
Correlative level coding
Correlative level codingCorrelative level coding
Correlative level codingsrkrishna341
 
Signal Processing Homework Help
Signal Processing Homework HelpSignal Processing Homework Help
Signal Processing Homework Help
Matlab Assignment Experts
 
Quadrature amplitude modulation qam transmitter
Quadrature amplitude modulation qam transmitterQuadrature amplitude modulation qam transmitter
Quadrature amplitude modulation qam transmitterAsaad Drake
 
Chapter 9 computation of the dft
Chapter 9 computation of the dftChapter 9 computation of the dft
Chapter 9 computation of the dftmikeproud
 
Model For Estimating Diversity Presentation
Model For Estimating Diversity PresentationModel For Estimating Diversity Presentation
Model For Estimating Diversity Presentation
David Torres
 
IGARSS2011 FR3.T08.3 BenDavid.pdf
IGARSS2011 FR3.T08.3 BenDavid.pdfIGARSS2011 FR3.T08.3 BenDavid.pdf
IGARSS2011 FR3.T08.3 BenDavid.pdfgrssieee
 
Color Img at Prisma Network meeting 2009
Color Img at Prisma Network meeting 2009Color Img at Prisma Network meeting 2009
Color Img at Prisma Network meeting 2009
Juan Luis Nieves
 
Lecture 2-Filtering.pdf
Lecture 2-Filtering.pdfLecture 2-Filtering.pdf
Lecture 2-Filtering.pdf
TechEvents1
 

Similar to Dsp U Lec08 Fir Filter Design (20)

WAVELET-PACKET-BASED ADAPTIVE ALGORITHM FOR SPARSE IMPULSE RESPONSE IDENTIFI...
WAVELET-PACKET-BASED ADAPTIVE ALGORITHM FOR  SPARSE IMPULSE RESPONSE IDENTIFI...WAVELET-PACKET-BASED ADAPTIVE ALGORITHM FOR  SPARSE IMPULSE RESPONSE IDENTIFI...
WAVELET-PACKET-BASED ADAPTIVE ALGORITHM FOR SPARSE IMPULSE RESPONSE IDENTIFI...
 
Sls clm demo_new
Sls clm demo_newSls clm demo_new
Sls clm demo_new
 
Basics of Analogue Filters
Basics of Analogue FiltersBasics of Analogue Filters
Basics of Analogue Filters
 
02 2d systems matrix
02 2d systems matrix02 2d systems matrix
02 2d systems matrix
 
Dsp U Lec06 The Z Transform And Its Application
Dsp U   Lec06 The Z Transform And Its ApplicationDsp U   Lec06 The Z Transform And Its Application
Dsp U Lec06 The Z Transform And Its Application
 
Alternative Approach for Computing the Activation Factor of the PNLMS Algorithm
Alternative Approach for Computing the Activation Factor of the PNLMS AlgorithmAlternative Approach for Computing the Activation Factor of the PNLMS Algorithm
Alternative Approach for Computing the Activation Factor of the PNLMS Algorithm
 
A Novel Methodology for Designing Linear Phase IIR Filters
A Novel Methodology for Designing Linear Phase IIR FiltersA Novel Methodology for Designing Linear Phase IIR Filters
A Novel Methodology for Designing Linear Phase IIR Filters
 
z transforms
z transformsz transforms
z transforms
 
Speech signal time frequency representation
Speech signal time frequency representationSpeech signal time frequency representation
Speech signal time frequency representation
 
Chapt 2
Chapt 2Chapt 2
Chapt 2
 
Correlative level coding
Correlative level codingCorrelative level coding
Correlative level coding
 
Linear prediction
Linear predictionLinear prediction
Linear prediction
 
Signal Processing Homework Help
Signal Processing Homework HelpSignal Processing Homework Help
Signal Processing Homework Help
 
Quadrature amplitude modulation qam transmitter
Quadrature amplitude modulation qam transmitterQuadrature amplitude modulation qam transmitter
Quadrature amplitude modulation qam transmitter
 
Chapter 9 computation of the dft
Chapter 9 computation of the dftChapter 9 computation of the dft
Chapter 9 computation of the dft
 
Model For Estimating Diversity Presentation
Model For Estimating Diversity PresentationModel For Estimating Diversity Presentation
Model For Estimating Diversity Presentation
 
IGARSS2011 FR3.T08.3 BenDavid.pdf
IGARSS2011 FR3.T08.3 BenDavid.pdfIGARSS2011 FR3.T08.3 BenDavid.pdf
IGARSS2011 FR3.T08.3 BenDavid.pdf
 
Chapter 2 (maths 3)
Chapter 2 (maths 3)Chapter 2 (maths 3)
Chapter 2 (maths 3)
 
Color Img at Prisma Network meeting 2009
Color Img at Prisma Network meeting 2009Color Img at Prisma Network meeting 2009
Color Img at Prisma Network meeting 2009
 
Lecture 2-Filtering.pdf
Lecture 2-Filtering.pdfLecture 2-Filtering.pdf
Lecture 2-Filtering.pdf
 

Recently uploaded

State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 

Recently uploaded (20)

State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 

Dsp U Lec08 Fir Filter Design

  • 1. EC533: Digital Signal Processing 5 l l Lecture 8 FIR Filter Design
  • 2. 8.1 – FIR Filter The basic FIR filter is characterized by the following: N −1 y (n) = ∑ h(k ) x(n − k ) k =0 N −1 H ( z) = ∑ h(k ) z −k k =0 where, h(k); k=0,1,…, N-1 are the impulse response coefficients of the filter. • Filter order= N-1. • Filter Length N Length=N • FIR filters can have an exactly linear phase response.
  • 3. 8.2 – Linear Phase Response & Its Implications • A filter is said to have linear phase response if its phase response satisfies one of the following relationships; θ (ω ) = −αω 1 θ (ω) = β −αω 2 •where α, β are constants. , If condition 1 is satisfied, the filter will have a constant group & constant phase delay responses & the impulse response of the filter must have positive (even) symmetry. i ( ) i.e., ⎧ N −1 ⎫ ⎪n = 0,1........ if N is odd ⎪ 2 ⎪ ⎪ ⎪ ( i bl f all types of fil ) ⎪ (suitable for ll f filters) h(n) = h( N − n − 1); ⎨ ⎬ ⎪n = 0,1........ N - 1 if N is even⎪ ⎪ 2 ⎪ ⎪ ⎪ α = ( N − 1) 2 ⎩ (not suitable for HPF) ⎭
  • 4. 8.2 – Linear Phase Response & Its Implications – cont. When condition 2 is satisfied, the filter will have a constant group delay only & the impulse response of the filter will have a negative (odd) symmetry. i.e., ⎧ N −1 ⎫ ⎪ n = 0,1........ if N is odd ⎪ 2 ⎪ ⎪ ⎪ N ⎪ h(n) = −h( N − n − 1); ⎨ n = 0,1........ - 1 if N is even ⎬ ⎪ 2 ⎪ ⎪(suitable for Hilbert Transformers and Diffrentiators) ⎪ ⎪ ⎪ ⎩ ⎭ α = ( N − 1) 2 ; β =π /2
  • 5. 8.3 - Filter Types • The desired (Ideal) frequency response of different filters: LPF HPF ω (normalized) BPF BSF ω1 ω2 ω1 ω2 The amplitude response is periodic in frequency with a period ωs & symmetric around the Nyquist frequency ωN = ωs /2.
  • 6. 8.4 – Deriving Filter Impulse Response As HD(ω) is the desired amplitude response & it is periodic in frequency with period ωs ,We can obtain the filter impulse response hD(n) – filter coefficients ak’s- s by evaluating the IDTFT of HD(ω) as follows; ∞ − jω n H D (ω ) = ∑ h D ( n ).e DTFT m = −∞ 1 π jω n 1 ωc jω n hD ( n ) = 2π ∫− π H D (ω ).e d ω = 2π ∫− ω c1.e d ω ωc 1 ⎡e jω n ⎤ fc ⎡ 2 sin( n ω c ) ⎤ = ⎢ ⎥ = ⎢ ⎥ 2 π ⎣ jn ⎦ − ω j 2π ⎣ nf c f ⎦ c 2 f c sin( n ω c ) = nω c Where fc is the normalized cutoff frequency
  • 7. 8.5 – Ideal Impulse Response for Different Filter Types where fc,f1 and f2 are the normalized passband or stopband edge frequencies.
  • 8. 8.6 - FIR Filter Specification jw H(e ) • ωp ‐ passband edge frequency • ωs ‐ stopband edge frequency • δp ‐ peak ripple value in the passband • δs ‐ peak ripple value in the stopband Ap = 20 log10 (1 + δp) dB Peak passband ripple (dB) p pp ( ) As = -20 log10 (δs) dB Stopband attenuation (dB) ∆(ω)= ωs - ωp≡ Transition width Transition Width
  • 9. 8.7 – FIR coefficient Calculation Methods • The filter coefficients - h(n)- can be calculated by using several methods as the window, optimal, & frequency sampling methods. li h d • All of these methods can lead to linear phase FIR filter.
  • 10. 8.8 – Window Method H(ejw ) 1 -∞ ∞ ω W(ejw ) w(nT) 2 noncausal ω ω − (N - 1 ) 2 (N - 1 ) 2 Gibb’s  jωT jωT h w (n) = h(nT).w(nT) Oscillations H (e ) ⊗ W (e ) Noncausal change  to causal by shifting  by (N‐1)/2 
  • 11. 8.8.1 – Effect of the Window Size As we increase the width of the window (n), its spectrum will be sharper & the result of convolution will be near to ideal. As th A the resulting ideal impulse response does not lead to FIR filter, the ideal lti id l i l d tl dt filt th id l impulse response can be truncated by setting hD(n)=0; for n>M (say). But this introduces the so called Gibb’s oscillations. Filter designed by windowing method has equal passband and stopband ripples M=5 M=20 M=50 This is done by multiplying the ideal impulse response by rectangular window of the form: ⎧1 ; n = 0,1,..., M ; M = ( N − 1) 2 w(n) = ⎨ ⎩0 ; else where
  • 12. 8.9 – Some Common Window Functions • A practical approach to design an FIR filter is to multiply the ideal impulse response by a window function, w(n), whose duration is finite other than the rectangular window. This l d to the resulting impulse response decaying l d Th leads h l l d smoothly towards zero, so the Gibb’s oscillations will be reduced. But the transition width will be wider than the case when the rectangular window is used.
  • 13. 8.9.1 – Rectangular Window ⎧1 ; n = 0,1,..., M ; M = ( N − 1) 2 w(n) = ⎨ ⎩0 ; else where time frequency
  • 14. 8.9.2 – Hanning Window ⎧ 0 .5 + 0 .5 cos( 2π n ) ⎧− (N − 2) 2 ≤ n ≤ (N − 2) 2 (N odd) ⎪ ⎨ w(n) = ⎨ N −N 2≤n≤ N 2 ⎪ 0 ; else where ⎩ (N even) ⎩ time frequency
  • 15. 8.9.3 – Hamming Window ⎧0.54 + 0.46 cos(2πn ) ⎨ ⎧− (N − 2) 2 ≤ n ≤ (N − 2) 2 (N odd) ⎪ ( w(n) = ⎨ N −N 2≤n≤ N 2 ; else where ⎩ (N even) ⎪ ⎩ 0 time frequency
  • 16. 8.9.4 – Blackman Window ⎧ 2πn 4πn ⎪0.42 + 0.5 cos( ) + 0.08cos( ) w(n) = ⎨ N −1 N −1 ⎪ ⎩ 0 ; else where ⎧−(N−2) 2≤n≤(N−2) 2 (N odd) ⎨ ⎩ −N 2≤n≤ N 2 (N even) time frequency
  • 17. 8.10 – Summary of Important Features of Common Window Functions
  • 18. 8.11 – FIR Design Steps by Windowing Step 1: Specify the ‘ideal’ or desired frequency response of filter, HD(ω). Step 2: Obtain the impulse response, hD(n), of the desired filter by evaluating p p p ( ) f f y g the inverse DTFT. For the standard frequency selective filters the expressions for hD(n) are summarized in table stated in slide 7 Step 3: Select a window function that satisfies the passband or attenuation specifications & then determine the number of filter coefficients using the appropriate relationship between the filter length & the transition width, ∆f (expressed as a fraction of the sampling frequency). Step 4: Obtain values of w(n) for the chosen window function & the values of the actual FIR coefficients, h(n), by multiplying hD(n) by w(n) h(n)= hD(n) w(n) Step 5: shift the filter coefficients by (N-1)/2 to achieve a causal filter It is clear that the window method is straightforward & involves a minimal amount of  computational effort. On the other hand, it should be said that the resulting filter is  not optimal, that is in many cases a filter with a smaller number of coefficients can  be designed using other methods.
  • 19. Example Obtain the coefficients of an FIR LPF to meet the specifications given below; • Passband edge frequency 1.5 kHz • Transition width 0.5 kHz • Stopband attenuation >50 dB • Sampling frequency 8 kHz Solution sin(nωc ) Select hD(n) for LPF which is given by hD (n) = 2 f c ;n ≠ 0 nω c hD (n) = 2 f c ; n = 0 The table in slide 17 indicates that the Hamming, Blackman, or Kaiser window will satisfy the stopband attenuation requirements. We will use the Hamming ill i f h b d i i W ill h H i window for simplicity. Now ∆f =0.5/8=0.0625. From N=3.3/ ∆f =3.3/0.0625=52.8, l t N=53 F N 3 3/ 3 3/0 0625 52 8 let N 53 odd
  • 20. Example – cont. The filte coefficients are obtained from h(n)= hD(n) w(n); he filter ae f om h(n) -26 ≤ n ≤ 26 6 6 where sin( nωc ) hD (n) = 2 f c ;n ≠ 0 nω c hD (n) = 2 f c ; n = 0 w(n) = 0.54 + 0.46 cos(2πn );−26 ≤ n ≤ 26 53 Because of the smearing effect of the window on the filter response, the cutoff frequency of the resulting filter will be different from that given in the specifications. To account for this, we will use fc that is centered on the transition band: ′ fc = fc + ∆f = (1.5 + 0.25)kHz = 1.75kHz 1.75/8 = 0.21875 2 Nothing that h(n) is symmetrical, we need only to compute values for h(0),h(1), …,h(26) g ( ) y , y p f ( ), ( ), , ( ) & then use the symmetry property to obtain the other coefficients. n=0: hD(0) = 2 fc = 2 * 0.21875 = 0.4375 w(0) = 0.54 + 0.46 cos(0) = 1 h(0) = hD(0) w(0) = 0.4375
  • 21. Example – cont. 2 × 0.21875 sin(360 × 0.21875) n 1: n=1: hD (1) = sin( 2π × 0.21875) = = 0.31219 2π × 0.21875 π w(1) = 0.54 + 0.46 cos(2π/53) = 0.54 + 0.46 cos(360/53) = 0.99677 h(1) = h(-1) = hD(1) w(1) = 0 31118 h( 1) 0.31118 2 × 0.21875 sin(157.5) n=2: hD (2) = sin( 2 × 2π × 0.21875) = = 0.06013 2 × 2π × 0.21875 2π w(2) = 0.54 + 0.46 cos(2π*2/53) = 0.54 + 0.46 cos(720/53) = 0.98713 h(2) = h(-2) = hD(2) w(2) = 0.06012 2 × 0.21875 n=26: hD ( 26) = sin( 26 × 2π × 0.21875) = −0.01131 26 × 2π × 0.21875 w(26) = 0.54 + 0.46 cos(2π*26/53) = 0.54 + 0.46 cos(9360/53) = 0.08081 h(26) = h(-26) = hD(26) w(26) = - 0 000914 h( 26) 0.000914
  • 22. Example – cont. • We note that the indices of the filter coefficients run from -26 to 26. To make the filter causal (necessary for implementation) we add 26 to each index so that the indices start at zero. The filter coefficients, with indices adjusted, are listed in the following table. The spectrum of the filter (is plotted) would indicate that the specifications were satisfied.