DSPRelated.com
Forums

Parabola interpolation

Started by HyeeWang July 8, 2009
On Jul 8, 7:34 pm, Jerry Avins <j...@ieee.org> wrote:
> ... > If the extremum is needed, interpolation is not. > > Jerry > -- > Engineering is the art of making what you want from things you can get. > =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF More accurately: "If only the location of the extremum is desired, no interpolation has been performed." Should any inquiring mind desire to know the value of the extremum, through the use of it's location, then the equations discussed have been, as stated, "parabolic interpolation equations". And doesn't HyeeWang have an inquiring mind? Dale B. Dalrymple
On Jul 8, 10:28=A0pm, HyeeWang <hyeew...@gmail.com> wrote:
> On Jul 9, 12:04=A0am, Clay <c...@claysturner.com> wrote: > > > > > > > On Jul 8, 4:56=A0am, HyeeWang <hyeew...@gmail.com> wrote: > > > > I learned a parabola interpolation equation from some articles, but I > > > am puzzled with the rationality. It is as follws. > > > > E =3D I - 1/2*[ R(I+1) - R(I-1)] / [R(I+1) + R(I+1) - 2*R(I)] > > > > where, 3 given =A0points is R(I-1),R(I) and R(I+1),which form a > > > parabola. R is the resultant function. How can get the extreme =A0poi=
nt
> > > E of parabola by that equation? > > > > cheers > > > HyeeWang > > > Hello HyeeWang, > > > First you fit a parabola through your three data points. You can use > > the Lagrange interpolation formula for this. But to make the algebra > > easy to deal with pick your coordinate so your 3 abscissal (x axis) > > values are > > > -h, 0, h =A0where h is the intersample spacing (assuming uniform sample > > rate). > > > Now your Lagrange formula is a little simpler to work with - it gives > > > y(x) =3D (1/2h^2)*( y0x(x-h)-2y1(x^2-h^2)+y2x(x+h)) > > > where y0,y1, and y2 are your ordinate (y axis) values. > > > Take the derivative (with respect to x) and set it equal to zero > > > Thus the x value of the extremum is > > > x=3D h*(y0-y2) / (y0- 2*y1+y2) > > > Remember your zero reference is at the central sample. > > > I hope this helps. > > > Clay > > Thank you. Clay. > > =A0I base your idea and use a more general procedure and get the desired > formula. > > =A0Applying the Lagrange formula ,we get > > =A0y(x) =3D y0*[(x-x1)*(x-x2)]/[(x0-x1)*(x0-x2)] + y1*[(x-x0)*(x-x2)]/[(x=
1-
> x0)*(x1-x2)] > > =A0 + y2*[(x-x0)*(x-x1)]/[(x2-x0)*(x2-x1)] =A0 (1) > > =A0The given 3 points are (x0,y0),(x1,y1) and (x2,y2), and > > =A0we use the general case ,make x0 x1 x2 to be I-1,I and I. > > =A0 Substitue x into the denominator of (1) and make it simpler as > indicated below. > > =A0 y(x) =3D 1/2*yo*[(x-x1)*(x-x2)] - y1*[(x-x0)*(x-x2)] + 1/2*y2*[(x-x0)=
*
> (x-x1)] =A0 (2) > > =A0 Take =A0the derivative (with respect to x) for (2) set it equal to > zero , > > =A0 we can get the desired extremum location =A0exactly. > > =A0 Due to my poor mathematic knowledge, I wonder whether Lagrange > formula make same sense as > > =A0 parabola interpolation does,although it acquired a graceful result.- =
Hide quoted text -
> > - Show quoted text -
The formula I gave is exact, I just used a reference of zero at the central point. In the original formula you gave, it is at 'I'. Take my formula and divide it by 'h', so the extremum's position is now in units of the sample period and then subtract from I. That's how to get the original formula. Whether you start with Newton's formula, Lagrange's formula, or even a barycentric Lagrange formula, you will end up at the same result. This is because given N+1 distinct (along x axis) points, there is only one polynomial that interpolates those points. So using the Lagrange formula is a way to find the quadratic (2nd order polynomial) that exactly goes through the three points. There are other ways to get this as well, but for this example, this is basically the simplest. Yes you may even set up a Vandermonde matrix and solve it to find the interpolating polynomial. If you look carefully at the Lagrange formula it is a sum of weighted Nth order polynomials (using N+1 points). And of course a sum of Nth order polynomials has an order of most N - some terms may cancel out. For example interpolate a constant function. Each of the polys in the Lagrange formula being summed together acts like a Kronecker delta function (on the finite set of discrete values being interpolated over) that has a value of 1 when x=3D=3D the reference point for the particular poly and a value of zero when evaluated at any of the other points. And these are weighted by the corresponding ordinal values. I hope you understand where all of this comes from now. And also how to apply shortcuts to make the derivation easier. That's why I didn't give you the complete quadratic interpolation formula for arbitrary abcissas. But it is good you went ahead and worked it out. Clay
Rune Allnor wrote:
> On 9 Jul, 04:34, Jerry Avins <j...@ieee.org> wrote: >> HyeeWang wrote: >>> On Jul 8, 5:33 pm, Rune Allnor <all...@tele.ntnu.no> wrote: > >>>> Given points (x1,y1), (x2,y2), (x3,y3) and the equation >>>> a x^2 + b x + c = y >>>> you have three equations in three unknowns. It's a technical >>>> matter to find a, b and c in terms of (x_i,y_i) from the >>>> available info. > ... >> If the extremum is needed, interpolation is not. > > In this particular application one wants one praticular > point that can be deduced by further reasoning, so one > don't need to compute that many other points on the parabola, > as one would in 'proper' interpolation. > > So it's a matter of semantics: what is necessary and what > is sufficient for something to be a 'proper' interpolation? > > My view is that finding the parameters of the model is > sufficient. It seems you think something more is necessary.
Not necessary, but recognizing that the point you want to extrapolate to is actually a point you're extrapolating from can be useful. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;