X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FdaComposant%2FdaAlgorithms%2FExtendedKalmanFilter.py;h=1d66ef745ebfd7262a58c5b750ac1bc148a79d50;hb=6af0d30e581d4dd8365ff9e1bf5a51d34e5ad28d;hp=b0b4670c64ebafaec9e695322e6282d59890154b;hpb=1a191d9d42b1ad486e2532889dbc76378208006d;p=modules%2Fadao.git diff --git a/src/daComposant/daAlgorithms/ExtendedKalmanFilter.py b/src/daComposant/daAlgorithms/ExtendedKalmanFilter.py index b0b4670..1d66ef7 100644 --- a/src/daComposant/daAlgorithms/ExtendedKalmanFilter.py +++ b/src/daComposant/daAlgorithms/ExtendedKalmanFilter.py @@ -53,7 +53,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): default = [], typecast = tuple, message = "Liste de calculs supplémentaires à stocker et/ou effectuer", - listval = ["APosterioriCovariance", "BMA", "CurrentState", "CostFunctionJ", "Innovation"] + listval = ["APosterioriCorrelations", "APosterioriCovariance", "APosterioriStandardDeviations", "APosterioriVariances", "BMA", "CurrentState", "CostFunctionJ", "Innovation"] ) self.defineRequiredParameter( # Pas de type name = "Bounds", @@ -112,7 +112,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): # self.StoredVariables["Analysis"].store( Xn.A1 ) if "APosterioriCovariance" in self._parameters["StoreSupplementaryCalculations"]: - self.StoredVariables["APosterioriCovariance"].store( Pn ) + self.StoredVariables["APosterioriCovariance"].store( Pn.asfullmatrix(Xn.size) ) covarianceXa = Pn Xa = Xn previousJMinimum = numpy.finfo(float).max @@ -166,8 +166,10 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): if Cm is not None and Un is not None: # Attention : si Cm est aussi dans H, doublon ! d = d - Cm * Un # + _A = R + Ht * Pn_predicted * Ha + _u = numpy.linalg.solve( _A , d ) + Xn = Xn_predicted + Pn_predicted * Ha * _u Kn = Pn_predicted * Ha * (R + Ht * Pn_predicted * Ha).I - Xn = Xn_predicted + Kn * d Pn = Pn_predicted - Kn * Ht * Pn_predicted # self.StoredVariables["Analysis"].store( Xn.A1 )