A MATHEMATICAL MODEL FOR COMMUTATING ELECTRICAL MACHINES