Curve fitting for coupled monod equation
7 ビュー (過去 30 日間)
古いコメントを表示
Sharmila Sathyamurthy
2020 年 9 月 25 日
コメント済み: Sharmila Sathyamurthy
2020 年 9 月 26 日
Hello,
I have a code here that solves Monod's kinetics. This is a model for 2 different organisms. The product of the first one is the substrate for the second one.
I have used ode45 to solve the differential equation. And for most of the variables in equation I have given an estimated value. Now I am attempting to do non-linear fitting procedures like lsqcurvefit.
The SolveMonod has the ODE45 and gives values of time, substrate concentration and Biomass concentration.
Now I need to estimate the values in the differential equation, I understand that I need to use curvefitting (non-linear fitting) lsqcurvefit. Can you please guide me as I am new to coding and struggling for quite a few days.
Thank you
function S = SolveMonod1(MuYKsb,t)
sx0 = [1000 10000000 0 10000000];
timespan = [0 200];
MuYKsb = [0.2 1e8 300 0.01 0.2 1e8 300 0.01];
[T,SX] = ode45(@Monod, timespan, sx0);
function dSX = Monod(t,sx);
sxdot = zeros(4,1);
sxdot(1) = -(MuYKsb(1).* sx(2).* sx(1))./(MuYKsb(2).*(MuYKsb(3)+sx(1)));
sxdot(2) = (MuYKsb(1).* sx(2).* sx(1))./(MuYKsb(3)+ sx(1))-(MuYKsb(4).*sx(2));
sxdot(3) = -(MuYKsb(5).* sx(4).* sx(3))./(MuYKsb(6).*(MuYKsb(7)+sx(3)))-sxdot(1);
sxdot(4) = (MuYKsb(1).* sx(4).* sx(3))./(MuYKsb(7)+ sx(3))-(MuYKsb(8).*sx(4));
dSX = sxdot;
end
S1 = SX(:,1);
X1 = SX(:,2);
X1 = X1/100000000;
S2 = SX(:,3);
X2 = SX(:,4);
X2 = X2/100000000;
plot(T,S1,T,S2,T,X1,T,X2);
end
0 件のコメント
採用された回答
Star Strider
2020 年 9 月 25 日
There are several options. Two are linked to here.
A second option using the ga (genetic algorithm) function to estimate them, see: Parameter Estimation for a System of Differential Equations (It has the same title, however with a much different approach, and updated code.)
It will be straightforward to adapt those to your problem.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Smoothing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!