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

  • Context: Graduate 
  • Thread starter Thread starter nemisis42
  • Start date Start date
  • Tags Tags
    Data Fitting
Click For Summary

Discussion Overview

The discussion revolves around the application of the Levenberg-Marquardt method for fitting parameters in Young's equation related to double slit refraction. Participants explore the methodology for curve fitting, error analysis, and the implications of non-linear least squares fitting in this context.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant inquires about the correct application of the Levenberg-Marquardt method for fitting parameters in Young's equation, providing the mathematical formulation used.
  • Another participant confirms the method's application but questions the clarity of the dependent and independent variables involved in the fitting process.
  • General advice is offered regarding the Jacobian matrix, including checking its condition number and the sensitivity of convergence to initial parameter guesses.
  • A participant reports resolving an issue with faulty x-values and seeks guidance on performing error analysis for the fitted parameters, expressing uncertainty about the approach due to the non-linear nature of the equation.
  • One suggestion involves approximating the fit function using a Maclaurin series to derive error estimates similar to multiple linear regression.
  • A later reply clarifies that only the first two terms of the series are needed, suggesting that this resembles standard linear regression.

Areas of Agreement / Disagreement

Participants generally agree on the use of the Levenberg-Marquardt method, but there are differing views on the specifics of error analysis and the appropriateness of using a Maclaurin series for this purpose. The discussion remains unresolved regarding the best approach for error estimation in this context.

Contextual Notes

Participants express uncertainty about the definitions of dependent and independent variables, the condition number of the Jacobian matrix, and the implications of the non-linear nature of the fitting function on error analysis.

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.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
8
Views
2K
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
6K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
25
Views
15K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K