You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/lecture_12/lecture.md
+54-42Lines changed: 54 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Ordinary Differencial equations
1
+
# Uncertainty Propagation in Ordinary Differential Equations
2
2
3
-
Differential equations are commonly used in science to describe many aspects of the physical world, ranging from dynamical systems, curves in space, to complex multi-physics phenomena.
3
+
Differential equations are commonly used in science to describe many aspects of the physical world, ranging from dynamical systems and curves in space to complex multi-physics phenomena.
4
4
5
5
As an example, consider a simple non-linear ordinary differential equation:
6
6
@@ -61,13 +61,18 @@ Is simple and working (with sufficienty small ``dt``):
61
61
62
62

63
63
64
+
ODE of this kind is an example of a "complex" simulation code that we may want to use, interact with, modify or incorporate into a more complex scheme.
65
+
- we will test how to re-define the elemnetary oeprations using custom types, automatic differnetiation and automatic code generation
66
+
- we will redefine the plotting operation to display the new type correctly
67
+
- we will use composition to incorporate the ODE into a more complex solver
68
+
64
69
65
70
## Uncertainty propagation
66
71
67
72
Prediction of the ODE model is valid only if all parameters and all initial conditions are accurate. This is almost never the case. While the number of sheep can be known, the number of wolfes in a forest is more uncertain. The same model holds for predator-prey in insects where the number of individuals can be only estimated.
68
73
69
74
Uncertain initial conditions:
70
-
- number given by a probability distribution
75
+
- number of predators and prey given by a probability distribution
71
76
- interval ``[0.8,1.2]`` corresponds to uniform distribution ``U(0.8,1.2)``
72
77
- gaussian ``N(\mu,\sigma)``, with mean ``\mu`` and standard deviation ``\sigma`` e.g. ``N(1,0.1)``
73
78
- more complicated distributions are more realistic (the number of animals is not negative!)
@@ -121,21 +126,18 @@ import Base: +, *
121
126
122
127
For the ODE we need multiplication of two Gaussians. Using Taylor expansion and neglecting covariances:
- The linearization-based approach propogates through the non-linearity only the mean and models its neighborhood by a plane.
179
-
- Propagating all samples
184
+
- Propagating all samples is too expensive
185
+
- Methods based on quadrature or cubature rules are a compromise
180
186
181
187
182
-
A more sophisticated approach is based on moment matching:
188
+
The cubature approach is based on moment matching:
183
189
```math
184
190
\mu_g = \int g(x) p(x) dx
185
191
```
@@ -198,17 +204,12 @@ In multivariate setting, the same problem is typically solved with the aim to re
198
204
199
205
One of the most popular approaches today is based on cubature rules approximating the Gaussian in radial-spherical coordinates.
200
206
201
-
## Cubature rules
207
+
###Cubature rules
202
208
203
209
Consider Gaussian distribution with mean ``\mu`` and covariance matrix ``\Sigma`` that is positive definite with square root ``\sqrt\Sigma``, such that ``\sqrt\Sigma \sqrt\Sigma^T=\Sigma``. The quadrature pints are:
204
210
```math
205
-
X_q = \mu .+ \sqrt\Sigma Q
206
-
```
207
-
where ``Q=[q_1,\ldots q_{2d}]`` are constant vectors
0 commit comments