Results 1 to 12 of 12

Math Help - Exponential Curve Fitting

  1. #1
    Junior Member
    Joined
    Jul 2010
    Posts
    41

    Exponential Curve Fitting

    Alright folks.

    I feel a bit silly asking this, but maybe the problem is more difficult than I am giving it credit for.

    Basically, I'm trying to replicate a function that I found in a PhD thesis for the purposes of research. However, the function is given only as a graph in the thesis, whereas I need the continuous equation for my application. So basically, it's a curve fitting exercise.

    The curve is exponential, going through the points [0,0.1], [40,0.15], [50,0.25], and many more.

    I think, to get this curve, it needs to be a really general form of the exponential equation, with at least 4 unknowns, possibly 5, to calibrate:

     y = a\times b^{c\times(x+d)}+e

    So, basically, how do I go about calibrating those parameters a, b, c, d, and e to get the curve I want?

    The graph I'm trying to emulate is attached below. Any help greatly appreciated!
    Attached Thumbnails Attached Thumbnails Exponential Curve Fitting-graph.png  
    Follow Math Help Forum on Facebook and Google+

  2. #2
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    Try this trick:

    y-e=a\,b^{c(x+d)}

    \dfrac{y-e}{a}=b^{c(x+d)}

    \ln(y-e)-\ln(a)=\ln(b^{c(x+d)})=c(x+d)\ln(b).

    The variable v:=\ln(y-e) is now a linear function of x.

    The number e in this case, incidentally, is the horizontal asymptote as x\to-\infty. If you know what that is, that will simplify matters. Otherwise, just try to fit data points to the log plot of your plot there.

    Does that help?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    Jul 2010
    Posts
    41
    Quote Originally Posted by Ackbeet View Post
    Try this trick:

    y-e=a\,b^{c(x+d)}

    \dfrac{y-e}{a}=b^{c(x+d)}

    \ln(y-e)-\ln(a)=\ln(b^{c(x+d)})=c(x+d)\ln(b).

    The variable v:=\ln(y-e) is now a linear function of x.

    The number e in this case, incidentally, is the horizontal asymptote as x\to-\infty. If you know what that is, that will simplify matters. Otherwise, just try to fit data points to the log plot of your plot there.

    Does that help?
    Thanks for this. Although I'm still having trouble, as the resulting linear system is proving difficult to nail down.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    Can you please provide a listing of data points? That is, something like this:

    x y
    0 0.101
    40 0.15
    45 0.18
    50 0.235

    Only with a lot more data points - at least 10, I'd say, and as accurately as you can measure them. That'd help out a lot.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Junior Member
    Joined
    Jul 2010
    Posts
    41
    Quote Originally Posted by Ackbeet View Post
    Can you please provide a listing of data points? That is, something like this:

    x y
    0 0.101
    40 0.15
    45 0.18
    50 0.235

    Only with a lot more data points - at least 10, I'd say, and as accurately as you can measure them. That'd help out a lot.
    Thanks for your help. I've solved this problem using Genetic Algorithms (why think for yourself when a computer can do it for you!). But out of interest, I'd like to see your solution to this problem. Here are 10 data points:

    X
    0
    5
    10
    15
    20
    25
    30
    35
    40
    45
    50

    Y

    0.1054
    0.1058
    0.1064
    0.1076
    0.1096
    0.1132
    0.1196
    0.1309
    0.1510
    0.1865
    0.25
    Follow Math Help Forum on Facebook and Google+

  6. #6
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    Ok, I've attached a screenshot of what I got out of Excel. Quite a nice polynomial fit to the log plot of the data. The result is this:

    \ln(y)=7.5841\times 10^{-8}x^{4}-1.4579\times 10^{-6}x^{3}+2.8721\times 10^{-5}x^{2}

    \qquad\qquad+2.3948\times 10^{-4}x-9.7726\times 10^{-1}, with

    R^{2}=9.9999\times 10^{-1}.

    That's as good a fit as it gets. Here's the plot:

    Exponential Curve Fitting-exponential-curve-fitting.jpg

    I realize this function is not of the form you were looking for, but this is as good as Excel gets.

    why think for yourself when a computer can do it for you!
    Because computers make fast, very accurate, mistakes. You absolutely must know what the computer is doing, and you must have some idea of the result you want to obtain before you can possibly accept its answer. Computers are very stupid: they do what you tell them, not what you want. Big difference!
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Junior Member
    Joined
    Jul 2010
    Posts
    41
    Quote Originally Posted by Ackbeet View Post
    Ok, I've attached a screenshot of what I got out of Excel. Quite a nice polynomial fit to the log plot of the data. The result is this:

    \ln(y)=7.5841\times 10^{-8}x^{4}-1.4579\times 10^{-6}x^{3}+2.8721\times 10^{-5}x^{2}

    \qquad\qquad+2.3948\times 10^{-4}x-9.7726\times 10^{-1}, with

    R^{2}=9.9999\times 10^{-1}.

    That's as good a fit as it gets. Here's the plot:

    Click image for larger version. 

