Simple integrator: constraint minimisation state and control constraint non autonomous
The constraint minimisation simple integrator problem consists in minimising
\[ \int_{0}^{3} e^{-α*t}*u(t) \, \mathrm{d}t\]
subject to the constraints
\[ \dot x(t) = u(t), u(t) \in [0,3], \\ 1 - x(t) - (t-1)^2 \in [-\infty,0]\]
and the limit conditions
\[ x(0) = 0, \quad x(1) = xf.\]
You can access the problem in the CTProblems package:
using CTProblems
prob = Problem(:integrator, :state_dime_1, :lagrange, :x_cons, :u_cons, :nonautonomous)
title = simple integrator - state and control constraints - nonautonomous
model (Type) = OptimalControlModel{NonAutonomous, Fixed}
solution (Type) = OptimalControlSolution
Then, the model is given by
prob.model
The (non autonomous) optimal control problem is given by:
t ∈ [t0, tf], time
x ∈ R, state
u ∈ R, control
x(t0) == x0, initial_con
0 ≤ u(t) ≤ 3, u_con
-Inf ≤ (1 - x(t)) - (t - 2) ^ 2 ≤ 0, x_con
ẋ(t) == u(t)
∫(exp(-α * t) * u(t)) → min
The (non autonomous) optimal control problem is of the form:
minimize J(x, u) = ∫ f⁰(t, x(t), u(t)) dt, over [0, 3]
subject to
ẋ(t) = f(t, x(t), u(t)), t in [0, 3] a.e.,
ηl ≤ η(t, x(t)) ≤ ηu,
ϕl ≤ ϕ(x(0), x(3)) ≤ ϕu,
where x(t) ∈ R and u(t) ∈ R.
Declarations (* required):
╭────────┬────────┬──────────┬──────────┬───────────┬────────────┬─────────────╮
│ times* │ state* │ control* │ variable │ dynamics* │ objective* │ constraints │
├────────┼────────┼──────────┼──────────┼───────────┼────────────┼─────────────┤
│ V │ V │ V │ X │ V │ V │ V │
╰────────┴────────┴──────────┴──────────┴───────────┴────────────┴─────────────╯
You can plot the solution.
using Plots
plot(prob.solution)