I am having a problem that results in absolute overcurrent faults where it appears that the foc observer / phase looses track of the rotor position.
vesc 4.2 running fw 3.38,
motor is alternator with 3A rotor current (basically bldc motor where the permanent magnets are replaced with an electromagnet)
real life phase measurements from lcr meter is 0.09ohms, 88uh at 20khz
running sensored with as5047 encoder (and it is so butter smooth with the encoder, until the fault.) (this fault happens in sensorless mode too)
throttle input is adc current mode w reverse button
foc high current sampling mode is on, this problem is more severe with it off.
The fault happens as the motor phase currents approach the phase current limits (70A in this case), and then the foc motor phase goes haywire and everything else with it.
If I accelerate softly enough that phase currents stay under 70a naturally this problem does not occur.
accelerating gradually from a stop, at maybe 8mph, this fault is generated
Fault : FAULT_CODE_ABS_OVER_CURRENT
Current : 183.2
Current filtered : 122.0
Voltage : 47.66
Duty : 0.484
RPM : 18080.4
Tacho : 85119
Cycles running : 18427
TIM duty : 4063
TIM val samp : 2
TIM current samp : 4200
TIM top : 8400
Comm step : 4
Temperature : 56.97
The fault is not speed dependent though. (not sure if foc switches from sensored to sensorless at high speed) it is only motor current dependent at about 70a.
you can see that slowly increasing the throttle, as soon as phase current reached 70a it faults.
there is a little stutter before the fault kicks in, potentially that is leading to the loss of rotor position?
phase currents are realitively normal before the fault.
Is the control loop trying to compensate too quickly when switching from limiting on battery current to motor current?
a more close up:
you can see the observer jumps on the motor phase nearly instantaneously and the wrong commutation causes the overcurrent fault.
anything, perhaps with the pid loops, that could be adjusted to mitigate this fault?
may be related to this issue: https://www.vesc-project.com/node/473
just the phase: