MRAS based estimation of stator resistance and rotor flux linkage of permanent magnet generator considering core losses