I was able to run the cogging torque mapping algorithm that @wetmelon made. I dumped the generated map via the debugger’s variable inspection feature, and did some analysis in python. Here is the torque map I got (already provided in the above post, but here with units and stuff):
From the symmetry of these motors, we expect that the cogging torque has significant harmonic components at the harmonics of “number of stator slots” and “number of pole pairs”. I took the FFT of the cogging map, and I was pleasantly surprised to find just how crisply these harmonics show up:
The motor under test was the EMP C4250 - 500kv, which has 12 stator slots and 7 pole-pairs. The spikes are at
[0, 7, 12, 14, 24, 28, 36, 42, 48, 64, 72, 84]. Except for 64, these are all harmonics of 12 or 7.
- Harmonic 0 is the DC offset, and we expect that this bias is present since this calibration scan only went in one direction.
- We also see all the harmonics of the number of slots, except that
64 shows up instead of
60. Not sure what is going on there, maybe more data will reveal what’s going on. Anyway, the harmonics of 12 are:
[12, 24, 36, 48, 60, 72, 84].
- We also see the 1st, 2nd, 4th and 6th harmonic of the pole pair number
[7, 14, 28, 42].
- I just kind of guessed a heuristic that it’s the 1st and all even harmonics up to
slots/2. I am just extrapolating from data here, I have no theoretical reason why that should be the limit.
Nevertheless, here is how the chosen harmonics were picked:
harmonics = 
harmonics += [(i+1)*stator_slots for i in range(pole_pairs)]
harmonics += [pole_pairs]
harmonics += [(i+1)*2*pole_pairs for i in range(int(stator_slots/4))]
We can generate a “fitted” version of the map by doing the IFFT of only those harmonics. Below you can see that as the orange trace in the cogging torque map (1st subplot). Below you can see a zoomed out and zoomed in version of the FFT spectrum of the cogging torque map, with the selected harmonics in red.