Stabilization of a Time Dependent Hamiltonian System