• 3 months ago

## November 2, 2017

### Stall Torque Test Stand

To better characterize the big kart motor, I threw together a stall torque test stand.  This was actually several months ago, but I'm just now getting around to documenting things.

The stall-tester consists of a precision-length stick attached to the motor shaft, and a 50 kg load cell on the end of the stick.  I added ball joints on each end of the load cell, to ensure that it is in pure tension or compression.

To visualize and log the data, I made a pared-down version of my dyno control gui:

The basic goal of testing was to brute-force determine the motor torque vs D and Q current.  Ideally, torque should be easy to calculate from the D and Q axis inductances and permanent magnet flux linkage, by the classic torque equation $$\tau =\frac{3}{2}\cdot p \cdot i_{q}(\lambda_{pm}+(L_{d} - L_{q})i_{d})$$.  But we're driving the motor hard enough that it saturates fairly substantially. This changes both the inductances and flux linkage, and makes analytically solving for torque (and modeling the motor in general, without FEA) challenging.  Using our various motor-models, we've gotten decent results, but a bit of low-end torque has been eluding us.

To take the measurements, we swept current phase angle from pi/2 to pi, and current magnitude from 0 to 180A.  At each phase setpoint, current was ramped up from zero to 180 over about 2 seconds.  Torque was logged from the load cell, and D and Q axis currents were logged over serial from the motor controller.

The time-series data looked like this:

After a little processing (3-sample median filter to throw out some single-sample glitches from the strain gauge amplifier, and torque-constant sanity check to throw away points between each ramp), the 3-D scatter plot of the points looked like this:

A problem I seem to run into all the time is trying to fit a smooth surface to time-series data.  In the past I've usually used MATLAB's griddata to do it like this, but this approach has a number of annoying problems, like that it can't extrapolate, and the surface generally ends up kind of "lumpy".  Fortunately, I finally found an excellent script, gridfit, which worked beautifully for this problem.

Finding the phase that produces the most torque for each current magnitude, you get the following trajectory.  As you'd expect, at low currents most of the current is on the Q-axis (phase equal to pi/2), and it shifts onto the D axis as current increases.

Superimposed on top of the surface of all the data, the trajectory looks like this.  It's pretty coarse looking at low currents, but that part isn't too important anyway.

This is the maximum torque per amp (MTPA) trajectory, which is what the motor should operate along until it reaches base speed and you no longer have enough voltage to operate along the trajectory.

Excitingly, the motor seems like it still has plenty of torque capability left, even at 180 amps.  Torque constant is dropping off somewhat, but it looks like breaking 60 N-m should be no problem.  On one motor we should be able to hit just over a G of acceleration, and with 2 motors, easily break traction on command.

What are you using create graphs in the Dyno control panel program?

1. Hi,

The program is written in Python, and I've been using QT and the pyqtgraph library to do the real-time plotting.

http://www.pyqtgraph.org/

2. nice project,
can i know how the torque arm attached to the motor shaft and the reading take?

3. How many poles is that motor? I have read 6 and 8... but don't know for sure. I have 3 and am going to hook to a Kelly controller. I have 42S1P of 25ah cells. I can only get it to go to 5400 RPM so far.

1. It's 3 pole-pairs. You probably won't be able to get good performance out of it with a kelly controller - it really wants a lookup table of ideal D/Q current vs torque and speed - See Bayley's posts on the subject:
http://isopack.blogspot.com/p/electric-shifter-kart.html

That speed actually is about right for Q-current only control, which is probably what the FOC kelly controllers do.

2. Ben, Thanks for the reply, and u are 100% correct on all fronts. the kelly is a POS.The kelly really heated up the motor FAST. The new controller puts zero heat into the motor, SO EFFICIENT!!! I have a new controller now, a Lebowski brain in an IMA inverter, so far I have spun to 11.5KRPM at 160V, going to 200V :) Trying to build a dyno like yours. Did you all ever break any gates belts? I called up gates and they said I needed a 21mm wide belt for 60nm.

3. No, haven't had any belt issues. The gates ratings are pretty conservative, since they're generally meant for industrial machinery that runs 24/7. For peaky applications like vehicles you can push them pretty hard.

4. Hi Ben, nice work with the test stand. I do have a question though : in your setup, you sent 0-180A in 2s at different current phases. However, why did you chose to stop at 180A?