Adaptive flux observer for induction machines with on-line estimation of stator and rotor resistances