Selaa lähdekoodia

Fixed source distribution.

shkolnick-kun 3 vuotta sitten
vanhempi
commit
3fbf22d3c1

+ 1 - 1
MANIFEST.in

@@ -1 +1 @@
-include src/* src/configpy/*
+include src/* src/configpy/* LICENSE Readme.md

+ 0 - 26
doc/AdaptiveCorrection.html

@@ -14443,38 +14443,12 @@ where $\mathbf{M}_{b}^{-1} =  \theta \cdot \mathbf{\bar{S}}_{b}$</p>
 </ul>
 <p>So $\alpha_{b} \gt 0$ for all cases when the correction is necessary i.e. the existence of $H_{\infty}$ filter is proven.</p>
 
-</div>
-</div>
-<div class="jp-Cell-inputWrapper"><div class="jp-InputPrompt jp-InputArea-prompt">
-</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
-<h1 id="Application-to-Sigma-Point-Kalman-Filters">Application to Sigma Point Kalman Filters<a class="anchor-link" href="#Application-to-Sigma-Point-Kalman-Filters">&#182;</a></h1><p>In Sigma Point Kalman Filters (SPKF, see <a href="#merwe"><strong>[Merwe2004]</strong></a>) Weighted Statistical Linear Regression technique is used to approximate nonlinear process and measurement functions:</p>
-<p>$\mathbf{y} = g(\mathbf{x}) = \mathbf{A} \mathbf{x} + \mathbf{b} + \mathbf{e}$,</p>
-<p>$\mathbf{P}_{ee} = \mathbf{P}_{yy} - \mathbf{A} \mathbf{P}_{xx} \mathbf{A}^{\top}$</p>
-<p>where:</p>
-<p>$\mathbf{e}$ is an approximation error,</p>
-<p>$\mathbf{A} = \mathbf{P}_{xy}^{\top} \mathbf{P}_{xx}^{-1}$,</p>
-<p>$\mathbf{b} = \mathbf{\bar{y}} - \mathbf{A} \mathbf{\bar{x}}$,</p>
-<p>$\mathbf{P}_{xx} = \displaystyle\sum_{i} {w}_{ci} \left( \mathbf{\chi}_{i} - \mathbf{\bar{x}} \right) \left( \mathbf{\chi}_{i} - \mathbf{\bar{x}} \right)$,</p>
-<p>$\mathbf{P}_{yy} = \displaystyle\sum_{i} {w}_{ci} \left( \mathbf{\gamma}_{i} - \mathbf{\bar{y}} \right) \left( \mathbf{\gamma}_{i} - \mathbf{\bar{y}} \right)$,</p>
-<p>$\mathbf{P}_{xy} = \displaystyle\sum_{i} {w}_{ci} \left( \mathbf{\chi}_{i} - \mathbf{\bar{x}} \right) \left( \mathbf{\gamma}_{i} - \mathbf{\bar{y}} \right)$,</p>
-<p>$\mathbf{\gamma}_{i} = g(\mathbf{\chi}_{i})$</p>
-<p>$\mathbf{\bar{x}} = \displaystyle\sum_{i} {w}_{mi} \mathbf{\chi}_{i}$,</p>
-<p>$\mathbf{\bar{y}} = \displaystyle\sum_{i} {w}_{mi} \mathbf{\gamma}_{i}$,</p>
-<p>${w}_{ci}$ are covariation weghts, ${w}_{mi}$ are mean weights.</p>
-<p>This means that approximation errors of measurement may be treated as a part of additive noise and so we show that in SPKF we can use the following approximation of $\mathbf{S}_{k}$:</p>
-<p>$\mathbf{S}_{k} = \mathbf{H}_{k} \mathbf{P}_{k|k-1} \mathbf{H}_{k}^{\top} + \mathbf{\tilde{R}}_{k}$,</p>
-<p>where</p>
-<p>$\mathbf{H}_{k} = \mathbf{P}_{xz, k}^{\top} \mathbf{P}_{xx, k}^{-1}$,</p>
-<p>$\mathbf{\tilde{R}}_{k} = \mathbf{R}_{k} + \mathbf{P}_{ee, k}$,</p>
-<p>and so we can use the above adaptive correction in case of SPKF divergence.</p>
-
 </div>
 </div>
 <div class="jp-Cell-inputWrapper"><div class="jp-InputPrompt jp-InputArea-prompt">
 </div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
 <h1 id="References">References<a class="anchor-link" href="#References">&#182;</a></h1><p><a name="banavar"></a><strong>[Banavar1992]</strong> R. Banavar, “A game theoretic approach to linear dynamic estimation”, Doctoral Dissertation, University of Texas at Austin, May 1992.</p>
 <p><a name="horn_et_al"></a><strong>[Horn et al]</strong> R.A. Horn, C.R Johnson, Charles R. “Matrix Analysis (2nd ed.).”, Cambridge University Press, 2013, ISBN 978-0-521-38632-6.</p>
-<p><a name="merwe"></a><strong>[Merwe2004]</strong> R. van der Merwe, "Sigma-Point Kalman Filters for ProbabilisticInference in Dynamic State-Space Models",  PhD Thesis, OGI School of Science &amp; Engineering, Oregon Health &amp; Science University, USA.</p>
 
 </div>
 </div>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 8787 - 0
doc/UsingEKFTricksWithSPKF.html


+ 1 - 50
doc/src/AdaptiveCorrection.ipynb

@@ -306,53 +306,6 @@
     "So $\\alpha_{b} \\gt 0$ for all cases when the correction is necessary i.e. the existence of $H_{\\infty}$ filter is proven.\n"
    ]
   },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "# Application to Sigma Point Kalman Filters\n",
-    "\n",
-    "In Sigma Point Kalman Filters (SPKF, see [**[Merwe2004]**](#merwe)) Weighted Statistical Linear Regression technique is used to approximate nonlinear process and measurement functions:\n",
-    "\n",
-    "$\\mathbf{y} = g(\\mathbf{x}) = \\mathbf{A} \\mathbf{x} + \\mathbf{b} + \\mathbf{e}$,\n",
-    "\n",
-    "$\\mathbf{P}_{ee} = \\mathbf{P}_{yy} - \\mathbf{A} \\mathbf{P}_{xx} \\mathbf{A}^{\\top}$\n",
-    "\n",
-    "where: \n",
-    "\n",
-    "$\\mathbf{e}$ is an approximation error, \n",
-    "\n",
-    "$\\mathbf{A} = \\mathbf{P}_{xy}^{\\top} \\mathbf{P}_{xx}^{-1}$, \n",
-    "\n",
-    "$\\mathbf{b} = \\mathbf{\\bar{y}} - \\mathbf{A} \\mathbf{\\bar{x}}$,\n",
-    "\n",
-    "$\\mathbf{P}_{xx} = \\displaystyle\\sum_{i} {w}_{ci} \\left( \\mathbf{\\chi}_{i} - \\mathbf{\\bar{x}} \\right) \\left( \\mathbf{\\chi}_{i} - \\mathbf{\\bar{x}} \\right)$,\n",
-    "\n",
-    "$\\mathbf{P}_{yy} = \\displaystyle\\sum_{i} {w}_{ci} \\left( \\mathbf{\\gamma}_{i} - \\mathbf{\\bar{y}} \\right) \\left( \\mathbf{\\gamma}_{i} - \\mathbf{\\bar{y}} \\right)$,\n",
-    "\n",
-    "$\\mathbf{P}_{xy} = \\displaystyle\\sum_{i} {w}_{ci} \\left( \\mathbf{\\chi}_{i} - \\mathbf{\\bar{x}} \\right) \\left( \\mathbf{\\gamma}_{i} - \\mathbf{\\bar{y}} \\right)$,\n",
-    "\n",
-    "$\\mathbf{\\gamma}_{i} = g(\\mathbf{\\chi}_{i})$\n",
-    "\n",
-    "$\\mathbf{\\bar{x}} = \\displaystyle\\sum_{i} {w}_{mi} \\mathbf{\\chi}_{i}$,\n",
-    "\n",
-    "$\\mathbf{\\bar{y}} = \\displaystyle\\sum_{i} {w}_{mi} \\mathbf{\\gamma}_{i}$,\n",
-    "\n",
-    "${w}_{ci}$ are covariation weghts, ${w}_{mi}$ are mean weights.\n",
-    "\n",
-    "This means that approximation errors of measurement may be treated as a part of additive noise and so we show that in SPKF we can use the following approximation of $\\mathbf{S}_{k}$:\n",
-    "\n",
-    "$\\mathbf{S}_{k} = \\mathbf{H}_{k} \\mathbf{P}_{k|k-1} \\mathbf{H}_{k}^{\\top} + \\mathbf{\\tilde{R}}_{k}$, \n",
-    "\n",
-    "where \n",
-    "\n",
-    "$\\mathbf{H}_{k} = \\mathbf{P}_{xz, k}^{\\top} \\mathbf{P}_{xx, k}^{-1}$,\n",
-    "\n",
-    "$\\mathbf{\\tilde{R}}_{k} = \\mathbf{R}_{k} + \\mathbf{P}_{ee, k}$,\n",
-    "\n",
-    "and so we can use the above adaptive correction in case of SPKF divergence."
-   ]
-  },
   {
    "cell_type": "markdown",
    "metadata": {},
@@ -361,9 +314,7 @@
     "\n",
     "<a name=\"banavar\"></a>**\\[Banavar1992\\]** R. Banavar, “A game theoretic approach to linear dynamic estimation”, Doctoral Dissertation, University of Texas at Austin, May 1992.\n",
     "\n",
-    "<a name=\"horn_et_al\"></a>**\\[Horn et al\\]** R.A. Horn, C.R Johnson, Charles R. “Matrix Analysis (2nd ed.).”, Cambridge University Press, 2013, ISBN 978-0-521-38632-6.\n",
-    "\n",
-    "<a name=\"merwe\"></a>**\\[Merwe2004\\]** R. van der Merwe, \"Sigma-Point Kalman Filters for ProbabilisticInference in Dynamic State-Space Models\",  PhD Thesis, OGI School of Science & Engineering, Oregon Health & Science University, USA.\n"
+    "<a name=\"horn_et_al\"></a>**\\[Horn et al\\]** R.A. Horn, C.R Johnson, Charles R. “Matrix Analysis (2nd ed.).”, Cambridge University Press, 2013, ISBN 978-0-521-38632-6.\n"
    ]
   },
   {

+ 86 - 0
doc/src/UsingEKFTricksWithSPKF.ipynb

@@ -0,0 +1,86 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Using EKF tweaks with Sigma Point Kalman Filters\n",
+    "\n",
+    "In Sigma Point Kalman Filters (SPKF, see [**[Merwe2004]**](#merwe)) Weighted Statistical Linear Regression technique is used to approximate nonlinear process and measurement functions:\n",
+    "\n",
+    "$\\mathbf{y} = g(\\mathbf{x}) = \\mathbf{A} \\mathbf{x} + \\mathbf{b} + \\mathbf{e}$,\n",
+    "\n",
+    "$\\mathbf{P}_{ee} = \\mathbf{P}_{yy} - \\mathbf{A} \\mathbf{P}_{xx} \\mathbf{A}^{\\top}$\n",
+    "\n",
+    "where: \n",
+    "\n",
+    "$\\mathbf{e}$ is an approximation error, \n",
+    "\n",
+    "$\\mathbf{A} = \\mathbf{P}_{xy}^{\\top} \\mathbf{P}_{xx}^{-1}$, \n",
+    "\n",
+    "$\\mathbf{b} = \\mathbf{\\bar{y}} - \\mathbf{A} \\mathbf{\\bar{x}}$,\n",
+    "\n",
+    "$\\mathbf{P}_{xx} = \\displaystyle\\sum_{i} {w}_{ci} \\left( \\mathbf{\\chi}_{i} - \\mathbf{\\bar{x}} \\right) \\left( \\mathbf{\\chi}_{i} - \\mathbf{\\bar{x}} \\right)$,\n",
+    "\n",
+    "$\\mathbf{P}_{yy} = \\displaystyle\\sum_{i} {w}_{ci} \\left( \\mathbf{\\gamma}_{i} - \\mathbf{\\bar{y}} \\right) \\left( \\mathbf{\\gamma}_{i} - \\mathbf{\\bar{y}} \\right)$,\n",
+    "\n",
+    "$\\mathbf{P}_{xy} = \\displaystyle\\sum_{i} {w}_{ci} \\left( \\mathbf{\\chi}_{i} - \\mathbf{\\bar{x}} \\right) \\left( \\mathbf{\\gamma}_{i} - \\mathbf{\\bar{y}} \\right)$,\n",
+    "\n",
+    "$\\mathbf{\\gamma}_{i} = g(\\mathbf{\\chi}_{i})$\n",
+    "\n",
+    "$\\mathbf{\\bar{x}} = \\displaystyle\\sum_{i} {w}_{mi} \\mathbf{\\chi}_{i}$,\n",
+    "\n",
+    "$\\mathbf{\\bar{y}} = \\displaystyle\\sum_{i} {w}_{mi} \\mathbf{\\gamma}_{i}$,\n",
+    "\n",
+    "${w}_{ci}$ are covariation weghts, ${w}_{mi}$ are mean weights.\n",
+    "\n",
+    "This means that approximation errors of measurements may be treated as a part of additive noise and so we show that in SPKF we can use the following approximation of $\\mathbf{S}_{k}$:\n",
+    "\n",
+    "$\\mathbf{S}_{k} = \\mathbf{H}_{k} \\mathbf{P}_{k|k-1} \\mathbf{H}_{k}^{\\top} + \\mathbf{\\tilde{R}}_{k}$, \n",
+    "\n",
+    "where \n",
+    "\n",
+    "$\\mathbf{H}_{k} = \\mathbf{P}_{xz, k}^{\\top} \\mathbf{P}_{xx, k}^{-1}$,\n",
+    "\n",
+    "$\\mathbf{\\tilde{R}}_{k} = \\mathbf{R}_{k} + \\mathbf{P}_{ee, k}$,\n",
+    "\n",
+    "this enables us to use some EKF tricks such as adaptive correction or generalized linear models with SPKF."
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# References\n",
+    "\n",
+    "<a name=\"merwe\"></a>**\\[Merwe2004\\]** R. van der Merwe, \"Sigma-Point Kalman Filters for ProbabilisticInference in Dynamic State-Space Models\",  PhD Thesis, OGI School of Science & Engineering, Oregon Health & Science University, USA"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.12"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}

+ 2 - 1
pyproject.toml

@@ -1,2 +1,3 @@
 [build-system]
-requires = ["setuptools", "Cython"]
+requires = ["setuptools", "wheel", "Cython", "numpy", "scipy"]
+build-backend = "setuptools.build_meta"

+ 1 - 0
setup.py

@@ -45,6 +45,7 @@ setup(
         ],
       setup_requires=deps,
       install_requires=deps,
+      python_requires='>=3',
       platforms = ['any'],
       ext_modules = cythonize(extensions,
                               compiler_directives={'language_level' : '3'})

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä