Investigation of plasma mode transition and hysteresis in electron cyclotron resonance ion thrusters