Is Levenberg-Marquardt the Correct Method for Fitting Young's Equation?

  • Thread starter Thread starter nemisis42
  • Start date Start date
  • Tags Tags
    Data Fitting
nemisis42
Messages
6
Reaction score
0
I was wondering if anyone could help me with this, I've been trying to curve fit Young's formula for double slit refraction:

=Io*sinc(alpha)^2*cos(beta)^2

alpha=a*sin(theta)*Pi/wavelength
beta=b*sin(theta)*Pi/wavelength

with a and b as the parameters I'm trying to find. I've been trying to use the Iteration:

[new parameter]=[initial parameter]-u*[J^T*J+d*I]^(-1)*J^T*(f-y)

with J being the Jacobian matrix. I basically followed the pdf:

Non-Linear Least Squares: Levenberg-Marquardt Method

can anyone tell me if this is the correct way to use the Levenberg-Marquardt method, or if that is even the method i should be using? i would appreciate any help on this.
 
Physics news on Phys.org
Your use of Levenberg-Marquardt method looks correct. What isn't clear is what the dependent variable (i.e. the observed output) is nor what the independent variable(s) are (i.e. measured input). Is there just a single independent variable?

Nonetheless, there are general comments about nonlinear least squares that might be beneficial:

1. Make sure your expression for J is correct (i.e. that you've properly taken partial derivatives). One practical way to check is to compare the terms of J with numerical differentiation based on the fitting function

2. Check the condition number of J. If it is low, then you probably don't even need Levenberg-Marquardt (i.e. d can be 0). If it is high, there could be numerical stability problems and LM could be very important. The choice of value for d can also be important. Sorry, I don't know any rule of thumb for choosing value for d.

3. Convergence of non linear least squares problems can be extremely sensitive to the values of the initial guesses for the unknown parameters. Since there are only 2, it might be practical to plot the fitting function and data points and make multiple guesses for the unknown parameters. It is often rather easy to come up good initial estimates by pure trial & error.
 
Thank you for replying to this. I did solve the problem (I had faulty x-values). I have another question for you if you don't mind. As you know I took the data values for young's double slit diffraction experiment to curve fit parameters for a and b (the single and double slit spacing. I used the levenberg-marquardt method and using the maple program I curve fitted several sets of approximatly 600 points each. I got sufficient results(a=0.000085m b=0.00041) just to give you an idea. My issue now is trying to perform some error analysis. I'm trying to find the error and uncertainty around the curve fitted values a and b, but I'm really not sure how to go about this. I have all the data such as the uncertainty with the wavelength for instance, but given the number of data points, (and the extremely non-linear nature of the original young's equation) I don't really know how I should proceed. I would appreciate any ideas you may have and I completely understand if this isn't the type of thing you do. Thanks.
 
The way this is usually handled is to approximate the fit function with a function linear in the parameters by taking a Maclaurin series around the optimum. Then you can calculate error estimates as you would for multiple linear regression. There are also some stats you can calculate to estimate how good this linear approximation is.
 
I understand that in theory, but my equation is:

f(x)=I*sin(sin(x)*Pi*s/g)^2*g^2*cos(sin(x)*Pi*d/g)^2/(sin(x)^2*Pi^2*s^2) with f(x) and x being the data values taken, I, Pi and g being constants, and s and d being the the parameters being curve fitted. The Maclaurin series to the 4th degree is if I'm not mistaken is

I+(-I*Pi^2*d^2/g^2+((1/3*I)*Pi^2*s^2/g^2+(2*I)*Pi*s*(-(1/6)*Pi*s/g-(1/6)*Pi^3*s^3/g^3)/g)*g^2/(Pi^2*s^2))*x^2

How can you solve this? I don't think you can do it the same way as multiple linear regression. Am I missing something?
 
I did a bad job of explaining that. I probably shouldn't have said "Maclaurin series". While that's technically correct, you only want the first two terms: the constant and the linear term. That looks like a standard linear regression.
 
Hi all, I've been a roulette player for more than 10 years (although I took time off here and there) and it's only now that I'm trying to understand the physics of the game. Basically my strategy in roulette is to divide the wheel roughly into two halves (let's call them A and B). My theory is that in roulette there will invariably be variance. In other words, if A comes up 5 times in a row, B will be due to come up soon. However I have been proven wrong many times, and I have seen some...
Thread 'Detail of Diagonalization Lemma'
The following is more or less taken from page 6 of C. Smorynski's "Self-Reference and Modal Logic". (Springer, 1985) (I couldn't get raised brackets to indicate codification (Gödel numbering), so I use a box. The overline is assigning a name. The detail I would like clarification on is in the second step in the last line, where we have an m-overlined, and we substitute the expression for m. Are we saying that the name of a coded term is the same as the coded term? Thanks in advance.
Back
Top