A wireless power transfer system with self-switching constant-current/constant-voltage output and integrated impedance detection