Polyphase Filters
Section 12.4 Porat
1/39
2/39
12.4 Polyphase Filters
Polyphase is a way of doing sampling-rate conversion that leads
to very efficient implementations.
But more than that, it leads to very general viewpoints that
are useful in building filter banks.
Before we delve into the math we can see a lot just by looking
at the structure of the filtering….
……… Of course, we WILL need to do the math, too, though.
Efficient FIR Filtering for Decimation
xˆ[n]   x[i] h[n 
i]
i
Filtering
:
x[i]
xˆ[3
]
xˆ[4
]
xˆ[5
]
Decimation
:
xˆ( M )
[n]  xˆ[nM ]
  x[i] h[nM  i]
i
i = 0 1 2 3 4 5 6 7 8
9 10 11
M = 3
h[7 – i]
h[8 – i]
h[3 – i]
h[4 – i]
h[5 – i]
h[6 – i]
xˆ(3)
[1]
xˆ(3)
[2]
Don't
Compute
Don't
Compute
3/39
4/39
Efficient FIR Filtering for Decimation M = 3
i = 0
x[0]
x[i]
h[6 – i]
h[9 –
i]
h[12
– i]
x[1]
xˆ(3)
[2]
xˆ(3)
[3]
xˆ(3)
[4]
1 2 3 4 5 6 7 8 9 10 11 12
x[2] x[3] x[4] x[5] x[6] x[7] x[8] x[9] x[10] x[11]
x[12]
Original Filter… …gets split into M=3 subfilters:
… x[3] x[6] x[9] x[12] …
… x[1] x[4] x[7] x[10] …
xˆ(3) [3]
…
Polyphase Form of FIR Decimation
Advantage: “Decimate” then Filter
h[0] h[3]
… x[2] x[5] x[8] x[11] … h[1] h[4]
h[0] h[1] h[2] h[3] h[4] h[5]
h[2] h[6]
… xˆ(3)
[2]

x[0] x[3] x[6] x[9] …
0 x[1] x[4] x[7] …
0 x[2] x[5] x[8] …

Polyphase Form of FIR Decimation
h[0]
h[3]
h[1]
h[4]
h[2]
h[6]
h[0] h[1] h[2] h[3] h[4] h[5]
3
x[0] x[1] x[2] … xˆ(3) [0] xˆ(3) [1]
…
0 0 x[0] x[1] x[2] …
Direct Form of FIR Decimation
Outputs
are the
Same
5/39
Inefficient
Efficient
xˆ(3) [1]
…
xˆ(3)
[0]
6/39
Consider Length-10 Filter w/ M=4
i: 0 1 2 3 4 5
6 7 8 9 h[i]: h[0]
h[1] h[2] h[3] h[4] h[5] h[6] h[7] h[8] h[9]
10 11 12
0 0 0
….
Length of Polyphase Filters: ceil{length/M} = ceil{10/4} =
3
i: 0 1 2
p0[i]:
p1[i]:
p2[i]:
h[0]
h[1]
h[2]
h[4]
h[5]
h[6]
h[8]
h[9]
0
p3[i]: h[3] h[7] 0
x0[n]: x[0] x[4] x[8] x[12] x[16] ….
x1[n]: x[-1] x[3] x[7] x[11] x[15] ….
x2[n]: x[-2] x[2] x[6] x[10] x[14] ….
x3[n]: x[-3] x[1] x[5] x[9] x[13] ….
Example of Polyphase Filters for Decimation
7/39
Matlab Code
% Create input signal and filter
x=1:21;
h=[1 2 3 4 5 6 7 8 9 10 0 0];
% %%%%%% Direct Form (Inefficient) %%%%%%
y=filter(h,1,x); % Compute filter output
y_dec=y(1:4:end) % Throw away unneeded output samples
% %%%%%% Polyphase Form (Efficient) %%%%%%
% Select polyphase filters
p0=h(1:4:end)
p1=h(2:4:end)
p2=h(3:4:end)
p3=h(4:4:end)
% Select polyphase signals
x0=x(1:4:end)
x1=[0 x(4:4:end)]
x2=[0 x(3:4:end)]
x3=[0 x(2:4:end)]
% filter each polyphase component and add together
y_poly_dec=filter(p0,1,x0)+filter(p1,1,x1)+filter(p2,1,x2)+filter(p3,1,x3)
Example of Polyphase Filters for Decimation (pt. 2)
Pad zeros to make length equal to
integer multiple of M
Put a zero in front to provide the
x[-3], x[-2], and x[-1] terms
Efficient FIR Filtering for Interpolation
i = 0 1 2 3 4 5 6 7 8 9 10 11
x[0] 0 0 x[1] 0 0 x[2] 0 0 x[3] 0
0
xˆ( L)
[n]   x( L)
[i] h[n  i]
i
Interpolation :
x(3)[i]
h[6 – i]
h[7 – i]
h[8 – i]
h[9 – i]
h[10 – i]
h[10 – i]
L = 3
xˆ(3)
[6]
xˆ(3)
[7]
xˆ(3)
[8]
xˆ(3)
[9]
xˆ(3)
[10]
xˆ(3) [11] 8/39
xˆ(L)
[n]   x[i] h[n  Li]
i
Interpolation :
Efficient FIR Filtering for Interpolation
i = 0 1 2 3
x[0] x[1] x[2]
x[3]
x[i]
L = 3
xˆ(3)
[6]
xˆ(3)
[7]
xˆ(3)
[8]
xˆ(3)
[9]
xˆ(3)
[10]
xˆ(3)
[11]
9/39
Efficient FIR Filtering for Interpolation
L = 3
Original Filter…
h[0] h[1] h[2] h[3] h[4] h[5]
The output comes from
alternating between the
subfilter outputs
Advantage
Filter then
Interpolate
10/39
… gets split into L = 3 subfilters:
Polyphase Form of FIR Interpolation
…xˆ(3)
[6]
xˆ(3)
[9] …
x[0] x[1] x[2] x[3] …
The input goes
into each subfilter
h[0] h[3]
…xˆ(3)[7] xˆ(3)
[10] …
h[1] h[4]
… xˆ(3)[8] xˆ(3)
[11]…
h[2] h[5]
12.4.1 Multirate Identities
These provide analysis “tricks” useful when dealing
with mathematical analysis of multirate systems.
The question in general is: How can we interchange the order of
filtering w/ decimation/expansion?
Decimation Identity
This identity asserts equality between the following 2 systems:
Can prove this either in the Time-Domain or Z-Domain
M Hz(z)
x[n]
y[n]
Hz(zM) 
M
x[n]
11/39
y[n]
=
TD Proof of Decimation Identity
M Hz(z)
x[n]
y[n]
For the first system:
w[n] = x[nM]
y[n]  w[n]* h[n]  h[k ]w[n 
k ]
k
 h[k ]x[(n  k )M ]
