Create Position Sensing Subsystem
The position sensing subsystem reads the motor position from the Surface Mount PMSM block and simulates the QEP encoder pulse counts. The Surface Mount PMSM block outputs the mechanical position of the motor in rad/s.
Convert the position in the range
to QEP encoder counts as shown in this figure.
For details about detecting the QEP index position offset with respect to the rotor d-axis, see Quadrature Encoder Offset Calibration for PMSM Motor.