Part Number:TMS320F28335
Tool/software: Code Composer Studio
I'm trying to calculate speed from the position encoder mounted on my PMSM. I'm successfully able to get the position(in degrees). I tried to do speed = (new_position - old_position)/delta_t but i'm plotting the result in DAC, I'm getting random large peaks in between. I'm not able to figure out what the problem is.
P.S. I'm getting position after every 400us(synced with PWM ISR) but the speed function is executed only in intervals of 10ms.