The Hamiltonian of optimal control theory was developed by Lev Pontryagin as part of his maximum principle. It was inspired by, but is distinct from, the Hamiltonian of classical mechanics. Pontryagin proved that a necessary condition for solving the optimal control problem is that the control should be chosen so as to minimize the Hamiltonian. For details see Pontryagin's maximum principle.
A control is to be chosen so as to minimize the objective function
where is the system state, which evolves according to the state equations
and the control must satisfy the constraints
where is a vector of costate variables of the same dimension as the state variables .