# Understanding spectra in polyphase filter banks

I'm trying to fully understand the spectral effects in a polyphase channelizer / polyphase analysis filter bank. I don't really have a signal processing background, so please excuse some incorrect terminology ;-).

So let's consider a very simple case with two output channels. I'll be referring to Polyphase Channelizer Demystified [Lecture Notes] in this question. Let's start with this block diagram: and this input spectrum: I want to understand what spectra at A1, A2, B1 and B2 look like. So obviously as the input signal is sampled we have a repeating spectrum somewhat depicted in the graph above (showing one repeated half of the grey channel on each side) the paper explains downsampling by factor 2 will scale the signals by factor 1/2 and linearly add one shifted version.

At A1 we have such a simple down-sampling operation, so we should get this: the signal is downsampled by factor 2, so we have a new sample frequency. Still, the linearly combined signal is plausible, as the spectrum repeats according to the new output sample rate.

Equation (6) and (7) in the paper describe the spectrum of a downsampled signal with one unit delay. This should be the signal B1 and it should look like this: However, this is not plausible, as the signal spectrum does not repeat properly according to the new sample frequency. What did I miss here?

The next question is: What is the effect of the downsampled filter phases? The filter-downsampling will lead to a 'repeated spectrum' filter transfer function as well, correct? So is this correct for A2?: And what's the effect of the offset/shift of the filter coefficients in p1 caused by the polyphase partition?

Now if we only add up the Nyquist band of the A1 and B1 pictures we end up with the orange spectrum representing channel 0. If we do the same but with a phase shift A1 and -B1 gives the grey spectrum, channel 1. So the end result is plausible, but the intermediate signal at B1 is not.

EDIT: To add some equations to this topic: According to R. E. Crochiere and L. R. Rabiner. Multirate Digital Signal Processing, pp. 84–88

Filter partitions: $p_\rho(n) = h(nM + \rho)$

Equation for polyphase branches: $x_\rho(n) = x(nM - \rho)$

• A (n almost) full exposition would require downsampling and upsampling operations and their spectral results... Do you have these necessary tools ? – Fat32 Aug 8 '17 at 19:19
• Yes, I think I'd understand that. At least to the degree explained here: dsprelated.com/freebooks/sasp/Upsampling_Downsampling.html – jpf Aug 8 '17 at 19:39
• That's very adequate. If you don't have a very specific question then you already know how a polyphase filter structure works. May be you have doubts about aliasing caused by downsampling and its cancellation ? – Fat32 Aug 8 '17 at 19:53
• I understand how aliasing caused by downsampling works but I don't really understand the spectral effect of adding an additional sample delay (as added by the commutator in the polyphase channelizer or by partitioning the filter). Just to reiterate - When partitioning the prototype filter branch 0, this is equivalent to downsampling. So we just get spectral repetition of the filter which is what we expect anyway for a filter operating at lower sample rate? The main question is then, how are the phases affected at e.g. point B1 and B2? Consider the B1 image I posted which can't be correct. – jpf Aug 8 '17 at 20:26
• ok good. May I kindly ask if you can provide a more mathematical analysis of this system and show us where this delay is entering into the system input and filters, so that one can more clearly see which phase effect you are referring to... because admittedly I cannot see the delay there ? Can you please put your supposed analysis and indicate us at which step comes the (mathematical) confusion, because I don't feel clear at the moment. May be someone with more careful eyes can catch it, but I cannot at the moment. – Fat32 Aug 8 '17 at 20:39

Since you define the input to the filter $p_1[n]$ as $x_1[n]=x[2n-1]$ and the channel impulse response as $p_1[n] = p[2n+1]$ the spectrum at the output of that channel will be as follows:

First express $X_1(e^{j\omega})$, the DTFT of the input to the channel no 1.

$$x[n] \longrightarrow \boxed{z^{-1}} \longrightarrow v[n]=x[n-1] \longrightarrow \boxed{\downarrow2} \longrightarrow w[n]=x[2n-1]$$

Now as can be seen, $V(e^{j\omega}) = X(e^{j\omega}) e^{-j\omega}$ and also $W(e^{j\omega}) = \frac{1}{2} \sum_{k=0}^{1} V( e^{j( \frac{\omega-2\pi k}{2} ) })$ When combined it yields;

