How can I implement the Pontryagin's maximum principle?

I try to solve a optimizing problem with the help of the Pontryagin's minimum (maximum) principle, but I must understand something wrong, can someone help me?
-
Here is the problem:
I have a moving object, described with two states, its current position "x" and its current velocity "v". My input "u" is its acceleration. My goal is to move the object as fast as possible (minimize time) to a defined position and stop. The input "u" is bounded within [−u0,u0].
My initial conditions are:
x(0)=(x_0,v_0)
x'=f(x)=(v, u)
And my goal is:
x(t_e)=(x_e, 0)
I set up my cost function:
J=Integral over 0 to t_e: 1 dt
I couldn't find a well defined algorithm for the Pontryagin's minimum (maximum) principle, and I have no clue how to implement this in matlab, but any help would be great!

3 Comments

Hello Jonas,
Did you manage to find a way?
In my opinion, you first need to solve PMP (optimal control, coestate, state euqations) and obtain the control input (in form of an equation). Next, you might need to discretize your cost function and use either shooting method or some other method to obtain control inputs...
Hello Jonas,
Could you find a solution for your approach using Pontryagin's maximum Principle? If yes, can you please share here the solution?
Best Regards,
Lucas Both
Hi @Lucas, are you looking for applying the dynamic programming using the formulation of Pontryagin's Maximum Principle? However, "dynamic programming" does not refer to the concept of programming in the sense of writing code for computers. Thus, to some computer science students, the name might be a bit misleading, as it has nothing to do with writing dynamic or changing code.

Sign in to comment.

Answers (1)

Hello. I think you trying to solve the moon lander optimization? I am also trying to set up dynamic optimization problems in Matlab (optimization toolbox or simulink or anythink that works actually) But I couldn't manage. If you found a way, I could use some help :) Thank you in advance.

Asked:

on 17 Jan 2016

Commented:

on 31 Aug 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!