I made a lookup table to drive this motor. Unfortunately at least some type of lookup table is more or less mandatory.
The current lookup table is not great, but yields acceptable performance with only a bit of voltage saturation. I'm still in the process of making a good lookup table, was working on that last night.
Not sure what of this information you know already, but I'll describe the complete procedure of what I've done so far:
IPM motors need a certain amount of Q and D current to operate properly. These currents depend on the phase resistance (same for D and Q), the phase inductances (different for D and Q, thats what generates reluctance torque), the flux linkage (effectively the Kv) and the battery voltage. Matters are complicated by the fact that the inductances can saturate, leaving you with reduced reluctance torque.
There are a lot of steps to making the lookup table.
The simplest test that was run first was the stall test. We mounted the motor to a friend's dyno and spun it at about 100RPM to get rid of any cogging effects. This test can also be done stationary as in the post on that same friends blog several posts ago, but should be repeated at several positions.
This data was used to generate a lookup table for stall and low speeds.
So, stall table for low speeds, down. Unfortunately the higher speed tests are much, much harder....
That dyno couldn't do the high speeds which we needed, so we tried more analytical methods to make the lookup table. The most basic test is to just put the motor on your bike and ride it around while logging currents and voltages. From the logged data, the inductances can be solved for in MATLAB with just a least-squares regression. The inductances are the real hard thing to get right, as the "d axis inductance" is only kind of measureable, and only sort of exists in real life. The best way to observe the inductances is to use your setup to measure itself, that way any measurement biases are inherently compensated for.
This lookup table generator takes in the resistance, phase inductances, battery voltage, and flux linkage, and spits out these lookup tables. I'm now about 80% sure these lookup tables are wrong unfortunately due to wrong inductances
Last night I was doing some inductance measurement on the Q axis. Unfortunately it looks like the Q axis saturates pretty heavily at high currents. Turn up the volume on this video!!
[youtube]5P22xq3bJh8[/youtube]
The Q axis saturates a lot harder than expected. I am doing this testing because I realized that I should be getting a lot more reluctance torque than I actually am- 20% is quite low. I realized that this might be because the Q axis is saturating, meaning it would have an inductance closer to that of the D axis. This seems to be the case, but more testing is necessary to confirm these findings.