cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

how to fit parameters using an implicit model equation in mathcad

FanCG
1-Visitor

how to fit parameters using an implicit model equation in mathcad

The question is described as following. An model function with implict form is chosen to fit the experimental data (x,y)

unknown parameters to be fitted are a, epsilon and epsilon_A.

I dont know how to evaluate parameters with the implicit form model in mathad.

does anyone give me some suggestions?

fitting question.JPG

ACCEPTED SOLUTION

Accepted Solutions
ViktorKorobov
14-Alexandrite
(To:FanCG)

Look at my solution. I assume k= Boltsmann constant (?); T= Temperature, K (?).

For MINERR use option Levenberg-Marquardt.

FanCG_problem_pic.JPG

Viktor

View solution in original post

6 REPLIES 6
ViktorKorobov
14-Alexandrite
(To:FanCG)

Look at my solution. I assume k= Boltsmann constant (?); T= Temperature, K (?).

For MINERR use option Levenberg-Marquardt.

FanCG_problem_pic.JPG

Viktor

thank you so much, viktor

and I will try to change the initial value of epsilon to a "0-close" negative value (according to its physical significance) to see whether this code can work (I forgot the T in my thread, it should be 384.15, but you have guessed the value of k and T)

I think I always have problems in using MinErr of Mathcad ( very unfamiliar with this function).

thank you again for ur great help

the temperature T should be 308K

and there is an error in my model function

the correct model function is

未命名.JPG

but I still got the similar parameter values to your results.

epsilon is still a positive number, this makes me a little confused, for epsilon represents a kind of intermolecular force that makes sense when it is negative in this case.

I will study your solution and try to do it again

thanks.

You should be aware that when using minerr a constraint such as epsilon<0 is not a hard constraint. The error in meeting the constraint is simply minimized, along with the other residuals. If you want a hard constraint you need to weight the constraint very heavily, for example epsilon*10^100<0.

FanCG
1-Visitor
(To:RichardJ)

so how about using other functions instead of minerr?

I changed the constraints to 10^30*epsilon<0, and got the resonable value for epsilon, but the fitting curve was not as good as earlier

RichardJ
19-Tanzanite
(To:FanCG)

so how about using other functions instead of minerr?

There isn't really any better option. You just have to be aware of how the constraints are handled, and weight them accordingly.

I changed the constraints to 10^30*epsilon<0, and got the resonable value for epsilon, but the fitting curve was not as good as earlier

Yes, I noticed that. In fact, it's rather poor. The fact that the model does not fit the data when you constrain the parameters to physically realistic values implies that something is wrong with either your model or your data.

Announcements

Top Tags