In the "Permanent Magnet Synchronous Machine (PMSM)" example model, a gain of "4" is used to convert the mechanical speed and angle to electrical speed and angle respectively.
This is because the ratio electrical speed by mechanical speed in a PMSM is equal to the number of Pole pairs. The number of Pole pairs is set to “4” by default for “Permanent Magnet Synchronous Machine”. Hence, the mechanical speed is multiplied by “4” to get the electrical speed. Similarly, this has also been applied for the Rotor angle conversion.
You may refer to the links below for more information, :