k
For the second
system:
Gz(z) = Hz(zM) 
M
x[n] y[n]
v[n]

0,

h[n / M ],if n / M 
integer
g[n]  h(M )[n] By Eq. (12.15)
12/39
()
TD Proof of Decimation Identity (cont.)
Then…
y[n]  v[nM ]
 h[k ]x[(n  k )M ]
k
Same as for System #1  Proved!!!
Thus…
v[n]  x[n]* g[n]   g[l]x[n 
l]
l
 h[k ]x[n  kM ]
k
Use ()
13/39
14/39
ZD Proof of Decimation Identity
For the second system:
Gz(z) = Hz(zM) 
M
Xz(z) Vz(z) Yz(z)
V z
(z)  X z
(z)H z
(z M
) ()
where…
Now… M
(z1/ MW m )M  zW mM  z
# M_ ,
e j 2 1
But…

1 M 1
m0

1 M 1 z 1/ M m
M
V (z WM )
Y z
(z)  {V z
(z)}
(M )
z 1/
M
m0
1/ MW m )M )
M
W m
)H z
(( z
M
M
 X (z
By ZT Result
for Decimation
Use
()
ZD Proof of Decimation Identity (cont.)
1
z
z
z 1/
M
X
(z)
(M
)
m0
M 1
m0
X (z W m
)H z
(z)
M
 H (z)
WM
)

z z 1/ M m

z
Y (z)
 M


 1 M
1
 H (z)

X (z
M

Which is clearly the same thing that the first system
gives:
M Hz(z)
Xz(z)
15/39
{Xz(z)}(M)
Yz(z)=Hz(z){Xz(z)}(M)
Expansion Identity
This identity asserts equality between the following 2
systems:
L Hz(zL)
x[n] y[n]
Hz(z) L
x[n]
16/39
y[n]
Will give only Z-Domain proof here.
=
w[n]
v[n]
ZD Proof of Expansion Identity
Hz(z) L
x[n] y[n]
w[n]
First system gives:
W z
(z)  X z
(z)H z
(z)
Then…
 X z
(z L
)H z
(z
L
)
Y z
(z)  W z
(z)  W z
(z
L
)
(L)
v[n]
Second system gives:
L Hz(zL)
x[n] y[n]
V z
(z)  X z
(z)  X z
(z
L
)
(L)
Then… Y z
(z)  V z
(z)H z
(z L
)
 X z
(z L
)H z
(z
Same!
17/39
12.4.2 Polyphase Representation of Decimation
Now we re-visit this topic and do it mathematically…
Basic Math Idea: Re-write convolution sum's index & manipulate
to get “parallel” filters:
Hz(z) 
M
x[n]
y[n]
Recall Decimation:
Output given by (12.17) as…
y[n]  h[i]x[nM  i]
i
Write sum's index in “block form” – a
common “trick”:
()
Counts Blocks Counts Samples Inside a Block

18/39

0  m  M  1
i 
integer
i  iM  m M = Block Size
12.4.2 Polyphase Rep of Dec (cont.)
Block-Based Indexing:
2
1
0
m
i
⁝ ⁝ ⁝ ⁝ ⁝ ⁝
1  M  M 1 ⋯  2 1 Each row is
0 0 1 2 ⋯ M 1 indexed forward
1 M M 1 M  2 ⋯ 2M 1
2 2M 2M 1 2M  2 ⋯ 3M 1
⁝ ⁝ ⁝ ⁝ ⁝ ⁝

⋯ M 1

0  m  M  1
i 
integer
i  iM  m
Forward
Indexing
19/39
12.4.2 Polyphase Rep of Dec (cont.)
• Sum up inside
each block
• Sum up all
Block
Results
Sum all elements in
the mth position of
each block
M 1
20/39
 h[iM  m]x[(n  i)M  m]
m0 i
i m0 (ni)M m
M 1
Use Block Indexing in ():
y[n]  h[i]x[nM  i]
i
  h[iM  m]x[n#M–
–_iM–
–
,m] ()
21/39
12.4.2 Polyphase Rep of Dec (cont.)
Now, let's interpret this:
Define for each m, 0  m  M-1
m
p [i]  h[iM  m]
mth Polyphase
Component of h[n]
Each one is a decimated version of
h[n] & the versions are staggered
< See Fig. 12.15>
1.7,
0}
p0[i]  {1.2, 7,
2}
p1[i]  {4, 1, 0}
Example n: 0 1
h[n]: 1.2 4
2 3
0.5 7
4
1
5 6
1.7 2 0 0…
M=3
Fig. 12.15 from Porat’s Book
22/39
12.4.2 Polyphase Rep of Dec (cont.)
What have we done?
Split up h[n] into M subsequences – where the mth
subsequence is a decimated-by-M version of h[n + m]
Why the name “Polyphase”?
Recall: Time-Shift in TD  Phase-Shift in FD
h[n  m]  e jm
H f
( )
 “Polyphase”
23/39
12.4.2 Polyphase Rep of Dec (cont.)
Now… let's chop up the input similarly:
um [n]  x[nM  m]
⋯
2
1
0
⁝ ⁝ ⁝ ⁝ ⁝ ⁝
 1  M  M  1 ⋯  2M  1
0 0  1  2 ⋯  M  1
1 M M  1 M  2 ⋯ 1
2 2M ⋯ M  2 M  1
⁝ ⁝ ⁝ ⁝ ⁝ ⁝
M  1
m
n
Differs From Before:
Each row is indexed
backward
24/39
Backward
Indexing
12.4.2 Polyphase Rep of Dec (cont.)
Now… back to the mathematical development.
Putting these re-indexed versions into ():
M 1
 pm * um
M 1
y[n]  h[iM  m]x[(n  i)M  m]
m0 i
pm [i]  h[iM  m]
um [n]  x[nM  m]

 
 

M 1
m0
 i
  m m
p [i ]u [n
i ]

y[n]

To Implement Polyphase Decimation
• Chop up filter into M sub-filters
• Chop up signal into M sub-signals
• Filter each sub-signal w/ a sub-filter
• Add outputs point-by-point
25/39
12.4.2 Polyphase Rep of Dec (cont.)
Two equivalent ways to think of this:
<This is Fig. 12.16 from Porat's Book>
First Way (shown for M=3):
Note that
Decimation occurs
Before Filtering –
Efficient!!!
26/39
12.4.2 Polyphase Rep of Dec (cont.)
27/39
<This is Fig. 12.17 from Porat's Book>
Second Way to View It (shown for M=3):
28/39
12.4.2 Polyphase Rep of Dec (cont.)
Now we re-analyze this set-up, but in the Z-Domain….
Why? ….It provides further analysis insight.
Z-Domain results often provide insight into how to:
• Derive other results
• Design Polyphase Filters
• Etc.
12.4.2 Polyphase Rep of Dec (cont.)
Recall Example:
p0 [i]  {1.2, 7, 2}
p1[i]  {4, 1, 0}
p0 [i]  {0.5, 1.7,
0}
Expansion!
First…. some time-domain trickery:
How do we get back h[n] from the pm[n]???
1. Insert M-1 zeros between each sample
2. “Line them up” using delays
2, 0, 0}
0, 0, 0}
0, 0, 0}
{1.2, 0, 0, 7, 0, 0,
{ 4, 0, 0, 1, 0, 0,
{0.5, 0, 0, 1.7, 0, 0,
0, 0, 7, 0, 0, 2, 0, 0}
{ 0, 4, 0, 0, 1, 0, 0, 0, 0}
{ 0, 0, 0.5, 0, 0, 1.7, 0, 0, 0}
{1.2,
h[n]  {1.2, 4, 0.5, 7, 1, 1.7, 2, 0,
0}
3. Add them
up
29/39
12.4.2 Polyphase Rep of Dec (cont.)
Thus…. M 1
m0
h[n] 
{pm
}[n  m]
( M )
So…. in Z-Domain we have:
M 1
 m
m z M
z
z P (z )
H (z)

Delay Expand
m0
Now… filter/decimate looks like this:
Hz(z) 
M
Xz(z) Yz(z)
Vz(z)
M 1
m0
 m
m z M z

V z
(z)  X z
(z)H z
(z)
) X (z)
z P (z
30/39
12.4.2 Polyphase Rep of Dec (cont.)
M 1
m0
M 1
m0
(M
)
m z
M 1
m0
 {z m
Pz
(z M
) X z
(z)}(M
)
… and after M we
get:
Y z
(z)  {V z
(z)}(M )


( M
)
Pz
( z){zm
X z
( z)}
z
z
m m
P (z)U (z)
z
m X (z)}
P (z){z
U z
( z)
m
m
# – – m
– – _ – – – – ,
# – –– _ – – –,
Hz(z) 
M
Xz(z) Yz(z)
Vz(z)
By the
“Decimation
Identity”
By Definition
Signal's
Polyphase
Components
….which is the Z-Domain Description of the polyphase
decimation structure. We have now developed two different
derivations of the polyphase structure.
31/39
12.4.3 Polyphase Rep of Expansion
L Hz(z)
x[n]
32/39
y[n]
Recall Expansion:
Output given by (12.19) as…
y[n]   x[i]h[n  Li]
i
Re-Index using: 
0  l  L  1
n

n  nL  (L  1)  l
integer
# – _ –,
"backwards"
n’ = Block Index
l = In-Block Index (indexes backward through
block)
⁝ ⁝ ⁝ ⁝ ⁝ ⁝
 1  1  2 ⋯  L
0 L  1 L  2 L  3 ⋯ 0
1 2L  1 2L  2 2L  3 ⋯ L
2 3L  1 3L  2 3L  3 ⋯ 2L
⁝ ⁝ ⁝ ⁝ ⁝ ⁝
2 ⋯ L  1
l
n

1
0
12.4.3 Polyphase Rep of Exp (cont.)

33/39
0  l  L  1
n

n  nL  (L  1)  l
integer
# – _ –,
"backwards"
Expansion
Re-Index
Table
34/39
12.4.3 Polyphase Rep of Exp (cont.)
Using this re-indexing gives…
y[n]   x[i]h[n  Li]
i
y[n#
L––(_L –1–) ,l]   x[i]h[n#
L––(_L –1–)
,l  Li]
i n
 x[i]h[(n  i)L  (L  1)  l]
i
n
… for each l, this indexing just reads down a
column of the “Expansion Re-Index Table”
For each l such that 0  l  L – 1 we define:
ql [n]  h[nL  (L  1)  l]
vl [n]  y[nL  (L  1)  l]
vl [n]  {x  ql }[n]
12.4.3 Polyphase Rep of Exp (cont.)
To see this indexing structure, look at an example with L = 3:
⁝ ⁝ ⁝ ⁝
 1 y[1] y[2] y[3]
0 y[2] y[1] y[0]
1 y[5] y[4] y[3]
2 y[8] y[7] y[6]
⁝ ⁝ ⁝ ⁝
l
n

v0[n] v1[n] v2
[n]
0 1
2
35/39
36/39
12.4.3 Polyphase Rep of Exp (cont.)
Now… how do we get y[n] from the vl's??
If we interpolate each vl sequence we get (L = 3)….
⋯
y[3]
0 0 y[0] 0 0 y[3] 0 0 y[6] 0 0 ⋯
⋯
y[2]
0 0 y[1] 0 0 y[4] 0 0 y[7] 0 0 ⋯
⋯
y[1]
0 0 y[2] 0 0 y[5] 0 0 y[8] 0 0 ⋯
Now delay these interpolated sequences…
⋯ y[3] 0 0 y[0] 0 0 y[3] 0 0 y[6] 0 0 ⋯
⋯ 0 y[2] 0 0 y[1
]
0 0 y[4] 0 0 y[7] 0 ⋯
To get y[n]: add up the delayed, interpolated components!!
12.4.3 Polyphase Rep of Exp (cont.)
From this we see that we can write…
L1
y[n]  {vl }(L)[n  (L  1)  l]
l 0
Recall: vl [n]  {x  ql }[n]
This leads to the following polyphase implementation for expansion:
37/39
Note: Expansion
Occurs After
Filtering – Efficient!!
12.4.3 Polyphase Rep of Exp (cont.)
An equivalent alternate form of this processing is…
38/39
Skip 12.4.4 Shows how to do polyphase method for
rational rate change of L/M
L h1[n]
x[n] y[n]
h2[n] M
But briefly… to change the rate by factor of
L/M
Interpolate
Decimate
which is equivalent to…
L h[n]
x[n] y[n]
M
Q: How to implement this efficiently using polyphase ideas?
If interested: see Ch.3 of Oppenheim & Lim (on reserve)
39/39

More Related Content

PPT
d0a2de03-27d3-4ca2-9ac6-d83440657a6c.ppt
PDF
Z transform
PPTX
Signals and Systems Homework Help.pptx
PPT
Learn Matlab
PPTX
Controls: Equation (C.1)is a system. A is called the state matrix, of
PPT
The Concurrent Constraint Programming Research Programmes -- Redux (part2)
PPT
haskell5.ppt is a marketing document lol
PPTX
01 - DAA - PPT.pptx
d0a2de03-27d3-4ca2-9ac6-d83440657a6c.ppt
Z transform
Signals and Systems Homework Help.pptx
Learn Matlab
Controls: Equation (C.1)is a system. A is called the state matrix, of
The Concurrent Constraint Programming Research Programmes -- Redux (part2)
haskell5.ppt is a marketing document lol
01 - DAA - PPT.pptx

Similar to IV-05 Polyphase FIlters Revised.pptdfgdb cbx (20)

PDF
1520 differentiation-l1
PPTX
dynamic programming complete by Mumtaz Ali (03154103173)
PDF
Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...
PDF
Complex models in ecology: challenges and solutions
PPTX
R Language Introduction
PPTX
PDF
Lecture_DynamicProgramming test12345.pdf
PPTX
HOME ASSIGNMENT (0).pptx
DOCX
1 PROBABILITY DISTRIBUTIONS R. BEHBOUDI Triangu.docx
DOCX
1 PROBABILITY DISTRIBUTIONS R. BEHBOUDI Triangu.docx
PDF
MUMS: Transition & SPUQ Workshop - Practical Bayesian Optimization for Urban ...
PDF
Faster Interleaved Modular Multiplier Based on Sign Detection
PPTX
HOME ASSIGNMENT omar ali.pptx
PDF
A Tau Approach for Solving Fractional Diffusion Equations using Legendre-Cheb...
PPTX
Deep Learning and TensorFlow
PDF
LINEAR SYSTEMS
PPTX
Deep Learning, Scala, and Spark
PDF
Applied machine learning for search engine relevance 3
PPTX
DSP_FFT_150525.pptx
PPTX
DSP_DiscSignals_LinearS_150417.pptx
1520 differentiation-l1
dynamic programming complete by Mumtaz Ali (03154103173)
Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...
Complex models in ecology: challenges and solutions
R Language Introduction
Lecture_DynamicProgramming test12345.pdf
HOME ASSIGNMENT (0).pptx
1 PROBABILITY DISTRIBUTIONS R. BEHBOUDI Triangu.docx
1 PROBABILITY DISTRIBUTIONS R. BEHBOUDI Triangu.docx
MUMS: Transition & SPUQ Workshop - Practical Bayesian Optimization for Urban ...
Faster Interleaved Modular Multiplier Based on Sign Detection
HOME ASSIGNMENT omar ali.pptx
A Tau Approach for Solving Fractional Diffusion Equations using Legendre-Cheb...
Deep Learning and TensorFlow
LINEAR SYSTEMS
Deep Learning, Scala, and Spark
Applied machine learning for search engine relevance 3
DSP_FFT_150525.pptx
DSP_DiscSignals_LinearS_150417.pptx
Ad

Recently uploaded (20)

PDF
Articulated Dump Truck John Deere 370E 410E 460E Technical Manual.pdf
PPTX
Money and credit.pptx from economice class IX
PDF
Diagnostic Trouble Codes John Deere 370E 410E 460E Technical Manual.pdf
PDF
John Deere 410E II Articulated Dump Truck Service Manual.pdf
PPTX
LESSON 3 Apply Safety Practices mmms.pptx
PDF
Lubrication system for Automotive technologies
PDF
John Deere 410E service Repair Manual.pdf
PDF
harrier-ev-brochure___________________.pdf
PPTX
Moral Theology (PREhhhhhhhhhhhhhhhhhhhhhLIMS) (1).pptx
PDF
book-slidefsdljflsk fdslkfjslf sflgs.pdf
PDF
TM1611 John Deere 410E service Repair Manual.pdf
PPTX
368455847-Relibility RJS-Relibility-PPT-1.pptx
PDF
eti_09_TestPrecedurebdciwbwib wdjkcwnowe wdnwdw
PDF
MES Chapter 3 Combined UNIVERSITY OF VISVESHWARAYA
PPTX
internal combustion engine renewable new
PDF
Volvo EC55 Compact Excavator Service Repair Manual Instant Download.pdf
PDF
System Diagrams John Deere 370E 410E 460E Repair Manual.pdf
PPT
IOT UNIT –II-IT ppt (1).pptsssssddfdfdffdfd
PPTX
description of motor equipments and its process.pptx
PPT
Main/Core Business Application User Manual
Articulated Dump Truck John Deere 370E 410E 460E Technical Manual.pdf
Money and credit.pptx from economice class IX
Diagnostic Trouble Codes John Deere 370E 410E 460E Technical Manual.pdf
John Deere 410E II Articulated Dump Truck Service Manual.pdf
LESSON 3 Apply Safety Practices mmms.pptx
Lubrication system for Automotive technologies
John Deere 410E service Repair Manual.pdf
harrier-ev-brochure___________________.pdf
Moral Theology (PREhhhhhhhhhhhhhhhhhhhhhLIMS) (1).pptx
book-slidefsdljflsk fdslkfjslf sflgs.pdf
TM1611 John Deere 410E service Repair Manual.pdf
368455847-Relibility RJS-Relibility-PPT-1.pptx
eti_09_TestPrecedurebdciwbwib wdjkcwnowe wdnwdw
MES Chapter 3 Combined UNIVERSITY OF VISVESHWARAYA
internal combustion engine renewable new
Volvo EC55 Compact Excavator Service Repair Manual Instant Download.pdf
System Diagrams John Deere 370E 410E 460E Repair Manual.pdf
IOT UNIT –II-IT ppt (1).pptsssssddfdfdffdfd
description of motor equipments and its process.pptx
Main/Core Business Application User Manual
Ad

IV-05 Polyphase FIlters Revised.pptdfgdb cbx

  • 2. 2/39 12.4 Polyphase Filters Polyphase is a way of doing sampling-rate conversion that leads to very efficient implementations. But more than that, it leads to very general viewpoints that are useful in building filter banks. Before we delve into the math we can see a lot just by looking at the structure of the filtering…. ……… Of course, we WILL need to do the math, too, though.
  • 3. Efficient FIR Filtering for Decimation xˆ[n]   x[i] h[n  i] i Filtering : x[i] xˆ[3 ] xˆ[4 ] xˆ[5 ] Decimation : xˆ( M ) [n]  xˆ[nM ]   x[i] h[nM  i] i i = 0 1 2 3 4 5 6 7 8 9 10 11 M = 3 h[7 – i] h[8 – i] h[3 – i] h[4 – i] h[5 – i] h[6 – i] xˆ(3) [1] xˆ(3) [2] Don't Compute Don't Compute 3/39
  • 4. 4/39 Efficient FIR Filtering for Decimation M = 3 i = 0 x[0] x[i] h[6 – i] h[9 – i] h[12 – i] x[1] xˆ(3) [2] xˆ(3) [3] xˆ(3) [4] 1 2 3 4 5 6 7 8 9 10 11 12 x[2] x[3] x[4] x[5] x[6] x[7] x[8] x[9] x[10] x[11] x[12] Original Filter… …gets split into M=3 subfilters: … x[3] x[6] x[9] x[12] … … x[1] x[4] x[7] x[10] … xˆ(3) [3] … Polyphase Form of FIR Decimation Advantage: “Decimate” then Filter h[0] h[3] … x[2] x[5] x[8] x[11] … h[1] h[4] h[0] h[1] h[2] h[3] h[4] h[5] h[2] h[6] … xˆ(3) [2] 
  • 5. x[0] x[3] x[6] x[9] … 0 x[1] x[4] x[7] … 0 x[2] x[5] x[8] …  Polyphase Form of FIR Decimation h[0] h[3] h[1] h[4] h[2] h[6] h[0] h[1] h[2] h[3] h[4] h[5] 3 x[0] x[1] x[2] … xˆ(3) [0] xˆ(3) [1] … 0 0 x[0] x[1] x[2] … Direct Form of FIR Decimation Outputs are the Same 5/39 Inefficient Efficient xˆ(3) [1] … xˆ(3) [0]
  • 6. 6/39 Consider Length-10 Filter w/ M=4 i: 0 1 2 3 4 5 6 7 8 9 h[i]: h[0] h[1] h[2] h[3] h[4] h[5] h[6] h[7] h[8] h[9] 10 11 12 0 0 0 …. Length of Polyphase Filters: ceil{length/M} = ceil{10/4} = 3 i: 0 1 2 p0[i]: p1[i]: p2[i]: h[0] h[1] h[2] h[4] h[5] h[6] h[8] h[9] 0 p3[i]: h[3] h[7] 0 x0[n]: x[0] x[4] x[8] x[12] x[16] …. x1[n]: x[-1] x[3] x[7] x[11] x[15] …. x2[n]: x[-2] x[2] x[6] x[10] x[14] …. x3[n]: x[-3] x[1] x[5] x[9] x[13] …. Example of Polyphase Filters for Decimation
  • 7. 7/39 Matlab Code % Create input signal and filter x=1:21; h=[1 2 3 4 5 6 7 8 9 10 0 0]; % %%%%%% Direct Form (Inefficient) %%%%%% y=filter(h,1,x); % Compute filter output y_dec=y(1:4:end) % Throw away unneeded output samples % %%%%%% Polyphase Form (Efficient) %%%%%% % Select polyphase filters p0=h(1:4:end) p1=h(2:4:end) p2=h(3:4:end) p3=h(4:4:end) % Select polyphase signals x0=x(1:4:end) x1=[0 x(4:4:end)] x2=[0 x(3:4:end)] x3=[0 x(2:4:end)] % filter each polyphase component and add together y_poly_dec=filter(p0,1,x0)+filter(p1,1,x1)+filter(p2,1,x2)+filter(p3,1,x3) Example of Polyphase Filters for Decimation (pt. 2) Pad zeros to make length equal to integer multiple of M Put a zero in front to provide the x[-3], x[-2], and x[-1] terms
  • 8. Efficient FIR Filtering for Interpolation i = 0 1 2 3 4 5 6 7 8 9 10 11 x[0] 0 0 x[1] 0 0 x[2] 0 0 x[3] 0 0 xˆ( L) [n]   x( L) [i] h[n  i] i Interpolation : x(3)[i] h[6 – i] h[7 – i] h[8 – i] h[9 – i] h[10 – i] h[10 – i] L = 3 xˆ(3) [6] xˆ(3) [7] xˆ(3) [8] xˆ(3) [9] xˆ(3) [10] xˆ(3) [11] 8/39
  • 9. xˆ(L) [n]   x[i] h[n  Li] i Interpolation : Efficient FIR Filtering for Interpolation i = 0 1 2 3 x[0] x[1] x[2] x[3] x[i] L = 3 xˆ(3) [6] xˆ(3) [7] xˆ(3) [8] xˆ(3) [9] xˆ(3) [10] xˆ(3) [11] 9/39
  • 10. Efficient FIR Filtering for Interpolation L = 3 Original Filter… h[0] h[1] h[2] h[3] h[4] h[5] The output comes from alternating between the subfilter outputs Advantage Filter then Interpolate 10/39 … gets split into L = 3 subfilters: Polyphase Form of FIR Interpolation …xˆ(3) [6] xˆ(3) [9] … x[0] x[1] x[2] x[3] … The input goes into each subfilter h[0] h[3] …xˆ(3)[7] xˆ(3) [10] … h[1] h[4] … xˆ(3)[8] xˆ(3) [11]… h[2] h[5]
  • 11. 12.4.1 Multirate Identities These provide analysis “tricks” useful when dealing with mathematical analysis of multirate systems. The question in general is: How can we interchange the order of filtering w/ decimation/expansion? Decimation Identity This identity asserts equality between the following 2 systems: Can prove this either in the Time-Domain or Z-Domain M Hz(z) x[n] y[n] Hz(zM)  M x[n] 11/39 y[n] =
  • 12. TD Proof of Decimation Identity M Hz(z) x[n] y[n] For the first system: w[n] = x[nM] y[n]  w[n]* h[n]  h[k ]w[n  k ] k  h[k ]x[(n  k )M ] k For the second system: Gz(z) = Hz(zM)  M x[n] y[n] v[n]  0,  h[n / M ],if n / M  integer g[n]  h(M )[n] By Eq. (12.15) 12/39 ()
  • 13. TD Proof of Decimation Identity (cont.) Then… y[n]  v[nM ]  h[k ]x[(n  k )M ] k Same as for System #1  Proved!!! Thus… v[n]  x[n]* g[n]   g[l]x[n  l] l  h[k ]x[n  kM ] k Use () 13/39
  • 14. 14/39 ZD Proof of Decimation Identity For the second system: Gz(z) = Hz(zM)  M Xz(z) Vz(z) Yz(z) V z (z)  X z (z)H z (z M ) () where… Now… M (z1/ MW m )M  zW mM  z # M_ , e j 2 1 But…  1 M 1 m0  1 M 1 z 1/ M m M V (z WM ) Y z (z)  {V z (z)} (M ) z 1/ M m0 1/ MW m )M ) M W m )H z (( z M M  X (z By ZT Result for Decimation Use ()
  • 15. ZD Proof of Decimation Identity (cont.) 1 z z z 1/ M X (z) (M ) m0 M 1 m0 X (z W m )H z (z) M  H (z) WM )  z z 1/ M m  z Y (z)  M    1 M 1  H (z)  X (z M  Which is clearly the same thing that the first system gives: M Hz(z) Xz(z) 15/39 {Xz(z)}(M) Yz(z)=Hz(z){Xz(z)}(M)
  • 16. Expansion Identity This identity asserts equality between the following 2 systems: L Hz(zL) x[n] y[n] Hz(z) L x[n] 16/39 y[n] Will give only Z-Domain proof here. = w[n] v[n]
  • 17. ZD Proof of Expansion Identity Hz(z) L x[n] y[n] w[n] First system gives: W z (z)  X z (z)H z (z) Then…  X z (z L )H z (z L ) Y z (z)  W z (z)  W z (z L ) (L) v[n] Second system gives: L Hz(zL) x[n] y[n] V z (z)  X z (z)  X z (z L ) (L) Then… Y z (z)  V z (z)H z (z L )  X z (z L )H z (z Same! 17/39
  • 18. 12.4.2 Polyphase Representation of Decimation Now we re-visit this topic and do it mathematically… Basic Math Idea: Re-write convolution sum's index & manipulate to get “parallel” filters: Hz(z)  M x[n] y[n] Recall Decimation: Output given by (12.17) as… y[n]  h[i]x[nM  i] i Write sum's index in “block form” – a common “trick”: () Counts Blocks Counts Samples Inside a Block  18/39  0  m  M  1 i  integer i  iM  m M = Block Size
  • 19. 12.4.2 Polyphase Rep of Dec (cont.) Block-Based Indexing: 2 1 0 m i ⁝ ⁝ ⁝ ⁝ ⁝ ⁝ 1  M  M 1 ⋯  2 1 Each row is 0 0 1 2 ⋯ M 1 indexed forward 1 M M 1 M  2 ⋯ 2M 1 2 2M 2M 1 2M  2 ⋯ 3M 1 ⁝ ⁝ ⁝ ⁝ ⁝ ⁝  ⋯ M 1  0  m  M  1 i  integer i  iM  m Forward Indexing 19/39
  • 20. 12.4.2 Polyphase Rep of Dec (cont.) • Sum up inside each block • Sum up all Block Results Sum all elements in the mth position of each block M 1 20/39  h[iM  m]x[(n  i)M  m] m0 i i m0 (ni)M m M 1 Use Block Indexing in (): y[n]  h[i]x[nM  i] i   h[iM  m]x[n#M– –_iM– – ,m] ()
  • 21. 21/39 12.4.2 Polyphase Rep of Dec (cont.) Now, let's interpret this: Define for each m, 0  m  M-1 m p [i]  h[iM  m] mth Polyphase Component of h[n] Each one is a decimated version of h[n] & the versions are staggered < See Fig. 12.15> 1.7, 0} p0[i]  {1.2, 7, 2} p1[i]  {4, 1, 0} Example n: 0 1 h[n]: 1.2 4 2 3 0.5 7 4 1 5 6 1.7 2 0 0… M=3
  • 22. Fig. 12.15 from Porat’s Book 22/39
  • 23. 12.4.2 Polyphase Rep of Dec (cont.) What have we done? Split up h[n] into M subsequences – where the mth subsequence is a decimated-by-M version of h[n + m] Why the name “Polyphase”? Recall: Time-Shift in TD  Phase-Shift in FD h[n  m]  e jm H f ( )  “Polyphase” 23/39
  • 24. 12.4.2 Polyphase Rep of Dec (cont.) Now… let's chop up the input similarly: um [n]  x[nM  m] ⋯ 2 1 0 ⁝ ⁝ ⁝ ⁝ ⁝ ⁝  1  M  M  1 ⋯  2M  1 0 0  1  2 ⋯  M  1 1 M M  1 M  2 ⋯ 1 2 2M ⋯ M  2 M  1 ⁝ ⁝ ⁝ ⁝ ⁝ ⁝ M  1 m n Differs From Before: Each row is indexed backward 24/39 Backward Indexing
  • 25. 12.4.2 Polyphase Rep of Dec (cont.) Now… back to the mathematical development. Putting these re-indexed versions into (): M 1  pm * um M 1 y[n]  h[iM  m]x[(n  i)M  m] m0 i pm [i]  h[iM  m] um [n]  x[nM  m]       M 1 m0  i   m m p [i ]u [n i ]  y[n]  To Implement Polyphase Decimation • Chop up filter into M sub-filters • Chop up signal into M sub-signals • Filter each sub-signal w/ a sub-filter • Add outputs point-by-point 25/39
  • 26. 12.4.2 Polyphase Rep of Dec (cont.) Two equivalent ways to think of this: <This is Fig. 12.16 from Porat's Book> First Way (shown for M=3): Note that Decimation occurs Before Filtering – Efficient!!! 26/39
  • 27. 12.4.2 Polyphase Rep of Dec (cont.) 27/39 <This is Fig. 12.17 from Porat's Book> Second Way to View It (shown for M=3):
  • 28. 28/39 12.4.2 Polyphase Rep of Dec (cont.) Now we re-analyze this set-up, but in the Z-Domain…. Why? ….It provides further analysis insight. Z-Domain results often provide insight into how to: • Derive other results • Design Polyphase Filters • Etc.
  • 29. 12.4.2 Polyphase Rep of Dec (cont.) Recall Example: p0 [i]  {1.2, 7, 2} p1[i]  {4, 1, 0} p0 [i]  {0.5, 1.7, 0} Expansion! First…. some time-domain trickery: How do we get back h[n] from the pm[n]??? 1. Insert M-1 zeros between each sample 2. “Line them up” using delays 2, 0, 0} 0, 0, 0} 0, 0, 0} {1.2, 0, 0, 7, 0, 0, { 4, 0, 0, 1, 0, 0, {0.5, 0, 0, 1.7, 0, 0, 0, 0, 7, 0, 0, 2, 0, 0} { 0, 4, 0, 0, 1, 0, 0, 0, 0} { 0, 0, 0.5, 0, 0, 1.7, 0, 0, 0} {1.2, h[n]  {1.2, 4, 0.5, 7, 1, 1.7, 2, 0, 0} 3. Add them up 29/39
  • 30. 12.4.2 Polyphase Rep of Dec (cont.) Thus…. M 1 m0 h[n]  {pm }[n  m] ( M ) So…. in Z-Domain we have: M 1  m m z M z z P (z ) H (z)  Delay Expand m0 Now… filter/decimate looks like this: Hz(z)  M Xz(z) Yz(z) Vz(z) M 1 m0  m m z M z  V z (z)  X z (z)H z (z) ) X (z) z P (z 30/39
  • 31. 12.4.2 Polyphase Rep of Dec (cont.) M 1 m0 M 1 m0 (M ) m z M 1 m0  {z m Pz (z M ) X z (z)}(M ) … and after M we get: Y z (z)  {V z (z)}(M )   ( M ) Pz ( z){zm X z ( z)} z z m m P (z)U (z) z m X (z)} P (z){z U z ( z) m m # – – m – – _ – – – – , # – –– _ – – –, Hz(z)  M Xz(z) Yz(z) Vz(z) By the “Decimation Identity” By Definition Signal's Polyphase Components ….which is the Z-Domain Description of the polyphase decimation structure. We have now developed two different derivations of the polyphase structure. 31/39
  • 32. 12.4.3 Polyphase Rep of Expansion L Hz(z) x[n] 32/39 y[n] Recall Expansion: Output given by (12.19) as… y[n]   x[i]h[n  Li] i Re-Index using:  0  l  L  1 n  n  nL  (L  1)  l integer # – _ –, "backwards" n’ = Block Index l = In-Block Index (indexes backward through block)
  • 33. ⁝ ⁝ ⁝ ⁝ ⁝ ⁝  1  1  2 ⋯  L 0 L  1 L  2 L  3 ⋯ 0 1 2L  1 2L  2 2L  3 ⋯ L 2 3L  1 3L  2 3L  3 ⋯ 2L ⁝ ⁝ ⁝ ⁝ ⁝ ⁝ 2 ⋯ L  1 l n  1 0 12.4.3 Polyphase Rep of Exp (cont.)  33/39 0  l  L  1 n  n  nL  (L  1)  l integer # – _ –, "backwards" Expansion Re-Index Table
  • 34. 34/39 12.4.3 Polyphase Rep of Exp (cont.) Using this re-indexing gives… y[n]   x[i]h[n  Li] i y[n# L––(_L –1–) ,l]   x[i]h[n# L––(_L –1–) ,l  Li] i n  x[i]h[(n  i)L  (L  1)  l] i n … for each l, this indexing just reads down a column of the “Expansion Re-Index Table” For each l such that 0  l  L – 1 we define: ql [n]  h[nL  (L  1)  l] vl [n]  y[nL  (L  1)  l] vl [n]  {x  ql }[n]
  • 35. 12.4.3 Polyphase Rep of Exp (cont.) To see this indexing structure, look at an example with L = 3: ⁝ ⁝ ⁝ ⁝  1 y[1] y[2] y[3] 0 y[2] y[1] y[0] 1 y[5] y[4] y[3] 2 y[8] y[7] y[6] ⁝ ⁝ ⁝ ⁝ l n  v0[n] v1[n] v2 [n] 0 1 2 35/39
  • 36. 36/39 12.4.3 Polyphase Rep of Exp (cont.) Now… how do we get y[n] from the vl's?? If we interpolate each vl sequence we get (L = 3)…. ⋯ y[3] 0 0 y[0] 0 0 y[3] 0 0 y[6] 0 0 ⋯ ⋯ y[2] 0 0 y[1] 0 0 y[4] 0 0 y[7] 0 0 ⋯ ⋯ y[1] 0 0 y[2] 0 0 y[5] 0 0 y[8] 0 0 ⋯ Now delay these interpolated sequences… ⋯ y[3] 0 0 y[0] 0 0 y[3] 0 0 y[6] 0 0 ⋯ ⋯ 0 y[2] 0 0 y[1 ] 0 0 y[4] 0 0 y[7] 0 ⋯ To get y[n]: add up the delayed, interpolated components!!
  • 37. 12.4.3 Polyphase Rep of Exp (cont.) From this we see that we can write… L1 y[n]  {vl }(L)[n  (L  1)  l] l 0 Recall: vl [n]  {x  ql }[n] This leads to the following polyphase implementation for expansion: 37/39 Note: Expansion Occurs After Filtering – Efficient!!
  • 38. 12.4.3 Polyphase Rep of Exp (cont.) An equivalent alternate form of this processing is… 38/39
  • 39. Skip 12.4.4 Shows how to do polyphase method for rational rate change of L/M L h1[n] x[n] y[n] h2[n] M But briefly… to change the rate by factor of L/M Interpolate Decimate which is equivalent to… L h[n] x[n] y[n] M Q: How to implement this efficiently using polyphase ideas? If interested: see Ch.3 of Oppenheim & Lim (on reserve) 39/39