Good evening experts and thanks for your time,
My name is Andreas and i use this simulink code (www.mathworks.com/.../45124-motor-control-with-ti-launchpad) to spin my motor, later i tried to run this code exclusively in simulink enviroment.
So i made some changes like remove the interrupt, add my pmsm motor, adc simulation for current's scope's and other's.S when i run the final project everything look great, my actual rotor speed graph was smooth and exactly the same with smo rotor speed, my current and svpwm graph's look's great, but when i compare smo angle theta and actual angle theta i found that smo angle theta delay 60 degree's per electrical revolution.i look for a solution in e2e and mathworks too, i try a lot of change's but nothing resolve my problem, and here i am looking for any advice. i upload a screen shot and if anyone want my simulink project please feel free to ask.
Here is my scope details:
y axis=electrical degree x axis=time
Blue=.smo angle theta
yellow=actual angle theta