Matlab model of simplefoc controller

Hi,

There are various blocksets in Simulink which include field oriented control. SimpleFOC is propably quite similar from the theory point of you. Check the documentation, for example (BLDC motor is same as PMSM):