Skip to content

Commit 829b41e

Browse files
committed
docs: improve control-free examples documentation
- Simplify page title to avoid redundancy - Update workaround explanation to reflect penalty term approach - Improve mathematical formatting consistency with other examples - Clarify that parameter estimation is a type of parameter optimization
1 parent 9ff1f04 commit 829b41e

2 files changed

Lines changed: 12 additions & 256 deletions

File tree

docs/src/api/private.md

Lines changed: 0 additions & 244 deletions
This file was deleted.

docs/src/example-control-free.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# [Control-free problems: parameter estimation and dynamic optimization](@id example-control-free)
1+
# [Control-free problems](@id example-control-free)
22

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:
44

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
77

88
This page demonstrates two simple examples with known analytical solutions.
99

1010
!!! compat "Upcoming feature"
1111

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.
1313

1414
First, we import the necessary packages:
1515

@@ -84,13 +84,13 @@ Consider a harmonic oscillator:
8484
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:
8585

8686
```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}
9494
```
9595

9696
The analytical solution is $\omega = \pi/2 \approx 1.5708$, giving $q(t) = \cos(\pi t / 2)$.

0 commit comments

Comments
 (0)