Hello,
this question has already been asked here, but I think it better fits in the InstaSPIN forum, so I re-ask it here.
I noticed that the speed measured by the encoder (`gMotorVars.SpeedQEP_krpm`) suffers from an overflow already at relatively low speed (2.5 krpm). When running the velocity controller (lab12b), everything works fine until reaching 2.5 krpm. At this point, `SpeedQEP_krpm` jumps from +2.5 to -2.5, resulting in the motor speeding up to maximum speed (around 6 krpm in my case).
When changing the PWM frequency (USER_PWM_FREQ_kHz) from 15 kHz to 30 kHz also the point where the overflow occurs doubles to 5 krpm.
When only doing torque control, It works well even after the overflow occurs, so I guess the electrical angle is still measured correctly and it is probably only an issue with the conversion from angle to speed.
Is this expected behaviour? Is there any way to prevent the overflow besides changing PWM frequency?
In case it matters: My encoder has 500 lines. I am using a LaunchPad XL TMS320F28069M with BOOSTXL-DRV8305EVM. MotorWare 1.01.00.16.
Best, Felix