Salome HOME
Documentation update with features and review corrections
[modules/adao.git] / doc / en / ref_algorithm_UnscentedKalmanFilter.rst
1 ..
2    Copyright (C) 2008-2024 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: UnscentedKalmanFilter
25 .. _section_ref_algorithm_UnscentedKalmanFilter:
26
27 Calculation algorithm "*UnscentedKalmanFilter*"
28 -----------------------------------------------
29
30 .. ------------------------------------ ..
31 .. include:: snippets/Header2Algo01.rst
32
33 This algorithm realizes an estimation of the state of a dynamic system by a
34 Kalman Filter using an "unscented" transform and a sampling by "sigma" points,
35 avoiding to have to perform the tangent and adjoint operators for the
36 observation and evolution operators, as in the simple or extended Kalman
37 filters.
38
39 It applies to non-linear observation and incremental evolution (process)
40 operators with excellent robustness and performance qualities. It can be
41 compared to the :ref:`section_ref_algorithm_EnsembleKalmanFilter`, whose
42 qualities are similar for non-linear systems.
43
44 We notice that there is no analysis performed at the initial time step
45 (numbered 0 in the time indexing) because there is no forecast at this time
46 (the background is stored as a pseudo analysis at the initial time step). If
47 the observations are provided in series by the user, the first one is therefore
48 not used. For a good understanding of time management, please refer to the
49 :ref:`schema_d_AD_temporel` and the explanations in the section
50 :ref:`section_theory_dynamic`.
51
52 In case of linear of "slightly" non-linear operators, one can easily use the
53 :ref:`section_ref_algorithm_ExtendedKalmanFilter` or even the
54 :ref:`section_ref_algorithm_KalmanFilter`, which are often far less expensive
55 to evaluate on small systems. One can verify the linearity of the operators
56 with the help of the :ref:`section_ref_algorithm_LinearityTest`.
57
58 There exists various variants of this algorithm. The following stable and
59 robust formulations are proposed here:
60
61 .. index::
62     pair: Variant ; UKF
63     pair: Variant ; S3F
64     pair: Variant ; CUKF
65     pair: Variant ; CS3F
66     pair: Variant ; 2UKF
67
68 - "UKF" (Unscented Kalman Filter, see [Julier95]_, [Julier00]_, [Wan00]_),
69   original and reference canonical algorithm, highly robust and efficient,
70 - "CUKF", also named "2UKF" (Constrained Unscented Kalman Filter, see
71   [Julier07]_), inequality or boundary constrained version of the  algorithm
72   "UKF",
73 - "S3F" (Scaled Spherical Simplex Filter, see [Papakonstantinou22]_),
74   improved algorithm, reducing the number of sampling (sigma) points to achieve
75   the same quality as the canonical "UKF" variant,
76 - "CS3F" (Constrained Scaled Spherical Simplex Filter), inequality or boundary
77   constrained version of the  algorithm "S3F".
78
79 The following are a few practical suggestions for the effective use of these
80 algorithms:
81
82 - The recommended variant of this algorithm is the "S3F" even if the canonical
83   "UKF" algorithm remains by default the more robust one.
84 - When there are no defined bounds, the constraint-aware versions of the
85   algorithms are identical to the unconstrained versions. This is not the case
86   if constraints are defined, even if the bounds are very wide.
87 - An essential difference between the algorithms is the number of sampling
88   "sigma" points used, depending on the :math:`n` dimension of the state space.
89   The canonical "UKF" algorithm uses :math:`2n+1`, the "S3F" algorithm uses
90   :math:`n+2`. This means that about twice as many evaluations of the function to
91   be simulated are required for one as for the other.
92 - The evaluations of the function to be simulated are algorithmically
93   independent at each filtering stage (evolution or observation) and can
94   therefore be parallelized or distributed if the function to be simulated
95   supports this.
96
97 .. ------------------------------------ ..
98 .. include:: snippets/Header2Algo12.rst
99
100 .. include:: snippets/FeaturePropLocalOptimization.rst
101
102 .. include:: snippets/FeaturePropDerivativeFree.rst
103
104 .. include:: snippets/FeaturePropParallelAlgorithm.rst
105
106 .. ------------------------------------ ..
107 .. include:: snippets/Header2Algo02.rst
108
109 .. include:: snippets/Background.rst
110
111 .. include:: snippets/BackgroundError.rst
112
113 .. include:: snippets/EvolutionError.rst
114
115 .. include:: snippets/EvolutionModel.rst
116
117 .. include:: snippets/Observation.rst
118
119 .. include:: snippets/ObservationError.rst
120
121 .. include:: snippets/ObservationOperator.rst
122
123 .. ------------------------------------ ..
124 .. include:: snippets/Header2Algo03AdOp.rst
125
126 .. include:: snippets/BoundsWithNone.rst
127
128 .. include:: snippets/ConstrainedBy.rst
129
130 .. include:: snippets/EstimationOf_State.rst
131
132 .. include:: snippets/AlphaBeta.rst
133
134 StoreSupplementaryCalculations
135   .. index:: single: StoreSupplementaryCalculations
136
137   *List of names*. This list indicates the names of the supplementary
138   variables, that can be available during or at the end of the algorithm, if
139   they are initially required by the user. Their availability involves,
140   potentially, costly calculations or memory consumptions. The default is then
141   a void list, none of these variables being calculated and stored by default
142   (excepted the unconditional variables). The possible names are in the
143   following list (the detailed description of each named variable is given in
144   the following part of this specific algorithmic documentation, in the
145   sub-section "*Information and variables available at the end of the
146   algorithm*"): [
147   "Analysis",
148   "APosterioriCorrelations",
149   "APosterioriCovariance",
150   "APosterioriStandardDeviations",
151   "APosterioriVariances",
152   "BMA",
153   "CostFunctionJ",
154   "CostFunctionJAtCurrentOptimum",
155   "CostFunctionJb",
156   "CostFunctionJbAtCurrentOptimum",
157   "CostFunctionJo",
158   "CostFunctionJoAtCurrentOptimum",
159   "CurrentOptimum",
160   "CurrentState",
161   "ForecastCovariance",
162   "ForecastState",
163   "IndexOfOptimum",
164   "InnovationAtCurrentAnalysis",
165   "InnovationAtCurrentState",
166   "SimulatedObservationAtCurrentAnalysis",
167   "SimulatedObservationAtCurrentOptimum",
168   "SimulatedObservationAtCurrentState",
169   ].
170
171   Example :
172   ``{"StoreSupplementaryCalculations":["CurrentState", "Residu"]}``
173
174 .. include:: snippets/Variant_UKF.rst
175
176 .. ------------------------------------ ..
177 .. include:: snippets/Header2Algo04.rst
178
179 .. include:: snippets/Analysis.rst
180
181 .. ------------------------------------ ..
182 .. include:: snippets/Header2Algo05.rst
183
184 .. include:: snippets/Analysis.rst
185
186 .. include:: snippets/APosterioriCorrelations.rst
187
188 .. include:: snippets/APosterioriCovariance.rst
189
190 .. include:: snippets/APosterioriStandardDeviations.rst
191
192 .. include:: snippets/APosterioriVariances.rst
193
194 .. include:: snippets/BMA.rst
195
196 .. include:: snippets/CostFunctionJ.rst
197
198 .. include:: snippets/CostFunctionJAtCurrentOptimum.rst
199
200 .. include:: snippets/CostFunctionJb.rst
201
202 .. include:: snippets/CostFunctionJbAtCurrentOptimum.rst
203
204 .. include:: snippets/CostFunctionJo.rst
205
206 .. include:: snippets/CostFunctionJoAtCurrentOptimum.rst
207
208 .. include:: snippets/CurrentOptimum.rst
209
210 .. include:: snippets/CurrentState.rst
211
212 .. include:: snippets/ForecastCovariance.rst
213
214 .. include:: snippets/ForecastState.rst
215
216 .. include:: snippets/IndexOfOptimum.rst
217
218 .. include:: snippets/InnovationAtCurrentAnalysis.rst
219
220 .. include:: snippets/InnovationAtCurrentState.rst
221
222 .. include:: snippets/SimulatedObservationAtCurrentAnalysis.rst
223
224 .. include:: snippets/SimulatedObservationAtCurrentOptimum.rst
225
226 .. include:: snippets/SimulatedObservationAtCurrentState.rst
227
228 .. ------------------------------------ ..
229 .. _section_ref_algorithm_UnscentedKalmanFilter_examples:
230
231 .. include:: snippets/Header2Algo06.rst
232
233 - :ref:`section_ref_algorithm_KalmanFilter`
234 - :ref:`section_ref_algorithm_ExtendedKalmanFilter`
235 - :ref:`section_ref_algorithm_EnsembleKalmanFilter`
236
237 .. ------------------------------------ ..
238 .. include:: snippets/Header2Algo07.rst
239
240 - [Julier95]_
241 - [Julier00]_
242 - [Julier07]_
243 - [Papakonstantinou22]_
244 - [Wan00]_
245 - [WikipediaUKF]_