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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How do I improve the fitting results within the range close to zero with Minerr

FanCG
1-Visitor

How do I improve the fitting results within the range close to zero with Minerr

Hello, everyone,

I met with a problem of fitting data of adsorption experiments (3 parameters - P1,P2 and P3(or beta) ), and I did it with Minerr  function, but the results near 0 are needed to be improved. Could anyone teach me?

the results given by Orgin is shown below.

to be updated.PNG

the mathcad file (ver. 11)  is also attached

ACCEPTED SOLUTION

Accepted Solutions
AlanStevens
17-Peridot
(To:FanCG)

If you replace the n^2 with i^2 in both exponential terms you will get a better fit (it means Werner's speed-up method is no longer valid though).

(Werner's method of directly equating y with Rate within the solve block is still to be preferred.)

Alan

View solution in original post

9 REPLIES 9
Werner_E
25-Diamond I
(To:FanCG)

I cant help with improving the fit and I am not sure, if a better fit using the model function you provide is possible at all. The output of Origin seems to depend on different data and maybe a different model - we can't see.

The usual tricks like decreasing TOL and/or CTOL and weighting the constraints don't make for much change.

But in any case you can speed up calculation in Mathcad by simplifying you function y() using a precalculated sum.

Furthermore you don't need your function Residual with its for-loop if you make use of vectorisation:

BTW, it looks to me that n=1 gives a better fit which looks more close to what ORIGIN provided:

AlanStevens
17-Peridot
(To:FanCG)

If you replace the n^2 with i^2 in both exponential terms you will get a better fit (it means Werner's speed-up method is no longer valid though).

(Werner's method of directly equating y with Rate within the solve block is still to be preferred.)

Alan

I have looked through the very original reference article,and found that you are right, thx a lot

Werner_E
25-Diamond I
(To:FanCG)

Here you see your model (y) and Alans suggestion (y1) in comparison (with n=2 they are the same, of course). Note the value of ERR.

I noticed that when I try to load the file I posted I get an error because the data definition is corrupt. So I defined the data in a different way in the attached file and saved it in MC11 format this time.

Werner_E
25-Diamond I
(To:FanCG)

BTW, it may not be what you are looking for, but you get a far better fit using a Weibull regression. You my either use genfit

or as you did using minerr (look at ERR)

Werner

FanCG
1-Visitor
(To:Werner_E)

many thanks

I have rewrite my code and use the vector symbol to simplify my cal sheet.

It looks to me like Fan CG is looking for a regression function and maybe even a very specific one - not a simple interpolation. But I may be wrong about that.

RichardJ
19-Tanzanite
(To:FanCG)

It looks to me as though there is a discontinuity in the Origin graph, just below 0.8 on the y-axis. The exponential curve appears to change into a straight line at that point, which is then drawn to x=0, y=0. It's hard to tell from a bitmap image, so I could be wrong, but if my eye follows the trend of the exponential curve then it looks to me like it should do what yours does, and intercept the y-axis at about 0.75.

The initial, steep, part of the curve has very few points compared to the rest of the curve, so it has limited influence on the fit. You can give it greater influence by weighting the residuals, but the price you pay is a worse fit elsewhere. The data just does not seem to be well represented by the model.

Announcements

Top Tags