I am noticing a problem with speed control. Although the digital system appears to regulate the speed at the programmed set point, in fact it maintain a speed, but it is not the correct the speed. What could account for the discrepancy ?
The original DRV8301-69M-KIT has a hardware filter in the voltage (BEMF) analog inputs, which has a pole at ~335 Hz. The motor runs nominally up to 18000rpm. With 2-pole pairs in the rotor, the maximum electrical frequency should be ~600Hz.
At 3000rpm, the electrical frequency should be 100Hz. Using proj_lab05b.c I put a toggle in the ISR everytime (Va - Vb) crossed zero negative to positive (- => +). This generates a square wave at half the electrical frequency (a toggle for each rotor head passing the zero crossing). On the oscilloscope however, I do not see 100Hz in the Va - Vb and 50 Hz in the GPIO12 toggle output. I see ~65HZ and ~130Hz. The motor is really spinning faster than the software measures it at.
This occurs at all speeds. At 18000 it is running approximately 130% of that or ~23400
Does anyone have any ideas about why this might be occurring.