Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Approximation theory

  1. Jul 15, 2011 #1
    Hi
    Is there anyone here who has a good understanding of using approximation theory and parameter estimation techniques who can help me understand a chapter of a paper, and why certain techniques have been used. I have tried to use the given data, and matlabs optimization tools to follow the chapter through, but I cannot get a good fitting curve (at all). the method requires Levenberg marquardt to approximate some parameters, golden section search to improve them, and then a trisection search (which I think is golden section search???) to find more parameters based on the first ones found.

    Thanks
     
  2. jcsd
  3. Jul 18, 2011 #2
    Could you post a reference to the article? Not sure if I could help but I'd be happy to take a look.
     
  4. Jul 19, 2011 #3
    Great thanks. I have the relevent extract of the paper, which i have attached. I basically want to use levenberg marquardt to solve equation 40 for a,b and c0. The value Tk is:

    I have timings for tk: 1.994, 1.806, 1.632, 1.493, 1.2
    x tk
    1 1.2
    2 1.493
    3 1.632
    4 1.806
    5 1.994
    Its an oscilating system that slows with time.
    Equation 41 apparently is to refine the parameters further, however golden section searc i thought finds a minimum, however i am not sure what minimum, because plotting those points above gives a constant downward gradient.
    Equation 42 requires the approximations from 41.

    I cant find a way (that i can get to work) to approximate those values. any ideas?

    (P.S. I cant upload twice so the image is my attachment about the same question here: https://www.physicsforums.com/showthread.php?t=513060)
     
  5. Jul 19, 2011 #4

    hotvette

    User Avatar
    Homework Helper

    I found a link to a pdf of the actual paper, which should make the discussion a bit easier.

    http://www.roulette.gmxhome.de/roulette[1].pdf

    Equation 40 is a least squares formulation based on equation 35 (which is what I thought a couple of years ago when this topic was first introduced). Based on your 5 timings I did a quick and dirty curve fit using downhill simplex. Not sure I did it right, but both a and c0 are negative and the fit doesn't appear to be very good. The data look rather linear. Is this the same result you got with Matlab?
     

    Attached Files:

    Last edited: Jul 19, 2011
  6. Jul 20, 2011 #5
    Yeah for the data points, I used the matlab curve fitting tool, but I couldnt get it to do a levenberg marquardt fit. It couldnt converge. Did you use my values for x, I think they should start at zero not 1 thought, but I havent tried that yet. Is yours a levenberg marquardt fit?
    Equation 41 in the paper is supposed to refine the parameters, did you read that bit?

    On that website, under manual, you can see his values for a and c0 can be negative. thats not a problem i dont think.

    I used matlab though to try and do a downhill simplex, but it still cant converge. how did you do that?
    The equation i am fitting to is:
    Fitted_Curve = (1/(a*b))*(c-asinh(sinh(c)*exp(a*Input*2*pi)));

    but the graph after trying to solve is:
     

    Attached Files:

    Last edited: Jul 20, 2011
  7. Jul 20, 2011 #6
    Actually I have managed to get it to plot it. But like you, not a very good fit...
     

    Attached Files:

  8. Jul 20, 2011 #7

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    You got a bad fit because you fit the wrong parameter. You should be fitting a, b, and c0 by minimizing equation 40,

    [tex]S(a,b,c_0) = \sum_{k=0}^N \left\{t_k - \frac 1{ab} \left(c_0-\sinh^{-1}(\sinh c_0\cdot e^{ak\pi})\right)\right\}^2[/tex]

    or you should be fitting a by minimizing equation 41.
     
  9. Jul 20, 2011 #8
    what is different? are you saying that you either do 40 or 41, not both?
     
  10. Jul 20, 2011 #9

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    I am saying that the one thing you shouldn't do is to do the fit from post #5 (as quoted in post #7).

    From the paper, it looks like the author first did a multivariate fit in equation #40 on parameters a and b and then refined that estimate by doing a fit on a only via equation #41. In other words, equation #40 when minimized gives the final value for b but only an initial guess for a. The final value for a comes from minimizing equation #41.

    Note well: That `with' section after equation #41 applies to both equations #40 and #41. In particular, note that c0 is not a tuning parameter. It is instead an ugly expression that is a function of the tuning parameters a and b and of the time difference t1-t0.
     
  11. Jul 20, 2011 #10
    I tried that, but I cant get it to produce a good fit (compared to the above graphs) at all. It is closer estimating c0.
    From your earlier post
    "The equation i am fitting to is:
    Fitted_Curve = (1/(a*b))*(c-asinh(sinh(c)*exp(a*Input*2*pi)));"
    What I am fitting is actually the difference between this and the actual data.

    I understand to freeze b in equation 41 though, however I cant get the golden section search to produce a better estimate, however I am still approximating for c0 at this stage.
     
  12. Jul 20, 2011 #11

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    You shouldn't be estimating c0. It is merely a stand-in for

    [tex]c_0 = -\coth^{-1}\left(\frac{e^{a2\pi}-\cosh(ab(t_1-t_0))}{\sinh(ab(t_1-t_0))}\right)[/tex]
     
  13. Jul 20, 2011 #12
    yeah, i cant get that to converge. by the way is t1 - t0 the values up there or is it the difference between those times? i,e tk(1) - tk(2)
     
  14. Jul 20, 2011 #13

    hotvette

    User Avatar
    Homework Helper

    Hmmm, if that's the case, the author's description of equation 40 is misleading. He indicates the function to minimize is a function of a,b,c0 implying that all three need to be estimated. He should have said the function to minimize is a function of a,b where c0=xxxxx. Not well written.
     
  15. Jul 20, 2011 #14
    hotvette please could you try it, i cent get it work
     
  16. Jul 20, 2011 #15

    hotvette

    User Avatar
    Homework Helper

    Yeah, I was wondering that also. If the author uses consistent notation, t0 should be t @ k=0, which is zero according to equation 35. Kind of confusing.
     
  17. Jul 20, 2011 #16

    hotvette

    User Avatar
    Homework Helper

    If you mean a two parameter estimation using post #11 as the definition of c0, sure, but I don't think the result will be much better. The data points are close to linear. I doubt they will fit an exponential decay function very well no matter how much the parameters are manipulated. In fact, the fit should be worse because the value of c0 will be restricted, but I'll give it a try (later).
     
  18. Jul 20, 2011 #17
    What do you reckon about the original data being cumulative so:
    x tk
    1 1.2
    2 2.695
    3 4.325
    etc etc. that way t1-t0 would be that time, but fit the curve to the cumulative times?
    Edit! yeah, cumulative fits better, much better, and I am using the correct c0. however i am not using the individual timings but the cumulative time for T0, which doesnt seem correct...

    Found out that T0 is the time for the initial time value, and is therefore a constant
     
    Last edited: Jul 20, 2011
  19. Jul 20, 2011 #18

    hotvette

    User Avatar
    Homework Helper

    Yep, looks better using cumulative. Attached is three parameter fit. However, what do you mean by "Found out that T0 is the time for the initial time value, and is therefore a constant"? Pls elaborate.
     

    Attached Files:

    Last edited: Jul 20, 2011
  20. Jul 20, 2011 #19
    Yeah I got better too, but mine curves the other way...(attached). That is using D H's idea that c0 is not a parameter in itself.
    The website that you said you found the whole document at says that T0 is the time of the initial revolution, on the page called manual at the bottom somewhere....

    What have you plotted on the y axis? I plotted the cumulative time?
     

    Attached Files:

  21. Jul 20, 2011 #20

    hotvette

    User Avatar
    Homework Helper

    I made goof and just now edited my last post with the correct version. Almost a perfect fit (looks identical to yours), though I still used 3 parameters. Looks like you are on the right track.
     
    Last edited: Jul 20, 2011
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Approximation theory
  1. Control Theory (Replies: 2)

  2. Theory of Gearing (Replies: 14)

  3. Theory of bending (Replies: 1)

Loading...