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

In summary: The remainder of the series is just terms that are too small to be of any real significance. You can use a computer to approximate the fit function, but you don't need to do anything special to calculate error estimates.
  • #1
nemisis42
6
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
  • #2
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.
 
  • #3
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.
 
  • #4
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.
 
  • #5
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?
 
  • #6
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.
 

1. What is Young's equation?

Young's equation, also known as the contact angle equation, is a mathematical relationship that describes the wetting properties of a liquid on a solid surface. It relates the contact angle formed between the liquid and the solid surface to the interfacial energies between the liquid, solid, and vapor phases.

2. What is data fitting in relation to Young's equation?

Data fitting is the process of finding the best mathematical model that describes a set of experimental data. In the context of Young's equation, data fitting involves using experimental measurements of contact angles to determine the values of the interfacial energies that are needed in the equation to accurately represent the wetting behavior of a liquid on a solid surface.

3. Why is data fitting important for Young's equation?

Data fitting is important for Young's equation because it allows us to determine the interfacial energies that are critical for understanding the wetting behavior of a liquid on a solid surface. These energies are not always directly measurable, so data fitting provides a way to obtain them from experimental data and use them to make predictions about the wetting properties of different liquids on different surfaces.

4. What are the challenges of data fitting Young's equation?

One of the main challenges of data fitting Young's equation is that it requires accurate and precise measurements of contact angles, which can be difficult to obtain. Additionally, there are often multiple parameters in the equation that need to be determined, making the data fitting process more complex and time-consuming.

5. How can data fitting Young's equation be used in practical applications?

Data fitting Young's equation has many practical applications, particularly in industries that deal with surface coatings, adhesives, and other materials that involve wetting behavior. It can be used to optimize the properties of these materials for specific applications, as well as to understand and predict the behavior of liquids on different surfaces, which is important in fields such as microfluidics, nanotechnology, and biomedical engineering.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
887
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
978
  • Set Theory, Logic, Probability, Statistics
Replies
12
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
1K
Replies
10
Views
5K
  • Advanced Physics Homework Help
Replies
1
Views
614
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
10
Views
2K
Replies
2
Views
3K
Back
Top