DSPRelated.com
Forums

FIR interpolator border effects

Started by favallo November 21, 2006
Hi, 

i'm trying to implement an interpolator filter on a finite sequence and
i'm faced to a quite anoying problem, the border effects.
The problem is that more the filter is long more the effects on the
borders a re huge and so the interpolation has a lot of errors.
I've seen once that someone use different sets of coefficients for the
interpolation near the borders but i dont find any literature to find how
these new coeffients are calculated. 
Any hints?

Thanks 

Favallo



Favallo wrote:
> Hi, > > i'm trying to implement an interpolator filter on a finite sequence and > i'm faced to a quite anoying problem, the border effects. > The problem is that more the filter is long more the effects on the > borders a re huge and so the interpolation has a lot of errors. > I've seen once that someone use different sets of coefficients for the > interpolation near the borders but i dont find any literature to find how > these new coeffients are calculated. > Any hints?
Favallo, you have to specify what you think is the underlying continuous-time function which interpolates your finite sequence. If you specify that the function is bandlimited, and that the only samples that are non-zero are the ones in your sequence, then the bandlimited interpolator does the best job possible. If however you assume that your finite sequence is just part of a larger, but still bandlimited sequence, then you'll get interpolation errors towards the borders. No filter manipulation in the world can reduce those errors, because they depend on data that is not available to you. The errors obviously increase towards the borders, because that is where the non-available data has the highest influence on interpolating function. No filter manipulation can make up for the missing data. Regards, Andor
> > >Favallo wrote: >> Hi, >> >> i'm trying to implement an interpolator filter on a finite sequence
and
>> i'm faced to a quite anoying problem, the border effects. >> The problem is that more the filter is long more the effects on the >> borders a re huge and so the interpolation has a lot of errors. >> I've seen once that someone use different sets of coefficients for the >> interpolation near the borders but i dont find any literature to find
how
>> these new coeffients are calculated. >> Any hints? > >Favallo, > >you have to specify what you think is the underlying continuous-time >function which interpolates your finite sequence. If you specify that >the function is bandlimited, and that the only samples that are >non-zero are the ones in your sequence, then the bandlimited >interpolator does the best job possible. > >If however you assume that your finite sequence is just part of a >larger, but still bandlimited sequence, then you'll get interpolation >errors towards the borders. No filter manipulation in the world can >reduce those errors, because they depend on data that is not available >to you. The errors obviously increase towards the borders, because that >is where the non-available data has the highest influence on >interpolating function. No filter manipulation can make up for the >missing data. > >Regards, >Andor > >
Thanks Andor it confirm me what i've thought. Favallo
Andor wrote:
> Favallo wrote: > > Hi, > > > > i'm trying to implement an interpolator filter on a finite sequence and > > i'm faced to a quite anoying problem, the border effects. > > The problem is that more the filter is long more the effects on the > > borders a re huge and so the interpolation has a lot of errors. > > I've seen once that someone use different sets of coefficients for the > > interpolation near the borders but i dont find any literature to find how > > these new coeffients are calculated. > > Any hints? > > Favallo, > > you have to specify what you think is the underlying continuous-time > function which interpolates your finite sequence. If you specify that > the function is bandlimited, and that the only samples that are > non-zero are the ones in your sequence, then the bandlimited > interpolator does the best job possible. > > If however you assume that your finite sequence is just part of a > larger, but still bandlimited sequence, then you'll get interpolation > errors towards the borders. No filter manipulation in the world can > reduce those errors, because they depend on data that is not available > to you. The errors obviously increase towards the borders, because that > is where the non-available data has the highest influence on > interpolating function. No filter manipulation can make up for the > missing data.
Yes, but the error will be much greater if, as is typically done, one uses a symmetric interpolator where one only has one "side" of real data and another "side" of made-up data (zero padding). A minimum-phase FIR or IIR interpolator, perhaps run the "wrong" way, may produce a lower error near the ends. There's also the quality of the made-up data, reflection of the data at the ends sometimes produces less likely looking errors than zero-padding. Of course, this all depends on your model of your underlying data (band limited, low pass filtered, continuous derivatives, low dimension state space, etc.) IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
Andor wrote:
> Favallo wrote: > > > > i'm trying to implement an interpolator filter on a finite sequence and > > i'm faced to a quite anoying problem, the border effects. > > The problem is that more the filter is long more the effects on the > > borders a re huge and so the interpolation has a lot of errors. > > I've seen once that someone use different sets of coefficients for the > > interpolation near the borders but i dont find any literature to find how > > these new coeffients are calculated. > > Any hints? > > you have to specify what you think is the underlying continuous-time > function which interpolates your finite sequence. If you specify that > the function is bandlimited, and that the only samples that are > non-zero are the ones in your sequence, then the bandlimited > interpolator does the best job possible. > > If however you assume that your finite sequence is just part of a > larger, but still bandlimited sequence, then you'll get interpolation > errors towards the borders. No filter manipulation in the world can > reduce those errors, because they depend on data that is not available > to you. The errors obviously increase towards the borders, because that > is where the non-available data has the highest influence on > interpolating function. No filter manipulation can make up for the > missing data.
that's data dependent. an LPC filter (before interpolation) run off the ends of the finite data in both directions can extend (or make a decent guess at extending) the data the required length for the interpolation in such a way that the gibbs-like effect on the ends is minimized and sometimes negligible. this, of course, will work best when the data being interpolated is bandlimited and the extention is defined in such a way as to preserve that bandlimited spectrum. if the data was white and uniformly-distributed noise, there is nothing that LPC or any theory of random processes can do to help guess the samples that come off of the ends, so in that manner, it is completely correct that nothing can make up for the missing data (but i'm not sure what one could see or perceive of edge effects if you were interpolating the output of a good random number generator.) r b-j

