This example shows a custom Simscape™ implementation of a Permanent Magnet Synchronous Machine (PMSM). To view the PMSM source code, double-click on the motor block and then click on the hyperlink 'Source code'. This test circuit shows the PMSM being used as a generator, the rectifier block converting the induced AC back EMFs to a DC voltage which is in turn applied to a resistive load.
The first subplot shows the AC currents generated by the Permanent Magnet Synchronous Machine (PMSM). The second subplot shows the DC current through the resistive load.