
I set out to take some readings today for stall torque in relation to field and DC amps, and also no load speed in relation to field amps. Hit a few snags, but nothing too critical so far as I can tell.
I started with stall torque tests, as this seemed to have less potential to end in a centrigual yield test... (with fmax set to 21Hz) Unfortunately, with only two car batteries in series for my 'HV' supply, I couldn't really push enough amps through the motor to take any meaningful measurements. Additionally, the regulator I'm using to drive my field doesn't seem to be working great - it'll only adjust between ~0.4 and 3.9amps, increasing the range would be preferable. I've got a replacement on the way though.
So, giving up on that, I moved on to no load rpm tests. fmax set to 1000, which would give me a maximum of 10000rpm (redline on the car engine it came from gives ~18000 alternator rpm), using ~26V DC bus. fwkp is set to 0 to eliminate field weakening (this would increase rpm above the base speed, which is undesirable for this test, and in fact undesirable at all times for the alternator - field weakening is better performed by reducing field current to directly reduce field strength!) and I've also adjusted the MTPA function such that Id always equals 0 (this is not an IPMSM). The alternator still includes its fan, so not really 'no load' at higher rpms, but best I can do for now. (Better would be driving the alternator as, well, a generator, and measuring emf, but I don't have the kit).
Reading the reported rpm from the inverter interface at max throttle and varying field currents (high currents first to limit rpm...) gave me a strange relationship between field amps and 'no load' rpm. I could calculate Kv (rpm per volt, I've used rpm reported by the inverter, and DC bus voltage - apparently I should be using peak voltages from the motor phases, but I'm assuming this will be close to DC bus voltage at full throttle) and from that, Kt (Nm per amp).
Given I'm only reading field amps to 0.1A (and this varies significantly when the rotor is spinning!), and eyeballing rpm from the 'plot', I can ignore much of the lumpiness

You can see I've added columns for 'volts for 18000rpm' and 'Amps for 35Nm'. As 18000rpm is my max allowable rpm (still need to increase the maximum allowed for fmax... guaranteed I'll forget that until riding the bike for the first time and wondering why I can't exceed 40mph...) this gives me a good idea of my required pack voltage, and 35Nm is roughly the motor torque required to match the stock engine and transmission. I must admit, I don't know if this is motor or DC amps, or if a reasonable pack voltage will be able to push enough current. I can't think of a good way to calculate either. On the plus side, I can increase the pack voltage if necessary, then adjust the Kv/Kt/field current to suit

I'll re-run these tests once I've received the new regulator for field current, and hopefully see how far I can increase field current while still increasing Kt and avoiding melting anything! I should probably also test with difference DC voltages (1 car battery instead of two...) to make sure I still get the same Kv and Kt numbers. A lower 'HV' would probably also make testing at lower field currents less scary/reduce rpm...
I don't think my sin/cos encoder is quite perfect yet. It's connected to the main board using shielded twisted pair Cat6a cable (shielding is both foil shields on each twisted pair, plus a braid shield around the lot) with the shield connected to ground at the board end. With polepairs=1 I get ~1degree of 'noise', but obviously setting polepairs=6 to match the windings increases the amplitude proportionally. I suspect this is one of those 'get it as good as possible' things? On the plus side, it doesn't seem to be affected by field current (the pulley does attract tools quite strongle as field current increases!). I think I've got it mounted slightly misaligned too - I have some vibration (not the rotor being out of balance, although I'm sure its not perfect!) especially at low speeds, and it can rather appropriately sound like a car engine struggling to turn over
