A key need for my application is to be able to stall the motor, holding accurate position (with force). To this end, we have implemented a Hall sensor override for low-RPM conditions. This is all tested and working, interpolating the vector angle from hall sensor inputs, then injecting into FOC using EST_setAngle_pu(…)
In total, we have both FOC and SpinTAC Velocity engaged during this process, with a SpeedRef_krpm set to 0. 10kHz update rate with 20kHz PWM.
During testing, I've noticed something very odd...
When the motor is stalled, we are seeing a disturbance / jitter occurring at ~1sec intervals. This jumps 1-2 Hall sensor positions (8polepair motor = 7deg per jump). The jitter is recovered quickly via the halls, but I can see from debug that the hall sensors are following this jump: not injecting it to begin with. The more current ceiling used, the bigger the jump (set by gMotorVars.SpinTAC.VelCtlOutputMax_A)
This means somewhere in the FOC/SpinTAC system we have a disturbance being generated almost every second. (Caveat: I need to accurately time this: so assume around 1sec).
I've timed our codebase and can confirm we've nothing overrunning the 100uS update or interrupt which could cause this. I've also run this on multiple, different, motors and it happens on them all.
Is there anything in FOC/SpinTAC velocity which is kicking-off at around ~1sec intervals which could cause this disturbance?
Mat