How can I define a gradient function that can update k values after each iteration to optimize parameters in ODEs?

1 view (last 30 days)
I need to optimize three parameters (k1,k2,k3) by solving two ODEs.
For example,
C2' = k1*C1 - k3*C3 - k2*C2
C3' = k3*C3 - C2
C_total = C2 + C3
C_total and C1 are known data.
The only approach I can think of right now is to try different k-values using gradient method and find k-values that minimize SSE (sum(C_total_true - C_total_pred)^2) since I have C_total data avaiable.
How can I define a gradient function that can update k values after each iteration?

Answers (1)

Star Strider
Star Strider on 26 Feb 2021
One option is the approach in Parameter Estimation for a System of Differential Equations. You will need to modify the ‘kinetics’ code to use your system of differential equations, and to fit the data.
The necessary data would be a time vector and as much dependent variable data as available. The ‘theta’ values would be the ‘k’ values in your system. (I have subsequently updated that code, and I can provide an update if necessary.)

Community Treasure Hunt

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

Start Hunting!