@@ -22,8 +22,11 @@ any custom move blocking):
2222 \v dots \\
2323 \m athbf{Δu}(k+H_c-1) \e nd{bmatrix}
2424```
25- This method is generally more efficient for small control horizon ``H_c``, stable and mildly
26- nonlinear plant model/constraints.
25+ This method computes the predictions by calling the augmented discrete-time model
26+ recursively over the prediction horizon ``H_p`` in the objective function, or by updating
27+ the linear coefficients of the quadratic optimization for [`LinModel`](@ref). It is
28+ generally more efficient for small control horizon ``H_c``, stable and mildly nonlinear
29+ plant model/constraints.
2730"""
2831struct SingleShooting <: ShootingMethod end
2932
@@ -48,7 +51,11 @@ operating point ``\mathbf{x̂_{op}}`` (see [`augment_model`](@ref)):
4851where ``\m athbf{x̂}_i(k+j)`` is the state prediction for time ``k+j``, estimated by the
4952observer at time ``i=k`` or ``i=k-1`` depending on its `direct` flag. Note that
5053``\m athbf{X̂_0 = X̂}`` if the operating point is zero, which is typically the case in practice
51- for [`NonLinModel`](@ref). This transcription method is generally more efficient for large
54+ for [`NonLinModel`](@ref).
55+
56+ This transcription computes the predictions by calling the augmented discrete-time model
57+ in the equality constraint function recursively over ``H_p``, or by updating the linear
58+ equality constraint vector for [`LinModel`](@ref). It is generally more efficient for large
5259control horizon ``H_c``, unstable or highly nonlinear plant models/constraints.
5360
5461Sparse optimizers like `OSQP` or `Ipopt` and sparse Jacobian computations are recommended
@@ -61,34 +68,20 @@ struct MultipleShooting <: ShootingMethod end
6168
6269Construct an implicit trapezoidal [`TranscriptionMethod`](@ref).
6370
64- This is the simplest collocation method. It is only supported for continuous-time
65- [`NonLinModel`](@ref)s. It can handle moderately stiff systems and is A-stable. The decision
66- variables are the same as for [`MultipleShooting`](@ref), hence similar computational costs.
67- However, it may not be as efficient as more advanced collocation methods for highly stiff
68- systems. It currently assumes piecewise constant manipulated inputs (or zero-order hold)
69- between the samples, but linear interpolation will be added in the future. See Extended Help
70- for more details on the collocation/defect constraints.
71-
72- # Extended Help
71+ This is the simplest collocation method. It supports continuous-time [`NonLinModel`](@ref)s
72+ only. The decision variables are the same as for [`MultipleShooting`](@ref), hence similar
73+ computational costs. It currently assumes piecewise constant manipulated inputs (or zero-
74+ order hold) between the samples, but linear interpolation will be added soon.
7375
74- !!! details "Extended Help"
75- The implicit trapezoidal collocation estimates the defects with:
76- ```math
77- \m athbf{s_d}(k) = \m athbf{x_0} \f rac{T_s}{2}\b ig(\m athbf{F̂}(k+1) + \m athbf{F̂}(k)\b ig)
78- ```
79- where ``T_s`` is the sampling period, ``\m athbf{Ẽ}`` the matrix defined at
80- [`init_defectmat`](@ref), and ``\m athbf{F̂}(k+j)`` the stacked vector of system
76+ This transcription computes the predictions by calling the continuous-time model in the
77+ equality 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 stochastic model of the
80+ unmeasured disturbances is strictly discrete-time, it is thus transcribed separately using
81+ [`MultipleShooting`](@ref).
8182
82- where ``\m athbf{f̂}(k+j) = \m athbf{f̂}\b ig(\m athbf{x̂}(k+j), \m athbf{u}(k+j), \m athbf{d}(k+j)\b ig)``.
83- This leads to the following defect constraints for ``j=0`` to ``H_p-1``:
84- ```math
85- \m athbf{ŝ}(k+j) = \m athbf{x̂}(k+j+1) - \m athbf{x̂}(k+j) - \f rac{T_s}{2} \b ig( \m athbf{f̂}(k+j) + \m athbf{f̂}(k+j+1) \b ig) = 0
86- ```
87- which are added as equality constraints in the optimization problem. The initial state
88- ``\m athbf{x̂}(k)`` is given by the state estimator, and the future states
89- ``\m athbf{x̂}(k+j+1)`` are decision variables in the optimization problem. The method
90- requires evaluating the system dynamics at both the current and next time steps, which
91- can increase computational complexity compared to explicit methods like single shooting.
83+ Sparse optimizers like `Ipopt` and sparse Jacobian computations are recommended for this
84+ transcription method.
9285"""
9386struct TrapezoidalCollocation <: CollocationMethod end
9487
0 commit comments