Simple exponential: time minimisation
The time minimisation simple exponential problem consists in minimising
\[ tf\]
subject to the constraints
\[ \dot x(t) = - x(t) + u(t), u(t) \in [-1,1]\]
and the limit conditions
\[ x(0) = -1, \quad x(1) = 0.\]
You can access the problem in the CTProblems package:
using CTProblems
prob = Problem(:exponential, :time)
title = simple exponential - time min
model (Type) = OptimalControlModel{Autonomous, NonFixed}
solution (Type) = OptimalControlSolution
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) == xf, final_con
-γ ≤ u(t) ≤ γ, u_con
ẋ(t) == -(x(t)) + u(t)
tf → min
The (autonomous) optimal control problem is of the form:
minimize J(x, u, tf) = g(x(0), x(tf), tf)
subject to
ẋ(t) = f(x(t), u(t), tf), t in [0, tf] a.e.,
ηl ≤ η(x(t), tf) ≤ ηu,
ϕ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)