Curve Fitting Toolbox do not provide decent fitting. Inf computed by model function, fitting cannot continue. Try using or tightening upper and lower bounds on coefficients.

21 Ansichten (letzte 30 Tage)
I have the following problem:
I am working on an automated battery parameter estimation tool to estimate the battery parameters of an RC equivalent circuit model. For that, the first step consists in determining how many RC branches are necessary, given the data. And I have data from an HPPC test. So I want to see whether I shoul use a 1-RC equivalent circuit model, a 2-RC ECM or even a 3-RC ECM and I want to use MATLAB Curve Fitting toolbox. My objective is to try to fit the governing equation of my RC-equivalent circuit model with the data of a charging pulse from my HPPC test. The governing equation of my 2-RC equivalent circuit model is:
y(x) = a + b*exp(-c*x) + d*exp(-f*x), where y is the terminal voltage of my 2-RC-ECM and x is the time.
For some reason, when I use MATLAB cftool, with, as Custom Equation, the governing equation above, I have a straight line and the fitting is very bad. My guess is that the equation is not "Centered and scaled". But I don't know how to center and scale with my data on the "Custom equation" mode.
The weird part is that, when I use the "Exponential" type of the cftool with 2 terms, the curve fits the data pretty accurately.
Below, I attached a screen of the curve fit I have with "Custom equation".
My question is: how can I make my equation fit the data with the cftool.
Any help would be extremely appreciated.

Akzeptierte Antwort

Sam Chak
Sam Chak am 18 Mai 2022
I think the answer is to "correctly guess" the equation that fits the data by trial-and-error method.
If you already know the behavior of the RC circuit, then use mathematical model in the literature.
Else, please attach the data for a deeper investigation.
  6 Kommentare
Thomas Madoki
Thomas Madoki am 18 Mai 2022
@Sam Chak Thank you very much, it works!
I still have one question: how do you explain the fact that when using MATLAB cftool with the cursor put on 'Exponential' mode instead of 'Custom equation' with that same data, it gives a pretty good fit? How come when I use exponentials with the 'Custom equation' mode, the fitting is really poor (it is simply a straight line) but not when using 'Exponential' mode?
Once again, thank you for your help.
Sam Chak
Sam Chak am 18 Mai 2022
Don't mention it, @Thomas Madoki.
I'm unsure, probably the built-in algorithm of the exponential function is effective.
By the way, thanks to you suggestion, Now, you have a better fit.
General model:
f(x) = 0.3683*(x - 1)^(1/3.679) + 2.319 + a*exp(b*(x - 1)^c)
Coefficients (with 95% confidence bounds):
a = 0.0106 (0.01017, 0.01103)
b = -2.786e+04 (-5.055e+04, -5162)
c = 0.9406 (0.8618, 1.019)
Goodness of fit:
SSE: 0.000119
R-square: 0.9405
Adjusted R-square: 0.9399
RMSE: 0.000762

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with Curve Fitting Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by