MATLAB: Fitting global parameters using fminsearch with nested ode

fminsearchodeode45optimizationparameter estimation

Hello,
I have a problem fitting a parameter to experimental data. The model equations build a system of ODE´s. The simplified version looks like this (A and B are model parameters, C is a constant):
dx1_dt = -A*(x1-x2)
dx2_dt = A*(x1-x2) - B*(x2-C)
The task is to estimate the optimal value of A and B for both, x1(t) and x2(t).
Currently I use fminsearch with a nested ode45 in a loop. I calculate the RMSE for x1 and x2, then add them together to a global RMSE and give it back to fminsearch as quality criteria. It works quite well if you´re not in a hurry.
But I believe theres a better way to do it.
Please consider that I don´t have access to any toolboxes. I am aware of fminsearch´s drawbacks. More generally I am wondering how the algorithm should look like.
Thanks in advance.
mulm

Best Answer

I refer you to: Monod kinetics and curve fitting. I used lsqcurvefit here, but you can use fminsearch with slight modification of the code.