Thursday, March 28, 2019

Farrow fractional delay filter - Range of delay?


I am implementing a fractional delay for resampling purposes, using the Farrow structure to enable continuously variable delays. For now I am simply using windowed sinc functions as my low-pass filters. My method was originally as follows:



  1. Create a series of $K$ $N$-sample windowed sinc functions covering the delay range: $N/2-1$ to $N/2$, and all the fractional delay values ($d$) in between.

  2. For each sample across all the filters, create a $K-1^{th}$ order polynomial in d to replace the coefficients.

  3. Stick the poynomial coefficients into a Farrow structure filter, and Bob's your uncle.


However, on reading some papers this for example, it became apparent that I need to consider the "overall filter"; all the separate polyphase branch filters from the farrow structure lumped together. Now, taking this into account, if I crate my individual filters as above, ranging from $N/2-1$ to $N/2$, then I have a problem, as shown in the image. The "overall filter" is not a nice lowpass function anymore. Essentially it the two filters at $N/2-1$ and $N/2$ are the same, just delayed 1 sample, so we get the reptition of values shown in the plot.



Bad sinc


My attempt at solving this is instead to create my initial filters over the range N/2-1+0.5/K : N/2-0.5/K. This way, they are still evenly distributed in terms of delay and now the "overall filter" looks great:


Good sinc (yes I know it's not windowed :)


BUT... now my delays do not cover a full sample of fractional delay, but instead $1-1/K$ samples. The only way to approach a full 1-sample range is to increase $K$, the number of filters created at the start, and this is not ideal as it just increases computation and I am VERY restricted in that sense.


I also tried a second approach, creating $K$ original filters, then approximating with an $L^{th}$ order polynomial, where $L < K$. This allows me to create a large ($K$) number of filters to start with, so I can get very close to the full N/2-1 : N/2 range, then approximate with a low order polynomial. This is OK, but it does introduce some unwanted artefacts into the "overall filter" response.




So, my questions is this: Is there a way to have it all; a low-order farrow fractional delay filter, that covers the full range of a sample delay, without introducing any nasties into the frequency response of the "overall filter"?


Any thoughts welcome :)


P.S. I know the sinc functions in the plots are rectangular windowed and thus have a high sidelobes, but this is not my problem.




No comments:

Post a Comment

digital communications - Understanding the Matched Filter

I have a question about matched filtering. Does the matched filter maximise the SNR at the moment of decision only? As far as I understand, ...