  For an infinite-horizon control problem, the optimal control can be
represented by the stable manifold of the characteristic Hamiltonian system of
Hamilton-Jacobi-Bellman (HJB) equation in a semiglobal domain. In this paper,
we first theoretically prove that if an approximation is sufficiently close to
the exact stable manifold of the HJB equation in a certain sense, then the
control derived from this approximation stabilizes the system and is nearly
optimal. Then, based on the theoretical result, we propose a deep learning
algorithm to approximate the stable manifold and compute optimal feedback
control numerically. The algorithm relies on adaptive data generation through
finding trajectories randomly within the stable manifold. Such kind of
algorithm is grid-free basically, making it potentially applicable to a wide
range of high-dimensional nonlinear systems. We demonstrate the effectiveness
of our method through two examples: stabilizing the Reaction Wheel Pendulums
and controlling the parabolic Allen-Cahn equation.
