Salome HOME
Observer norm complement and documentation
[modules/adao.git] / doc / en / ref_algorithm_ExtendedKalmanFilter.rst
1 ..
2    Copyright (C) 2008-2015 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: ExtendedKalmanFilter
25 .. _section_ref_algorithm_ExtendedKalmanFilter:
26
27 Calculation algorithm "*ExtendedKalmanFilter*"
28 ----------------------------------------------
29
30 Description
31 +++++++++++
32
33 This algorithm realizes an estimation of the state of a dynamic system by a
34 extended Kalman Filter, using a non-linear calculation of the state.
35
36 Optional and required commands
37 ++++++++++++++++++++++++++++++
38
39 .. index:: single: AlgorithmParameters
40 .. index:: single: Background
41 .. index:: single: BackgroundError
42 .. index:: single: Observation
43 .. index:: single: ObservationError
44 .. index:: single: ObservationOperator
45 .. index:: single: Bounds
46 .. index:: single: ConstrainedBy
47 .. index:: single: EstimationOf
48 .. index:: single: StoreSupplementaryCalculations
49
50 The general required commands, available in the editing user interface, are the
51 following:
52
53   Background
54     *Required command*. This indicates the background or initial vector used,
55     previously noted as :math:`\mathbf{x}^b`. Its value is defined as a
56     "*Vector*" or a *VectorSerie*" type object.
57
58   BackgroundError
59     *Required command*. This indicates the background error covariance matrix,
60     previously noted as :math:`\mathbf{B}`. Its value is defined as a "*Matrix*"
61     type object, a "*ScalarSparseMatrix*" type object, or a
62     "*DiagonalSparseMatrix*" type object.
63
64   Observation
65     *Required command*. This indicates the observation vector used for data
66     assimilation or optimization, previously noted as :math:`\mathbf{y}^o`. It
67     is defined as a "*Vector*" or a *VectorSerie* type object.
68
69   ObservationError
70     *Required command*. This indicates the observation error covariance matrix,
71     previously noted as :math:`\mathbf{R}`. It is defined as a "*Matrix*" type
72     object, a "*ScalarSparseMatrix*" type object, or a "*DiagonalSparseMatrix*"
73     type object.
74
75   ObservationOperator
76     *Required command*. This indicates the observation operator, previously
77     noted :math:`H`, which transforms the input parameters :math:`\mathbf{x}` to
78     results :math:`\mathbf{y}` to be compared to observations
79     :math:`\mathbf{y}^o`. Its value is defined as a "*Function*" type object or
80     a "*Matrix*" type one. In the case of "*Function*" type, different
81     functional forms can be used, as described in the section
82     :ref:`section_ref_operator_requirements`. If there is some control :math:`U`
83     included in the observation, the operator has to be applied to a pair
84     :math:`(X,U)`.
85
86 The general optional commands, available in the editing user interface, are
87 indicated in :ref:`section_ref_assimilation_keywords`. Moreover, the parameters
88 of the command "*AlgorithmParameters*" allows to choose the specific options,
89 described hereafter, of the algorithm. See
90 :ref:`section_ref_options_Algorithm_Parameters` for the good use of this
91 command.
92
93 The options of the algorithm are the following:
94
95   Bounds
96     This key allows to define upper and lower bounds for every state variable
97     being optimized. Bounds have to be given by a list of list of pairs of
98     lower/upper bounds for each variable, with extreme values every time there
99     is no bound (``None`` is not allowed when there is no bound).
100
101     Example : ``{"Bounds":[[2.,5.],[1.e-2,10.],[-30.,1.e99],[-1.e99,1.e99]]}``
102
103   ConstrainedBy
104     This key allows to choose the method to take into account the bounds
105     constraints. The only one available is the "EstimateProjection", which
106     projects the current state estimate on the bounds constraints.
107
108     Example : ``{"ConstrainedBy":"EstimateProjection"}``
109
110   EstimationOf
111     This key allows to choose the type of estimation to be performed. It can be
112     either state-estimation, with a value of "State", or parameter-estimation,
113     with a value of "Parameters". The default choice is "State".
114
115     Example : ``{"EstimationOf":"Parameters"}``
116
117   StoreSupplementaryCalculations
118     This list indicates the names of the supplementary variables that can be
119     available at the end of the algorithm. It involves potentially costly
120     calculations or memory consumptions. The default is a void list, none of
121     these variables being calculated and stored by default. The possible names
122     are in the following list: ["APosterioriCorrelations",
123     "APosterioriCovariance", "APosterioriStandardDeviations",
124     "APosterioriVariances", "BMA", "CostFunctionJ", "CurrentState",
125     "Innovation"].
126
127     Example : ``{"StoreSupplementaryCalculations":["BMA", "Innovation"]}``
128
129 Information and variables available at the end of the algorithm
130 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
131
132 At the output, after executing the algorithm, there are variables and
133 information originating from the calculation. The description of
134 :ref:`section_ref_output_variables` show the way to obtain them by the method
135 named ``get`` of the variable "*ADD*" of the post-processing. The input
136 variables, available to the user at the output in order to facilitate the
137 writing of post-processing procedures, are described in the
138 :ref:`subsection_r_o_v_Inventaire`.
139
140 The unconditional outputs of the algorithm are the following:
141
142   Analysis
143     *List of vectors*. Each element is an optimal state :math:`\mathbf{x}*` in
144     optimization or an analysis :math:`\mathbf{x}^a` in data assimilation.
145
146     Example : ``Xa = ADD.get("Analysis")[-1]``
147
148 The conditional outputs of the algorithm are the following:
149
150   APosterioriCorrelations
151     *List of matrices*. Each element is an *a posteriori* error correlation
152     matrix of the optimal state.
153
154     Example : ``C = ADD.get("APosterioriCorrelations")[-1]``
155
156   APosterioriCovariance
157     *List of matrices*. Each element is an *a posteriori* error covariance
158     matrix :math:`\mathbf{A}*` of the optimal state.
159
160     Example : ``A = ADD.get("APosterioriCovariance")[-1]``
161
162   APosterioriStandardDeviations
163     *List of matrices*. Each element is an *a posteriori* error standard
164     deviation matrix of the optimal state.
165
166     Example : ``E = ADD.get("APosterioriStandardDeviations")[-1]``
167
168   APosterioriVariances
169     *List of matrices*. Each element is an *a posteriori* error variance matrix
170     of the optimal state.
171
172     Example : ``V = ADD.get("APosterioriVariances")[-1]``
173
174   BMA
175     *List of vectors*. Each element is a vector of difference between the
176     background and the optimal state.
177
178     Example : ``bma = ADD.get("BMA")[-1]``
179
180   CostFunctionJ
181     *List of values*. Each element is a value of the error function :math:`J`.
182
183     Example : ``J = ADD.get("CostFunctionJ")[:]``
184
185   CostFunctionJb
186     *List of values*. Each element is a value of the error function :math:`J^b`,
187     that is of the background difference part.
188
189     Example : ``Jb = ADD.get("CostFunctionJb")[:]``
190
191   CostFunctionJo
192     *List of values*. Each element is a value of the error function :math:`J^o`,
193     that is of the observation difference part.
194
195     Example : ``Jo = ADD.get("CostFunctionJo")[:]``
196
197   CurrentState
198     *List of vectors*. Each element is a usual state vector used during the
199     optimization algorithm procedure.
200
201     Example : ``Xs = ADD.get("CurrentState")[:]``
202
203   Innovation
204     *List of vectors*. Each element is an innovation vector, which is in static
205     the difference between the optimal and the background, and in dynamic the
206     evolution increment.
207
208     Exemple : ``d = ADD.get("Innovation")[-1]``
209
210 See also
211 ++++++++
212
213 References to other sections:
214   - :ref:`section_ref_algorithm_KalmanFilter`
215   - :ref:`section_ref_algorithm_UnscentedKalmanFilter`