Salome HOME
Documentation KF scheme improvement (text)
[modules/adao.git] / doc / fr / ref_algorithm_KalmanFilter.rst
1 ..
2    Copyright (C) 2008-2020 EDF R&D
3
4    This file is part of SALOME ADAO module.
5
6    This library is free software; you can redistribute it and/or
7    modify it under the terms of the GNU Lesser General Public
8    License as published by the Free Software Foundation; either
9    version 2.1 of the License, or (at your option) any later version.
10
11    This library is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
15
16    You should have received a copy of the GNU Lesser General Public
17    License along with this library; if not, write to the Free Software
18    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19
20    See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21
22    Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
23
24 .. index:: single: KalmanFilter
25 .. _section_ref_algorithm_KalmanFilter:
26
27 Algorithme de calcul "*KalmanFilter*"
28 -------------------------------------
29
30 .. ------------------------------------ ..
31 .. include:: snippets/Header2Algo01.rst
32
33 Cet algorithme réalise une estimation de l'état d'un système dynamique par un
34 filtre de Kalman.
35
36 Il est théoriquement réservé aux cas d'opérateurs d'observation et d'évolution
37 incrémentale (processus) linéaires, même s'il fonctionne parfois dans les cas
38 "faiblement" non-linéaire. On peut vérifier la linéarité de l'opérateur
39 d'observation à l'aide de l':ref:`section_ref_algorithm_LinearityTest`.
40
41 Conceptuellement, on peut représenter le schéma temporel d'action de
42 l'opérateur d'évolution de cet algorithme de la manière suivante, avec **x**
43 l'état et **P** la covariance d'erreur d'état :
44
45   .. _schema_temporel_KF:
46   .. image:: images/schema_temporel_KF.png
47     :align: center
48     :width: 100%
49   .. centered::
50     **Schéma temporel des étapes en assimilation par filtre de Kalman**
51
52 On remarque qu'il n'y a pas d'analyse effectuée au pas de temps initial
53 (numéroté 0 dans l'indexage temporel) car il n'y a pas de prévision à cet
54 instant (l'ébauche est stockée comme pseudo-analyse au pas initial). Si les
55 observations sont fournies en série par l'utilisateur, la première n'est donc
56 pas utilisée.
57
58 En cas de non-linéarité, même peu marquée, on lui préférera
59 l':ref:`section_ref_algorithm_ExtendedKalmanFilter`, ou
60 l':ref:`section_ref_algorithm_EnsembleKalmanFilter` et
61 l':ref:`section_ref_algorithm_UnscentedKalmanFilter` qui sont plus puissants.
62 On peut vérifier la linéarité des opérateurs à l'aide de
63 l':ref:`section_ref_algorithm_LinearityTest`.
64
65 .. ------------------------------------ ..
66 .. include:: snippets/Header2Algo02.rst
67
68 .. include:: snippets/Background.rst
69
70 .. include:: snippets/BackgroundError.rst
71
72 .. include:: snippets/EvolutionError.rst
73
74 .. include:: snippets/EvolutionModel.rst
75
76 .. include:: snippets/Observation.rst
77
78 .. include:: snippets/ObservationError.rst
79
80 .. include:: snippets/ObservationOperator.rst
81
82 .. ------------------------------------ ..
83 .. include:: snippets/Header2Algo03AdOp.rst
84
85 .. include:: snippets/EstimationOf.rst
86
87 StoreSupplementaryCalculations
88   .. index:: single: StoreSupplementaryCalculations
89
90   *Liste de noms*. Cette liste indique les noms des variables supplémentaires
91   qui peuvent être disponibles au cours du déroulement ou à la fin de
92   l'algorithme, si elles sont initialement demandées par l'utilisateur. Cela
93   implique potentiellement des calculs ou du stockage coûteux. La valeur par
94   défaut est une liste vide, aucune de ces variables n'étant calculée et
95   stockée par défaut sauf les variables inconditionnelles. Les noms possibles
96   sont dans la liste suivante : [
97   "Analysis",
98   "APosterioriCorrelations",
99   "APosterioriCovariance",
100   "APosterioriStandardDeviations",
101   "APosterioriVariances",
102   "BMA",
103   "CostFunctionJ",
104   "CostFunctionJAtCurrentOptimum",
105   "CostFunctionJb",
106   "CostFunctionJbAtCurrentOptimum",
107   "CostFunctionJo",
108   "CostFunctionJoAtCurrentOptimum",
109   "CurrentIterationNumber",
110   "CurrentOptimum",
111   "CurrentState",
112   "ForecastState",
113   "IndexOfOptimum",
114   "InnovationAtCurrentAnalysis",
115   "InnovationAtCurrentState",
116   "SimulatedObservationAtCurrentAnalysis",
117   "SimulatedObservationAtCurrentOptimum",
118   "SimulatedObservationAtCurrentState",
119   ].
120
121   Exemple :
122   ``{"StoreSupplementaryCalculations":["BMA", "CurrentState"]}``
123
124 .. ------------------------------------ ..
125 .. include:: snippets/Header2Algo04.rst
126
127 .. include:: snippets/Analysis.rst
128
129 .. ------------------------------------ ..
130 .. include:: snippets/Header2Algo05.rst
131
132 .. include:: snippets/Analysis.rst
133
134 .. include:: snippets/APosterioriCorrelations.rst
135
136 .. include:: snippets/APosterioriCovariance.rst
137
138 .. include:: snippets/APosterioriStandardDeviations.rst
139
140 .. include:: snippets/APosterioriVariances.rst
141
142 .. include:: snippets/BMA.rst
143
144 .. include:: snippets/CostFunctionJ.rst
145
146 .. include:: snippets/CostFunctionJAtCurrentOptimum.rst
147
148 .. include:: snippets/CostFunctionJb.rst
149
150 .. include:: snippets/CostFunctionJbAtCurrentOptimum.rst
151
152 .. include:: snippets/CostFunctionJo.rst
153
154 .. include:: snippets/CostFunctionJoAtCurrentOptimum.rst
155
156 .. include:: snippets/CurrentIterationNumber.rst
157
158 .. include:: snippets/CurrentOptimum.rst
159
160 .. include:: snippets/CurrentState.rst
161
162 .. include:: snippets/ForecastState.rst
163
164 .. include:: snippets/IndexOfOptimum.rst
165
166 .. include:: snippets/InnovationAtCurrentAnalysis.rst
167
168 .. include:: snippets/InnovationAtCurrentState.rst
169
170 .. include:: snippets/SimulatedObservationAtCurrentAnalysis.rst
171
172 .. include:: snippets/SimulatedObservationAtCurrentOptimum.rst
173
174 .. include:: snippets/SimulatedObservationAtCurrentState.rst
175
176 .. ------------------------------------ ..
177 .. include:: snippets/Header2Algo09.rst
178
179 .. include:: scripts/simple_KalmanFilter1.rst
180
181 .. literalinclude:: scripts/simple_KalmanFilter1.py
182
183 .. include:: snippets/Header2Algo10.rst
184
185 .. literalinclude:: scripts/simple_KalmanFilter1.res
186
187 .. include:: snippets/Header2Algo11.rst
188
189 .. _simple_KalmanFilter1_state:
190 .. image:: scripts/simple_KalmanFilter1_state.png
191   :align: center
192   :width: 90%
193
194 .. _simple_KalmanFilter1_variance:
195 .. image:: scripts/simple_KalmanFilter1_variance.png
196   :align: center
197   :width: 90%
198
199 .. include:: scripts/simple_KalmanFilter2.rst
200
201 .. literalinclude:: scripts/simple_KalmanFilter2.py
202
203 .. include:: snippets/Header2Algo10.rst
204
205 .. literalinclude:: scripts/simple_KalmanFilter2.res
206
207 .. include:: snippets/Header2Algo11.rst
208
209 .. _simple_KalmanFilter2_state:
210 .. image:: scripts/simple_KalmanFilter2_state.png
211   :align: center
212   :width: 90%
213
214 .. _simple_KalmanFilter2_variance:
215 .. image:: scripts/simple_KalmanFilter2_variance.png
216   :align: center
217   :width: 90%
218
219 .. ------------------------------------ ..
220 .. include:: snippets/Header2Algo06.rst
221
222 - :ref:`section_ref_algorithm_ExtendedKalmanFilter`
223 - :ref:`section_ref_algorithm_EnsembleKalmanFilter`
224 - :ref:`section_ref_algorithm_UnscentedKalmanFilter`
225
226 .. ------------------------------------ ..
227 .. include:: snippets/Header2Algo07.rst
228
229 - [Welch06]_
230 - [WikipediaKF]_