$$X_1(e^{j\omega}) = \frac{1}{2} \sum_{k=0}^{1} X( e^{j( \frac{\omega-2\pi k}{2} ) }) e^{-j( \frac{\omega-2\pi k}{2} )}$$

In this case

$$X_1(e^{j\omega}) = \frac{1}{2} e^{-j\frac{\omega}{2}} \cdot(X(e^{j\frac{\omega}{2}}) - X(e^{j(\frac{\omega}{2} - \pi)}))$$

Note: This is where the linked paper an therefore image four in the question is confusing. It does not include the linear phase part $e^{-j\frac{\omega}{2}}$ in equation (7). Without this linear phase part, as mentioned in the question, the signal is not a valid factor two down sampled signal. The phase term 'fixes' the equation to make the phase 'repeat' properly according to the new sample frequency.

That's the signal spectrum, and the filter spectrum similarly is:

$$h[n] \longrightarrow \boxed{z^{1}} \longrightarrow v[n]=h[n+1] \longrightarrow \boxed{\downarrow2} \longrightarrow w[n]=h[2n+1]$$

$$H_1(e^{j\omega}) = \frac{1}{2} \sum_{k=0}^{1} H( e^{j( \frac{\omega-2\pi k}{2} ) }) e^{j( \frac{\omega-2\pi k}{2} )}$$

In this case $$H_1(e^{j\omega}) = \frac{1}{2} e^{j\frac{\omega}{2}} \cdot(H(e^{j\frac{\omega}{2}}) - H(e^{j(\frac{\omega}{2} - \pi)}))$$

Note: The linear phase term has opposite sign to the phase term in $X_1$ so these terms will cancel each other when we multiply $X_1$ and $H_1$.

Hence the spectrum at $B_2$ is:

$$B_2(e^{j\omega}) = H_1(e^{j\omega}) X_1(e^{j\omega})$$ $$B_2(e^{j\omega}) = \left( \frac{1}{2} \sum_{k=0}^{1} H( e^{j( \frac{\omega-2\pi k}{2} ) }) e^{j( \frac{\omega-2\pi k}{2} )} \right) \left( \frac{1}{2} \sum_{k=0}^{1} X( e^{j( \frac{\omega-2\pi k}{2} ) }) e^{-j( \frac{\omega-2\pi k}{2} )} \right)$$

in this case:

$$B_2(e^{j\omega}) = \frac{1}{4} \cdot (X(e^{j\frac{\omega}{2}})H(e^{j\frac{\omega}{2}}) - X(e^{j\frac{\omega}{2}})H(e^{j(\frac{\omega}{2} - \pi)}) -X(e^{j(\frac{\omega}{2} - \pi)})H(e^{j\frac{\omega}{2}}) + X(e^{j(\frac{\omega}{2} - \pi)})H(e^{j(\frac{\omega}{2} - \pi)}))$$

For $A_2$:

$$A_2(e^{j\omega}) = \frac{1}{4} \cdot (X(e^{j\frac{\omega}{2}})H(e^{j\frac{\omega}{2}}) + X(e^{j\frac{\omega}{2}})H(e^{j(\frac{\omega}{2} - \pi)}) +X(e^{j(\frac{\omega}{2} - \pi)})H(e^{j\frac{\omega}{2}}) + X(e^{j(\frac{\omega}{2} - \pi)})H(e^{j(\frac{\omega}{2} - \pi)}))$$

Note that the aliasing cancellation happens at the reconstruction part of the system: As can now be seen $A_2 + B_2$ results in one channel, whereas $A_2 - B_2$ will produce the other channel.

• Reviewing this I now fully understand the involved spectra. My main difficulty was understanding the $B1$ spectra. I think equation (7) in the linked paper is just wrong as it does not include the linear phase term. Without this term the spectrum does not repeat according to the lower sample frequency so that's what caused my confusion there. Now I also finally understand what causes the linear phase terms in the polyphase branches and also what cancels these. I've edited the answer and I hope I didn't make any stupid mistake when expanding the equations ;-) Thanks a lot for your help! – jpf Aug 9 '17 at 7:26
• @jpf I'm glad I could help. I've also accepted your nice edit, thanks for that as well. I haven't explicitly checked that equation (7) , but if you say so, then there could possibly be a typo there (may be it's corrected in an errata or you could even ask it to the original author of the paper, he would give you the best answer I believe) Anyway, I'm glad that now you have clarified your doubts about the polyphase filterbanks... – Fat32 Aug 9 '17 at 10:46