Simple integrator: energy minimisation
The energy minimisation simple integrator problem consists in minimising
\[ \frac{1}{2}\int_{0}^{t_f} u^2(t) \, \mathrm{d}t\]
subject to the constraints
\[ \dot x(t) = u(t),\]
and the limit conditions
\[ x(0) = 0, \quad c(t_f,x(t_f)) = 0, \\ c(t_f,x_f) = x_f - t_f - 10, \text{ free } t_f > 0.\]
You can access the problem in the CTProblems package:
using CTProblems
prob = Problem(:integrator, :energy, :free_final_time, :x_dim_1, :u_dim_1, :lagrange)
Then, the model is given by
prob.model
The (autonomous) optimal control problem is given by:
tf ∈ R, variable
t ∈ [t0, tf], time
x ∈ R, state
u ∈ R, control
x(t0) == x0, initial_con
(x(tf) - tf) - 10 == 0, boundary_constraint
ẋ(t) == u(t)
∫(0.5 * u(t) ^ 2) → min
The (autonomous) optimal control problem is of the form:
minimize J(x, u, tf) = ∫ f⁰(x(t), u(t), tf) dt, over [0, tf]
subject to
ẋ(t) = f(x(t), u(t), tf), t in [0, tf] a.e.,
ϕl ≤ ϕ(x(0), x(tf), tf) ≤ ϕu,
where x(t) ∈ R, u(t) ∈ R and tf ∈ R.
Declarations (* required):
╭────────┬────────┬──────────┬──────────┬───────────┬────────────┬─────────────╮
│ times* │ state* │ control* │ variable │ dynamics* │ objective* │ constraints │
├────────┼────────┼──────────┼──────────┼───────────┼────────────┼─────────────┤
│ V │ V │ V │ V │ V │ V │ V │
╰────────┴────────┴──────────┴──────────┴───────────┴────────────┴─────────────╯
You can plot the solution.
using Plots
plot(prob.solution)