Salome HOME
Updating copyright date information
[modules/adao.git] / doc / en / theory.rst
1 ..
2    Copyright (C) 2008-2016 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 .. _section_theory:
25
26 =================================================================================
27 **[DocT]** A brief introduction to Data Assimilation and Optimization
28 =================================================================================
29
30 .. index:: single: Data Assimilation
31 .. index:: single: true state
32 .. index:: single: observation
33 .. index:: single: a priori
34
35 **Data Assimilation** is a general framework for computing the optimal estimate
36 of the true state of a system, over time if necessary. It uses values obtained
37 by combining both observations and *a priori* models, including information
38 about their errors.
39
40 In other words, data assimilation merges measurement data of a system, that are
41 the observations, with *a priori* system physical and mathematical knowledge,
42 embedded in numerical models, to obtain the best possible estimate of the system
43 true state and of its stochastic properties. Note that this true state can not
44 be reached, but can only be estimated. Moreover, despite the fact that the used
45 information are stochastic by nature, data assimilation provides deterministic
46 techniques in order to perform very efficiently the estimation.
47
48 Because data assimilation look for the **best possible** estimate, its
49 underlying procedure always integrates optimization in order to find this
50 estimate: particular optimization methods are always embedded in data
51 assimilation algorithms. Optimization methods can be seen in ADAO as a way to
52 extend data assimilation applications. They will be introduced this way in the
53 section `Going further in the state estimation by optimization methods`_, but
54 they are far more general and can be used without data assimilation concepts.
55
56 Two main types of applications exist in data assimilation, being covered by the
57 same formalism: **parameters identification** and **fields reconstruction**.
58 Before introducing the `Simple description of the data assimilation
59 methodological framework`_ in a next section, we describe briefly these two
60 types. At the end, some references allow `Going further in the data assimilation
61 framework`_.
62
63 Fields reconstruction or measures interpolation
64 -----------------------------------------------
65
66 .. index:: single: fields reconstruction
67 .. index:: single: measures interpolation
68 .. index:: single: fields interpolation
69
70 **Fields reconstruction (or interpolation)** consists in finding, from a
71 restricted set of real measures, the physical field which is the most
72 *consistent* with these measures.
73
74 This *consistency* is to understand in terms of interpolation, that is to say
75 that the field we want to reconstruct, using data assimilation on measures, has
76 to fit at best the measures, while remaining constrained by the overall field
77 calculation. The calculation is thus an *a priori* estimation of the field that
78 we seek to identify.
79
80 If the system evolves in time, the reconstruction has to be established on every
81 time step, of the field as a whole. The interpolation process in this case is
82 more complicated since it is temporal, and not only in terms of instantaneous
83 values of the field.
84
85 A simple example of fields reconstruction comes from meteorology, in which one
86 look for value of variables such as temperature or pressure in all points of the
87 spatial domain. One have instantaneous measurements of these quantities at
88 certain points, but also a history set of these measures. Moreover, these
89 variables are constrained by evolution equations for the state of the
90 atmosphere, which indicates for example that the pressure at a point can not
91 take any value independently of the value at this same point in previous time.
92 One must therefore make the reconstruction of a field at any point in space, in
93 a "consistent" manner with the evolution equations and with the measures of the
94 previous time steps.
95
96 Parameters identification, models adjustment, calibration
97 ---------------------------------------------------------
98
99 .. index:: single: parameters identification
100 .. index:: single: parameters adjustment
101 .. index:: single: models adjustment
102 .. index:: single: calibration
103 .. index:: single: background
104 .. index:: single: regularization
105 .. index:: single: inverse problems
106
107 The **identification (or adjustment) of parameters** by data assimilation is a
108 form of state calibration which uses both the physical measurement and an *a
109 priori* parameters estimation (called the "*background*") of the state that one
110 seeks to identify, as well as a characterization of their errors. From this
111 point of view, it uses all available information on the physical system, with
112 restrictive yet realistic assumptions about errors, to find the "*optimal
113 estimation*" from the true state. We note, in terms of optimization, that the
114 background realizes a "*regularization*", in the mathematical meaning of
115 Tikhonov [[Tikhonov77]_ [WikipediaTI]_, of the main problem of parameters
116 identification. One can also use the term "*inverse problem*" to refer to this
117 process.
118
119 In practice, the two observed gaps "*calculation-measures*" and
120 "*calculation-background*" are combined to build the calibration correction of
121 parameters or initial conditions. The addition of these two gaps requires a
122 relative weight, which is chosen to reflect the trust we give to each piece of
123 information. This confidence is depicted by the covariance of the errors on the
124 background and on the observations. Thus the stochastic aspect of information,
125 measured or *a priori*, is essential for building the calibration error
126 function.
127
128 A simple example of parameters identification comes from any kind of physical
129 simulation process involving a parametrized model. For example, a static
130 mechanical simulation of a beam constrained by some forces is described by beam
131 parameters, such as a Young coefficient, or by the intensity of the force. The
132 parameters estimation problem consists in finding for example the right Young
133 coefficient value in order that the simulation of the beam corresponds to
134 measurements, including the knowledge of errors.
135
136 Simple description of the data assimilation methodological framework
137 --------------------------------------------------------------------
138
139 .. index:: single: background
140 .. index:: single: background error covariances
141 .. index:: single: observation error covariances
142 .. index:: single: covariances
143 .. index:: single: 3DVAR
144 .. index:: single: Blue
145
146 We can write these features in a simple manner. By default, all variables are
147 vectors, as there are several parameters to readjust, or a discrete field to
148 reconstruct.
149
150 According to standard notations in data assimilation, we note
151 :math:`\mathbf{x}^a` the optimal parameters that is to be determined by
152 calibration, :math:`\mathbf{y}^o` the observations (or experimental
153 measurements) that we must compare to the simulation outputs,
154 :math:`\mathbf{x}^b` the background (*a priori* values, or regularization
155 values) of searched parameters, :math:`\mathbf{x}^t` the unknown ideals
156 parameters that would give exactly the observations (assuming that the errors
157 are zero and the model is exact) as output.
158
159 In the simplest case, which is static, the steps of simulation and of
160 observation can be combined into a single observation operator noted :math:`H`
161 (linear or nonlinear). It transforms the input parameters :math:`\mathbf{x}` to
162 results :math:`\mathbf{y}`, to be directly compared to observations
163 :math:`\mathbf{y}^o`:
164
165 .. math:: \mathbf{y} = H(\mathbf{x})
166
167 Moreover, we use the linearized operator :math:`\mathbf{H}` to represent the
168 effect of the full operator :math:`H` around a linearization point (and we omit
169 thereafter to mention :math:`H` even if it is possible to keep it). In reality,
170 we have already indicated that the stochastic nature of variables is essential,
171 coming from the fact that model, background and observations are all incorrect.
172 We therefore introduce errors of observations additively, in the form of a
173 random vector :math:`\mathbf{\epsilon}^o` such that:
174
175 .. math:: \mathbf{y}^o = \mathbf{H} \mathbf{x}^t + \mathbf{\epsilon}^o
176
177 The errors represented here are not only those from observation, but also from
178 the simulation. We can always consider that these errors are of zero mean.
179 Noting :math:`E[.]` the classical mathematical expectation, we can then define a
180 matrix :math:`\mathbf{R}` of the observation error covariances by the
181 expression:
182
183 .. math:: \mathbf{R} = E[\mathbf{\epsilon}^o.{\mathbf{\epsilon}^o}^T]
184
185 The background can also be written formally as a function of the true value, by
186 introducing the errors vector :math:`\mathbf{\epsilon}^b` such that:
187
188 .. math:: \mathbf{x}^b = \mathbf{x}^t + \mathbf{\epsilon}^b
189
190 The errors :math:`\mathbf{\epsilon}^b` are also assumed of zero mean, in the
191 same manner as for observations. We define the :math:`\mathbf{B}` matrix of
192 background error covariances by:
193
194 .. math:: \mathbf{B} = E[\mathbf{\epsilon}^b.{\mathbf{\epsilon}^b}^T]
195
196 The optimal estimation of the true parameters :math:`\mathbf{x}^t`, given the
197 background :math:`\mathbf{x}^b` and the observations :math:`\mathbf{y}^o`, is
198 then the "*analysis*" :math:`\mathbf{x}^a` and comes from the minimisation of an
199 error function, explicit in variational assimilation, or from the filtering
200 correction in assimilation by filtering.
201
202 In **variational assimilation**, in a static case, one classically attempts to
203 minimize the following function :math:`J`:
204
205 .. math:: J(\mathbf{x})=\frac{1}{2}(\mathbf{x}-\mathbf{x}^b)^T.\mathbf{B}^{-1}.(\mathbf{x}-\mathbf{x}^b)+\frac{1}{2}(\mathbf{y}^o-\mathbf{H}.\mathbf{x})^T.\mathbf{R}^{-1}.(\mathbf{y}^o-\mathbf{H}.\mathbf{x})
206
207 :math:`J` is classically designed as the "*3D-VAR*" functional in data
208 assimlation (see for example [Talagrand97]_) or as the generalized Tikhonov
209 regularization functional in optimization (see for example [WikipediaTI]_).
210 Since :math:`\mathbf{B}` and :math:`\mathbf{R}` covariance matrices are
211 proportional to the variances of errors, their presence in both terms of the
212 function :math:`J` can effectively weight the gap terms by the confidence in the
213 background or observations errors. The parameters vector :math:`\mathbf{x}`
214 realizing the minimum of this function therefore constitute the analysis
215 :math:`\mathbf{x}^a`. It is at this level that we have to use the full panoply
216 of function minimization methods otherwise known in optimization (see also
217 section `Going further in the state estimation by optimization methods`_).
218 Depending on the size of the parameters vector :math:`\mathbf{x}` to identify,
219 and of the availability of gradient or Hessian of :math:`J`, it is appropriate
220 to adapt the chosen optimization method (gradient, Newton, quasi-Newton...).
221
222 In **assimilation by filtering**, in this simple case usually referred to as
223 "*BLUE*" (for "*Best Linear Unbiased Estimator*"), the :math:`\mathbf{x}^a`
224 analysis is given as a correction of the background :math:`\mathbf{x}^b` by a
225 term proportional to the difference between observations :math:`\mathbf{y}^o`
226 and calculations :math:`\mathbf{H}\mathbf{x}^b`:
227
228 .. math:: \mathbf{x}^a = \mathbf{x}^b + \mathbf{K}(\mathbf{y}^o - \mathbf{H}\mathbf{x}^b)
229
230 where :math:`\mathbf{K}` is the Kalman gain matrix, which is expressed using
231 covariance matrices in the following form:
232
233 .. math:: \mathbf{K} = \mathbf{B}\mathbf{H}^T(\mathbf{H}\mathbf{B}\mathbf{H}^T+\mathbf{R})^{-1}
234
235 The advantage of filtering is to explicitly calculate the gain, to produce then
236 the *a posteriori* covariance analysis matrix.
237
238 In this simple static case, we can show, under an assumption of Gaussian error
239 distributions (very little restrictive in practice), that the two *variational*
240 and *filtering* approaches give the same solution.
241
242 It is indicated here that these methods of "*3D-VAR*" and "*BLUE*" may be
243 extended to dynamic problems, called respectively "*4D-VAR*" and "*Kalman
244 filter*". They can take into account the evolution operator to establish an
245 analysis at the right time steps of the gap between observations and
246 simulations, and to have, at every moment, the propagation of the background
247 through the evolution model. Many other variants have been developed to improve
248 the numerical quality of the methods or to take into account computer
249 requirements such as calculation size and time.
250
251 Going further in the data assimilation framework
252 ------------------------------------------------
253
254 .. index:: single: state estimation
255 .. index:: single: parameter estimation
256 .. index:: single: inverse problems
257 .. index:: single: Bayesian estimation
258 .. index:: single: optimal interpolation
259 .. index:: single: mathematical regularization
260 .. index:: single: regularization methods
261 .. index:: single: data smoothing
262
263 To get more information about the data assimilation techniques, the reader can
264 consult introductory documents like [Talagrand97]_ or [Argaud09]_, on-line
265 training courses or lectures like [Bouttier99]_ and [Bocquet04]_ (along with
266 other materials coming from geosciences applications), or general documents like
267 [Talagrand97]_, [Tarantola87]_, [Kalnay03]_, [Ide97]_, [Tikhonov77]_ and
268 [WikipediaDA]_.
269
270 Note that data assimilation is not restricted to meteorology or geo-sciences,
271 but is widely used in other scientific domains. There are several fields in
272 science and technology where the effective use of observed but incomplete data
273 is crucial.
274
275 Some aspects of data assimilation are also known as *state estimation*,
276 *parameter estimation*, *inverse problems*, *Bayesian estimation*, *optimal
277 interpolation*, *mathematical regularization*, *data smoothing*, etc. These
278 terms can be used in bibliographical searches.
279
280 Going further in the state estimation by optimization methods
281 -------------------------------------------------------------
282
283 .. index:: single: state estimation
284 .. index:: single: optimization methods
285
286 As seen before, in a static simulation case, the variational data assimilation
287 requires to minimize the goal function :math:`J`:
288
289 .. math:: J(\mathbf{x})=(\mathbf{x}-\mathbf{x}^b)^T.\mathbf{B}^{-1}.(\mathbf{x}-\mathbf{x}^b)+(\mathbf{y}^o-\mathbf{H}.\mathbf{x})^T.\mathbf{R}^{-1}.(\mathbf{y}^o-\mathbf{H}.\mathbf{x})
290
291 which is named the "*3D-VAR*" function. It can be seen as a *least squares
292 minimization* extented form, obtained by adding a regularizing term using
293 :math:`\mathbf{x}-\mathbf{x}^b`, and by weighting the differences using
294 :math:`\mathbf{B}` and :math:`\mathbf{R}` the two covariance matrices. The
295 minimization of the :math:`J` function leads to the *best* :math:`\mathbf{x}`
296 state estimation. To get more information about these notions, one can consult
297 reference general documents like [Tarantola87]_.
298
299 State estimation possibilities extension, by using more explicitly optimization
300 methods and their properties, can be imagined in two ways.
301
302 First, classical optimization methods involves using various gradient-based
303 minimizing procedures. They are extremely efficient to look for a single local
304 minimum. But they require the goal function :math:`J` to be sufficiently regular
305 and differentiable, and are not able to capture global properties of the
306 minimization problem, for example: global minimum, set of equivalent solutions
307 due to over-parametrization, multiple local minima, etc. **A way to extend
308 estimation possibilities is then to use a whole range of optimizers, allowing
309 global minimization, various robust search properties, etc**. There is a lot of
310 minimizing methods, such as stochastic ones, evolutionary ones, heuristics and
311 meta-heuristics for real-valued problems, etc. They can treat partially
312 irregular or noisy function :math:`J`, can characterize local minima, etc. The
313 main drawback is a greater numerical cost to find state estimates, and no
314 guarantee of convergence in finite time. Here, we only point the following
315 topics, as the methods are available in the ADAO module: *Quantile Regression*
316 [WikipediaQR]_ and *Particle Swarm Optimization* [WikipediaPSO]_.
317
318 Secondly, optimization methods try usually to minimize quadratic measures of
319 errors, as the natural properties of such goal functions are well suited for
320 classical gradient optimization. But other measures of errors can be more
321 adapted to real physical simulation problems. Then, **an another way to extend
322 estimation possibilities is to use other measures of errors to be reduced**. For
323 example, we can cite *absolute error value*, *maximum error value*, etc. These
324 error measures are not differentiables, but some optimization methods can deal
325 with:  heuristics and meta-heuristics for real-valued problem, etc. As
326 previously, the main drawback remain a greater numerical cost to find state
327 estimates, and no guarantee of convergence in finite time. Here again, we only
328 point the following methods as it is available in the ADAO module: *Particle
329 swarm optimization* [WikipediaPSO]_.
330
331 The reader interested in the subject of optimization can look at [WikipediaMO]_
332 as a general entry point.