DSPRelated.com
Forums

Parabola interpolation

Started by HyeeWang July 8, 2009
I learned a parabola interpolation equation from some articles, but I
am puzzled with the rationality. It is as follws.

E = I - 1/2*[ R(I+1) - R(I-1)] / [R(I+1) + R(I+1) - 2*R(I)]

where, 3 given  points is R(I-1),R(I) and R(I+1),which form a
parabola. R is the resultant function. How can get the extreme  point
E of parabola by that equation?


cheers
HyeeWang
Sorry for spelling error, the corrected equation is as follows.

E = I - 1/2*[ R(I+1) - R(I-1)] / [R(I+1) + R(I-1) - 2*R(I)]



On Jul 8, 4:56&#4294967295;pm, 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 = I - 1/2*[ R(I+1) - R(I-1)] / [R(I+1) + R(I+1) - 2*R(I)] > > where, 3 given &#4294967295;points is R(I-1),R(I) and R(I+1),which form a > parabola. R is the resultant function. How can get the extreme &#4294967295;point > E of parabola by that equation? > > cheers > HyeeWang
On 8 Jul, 10:56, 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 = I - 1/2*[ R(I+1) - R(I-1)] / [R(I+1) + R(I+1) - 2*R(I)] > > where, 3 given &#4294967295;points is R(I-1),R(I) and R(I+1),which form a > parabola. R is the resultant function. How can get the extreme &#4294967295;point > E of parabola by that equation?
The general procedure: 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. Once you have a, b and c, you also have the expression for the derivative of the parabola: y' = 2a x + b At the extremum, y' = 0 which is easily solved for x. Express the solution in the original data by substituting whatever formulas express a and b in terms of (x_i,y_i). Rune
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 =A0point > 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 where 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
On Jul 8, 5:33=A0pm, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 8 Jul, 10:56, 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 =A0point > > E of parabola by that equation? > > The general procedure: > > Given points (x1,y1), (x2,y2), (x3,y3) and the equation > > =A0 =A0 =A0a x^2 + b x + c =3D 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. > > Once you have a, b and c, you also have the expression > for the derivative of the parabola: > > =A0 y' =3D 2a x + b > > At the extremum, y' =3D 0 which is easily =A0solved for x. > > Express the solution in the original data by substituting > whatever formulas express a and b in terms of (x_i,y_i). > > Rune
Thank you. Rune. You conducted me to the right direction. According to the given points and equation x^2 + b x + c =3D y, we produce 3 combined equations as indicated below. R(I-1) =3D a*(I-1)^2+b*(I-1)+c (1) R(I) =3D a*I^2 + b*I +c (2) R(I+1) =3D a*(I+1)^2+b*(I+1)+c (3) subtracting (1) from (3) and (2) respectively,get R(I+1) -R(I-1) =3D 4aI+2b (4) R(I-1) -R(I) =3D a(1-2I)-b (5) combining (4) and (5), we get a =3D 1/2*[R(I+1)+R(I-1)-2R(I)] (6) (4) divided by a, we get [R(I+1) - R(I-1)]/a =3D 4I + 2b/a (7) it follows -b/(2a) =3D I - [R(I+1) - R(I-1)]/(4a) (8) substituting a into the right part of (8),we get -b/(2a) =3D I - 1/2*[R(I+1) - R(I-1)]/ [R(I+1)+R(I-1)-2R(I)] (9) Then, the resultant (9) is the extremum location as wanted.
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 =A0point > > 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. I base your idea and use a more general procedure and get the desired formula. Applying the Lagrange formula ,we get y(x) =3D y0*[(x-x1)*(x-x2)]/[(x0-x1)*(x0-x2)] + y1*[(x-x0)*(x-x2)]/[(x1- x0)*(x1-x2)] + y2*[(x-x0)*(x-x1)]/[(x2-x0)*(x2-x1)] (1) The given 3 points are (x0,y0),(x1,y1) and (x2,y2), and we use the general case ,make x0 x1 x2 to be I-1,I and I. Substitue x into the denominator of (1) and make it simpler as indicated below. y(x) =3D 1/2*yo*[(x-x1)*(x-x2)] - y1*[(x-x0)*(x-x2)] + 1/2*y2*[(x-x0)* (x-x1)] (2) Take the derivative (with respect to x) for (2) set it equal to zero , we can get the desired extremum location exactly. Due to my poor mathematic knowledge, I wonder whether Lagrange formula make same sense as parabola interpolation does,although it acquired a graceful result.
HyeeWang wrote:
> On Jul 8, 5:33 pm, Rune Allnor <all...@tele.ntnu.no> wrote: >> On 8 Jul, 10:56, 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 = I - 1/2*[ R(I+1) - R(I-1)] / [R(I+1) + R(I+1) - 2*R(I)] >>> where, 3 given points is R(I-1),R(I) and R(I+1),which form a >>> parabola. R is the resultant function. How can get the extreme point >>> E of parabola by that equation? >> The general procedure: >> >> 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. >> >> Once you have a, b and c, you also have the expression >> for the derivative of the parabola: >> >> y' = 2a x + b >> >> At the extremum, y' = 0 which is easily solved for x. >> >> Express the solution in the original data by substituting >> whatever formulas express a and b in terms of (x_i,y_i). >> >> Rune > > Thank you. Rune. You conducted me to the right direction. > > According to the given points and equation x^2 + b x + c = y, we > produce > > 3 combined equations as indicated below. > > R(I-1) = a*(I-1)^2+b*(I-1)+c (1) > R(I) = a*I^2 + b*I +c (2) > R(I+1) = a*(I+1)^2+b*(I+1)+c (3) > > subtracting (1) from (3) and (2) respectively,get > > R(I+1) -R(I-1) = 4aI+2b (4) > > R(I-1) -R(I) = a(1-2I)-b (5) > > combining (4) and (5), we get > > a = 1/2*[R(I+1)+R(I-1)-2R(I)] (6) > > (4) divided by a, we get > > [R(I+1) - R(I-1)]/a = 4I + 2b/a (7) > > it follows > > -b/(2a) = I - [R(I+1) - R(I-1)]/(4a) (8) > > substituting a into the right part of (8),we get > > -b/(2a) = I - 1/2*[R(I+1) - R(I-1)]/ [R(I+1)+R(I-1)-2R(I)] (9) > > Then, the resultant (9) is the extremum location as wanted.
If the extremum is needed, interpolation is not. 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;

HyeeWang wrote:

> I learned a parabola interpolation equation from some articles, but I > am puzzled with the rationality. It is as follws. > > E = I - 1/2*[ R(I+1) - R(I-1)] / [R(I+1) + R(I+1) - 2*R(I)] > > where, 3 given points is R(I-1),R(I) and R(I+1),which form a > parabola. R is the resultant function. How can get the extreme point > E of parabola by that equation? > > > cheers > HyeeWang
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.
we use the general case ,make x0 x1 x2 to be I-1,I and I+1.
> > =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 -
Shouldn't you get the same result either way? (Probably the reason for Vlad's response.) Dirk Bell
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 > > >> =A0 =A0 =A0a x^2 + b x + c =3D 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. Rune