Here's a quick demonstration of the dyno with one motor running in torque mode, and the other running in speed mode. I'm getting some really great data, too. The big question I had was about finding the motor's saliency, and how to automate that later. The motor's "current" can be represented as:
<Id,Iq>, where the 2 currents are at 90 electrical degrees to each other, and the current command is
currentCommand = sqrt(Id*Id + Iq*Iq).
The trick is to figure out how the current command should be divvy'd up between Id and Iq. Think of it as a right triangle. The hypotenuse is the current command, and Id & Iq are the 2 other sides of the triangle. CurrentCommand can be mostly Id, or mostly Iq, or somewhere in between. I have been varying Id from 0 up to currentCommand, and looking at how big currentCommand is in order to maintain the constant speed. The <Id,Iq> combo you want is the one that results in the smallest possible currentCommand, which means you are getting the biggest torque per amp of motor current. The ratio of Id to the currentCommand changes as the current command increases.