On 30 Nov., 21:37, "Ron N." <rhnlo...@yahoo.com> wrote:
> Andor wrote: > > Favallo wrote: > > > Hi, > > > > i'm trying to implement an interpolator filter on a finite sequence and > > > i'm faced to a quite anoying problem, the border effects. > > > The problem is that more the filter is long more the effects on the > > > borders a re huge and so the interpolation has a lot of errors. > > > I've seen once that someone use different sets of coefficients for the > > > interpolation near the borders but i dont find any literature to find how > > > these new coeffients are calculated. > > > Any hints? > > > Favallo, > > > you have to specify what you think is the underlying continuous-time > > function which interpolates your finite sequence. If you specify that > > the function is bandlimited, and that the only samples that are > > non-zero are the ones in your sequence, then the bandlimited > > interpolator does the best job possible. > > > If however you assume that your finite sequence is just part of a > > larger, but still bandlimited sequence, then you'll get interpolation > > errors towards the borders. No filter manipulation in the world can > > reduce those errors, because they depend on data that is not available > > to you. The errors obviously increase towards the borders, because that > > is where the non-available data has the highest influence on > > interpolating function. No filter manipulation can make up for the > > missing data. > Yes, but the error will be much greater if, as is typically > done, one uses a symmetric interpolator where one only has one > "side" of real data and another "side" of made-up data (zero > padding). A minimum-phase FIR or IIR interpolator, perhaps run > the "wrong" way, may produce a lower error near the ends.
No, all interpolators that (perfectly) reconstruct the bandlimited signal will have the same error (there is only one underlying bandlimited continuous-time function, that passes through the sample points, and has zero-samples everywhere else). This error does not depend on the available data and comes from zero-extending the signal .
> There's also the quality of the made-up data, reflection of the > data at the ends sometimes produces less likely looking errors than zero-padding.
If you assume a periodic signal, sinc interpolation and interpolation using the discrete Fourier sum are the same. Whether the errors are less likely is open to debate. That's why I said that one must first determine what the underlying continuous-time function is.
> > Of course, this all depends on your model of your underlying > data (band limited, low pass filtered, continuous derivatives, > low dimension state space, etc.)
Ah, we agree :-). Regards, Andor