  We propose and study an active cooling mechanism for the nanomechanical
resonator (NAMR) based on periodical coupling to a Cooper pair box (CPB), which
is implemented by a designed series of magnetic flux pluses threading through
the CPB. When the initial phonon number of the NAMR is not too large, this
cooling protocol is efficient in decreasing the phonon number by two to three
orders of magnitude. Our proposal is theoretically universal in cooling various
boson systems of single mode. It can be specifically generalized to prepare the
nonclassical state of the NAMR.
