Finite element analysis of brushless DC motors for flux weakening operation