Modeling dynamical processes with differential equations (ODE's) and parameter fitting
by using the
To check the precision of the numerical integration of the ODE's, the outcome of the analytical solution with a given set of parameters (see table 1) of widely used differential equations, as the logistic growth function and the Richards function, are contrasted to the numerical solutions of the RKF method of both differential equations (fig. 1). The maximum deviance is in the range 1E-8.
The related VBA code:
dy(1) = r * y(1) * (1 - y(1) / K)
dy(2) = r * y(2) * (1 - (y(2) / K) ^ gamma)
The second check is the accuracy of the estimated parameters for both the analytical and numerical solution of both ODE's.
Table 1: Parameter comparison of fitted ODE-models to first the analytical models and second to numerical solved models
|Parameter||True parameter||Fit to analytical model||Fit to numerical model|
The results show minor deviance from the exact target value, while the fit to the numerical solution appears marginal poorer compared to the fit to the analytical solution of both models. It is up to the user whether such uncertainties of the fitting process are acceptable for his needed precision.