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