Recent trends in control of electric machines