0

I am solving an optimal control problem by applying Pontryagin's Maximum Principle in MATLAB. My ODEs are stiff so I have to use the function ode15s to solve the ODEs. On every iteration, I calculated the cost function. The cost function value did not converged but oscillating. I would like to have some guidance or suggestions to resolve this issue.

img1 shows the optimal control problem. The control is linear so a bang-bang control is expected. img2 and img3 show the equations obtained by applying Pontryagin's Maximum Principle. img4, img5, and img6 show how do I solve the problem. The steps in img4 to img6 is considered one iteration. After an iteration is done, the cost function is calculated.

img1: The Optimal Control Problem

img2: Hamiltonian

img3: Costate ODE, Siwtching Function, and Costate Final Conditions

img4: step1

img5: step2

img6: step3

P.S. I am newbie in dynamic optimization. Any help here is much appreciated. Sorry for my poor language too.

  • What so you mean by iteration? When trying to find the initial conditions of the co-states and what kind of update method are you using for that? – Kwin van der Veen Jul 09 '21 at 08:23
  • Hi Mr Veen, I am sorry for not making my question clear enough. I have amended the question. I hope the figures make my question clearer. I have ignored singular arcs in my problem. Thank you. – Handsome Teh Jul 09 '21 at 13:15

0 Answers0