After tinkering with HFI and getting really good results pushing higher currents while accelerating, I realized that the VESC has an option for saturation compensation, but not a simple way to measure the point at which the stator saturates.
The VESC has all the hardware necessary to pulse the stator with current, measure the phase current/voltage ramp characteristics, and spit out the current at which the stator saturates.
I think that this would be a really useful feature for many people who are wanting to find the maximum motor current, and who cannot afford/access the hardware (precise shunts, oscilloscope, etc) to do it manually.
Edit:
I tried an experiment using "rotor_lock_openloop" in the terminal at varying currents, plotting the HFI average inductance, and produced the following data for a Bafang SWXH hub motor:
This shows that the VESC can be used to form a rough approximation of motor saturation characteristics. As shown, my data correlates with the roll-off and deep saturation regions of a general inductor curve:
Those inductance measurements came out nicely. The HFI inductance measurement must be quite accurate.
The vesc stator saturation compensation feature is pretty basic. Its just a linear approximation with motor current. It still makes a noticeable difference though.
I wonder why the curve doesn't show the weak saturation shape of the curve?
Something like this should be built into vesc tool, maybe on the foc experiments tab. It would make setting maximum current limits much easier or could even allow some modifier to account for saturation better. The current percentage control its a bit crude.
I am trying to replicate your method with my motor.
Could you please clarify if you measured the HFI inductance with foc_plot_hfi_en 2?
If you did, how did you manage to average the multitude of points measured on the Experiment tab of realtime data?
I can only export that to XML, which is useless to import on Excel and calculate the averages.
Thanks