Skip to content

Commit b54915c

Browse files
committed
debug internal model
1 parent b408716 commit b54915c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/estimator/internal_model.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,18 @@ end
208208
"Update similar values for [`InternalModel`](@ref) estimator."
209209
function setmodel_estimator!(estim::InternalModel, model, _ , _ , _ , _ , _ )
210210
Â, B̂u, Ĉ, B̂d, D̂d, x̂op, f̂op = matrices_internalmodel(model)
211-
# --- update augmented state-space matrices ---
211+
# --- update internal model state-space matrices ---
212212
estim. .=
213213
estim.B̂u .= B̂u
214214
estim.Ĉ .=
215215
estim.B̂d .= B̂d
216216
estim.D̂d .= D̂d
217+
# --- update state estimate and its operating points ---
218+
estim.x̂0 .+= estim.x̂op # convert x̂0 to x̂ with the old operating point
219+
estim.x̂op .= x̂op
220+
estim.f̂op .= f̂op
221+
estim.x̂0 .-= estim.x̂op # convert x̂ to x̂0 with the new operating point
222+
return nothing
217223
end
218224

219225
@doc raw"""

0 commit comments

Comments
 (0)