Skip to content

Commit 3531549

Browse files
authored
Merge pull request #472 from JuliaControl/manual_mistake
doc: minor corrections in pH tutorial
2 parents ae59d13 + d6d0be1 commit 3531549

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎docs/src/manual/nonlinmpc2.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ they are concentrations in mol/L:
299299
```@example 1
300300
nint_ym=0; nint_u=0; # disable the default stochastic model
301301
He = 8; hessian = true
302-
σQ = [0.5e-3, 0.5e-3, 1e-3]; σR=[0.05]; σP_0 = [0.05, 0.05, 1e-3]
302+
σQ = [0.5e-3, 0.5e-3, 0.9e-3]; σR=[0.05]; σP_0 = [0.05, 0.05, 1e-3]
303303
mhe = MovingHorizonEstimator(model; nint_ym, nint_u, He, hessian, σQ, σR, σP_0)
304304
using JuMP; unset_time_limit_sec(mhe.optim) # no wall time limit during optimization
305305
mhe = setconstraint!(mhe, x̂min=[0, 0, 0])
@@ -376,8 +376,8 @@ deviation of ±1.0. The base flow rate is also constrained between 0 and 20 L/mi
376376

377377
```@example 1
378378
nmpc = NonLinMPC(mhe, Hp=8, Hc=2, Nwt=[5.0])
379-
nmpc = setconstraint!(nmpc, ymin=[6], ymax=[8], umin=[0], umax=[20])
380379
using JuMP; unset_time_limit_sec(nmpc.optim) # no wall time limit during optimization
380+
nmpc = setconstraint!(nmpc, ymin=[6], ymax=[8], umin=[0], umax=[20])
381381
```
382382

383383
Next, we define a function similar to `simMHE` that simulates the plant in closed loop with
@@ -435,9 +435,9 @@ display(p) # hide
435435
![plot3_DAEpH](plot3_DAEpH.svg)
436436

437437
The figure above shows that the `nmpc` controller tightly regulates the pH around 7.0 and
438-
that the `mhe` estimator accurately tracks all three species at steady state. With m
439-
easurement noise, the pH constraints are occasionally violated briefly, but the feedback law
440-
responds quickly and returns the effluent pH to the specified range.
438+
that the `mhe` estimator accurately tracks all three species at steady state. With
439+
measurement noise, the pH constraints are occasionally violated briefly, but the feedback
440+
law responds quickly and returns the effluent pH to the specified range:
441441

442442
```@example 1
443443
res3 = with_logger(ConsoleLogger(stderr, Error)) do # hide

0 commit comments

Comments
 (0)