Please refer PMSM3_1. For speed control i.e. build level 5 as per code structure, i am able to control the motor upto say 300 rpm (i.e. 0.1 pu)smoothly, but below that the motor is moving in steps and not quite smoothly. we are using 20KHz ISR i.e. 50us. if i have to run the motor around 200 rpm, motor will cross 0.06 mechanical degree in one ISR period. but as the resolution is 12 bit, i am not able to sense below 0.088 degree. will i be able to move my motor below 400 rpm with increased resolution of sensor? we feel that our Id and Iq loops are ok, as with that only we are running our position loop. if it would have been a problem with speed loop gains, that should have hampered the high speed operation also. (correct me if i am wrong). we have tried to measure speed on the basis of pulse width measurement of encoder channel signal for lower speeds. for build level 4, if i monitor speed with this approach, it shows correct measured speeds, but still build level 5 is not working if i try to close loop with this approach. my isr frequency is 20KHz for pwm generation and speedloop prescaler value is 10 to ensure that speed loop runs ten times slower than your inner loop.
also can anybody help me out to find correct pid gains based on motor parameters?