GENERAL PURPOSE MATHEMATICAL MODELS FOR ROTATING ELECTRICAL MACHINES