How can I parameter estimate many unknown parameters in a system of nonlinear ODE?

1 回表示 (過去 30 日間)
george
george 2018 年 8 月 8 日
コメント済み: george 2018 年 8 月 16 日
Hello,
I have been following the links below:
  • https://www.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and-curve-fitting
  • https://www.mathworks.com/matlabcentral/answers/361328-parameter-estimation-and-curve-fitting?s_tid=answers_rc1-2_p2_MLT
  • https://www.mathworks.com/matlabcentral/answers/386011-help-me-please-how-to-find-parameter-estimation-with-fminsearch-and-solve-it-with-ode45-why-it-al
  • https://www.mathworks.com/matlabcentral/answers/329901-solving-coupled-differential-equations
I find them helpful, but when I implement the method to my own system of ODE. I am generating wrong answers with the initial guesses I am using from a research manuscript I am following (the parameters used to refit the ode model does not match well with the exp data graphs). So I decided to randomly guess the initial parameter guess using rand. But the code takes over 2 hours to run, so I usually terminate it before the code actually finishes. I tried to use MultiStart to get better parameter initial guesses, but I am not sure if it is working. Am I doing something wrong with the code? Would it be best to use something else other than lsqcurvefit?
I have attached the excel file for the data and the code itself. Many thanks if this problem can be fixed, I have been stuck for weeks now!

回答 (1 件)

Arthur Goldsipe
Arthur Goldsipe 2018 年 8 月 14 日
I see that you mentioned SimBiology in a comment on the previous answer. I'm a developer on that product, so I wanted to share that it is designed specifically for this sort of problem. You can build the model graphically or programmatically with building blocks like reactions that more closely map to the underlying biology. (Not to mention the fact that this can save you a lot of bookkeeping.) You can also give variables more meaningful names, instead of having to figure out what y(6)/c(38) means.
There are also a lot of performance benefits. The way we do the ODE simulations in SimBiology is also typically quite a bit faster than doing the simulations in core MATLAB yourself. My rule of thumb is that we usually give at least a 20X speedup.
I personally have also spent a lot of time trying to make it easier and faster to do "large" fitting problems exactly like this. When using gradient-based optimization methods like lsqnonlin, we can often provide more accurate estimates of gradients than the default. This can help with the convergence of the algorithm. I have also worked on a couple of global optimization methods that make it easier to scan a large parameter space. Most recently, I implemented an enhanced scatter search algorithm that combines both global and local optimization techniques.
If this sounds interesting to you, I can take a look to see how much work I think it would be to convert your problem over to SimBiology.
  3 件のコメント
Arthur Goldsipe
Arthur Goldsipe 2018 年 8 月 16 日
Sorry for the delayed reply. If I understand your question, the easiest way to incorporate extracellular activities is to introduce a compartment in the model that represents the extracellular space. You can create reactions that involve species in both your extracellular and cellular space. SimBiology will do the correct bookkeeping for conservation of mass, as long as you use the correct stoichiometric coefficients, volumes, and units on the model.
One way for you to check that you've set up your model correctly is to view the ODE equations for it. You can do that by calling getequations(m1).
It's difficult for me to say whether you have set up any specific reaction correctly. I would need to understand the details of how you intend to model your system. I know you've tried to provide references to address this, but I'm afraid I haven't had time to read the entire PDF you attached to an earlier comment. One way you could help is to show me specific terms from specific differential equations, and I can help you confirm that you've translated them correctly into reactions.
I also want to mention another alternative. If it's too difficult for you to reverse-engineer the reactions for your system, you can also directly enter your differential equations into SimBiology using rate rules . For example, let's consider the simplest of systems, degradation of a species with mass action kinetics. You could model it in the following two ways:
% Create the model
model = sbiomodel('m1');
% I recommend turning on unit conversion
configset = getconfigset(model);
configset.CompileOptions.UnitConversion = true;
% Create the compartment and species
c = addcompartment(model, 'cell', 100, 'CapacityUnits', 'micrometer^3');
addparameter(model, 'k', 0.1, 'ValueUnits', '1/second');
addspecies(c, 's1', 10, 'InitialAmountUnits', 'millimole/liter');
% Model the reaction for s1 using a reaction object
reaction = addreaction(model, 's1 -> null');
kl1 = addkineticlaw(reaction, 'MassAction');
kl1.ParameterVariableNames = {'k'};
% Model the reaction for s2 using a rate rule
addspecies(c, 's2', 10, 'InitialAmountUnits', 'millimole/liter');
rule = addrule(model, 's2 = -k*s2', 'rate');
% Simulate the model and plot the results
sd = sbiosimulate(model);
sbioplot(sd);
If you're still stuck, let me know. It's best if you can make your question as specific as possible.
-Arthur
george
george 2018 年 8 月 16 日
Thank you for following up!
I will try the suggestion above and directly enter my system of ode into SimBiology using rate rules. I have attached an image of the reaction rates for extracellular concentration in an older comment called "Sample Reaction eqns." Let me know if you need that PDF from an earlier comment.
Thanks again. I will try that rate rule method.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeBuild Models についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by