Skip to content

Commit 0590901

Browse files
authored
Merge pull request #32 from JuliaControl/manual_mhe_correction
doc: minor correction MHE manual
2 parents 28ccc09 + 855ae78 commit 0590901

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

docs/src/manual/linmpc.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -179,26 +179,30 @@ savefig(ans, "plot2_LinMPC.svg"); nothing # hide
179179

180180
## Moving Horizon Estimation
181181

182-
The [`SteadyKalmanFilter`](@ref) is a simple observer but it is not able to handle
183-
constraints at estimation. The [`MovingHorizonEstimator`](@ref) (MHE) can improve the
184-
accuracy of the state estimate ``\mathbf{x̂}``. It solves a quadratic optimization problem
185-
under a past time window ``H_e``. Bounds on the estimated plant state ``\mathbf{x̂}``,
186-
estimated process noise ``\mathbf{ŵ}`` and estimated sensor noise ``\mathbf{v̂}`` can be
187-
included in the problem. This can be useful to add physical knowledge in the soft sensor,
188-
without adding new physical sensors (e.g. a strictly positive concentration). The
189-
closed-loop performance of any state feedback controller, like here, depends on the accuracy
190-
of the plant state estimate.
191-
192-
For the CSTR, we will bound the innovation term ``\mathbf{\mathbf{y}(k) - \mathbf{ŷ}(k)} =
193-
\mathbf{v̂}``, and increase the hot water unmeasured disturbance covariance in
194-
``\mathbf{Q_{int_u}}`` to accelerate the estimation of the load disturbance. The rejection
195-
is slightly faster:
182+
The [`SteadyKalmanFilter`](@ref) is simple but it is not able to handle constraints at
183+
estimation. The [`MovingHorizonEstimator`](@ref) (MHE) can improve the accuracy of the state
184+
estimate ``\mathbf{x̂}``. It solves a quadratic optimization problem under a past time window
185+
``H_e``. Bounds on the estimated plant state ``\mathbf{x̂}``, estimated process noise
186+
``\mathbf{ŵ}`` and estimated sensor noise ``\mathbf{v̂}`` can be included in the problem.
187+
This can be useful to add physical knowledge on the plant and its disturbances, and it does
188+
not require the installation of new physical sensors (e.g. a strictly positive
189+
concentration). The closed-loop performance of any state feedback controller, like here,
190+
depends on the accuracy of the plant state estimate.
191+
192+
For the CSTR, we will bound the innovation term ``\mathbf{y}(k) - \mathbf{ŷ}(k) =
193+
\mathbf{v̂}(k)``, and increase the hot water unmeasured disturbance covariance in
194+
``\mathbf{Q_{int_u}}`` to accelerate the estimation of the load disturbance:
196195

197196
```@example 1
198197
estim = MovingHorizonEstimator(model, He=10, nint_u=[1, 1], σQint_u = [1, 2])
199198
estim = setconstraint!(estim, v̂min=[-1, -0.5], v̂max=[+1, +0.5])
200199
mpc_mhe = LinMPC(estim, Hp=10, Hc=2, Mwt=[1, 1], Nwt=[0.1, 0.1])
201200
mpc_mhe = setconstraint!(mpc_mhe, ymin=[45, -Inf])
201+
```
202+
203+
The rejection is slightly improved:
204+
205+
```@example 1
202206
setstate!(model, zeros(model.nx))
203207
u, y, d = model.uop, model(), mpc_mhe.estim.model.dop
204208
initstate!(mpc_mhe, u, y, d)

0 commit comments

Comments
 (0)