Control of Electric Motors and Drives via Convex Optimization Nicholas Moehle Advisor: Stephen Boyd February 5, 2018
Outline 1. waveform design for electric motors permanent magnet induction 2. control of switched-mode converters 2
Waveform design for electric motors Á traditionally: AC motors driven by sinusoidal inputs (and designed for this) 1 based on reference frame theory, c. 1930 Á now: more computational power power electronics can generate near-arbitrary drive waveforms 2 Á our questions: given a motor, how to design waveforms to drive it? which waveform design problems are tractable? convex? 1 Hendershot, Miller. Design of Brushless Permanent-Magnet Machines. 1994. 2 Wildi. Electrical Machines, Drives and Power Systems. 2006. 3
Motor model Ú ½ ½ Ò. ½ Ú Ò Ò Á Ò windings, each with an ÊÄ circuit. Á electrical variables: voltage Ú Øµ ¾ R Ò current ص ¾ R Ò flux ص ¾ R Ò 4
Motor model Ú ½ ½ Ò. ½ Ú Ò Ò Á the rotor has torque ص speed ÓÒ Ø (high inertia mech. load) position ص Ø Á goal is to manipulate Ú to control 4
Stored energy Á stored magnetic energy is µ magnetic coupling depends on mechanical position Á is ¾ -periodic in Á inductance equation relates current and flux: Ö µ Á torque given by µ Á in general, both are nonlinear in 5
Torque Á the average torque is: ½ Ì Ð Ñ Øµ Ø Ì ½ Ì ¼ Á torque ripple is ½ Ì Ö Ð Ñ Ì ½ Ì ¼ ص ¾ Ø 6
Power loss Ê ½½. Ê ÒÒ Á Ê ¾ S Ò is the (diagonal) resistance matrix Á resistive power loss is Ì Ê Á average power loss is ½ Ì Ô ÐÓ Ð Ñ Ì Ê Ø Ì ½ Ì ¼ 7
Circuit dynamics Ú ½ Ú Ò ½ Ò. ½ Ò Á dynamics from Kirchoff s voltage law, Faraday s law: Ú Øµ Ê Øµ ص Á dynamics coupled across windings by inductance equation Ö µ. 8
Winding connection Ù ½ Ù Ñ. Ú ½ Ú Ò. Á often, winding voltages Ú not controlled directly Á (e.g., wye/delta windings, windings contained in rotor) Á indirect control through terminal voltages ٠ص ¾ R Ñ Øµ ¼ Ú Øµ Ì Øµ ٠ص Á ¾ R Ô Ò is the connection topology matrix Á ¾ R Ò Ñ is the voltage input matrix Á ص ¾ R Ô are floating node voltages 9
Winding connection examples Ù ½ Ù ¾ Ù Ú ½ Ú Ú ¾ Ù ½ Ù ¾ Ù Ú ½ Ú ¾ Ú Ù ½ ¼ Ù ¾ Ù Ú ½ Ú ¾ Ú Øµ ¼ Ú Øµ Ì Øµ ٠ص Á simple delta, wye, and independent winding connections Á some windings may be controlled only through induction e.g., windings on the rotor 10
Optimal waveform design Á waveform design problem: minimize Ô ÐÓ Ö subject to torque equation inductance equation circuit dynamics winding pattern Á variables are, Ú, Ù,,, (all functions on R ) Á problem data: tradeoff parameter ¼ resistance matrix Ê ¾ S Ò energy function R Ò R R shaft speed ¾ R desired torque ¾ R winding connection parameters ¾ R Ò Ñ and ¾ R Ô Ò 11
Á nonconvex in general, due to nonlinear torque and inductance equations Á problem data ¾ -periodic, but periodicity of solution not known in practice, solutions often not ¾ -periodic in 12
S Permanent magnet motor Ù ¾ Ù N N Ù ½ S Ù Ù Á magnets in rotor change magnetic flux through windings as they pass, producing voltage across the windings Á by simultaneously pushing current through the windings, electrical energy is extracted (or injected) 13
Permanent magnet motor Á energy function is quadratic: µ Ì µ Ì (quadratic part independent of rotor angle) Á inductance equation is linear: Ä Ñ µ Ä is the inductance matrix, Ñ is the flux due to rotor magnets Á torque equation is affine: µ Ì Ó µ µ is the motor constant, Ó is the cogging torque 14
Permanent magnet motor Á dynamics, with, are Ú Øµ Ê Øµ ص Á eliminating : Ú Øµ Ê Øµ Ä µ Ø Øµ 15
Permanent magnet motor, waveform design Á optimal waveform design problem is convex Á ¾ -periodicity of problem data with convexity implies ¾ -periodicity of a solution, if one exists 3 3 Boyd, Vandenberghe. Convex Optimization, page 189. 2004 16
Permanent magnet motor, waveform design Á waveform design problem: power loss torque ripple Þ Ð ß Þ ½ ¾ Ð ß minimize µ Ì ½ ¾ Ê µ µ µ ¾ ¾ ¼ ¾ ¼ ½ Ì subject to µ (av. torque) ¾ ¼ µ Ì Ó µ (torque) Ú µ Ê µ Ä ¼ µ µ (dynamics) µ ¼ (winding conn.) Ú µ Ì µ Ù µ Á variables are, Ú, Ù,, (all functions on ¼ ¾ ) 17
Permanent magnet motor, waveform design Á a periodic linear-quadratic control problem can discretize, solve by least squares Á in fact, many extensions retain convexity: voltage limits Ù µ Ù Ñ Ü current limits µ Ñ Ü nonquadratic definitions of torque ripple Á extensions typically involve solving a quadratic program Á more discussion in paper 4 : extensions/variations custom fast solver online waveform generation 4 Moehle, Boyd. Optimal Current Waveforms for Brushless Permanent Magnet Motors. 2015. 18
Æѵ Æѵ Ù½ ε Ù½ ε ½ µ ½ µ Example Á ¾ Ï ÆÑ ¾ Á left: ¼¼ rad/s, right: ¼¼ rad/s 5 5 0 0 5 0 100 200 300 50 0 50 0 100 200 300 0.35 0.3 0.25 0 100 200 300 Ƶ 5 0 100 200 300 50 0 50 0 100 200 300 0.35 0.3 0.25 0 100 200 300 Ƶ 19
Induction motor Ù ¾ Ù Ù ½ Ù Ù Á rotor magnets replaced by more windings, which act as electromagnets (with current) Á rotor current produced my magnetic induction (using stator currents) 20
Induction motor Á Energy function is again quadratic: µ Ì µ quadratic part dependent on (affine part omitted for simplicity) Á inductance equation is linear: Á torque is (indefinite) quadratic: Ä µ Ì Ä ¼ µ 21
Induction motor, maximum torque problem Á general waveform design problem intractable Á we focus on the maximum torque problem ( ¼): torque ripple penalty disappears maximize average torque (a nonconvex quadratic function) power loss constraint (a convex quadratic function) 22
Induction motor, maximum torque problem Á waveform design problem: average torque Þ Ð ß ½ Ì maximize Ð Ñ Øµ Ì Ä ¼ ص ص Ø Ì ½ Ì ¼ ½ Ì subject to Ð Ñ Øµ Ì Ê Øµ Ø Ô ÐÓ Ì ½ Ì ¼ Ú Øµ Ê Øµ ص ص ¼ Ú Øµ Ì Øµ ٠ص ص Ä Øµ ص (power loss) (dynamics) (winding conn.) (induction) Á variables are, Ú, Ù,, (all functions on R ) Á equivalent to minimizing Ô ÐÓ with average torque constraint 23
Induction motor, maximum torque problem Á can be converted to a nonconvex linear-quadratic control problem with a quadratic constraint strong duality holds original proof due to Yakubovich 5 Á further details in our paper 6 equivalent semidefinite program (SDP) method for constructing optimal waveforms from SDP solution proof of tightness 5 Yakubovich. Nonconvex optimization problem: The infinite-horizon linearquadratic control problem with quadratic constraints. 1992. 6 Moehle, Boyd. Maximum Torque-per-Current Control of Induction Motors via Semidefinite Programming. 2016. 24
Example traditional, sinusoidally wound, 5-phase motor with wye winding: Ù ¾ Ù Ù ½ Ù Ù desired torque ÆÑ, speed ¼ Ö 25
Example 100 (Æ Ñ) Ù (Î) 50 0 50 100 0 2 4 6 8 10 12 14 16 18 4 ( ) 2 0 2 4 0 2 4 6 8 10 12 14 16 18 8 6 4 2 0 0 2 4 6 8 10 12 14 16 18 (Ö ) power loss is ½½ W per Nm torque produced 26
Stator fault Same motor, with open-phase fault: Ù ¾ Ù ½ Ù Ù 27
Stator fault 100 (Æ Ñ) ( ) Ù (Î) 50 0 50 100 0 2 4 6 8 10 12 14 16 18 5 0 5 0 2 4 6 8 10 12 14 16 18 8 6 4 2 0 0 2 4 6 8 10 12 14 16 18 (Ö ) power loss is ½ W per Nm torque produced 28
Outline 1. waveform design for electric motors permanent magnet induction 2. control of switched-mode converters 29
Controlling switched-mode converters load source Á input are switch configurations Á traditionally: 7 1. make discrete input continuous, by considering averaged switch on-time ( duty cycle ) 2. choose a duty cycle corresponding to desired equilibrium 3. linearize the resulting system around equilibrium, use linear control Á now: direct (switch-level) control 7 Kassakian. Principles of power electronics. 1991. 30
Switched-linear circuit load source Á state Ü Ø ¾ R Ò contains inductor currents, capacitor voltages can be augmented to contain, e.g., reference signal Á for each switch configuration, we have a linear circuit Á switched-affine dynamics: Ü Ø ½ ÙØ Ü Ø ÙØ Ø ¼ ½ Á dynamics specified by, in mode Á control input is the mode Ù Ø ¾ ½ Ã Á may include mode restrictions (e.g., for a diode) 31
Switched-affine control Á switched-affine control problem is Á constraints hold for all Ø Á variables are Ù Ø and Ü Ø ¾ R Ò È Ì minimize Ø ½ Ü Øµ subject to Ü Ø ½ ÙØ Ü Ø ÙØ Ü ¼ Ü Ò Ø Ù Ø ¾ ½ à Á problem data are dynamics,, function, and initial condition Ü Ò Ø Á can be solved by trying out Ã Ì trajectories 32
Solution via dynamic programming Á Bellman recursion: find functions Î Ø such that Î Ø Üµ for all Ü, for Ø Ì Ñ Ò Üµ Î Ø ½ Ù Ü Ù µ Ù¾ ½ à ½ ¼ Á final value function Î Ì Á optimal problem value is Î ¼ Ü Ò Ø µ at initial state Ü Ò Ø Á in general, intractable to compute (or store) Î Ø 33
Model predictive control Á idea: solve switched-affine control problem, implement first control action Ù ¼, measure new system state, and repeat Á called model predictive control (MPC) or receding horizon control Á given Î Î ½, MPC policy satisfies ÑÔ Üµ ¾ (ties broken arbitrarily) Ö Ñ Ò Î Ù Ü Ù µ Ù¾ ½ à 34
Approximate dynamic programming policy Á in practice, MPC policy only works for Ì small Á (system response time measured in s) Á instead, approximate Î as a quadratic function Î Á given Î, ADP policy satisfies Ô Üµ ¾ Ö Ñ Ò Î Ù Ü Ù µ Ù¾ ½ à Á evaluating Ô requires evaluating a few quadratic functions 35
How to obtain Î? Á quadratic lower bounds on Î can be found via semidefinite programming 8 Á compute Î Ü µ µ for many states Ü µ, fit best quadratic function Î we used this method subproblems solved using methods described in paper 9 Á use exact value function for approximate linear control problem (e.g., linear-quadratic control) provides a link to traditional methods 8 Wang, O Donoghue, Boyd. Approximate Dynamic Programming via Iterated Bellman Inequalities. 2014. 9 Moehle, Boyd. A Perspective-Based Convex Relaxation for Switched-Affine Optimal Control. 2015. 36
Inverter example Ä ½ Ä ¾ Ä ½ Ä ¾ Î Ä ½ Ä ¾ Á state Ü Ø are inductor currents and capacitor voltages, and desired output current phasors Á cost function is deviation of output currents from desired (sinusoidally-varying) values Á model parameters Î ¼¼ V, Ä ½ H, Ä ¾ ½ H, ½ F, Î ÐÓ ¼¼ V, and desired output current amplitude Á ½¼ A. Á sampling time ¼ s 37
Result Policy State cost ADP policy, 0.70 MPC policy, Ì ½ ½ MPC policy, Ì ¾ ½ MPC policy, Ì ½ MPC policy, Ì ½ MPC policy, Ì 0.45 Á for Ì MPC policy is unstable Á running MPC with Ì takes several seconds on PC Á ADP takes few hundred flops (can be carried out in s) 38
Result In steady state: Input curr. ( ) 20 10 0 10 20 0 0.005 0.01 0.015 0.02 0.025 0.03 Cap. voltage (Î) 400 200 0 200 400 0 0.005 0.01 0.015 0.02 0.025 0.03 Output curr. ( ) 20 10 0 10 20 0 0.005 0.01 0.015 0.02 0.025 0.03 time ( ) 39
Conclusions Á unconventional motors (asymmetrical, nonsinusoidally-wound, non-rotary) can be controlled using optimization, by designing the waveform to the motor Á modern techniques can be used to generate optimal controllers for power electronic converters, which have fast response can easily incorporate constraints are intuitive to understand and tune make good use of modern microprocessor capabilities 40
Sources Á motors N. Moehle, S. Boyd. Optimal Current Waveforms for Brushless Permanent Magnet Motors. International Journal of Control, 2015. N. Moehle, S. Boyd. Maximum Torque-per-Current Control of Induction Motors via Semidefinite Programming. Conf. on Decision and Control, 2016. N. Moehle, S. Boyd. Optimal Current Waveforms for Switched-Reluctance Motors. Multi-Conf. on Systems and Control, 2016. Á converters N. Moehle, S. Boyd. A Perspective-Based Convex Relaxation for Switched-Affine Optimal Control. Systems and Control Letters, 2015. N. Moehle, S. Boyd. Value Function Approximation for Direct Control of Switched Power Converters. Conf. on Industrial Electronics and Applications, 2017. 41
Control of Electric Motors and Drives via Convex Optimization 42