From c3c2dbe4d652c252f4c1a7e1cd6328878ada6cbf Mon Sep 17 00:00:00 2001 From: franckgaga Date: Wed, 11 Sep 2024 09:05:47 -0400 Subject: [PATCH] minor doc correction --- src/estimator/kalman.jl | 15 ++++++++------- src/estimator/mhe/construct.jl | 6 +++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/estimator/kalman.jl b/src/estimator/kalman.jl index 52a53c9c..550d4071 100644 --- a/src/estimator/kalman.jl +++ b/src/estimator/kalman.jl @@ -578,13 +578,14 @@ is based on the process model : \end{aligned} ``` See [`SteadyKalmanFilter`](@ref) for details on ``\mathbf{v}(k), \mathbf{w}(k)`` noises and -``\mathbf{R̂}, \mathbf{Q̂}`` covariances. The functions ``\mathbf{f̂, ĥ}`` are `model` -state-space functions augmented with the stochastic model of the unmeasured disturbances, -which is specified by the numbers of integrator `nint_u` and `nint_ym` (see Extended Help). -The ``\mathbf{ĥ^m}`` function represents the measured outputs of ``\mathbf{ĥ}`` function -(and unmeasured ones, for ``\mathbf{ĥ^u}``). The matrix ``\mathbf{P̂}`` is the estimation -error covariance of `model` state augmented with the stochastic ones. Three keyword -arguments specify its initial value with ``\mathbf{P̂}_{-1}(0) = +``\mathbf{R̂}, \mathbf{Q̂}`` covariances. The two matrices are constructed from ``\mathbf{Q̂ = +\text{diag}(Q, Q_{int_u}, Q_{int_{ym}})}`` and ``\mathbf{R̂ = R}``. The functions +``\mathbf{f̂, ĥ}`` are `model` state-space functions augmented with the stochastic model of +the unmeasured disturbances, which is specified by the numbers of integrator `nint_u` and +`nint_ym` (see Extended Help). The ``\mathbf{ĥ^m}`` function represents the measured outputs +of ``\mathbf{ĥ}`` function (and unmeasured ones, for ``\mathbf{ĥ^u}``). The matrix +``\mathbf{P̂}`` is the estimation error covariance of `model` state augmented with the +stochastic ones. Three keyword arguments specify its initial value with ``\mathbf{P̂}_{-1}(0) = \mathrm{diag}\{ \mathbf{P}(0), \mathbf{P_{int_{u}}}(0), \mathbf{P_{int_{ym}}}(0) \}``. The initial state estimate ``\mathbf{x̂}_{-1}(0)`` can be manually specified with [`setstate!`](@ref). diff --git a/src/estimator/mhe/construct.jl b/src/estimator/mhe/construct.jl index e4aa99f9..0c7e84d0 100644 --- a/src/estimator/mhe/construct.jl +++ b/src/estimator/mhe/construct.jl @@ -318,9 +318,9 @@ MovingHorizonEstimator estimator with a sample time Ts = 10.0 s, Ipopt optimizer ``\mathbf{x̂_i}`` can be manually specified with [`setstate!`](@ref), or automatically with [`initstate!`](@ref) for [`LinModel`](@ref). Note the MHE with ``p=0`` is slightly inconsistent with all the other estimators here. It interprets the initial values as - ``\mathbf{x̂_i} = \mathbf{x̂}_{-1}(-1)`` and ``\mathbf{P̂_i} = \mathbf{P̂}_{-1}(-1)``, that - is, an *a posteriori* estimate[^2] from the last time step. The MHE with ``p=1`` is - consistent, interpreting them as ``\mathbf{x̂_i} = \mathbf{x̂}_{-1}(0)`` and + ``\mathbf{x̂_i} = \mathbf{x̂}_{-1}(-1)`` and ``\mathbf{P̂_i} = \mathbf{P̂}_{-1}(-1)``, an + *a posteriori* estimate[^2] from the last time step. The MHE with ``p=1`` is consistent, + interpreting them as ``\mathbf{x̂_i} = \mathbf{x̂}_{-1}(0)`` and ``\mathbf{P̂_i} = \mathbf{P̂}_{-1}(0)``. [^2]: M. Hovd (2012), "A Note On The Smoothing Formulation Of Moving Horizon Estimation",