Skip to content

Numerical implementation for the calculation of bounds on prediction errors in dynamical systems subject to modeling uncertainties.

License

Notifications You must be signed in to change notification settings

balintkaszas/ModelSensitivity

Repository files navigation

Model Sensitivity

License

This software is made public for research use only. It may be modified and redistributed under the terms of the GNU General Public License.

Motivation

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

we can quantify the prediction errors in the presence of modeling errors of the form

where represents white noise. These bounds are expressed as functions of the invariants of the Cauchy-Green strain tensor of the idealized model:

Its leading eigenvalue is denoted by .

If is the idealized solution of and is the real solution, the leading order error is bounded by

The quantities and denote the maximal value of the modeling errors

Then, the system's sensitivity with respect to modeling errors can be characterized by the following scalar over the time interval , at the point ,

where .

Installation

To install and run the examples

  • Clone the repository git clone https://github.com/balintkaszas/ModelSensitivity.git
  • In MATLAB, run the script addPath.m

Implementation

The software implements the calculation of the scalar field . The idealized -dimensional model must be provided in the form of a function handle. For example, the damped-driven Duffing oscillator (see below) may be specified as

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.

Finite differencing

For finite differencing, an auxiliary grid is used. If the difference between gridpoints is , then around each gridpoint, an auxiliary grid is created with size . In this case, the Jacobian is not used for the calculation.

Equation of variations

If the equation of variations is used, then the matrix-differential equation

is solved. The solution obeying the initial condition

is the flowmap-gradient.

Example

As an example, let us assume that we wish to calculate MS for the damped-driven Duffing equation given by

with

and

.

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: and . For simplicity, both deltas are chosen to be 1 here.

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

Validation

An example, in which the MS field is computable analytically is used for validation. The computation is detailed here.

References

[1] B. Kaszás, G. Haller, Universal Upper Estimate for Prediction Errors under Moderate Model Uncertainty, arXiv:2007.07330 [nlin.CD] (2020)

About

Numerical implementation for the calculation of bounds on prediction errors in dynamical systems subject to modeling uncertainties.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published