From 9a0a00c65764985f1b7284935b64599072deebf3 Mon Sep 17 00:00:00 2001 From: franckgaga Date: Sat, 17 Oct 2026 10:03:54 -0400 Subject: [PATCH 1/2] doc: minor correction in pH tutorial --- docs/src/manual/nonlinmpc2.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/manual/nonlinmpc2.md b/docs/src/manual/nonlinmpc2.md index 041ff88dd..8edfb9948 100644 --- a/docs/src/manual/nonlinmpc2.md +++ b/docs/src/manual/nonlinmpc2.md @@ -376,8 +376,8 @@ deviation of ±1.0. The base flow rate is also constrained between 0 and 20 L/mi ```@example 1 nmpc = NonLinMPC(mhe, Hp=8, Hc=2, Nwt=[5.0]) -nmpc = setconstraint!(nmpc, ymin=[6], ymax=[8], umin=[0], umax=[20]) using JuMP; unset_time_limit_sec(nmpc.optim) # no wall time limit during optimization +nmpc = setconstraint!(nmpc, ymin=[6], ymax=[8], umin=[0], umax=[20]) ``` Next, we define a function similar to `simMHE` that simulates the plant in closed loop with @@ -435,9 +435,9 @@ display(p) # hide ![plot3_DAEpH](plot3_DAEpH.svg) The figure above shows that the `nmpc` controller tightly regulates the pH around 7.0 and -that the `mhe` estimator accurately tracks all three species at steady state. With m -easurement noise, the pH constraints are occasionally violated briefly, but the feedback law -responds quickly and returns the effluent pH to the specified range. +that the `mhe` estimator accurately tracks all three species at steady state. With +measurement noise, the pH constraints are occasionally violated briefly, but the feedback +law responds quickly and returns the effluent pH to the specified range: ```@example 1 res3 = with_logger(ConsoleLogger(stderr, Error)) do # hide From d6d0be145f81702fbdf33b54e62c5138230d0c6f Mon Sep 17 00:00:00 2001 From: franckgaga Date: Sat, 17 Oct 2026 10:48:10 -0400 Subject: [PATCH 2/2] doc: slightly reduce intagration gain in pH tutorial --- docs/src/manual/nonlinmpc2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/manual/nonlinmpc2.md b/docs/src/manual/nonlinmpc2.md index 8edfb9948..4857a4934 100644 --- a/docs/src/manual/nonlinmpc2.md +++ b/docs/src/manual/nonlinmpc2.md @@ -299,7 +299,7 @@ they are concentrations in mol/L: ```@example 1 nint_ym=0; nint_u=0; # disable the default stochastic model He = 8; hessian = true -σQ = [0.5e-3, 0.5e-3, 1e-3]; σR=[0.05]; σP_0 = [0.05, 0.05, 1e-3] +σQ = [0.5e-3, 0.5e-3, 0.9e-3]; σR=[0.05]; σP_0 = [0.05, 0.05, 1e-3] mhe = MovingHorizonEstimator(model; nint_ym, nint_u, He, hessian, σQ, σR, σP_0) using JuMP; unset_time_limit_sec(mhe.optim) # no wall time limit during optimization mhe = setconstraint!(mhe, x̂min=[0, 0, 0])