|
1 | | -# [Control-free problems: parameter estimation and dynamic optimization](@id example-control-free) |
| 1 | +# [Control-free problems](@id example-control-free) |
2 | 2 |
|
3 | | -Control-free problems are optimal control problems without a control variable. They are useful for: |
| 3 | +Control-free problems are optimal control problems without a control variable. They are used for **optimizing constant parameters in dynamical systems**, such as: |
4 | 4 |
|
5 | | -- **Parameter estimation**: identifying unknown parameters in differential equations from observed data |
6 | | -- **Dynamic optimization**: optimizing constant parameters subject to ODE constraints |
| 5 | +- Identifying unknown parameters from observed data (parameter estimation) |
| 6 | +- Finding optimal parameters for a given performance criterion |
7 | 7 |
|
8 | 8 | This page demonstrates two simple examples with known analytical solutions. |
9 | 9 |
|
10 | 10 | !!! compat "Upcoming feature" |
11 | 11 |
|
12 | | - The syntax shown here uses a workaround with a dummy control (`u ∈ R, control` and `u(t) == 0`) because the parser does not yet support omitting the control declaration. These workaround lines are marked with `# TO REMOVE WHEN POSSIBLE` and will be removed once native control-free syntax is implemented. |
| 12 | + The syntax shown here uses a workaround with a dummy control variable (`u ∈ R, control`) and a small penalty term (`1e-5*u(t)^2`) in the cost to force `u ≈ 0`, because the parser does not yet support omitting the control declaration. These workaround lines are marked with `# TO REMOVE WHEN POSSIBLE` and will be removed once native control-free syntax is implemented. |
13 | 13 |
|
14 | 14 | First, we import the necessary packages: |
15 | 15 |
|
@@ -84,13 +84,13 @@ Consider a harmonic oscillator: |
84 | 84 | with initial conditions $q(0) = 1$, $\dot{q}(0) = 0$ and final condition $q(1) = 0$. We want to find the minimal pulsation $\omega$ satisfying these constraints: |
85 | 85 |
|
86 | 86 | ```math |
87 | | -\begin{aligned} |
88 | | -& \min_{\omega} \omega^2 \\ |
89 | | -& \text{subject to} \\ |
90 | | -& \quad \ddot{q}(t) = -\omega^2 q(t), \\ |
91 | | -& \quad q(0) = 1, \quad \dot{q}(0) = 0, \\ |
92 | | -& \quad q(1) = 0. |
93 | | -\end{aligned} |
| 87 | + \begin{aligned} |
| 88 | + & \text{Minimise} && \omega^2 \\ |
| 89 | + & \text{subject to} \\ |
| 90 | + & && \ddot{q}(t) = -\omega^2 q(t), \\[1.0em] |
| 91 | + & && q(0) = 1, \quad \dot{q}(0) = 0, \\[0.5em] |
| 92 | + & && q(1) = 0. |
| 93 | + \end{aligned} |
94 | 94 | ``` |
95 | 95 |
|
96 | 96 | The analytical solution is $\omega = \pi/2 \approx 1.5708$, giving $q(t) = \cos(\pi t / 2)$. |
|
0 commit comments