Lots of scope for tuning once it's in the car I think

You are correct, Lq and Ld are a moving target with both phase current magnitude and frequency. Attached snip from the US based Oakridge Labs review of the 2010 Prius describes the phenomena. In another report from Oakridge there is a table showing the changes in Lq and Ld with respect to phase current and frequency for a number of Toyota IPM motors but I can't put my hands on it at the moment.
Yes that could actually work. I'll keep exploring the "mathy" solutions. For example I could try if a PID in place of PI controller cures some problems.arber333 wrote: ↑Thu Nov 07, 2019 4:56 pm Is it possible to make a "frewheel" function in code?
You can use it at least thrice.
1. When at such a low speed regen is not desired you can switch to "freewheel" to stop at trafic light.
2. If you dont desire regen say in winter time you switch on BMS pin and motor frewheels untill you apply brakes.
3. You can cheat the code and command freewheel for 1/10th second everytime throttle would pass 0 position. From there you apply regen torque in %.
Do you think that would cure the spike?
Well i dont think PID will cure the regen surge just by itself. Remember, it is still "proportional" first, If you dampen the initial surge you may have a lame response from regen regulator.