Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions KalmanFilter-LinearPredatorPreyModel.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,31 @@
"If we do not know the source evolution, it can simply be simulated with persistence:\n",
"$$ \\frac{dx_2}{dt} = 0 $$\n",
"\n",
"If we use a forward Euler scheme, we have\n",
"$$\n",
"x_0(k+1) = 0.9 x_0(k) + 0.2 x_1(k)\\\\\n",
"x_1(k+1) = -0.2 x_0(k) + x_1(k) + x_2(k)\\\\\n",
"x_2(k+1) = x_2(k)\n",
"$$\n",
"\n",
"or in a matrical notation\n",
"\n",
"$$\n",
"\\begin{pmatrix}\n",
"0.9 & 0.2 &0 \\\\\n",
"-0.2 & 1 & 1\\\\\n",
"0 & 0& 1\n",
"\\end{pmatrix}\n",
"\\cdot\n",
"\\begin{pmatrix}\n",
"x_0\\\\ x_1\\\\ x_2\n",
"\\end{pmatrix}_{k+1}\n",
"=\n",
"\\begin{pmatrix}\n",
"x_0\\\\ x_1\\\\ x_2\n",
"\\end{pmatrix}_k\n",
"$$\n",
"\n",
"The model is implemented as a class, below. The `forecast` function of this class propagates in time not only the state ${\\bf x}=(x_0, x_1, x_2)$ of the model, but also the covariance matrix. This is made using a square-root decomposition of the covariance matrix and by propagating each column of this square-root. The class also includes basic plotting functions.\n",
"\n",
"Here, the problem tackled by data assimilation is to retrieve the source term ($x_2$) using observations of the other variables (predators, typically), and not knowing the seasonal dynamics of the source: We assume persistence."
Expand Down Expand Up @@ -361,7 +386,7 @@
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"language": "python2",
"name": "python2"
},
"language_info": {
Expand All @@ -374,7 +399,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
"version": "2.7.13"
}
},
"nbformat": 4,
Expand Down