More Curve Fitting with Python: Complicated Models with Vastly Varying Parameters

preview_player
Показать описание
We return to the topic of curve fitting. We will fit a complicated nonlinear differential algebraic equation system to experimental data. This problem is compounded by the fact the parameters we are searching for vary by over 10 orders of magnitude. We can fit such a system in the usual way using the curve_fit or minimize function, but the vast difference in the parameters will cause problems with the algorithms. One needs to rescale these numbers in such a way as to be roughly the same order of magnitude. We will accomplish this (for this case), by coding to fit the log of the parameters instead.

Рекомендации по теме
Комментарии
Автор

Always learn something from your videos, thanks.

fizixx
Автор

Hi Kevin, thank you very much for your video. I have one question. What is the best way to code for physical parameters that are function of other variables ? For example, diffusion coefficient can be function of temperature, concentration, porosity, etc, . In Matlab, you may use anonymous function but in python, can you use lambda function for this case ? Thanks.

derick
Автор

Hi, very interesting video. I am trying to do a similar fit with data of cyclic voltamperometries in fuel cells, however I have tried to use the assimulo package with RungeKutta4 but when I print my results I just get the initial value repeated over the whole array of results. Would you recommend using another method of assimulo package of Implicit type or try to change the parameters of the method (for example the step size, time of simulation, etc.) I hope you can help me with this, thank you a lot .

kirbyfpp
Автор

Hello Kevin, your videos are very helpful. I am also trying to working on the same problem but using equivalent circuit of the battery. I am trying to fit experimental data with my model by estimating parameters R0, R1, R2, C1 and C2. I have tried with curve_fit however, not getting the expected result. Could you please help me out with this.

nupurtembhare