Trajectory Optimzation

In Applied Dynamics, I explored some more advanced topics in dynamics in detail. The topic of interest was trajectory optimization, a way to design a trajectory that minimizes or maximizes a set of constraints. It is useful in solving difficult dynamics problems, such as simulating bipedal locomotion. To learn about this technique and to understand the pros/cons of the different collocation methods, I focused on a particular question, and solved it using MATLAB's fmincon, a built in nonlinear optimization program.

The problem that I decided to focus in detail on was an extension of a phenomenon noticed when a particle was subjected to a central force that wasn't F=-kr (eg. Hooke's law) or F=-kr2 (eg. gravity). For such situations, the dynamics of a particle can be simulated using MATLAB's ode45 for a given timestep, and interesting behavior can be quickly noted. Although circular, periodic orbits are possible, there are also many noncircular quasiperiodic orbits. That begs the questions: is it possible to get noncircular and periodic orbits, and how many periodic orbits exist for a particle subjected to a particular central force?

To get solutions, single shooting was used because it was able to find solutions in the shortest amount of time. Although you can get very close to certain solutions by blinding guessing initial conditions, it is difficult to find the exact initial conditions that results in periodic orbits instead of quasiperiodic ones. Single shooting is also used because if the initial guess for the solution is close to your desired one, it tended to be the quickest at finding solutions as compared to multiple shooting or collocation. In setting up the nonlinear optimizer, no cost function was used, and the desired periodicity and dynamics of the problem were coded as constraints in fmincon. A cost function wasn't used in this situation because it tended to push the solution towards an undesired one, such as a straight line or circular orbit.

Below are some solutions of the problem. Some of the solutions were harder to find, such as those that more closely resembled a circle. To find such solutions, multiple iterations of single shooting was used, with increasing tolerance on ode45 and fmincon. When finding solutions to the central force F=-kr-1/2, it is also interesting to note that there are no solutions were 2, 3, 4, 6, 10, and 14 lobes, because of the possible angles the particle will travel between lobes of the solution.

If you would like to read more in detail, feel free to look at either the paper or presentation on the topic.