Levenberg-Marquardt Algorithm for more than one function

In summary, the conversation discusses the use of the Levenberg Marqurdt algorithm for minimizing errors of two functions at the same time. The speaker has previously used this algorithm to solve a similar problem with one error function, but is now struggling with how to calculate the Jacobian matrix for two functions. They are measuring two values over time in a lab and have developed a numerical forward model, but now need to solve the inverse problem to find unknown parameters. The conversation also touches on combining two measurement vectors into one and how to handle the error function in this case. Ultimately, the speaker is looking for assistance with minimizing the error of the combination of these two functions.
  • #1
Shauheen
2
0
I have been looking how to use the Levenberg Marqurdt algorithm for minimizing the errors of two functions at the same time. I looked up this topic in the internet and the only useful thing I found was a thread between "I like Serena" and "thomas430" in summer 2011.

https://www.physicsforums.com/showthread.php?t=521670

I read "I like Serena"'s notes, but still have problem in finding out how I have to calculate the Jacobian matrix.

I am measuring two values over time in the lab. Then, a numerical forward model has been developed which models the physics and now, I need to solve the inverse problem to find the unknown parameters. I have solved this problem previously several times when only one error function needed to be minimized. Based on what I have learned about LMA (from Inverse Heat Transfer by Necati Ozicik), the gradient of the error (from one function) will result in multiplication of the Jacobian matrix by the difference between the experimental and model results. This gradient needs to become zero:

∇S(P)=2[-∂T(P)/∂P][Y-T(P)]=0

In which P is the vector of the unknown parameters, T is the model value vector and Y is the experimental value.
This problem, minimizes S(P)=Ʃ[Yi-Ti(P)]^2

Now, I have to find let say 3 parameters from the minimization of two errors from my experiments. In my experiment, I measure two values vs. time, let say Y and M. These two values are dependent. The number of the collected data are not the same for these two and I think they are both equally important. I could check on the typical range of errors to make them equally significant.
My question is how to minimize the error of the combination of these two and find my unknowns?

Let say if the error is like:
E(P)=Ʃ[Yi-Ti(P)]^2+Ʃ[Mi-Ui(P)]^2

Ui and Ti are the values from my model.
What would be the Jacobian matrix in this case? for one function, it would be like:
P(k+1)=P(k)+[(J(k)T.J(k)+μ(k)Ω(k)]^-1 (J(k))T[Y-T(P(k))]
in which k is the kth iteration.

How would be the formulation once two functions are involved?

I would really appreciate if anyone could help.
 
Physics news on Phys.org
  • #2
Hello and welcome to PF, Shauheen! :smile:

I'm not sure if I understand everything in your problem yet, but as I understand it now, you have a measured vector Y and a model T(P) for it, and you also have a measured vector M and a model U(P) for it.

You can turn these 2 measurement vectors into one but putting them on top of each other.
Let's say we let N=(Y1, ..., Yn, M1, ..., Mm), and let V(P)=(T1(P), ..., Tn(P),U1(P), ..., Um(P)).
Then that reduces your problem back to where you have one measurement vector and one model vector function.
The new Jacobian matrix is basically a combination of the 2 separate Jacobian matrices.
 
  • #3
I like Serena said:
Hello and welcome to PF, Shauheen! :smile:

I'm not sure if I understand everything in your problem yet, but as I understand it now, you have a measured vector Y and a model T(P) for it, and you also have a measured vector M and a model U(P) for it.

You can turn these 2 measurement vectors into one but putting them on top of each other.
Let's say we let N=(Y1, ..., Yn, M1, ..., Mm), and let V(P)=(T1(P), ..., Tn(P),U1(P), ..., Um(P)).
Then that reduces your problem back to where you have one measurement vector and one model vector function.
The new Jacobian matrix is basically a combination of the 2 separate Jacobian matrices.


Thanks a lot I Like Serena for your kind welcome and reply to my question :)
Y and M are two different physical values. One is height change (I am tracking the height) and the other is mass. I start collecting each of these two data sets from time zero to t(final). Would that still be possible to put the two different physical value on top of each other in a matrix?
What would be my error then?

Physically in my mind, it is like plotting both curves vs. time and trying to match the two model to these curves with the same parameters, right?

