DSPRelated.com
Forums

Fractional Time-Delays

Started by Unknown March 1, 2007
How do I simulate fractional delays - etc z^(alpha) where alpha is non-
integer eg -5.67 or whatever.


Thanks

F.

On Mar 1, 1:24 pm, minfitl...@yahoo.co.uk wrote:
> How do I simulate fractional delays - etc z^(alpha) where alpha is non- > integer eg -5.67 or whatever. > > Thanks > > F.
Interpolate.
On Mar 1, 1:24 pm, minfitl...@yahoo.co.uk wrote:
> How do I simulate fractional delays - etc z^(alpha) where alpha is non- > integer eg -5.67 or whatever. > > Thanks > > F.
Look up Farrow structures. There is plenty of info online. John
On Mar 1, 3:15 pm, sampson...@gmail.com wrote:
> On Mar 1, 1:24 pm, minfitl...@yahoo.co.uk wrote: > > > How do I simulate fractional delays - etc z^(alpha) where alpha is non- > > integer eg -5.67 or whatever. > > > Look up Farrow structures. There is plenty of info online.
"Farrow structures" is a pretty obscure method. i googled it and got Julius's Bandlimited Interpolation page right away (which is a very good general resource on the topic). to the OP, i would suggest imaging what the continuous-time reconstructed output would be given the discrete samples and then resample that reconstructed output at n-5.67 (or whatever) where "n" is the current sample. conceptually, it's pretty straight forward. r b-j
On Mar 1, 7:15 pm, "robert bristow-johnson"
<r...@audioimagination.com> wrote:
> On Mar 1, 3:15 pm, sampson...@gmail.com wrote: > > > On Mar 1, 1:24 pm, minfitl...@yahoo.co.uk wrote: > > > > How do I simulate fractional delays - etc z^(alpha) where alpha is non- > > > integer eg -5.67 or whatever. > > > Look up Farrow structures. There is plenty of info online. > > "Farrow structures" is a pretty obscure method. i googled it and got > Julius's Bandlimited Interpolation page right away (which is a very > good general resource on the topic). > > to the OP, i would suggest imaging what the continuous-time > reconstructed output would be given the discrete samples and then > resample that reconstructed output at n-5.67 (or whatever) where "n" > is the current sample. conceptually, it's pretty straight forward. > > r b-j
Really? I thought it was pretty common. Matlab has a Farrow routine in the filter design toolbox. If you google "farrow fractional delay" instead you will get more relevant content. John
robert bristow-johnson wrote:
> On Mar 1, 3:15 pm, sampson...@gmail.com wrote: >> On Mar 1, 1:24 pm, minfitl...@yahoo.co.uk wrote: >> >>> How do I simulate fractional delays - etc z^(alpha) where alpha is non- >>> integer eg -5.67 or whatever. >> >> Look up Farrow structures. There is plenty of info online. > > "Farrow structures" is a pretty obscure method. i googled it and got > Julius's Bandlimited Interpolation page right away (which is a very > good general resource on the topic). > > to the OP, i would suggest imaging what the continuous-time > reconstructed output would be given the discrete samples and then > resample that reconstructed output at n-5.67 (or whatever) where "n" > is the current sample. conceptually, it's pretty straight forward.
Obscure? Farrow is a name you meet all the time in comms, for arbitrary phase shifting. Steve
On Mar 1, 8:07 pm, Steve Underwood <ste...@dis.org> wrote:
> robert bristow-johnson wrote: > > On Mar 1, 3:15 pm, sampson...@gmail.com wrote: > >> On Mar 1, 1:24 pm, minfitl...@yahoo.co.uk wrote: > > >>> How do I simulate fractional delays - etc z^(alpha) where alpha is non- > >>> integer eg -5.67 or whatever. > > >> Look up Farrow structures. There is plenty of info online. > > > "Farrow structures" is a pretty obscure method. i googled it and got > > Julius's Bandlimited Interpolation page right away (which is a very > > good general resource on the topic). > > > to the OP, i would suggest imaging what the continuous-time > > reconstructed output would be given the discrete samples and then > > resample that reconstructed output at n-5.67 (or whatever) where "n" > > is the current sample. conceptually, it's pretty straight forward. > > Obscure? Farrow is a name you meet all the time in comms, for arbitrary > phase shifting.
i guess i'm not a comms guy. when i think of setting up the problem of either fractional delay (here assuming a relatively constant delay parameter) or resampling (SRC), i think pretty fundamentally of hypothetically reconstructing the continuous time waveform from the samples x[n] = x(n*T) +inf x(t) = SUM{ x[m] * sinc((t-m*T)/T) } m=-inf of course it's clear that x(n*T) = x[n] for integer n. then +inf y[n] = x(n*T + d) = SUM{ x[n+m] * sinc((d-m*T)/T) } m=-inf and here is when you start approximating (the Farrow structure *must* have some approximation, too), you restrict the summation to terms around sample x[n] (i'm assuming 0 <= d < T) +N/2 y[n] = SUM{ x[n+m] * sinc((d-m*T)/T) } m=-N/2+1 for some even N. that is, of course, applying a rectangular window to the ideal impulse response, thesinc() function, so we may as well generalize it a little: +N/2 y[n] = SUM{ x[n+m] * sinc(d/T - m) * w((d/T-m)/(N/2)) } m=-N/2+1 where the window function w(u) is 1 for u=0 and tapers to zero at u= +/- 1. i'm pretty sure that no matter how you do the interpolation (Lagrange or Hermite polynomials, etc.) that in any case where the N samples surrounding the fractional sample are used and if the fractional delay goes to 0 or T, you get the same output as you would for an integer sample delay (y[n] = x[n] or x[n-1]), in that case, i done care how you did it, the solution fits the form above and the solution may very well determine the nature of the window. now B-splines do NOT have the property that as "d" goes to 0 or T you get x[n] or x[n-1] (they give you better image rejection but they do so at the cost of LPFing your data), so i am not sure that Farrow structures have this property either and fit the form above. but in any case, you have a set of FIR coefficients for every fractional delay "d" of interest. above, those coefs would look like sinc(d/T-m) * w((d/T-m)/(N/2)) for -N/2 < m <= +N/2 for each set of FIR coefs, you can come up with a frequency response that you hope is flat unity gain over the frequency range of interest and reasonably constant group or phase delay (that equals "d") over the frequency range of interest. so, i do not see any design specing for this Farrow structure, except for how many values of fractional delay you solve the set of equations for and your FIR length. is there any design spec that you can manipulate and tradeoff? i'm just curious. r b-j
On Mar 1, 8:53 pm, "robert bristow-johnson"
<r...@audioimagination.com> wrote:
> On Mar 1, 8:07 pm, Steve Underwood <ste...@dis.org> wrote: > > > > > robert bristow-johnson wrote: > > > On Mar 1, 3:15 pm, sampson...@gmail.com wrote: > > >> On Mar 1, 1:24 pm, minfitl...@yahoo.co.uk wrote: > > > >>> How do I simulate fractional delays - etc z^(alpha) where alpha is non- > > >>> integer eg -5.67 or whatever. > > > >> Look up Farrow structures. There is plenty of info online. > > > > "Farrow structures" is a pretty obscure method. i googled it and got > > > Julius's Bandlimited Interpolation page right away (which is a very > > > good general resource on the topic). > > > > to the OP, i would suggest imaging what the continuous-time > > > reconstructed output would be given the discrete samples and then > > > resample that reconstructed output at n-5.67 (or whatever) where "n" > > > is the current sample. conceptually, it's pretty straight forward. > > > Obscure? Farrow is a name you meet all the time in comms, for arbitrary > > phase shifting. > > i guess i'm not a comms guy. when i think of setting up the problem > of either fractional delay (here assuming a relatively constant delay > parameter) or resampling (SRC), i think pretty fundamentally of > hypothetically reconstructing the continuous time waveform from the > samples x[n] = x(n*T) > > +inf > x(t) = SUM{ x[m] * sinc((t-m*T)/T) } > m=-inf > > of course it's clear that x(n*T) = x[n] for integer n. > > then > > +inf > y[n] = x(n*T + d) = SUM{ x[n+m] * sinc((d-m*T)/T) } > m=-inf > > and here is when you start approximating (the Farrow structure *must* > have some approximation, too), you restrict the summation to terms > around sample x[n] (i'm assuming 0 <= d < T) > > +N/2 > y[n] = SUM{ x[n+m] * sinc((d-m*T)/T) } > m=-N/2+1 > > for some even N. that is, of course, applying a rectangular window to > the ideal impulse response, thesinc() function, so we may as well > generalize it a little: > > +N/2 > y[n] = SUM{ x[n+m] * sinc(d/T - m) * w((d/T-m)/(N/2)) } > m=-N/2+1 > > where the window function w(u) is 1 for u=0 and tapers to zero at u= > +/- 1. > > i'm pretty sure that no matter how you do the interpolation (Lagrange > or Hermite polynomials, etc.) that in any case where the N samples > surrounding the fractional sample are used and if the fractional delay > goes to 0 or T, you get the same output as you would for an integer > sample delay (y[n] = x[n] or x[n-1]), in that case, i done care how > you did it, the solution fits the form above and the solution may very > well determine the nature of the window. now B-splines do NOT have > the property that as "d" goes to 0 or T you get x[n] or x[n-1] (they > give you better image rejection but they do so at the cost of LPFing > your data), so i am not sure that Farrow structures have this property > either and fit the form above. > > but in any case, you have a set of FIR coefficients for every > fractional delay "d" of interest. above, those coefs would look like > > sinc(d/T-m) * w((d/T-m)/(N/2)) for -N/2 < m <= +N/2 > > for each set of FIR coefs, you can come up with a frequency response > that you hope is flat unity gain over the frequency range of interest > and reasonably constant group or phase delay (that equals "d") over > the frequency range of interest. > > so, i do not see any design specing for this Farrow structure, except > for how many values of fractional delay you solve the set of equations > for and your FIR length. is there any design spec that you can > manipulate and tradeoff? i'm just curious. > > r b-j
The only parameter is the FIR length, N, which determines a polynomial in D, the fractional delay. The nice thing about Farrow is that D can smoothly vary from 0-1 but the equation stays the same. This sort of structure is very useful in data demodulators, where the optimal sampling instant in a bit period moves around over time because of differences in the transmit and receieve clocks. I would not call it a hi-fi solution in the audio sense, but it has been proven to be just fine for data demodulation. The distortion can be reduced by interpolating the samples by a fixed amount before the fractional interpolation, so the curve is smoother. John
On 1 Mar, 19:24, minfitl...@yahoo.co.uk wrote:
> How do I simulate fractional delays - etc z^(alpha) where alpha is non- > integer eg -5.67 or whatever. > > Thanks > > F.
Allpass-filter with almost-linear phase response? Rune
On Mar 2, 2:53 pm, "robert bristow-johnson"
<r...@audioimagination.com> wrote:
> On Mar 1, 8:07 pm, Steve Underwood <ste...@dis.org> wrote: > > > > > robert bristow-johnson wrote: > > > On Mar 1, 3:15 pm, sampson...@gmail.com wrote: > > >> On Mar 1, 1:24 pm, minfitl...@yahoo.co.uk wrote: > > > >>> How do I simulate fractional delays - etc z^(alpha) where alpha is non- > > >>> integer eg -5.67 or whatever. > > > >> Look up Farrow structures. There is plenty of info online. > > > > "Farrow structures" is a pretty obscure method. i googled it and got > > > Julius's Bandlimited Interpolation page right away (which is a very > > > good general resource on the topic). > > > > to the OP, i would suggest imaging what the continuous-time > > > reconstructed output would be given the discrete samples and then > > > resample that reconstructed output at n-5.67 (or whatever) where "n" > > > is the current sample. conceptually, it's pretty straight forward. > > > Obscure? Farrow is a name you meet all the time in comms, for arbitrary > > phase shifting. > > i guess i'm not a comms guy. when i think of setting up the problem > of either fractional delay (here assuming a relatively constant delay > parameter) or resampling (SRC), i think pretty fundamentally of > hypothetically reconstructing the continuous time waveform from the > samples x[n] = x(n*T) > > +inf > x(t) = SUM{ x[m] * sinc((t-m*T)/T) } > m=-inf > > of course it's clear that x(n*T) = x[n] for integer n. > > then > > +inf > y[n] = x(n*T + d) = SUM{ x[n+m] * sinc((d-m*T)/T) } > m=-inf > > and here is when you start approximating (the Farrow structure *must* > have some approximation, too), you restrict the summation to terms > around sample x[n] (i'm assuming 0 <= d < T) > > +N/2 > y[n] = SUM{ x[n+m] * sinc((d-m*T)/T) } > m=-N/2+1 > > for some even N. that is, of course, applying a rectangular window to > the ideal impulse response, thesinc() function, so we may as well > generalize it a little: > > +N/2 > y[n] = SUM{ x[n+m] * sinc(d/T - m) * w((d/T-m)/(N/2)) } > m=-N/2+1 > > where the window function w(u) is 1 for u=0 and tapers to zero at u= > +/- 1. > > i'm pretty sure that no matter how you do the interpolation (Lagrange > or Hermite polynomials, etc.) that in any case where the N samples > surrounding the fractional sample are used and if the fractional delay > goes to 0 or T, you get the same output as you would for an integer > sample delay (y[n] = x[n] or x[n-1]), in that case, i done care how > you did it, the solution fits the form above and the solution may very > well determine the nature of the window. now B-splines do NOT have > the property that as "d" goes to 0 or T you get x[n] or x[n-1] (they > give you better image rejection but they do so at the cost of LPFing > your data), so i am not sure that Farrow structures have this property > either and fit the form above. > > but in any case, you have a set of FIR coefficients for every > fractional delay "d" of interest. above, those coefs would look like > > sinc(d/T-m) * w((d/T-m)/(N/2)) for -N/2 < m <= +N/2 > > for each set of FIR coefs, you can come up with a frequency response > that you hope is flat unity gain over the frequency range of interest > and reasonably constant group or phase delay (that equals "d") over > the frequency range of interest. > > so, i do not see any design specing for this Farrow structure, except > for how many values of fractional delay you solve the set of equations > for and your FIR length. is there any design spec that you can > manipulate and tradeoff? i'm just curious. > > r b-j
I am modelling acoustic delays for source estimation. I have x,y,z co- ordinates in a room and I use spherical interseption to get the estimates of x,y,z given 4 signals which are delayed by appropriate amounts. However, the delays up to now have to be rounded to int. Also the estimates of the delays are found by generalized cross-correlation which means they are integers too. A small error in rounding can make a big difference in position estimate as the equations are non-linear. I am trying the real thing soon in any case. Thanks F.