Lecture 5 block processing for fir filters
Download
1 / 11

Lecture 5: Block Processing for FIR Filters - PowerPoint PPT Presentation


  • 84 Views
  • Uploaded on

h. Lecture 5: Block Processing for FIR Filters. Block processing methods recorded data: x = {x 0 x 1 x 2 … x L-1 } length: L x = L system impulse response: h = {h 0 h 1 h 2 h 3 … h M } length: L h = M+1 output data: y = {y 0 y 1 y 2 y3 … y Ly-1 }

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Lecture 5: Block Processing for FIR Filters' - mikkel


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Lecture 5 block processing for fir filters

h

Lecture 5: Block Processing for FIR Filters

  • Block processing methods

    • recorded data: x = {x0 x1 x2 … xL-1}

      • length: Lx = L

    • system impulse response: h = {h0 h1 h2 h3 … hM}

      • length: Lh = M+1

    • output data: y = {y0 y1 y2 y3 … yLy-1}

      • length: Ly = Lx + Lh - 1

    • key question: how do we process h and x to compute y?

x

y

EE421, Lecture 5


Block processing
Block Processing

  • Convolution tabley(0) = h(0)x(0)y(1) = h(0)x(1) + h(1)x(0)y(2) = h(0)x(2) + h(1)x(1) + h(2)x(0)y(3) = h(0)x(3) + h(1)x(2) + h(2)x(1) + h(3)x(0)y(4) = h(0)x(4) + h(1)x(3) + h(2)x(2) + h(3)x(1) + h(4)x(0)

y(0)

y(1)

y(2)

y(3)

EE421, Lecture 5

y(4)


Block processing1
Block Processing

  • Convolution table

    • example: x = {1 2 1 3}, h = {4 2 1}

n=0

n=0

y(0) = 4

y(1) = 10

y(2) = 9

y(3) = 16

y(4) = 7

y(5) = 3

y = {4 10 9 16 7 3}

n=0

EE421, Lecture 5


Block processing2
Block Processing

  • LTI Formy(n) = … + x(0)h(n) + x(1)h(n-1) + x(2)h(n-2) + x(3)h(n-3) + …

y(0)

y(1)

y(2)

y(3)

y(4)

EE421, Lecture 5


Block processing3
Block Processing

  • LTI form

    • example: x = {1 2 1 3}, h = {4 2 1}

n=0

n=0

4

10

9

16

7

3

0

y = {4 10 9 16 7 3}

n=0

EE421, Lecture 5


Block processing4
Block Processing

  • Matrix form:

EE421, Lecture 5


Block processing5
Block Processing

  • Matrix form

    • example: x = {1 2 1 3}, h = {4 2 1}

n=0

n=0

y = {4 10 9 16 7 3}

n=0

EE421, Lecture 5


Block processing6

h(2) h(1) h(0)

h(2) h(1) h(0)

h(2) h(1) h(0)

h(2) h(1) h(0)

h(2) h(1) h(0)

h(2) h(1) h(0)

y(0)

y(1)

y(2)

y(3)

y(4)

y(5)

Block Processing

  • Flip-and-slide form:y(n) = h(0)x(n) + h(1)x(n-1) + h(2)x(n-2) + … + h(L)x(n-L)

EE421, Lecture 5


Block processing7

1 2 4

1 2 4

1 2 4

1 2 4

1 2 4

1 2 4

4

10

9

16

7

3

Block Processing

  • Flip-and-slide form:

    • example: x = {1 2 1 3}, h = {4 2 1}

n=0

n=0

y = {4 10 9 16 7 3}

n=0

EE421, Lecture 5


Block processing8
Block Processing

  • Programming considerations

    • convolution table formfunction y = conv(h, x)

      Lh = length(h);Lx = length(x);Ly = Lh+Lx-1;y = zeros(1,Ly);for n = 0:Ly-1 y(n+1) = 0; for i = 0:Lh-1 for j = 0:Lx-1 if (i+j == n) y(n+1) = y(n+1) + h(i+1)*x(j+1); end; end endend

All these for loops will

be inefficient in Matlab!

EE421, Lecture 5


Block processing9
Block Processing

  • Programming considerations

    • LTI formfunction y = conv(h, x)Lh = length(h);Lx = length(x);Ly = Lh+Lx-1; y = zeros(1,Ly); for j = 0:Lx-1 shifth = [zeros(1, j) h zeros(1,Ly-Lh-j)]; y = y + x(j+1)*shifth;end

Only 1 for loop!

EE421, Lecture 5


ad