Matrix and Space-Phasor Theory of Electrical Machines