Closed-loop control strategy with improved current for a flashing ratchet