Abstract:
The present disclosure relates to a motor control circuit and related method that includes a transform component configured to receive current values associated with a motor being driven by the motor control circuit, and output polar coordinate values representing a magnitude component and a direction component of a current space vector. The motor control circuit further includes a control component configured to receive the magnitude component and the direction component of the current space vector, and generate motor control signals for driving the motor.

Description:
BACKGROUND 
     Permanent magnet synchronous motor (PMSM) has a growing adoption in consumer and industrial motor applications due to its high reliability and small size compared to other motors. To achieve high efficiency and low vibration and acoustic noise, field oriented control (FOC) is increasingly being used in PMSM control for fans, pumps, compressors, geared motors, etc. To further increase energy efficiency at a lowest cost, more and more new functions (e.g., digital power conversion, digital power factor correction (PFC), multiple PMSM control in air-con) need to be handled by one single microcontroller. But existing FOC control strategies are complicated and processor-intensive, thereby impeding additional microcontroller power from being allocated to those complex new system functions. 
     For PMSM with highly dynamic loading (e.g., motors for electric propulsion, compressors), a fast and accurate control loop is needed to control motor currents and voltages to consistently maintain maximum efficiency. But existing FOC has complex transformations in the critical control loop, making it inaccurate and relative slow. 
     New microcontrollers include more and more features and peripherals (e.g., human machine interface (HMI), communications) in order to excel in the intensely fierce competition. However, existing FOC control strategies tend to overburden the microcontrollers, hindering the full use of their potential and features in complex applications with FOC motor controls. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1A  is a schematic diagram illustrating a conventional sensored FOC control strategy. 
         FIG. 1B  is a schematic diagram illustrating a conventional sensorless FOC control strategy. 
         FIG. 2A  is a schematic diagram illustrating a sensored stator flux magnitude and direction control strategy for PMSM in accordance with one embodiment of the disclosure. 
         FIG. 2B  is a schematic diagram illustrating a sensorless stator flux magnitude and direction control strategy for PMSM in accordance with another embodiment of the disclosure. 
         FIGS. 3A-3D  are schematic diagrams illustrating a portion of the circuits of  FIGS. 2A and 2B  according to alternative embodiments of the disclosure. 
         FIG. 4  is a diagram illustrating a coordinate system for a 3-phase 2-pole PMSM motor in accordance with one embodiment of the disclosure. 
         FIG. 5  is a diagram illustrating a coordinate system wherein vector addition of current gives a current space vector having Cartesian coordinates in accordance with one embodiment of the disclosure. 
         FIG. 6  is a diagram illustrating a coordinate system in which a rotating stator flux space vector that represents the rotating stator magnetic flux is illustrated in accordance with one embodiment of the disclosure. 
         FIG. 7  is a schematic diagram illustrating a PI controller for controlling a rotor speed, stator magnetic flux magnitude and direction in accordance with one embodiment of the disclosure. 
         FIG. 8  is a schematic diagram illustrating a 3-phase 2-level inverter circuit for driving a motor in accordance with one embodiment of the disclosure. 
         FIG. 9  is a space vector diagram illustrating the possible switching voltage vectors, both active and passive vectors, in accordance with one embodiment of the disclosure. 
         FIG. 10A  is a schematic diagram illustrating an equivalent circuit of the electric subsystem of a PMSM in accordance with one embodiment of the disclosure. 
         FIG. 10B  is a diagram illustrating a coordinate system with the terms of a motor equation illustrated thereon in accordance with one embodiment of the disclosure. 
         FIG. 11  is a schematic diagram illustrating a sensored stator flux magnitude and direction control strategy for PMSM employed a direct uvw to polar transform in accordance with another embodiment of the disclosure. 
         FIG. 12  is a schematic diagram illustrating a sensored stator flux magnitude and direction control strategy for PMSM employed a pseudo uvw to polar transform in accordance with another embodiment of the disclosure. 
     
    
    
     DETAILED DESCRIPTION 
     The description herein is made with reference to the drawings, wherein like reference numerals are generally utilized to refer to like elements throughout, and wherein the various structures are not necessarily drawn to scale. In the following description, for purposes of explanation, numerous specific details are set forth in order to facilitate understanding. It may be evident, however, to one skilled in the art, that one or more aspects described herein may be practiced with a lesser degree of these specific details. In other instances, known structures and devices are shown in block diagram form to facilitate understanding. 
     To address some of the above mentioned shortcomings, the present disclosure proposes new sensored and sensorless stator flux magnitude and direction control strategies for PMSM. Without a computation-intensive Park Transform and Inverse Park Transform which were heretofore indispensable in the existing FOC, the new control strategies have a simplified structure, a faster control loop, and a decreased CPU time utilization. In complex applications with PMSM motor control, the new strategies will boost the performance of the microcontrollers and the whole system. 
     The existing FOC transforms three phase signals into two rotor-fix signals and vice-versa, with complex Cartesian reference frame transformations (e.g., employing a Park Transform and an Inverse Park Transform) in the control loop, which is supposed to be fast. These reference frame transformations are computation-intensive and are inclined to introduce extra calculation errors, resulting in a slow current control loop and a poor response to dynamic motor loads, and making it difficult to handle more composite system functions (e.g., digital PFC, multiple FOC motor controls, digital power conversion) with only one single microcontroller. 
       FIGS. 1A and 1B  are two examples of existing FOC control strategies that can be used as benchmarks for proposed stator flux magnitude and direction control strategies. A detailed description of the existing FOC is provided below. 
     Normally, existing FOC for PMSMs uses a Clarke Transform to transform 3-phase currents I u , I v , and/or I w    11  measured by an analog to digital converter (ADC)  14  (ADC conversion can be triggered by a pulse width modulation (PWM) unit  16 ) to a stationary α-β reference frame as I α  and I β   18  (which are sinusoidal signals in steady state). Then a Park Transform  20  is used to transform I α  and I β    18  to another rotor d-q coordinate system as I d  and I q    22 , respectively. I d  and I q  are feedback signals of the FOC control loop and are almost constants at steady state. Proportional-integral (PI) controllers  24 ,  26 ,  27  are used for speed and current controls separately, to achieve controllable motor speed, torque and air gap flux. In general, the flux generating component I d  is controlled to 0. It is also possible to control I d  to negative values (i.e., a flux-weakening control) to extend the operating speed range of PMSMs. The speed PI controller  27  has an output  28  that provides the reference current for the torque generating component I q . The current PI controllers  24 ,  26  output desired voltages V d  and V q  the motor phases should generate in d-q reference frame. Here V d  and V q  are almost constants in steady state. An Inverse Park Transform  30  is used to transform resultant voltages V d  and V q  to the stationary α/β reference frame as V α  and V β   32 , which are sinusoidal signals in steady state. The amplitude and angle of voltage vector (V α , V β ) are the reference voltage for the space vector modulator (SVM)  34 , which is used for the control of the PWM unit  16  to create 3-phase waveform outputs from the 3-phase 2-level voltage inverter  12  to drive the motor phases uvw  36 . The Cartesian to Polar Transform  38  can be neglected if the microcontroller is not good at such calculation, instead the voltages V α  and V β  are sent to the SVM modulator  34  directly. The ADC value of the inverter DC link voltage V DC  (normally a voltage divider is needed) is also obtained regularly for SVM calculations. 
     The rotor position is obtained from a rotor position sensor  40  (such as an encoder, a resolver, Hall sensors, etc.) for sensored FOC, or a position estimator for sensorless FOC (see  FIG. 1B ). The rotor position  44  and speed calculations  46 , speed PI control are the slow control loop as the motor mechanical time constant is typically much larger than the electrical time constant. The other computing blocks shown in  FIGS. 1A and 1B  comprise the fast current control loop and should be computed as fast as possible. 
     The stator flux magnitude and direction control strategies of the present disclosure control the stator flux magnitude and direction to achieve PMSM motor control with a high energy efficiency, and use extremely simple reference frame transformations to achieve fast and accurate control to solve the above-mentioned problems. Table 1 provided below compares the mathematical transformations used in existing FOC and the proposed new control strategies of the present disclosure. 
     The new control strategies use polar coordinates instead of Cartesian coordinates to represent motor space vectors, so that the complex Cartesian reference frame transformations (e.g., Park Transform and Inverse Park Transform with sine and cosine functions, which are crucial in existing FOC) can be replaced by simple subtraction and addition of angles while keeping space vector magnitudes unchanged. The subtraction and addition of angles can be computed precisely and instantly (an addition or subtraction operation can be done within only one, or a few system clocks with current microcontrollers). It will be shown below that the addition/subtraction of angles consume almost zero CPU time if using controllers such as, for example, Infineon microcontrollers with CORDIC coprocessors. 
     With simple reference frame transformations, the new PMSM control strategies optimize and speed-up the fast control loop, which will benefit the PMSM motor control with highly dynamic loading (such as a compressor or motor for electric propulsion). It also reduces CPU load and saves precious CPU time for other purposes (e.g., digital PFC, multiple PMSM motor drive, HMI, communications) in sophisticated systems, hence the microcontroller&#39;s potential and features can be fully used. Conversely, with the new stator flux magnitude and direction control strategies of the present disclosure, users could select a microcontroller with less computation power and lower cost to accomplish PMSM motor controls of the same quality as existing FOC. 
     It is worth noting that the transformations solving vector magnitudes and arctangent functions for the new control strategies are well suited for many microcontrollers, for example, Infineon microcontrollers with hardware CORDIC coprocessors to achieve decreased CPU time utilization. The new control strategies fully use the advantages of CORDIC coprocessors and showcase the prominent features of Infineon microcontrollers, for example. 
     
       
         
               
             
               
               
               
             
           
               
                 TABLE 1 
               
             
             
               
                   
               
               
                 Mathematical transformations in existing FOC and proposed new control strategies 
               
             
          
           
               
                 Transformation 
                 For Existing FOC 
                 For Proposed New Control Strategies 
               
               
                   
               
               
                 uvw to α-β Transform 
                 Clarke Transform: I α  = I u  I β  = (I u  + 2I v )/{square root over (3)} (I u  + I v  + I w  = 0) In matrix form: 
         [           I   α               I   β           ]     =       [         1       0             1   /     3             2   /     3             ]     ⁢           [           I   u               I   v           ]         
 
                 Same as existing FOC 
               
               
                   
               
               
                 Stationary coordinate system to rotating coordinate system Transform 
                 Park Transform: I d  = I α cos(φ) + I β sin(φ) I q  = −I α sin(φ) + I β cos(φ) In matrix form: 
         [           I   d               I   q           ]     =       [           cos   ⁢           ⁢     (   φ   )             sin   ⁢           ⁢     (   φ   )                   -   sin     ⁢           ⁢     (   φ   )             cos   ⁢           ⁢     (   φ   )             ]     ⁢           [           I   α               I   β           ]         
 
                 Subtraction of angles: Γ = γ − φ (±2 mπ) 
                         where   ⁢           ⁢   Γ     =       ⁢     arctan   ⁢           ⁢     (       I   q       I   d       )                   γ   =       ⁢     arctan   ⁢           ⁢     (       I   β       I   α       )                                       ⁢     φ   ⁢           ⁢     -     ⁢           ⁢   Rotor   ⁢           ⁢     position   /   angle                           ⁢       m   =   0     ,     ±   1     ,     ±   2     ,     ±   3     ,     or   ⁢           ⁢       …   ⁢             *                         
 Magnitude maintains, i.e.: 
            I        =           I   d   2     +     I   q   2         =         I   α   2     +     I   β   2               
 
               
               
                   
               
               
                 Rotating coordinate system to stationary coordinate system Transform 
                 Inverse Park Transform: V α  = V d cos(φ) − V q sin(φ) V β  = V d sin(φ) + V q cos(φ) In matrix form: 
         [           V   α               V   β           ]     =       [           cos   ⁢           ⁢     (   φ   )               -   sin     ⁢           ⁢     (   φ   )                 sin   ⁢           ⁢     (   φ   )             cos   ⁢           ⁢     (   φ   )             ]     ⁢           [           V   d               V   q           ]         
 
                 Addition of angles: θ = Θ + φ (±2 nπ) 
                       where   ⁢           ⁢   θ     =       ⁢     arctan   ⁢           ⁢     (       V   β       V   α       )                   Θ   =       ⁢     arctan   ⁢           ⁢     (       V   q       V   d       )                                 ⁢     φ   ⁢           ⁢     -     ⁢           ⁢   Rotor   ⁢           ⁢     position   /   angle                           ⁢       n   =   0     ,     ±   1     ,     ±   2     ,     ±   3     ,     or   ⁢           ⁢       …   ⁢             **                         
 Magnitude maintains, i.e.: 
              V   ref          =           V   α   2     +     V   β   2         =         V   d   2     +     V   q   2               
 
               
               
                   
               
               
                 Cartesian to Polar Transform 
                 
                   
                     
                       
                         
                           
                             
                               
                                 
                                    
                                   
                                     V 
                                     ref 
                                   
                                    
                                 
                                 = 
                                 
                                   
                                     
                                       V 
                                       α 
                                       2 
                                     
                                     + 
                                     
                                       V 
                                       β 
                                       2 
                                     
                                   
                                 
                               
                             
                           
                           
                             
                               
                                 θ 
                                 = 
                                 
                                   arctan 
                                   ⁢ 
                                   
                                       
                                   
                                   ⁢ 
                                   
                                     ( 
                                     
                                       
                                         V 
                                         β 
                                       
                                       
                                         V 
                                         α 
                                       
                                     
                                     ) 
                                   
                                 
                               
                             
                           
                         
                           
                       
                     
                   
                 
                 
                   
                     
                       
                         
                           
                             
                               
                                 
                                    
                                   I 
                                    
                                 
                                 = 
                                 
                                   
                                     
                                       I 
                                       α 
                                       2 
                                     
                                     + 
                                     
                                       I 
                                       β 
                                       2 
                                     
                                   
                                 
                               
                             
                           
                           
                             
                               
                                 γ 
                                 = 
                                 
                                   arctan 
                                   ⁢ 
                                   
                                       
                                   
                                   ⁢ 
                                   
                                     ( 
                                     
                                       
                                         I 
                                         β 
                                       
                                       
                                         I 
                                         α 
                                       
                                     
                                     ) 
                                   
                                 
                               
                             
                           
                         
                           
                       
                     
                   
                 
               
               
                   
               
               
                 Polar to Cartesian Transform 
                 Not used 
                 For sensorless new strategies only: V α  = |V ref |cos(θ) V β  = |V ref |sin(θ)  
               
               
                   
               
               
                 Note 
               
               
                 *: Mathematically m can be any integers. Usually select one m so that Γ is near to π/2. 
               
               
                 Note 
               
               
                 **: Mathematically n can be any integers. Usually select only one n (e.g.: n = 0) 
               
             
          
         
       
     
     One aspect of the disclosure involving stator flux magnitude and direction control strategies for PMSM is that in steady state the magnitudes of all the PMSM motor space vectors (i.e., current space vector, stator and rotor magnetic flux space vectors, and voltage space vector) are constants while their directions are stationary in the rotating polar coordinate system which is fixed to the rotor. So it is possible to use proportion-integral-derivative (PID) type controllers to control the stator flux magnitude and direction to achieve constant speed and controlled torque for quiet motor operation, and also control the stator flux to be perpendicular to the rotor flux for maximum energy efficiency. With polar coordinate systems the reference frame transformations for motor control can be done by simple subtraction or addition of angles, so computation-friendly motor control and a fast control loop are achieved. 
     In the disclosure below, the proposed new PMSM control strategies are highlighted with a detailed description of the new control strategies, including coordinate systems, space vectors, PI controller, SVM, rotor position determination, and CORDIC. 
     New sensored and sensorless stator flux magnitude and direction control strategies for PMSM are shown in  FIGS. 2A-2B . A lot of varieties for the proposed stator flux magnitude and direction control strategies exist.  FIGS. 3A-3D  illustrate a few possible variations or embodiments that work for both sensored and sensorless control strategies as depicted in  FIGS. 2A-2B . For simplicity, only the left sides, which are common for both sensored and sensorless new control strategies, are shown in  FIGS. 3A-3D . Table 2 summarizes the computation formulas for the transformations shown in  FIGS. 2A-2B  and  FIGS. 3A-3D . 
     
       
         
               
             
               
               
             
           
               
                 TABLE 2 
               
             
             
               
                   
               
               
                 Computation formulas for proposed control strategies 
               
             
          
           
               
                 Transformation 
                 Equations 
               
               
                   
               
               
                 Clark Transform 
                 I α  = I u  I β  = (I u  + 2I v )/{square root over (3)} (I u  + I v  + I w  = 0) 
               
               
                   
               
               
                 Cartesian to Polar Transform, and Subtraction of Angles 
                 
                   
                     
                       
                         
                           
                             
                               
                                 
                                    
                                   I 
                                    
                                 
                                 = 
                                 
                                   
                                     
                                       I 
                                       α 
                                       2 
                                     
                                     + 
                                     
                                       I 
                                       β 
                                       2 
                                     
                                   
                                 
                               
                             
                           
                           
                             
                               
                                 γ 
                                 = 
                                 
                                   arctan 
                                   ⁢ 
                                   
                                       
                                   
                                   ⁢ 
                                   
                                     ( 
                                     
                                       
                                         I 
                                         β 
                                       
                                       
                                         I 
                                         α 
                                       
                                     
                                     ) 
                                   
                                 
                               
                             
                           
                           
                             
                               
                                 Γ 
                                 = 
                                 
                                   γ 
                                   - 
                                   φ 
                                 
                               
                             
                           
                         
                           
                       
                     
                   
                 
               
               
                   
               
               
                 Addition of Angles 
                 θ = Θ + φ 
               
               
                 Polar to Cartesian Transform (for sensorless new control strategies only) 
                 V α  = |V ref |cos(θ) V β  = |V ref |sin(θ) 
               
               
                   
               
               
                 Pseudo Cartesian to Polar Transform, for FIG. 3 (c) and FIG. 3 (d) 
                 
                   
                     
                       
                         
                           
                             
                               
                                 
                                   
                                      
                                     I 
                                      
                                   
                                   2 
                                 
                                 = 
                                 
                                   
                                     I 
                                     α 
                                     2 
                                   
                                   + 
                                   
                                     I 
                                     β 
                                     2 
                                   
                                 
                               
                             
                           
                           
                             
                               
                                 γ 
                                 = 
                                 
                                   arctan 
                                   ⁢ 
                                   
                                       
                                   
                                   ⁢ 
                                   
                                     ( 
                                     
                                       
                                         I 
                                         β 
                                       
                                       
                                         I 
                                         α 
                                       
                                     
                                     ) 
                                   
                                 
                               
                             
                           
                         
                           
                       
                     
                   
                 
               
               
                   
               
             
          
         
       
     
     In the new control strategies shown in  FIGS. 2A-2B , after ADC conversions  114  and Clarke Transform  115  to get currents I α  and I β   118 , a Cartesian to Polar Transform  119  is used to get the magnitude |I| and direction γ of the current space vector. Instead of using a complex Park Transform  20  (see  FIG. 1A ), subtractions of angles Γ=γ−φ at  121  achieve the transformation from the stationary coordinate system to the rotating coordinate system. To obtain maximum torque and power efficiency, magnitude and direction PI controllers  123  and  125  are used to control the magnitude and direction of the voltage space vector, respectively to make the stator flux space vector perpendicular to the rotor magnetic field (i.e., forces Γ to be π/2 (or −π/2)). It is also possible to control Γ between π and π/2 to decrease the magnetic flux of the motor air gap (i.e., flux-weakening control) to extend the operating speed range of PMSMs. A simple addition of angles θ=⊖+φ at  127  accomplishes the transformation from the rotating coordinate system back to the stationary coordinate system, doing the same job of an Inverse Park Transform  30  of existing FOC (see  FIG. 1A ). The magnitude |V ref | and angle θ of the voltage space vector, together with the inverter DC link voltage information  129 , are sent to SVM  131  to control the inverter  132  output  133  for the motor  134 . 
     The speed PI controller output  135  is the reference for the magnitude PI controller  123 . The rotor position  139  and speed calculations  141  from a position sensor  142 , speed PI control  143  are slow control loop. Note that in sensorless control as shown in  FIG. 2B , a Polar to Cartesian Transform  145  is used in the slow control loop to generate V α  and V β  for a position estimator  147 . The other computing blocks shown in  FIG. 2B  are part of the fast stator flux control loop. 
     One advantageous feature of the proposed new stator flux magnitude and direction control strategies is that they do not have Park Transform and Inverse Park Transforms which were heretofore essential to existing FOC control strategies. The fast control loop becomes much more simple and fast. Note that less calculations and more simple calculations also mean less accumulative calculation errors, especially for low-end microcontrollers 
     To provide the highest performance for both sensored and sensorless new control strategies as shown in  FIGS. 2A-2B , two calculations: 1) the Cartesian to Polar Transform  119  to get the magnitude |I| and the angle γ, and 2) the subtraction  121  of angles Γ=γ−φ, can be computed with one single CORDIC calculation if using an Infineon microcontroller with CORDIC coprocessor. In other words, both calculations consume almost no CPU time. For the new sensorless control strategy as shown in  FIG. 2B , the Polar to Cartesian Transform  145  to get V α  and V β  can be computed simultaneously by the CORDIC coprocessor of an Infineon microcontroller while the CPU is computing for the SVM modulator  131 , or using a look-up table of sine functions from 0 to 90° which can be re-used by the SVM modulator  131  (i.e., to calculate Equations (6) and (7) discussed infra) so the memory usage is maximally optimized, or others. 
     In one embodiment, for both sensored and sensorless new control strategies, they can use (Γ−π/2) as feedback  151  for the direction PI controllers  125 , but control (Γ−π/2) to 0 instead, as shown in  FIG. 3A . 
     On the feedback path  153  to the magnitude PI controllers  123  of sensored and sensorless new control strategies, sine functions may be employed in some applications (i.e., use torque generating component |I|sin(Γ)) as the feedback  153  as shown in  FIG. 3B . In steady state the direction PI controller  125  forces Γ to be close to π/2, hence |I|sin(Γ) is very close to |I| and the original control strategies shown in  FIGS. 2A-2B  can be used directly. In case Γ is far from π/2 in a transient state, the sine function can be calculated using the same look-up table mentioned above. Alternatively, the sine function can be computed concurrently by the CORDIC coprocessor of an Infineon microcontroller when the CPU is computing for the direction PI controller  125  to speed-up the fast control loop calculations. 
     As shown in  FIG. 3C , it is also possible to use |I| 2 =I α   2 +I β   2  instead of |I| as the feedback  155  of the magnitude PI controllers  123  for both new control strategies as shown in  FIGS. 2A-2B  in case the selected microcontroller is not good at computing square root function, which again saves precious CPU time. 
     Depending on different system requirements, the final control strategies can be any combinations of the new control strategies as shown in  FIGS. 2A-2B  and  FIGS. 3A-3D . For example,  FIG. 3D  is actually a combination of the strategies shown in  FIG. 3A  and  FIG. 3C , respectively. 
     The discussion below describes the coordinate systems, space vectors, PI controller, SVM, rotor position determination, and CORDIC used in the new stator flux magnitude and direction control strategies in accordance with one embodiment of the disclosure. 
     The coordinate systems for a 3-phase 2-pole PMSM motor are shown below in Table 3 and  FIG. 4 . Polar coordinate system Od is fixed to the rotor and rotating together, with its polar axis Od in the direction from the rotor permanent magnet south pole (S) to north pole (N). Note the new control strategies do not use rotor d-q Cartesian coordinate system which is all-important in the existing FOC. 
     
       
         
               
             
               
               
               
             
               
               
               
               
             
           
               
                 TABLE 3 
               
             
             
               
                   
               
               
                 Coordinate systems for stator flux magnitude and direction  
               
               
                 control strategies 
               
             
          
           
               
                 Coordinate System 
                 Stationary 
                 Rotating 
               
               
                   
               
             
          
           
               
                 3-phase (electrically 120° separated) 
                 uvw 
                 ✓ 
                   
               
               
                 Cartesian (electrically orthogonal)  
                 α-β 
                 ✓ 
                   
               
               
                 Polar 
                 Ou 
                 ✓ 
                   
               
               
                   
                 Od 
                   
                 ✓ 
               
               
                   
               
             
          
         
       
     
     3-phase 120° separated currents I u , I v  and I w  of motor stator windings will generate three non-rotating but pulsating magnetic fields in u, v and w directions respectively, resulting in a rotating magnetic field (stator flux space vector). Coincidently, vector addition of I u , I v , and I w  gives a current space vector {right arrow over (I)} (its magnitude can be scaled down or up but no change of direction) rotating at speed ω i . In the stationary α-β reference frame, {right arrow over (I)} has Cartesian coordinates I α  and I β , as shown in  FIG. 5 . The rotating stator flux space vector {right arrow over (Ψ)} s  has the same direction of {right arrow over (I)} with their magnitudes proportional to each other, as shown in  FIG. 6 . So the rotating current space vector can represent the rotating stator magnetic flux. To control the rotating stator flux, it is easy to control the magnitude and direction of one single current space vector {right arrow over (I)} instead of three currents I u , I v  and I w . 
     Similarly, vector addition of 3-phase 120° separated stator phase voltages gives a rotating voltage space vector. Also, a rotating rotor permanent magnet generates a rotating rotor magnetic flux space vector. 
     The magnitudes and directions of the above-mentioned rotating space vectors can be represented by the radial coordinates and polar angles in polar coordinate systems, as shown in  FIG. 6 . Their coordinates in different coordinate systems are shown in the following Table 4. 
                                                     TABLE 4                   Coordinates of space vectors for stator flux magnitude and        direction control strategies                Coordinates in Different Coordinate Systems             Space Vector   uvw   α-β   Ou   Od               {right arrow over (I)}   I u , I v , I w     I α , I β     | I|, Υ   | I|, Γ       {right arrow over (V)} ref     V u , V v , V w     V α , V β     | V ref |, θ   |V ref |, Θ       {right arrow over (Ψ)} s     LI u , LI v , LI w     LI α , LI β ,    L| I|, Υ   L| I|, Γ       {right arrow over (Ψ)} r       —     Ψ rα , Ψ rβ     Ψ r , φ   Ψ r , 0                    