Name:	Exponential Curve Fitting.JPG 
Views:	24 
Size:	68.5 KB 
ID:	21100

    I realize this function is not of the form you were looking for, but this is as good as Excel gets.



    Because computers make fast, very accurate, mistakes. You absolutely must know what the computer is doing, and you must have some idea of the result you want to obtain before you can possibly accept its answer. Computers are very stupid: they do what you tell them, not what you want. Big difference!
    Ah, I see. Indeed this works.

    Haha, yes, but very fast and very accurate mistakes are something of a positive characteristic when it comes to using stochastic heuristic optimisation methods like Genetic Algorithms. Don't worry, I'm fully engaged with GAs and how they work, and they seem to have worked very well on this occasion .
    Follow Math Help Forum on Facebook and Google+

  8. #8
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    Quote Originally Posted by Phugoid View Post
    Ah, I see. Indeed this works.

    Haha, yes, but very fast and very accurate mistakes are something of a positive characteristic when it comes to using stochastic heuristic optimisation methods like Genetic Algorithms. Don't worry, I'm fully engaged with GAs and how they work, and they seem to have worked very well on this occasion .
    Jolly good, then. Would you say your problem is now solved?
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Junior Member
    Joined
    Jul 2010
    Posts
    41
    Quote Originally Posted by Ackbeet View Post
    Jolly good, then. Would you say your problem is now solved?
    Absolutely. Thanks for your help!
    Follow Math Help Forum on Facebook and Google+

  10. #10
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    You're very welcome. Have a good one!
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Newbie
    Joined
    Mar 2011
    Posts
    1

    Post

    Quote Originally Posted by Ackbeet View Post
    Try this trick:

    y-e=a\,b^{c(x+d)}

    \dfrac{y-e}{a}=b^{c(x+d)}

    \ln(y-e)-\ln(a)=\ln(b^{c(x+d)})=c(x+d)\ln(b).

    The variable v:=\ln(y-e) is now a linear function of x.

    The number e in this case, incidentally, is the horizontal asymptote as x\to-\infty. If you know what that is, that will simplify matters. Otherwise, just try to fit data points to the log plot of your plot there.

    Does that help?
    Hi,

    supposed that I have a set of x & y.
    how would one proceeds in finding the constants assuming the the constant e is not known and is one of the desired result.
    Any help would be appreciated.

    Thanks
    Follow Math Help Forum on Facebook and Google+

  12. #12
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    Well, here's one way. Let's say you have a spreadsheet. You have a column for x, and a column for y. You then plot the data you have on a log plot. You are able to get v=mx+b. That is, you've done the trick outlined in Post # 2. So now you can include another column, for v. But you know that v=\ln(y-e). That implies e^{v}=y-e, or e=y-e^{v}. I would create another column that is equal to y-e^{v}, which you can do because everything there is known. Then I'd probably take e to be the average of everything in that column. Make sense?
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Curve Fitting
    Posted in the Advanced Algebra Forum
    Replies: 11
    Last Post: November 23rd 2010, 03:55 PM
  2. Curve Fitting
    Posted in the Calculus Forum
    Replies: 8
    Last Post: September 15th 2010, 02:09 PM
  3. Curve Fitting 2
    Posted in the Calculus Forum
    Replies: 8
    Last Post: September 15th 2010, 06:38 AM
  4. Fitting a curve to a form
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: May 12th 2009, 05:43 PM
  5. Curve fitting
    Posted in the Math Software Forum
    Replies: 7
    Last Post: November 27th 2008, 04:21 AM

/mathhelpforum @mathhelpforum