MATLAB Answers

Inf computed by model function, fitting cannot continue. Try using or tightening upper and lower bounds on coefficients.

조회 수: 193(최근 30일)
Kacper Witasinski
Kacper Witasinski 11 Feb 2021
편집: Matt J 16 Feb 2021
I have following problem:
I want to estimate battery parameters of 2RC network. I have data from discharge test. To estimate those parameters I want to use curve fitting toolbox, as many did in the literature. I am using following function:
y(x)= a + b*exp(-c*x) + d*exp(-f*x) ; y - terminal voltage ; x - time.
For some reason I have the error like in the topic:
"Inf computed by model function, fitting cannot continue. Try using or tightening upper and lower bounds on coefficients."
I have very large number of data (10k array for 1 parameter) so I decided to pay attention just to one iteration (relaxation zone, just after the pulse current). The error disappeared, but the fit created by the function y(x) is very, very poor. Basically, it is straight line, where it is supposed to be exponential I believe. R-square: -1.776e-15...
Using the function proposed by the toolbox, that is: y2(x) = a*exp(b*x) + c*exp(d*x) looks more promising and R-square value is 0.998 the actual fit shown on the plot is not so accurate, I'd say.
Below, I attached the screen of the interface. Any help would be extremely appreaciated

채택된 답변

Matt J
Matt J 16 Feb 2021
편집: Matt J 16 Feb 2021
the fit created by the function y(x) is very, very poor. Basically, it is straight line
The fit looks very good considering your data. Your data looks piece-wise exponential, whereas your model function is not.
  댓글 수: 3
Kacper Witasinski
Kacper Witasinski 16 Feb 2021
I did so, fit was pretty good (0.996) but it worked only for default exponential function (2 terms) given by mathworks. When I create the custom equation just to add the constant term to that (which corresponds to OCV in voltage kirchhoff's law) the same error appears again "inf computed by model function..." What is weird, the same error appears when the custom function is without constant term, which is in fact the same function as the default exponential.
Will it be physically correct if I would ommit the constant term (which in fact I can calculate all by myself)?

댓글을 달려면 로그인하십시오.

추가 답변(0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by