@@ -296,9 +296,9 @@ The method tries to find a good stead-state for the initial esitmate ``\mathbf{x
296296removes the operating points with [`remove_op!`](@ref) and call [`init_estimate!`](@ref):
297297
298298- If `estim.model` is a [`LinModel`](@ref), it finds the steady-state of the augmented model
299- using `u` and `d` arguments, and uses the `ym` argument to enforce that `` \m athbf{ŷ^m} =
300- \m athbf{y^m}``. For control applications, this solution produces a bumpless manual to
301- automatic transfer. See [`init_estimate!`](@ref) for details.
299+ using `u` and `d` arguments, and uses the `ym` argument to enforce that
300+ `` \m athbf{ŷ^m}(0) = \m athbf{ y^m}(0) ``. For control applications, this solution produces a
301+ bumpless manual to automatic transfer. See [`init_estimate!`](@ref) for details.
302302- Else, `estim.x̂` is left unchanged. Use [`setstate!`](@ref) to manually modify it.
303303
304304If applicable, it also sets the error covariance `estim.P̂` to ``\m athbf{P̂}(0)``.
@@ -414,7 +414,27 @@ include("estimator/kalman.jl")
414414include (" estimator/luenberger.jl" )
415415include (" estimator/internal_model.jl" )
416416
417- " Get [`InternalModel`](@ref) output `ŷ` from current measured outputs `ym` and dist. `d`."
418- evalŷ (estim:: InternalModel , ym, d) = evaloutput (estim,ym, d)
419- " Other [`StateEstimator`](@ref) ignores `ym` to evaluate `ŷ`."
420- evalŷ (estim:: StateEstimator , _, d) = evaloutput (estim, d)
417+ """
418+ evalŷ(estim::StateEstimator, _ , d) -> ŷ
419+
420+ Evaluate [`StateEstimator`](@ref) output `ŷ` from measured disturbance `d` and `estim.x̂`.
421+
422+ Second argument is ignored, except for [`InternalModel`](@ref).
423+ """
424+ evalŷ (estim:: StateEstimator , _ , d) = evaloutput (estim, d)
425+
426+ @doc raw """
427+ evalŷ(estim::InternalModel, ym, d) -> ŷ
428+
429+ Get [`InternalModel`](@ref) output `ŷ` from current measured outputs `ym` and dist. `d`.
430+
431+ [`InternalModel`](@ref) estimator needs current measured outputs ``\m athbf{y^m}(k)`` to
432+ estimate its outputs ``\m athbf{ŷ}(k)``, since the strategy imposes that
433+ ``\m athbf{ŷ^m}(k) = \m athbf{y^m}(k)`` is always true.
434+ """
435+ function evalŷ (estim:: InternalModel , ym, d)
436+ ŷ = h (estim. model, estim. x̂d, d - estim. model. dop) + estim. model. yop
437+ ŷ[estim. i_ym] = ym
438+ return ŷ
439+ end
440+
0 commit comments