## Friday, September 8, 2017

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

Previously on Motor Diddlers, we learned that interior PM motors spend most of their time under field weakening; namely, the maximum attainable torque is limited by inductance and available voltage, not necessarily by maximum allowable current. This post will cover the basic case of computing the MPTF trajectory in the absence of saturation and higher-order back EMF components.

Starting from the motor equations $$\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}$$ we note that in the voltage limited operating regime, maximum torque must be achieved when the voltage vector is on the boundary of the allowable area, in which case the optimization problem becomes an equality: $$\begin{cases} \frac{3}{2}n_p(\lambda I_q+(L_d-L_q)I_d I_q) = \tau_0\\ (R_s I_d-\omega L_q I_q)^2 + (R_s I_q+\omega L_d I_d+\omega\lambda)^2 = V_0^2 \end{cases}$$ If we ignore saturation, this system is the intersection of a constant-torque hyperbola (which is independent of speed) and a series of shrinking ellipses.

This system is polynomial (and in fact only a quartic) and can be solved in many ways. For example, one element of the reduced Groebner basis of the ideal generated by the two equations is the very long $$(L_d-L_q)^2(R_s^2+L_q^2w^2)I_q^4 + (L_q^2\lambda^2\omega^2+R_s^2\lambda^2+(L_d-L_q)^2(2R_s\tau_0\omega-V_0^2))I_q^2- 2\lambda\tau_0(R_s^2+L_d L_q\omega^2)+ R_s^2\tau_0^2+L_d^2\tau_0^2\omega^2$$ where we have included the factor of $$3/2n_p$$ in $$\tau_0$$ for brevity's sake. The roots of this polynomial are easily found with a variety of numeric or analytic methods; in the case of multiple real solutions the correct one is the $$(I_d,I_q)$$ vector with the shortest length.
Unfortunately, the system is no longer polynomial if the motor saturates (that is, $$L_d$$ and $$L_q$$ are functions $$l_d(I_d,I_q)$$, $$l_q(I_d,I_q)$$ of the axis currents). In order to solve the system in this case, we will have to turn to more complicated (and less reliable) numeric methods, the nature of which will be the subject of the next post in this series.

## Sunday, September 3, 2017

### Focusing on the Ground

Suppose we have a view camera and we wish to focus on a horizontal plane. More precisely, let the center of the lens $$O$$ be $$a$$ above the ground, and suppose the rear standard makes an angle $$\theta$$ with respect to the horizontal. We wish to find the angle $$\alpha$$ that the front standard must be tilted at to focus on the ground.

By the Scheimpflug rule. the rear standard, front standard, and horizontal intersect at a point $$S$$. By the hinge rule, the front focal plane, the horizontal, and the plane through $$O$$ parallel to the rear standard are concurrent; this is true if and only if the intersection point $$H$$ of the horizontal and the plane parallel to the rear standard lies at a distance $$f$$ from the front standard, where $$f$$ is the focal length of the lens.

We have:
\begin{array}{lcl}
O'S = a / \tan{\alpha}\\
O'H = a / \tan{\theta}\\
SH = O'S - O'H = a(1/\tan{\alpha} - 1/\tan{\theta}) = a \left( \frac{\cos{\alpha}}{\sin{\alpha}} - \frac{\cos{\theta}}{\sin{\theta}} \right)
\end{array}
This means:
\begin{array}{lcl}
f = SH\sin{\alpha} = a\sin{\alpha} \left( \frac{\cos{\alpha}}{\sin{\alpha}} - \frac{\cos{\theta}}{\sin{\theta}} \right)\\
\frac{f}{a} = \cos{\alpha}-\frac{\cos{\theta}}{\sin{\theta}}\sin{\alpha}\\
\frac{f}{a}\sin{\theta} = \cos{\alpha}\sin{\theta} - \sin{\alpha}\cos{\theta} = \sin{(\theta-\alpha)}\\
\theta-\alpha = \arcsin{(\frac{f}{a}\sin{\theta})}\\
\alpha = \theta-\arcsin{(\frac{f}{a}\sin{\theta})}
\end{array}
In other words, the angle between the front and rear standards is $$\arcsin{(\frac{f}{a}\sin{\theta})}$$. This is pretty neat; in particular, for small magifications we can say the ratio of  of the sines of the angles is approximately equal to the magnification of the camera.