An approach for stabilizing periodic orbits in nonlinear systems