Newton method for nonlinear equation system

Newton method for nonlinear equation system - Messages

#1 Posted: 3/23/2019 5:44:12 PM
romanoffff

romanoffff

0 likes in 5 posts.

Group: User

Hello everybody.
I`m trying to fit Coffin-Menson curve to data generated by Coffin-Menson equation using least squares method.
For that I use an example code from File not found. wth some modifications File not found., but code tells me,
that something is going wrong and I can`t find out the reason.
I will be appriciated, if someone is able to explain it.
Thank you in advance.
#2 Posted: 3/23/2019 10:36:09 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Hello everybody.
I`m trying to fit Coffin-Menson curve to data generated by Coffin-Menson equation


... you must have data set to fit a model function .
Your data set is experimental, post it as raw as possible.
Easy to experiment a fit.
Hopefully the data set is not too long. If it has to be created
it takes about ½ a day to create a 700 data set. Just a job
like any other from *.PDF or else source.

Welcome ... cheers, Jean

Please, come back.

#3 Posted: 3/23/2019 11:29:02 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi Romanoff. Your setup it's basically correct, and I guess that it theoretically must to work, with the only addition of Clear(i) in the body of the target function. But that's only in theory. Problem here is that the Jacobian require the evaluation for a symbolic derivatives for a target function with 104 elements for each sum by four rows with four variables. Even maybe SMath could get some result for that, you also must to invert that Jacobian, which I guess that it can't be done for some reasonable time.

In the attached you found a pure numerical Jacobian and it's inversion. In green a couple of notes. Theoretically, it's works. But again, just theory. In the practice I don't understand the construction of your target function. In the second attached, a simplification for the setup. Your start point seems to be the actual solution.

Hope that this notes helps.

Least_squares_method.sm (52 KiB) downloaded 53 time(s).
Least_squares_method revised.sm (35 KiB) downloaded 62 time(s).

Best regards.
Alvaro.
#4 Posted: 3/24/2019 9:05:32 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I`m trying to fit Coffin-Menson curve to data generated by Coffin-Menson equation using least squares method.


LS [least Squares], that's all what it is: Cholesky solver.
It is the core algorithm of the CG [Conjugate Gradient],
which CG is more powerful to fit model function.
Lot many fit techniques and methods in Smath.
Only experimental data are needed, model function if available.

Jean

Cholesky.PNG

PolyFit QUICK_Scale.sm (53 KiB) downloaded 43 time(s).
#5 Posted: 3/24/2019 10:24:10 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Just an exercise, it suggest a model fit rather polyfit.

Romanoffff.sm (65 KiB) downloaded 36 time(s).
#6 Posted: 3/24/2019 10:55:43 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Just an exercise, it suggests a model fit rather than polyfit.


... slightly better fit. My point is: NO experimental data => NO fit !

Romanoffff[1].sm (57 KiB) downloaded 42 time(s).
#7 Posted: 3/24/2019 3:34:15 PM
romanoffff

romanoffff

0 likes in 5 posts.

Group: User

Thank you very much for your answers, any way, I need to think a little about ways you`ve proposed. It looks, like my problem is partly solved, but stability of the convergence is the issue. When I slightly change parameters of the model, even 1000 iterations is not enough. And another one thing, when you look at b derivative, evaluated by Smath it looks fine, but c derivatve despite of the same function structure looks absolutely different.
To make a script, which works, I`ve chose the simplest way, I tried to fit function to points with known function used to get them.
#8 Posted: 3/24/2019 5:13:11 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Thank you very much for your answers, any way, I need to think a little about ways you`ve proposed.


I just introduced you to a fitting example.
You fit to experimental data ... raw data.
Trust the old man that has fitted 100's data sets.
many of them never done by NIST...
Just raw data, something will result.
You confuse yourself from literature that does not fit data.
Engineering and literature don't go together.
#9 Posted: 4/3/2019 2:47:21 AM
romanoffff

romanoffff

0 likes in 5 posts.

Group: User

So, I`ve tried to adopt Smath file Jean Giraud showed, but have some issues.I`m truing to fit function f(x,Ni)el(x,1)*(Ni)^el(x,2)+el(x,3)*(Ni)^el(x,4)) to experimental points: Ni:mat(729,1000,3000,10000,30000,100000,6,1) ε_res:mat(1.9996,1.6798,1.0557,0.7854,0.6741,0.6046,6,1), where Ni- number of full cycles till rupture, ε_res,- strain range. The issue is, that in your examples derivatives are functions of one variable, but in case of my one it is function of 2 variables, for example, derivative by el(x,2) is el(x,1)*(Ni)^el(x,2)*ln(Ni). Could you please give me an advise, how to fit this function, Pure Newton`s method doesn`t give me convergence.
Thank you in advance.
#10 Posted: 4/3/2019 3:07:01 AM
romanoffff

romanoffff

0 likes in 5 posts.

Group: User

It seems, that I found an example https://en.smath.com/forum/yaf_postst13833_Approximate-solution-of-equation-system.aspx I`ll try to adopt it to my data.
Thanks.
#11 Posted: 4/3/2019 9:54:35 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

It seems, that I found an example https://en.smath.com/for...-of-equation-system.aspx I`ll try to adopt it to my data.


If you purchase strain gauge, they come with the corresponding factor
and if applicable the reading equipment will compensate for temperature.
What I understand: you are experimenting some strain gauge material
simulating some real application. In that case, from the experimental
data as collected, you want a model function and the best representative
fit to the data. Then, only the data are needed.
If you just have a graph from the lab test, that's good enough.
Please don't be shy, Smath Community is worth a Gold Bridge
As you don't look familiar enough with fitting data, you may
obscure yourself by some examples that you will gather here/there.
Cheers ... Jean is waiting to hear more from you.

My last involvement with strain gauge was at Pratt-Whitney [1986]
designing test bench. Just purchased from Omega, plug in the
Data Logging input card.

#12 Posted: 4/3/2019 11:26:42 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

It seems, that I found an example


The example you are referring is one of the hardest in my collection.
This model is ultimately reflexive. It is not the worst, some just
can't be fitted at all ... only by hand trial/error.
On the other hand, CG [Conjugate Gradient] is robust for models
not reflexive or slightly reflexive.
Here is a refreshed version.

Cheers ... Jean

Genfit al_ nleqsolve VERY Difficult ConjugateGradient.sm (69 KiB) downloaded 55 time(s).

#13 Posted: 4/3/2019 12:12:46 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

If you just have a graph from the lab test, that's good enough.


No problem to fit either one in the elastic region !

StrainGauge.PNG

  • New Posts New Posts
  • No New Posts No New Posts