Optimal Control Homework 5
Optimal Control Homework 5
a) Take the initial state to be (𝑥1 (0), 𝑥2 (0), 𝑥3 (0)) = (1,0,0) and find the optimal control
and optimal final time. Plot the final state and control time histories and show the optimal
final time. How many switches were needed?
b) Take the same initial states as a), but impose control constrained to +/- 0.75 and find the
optimal control and optimal final time. Plot the final state and control time histories and
show the optimal final time. How many switches were needed and did the switch times
change?
c) Take the same initial states as a), but impose control constrained to +/- 0.5 and find the
optimal control and optimal final time. Plot the final state and control time histories and
show the optimal final time. How many switches were needed? Did the approximate
switch times change and, if so, by how much?
d) Take the initial state to be (𝑥1 (0), 𝑥2 (0), 𝑥3 (0)) = (1,1,1) and find the optimal control
and optimal final time with the control constrained to +/- 1.0. Plot the final state and
control time histories and show the optimal final time. Did the number of switches
change?
𝑥̇ 1 = 𝑥2 𝑥1 (0) = 0 𝑥1 (𝑡𝑓 ) = 3
𝑥̇ 2 = 𝜇(1 − 𝑥12 )𝑥2 − 𝑥1 + 𝑢 𝑥2 (0) = 0 𝑥2 (𝑡𝑓 ) = 0
𝑡
Minimize the performance index 𝐽 = ∫0 𝑓 1 𝑑𝑡 I suggest a fixed step integration of 0.02 seconds.
I suggest you have the initial control, u, to be 0.01 for all time 0:0.02:1. Also, I suggest you use
the following options:
options = optimset('Display','iter','TolCon',1e-4,'TolFun',1e-
4,'PlotFcns','optimplotx', 'MaxFunEvals',5000,'Algorithm','interior-
point');
a) Set the upper and lower bounds of the control to be +/-10, find the optimal final time and
plot the optimal state and control time histories when 𝜇 = 5.
b) Set the bounds to be +/-7 and rerun, plotting the optimal state and control time histories
and note the optimal final time.
c) Set the bounds to be +/-5 and rerun, plotting the optimal state and control time histories
and note the optimal final time.
d) Compare the optimal final times found for these three situations and note the trend. Make
comments about how the control time histories changed as well as the qualatative
differences between the three state time histories.