Models of the electrical machines are used in the process of development control system and verification of them. Nowadays multiphase machines are attracting attention due to their reliability; however, standard MATLAB libraries are limited by 5-phase and 3-phase models. This paper considers a universal model of 3-, 5-, 6-, 7-, 9-phase permanent magnet synchronous motor. The model was developed using standard blocks of MATALB Simulink and can be used as a component of SimPowerSystem. Simulation results are provided as well as a link to the library for use free of charge.