optimization of multiple parameters in 4th order Runga Kutta

2 views (last 30 days)
I am trying to model multiple serial and simultaneous kinetic reactions using a 4th order runga kutta. I have 8 parameters (rate constants) that need to be optimized. I am having limited success using lsqnonlin however it will not let me set the upper or lower bounds. I only need the values to remain positive. When I put in a value for the lower bounds it crashes. Is there a different optimization procedure I should use that would be better? This is what I have that is working to a limited degree. Thanks!!!
LB = [];
UB = [];
X0=[a,b,c,d,e,f,h,i];
OPTIONS = optimset('TolX',1e-50,'TolFun',1e-50);
[X,RESNORM,RESIDUAL,EXITFLAG,OUTPUT,LAMBDA] = lsqnonlin('optim_k',X0,LB,UB,OPTIONS);
a=X(1);
b=X(2);
c=X(3);
d=X(4);
e=X(5);
f=X(6);
h=X(7);
i=X(8);
[T,y] = ode45('RK4',tspan,y0);

Accepted Answer

Star Strider
Star Strider on 8 Nov 2015
This may provide some guidance: Monod kinetics and curve fitting.
  2 Comments
emm252
emm252 on 8 Nov 2015
I just don't really see how this helps me, the system I am trying to solve is not monod kinetics, but just a variety of chemical equations:
A<->B k=a,b
A<->C k=c,d
C->B k=e
C->D (sink) k=set value
B<->F k=e,f
B->products k=h
F->products k=i
with the ks being the forward and backwards rate constants I am trying to optimize.
Star Strider
Star Strider on 8 Nov 2015
That post fits rate constants for the equations solved by ode45 in the Monod kinetics functions.
I offer it as a guide in your coding your own system of equations and estimating your own rate constants from your data. It won’t help you unless you code your kinetic equations and implement them in ode45 correctly.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!