  This paper demonstrates a refined approach to solving dynamic optimization
problems for underactuated marine surface vessels. To this end the differential
flatness of a mathematical model assuming full actuation is exploited to derive
an efficient representation of a finite dimensional nonlinear programming
problem, which in turn is constrained to apply to the underactuated case. It is
illustrated how the properties of the flat output can be employed for the
generation of an initial guess to be used in the optimization algorithm in the
presence of static and dynamic obstacles. As an example energy optimal point to
point trajectory planning for a nonlinear 3 degrees of freedom dynamic model of
an underactuated surface vessel is undertaken. Input constraints, both in rate
and magnitude as well as state constraints due to convex and non-convex
obstacles in the area of operation are considered and simulation results for a
challenging scenario are reported. Furthermore, an extension to a trajectory
tracking controller using model predictive control is made where the benefits
of the flatness based direct method allow to introduce nonuniform sample times
that help to realize long prediction horizons while maintaining short term
accuracy and real time capability. This is also verified in simulation where
additional disturbances in the form of environmental disturbances, dynamic
obstacles and parameter mismatch are introduced.
