Skip to content

Commit f7bf86e

Browse files
committed
added: warning about measured disturbance operating point dop
1 parent 3ad3e59 commit f7bf86e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ext/LinearMPCext.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ function Base.convert(::Type{LinearMPC.MPC}, mpc::ModelPredictiveControl.LinMPC)
2020
xo = estim.x̂op
2121
uo = model.uop
2222
yo = model.yop
23-
!iszero(yo) && error("LinearMPC does not support non-zero output operating points.")
23+
!iszero(yo) && error("LinearMPC does not support non-zero output operating points yop.")
24+
if !iszero(model.dop)
25+
@warn "LinearMPC does not support measured disturbance operating points dop.\n" *
26+
"Ensure to subtract the operating point from the measurement at each time "*
27+
"step before solving the MPC problem."
2428
LinearMPC.set_operating_point!(newmpc; xo, uo, relinearize=false)
2529
# --- State observer parameters ---
2630
Q, R = estim.cov.Q̂, estim.cov.

0 commit comments

Comments
 (0)