where: {right arrow over (I)}—Stator current space vector
 
     {right arrow over (V)} ref —Stator voltage space vector 
     {right arrow over (Ψ)} s —Stator magnetic flux space vector, {right arrow over (Ψ)} s  =L{right arrow over (I)}. Its magnitude and direction are controlled. 
     L—Stator winding inductance per phase 
     {right arrow over (Ψ)} r —Rotor permanent magnet(s) flux space vector. Its magnitude Ψ r  can be derived from voltage constant, speed constant or torque constant in motor specifications 
     φ—Rotor electrical position 
     γ—Angle of current space vector in stationary Ou polar coordinate system 
     Γ—Angle of current space vector in rotating Od polar coordinate system, Γ=γ−φ 
     ⊖—Angle of voltage space vector in rotating Od polar coordinate system 
     θ—Angle of voltage space vector in stationary Ou polar coordinate system, θ=⊖+φ 
     PI controllers are used for the rotor speed, stator magnetic flux magnitude and direction control. A PI controller is a special case of the PID controller in which the derivative of the error is not used. A PI controller  160  is shown in  FIG. 7  according to one embodiment, and its equation is 
     
       
         
           
             
               
                 
                   
                     U 
                     ⁡ 
                     
                       ( 
                       t 
                       ) 
                     
                   
                   = 
                   
                     
                       
                         K 
                         p 
                       
                       ⁢ 
                       
                         e 
                         ⁡ 
                         
                           ( 
                           t 
                           ) 
                         
                       
                     
                     + 
                     
                       
                         
                           K 
                           i 
                         
                         ⁢ 
                         
                           
                             ∫ 
                             0 
                             t 
                           
                           ⁢ 
                           
                             
                               e 
                               ⁡ 
                               
                                 ( 
                                 τ 
                                 ) 
                               
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               ⅆ 
                               τ 
                             
                           
                         
                       
                       
                         ︸ 
                         
                           I 
                           ⁡ 
                           
                             ( 
                             t 
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
           
         
       
         
         
           
             where: e—error signal, it is reference value minus feedback value
           K p —Proportional gain   K i —Integral gain   t—Instantaneous time   τ—Variable of integration; takes on values from time 0 to the present time t.   I(t)—Integral term   U(t)—Controller output   
         
           
         
       
    
     A digital implementation of it in a microcontroller can be
 
 I ( k )= K   i   e ( k )+ I ( k− 1)  (2)
 
 U ( k )= K   p   e ( k )+ I ( k )  (3)
 
Both I and U in Equations (2) and (3) have minimum and maximum limits to avoid the unwanted windup situation (anti-windup).
 
     The connection of a 3-phase 2-level voltage source inverter such as inverter  132  in  FIGS. 2A-2B  and a motor  134  are shown in  FIG. 8 . The six switching devices  162   a - 162   f  of inverter, which could be MOSFET, IGBT or similar parts, are controlled by microcontroller PWM signals (e.g., from the PWM unit in  FIGS. 2A-2B ). The motor windings can be wired in a star (as shown) or a delta. SVM  131  is used to control the PWM to create 3-phase waveforms to the motor windings. 
     To avoid a short-circuit of the DC link voltage, the inverter  132  has only eight possible switching voltage vectors as shown in  FIG. 9 . {right arrow over (V)} 1  to {right arrow over (V)} 6  are active vectors, {right arrow over (V)} 0  and {right arrow over (V)} 7  do not generate any voltage difference in the three motor phases and are passive vectors (or zero vectors). The rotating voltage space vector {right arrow over (V)} ref  is approximated by two adjacent active vectors (e.g., {right arrow over (V)} 1 , {right arrow over (V)} 2  in Sector A) and one or both of the passive vectors (e.g., {right arrow over (V)} 0  only). The plane is dissected in six sectors from A to F and the angle θ of {right arrow over (V)} ref  is transformed into the relative angle θ ref  in each sector. T 1 , T 2  and T 0  correspond with the active vectors and passive vector(s), respectively (e.g., {right arrow over (V)} 1 , {right arrow over (V)} 2 , and {right arrow over (V)} 0  in Sector A). 
     Using the voltage space vector in Sector A as an example, the following shows the calculation. Using volt second balancing: 
     
       
         
           
             
               
                 
                   
                     
                       V 
                       → 
                     
                     ref 
                   
                   = 
                   
                     
                       
                         
                           T 
                           0 
                         
                         
                           T 
                           S 
                         
                       
                       ⁢ 
                       
                         
                           V 
                           → 
                         
                         0 
                       
                     
                     + 
                     
                       
                         
                           T 
                           1 
                         
                         
                           T 
                           S 
                         
                       
                       ⁢ 
                       
                         
                           V 
                           → 
                         
                         1 
                       
                     
                     + 
                     
                       
                         
                           T 
                           2 
                         
                         
                           T 
                           S 
                         
                       
                       ⁢ 
                       
                         
                           V 
                           → 
                         
                         2 
                       
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
             
               
                 
                   
                     T 
                     S 
                   
                   = 
                   
                     
                       T 
                       0 
                     
                     + 
                     
                       T 
                       1 
                     
                     + 
                     
                       T 
                       2 
                     
                   
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
     Solving the equation we have 
     
       
         
           
             
               
                 
                   
                     T 
                     1 
                   
                   = 
                   
                     
                       
                         
                           3 
                         
                         ⁢ 
                         
                            
                           
                             V 
                             ref 
                           
                            
                         
                         ⁢ 
                         
                           T 
                           S 
                         
                       
                       
                         V 
                         
                           D 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           C 
                         
                       
                     
                     ⁢ 
                     
                       sin 
                       ⁡ 
                       
                         ( 
                         
                           
                             π 
                             3 
                           
                           - 
                           
                             θ 
                             rel 
                           
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   6 
                   ) 
                 
               
             
             
               
                 
                   
                     T 
                     2 
                   
                   = 
                   
                     
                       
                         
                           3 
                         
                         ⁢ 
                         
                            
                           
                             V 
                             ref 
                           
                            
                         
                         ⁢ 
                         
                           T 
                           S 
                         
                       
                       
                         V 
                         
                           D 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           C 
                         
                       
                     
                     ⁢ 
                     
                       sin 
                       ⁡ 
                       
                         ( 
                         
                           θ 
                           rel 
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   7 
                   ) 
                 
               
             
             
               
                 
                   
                     T 
                     0 
                   
                   = 
                   
                     
                       T 
                       S 
                     
                     - 
                     
                       T 
                       1 
                     
                     - 
                     
                       T 
                       2 
                     
                   
                 
               
               
                 
                   ( 
                   8 
                   ) 
                 
               
             
           
         
       
         
         
           
             where: T S —Sampling period
           T 0 —Time of zero vector(s) is applied. The zero vector(s) can be {right arrow over (V)} 0 [000], {right arrow over (V)} 7 [111], or both   T 1 —Time of active vector {right arrow over (V)} 1  is applied within one sampling period   T 2 —Time of active vector {right arrow over (V)} 2  is applied within one sampling period   V DC —Inverter DC link voltage   
         
           
         
       
    
     Equations (6) and (7) can be calculated with different methods, e.g., use a look-up table for the sine function from 0 to 60° in microcontroller memory, or may be calculated by the CORDIC coprocessor of an Infineon microcontroller, for example. 
     There are many SVM schemes (e.g., symmetrical or asymmetrical 7-segment schemes, symmetrical or asymmetrical 5-segment scheme, and 3-segment scheme) that result in different quality and computational requirements. A particular SVM scheme can be selected based on microcontroller features and application requirements. 
     In sensored stator flux magnitude and direction control as illustrated in  FIG. 2A , the position sensor  142  (such as an encoder, a resolver, Hall sensors, etc.) provides the information of rotor position. In sensorless stator flux magnitude and direction control, as illustrated in  FIG. 2B , the rotor position can be extracted from rotor magnetic flux (to be elaborated below), BEMF, a position estimator  147  with PLL structure, or others. 
     An equivalent circuit of the electrical subsystem of a PMSM is shown in  FIG. 10A . The motor equation is: 
     
       
         
           
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           V 
                           → 
                         
                         ref 
                       
                       = 
                       
                         
                           R 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           
                             I 
                             → 
                           
                         
                         + 
                         
                           
                             ⅆ 
                             
                               
                                 Ψ 
                                 → 
                               
                               s 
                             
                           
                           
                             ⅆ 
                             t 
                           
                         
                         + 
                         
                           
                             ⅆ 
                             
                               
                                 Ψ 
                                 → 
                               
                               r 
                             
                           
                           
                             ⅆ 
                             t 
                           
                         
                       
                     
                     ⁢ 
                     
                       
 
                     
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     
                       where 
                       ⁢ 
                       
                         : 
                       
                     
                     ⁢ 
                     
                       
 
                     
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     
                       R 
                       - 
                       
                         Stator 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         winding 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         resistance 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         per 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         phase 
                       
                     
                     ⁢ 
                     
                       
 
                     
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     
                       
                         R 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         
                           I 
                           → 
                         
                       
                       - 
                       
                         Voltage 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         drop 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         on 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         the 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         stator 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         winding 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         resistor 
                       
                     
                     ⁢ 
                     
                       
 
                     
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     
                       L 
                       - 
                       
                         Stator 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         winding 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         inductance 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         per 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         phase 
                       
                     
                     ⁢ 
                     
                       
 
                     
                     ⁢ 
                     
                       
                         
                           
                             ⅆ 
                             
                               
                                 Ψ 
                                 → 
                               
                               s 
                             
                           
                           
                             ⅆ 
                             t 
                           
                         
                         - 
                         
                           Electromotive 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           force 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           induced 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           by 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           time 
                         
                         - 
                         
                           varying 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           stator 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           magnetic 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           flux 
                         
                       
                       , 
                       
                         
                           
                             ⅆ 
                             
                               
                                 Ψ 
                                 → 
                               
                               s 
                             
                           
                           
                             ⅆ 
                             t 
                           
                         
                         = 
                         
                           L 
                           ⁢ 
                           
                             
                               ⅆ 
                               
                                 I 
                                 → 
                               
                             
                             
                               ⅆ 
                               t 
                             
                           
                         
                       
                     
                     ⁢ 
                     
                       
 
                     
                     ⁢ 
                     
                       
                         
                           ⅆ 
                           
                             
                               Ψ 
                               → 
                             
                             r 
                           
                         
                         
                           ⅆ 
                           t 
                         
                       
                       - 
                       
                         Electromotive 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         force 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         induced 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         by 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         rotating 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         and 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         hence 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         time 
                       
                       - 
                       
                         varying 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         rotor 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         magnetic 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         flux 
                       
                     
                   
                 
               
               
                 
                   ( 
                   9 
                   ) 
                 
               
             
           
         
       
         
         
           
             All the terms of Equation (9) are depicted in  FIG. 10B . Integrating the equation and rearrange, we get
 
{right arrow over (Ψ)} r =∫ o   t ( {right arrow over (V)}   ref   −R{right arrow over (I)} ) dt−L{right arrow over (I)}   (10)
 
             Project both sides of Equation (10) to stationary α-β axes to get the coordinates of rotor flux space vector
 
Ψ rα =∫ 0   t ( V   α   −RI   α ) dt−LI   α   (11)
 
Ψ rβ =∫ o   t ( V   β   −RI   β ) dt−LI   β   (12)
 
           
         
       
    
     I α  and I β  are real-time measured and calculated current values. V α  and V β  are last control cycle calculation results and presently apply to the motor phases. The integrations shown in Equations (11) and (12) may be simplified by replacing the integrations by low pass filters with a very low cut-off frequency. The rotor position can be calculated by knowing the motor parameters R and L. The flux position estimator is 
     
       
         
           
             
               
                 
                   φ 
                   = 
                   
                     arc 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     
                       tan 
                       ⁡ 
                       
                         ( 
                         
                           
                             Ψ 
                             
                               r 
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               β 
                             
                           
                           
                             Ψ 
                             
                               r 
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               α 
                             
                           
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   13 
                   ) 
                 
               
             
           
         
       
     
     The rotor electrical speed is 
     
       
         
           
             
               
                 
                   ω 
                   = 
                   
                     
                       ⅆ 
                       φ 
                     
                     
                       ⅆ 
                       t 
                     
                   
                 
               
               
                 
                   ( 
                   14 
                   ) 
                 
               
             
           
         
       
     
     The proposed new stator flux magnitude and direction control strategies are well suited for various controllers, and in particular Infineon microcontrollers that have hardware CORDIC coprocessors, e.g., 8-bit microcontrollers XC83x, XC88x and XC87x. The following Table 5 gives examples of CORDIC computations that could be used in the new control strategies. 
     
       
         
               
             
               
               
             
               
               
               
               
             
           
               
                 TABLE 5 
               
             
             
               
                   
               
               
                 Computations with CORDIC coprocessors of Infineon microcontrollers 
               
             
          
           
               
                 CORDIC Coprocessor 
                   
               
             
          
           
               
                   
                 Initial 
                   
                 Computations for New Control 
               
               
                 Operating Modes 
                 Data 
                 Final Result Data 
                 Strategies 
               
               
                   
               
               
                 Vectoring Mode 
                 X Y Z 
                                   X   final     =     K   ⁢           X   2     +     Y   2         /   MPS                     Y   final     =   0                 Z   final     =     Z   +     arctan   ⁢           ⁢     (     Y   X     )                         
 where K ≈ 1.64676 MPS - X and Y magnitude prescaler, e.g.: MPS = 1, 2, or 4, depending on microcontroller register setting 1). To solve the Cartesian to Polar Transform, set X = I α /K, Y = I β /K, and Z = 0. 2). Specially, set Z = −φ to calculate Cartesian to Polar Transform and angle subtraction with one single CORDIC calculation 
                 Cartesian to Polar Transform: 
                    I        =         I   α   2     +     I   β   2                     γ   =     arctan   ⁢           ⁢     (       I   β       I   α       )                       
 Subtraction of Angles: Γ = γ − φ 
               
               
                 Rotation Mode 
                 X Y Z 
                 X final  = K[Xcos(Z) − Ysin(Z)]/MPS Y final  = K[Ycos(Z) + Xsin(Z)]/MPS Z final  = 0 where K ≈ 1.64676 MPS - X and Y magnitude prescaler, e.g.: MPS = 1, 2, or 4, depending on microcontroller register setting 1). In case it is needed to use CORDIC to solve the Polar to Cartesian Transform, set X = |V ref |/K, Y = 0, Z = θ 
                 Polar to Cartesian Transform: V α  = |V ref |cos(θ) V β  = |V ref |sin(θ)  
               
               
                   
               
             
          
         
       
     
     For the sensored stator flux magnitude and direction control strategy shown in  FIG. 2A , it is possible to use a new direct uvw to Polar Transform as shown below: 
     
       
         
           
             
               
                 
                   
                      
                     I 
                      
                   
                   = 
                   
                     
                       K 
                       1 
                     
                     ⁢ 
                     
                       
                         
                           I 
                           u 
                           2 
                         
                         + 
                         
                           I 
                           v 
                           2 
                         
                         + 
                         
                           
                             I 
                             u 
                           
                           ⁢ 
                           
                             I 
                             v 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   15 
                   ) 
                 
               
             
             
               
                 
                   γ 
                   = 
                   
                     arc 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     
                       tan 
                       ( 
                       
                         
                           
                             I 
                             u 
                           
                           + 
                           
                             2 
                             ⁢ 
                             
                               I 
                               v 
                             
                           
                         
                         
                           
                             3 
                           
                           · 
                           
                             I 
                             u 
                           
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   16 
                   ) 
                 
               
             
           
         
       
         
         
           
             where: K 1 —Scaling factor for current space vector magnitude and K 1 =√{square root over (3)}, which can be neglected here (i.e., make K 1 =1). The scaling factor √{square root over (3)} can be combined with other scaling factors of the control strategy (e.g., current sensing and amplification, analog-to-digital conversion, etc). 
           
         
       
    
     A sensored stator flux magnitude and direction control strategy according to another embodiment with a direct uvw to Polar Transform  180  (i.e., without Clarke Transform) is shown in  FIG. 11 . 
     Of course, the various embodiments as shown in  FIGS. 3A-3D  can be combined to the control strategy shown in  FIG. 11 . For example, in case the chosen microcontroller is not good at computing a square root function, it is possible to use |I| 2  instead of |I| as the feedback of the magnitude PI controller  123 . So in such an instance we come out with a new pseudo uvw to Polar Transform  182  as shown below: 
     
       
         
           
             
               
                 
                   
                     
                        
                       I 
                        
                     
                     2 
                   
                   = 
                   
                     
                       I 
                       u 
                       2 
                     
                     + 
                     
                       I 
                       v 
                       2 
                     
                     + 
                     
                       
                         I 
                         u 
                       
                       ⁢ 
                       
                         I 
                         v 
                       
                     
                   
                 
               
               
                 
                   ( 
                   15 
                   ) 
                 
               
             
             
               
                 
                   γ 
                   = 
                   
                     arc 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     
                       tan 
                       ( 
                       
                         
                           
                             I 
                             u 
                           
                           + 
                           
                             2 
                             ⁢ 
                             
                               I 
                               v 
                             
                           
                         
                         
                           
                             3 
                           
                           · 
                           
                             I 
                             u 
                           
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   16 
                   ) 
                 
               
             
           
         
       
     
     A sensored new stator flux magnitude and direction control strategy with a pseudo uvw to Polar Transform  182  (i.e., without Clarke Transform anymore) is shown below in  FIG. 12 . 
     It will be appreciated that equivalent alterations and/or modifications may occur to those skilled in the art based upon a reading and/or understanding of the specification and annexed drawings. For example, the above examples are discussed in the context of PMSM motors, but the present disclosure is equally applicable for sensored and sensorless FOC control for other AC motors such as Alternating Current Induction Motor (ACIM). The disclosure herein includes all such modifications and alterations and is generally not intended to be limited thereby. 
     In addition, while a particular feature or aspect may have been disclosed with respect to only one of several implementations, such feature or aspect may be combined with one or more other features and/or aspects of other implementations as may be desired. Furthermore, to the extent that the terms “includes”, “having”, “has”, “with”, and/or variants thereof are used herein, such terms are intended to be inclusive in meaning—like “comprising.” Also, “exemplary” is merely meant to mean an example, rather than the best. It is also to be appreciated that features, layers and/or elements depicted herein are illustrated with particular dimensions and/or orientations relative to one another for purposes of simplicity and ease of understanding, and that the actual dimensions and/or orientations may differ substantially from that illustrated herein.