Model Tracking Control of Hamiltonian Systems