DSPRelated.com
Forums

Lagrange interpolation

Started by Tom November 14, 2006
I am planning to use a Lagrange interpolator in the context of fractional 
delay filter to change the sampling rate by a factor between 1 and 1.5 
(lower). My signal bandwidth is about 0.23 when sampling frequency fs is 
normalized to 1. The signal has 12 bits resolution and I would like to 
maintain this resolution at the output of the interpolator. How can I 
determine the degree of the Lagrange interpolator needed ?
Is there a better approach to do this operation ?

thanks

Tom 



Tom wrote:

> I am planning to use a Lagrange interpolator in the context of fractional > delay filter to change the sampling rate by a factor between 1 and 1.5 > (lower). My signal bandwidth is about 0.23 when sampling frequency fs is > normalized to 1. The signal has 12 bits resolution and I would like to > maintain this resolution at the output of the interpolator. How can I > determine the degree of the Lagrange interpolator needed ?
The polynomial interpolator of the N-th order is equivalent to the lowpass reconstruction filter of the (N+1)th order. The accuracy of the interpolation is equal to the amount of the aliased components after the lowpass. Considering the worst case you will need the polynom of the ~31th degree.
> Is there a better approach to do this operation ? >
Upsample the signal before doing the interpolation. That will reduce the required degree of the polynom. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
How did get the number 31th degree ?
"Vladimir Vassilevsky" <antispam_bogus@hotmail.com> wrote in message 
news:mIm6h.7120$6t.108@newssvr11.news.prodigy.com...
> > > Tom wrote: > >> I am planning to use a Lagrange interpolator in the context of fractional >> delay filter to change the sampling rate by a factor between 1 and 1.5 >> (lower). My signal bandwidth is about 0.23 when sampling frequency fs is >> normalized to 1. The signal has 12 bits resolution and I would like to >> maintain this resolution at the output of the interpolator. How can I >> determine the degree of the Lagrange interpolator needed ? > > The polynomial interpolator of the N-th order is equivalent to the lowpass > reconstruction filter of the (N+1)th order. The accuracy of the > interpolation is equal to the amount of the aliased components after the > lowpass. Considering the worst case you will need the polynom of the ~31th > degree. > > >> Is there a better approach to do this operation ? >> > > Upsample the signal before doing the interpolation. That will reduce the > required degree of the polynom. > > Vladimir Vassilevsky > > DSP and Mixed Signal Design Consultant > > http://www.abvolt.com >
Vladimir Vassilevsky wrote:
> Tom wrote: > > > I am planning to use a Lagrange interpolator in the context of fractional > > delay filter to change the sampling rate by a factor between 1 and 1.5 > > (lower).
i might not mix the terms "fractional delay filter" with "sample rate [conversion]". in a fractional delay *filter* we normally think of the fractional delay as reasonably constant or slowly changing and possibly set by the user. what properties you want in that kind of interpolation is likely not the same as the properties you want in SRC, where the fractional delay possibly varies wildly from one output sample to the next.
> My signal bandwidth is about 0.23 when sampling frequency fs is > > normalized to 1. The signal has 12 bits resolution and I would like to > > maintain this resolution at the output of the interpolator. How can I > > determine the degree of the Lagrange interpolator needed ?
i'll send you a paper (tonight) that Duane Wise and i wrote if you send me an email that will work. meanwhile you can see Olli Niemitalo (hmmm... that i cannot find on the web at the moment there is another new paper at http://www.mp3-tech.org/programmer/docs/resampler.pdf that might be good - i haven't looked at it yet).
> The polynomial interpolator of the N-th order is equivalent to the > lowpass reconstruction filter of the (N+1)th order.
certainly, for a chosen fractional delay, you can show the output of a finite order polynomial interpolator is a linear combination of the neighboring N+1 samples, and from that construct an impulse response of a hypothetical LPF which looks more and more like a sinc(.) function (and ideal brickwall LPF) as N gets larger whether it's Lagrange or Hermite (but not for B-spline which looks more and more like a Gaussian as N gets large). i would change "to the" to "to a". the lowpass reconstruction filter is going to have sinc() functions up to the (N+1)th order (because the time-limited impulse response is N+1 sample periods long).
> The accuracy of the interpolation is equal to the amount of the aliased > components after the lowpass.
in the worst case for SRC, i think the simplest thing is to assume that what's left of all of those images your LPF didn't complete kill will fold back into the passband upon resampling and from that determine a sorta guess for how much error (or "noise" though it is not guaranteed to sound like whitish noise) results from resampling. if i recall correctly, the S/N ratio is about 6.02*(N+1) dB for every octave between the nominal BW of the signal and Nyquist (each octave of oversampling ratio). that's the slope of the B-spline and the other interpolators have other terms that make it not quite as good, but in the limit i think that 6.02*(N+1) dB/octave slope applies for large oversampling ratios.
> Considering the worst case you will need > the polynom of the ~31th degree.
it depends on the nature of the polynomial. Lagrange might not be the best choice. there are Hermite and B-spline interpolating polynomials, too, that have different alias killing properties.
> > Is there a better approach to do this operation ? > > > > Upsample the signal before doing the interpolation. That will reduce the > required degree of the polynom.
sorry, didn't read to the bottom. Vladimir is correct and i was just assuming there was some degree of upsampling (or that the energy in the top octave or two of the original is negligible). either way, you need some degree of oversampling to get a S/N metric, at least with my simple and bonehead approximation. r b-j

Tom wrote:

> How did get the number 31th degree ?
0.23*1.5 = 0.345 1 - 0.345 = 0.655 0.655/0.5 = 1.31 1.31^31 ~ 4319 ~ 12 bits Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
>> >>Tom wrote: >> >> >>>I am planning to use a Lagrange interpolator in the context of fractional >>>delay filter to change the sampling rate by a factor between 1 and 1.5 >>>(lower). My signal bandwidth is about 0.23 when sampling frequency fs is >>>normalized to 1. The signal has 12 bits resolution and I would like to >>>maintain this resolution at the output of the interpolator. How can I >>>determine the degree of the Lagrange interpolator needed ? >> >>The polynomial interpolator of the N-th order is equivalent to the lowpass >>reconstruction filter of the (N+1)th order. The accuracy of the >>interpolation is equal to the amount of the aliased components after the >>lowpass. Considering the worst case you will need the polynom of the ~31th >>degree. >> >> >> >>>Is there a better approach to do this operation ? >>> >> >>Upsample the signal before doing the interpolation. That will reduce the >>required degree of the polynom. >> >>Vladimir Vassilevsky >> >>DSP and Mixed Signal Design Consultant >> >>http://www.abvolt.com >> > > >