@@ -249,7 +249,7 @@ function correct_estimate_obsv!(estim::StateEstimator, y0m, d0, K̂)
249249end
250250
251251" Allow code reuse for `SteadyKalmanFilter` and `Luenberger` (observers with constant gain)."
252- function predict_estimate_obsv! (estim:: StateEstimator , y0m , d0, u0)
252+ function predict_estimate_obsv! (estim:: StateEstimator , _ , d0, u0)
253253 x̂0corr = estim. x̂0
254254 Â, B̂u, B̂d = estim. Â, estim. B̂u, estim. B̂d
255255 x̂0next = estim. buffer. x̂
@@ -341,13 +341,28 @@ is the estimation error covariance of `model` states augmented with the stochast
341341 Keyword arguments with *`emphasis`* are non-Unicode alternatives.
342342
343343- `model::LinModel` : (deterministic) model for the estimations.
344+ - `i_ym=1:model.ny` : `model` output indices that are measured ``\m athbf{y^m}``, the rest
345+ are unmeasured ``\m athbf{y^u}``.
344346- `σP_0=fill(1/model.nx,model.nx)` or *`sigmaP_0`* : main diagonal of the initial estimate
345347 covariance ``\m athbf{P}(0)``, specified as a standard deviation vector.
348+ - `σQ=fill(1/model.nx,model.nx)` or *`sigmaQ`* : main diagonal of the process noise
349+ covariance ``\m athbf{Q}`` of `model`, specified as a standard deviation vector.
350+ - `σR=fill(1,length(i_ym))` or *`sigmaR`* : main diagonal of the sensor noise covariance
351+ ``\m athbf{R}`` of `model` measured outputs, specified as a standard deviation vector.
352+ - `nint_u=0`: integrator quantity for the stochastic model of the unmeasured disturbances at
353+ the manipulated inputs (vector), use `nint_u=0` for no integrator.
354+ - `nint_ym=default_nint(model,i_ym,nint_u)` : same than `nint_u` but for the unmeasured
355+ disturbances at the measured outputs, use `nint_ym=0` for no integrator.
356+ - `σQint_u=fill(1,sum(nint_u))` or *`sigmaQint_u`* : same than `σQ` but for the unmeasured
357+ disturbances at manipulated inputs ``\m athbf{Q_{int_u}}`` (composed of integrators).
346358- `σPint_u_0=fill(1,sum(nint_u))` or *`sigmaPint_u_0`* : same than `σP_0` but for the unmeasured
347359 disturbances at manipulated inputs ``\m athbf{P_{int_u}}(0)`` (composed of integrators).
360+ - `σQint_ym=fill(1,sum(nint_ym))` or *`sigmaQint_u`* : same than `σQ` for the unmeasured
361+ disturbances at measured outputs ``\m athbf{Q_{int_{ym}}}`` (composed of integrators).
348362- `σPint_ym_0=fill(1,sum(nint_ym))` or *`sigmaPint_ym_0`* : same than `σP_0` but for the unmeasured
349363 disturbances at measured outputs ``\m athbf{P_{int_{ym}}}(0)`` (composed of integrators).
350- - `<keyword arguments>` of [`SteadyKalmanFilter`](@ref) constructor.
364+ - `direct=true`: construct with a direct transmission from ``\m athbf{y^m}`` (a.k.a. current
365+ estimator, in opposition to the delayed/predictor form).
351366
352367# Examples
353368```jldoctest
@@ -564,11 +579,31 @@ The ``\mathbf{ĥ^m}`` function represents the measured outputs of ``\mathbf{ĥ
564579 Keyword arguments with *`emphasis`* are non-Unicode alternatives.
565580
566581- `model::SimModel` : (deterministic) model for the estimations.
582+ - `i_ym=1:model.ny` : `model` output indices that are measured ``\m athbf{y^m}``, the rest
583+ are unmeasured ``\m athbf{y^u}``.
584+ - `σP_0=fill(1/model.nx,model.nx)` or *`sigmaP_0`* : main diagonal of the initial estimate
585+ covariance ``\m athbf{P}(0)``, specified as a standard deviation vector.
586+ - `σQ=fill(1/model.nx,model.nx)` or *`sigmaQ`* : main diagonal of the process noise
587+ covariance ``\m athbf{Q}`` of `model`, specified as a standard deviation vector.
588+ - `σR=fill(1,length(i_ym))` or *`sigmaR`* : main diagonal of the sensor noise covariance
589+ ``\m athbf{R}`` of `model` measured outputs, specified as a standard deviation vector.
590+ - `nint_u=0`: integrator quantity for the stochastic model of the unmeasured disturbances at
591+ the manipulated inputs (vector), use `nint_u=0` for no integrator (see Extended Help).
592+ - `nint_ym=default_nint(model,i_ym,nint_u)` : same than `nint_u` but for the unmeasured
593+ disturbances at the measured outputs, use `nint_ym=0` for no integrator (see Extended Help).
594+ - `σQint_u=fill(1,sum(nint_u))` or *`sigmaQint_u`* : same than `σQ` but for the unmeasured
595+ disturbances at manipulated inputs ``\m athbf{Q_{int_u}}`` (composed of integrators).
596+ - `σPint_u_0=fill(1,sum(nint_u))` or *`sigmaPint_u_0`* : same than `σP_0` but for the unmeasured
597+ disturbances at manipulated inputs ``\m athbf{P_{int_u}}(0)`` (composed of integrators).
598+ - `σQint_ym=fill(1,sum(nint_ym))` or *`sigmaQint_u`* : same than `σQ` for the unmeasured
599+ disturbances at measured outputs ``\m athbf{Q_{int_{ym}}}`` (composed of integrators).
600+ - `σPint_ym_0=fill(1,sum(nint_ym))` or *`sigmaPint_ym_0`* : same than `σP_0` but for the unmeasured
601+ disturbances at measured outputs ``\m athbf{P_{int_{ym}}}(0)`` (composed of integrators).
602+ - `direct=true`: construct with a direct transmission from ``\m athbf{y^m}`` (a.k.a. current
603+ estimator, in opposition to the delayed/predictor form).
567604- `α=1e-3` or *`alpha`* : alpha parameter, spread of the state distribution ``(0 < α ≤ 1)``.
568605- `β=2` or *`beta`* : beta parameter, skewness and kurtosis of the states distribution ``(β ≥ 0)``.
569606- `κ=0` or *`kappa`* : kappa parameter, another spread parameter ``(0 ≤ κ ≤ 3)``.
570- - `<keyword arguments>` of [`SteadyKalmanFilter`](@ref) constructor.
571- - `<keyword arguments>` of [`KalmanFilter`](@ref) constructor.
572607
573608# Examples
574609```jldoctest
@@ -888,20 +923,16 @@ end
888923
889924Construct an extended Kalman Filter with the [`SimModel`](@ref) `model`.
890925
891- Both [`LinModel`](@ref) and [`NonLinModel`](@ref) are supported. The process model is
892- identical to [`UnscentedKalmanFilter`](@ref). The Jacobians of the augmented model
926+ Both [`LinModel`](@ref) and [`NonLinModel`](@ref) are supported. The process model and the
927+ keyword arguments are identical to [`UnscentedKalmanFilter`](@ref), except for `α`, `β` and
928+ `κ` which do not apply to the extended Kalman Filter. The Jacobians of the augmented model
893929``\m athbf{f̂, ĥ}`` are computed with [`ForwardDiff.jl`](https://github.com/JuliaDiff/ForwardDiff.jl)
894930automatic differentiation.
895931
896932!!! warning
897933 See the Extended Help of [`linearize`](@ref) function if you get an error like:
898934 `MethodError: no method matching (::var"##")(::Vector{ForwardDiff.Dual})`.
899935
900- # Arguments
901- - `model::SimModel` : (deterministic) model for the estimations.
902- - `<keyword arguments>` of [`SteadyKalmanFilter`](@ref) constructor.
903- - `<keyword arguments>` of [`KalmanFilter`](@ref) constructor.
904-
905936# Examples
906937```jldoctest
907938julia> model = NonLinModel((x,u,_)->0.2x+u, (x,_)->-3x, 5.0, 1, 1, 1, solver=nothing);
0 commit comments