Thanks for the comments but this really came together much more easily than expected. Been wanting to have a go at it for a while but couldn't quite face it, however my brain seems to be starting to work properly again and bexander's data gave me the push to get on with it so here it is.
Hopefully get the code tidied up and pushed to github later this evening.
Bexander has kindly taken some more plots over here
viewtopic.php?p=51123#p51123 which include udc and the program has now been modified to use it. Initial results are:
Log4 - Lq=5.4mH, Ld=1.65mH, λ=95.0mWb
Log5 - Lq=5.1mH, Ld=1.66mH, λ=96.4mWb
Log6 - Lq=5.2mH, Ld=1.66mH, λ=96.0mWb
Log7 - Lq=5.0mH, Ld=1.68mH, λ=97.0mWb
Log8 - missing udc
Log9 - Lq=5.75mH, Ld=1.77mH, λ=95.3mWb
Log10 - Rs = 145mR
This compares to measured values of Ld=2mH and Lq=6mH (wondering whether the reduction is due to core saturation in the motor due to the higher currents?).
Ought to explain log10. The Rs calculation didn't work on the previous plots, essentially its effect was tiny compared to everything else so didn't separate out. On log10 the car was held static on the brakes while the throttle was blipped. Because the motor is stationary most of the Vq and Vd terms disappear leaving just the resistive contribution and with that we get this (un-tuned, Rs=75mR):
And this when tuned (Rs=147mR):
That is a pretty good cancellation and minima curve indicating a Rs value of 147mR. Now bexander has measured this motor as being 75mR so why the poor agreement? Well the 147mR is based on what the firmware 'sees', which will include cables, IGBTs, diodes, deadtime, etc all averaged over varying currents (some of those are non linear). All it is really useful for is in trying to improve agreement between the real world and the simulator!
Just looking at why the values in log9 are different to the others. It's not enough to cause a real problem but would be nice to understand it so I'm going to modify the program so that the error is only calculated over a selected window. That should make it possible to see which part of the plot is responsible (guessing the fairly heavy regen but would like to be sure).
Edit - log9 included a drive up a gradient on the way from the flat test site, where all the other logs were done, back home so that it very likely to explain the discrepancy