I have attached for you a handwritten description about my problem and have attached it to this reply.

Thanks again for devoting your time.
 

Attachments

  • My Problem.jpg
    My Problem.jpg
    31.5 KB · Views: 454
  • #4
Shauheen said:
Thanks a lot I Like Serena for your kind welcome and reply to my question :)
Y and M are two different physical values. One is height change (I am tracking the height) and the other is mass. I start collecting each of these two data sets from time zero to t(final). Would that still be possible to put the two different physical value on top of each other in a matrix?
What would be my error then?

Physically in my mind, it is like plotting both curves vs. time and trying to match the two model to these curves with the same parameters, right?

I have attached for you a handwritten description about my problem and have attached it to this reply.

Thanks again for devoting your time.

You can put the 2 vectors on top of each other.
The result is not so much a matrix, but just another vector.

The error function can be the same to what you already have:
$$E(P)=\sum_{i=1}^{n+m}[N_i-V_i(P)]^2=\sum_{i=1}^{n}[Y_i-T_i(P)]^2+\sum_{i=1}^{m}[M_i-U_i(P)]^2$$
where n is the number of Y measurements and m is the number of M measurements.When you have solved the system, useful properties will be:
$$s_Y = \sqrt{\frac{\sum[Y_i-T_i(P)]^2}{n-1}}$$
$$s_M = \sqrt{\frac{\sum[M_i-U_i(P)]^2}{m-1}}$$
where ##s_Y## is the standard deviation of the error in the Y measurements and ##s_M## is the standard deviation of the error in the M measurements.
 
  • #5


I would suggest that you start by breaking down the problem into smaller, more manageable parts. First, focus on understanding the Levenberg-Marquardt algorithm for minimizing one function. This will give you a solid foundation and understanding of the algorithm.

Once you have a good understanding of the algorithm for one function, you can then move on to applying it to multiple functions. In this case, you will need to consider the relationship between the two functions and how they affect each other. This will help you determine the appropriate formulation for the Jacobian matrix.

It may also be helpful to consult with other researchers or experts in the field who have experience with using the Levenberg-Marquardt algorithm for multiple functions. They may be able to provide insights and guidance on how to approach and solve this problem.

Overall, the key is to break down the problem into smaller parts and build your understanding and knowledge step by step. With persistence and careful consideration, you will be able to successfully apply the Levenberg-Marquardt algorithm to minimize the errors of multiple functions.
 

1. What is the Levenberg-Marquardt Algorithm?

The Levenberg-Marquardt Algorithm is a mathematical optimization method used for solving nonlinear least squares problems. It is often used in data fitting and curve fitting applications.

2. How does the Levenberg-Marquardt Algorithm work?

The algorithm combines the steepest descent method with the Gauss-Newton method to find the minimum of a sum of squares of nonlinear functions. It uses a combination of gradient descent and Hessian matrix to iteratively update the parameters until a local minimum is reached.

3. Can the Levenberg-Marquardt Algorithm be used for more than one function?

Yes, the algorithm can be extended to solve a system of nonlinear equations with multiple functions. It is commonly used in curve fitting applications where there are multiple data points and multiple parameters to be optimized.

4. What are the advantages of using the Levenberg-Marquardt Algorithm?

The algorithm is known for its fast convergence rate and robustness. It also allows for the incorporation of constraints on the parameters, making it suitable for a wide range of optimization problems.

5. Are there any limitations to the Levenberg-Marquardt Algorithm?

While the algorithm is efficient and effective for many problems, it may not always converge to the global minimum and can get stuck in local minima. It also requires an initial guess for the parameters, which may affect the final results.

Similar threads

  • Linear and Abstract Algebra
Replies
17
Views
4K
  • Linear and Abstract Algebra
Replies
1
Views
1K
  • Linear and Abstract Algebra
Replies
1
Views
1K
  • Programming and Computer Science
Replies
2
Views
895
  • Differential Equations
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
843
  • Engineering and Comp Sci Homework Help
Replies
1
Views
895
  • Programming and Computer Science
Replies
8
Views
1K
  • General Math
Replies
11
Views
1K
  • Programming and Computer Science
Replies
15
Views
2K
Back
Top