From a4a8938857a5fa3d1e320b3df87aedaeec28edbe Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Wed, 4 Mar 2020 20:48:28 +0100 Subject: [PATCH] Update forecast use and documentation in filters --- doc/en/bibliography.rst | 4 ++++ doc/en/images/schema_temporel_KF.png | Bin 0 -> 2306 bytes doc/en/ref_algorithm_EnsembleKalmanFilter.rst | 6 ++--- doc/en/ref_algorithm_ExtendedKalmanFilter.rst | 22 +++++++++++++++--- doc/en/ref_algorithm_KalmanFilter.rst | 22 +++++++++++++++--- doc/en/snippets/ForecastState.rst | 8 +++++++ doc/en/snippets/PredictedState.rst | 8 ------- doc/fr/bibliography.rst | 4 ++++ doc/fr/images/schema_temporel_KF.png | Bin 0 -> 2357 bytes doc/fr/ref_algorithm_EnsembleKalmanFilter.rst | 6 ++--- doc/fr/ref_algorithm_ExtendedKalmanFilter.rst | 22 +++++++++++++++--- doc/fr/ref_algorithm_KalmanFilter.rst | 22 +++++++++++++++--- .../{PredictedState.rst => ForecastState.rst} | 6 ++--- .../daAlgorithms/EnsembleKalmanFilter.py | 6 ++--- .../daAlgorithms/ExtendedKalmanFilter.py | 6 ++--- src/daComposant/daAlgorithms/KalmanFilter.py | 6 ++--- src/daComposant/daCore/BasicObjects.py | 6 ++--- src/daComposant/daCore/NumericObjects.py | 2 +- 18 files changed, 114 insertions(+), 42 deletions(-) create mode 100644 doc/en/images/schema_temporel_KF.png create mode 100644 doc/en/snippets/ForecastState.rst delete mode 100644 doc/en/snippets/PredictedState.rst create mode 100644 doc/fr/images/schema_temporel_KF.png rename doc/fr/snippets/{PredictedState.rst => ForecastState.rst} (69%) diff --git a/doc/en/bibliography.rst b/doc/en/bibliography.rst index 3f33272..0a31cd7 100644 --- a/doc/en/bibliography.rst +++ b/doc/en/bibliography.rst @@ -103,6 +103,10 @@ Bibliography .. [WikipediaDA] Wikipedia, *Data assimilation*, http://en.wikipedia.org/wiki/Data_assimilation +.. [WikipediaKF] Wikipedia, *Kalman Filter*, https://en.wikipedia.org/wiki/Kalman_filter + +.. [WikipediaEKF] Wikipedia, *Extended Kalman Filter*, https://en.wikipedia.org/wiki/Extended_Kalman_filter + .. [WikipediaEnKF] Wikipedia, *Ensemble Kalman Filter*, http://en.wikipedia.org/wiki/Ensemble_Kalman_filter .. [WikipediaMO] Wikipedia, *Mathematical optimization*, https://en.wikipedia.org/wiki/Mathematical_optimization diff --git a/doc/en/images/schema_temporel_KF.png b/doc/en/images/schema_temporel_KF.png new file mode 100644 index 0000000000000000000000000000000000000000..8fe0e05aa54e268c15de4148194f935373e4894e GIT binary patch literal 2306 zcmY+GYao*i8^^cX*0Y1dMB5_FS%s!KmNGJ}l2(yom@tP&h)Aezx5LU=&LvGejw>BV z^P^<$;;{LV2aAk_G? z2IeE@xZ8$Qi_@RZecR*YB=~SJk?USnk>(`IK-OO>-*s42b$0Vn&+2!R5@FHlA(tA9 zwk}J5Apv?ta~6#Kx5L;NFxDNE)Gp{jzM`)-w*m|S{3lGvr z7TYQs_auaeH=$c1#c9#AWCEu$MrJrM-x4Q}v<4(qp~xJI&Hp?xME zX3im1e^!ZO);XH&lT4dqN!3OGefSu|DM{0BjAHD>%hbA{n};jS@=PjIJO5Lw=%Hi`Y^|K#xrV@^=RTN~GNFf{Q2Qy}Rvu zLIT#>i|E&sopxYf7JM3iNRg(K@kjh`@D#ny_BfKQ%uZ&f=Rxkp#&YRsXwvJ4WT~08 zbHVD3piU`o)}KQXmbVn$KR9+|fQ`!CSL0l+y&Az|y)6VGEhzPkY>A59yEs+Xbeym{ z>qD{Zi8u9z#E}TkedMdrG_!}b&9@mtL|{|T!u#rZ}v zj7zU_DXg*Edhtj7DYZE;@{Xi?cyyy{PlRD2xpQu5rQ8e=RjU*l5Z@U(i>zoWQT0Ju zs2_G@g>K_jkltr++32^3pTG^ZK)33-NbBd_ISTnAByP>I65ki*eXbdKDL#WNU+b|D zhAANeUt9d_Tf=ccOat8#NZoyzMpAz3gz|}!?7ec3AAqhP&IVFnM?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Pc6 zMrB*!?@$A+@Qu`f-$)~=eEe~A0;*ZQ-Kn{9JoaPi>g@q?nbp+qeJvgpd7P8VifW^> zYwvV>G&T6TObbRip0(;T*ZG4SO%KU^wPegdU9-{iXDW& zM$(BhhD zRp`L=5vRAyKERG%ZEI;J*YS&hx_Z_kGe51>Ii#{mP2gd8bmZH#hTqJWP`4S{xxd6S zw4@L2-iJf*qi!v4Zevvu`+J#b`V&HS9TvjTKyBe zaON;+LCH1DvfQ`qwTD!1L&JCTAZ)3-Z=mA*m$?FQbe+l{tyGB)0fF2S^)^);su%@K z#axsLId8$L>NZka#5+b~4LPlm5i6*j(1?S?>O9m0-UVQCtIrH<56!{$rVR`F5A+cm AqW}N^ literal 0 HcmV?d00001 diff --git a/doc/en/ref_algorithm_EnsembleKalmanFilter.rst b/doc/en/ref_algorithm_EnsembleKalmanFilter.rst index 4ba9f27..f496720 100644 --- a/doc/en/ref_algorithm_EnsembleKalmanFilter.rst +++ b/doc/en/ref_algorithm_EnsembleKalmanFilter.rst @@ -95,10 +95,10 @@ StoreSupplementaryCalculations "CostFunctionJoAtCurrentOptimum", "CurrentOptimum", "CurrentState", + "ForecastState", "IndexOfOptimum", "InnovationAtCurrentAnalysis", "InnovationAtCurrentState", - "PredictedState", "SimulatedObservationAtCurrentAnalysis", "SimulatedObservationAtCurrentOptimum", "SimulatedObservationAtCurrentState", @@ -143,14 +143,14 @@ StoreSupplementaryCalculations .. include:: snippets/CurrentState.rst +.. include:: snippets/ForecastState.rst + .. include:: snippets/IndexOfOptimum.rst .. include:: snippets/InnovationAtCurrentAnalysis.rst .. include:: snippets/InnovationAtCurrentState.rst -.. include:: snippets/PredictedState.rst - .. include:: snippets/SimulatedObservationAtCurrentAnalysis.rst .. include:: snippets/SimulatedObservationAtCurrentOptimum.rst diff --git a/doc/en/ref_algorithm_ExtendedKalmanFilter.rst b/doc/en/ref_algorithm_ExtendedKalmanFilter.rst index 88fbdec..1ce1918 100644 --- a/doc/en/ref_algorithm_ExtendedKalmanFilter.rst +++ b/doc/en/ref_algorithm_ExtendedKalmanFilter.rst @@ -34,6 +34,17 @@ This algorithm realizes an estimation of the state of a dynamic system by a extended Kalman Filter, using a non-linear calculation of the state and the incremental evolution (process). +Conceptually, we can represent the temporal pattern of action of the operators +for this algorithm in the following way, with **H** the observation operator +and **M** the evolution operator : + + .. _schema_temporel_KF: + .. image:: images/schema_temporel_KF.png + :align: center + :width: 50% + .. centered:: + **Timeline of steps in Kalman filter assimilation** + In case of really non-linear operators, one can easily use the :ref:`section_ref_algorithm_EnsembleKalmanFilter` or the :ref:`section_ref_algorithm_UnscentedKalmanFilter`, which are often far more @@ -89,10 +100,10 @@ StoreSupplementaryCalculations "CostFunctionJoAtCurrentOptimum", "CurrentOptimum", "CurrentState", + "ForecastState", "IndexOfOptimum", "InnovationAtCurrentAnalysis", "InnovationAtCurrentState", - "PredictedState", "SimulatedObservationAtCurrentAnalysis", "SimulatedObservationAtCurrentOptimum", "SimulatedObservationAtCurrentState", @@ -137,14 +148,14 @@ StoreSupplementaryCalculations .. include:: snippets/CurrentState.rst +.. include:: snippets/ForecastState.rst + .. include:: snippets/IndexOfOptimum.rst .. include:: snippets/InnovationAtCurrentAnalysis.rst .. include:: snippets/InnovationAtCurrentState.rst -.. include:: snippets/PredictedState.rst - .. include:: snippets/SimulatedObservationAtCurrentAnalysis.rst .. include:: snippets/SimulatedObservationAtCurrentOptimum.rst @@ -157,3 +168,8 @@ StoreSupplementaryCalculations - :ref:`section_ref_algorithm_KalmanFilter` - :ref:`section_ref_algorithm_EnsembleKalmanFilter` - :ref:`section_ref_algorithm_UnscentedKalmanFilter` + +.. ------------------------------------ .. +.. include:: snippets/Header2Algo07.rst + +- [WikipediaEKF]_ diff --git a/doc/en/ref_algorithm_KalmanFilter.rst b/doc/en/ref_algorithm_KalmanFilter.rst index 556d475..895d37b 100644 --- a/doc/en/ref_algorithm_KalmanFilter.rst +++ b/doc/en/ref_algorithm_KalmanFilter.rst @@ -38,6 +38,17 @@ cases which are linear, even if it sometimes works in "slightly" non-linear cases. One can verify the linearity of the operators with the help of the :ref:`section_ref_algorithm_LinearityTest`. +Conceptually, we can represent the temporal pattern of action of the operators +for this algorithm in the following way, with **H** the observation operator +and **M** the evolution operator : + + .. _schema_temporel_KF: + .. image:: images/schema_temporel_KF.png + :align: center + :width: 50% + .. centered:: + **Timeline of steps in Kalman filter assimilation** + In case of non-linearity, even slightly marked, it will be preferred the :ref:`section_ref_algorithm_ExtendedKalmanFilter`, or the :ref:`section_ref_algorithm_UnscentedKalmanFilter` and the @@ -88,10 +99,10 @@ StoreSupplementaryCalculations "CostFunctionJoAtCurrentOptimum", "CurrentOptimum", "CurrentState", + "ForecastState", "IndexOfOptimum", "InnovationAtCurrentAnalysis", "InnovationAtCurrentState", - "PredictedState", "SimulatedObservationAtCurrentAnalysis", "SimulatedObservationAtCurrentOptimum", "SimulatedObservationAtCurrentState", @@ -136,14 +147,14 @@ StoreSupplementaryCalculations .. include:: snippets/CurrentState.rst +.. include:: snippets/ForecastState.rst + .. include:: snippets/IndexOfOptimum.rst .. include:: snippets/InnovationAtCurrentAnalysis.rst .. include:: snippets/InnovationAtCurrentState.rst -.. include:: snippets/PredictedState.rst - .. include:: snippets/SimulatedObservationAtCurrentAnalysis.rst .. include:: snippets/SimulatedObservationAtCurrentOptimum.rst @@ -156,3 +167,8 @@ StoreSupplementaryCalculations - :ref:`section_ref_algorithm_ExtendedKalmanFilter` - :ref:`section_ref_algorithm_EnsembleKalmanFilter` - :ref:`section_ref_algorithm_UnscentedKalmanFilter` + +.. ------------------------------------ .. +.. include:: snippets/Header2Algo07.rst + +- [WikipediaKF]_ diff --git a/doc/en/snippets/ForecastState.rst b/doc/en/snippets/ForecastState.rst new file mode 100644 index 0000000..c14af8e --- /dev/null +++ b/doc/en/snippets/ForecastState.rst @@ -0,0 +1,8 @@ +.. index:: single: ForecastState + +ForecastState + *List of vectors*. Each element is a state vector forecasted by the model + during the iterative algorithm procedure. + + Example: + ``Xp = ADD.get("ForecastState")[:]`` diff --git a/doc/en/snippets/PredictedState.rst b/doc/en/snippets/PredictedState.rst deleted file mode 100644 index af3b8dd..0000000 --- a/doc/en/snippets/PredictedState.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. index:: single: PredictedState - -PredictedState - *List of vectors*. Each element is a state vector predicted by the model - during the iterative algorithm procedure. - - Example: - ``Xp = ADD.get("PredictedState")[:]`` diff --git a/doc/fr/bibliography.rst b/doc/fr/bibliography.rst index da2b5d8..04a0260 100644 --- a/doc/fr/bibliography.rst +++ b/doc/fr/bibliography.rst @@ -103,6 +103,10 @@ Bibliographie .. [WikipediaDA] Wikipedia, *Data assimilation*, http://en.wikipedia.org/wiki/Data_assimilation +.. [WikipediaKF] Wikipedia, *Kalman Filter*, https://en.wikipedia.org/wiki/Kalman_filter + +.. [WikipediaEKF] Wikipedia, *Extended Kalman Filter*, https://en.wikipedia.org/wiki/Extended_Kalman_filter + .. [WikipediaEnKF] Wikipedia, *Ensemble Kalman Filter*, http://en.wikipedia.org/wiki/Ensemble_Kalman_filter .. [WikipediaMO] Wikipedia, *Mathematical optimization*, https://en.wikipedia.org/wiki/Mathematical_optimization diff --git a/doc/fr/images/schema_temporel_KF.png b/doc/fr/images/schema_temporel_KF.png new file mode 100644 index 0000000000000000000000000000000000000000..dd4f05e17304033a022387cd3775bb7b33ccad45 GIT binary patch literal 2357 zcmXw*eLT|%9LJ}1Kg#d7gqTg)>aJAM*sOKAsOgR)6vE-oMtZAE>z5D0@2Hgb2Dt212=!y6$sf8QVFQ*_K#soSG#<~u)!M4YG0MK&`7(gfn$RZ7i+lPNx?`|2d$+vmCC_Z`f0cv(G}{6O`@pK*qUw7sc)TkjMW z5K#TF5q6ALnseLJ%@3v~PkO!VSt~TP&SE5WaFb*@&s5rrS_>DSJ*cPqH=Tj~cTcEd z8LZ=5gUg;Uzrq|FZMj>1NLI77W!-%N>~P+%@ZZ*I1bHE~^?KsjW2^_-tZ*^+Z*wH6 z<%e8s2w1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`}#IkMO&o58Py;hoUW{A9+oep>5ZTVgiUp1#MH*b1~VDJ08z z2dI@Pz|yqA#4aD1*bY?<8#W~uGK`8u zk4TJ#VUT2EB$7G_191}AMDg1aM{0%7m>3Bno)oiFC@qRKSX3=Po-L(hjo8ZXok-R-H#@uMZUN_GD8S` zalUH%)3;$i<~7e%XYu}Ao3p*LhO8YD)6f;GZthImD$CTn8N=2o)rT|y9g<- zQeq2)qTYJdqdeOfCEk)dSvB@yz{~#eSJ8qs+yzIZ%Nz9GYg)xwo?B;@I-4Ad-q68y zdX$dudcSnCX{T&bl5Pr<(62e~YA0qOu*?3&$onV7YZat&9W;R3zD~2KW?m%@e!%t^ zHg|!u;nDqlh4zoSs*_DZPdE)JnI_Bn(=G}(yyp%s+}a}K-ghJgiXJrEdBj4KVB$ON zNVcKMJMcWTcj|iIGtDO1?7}U{E9s($%2s_!PE0&|Lfliu8e7l>{cb**GnABb@@UN= z8XQ75!T%d@j7{l0RG`<8&D1_nN^&ajJ`?X>U;XjOEnc-mZWDBCd-{* zdg*?-Co%9=@J9;$1)M2q^UZ~P5?Xx8{kzoq{N;kM7yrE+iZ GnSTI9)N1Si literal 0 HcmV?d00001 diff --git a/doc/fr/ref_algorithm_EnsembleKalmanFilter.rst b/doc/fr/ref_algorithm_EnsembleKalmanFilter.rst index 4d2fb67..6228fe3 100644 --- a/doc/fr/ref_algorithm_EnsembleKalmanFilter.rst +++ b/doc/fr/ref_algorithm_EnsembleKalmanFilter.rst @@ -96,10 +96,10 @@ StoreSupplementaryCalculations "CostFunctionJoAtCurrentOptimum", "CurrentOptimum", "CurrentState", + "ForecastState", "IndexOfOptimum", "InnovationAtCurrentAnalysis", "InnovationAtCurrentState", - "PredictedState", "SimulatedObservationAtCurrentAnalysis", "SimulatedObservationAtCurrentOptimum", "SimulatedObservationAtCurrentState", @@ -144,14 +144,14 @@ StoreSupplementaryCalculations .. include:: snippets/CurrentState.rst +.. include:: snippets/ForecastState.rst + .. include:: snippets/IndexOfOptimum.rst .. include:: snippets/InnovationAtCurrentAnalysis.rst .. include:: snippets/InnovationAtCurrentState.rst -.. include:: snippets/PredictedState.rst - .. include:: snippets/SimulatedObservationAtCurrentAnalysis.rst .. include:: snippets/SimulatedObservationAtCurrentOptimum.rst diff --git a/doc/fr/ref_algorithm_ExtendedKalmanFilter.rst b/doc/fr/ref_algorithm_ExtendedKalmanFilter.rst index 7409227..1d43ec2 100644 --- a/doc/fr/ref_algorithm_ExtendedKalmanFilter.rst +++ b/doc/fr/ref_algorithm_ExtendedKalmanFilter.rst @@ -34,6 +34,17 @@ Cet algorithme réalise une estimation de l'état d'un système dynamique par un filtre de Kalman étendu, utilisant un calcul non linéaire de l'état et de l'évolution incrémentale (processus). +Conceptuellement, on peut représenter le schéma temporel d'action des +opérateurs pour cet algorithme de la manière suivante, avec **H** l'opérateur +d'observation et **M** l'opérateur d'évolution : + + .. _schema_temporel_KF: + .. image:: images/schema_temporel_KF.png + :align: center + :width: 50% + .. centered:: + **Schéma temporel des étapes en assimilation par filtre de Kalman** + Dans le cas d'opérateurs réellement non-linéaires, on peut aisément utiliser l':ref:`section_ref_algorithm_EnsembleKalmanFilter` ou l':ref:`section_ref_algorithm_UnscentedKalmanFilter`, qui sont souvent @@ -90,10 +101,10 @@ StoreSupplementaryCalculations "CostFunctionJoAtCurrentOptimum", "CurrentOptimum", "CurrentState", + "ForecastState", "IndexOfOptimum", "InnovationAtCurrentAnalysis", "InnovationAtCurrentState", - "PredictedState", "SimulatedObservationAtCurrentAnalysis", "SimulatedObservationAtCurrentOptimum", "SimulatedObservationAtCurrentState", @@ -138,14 +149,14 @@ StoreSupplementaryCalculations .. include:: snippets/CurrentState.rst +.. include:: snippets/ForecastState.rst + .. include:: snippets/IndexOfOptimum.rst .. include:: snippets/InnovationAtCurrentAnalysis.rst .. include:: snippets/InnovationAtCurrentState.rst -.. include:: snippets/PredictedState.rst - .. include:: snippets/SimulatedObservationAtCurrentAnalysis.rst .. include:: snippets/SimulatedObservationAtCurrentOptimum.rst @@ -158,3 +169,8 @@ StoreSupplementaryCalculations - :ref:`section_ref_algorithm_KalmanFilter` - :ref:`section_ref_algorithm_EnsembleKalmanFilter` - :ref:`section_ref_algorithm_UnscentedKalmanFilter` + +.. ------------------------------------ .. +.. include:: snippets/Header2Algo07.rst + +- [WikipediaEKF]_ diff --git a/doc/fr/ref_algorithm_KalmanFilter.rst b/doc/fr/ref_algorithm_KalmanFilter.rst index abba1d6..024e3bc 100644 --- a/doc/fr/ref_algorithm_KalmanFilter.rst +++ b/doc/fr/ref_algorithm_KalmanFilter.rst @@ -38,6 +38,17 @@ incrémentale (processus) linéaires, même s'il fonctionne parfois dans les cas "faiblement" non-linéaire. On peut vérifier la linéarité de l'opérateur d'observation à l'aide de l':ref:`section_ref_algorithm_LinearityTest`. +Conceptuellement, on peut représenter le schéma temporel d'action des +opérateurs pour cet algorithme de la manière suivante, avec **H** l'opérateur +d'observation et **M** l'opérateur d'évolution : + + .. _schema_temporel_KF: + .. image:: images/schema_temporel_KF.png + :align: center + :width: 50% + .. centered:: + **Schéma temporel des étapes en assimilation par filtre de Kalman** + En cas de non-linéarité, même peu marquée, on lui préférera l':ref:`section_ref_algorithm_ExtendedKalmanFilter`, ou l':ref:`section_ref_algorithm_EnsembleKalmanFilter` et @@ -88,10 +99,10 @@ StoreSupplementaryCalculations "CostFunctionJoAtCurrentOptimum", "CurrentOptimum", "CurrentState", + "ForecastState", "IndexOfOptimum", "InnovationAtCurrentAnalysis", "InnovationAtCurrentState", - "PredictedState", "SimulatedObservationAtCurrentAnalysis", "SimulatedObservationAtCurrentOptimum", "SimulatedObservationAtCurrentState", @@ -136,14 +147,14 @@ StoreSupplementaryCalculations .. include:: snippets/CurrentState.rst +.. include:: snippets/ForecastState.rst + .. include:: snippets/IndexOfOptimum.rst .. include:: snippets/InnovationAtCurrentAnalysis.rst .. include:: snippets/InnovationAtCurrentState.rst -.. include:: snippets/PredictedState.rst - .. include:: snippets/SimulatedObservationAtCurrentAnalysis.rst .. include:: snippets/SimulatedObservationAtCurrentOptimum.rst @@ -156,3 +167,8 @@ StoreSupplementaryCalculations - :ref:`section_ref_algorithm_ExtendedKalmanFilter` - :ref:`section_ref_algorithm_EnsembleKalmanFilter` - :ref:`section_ref_algorithm_UnscentedKalmanFilter` + +.. ------------------------------------ .. +.. include:: snippets/Header2Algo07.rst + +- [WikipediaKF]_ diff --git a/doc/fr/snippets/PredictedState.rst b/doc/fr/snippets/ForecastState.rst similarity index 69% rename from doc/fr/snippets/PredictedState.rst rename to doc/fr/snippets/ForecastState.rst index 35a8230..af3219f 100644 --- a/doc/fr/snippets/PredictedState.rst +++ b/doc/fr/snippets/ForecastState.rst @@ -1,9 +1,9 @@ -.. index:: single: PredictedState +.. index:: single: ForecastState -PredictedState +ForecastState *Liste de vecteurs*. Chaque élément est un vecteur d'état prévu par le modèle dans le cas d'un filtre itératif, au cours du déroulement itératif de l'algorithme utilisé. Exemple : - ``Xp = ADD.get("PredictedState")[:]`` + ``Xp = ADD.get("ForecastState")[:]`` diff --git a/src/daComposant/daAlgorithms/EnsembleKalmanFilter.py b/src/daComposant/daAlgorithms/EnsembleKalmanFilter.py index c233294..201cf4b 100644 --- a/src/daComposant/daAlgorithms/EnsembleKalmanFilter.py +++ b/src/daComposant/daAlgorithms/EnsembleKalmanFilter.py @@ -74,10 +74,10 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): "CostFunctionJoAtCurrentOptimum", "CurrentOptimum", "CurrentState", + "ForecastState", "IndexOfOptimum", "InnovationAtCurrentAnalysis", "InnovationAtCurrentState", - "PredictedState", "SimulatedObservationAtCurrentAnalysis", "SimulatedObservationAtCurrentOptimum", "SimulatedObservationAtCurrentState", @@ -223,8 +223,8 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): if self._parameters["StoreInternalVariables"] \ or self._toStore("CurrentState"): self.StoredVariables["CurrentState"].store( Xn ) - if self._toStore("PredictedState"): - self.StoredVariables["PredictedState"].store( Xn_predicted ) + if self._toStore("ForecastState"): + self.StoredVariables["ForecastState"].store( Xn_predicted ) if self._toStore("BMA"): self.StoredVariables["BMA"].store( Xn_predicted - Xa ) if self._toStore("InnovationAtCurrentState"): diff --git a/src/daComposant/daAlgorithms/ExtendedKalmanFilter.py b/src/daComposant/daAlgorithms/ExtendedKalmanFilter.py index 0642c95..a400b2e 100644 --- a/src/daComposant/daAlgorithms/ExtendedKalmanFilter.py +++ b/src/daComposant/daAlgorithms/ExtendedKalmanFilter.py @@ -68,10 +68,10 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): "CostFunctionJoAtCurrentOptimum", "CurrentOptimum", "CurrentState", + "ForecastState", "IndexOfOptimum", "InnovationAtCurrentAnalysis", "InnovationAtCurrentState", - "PredictedState", "SimulatedObservationAtCurrentAnalysis", "SimulatedObservationAtCurrentOptimum", "SimulatedObservationAtCurrentState", @@ -205,8 +205,8 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): if self._parameters["StoreInternalVariables"] \ or self._toStore("CurrentState"): self.StoredVariables["CurrentState"].store( Xn ) - if self._toStore("PredictedState"): - self.StoredVariables["PredictedState"].store( Xn_predicted ) + if self._toStore("ForecastState"): + self.StoredVariables["ForecastState"].store( Xn_predicted ) if self._toStore("BMA"): self.StoredVariables["BMA"].store( Xn_predicted - Xa ) if self._toStore("InnovationAtCurrentState"): diff --git a/src/daComposant/daAlgorithms/KalmanFilter.py b/src/daComposant/daAlgorithms/KalmanFilter.py index fcfff63..9cbea1a 100644 --- a/src/daComposant/daAlgorithms/KalmanFilter.py +++ b/src/daComposant/daAlgorithms/KalmanFilter.py @@ -61,10 +61,10 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): "CostFunctionJoAtCurrentOptimum", "CurrentOptimum", "CurrentState", + "ForecastState", "IndexOfOptimum", "InnovationAtCurrentAnalysis", "InnovationAtCurrentState", - "PredictedState", "SimulatedObservationAtCurrentAnalysis", "SimulatedObservationAtCurrentOptimum", "SimulatedObservationAtCurrentState", @@ -180,8 +180,8 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): if self._parameters["StoreInternalVariables"] \ or self._toStore("CurrentState"): self.StoredVariables["CurrentState"].store( Xn ) - if self._toStore("PredictedState"): - self.StoredVariables["PredictedState"].store( Xn_predicted ) + if self._toStore("ForecastState"): + self.StoredVariables["ForecastState"].store( Xn_predicted ) if self._toStore("BMA"): self.StoredVariables["BMA"].store( Xn_predicted - Xa ) if self._toStore("InnovationAtCurrentState"): diff --git a/src/daComposant/daCore/BasicObjects.py b/src/daComposant/daCore/BasicObjects.py index 92ae56a..5d0e610 100644 --- a/src/daComposant/daCore/BasicObjects.py +++ b/src/daComposant/daCore/BasicObjects.py @@ -606,7 +606,7 @@ class Algorithm(object): - MahalanobisConsistency : indicateur de consistance des covariances - OMA : Observation moins Analyse : Y - Xa - OMB : Observation moins Background : Y - Xb - - PredictedState : état prédit courant lors d'itérations + - ForecastState : état prédit courant lors d'itérations - Residu : dans le cas des algorithmes de vérification - SigmaBck2 : indicateur de correction optimale des erreurs d'ébauche - SigmaObs2 : indicateur de correction optimale des erreurs d'observation @@ -644,10 +644,11 @@ class Algorithm(object): self.StoredVariables["CostFunctionJoAtCurrentOptimum"] = Persistence.OneScalar(name = "CostFunctionJoAtCurrentOptimum") self.StoredVariables["CurrentOptimum"] = Persistence.OneVector(name = "CurrentOptimum") self.StoredVariables["CurrentState"] = Persistence.OneVector(name = "CurrentState") + self.StoredVariables["ForecastState"] = Persistence.OneVector(name = "ForecastState") self.StoredVariables["GradientOfCostFunctionJ"] = Persistence.OneVector(name = "GradientOfCostFunctionJ") self.StoredVariables["GradientOfCostFunctionJb"] = Persistence.OneVector(name = "GradientOfCostFunctionJb") self.StoredVariables["GradientOfCostFunctionJo"] = Persistence.OneVector(name = "GradientOfCostFunctionJo") - self.StoredVariables["IndexOfOptimum"] = Persistence.OneIndex(name = "IndexOfOptimum") + self.StoredVariables["IndexOfOptimum"] = Persistence.OneIndex(name = "IndexOfOptimum") self.StoredVariables["Innovation"] = Persistence.OneVector(name = "Innovation") self.StoredVariables["InnovationAtCurrentAnalysis"] = Persistence.OneVector(name = "InnovationAtCurrentAnalysis") self.StoredVariables["InnovationAtCurrentState"] = Persistence.OneVector(name = "InnovationAtCurrentState") @@ -658,7 +659,6 @@ class Algorithm(object): self.StoredVariables["MahalanobisConsistency"] = Persistence.OneScalar(name = "MahalanobisConsistency") self.StoredVariables["OMA"] = Persistence.OneVector(name = "OMA") self.StoredVariables["OMB"] = Persistence.OneVector(name = "OMB") - self.StoredVariables["PredictedState"] = Persistence.OneVector(name = "PredictedState") self.StoredVariables["Residu"] = Persistence.OneScalar(name = "Residu") self.StoredVariables["SigmaBck2"] = Persistence.OneScalar(name = "SigmaBck2") self.StoredVariables["SigmaObs2"] = Persistence.OneScalar(name = "SigmaObs2") diff --git a/src/daComposant/daCore/NumericObjects.py b/src/daComposant/daCore/NumericObjects.py index e8d201e..3938e48 100644 --- a/src/daComposant/daCore/NumericObjects.py +++ b/src/daComposant/daCore/NumericObjects.py @@ -21,7 +21,7 @@ # Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D __doc__ = """ - Définit les versions approximées des opérateurs tangents et adjoints. + Définit les objets numériques génériques. """ __author__ = "Jean-Philippe ARGAUD" -- 2.39.2