Results 1 to 6 of 6

Thread: [RESOLVED] Curve Fitting

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Resolved [RESOLVED] Curve Fitting

    Hi all.

    I need to fit a parabola to some constraints. Again.
    I know one point on the curve (x1,y1)
    I know that the gradient at that point is 0.
    I know the radius of curvature of that parabola.

    y=ax²+bx+c (1)
    y’=2ax+b (2)
    y’’=2a (3)
    Curvature = 1/Radius (4)

    (3)=(4)
    2a=1/Radius
    a=1/(2*Radius) (5)

    Gradient=0 so from (2) and substituting (5)
    0=2*1/(2*Radius) * X1 + b
    b=-x1/Radius (6)

    At the known point x1,y1, from (1) substituting (5) and (6)
    y1=1/(2*Radius)*(x1)²-x1/Radius*x1+c
    y1=(x1)²/(2*Radius) - (x1)²/Radius+c
    y1=(x1)²/(2*Radius) - 2 (x1)²/(2*Radius)+c
    y1=-(x1)²/(2*Radius)+c
    c=y1+(x1)²/(2*Radius)

    Now say x1=8000 y1=250 Radius=-5500
    a=-0.0001
    b=1.4545
    c=-5568
    So the equation of the curve is:
    y=-0.0001x²+1.4545x-5568
    So why does
    y=-0.0001*(8000)²+1.4545*8000-5568=-332 when it should equal 250
    Where have I gone wrong?

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Curve Fitting

    The radius is not negative there but the curvature should be -ve. Regardless, I still have the problem.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Curve Fitting

    Sorry. Haven't worked out quite why yet but I have worked it out.

  4. #4
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Re: [RESOLVED] Curve Fitting

    Quote Originally Posted by sgrya1
    y=-0.0001*(8000)²+1.4545*8000-5568=-332 when it should equal 250. Where have I gone wrong?
    Hi, the culprit is rounding, particularly for a. Rounding -0.0000909090909090909 to -.0001 introduces substantial error. For b, 5 significant digits were retained. For c, 4 significant digits were retained. If 5 significant digits are retained for a (i.e. -9.0909E-5), the answer is 249.8, which is a lot closer to the exact value.

    P.S. One additional comment. Be careful about relating radius of curvature to y". The expression for radius of curvature is R = [(1 + y'^2)^1.5]/y". If y' is small, then 1/y" approximates the radius of curvature. In your case, y' = 0, so it works. For more info see:
    http://mathworld.wolfram.com/RadiusofCurvature.html
    Last edited by VBAhack; May 13th, 2008 at 02:27 PM.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: [RESOLVED] Curve Fitting

    Hi VBAHack.

    Thanks for that! I hadn't actually worked it out.
    I was trying to cross check an excel sheet by hand and just couldn't understand what the problem was. The rounding makes perfect sense now that I look at the large number (8000&#178 and small fraction (0.0001) that were being multipled. I corrected something else in the spreadsheet which made me think that I had solved it.

    I'll have to look into the curvature thing. At the moment everything looks fine with the approximation. That being because tendons are typically in thin slabs having long spans. I will need to adjust it though as I don't know how accurate it will be for the tendon profile in a deep beam for instance where the gradients are a lot larger.

    Catch 22 with that though. I need the radii to determine the equations. And I need the equations to determine the radii. Might need to give that one some thought.

  6. #6
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Re: [RESOLVED] Curve Fitting

    Quote Originally Posted by sgrya1
    I'll have to look into the curvature thing. At the moment everything looks fine with the approximation. That being because tendons are typically in thin slabs having long spans. I will need to adjust it though as I don't know how accurate it will be for the tendon profile in a deep beam for instance where the gradients are a lot larger.

    Catch 22 with that though. I need the radii to determine the equations. And I need the equations to determine the radii. Might need to give that one some thought.
    Actually, calculating y" is a straightforward if you know or can estimate the gradient and radius of curvature.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width