Finite element simulation of electrical motors fed by current inverters