So the idea is to use the DTC example of the induction motor and adapt it to a PMSM, while:
1) using angle measurement.
2) fixed carrier switching frequency of 10kHz
3) motor is defined in the file
4) implementing the block diagram Fig 6.
5) implementing switching table Table 4.
6) adding a torque=f(angular speed[rpm]) dependency
The document reference is:
I have added my file with my actual status.