@@ -75,8 +75,7 @@ order hold) between the samples, but linear interpolation will be added soon.
7575
7676This transcription computes the predictions by calling the continuous-time model in the
7777equality constraint function and by using the implicit trapezoidal rule. It can handle
78- moderately stiff systems and is A-stable. However, it may not be as efficient as more
79- advanced collocation methods for highly stiff systems. Note that the built-in [`StateEstimator`](@ref)
78+ moderately stiff systems and is A-stable. Note that the built-in [`StateEstimator`](@ref)
8079will still use the `solver` provided at the construction of the [`NonLinModel`](@ref) to
8180estimate the plant states, not the trapezoidal rule (see `supersample` option of
8281[`RungeKutta`](@ref) for stiff systems). See Extended Help for more details.
@@ -89,7 +88,8 @@ transcription method.
8988 Note that the stochastic model of the unmeasured disturbances is strictly discrete-time,
9089 as described in [`ModelPredictiveControl.init_estimstoch`](@ref). Collocation methods
9190 require continuous-time dynamics. Because of this, the stochastic states are transcribed
92- separately using a [`MultipleShooting`](@ref) method.
91+ separately using a [`MultipleShooting`](@ref) method. See [`con_nonlinprogeq!`](@ref)
92+ for more details.
9393"""
9494struct TrapezoidalCollocation <: CollocationMethod
9595 nc:: Int
@@ -1149,7 +1149,13 @@ end
11491149Compute vectors if `model` is a [`NonLinModel`](@ref) and for [`SingleShooting`](@ref).
11501150
11511151The method mutates `Ŷ0`, `x̂0end`, `X̂0`, `Û0` and `K0` arguments. The augmented model of
1152- [`f̂!`](@ref) and [`ĥ!`](@ref) is called recursively in a `for` loop:
1152+ [`f̂!`](@ref) and [`ĥ!`](@ref) functions is called recursively in a `for` loop:
1153+ ```math
1154+ \b egin{aligned}
1155+ \m athbf{x̂_0}(k+1) &= \m athbf{f̂}\B ig(\m athbf{x̂_0}(k), \m athbf{u_0}(k), \m athbf{d_0}(k) \B ig) \\
1156+ \m athbf{ŷ_0}(k) &= \m athbf{ĥ}\B ig(\m athbf{x̂_0}(k), \m athbf{d_0}(k) \B ig)
1157+ \e nd{aligned}
1158+ ```
11531159"""
11541160function predict! (
11551161 Ŷ0, x̂0end, X̂0, Û0, K0,
@@ -1185,8 +1191,12 @@ end
11851191
11861192Compute vectors if `model` is a [`NonLinModel`](@ref) and other [`TranscriptionMethod`](@ref).
11871193
1188- The method mutates `Ŷ0` and `x̂0end` arguments. The states `X̂0` are extracted from the
1189- decisions variables `Z̃` and the augmented output function [`ĥ!`](@ref) is applied on them.
1194+ The method mutates `Ŷ0` and `x̂0end` arguments. The augmented output function [`ĥ!`](@ref)
1195+ is called multiple times in a `for` loop:
1196+ ```math
1197+ \m athbf{ŷ_0}(k) = \m athbf{ĥ}\B ig(\m athbf{x̂_0^†}(k+j), \m athbf{d_0}(k) \B ig)
1198+ ```
1199+ in which ``\m athbf{x̂_0^†}`` is the augmented state extracted from the decision variable `Z̃`.
11901200"""
11911201function predict! (
11921202 Ŷ0, x̂0end, _, _, _,
@@ -1303,7 +1313,7 @@ end
13031313Nonlinear equality constrains for [`NonLinModel`](@ref) and [`MultipleShooting`](@ref).
13041314
13051315The method mutates the `geq`, `X̂0`, `Û0` and `K0` vectors in argument. The nonlinear
1306- equality constraints `geq` only includes the state defects, computed with:
1316+ equality constraints `geq` only includes the augmented state defects, computed with:
13071317```math
13081318\m athbf{ŝ}(k+1) = \m athbf{f̂}\B ig(\m athbf{x̂_0}(k), \m athbf{u_0}(k), \m athbf{d_0}(k)\B ig)
13091319 - \m athbf{x̂_0^†}(k+1)
0 commit comments