Text this: Maximum Torque per Ampere Control of PMSMs Using Real-Time Numerical Optimization