This software is made public for research use only. It may be modified and redistributed under the terms of the GNU General Public License.
Calculation of bounds on prediction errors in dynamical systems subject to modeling uncertainties. The theory is discussed in the manuscript B. K., G. Haller, Universal Upper Estimate for Prediction Errors under Moderate Model Uncertainty (submitted) [1].
Given a known dynamical system in the form \begin{equation} \dot{x} = f_0(x,t), \end{equation}
we can quantify the prediction errors in the presence of modeling errors of the form
where
Its leading eigenvalue is denoted by
If
The quantities
Then, the system's sensitivity with respect to modeling errors can be characterized by the following scalar over the time interval
where
To install and run the examples
- Clone the repository
git clone https://github.com/balintkaszas/ModelSensitivity.git
- In MATLAB, run the script
addPath.m
The software implements the calculation of the scalar field
function dy = f0(t, x)
dy(1) = x(2);
dy(2) = x(1) - x(1)^3 - 0.15*x(2) + 0.3*cos(t);
end
The Jacobian of the system must also be given. For example,
function dyGrad = grad_f0(t, x)
dyGrad = [0, 1; 1 - 2*x(1)^2, -0.15];
end
The invariants of the Cauchy-Green strain tensor may be computed from
- finite differencing
- using the equation of variations.
For finite differencing, an auxiliary grid is used. If the difference between gridpoints is
If the equation of variations is used, then the matrix-differential equation
is the flowmap-gradient.
As an example, let us assume that we wish to calculate MS for the damped-driven Duffing equation given by
$$
\dot{x}=y,
$$
$$
\dot{y} = x-x^3 -\delta y + A \cos t,
$$
with
Also assume that the derivative is available as a function handle in the file d_duffing.m
and the Jacobian is contained in d_duffing_grad.m
We first create a DynSystem object, by specifying the function handle, the dimensions of the phase space and the value of the model uncertainty:
duffing = DynSystem(@(t,x) d_duffing(t,x), 2, [1,1], @(t,x) d_duffing_grad(t,x));
Next, we set up the computational domain by creating a Grid object. We specify a grid of 250 by 250, over the domain
resolution = [250, 250];
domain = [-1.5, 1.5; -1.5, 1.5];
init = Grid(2, [1,2], resolution, domain, 1e-3);
timeSpan = [0, pi];
Then we can call the wrapper to calculate MS by providing the necessary arguments. The fourth argument enables parallelization, the fifth specifies the desired accuracy for the integration. The last argument is the method for the calculation of the flow-map gradient, this can be either 'finitedifference' or 'eov'.
ms = modelSensitivity(duffing, init, timeSpan, true, 1e-7, 'finitedifference');
The resulting MS field is
An example, in which the MS field is computable analytically is used for validation. The computation is detailed here.
[1] B. Kaszás, G. Haller, Universal Upper Estimate for Prediction Errors under Moderate Model Uncertainty, arXiv:2007.07330 [nlin.CD] (2020)