channeliser of Polyphase filter followed by FFT
Started by 1 month ago●16 replies●latest reply 4 weeks ago●189 viewsHi,
I have never done a channeliser. I can understand the classic method of "shift each channel to dc and filter/decimate" or use bandpass filter). I am trying to understand the alternative design using polyphase filter (PF) followed by FFT.
I was happy to see this document https://cdrdv2-public.intel.com/650298/versatile-c...
from Intel but upon some thought and simple modelling I feel it doesn't make sense. I am focused on page 2 only. In particular this below statement:
How can phase be so rotated by polyphases as to cancel out except for the baseband.
Can someone please also shed some light on this PF => FFT architecture.
Thanks
There are quite a few fred harris presentations. But I'll admit I didn't really understand how they worked until I had to implement one myself. But yes, on its face it sure looks like witchcraft.
Do you have access to Matlab? Fred has this animated matlab script showing the "arms" of the phases walking around as an input tone moves from one channel to the next.
The short answer is that all the added phases cancel out except for the channel the signal is in.
Another way to think about it is the prototype baseband filter. In channel 0 (DC) the filter has not moved. So you filter 1st and then decimate. The filter design is important as all of the frequency bands will fold back on top. So your stop band should continue to roll off as 1/f rather than equ-ripple.
In channel 1 the filter has been rotated using a complex exponential to the center of channel 1. The signal is filtered with the rotated response and then decimated. It therefore aliases into the decimated base band of that channel. Or you can consider that the input signal has been rotated 1st, filtered and then decimated.
FWIW,
Mark Napier
Thanks Mark
I normally avoid reading external code as it drags me sideways. I am more interested in worded description of concepts.
I generated 5 complex tones at (0, .01, 0.02, ,03, .04) of Fs of 1. Applied 5 polyphases and then added up the results. There is some attenuation of tones away from dc. But nothing to fit the term "Cancel out".
Or just imagine a sine wave, decimate to get samples 0, 1, 2, 3, 4 on the 5 filtered versions. Add up then it can only cancel out if it is rotated 180 degrees (for sine waveform).
Hi Mark,
I don't get it really when you say:
"Another way to think about it is the prototype baseband filter. In channel 0 (DC) the filter has not moved. So you filter 1st and then decimate. The filter design is important as all of the frequency bands will fold back on top. So your stop band should continue to roll off as 1/f rather than equ-ripple.
In channel 1 the filter has been rotated using a complex exponential to the center of channel 1. The signal is filtered with the rotated response and then decimated. It therefore aliases into the decimated base band of that channel. Or you can consider that the input signal has been rotated 1st, filtered and then decimated."
Unfortunately, the Intel statement talks about adding the polyphase outputs. These are just polyphases of prototype filter and no rotation is implied at this filtering stage. It just decimates the input into a number of streams.
The FFT supplies the rotation. Each channel is rotated to baseband, filtered, and then decimated. On a high level that is what happens.
The amazing clever part is that decimation happens 1st. Then the filter is run on the multiple decimated legs. The output of those phases are input to the FFT. Then the FFT does the sum of all the poly-phases and rotates each channel to base-band. Pure Magic.
Mark Napier
I am sure it can't be magic.
My question is about the statement of Intel per se, before any rotation by mixing or FFT. It just refers to the outputs of polyphase filters ahead of any further processing.
The statement says "If the outputs of PF are summed up ...etc"
Yes, it is magic of the Noble variety.
From a mechanics point of view, you need a long tap delay and a few multipliers followed by an FFT. (or IFFT, depending on how you arrange the data)
Lets say, for instance, you want a 128 phase channelizer. For simplicity say it also decimates by 128. This is known as a Maximally Decimated Filter Bank.
Design a prototype FIR low pass filter. The length of the filter should be a multiple of 128. If I use 4 multipliers then the filter would need to be 512 taps. The approximate cut off of the filter will be 1/2 the channel width. The two-sided width will be the channel width.
The tap delay (memory) is accessed in a spiral fashion. The first input into the FFT is the current sample + the 128_th + the 256_th + the 384_th all times their respective tap weights.
X0 = x(n)*w0 + x(n-128)*w128 + x(n-256)*w256 + x(n-384)*w384
X1 = x(n-1)*w1 + x(n-129)*w129 + x(n-257)*w257 + x(n-385)*w385
....
X127 = x(n-127)*w127 + x(n-255)*w255 + x(n-383)*w383 + x(n-511)*w511
x = input samples (could be complex, probably so for most systems)
X = inputs to the FFT/IFFT
w = tap weights of the FIR.
After the FFT computation move the input shift register by 128 samples. So one FFT every 128 input samples.
Each FFT output bin is one sample of that channel. Each successive FFT provides one more sample. It is doing this for all 128 channels at the same time. Magic.
Try it yourself.
Mark Napier
PS. Fred Harris says that the filter should be odd length, so 511 taps rather than 512 in this case. Say make the trailing tap w511 = 0; For my application I couldn't tell the difference.'
Thanks Mark,
I have this Octave code for 16 channels, each a single complex tone, 16 polyphases, each 8 taps. (I also tried your figures of 128 channels but are excessive for my platform).
I focus on the summed filtered output for now before checking FFT.
In particular I focus on the dc channel as it does not need any rotation. I can't see a clean channel 0 at summed filter output.
Can you please advise what is missing.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear; pkg load signal
n = 16*500; %total input samples
f = -.001*8; %normalised first tone
for i = 1:16
ch(i,:) = exp(j*2*pi*(0:n-1)*f);
f = f + 0.001;
end
x = sum(ch); %input signal
%16 polyphases, each 8 taps
h = fir1(126,2*0.008);
for i = 1:16
p(i,:) = filter(h(i:16:end),1,x(i:16:end));
end
figure; plot(abs(fft(x))); %input channels
figure; plot(abs(fft(sum(p)))); %polyphase sum
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Hello kaz,
I think you need a nested loop. Increment through your input array like j2 = 1:16:n; something like that.
Then compute your phases. Each one has eight taps. Take the FFT of your 16 phases to produce 16 outputs and append them your channel output array. Keep going. You will wind up with a size(16,500) array with each row being an output channel.
Also, it is hard for me to see what the frequences are. I always define a sample rate Fs. Then design using the actual frequencies so I can verify where the cut offs are.
For instance, say Fs = 16e6; % 16 MHz
Fs/2 -> 8Mhz
16 channels are distributed around the unit circle. One is centered at DC. One is centered on the Nyquist frequency, Fs/2.
The channel width is
Fw = Fs/16; % 1 MHz
Fw is also the channel spacing center to center.
The low pass cut off frequency is 1/2 the channel width.
fc = Fw/2;
Your pass band edge will depend on your filter length and your desired attenuation. For the sake of an example:
fb = fc * (2/3);
Design your FIR for length 8*16;
Hope this helps,
Mark Napier
Thanks Mark,
I see my above code working after modifying with your division of Nyquist to sub-bands.
Thus, the Intel document is very misleading as it doesn't specify such critical condition. Instead, I assumed I can use any arbitrary sub-bands as I wished within any part of Nyquist.
Hello
please refer to the tutorial paper written which was published in IEEE Signal Processing Magazine Jan 2016. The link is given below
https://ieeexplore.ieee.org/abstract/document/7366712
Polyphase Channelizer Demystified [Lecture Notes]
in this lecture note we have illustrated the effect of the polyphase paths which give a different phase shift to each arm and the FFT which combines the outputs from each polyphase arm by applying the appropriate phase rotation. the outputs from the FFT bins will cancel depending on the phase shifts and respective rotations
Murali
Hi Kaz + all,
The attached pdf is my favorite (most intuitive) way to visualize the polyphase channelizer. The development starts with the traditional polyphase decimation filter and ends with the polyphase channelizer (familiarity with polyphase decimation filters is assumed). I hope it is helpful.This is the first time I've attempted to upload a pdf to this site, so hope it works!
PeteHi Mark + all,
According to Intel document, the input switching and FFT/iFFT are as below:
According to Harris video of your link:
according to a website referring to Harris:
They are different but it could be valid issues to do with channel mapping.
Similar difference is there in synthesis channelisers.
Any thoughts.
I noticed that too. Looking at my example it follows the picture in the Harris presentation. FWIW it does work. If you really want to go deeper there is a dissertation you might be interested in. It is a compendium on the subject.
Xiaofei Chen “Non-Maximally Decimated Filter Bank and Its Applications in Wideband Signal Processing,” Dissertation with Fred Harris on committee.
https://digitalcollections.sdsu.edu/search?search_...
https://digitalcollections.sdsu.edu/do/fe3cacb9-b7...
Thanks Mark,
I have now an Octave model for analysis and synthesis that shows some good points. whether the commutator goes one way or the other and whether we use FFT or iFFT it affects "only" channel mapping as far as I notice.
In summary I learned:
1) The bandwidth must be split up equally across all digital domain.
2) Though we use FFT/iFFT it is really neither in the true sense.
We are not moving between time/frequency domain but exploiting the mixing addition of these engines instead of using explicit NCOs and adders. We are "fooling" the FFT. A channel is not FFTed into its frequency bin but all the channels are arranged across one FFT frame and so each is multiplied by the negative frequency generated internally by the engine then added. If FFT is direct i.e. not butterfly architecture then this approach does not seem to offer any benefit to save resource.
3) My model fails to recover random input as opposed to well defined sub bands. It could be aliasing or overlapping issues.
In practice the channelizer allows you to break up a wide band signal and operate on it at a lower sample rate. The design of the filter will determine how it operates. In my example the stop band starts right at the channel edge. For the reconstruction application the analysis filter has the 3dB point at the channel edge to allow for overlap. Also it is Non-Maximally Decimated by a factor of 2 in the examples I saw.
In my application the channelizer is used to serialize a band of frequency-hopping transmitters. It is extremely efficient.
FWIW,
Mark Napier