@@ -29,8 +29,9 @@ the function returns the next state of the augmented model, as deviation vectors
2929where ``\m athbf{x̂_0}(k+1)`` is stored in `x̂0next` argument. The method mutates `x̂0next`,
3030`û0` and `k0` in place. The argument `û0` stores the disturbed input of the augmented model
3131``\m athbf{û_0}``, and `k0`, the intermediate stage values of `model.solver`, when applicable.
32- The model parameter `model.p` is not included in the function signature for conciseness. See
33- Extended Help for details on ``\m athbf{û_0, f̂}`` and ``\m athbf{ĥ}`` implementations.
32+ The model parameter `model.p` is not included in the function signature for conciseness.
33+ The operating points are handled inside ``\m athbf{f̂}``. See Extended Help for details on
34+ ``\m athbf{û_0, f̂}`` and ``\m athbf{ĥ}`` implementations.
3435
3536# Extended Help
3637!!! details "Extended Help"
@@ -61,7 +62,7 @@ Extended Help for details on ``\mathbf{û_0, f̂}`` and ``\mathbf{ĥ}`` implem
6162 [`NonLinModel`](@ref)).
6263"""
6364function f̂! (x̂0next, û0, k0, estim:: StateEstimator , model:: SimModel , x̂0, u0, d0)
64- return f̂! (x̂0next, û0, k0, model, estim. As, estim. Cs_u, x̂0, u0, d0)
65+ return f̂! (x̂0next, û0, k0, model, estim. As, estim. Cs_u, estim . f̂op, estim . x̂op, x̂0, u0, d0)
6566end
6667
6768"""
@@ -78,19 +79,19 @@ function f̂!(x̂0next, _ , _ , estim::StateEstimator, ::LinModel, x̂0, u0, d0)
7879end
7980
8081"""
81- f̂!(x̂0next, û0, k0, model::SimModel, As, Cs_u, x̂0, u0, d0)
82+ f̂!(x̂0next, û0, k0, model::SimModel, As, Cs_u, f̂op, x̂op, x̂0, u0, d0)
8283
8384Same than [`f̂!`](@ref) for [`SimModel`](@ref) but without the `estim` argument.
8485"""
85- function f̂! (x̂0next, û0, k0, model:: SimModel , As, Cs_u, x̂0, u0, d0)
86+ function f̂! (x̂0next, û0, k0, model:: SimModel , As, Cs_u, f̂op, x̂op, x̂0, u0, d0)
8687 # `@views` macro avoid copies with matrix slice operator e.g. [a:b]
8788 @views xd, xs = x̂0[1 : model. nx], x̂0[model. nx+ 1 : end ]
8889 @views xdnext, xsnext = x̂0next[1 : model. nx], x̂0next[model. nx+ 1 : end ]
8990 mul! (û0, Cs_u, xs) # ys_u = Cs_u*xs
9091 û0 .+ = u0 # û0 = u0 + ys_u
9192 f! (xdnext, k0, model, xd, û0, d0, model. p)
9293 mul! (xsnext, As, xs)
93- x̂0next .+ = estim . f̂op .- estim . x̂op
94+ x̂0next .+ = f̂op .- x̂op
9495 return nothing
9596end
9697
0 commit comments