## Wednesday, August 9, 2017

### MTPA, MTPF, and Speed Range, Part 1

I had mentioned in a previous post that IPM's are almost always running in the field weakened regime. That is to say, $$I_d$$ and $$I_q$$ are injected not to maximize torque per amp, but to achieve a certain torque setpoint without exceeding the maximum available stator voltage.

Recall that a sinusoidally-varying motor is modeled by:$$\begin{array}{lcl} \tau=\frac{3}{2}n_p(\lambda I_q+(L_d-L_q)I_d I_q)\\ V_d=R_s I_d-\omega L_q I_q\\ V_q=R_s I_q+\omega L_d I_d+\omega\lambda\\ V_s=\sqrt{V_d^2+V_q^2}\\ I_s=\sqrt{I_d^2+I_q^2} \end{array}$$ Suppose we have unlimited back EMF, and we wish to optimize torque per amp. There are two ways to look at this. Firstly, we could $$\mbox{minimize } \begin{cases} I_d^2+I_q^2\mbox{ subject to}\\ \lambda I_q+(L_d-L_q)I_d I_q=\tau_0 \end{cases}$$ Or, we could $$\mbox{maximize } \begin{cases} \lambda I_q+(L_d-L_q)I_d I_q\mbox{ subject to}\\ I_d^2+I_q^2=I_0^2 \end{cases}$$ As it turns out, the second current-first approach results in much easier math (we only need to solve a quadratic, not a quartic) at the expense of being somewhat less intuitive (it is unclear what current corresponds to what torque).

There are several ways to solve the second problem; we use Lagrange multipliers here. The Lagrangian is $$L(I_d,I_q,u)=\lambda I_q+(L_d-L_q)I_d I_q-u(I_d^2+I_q^2-I_0^2)$$ where $$u$$, not $$\lambda$$, is the multiplier.
The system of partial derivatives is $$\begin{cases} \frac{\partial L}{\partial I_d}=(L_d-L_q)I_q-2I_d u=0\\ \frac{\partial L}{\partial I_q}=(L_d-L_q)I_d-2I_q u+\lambda=0\\ \frac{\partial L}{\partial u}=I_0^2-I_d^2-I_q^2=0 \end{cases}$$ This system is easily solved by a computer algebra system or by multiplying the first equation by $$I_q$$ and the second by $$I_d$$, giving $$\begin{array}{lcl} I_d=\frac{-\lambda+\sqrt{\lambda^2+8(L_d-L_q)^2I_0^2}}{4(L_d-L_q)}\\ I_q=\sqrt{I_0^2-I_d^2} \end{array}$$ where we have picked the signs knowing that $$I_d$$ is negative and $$I_q$$ is positive.

Armed with this information we can make some plots. Plugging in the HSG data $$L_d=0.0006$$, $$L_q=0.0015$$. and $$\lambda=0.053$$ (units: Henries, Volt-seconds), we have the following plot:

As expected, $$I_d$$ is about the same magnitude as $$I_q$$ at high currents.

Perhaps more interestingly, we can get a sense of how quickly the back EMF grows in an IPM. Using the MTPA setpoints computed above, we can plot back EMF vs stator current and speed:

 Worth noting: the hump in the blue region is caused by d-axis current on the MTPA trajectory canceling rotor flux
Roughly speaking, the blue region corresponds to back EMF's achievable on a 150V bus. It is evident at high currents, most speeds in the operating range are unachievable:

A slice of the graph at 180A shows that we are forced to exit the MTPA regime at about 800 rad/s (about 2500RPM on a 3-pole-pair motor).

Even more telling is a plot of maximum achievable current versus speed:

Speeds much above 1500 rad/s are straight-up unattainable, and between 800 and 1500 rad/s, available current rapidly falls off.

We conclude that at high currents (and therefore high torques), the maximum achievable speed is highly limited (the HSG is rated to 9000 RPM at 150V). In order to achieve high speeds (and therefore high powers) we must move off the MTPA trajectory and onto a "maximum torque per flux" trajectory.

This is also why IPM voltage and current scaling cannot be treated naively! I cannot emphasize this enough - a motor rated to 50Nm and 10000RPM on a given bus voltage cannot physically achieve both at the same time. On the other hand, increasing the bus voltage not only increases the maximum achievable speed, it increases the amount of torque available at lower speeds.

The next post in this series will tackle the problem of computing the MTPF trajectory, which, as we will see, is much harder and cannot be solved analytically.