# Patent

## Title
Electric motor feedforward control utilizing dynamic motor model

## Abstract

A motor control system comprising a motor configured to operate at a rotational velocity and a control module in communication with the motor is provided. The control module is configured to receive a torque command indicating a desired amount of torque to be generated by the motor, obtain a rotational velocity of the motor, receive a desired phase advance angle for driving the motor; and generate a voltage command indicating a voltage magnitude to be applied to the motor based on the rotational velocity of the motor, the motor torque command, and the desired phase advance angle by using a plurality of dynamic inverse motor model equations that (i) allow the desired phase advance angle to exceed an impedance angle of the motor and (ii) specify that the voltage magnitude is a function of a voltage magnitude of a previous voltage command.

## Background
CROSS-REFERENCES TO RELATED APPLICATIONS
This patent application claims priority to U.S. Provisional Patent Application Ser. No. 61/769,262, filed Feb. 26, 2013, which is incorporated herein by reference in its entirety.


BACKGROUND OF THE INVENTION
Electrical power steering (EPS) systems in vehicles use an electric motor connected to the steering gear or steering column that is electronically controlled to provide a torque to assist a driver in steering the vehicle. EPS systems typically include an electric motor and a controller. The controller receives steering torque information from a torque sensor and controls the motor to transmit assist torque to the wheels, e.g., by applying the torque to the steering column. One type of an electric motor is a Permanent Magnet (PM) brushless motor.
Sinusoidal Brushless Motor Control is a technique used to control brushless motors in EPS systems. Some such techniques utilize a feedforward motor voltage command/control utilizing a steady state representation of the motor characteristics.
SUMMARY OF THE INVENTION
In an embodiment of the invention, a motor control system comprises a motor configured to operate at a rotational velocity and a control module in communication with the motor is provided. The control module is configured to receive a torque command indicating a desired amount of torque to be generated by the motor, obtain a rotational velocity of the motor, receive a desired phase advance angle for driving the motor; and generate a voltage command indicating a voltage magnitude to be applied to the motor based on the rotational velocity of the motor, the motor torque command, and the desired phase advance angle by using a plurality of dynamic inverse motor model equations that (i) allow the desired phase advance angle to exceed an impedance angle of the motor and (ii) specify that the voltage magnitude is a function of a voltage magnitude of a previous voltage command.
In another embodiment of the invention, a method for controlling a motor of an electronic power steering (EPS) system comprises receiving a torque command indicating a desired amount of torque to be generated by the motor. The method obtains a rotational velocity of the motor. The method receives a desired phase advance angle for driving the motor. The method generates a voltage command indicating a voltage magnitude to be applied to the motor based on the rotational velocity of the motor, the motor torque command, and the desired phase advance angle by using a plurality of dynamic inverse motor model equations. The inverse motor model equations allow the desired phase advance angle to exceed an impedance angle of the motor and specify that the voltage magnitude is a function of a voltage magnitude of a previous voltage command.
These and other advantages and features will become more apparent from the following description taken in conjunction with the drawings.



BRIEF DESCRIPTION OF THE DRAWINGS
The subject matter which is regarded as the invention is particularly pointed out and distinctly claimed in the claims at the conclusion of the specification. The foregoing and other features, and advantages of the invention are apparent from the following detailed description taken in conjunction with the accompanying drawings in which:
FIG. 1 is an exemplary schematic illustration of a motor control system in accordance with exemplary embodiments;
FIG. 2 is a phasor diagram of a motor in accordance with exemplary embodiments;
FIG. 3 is a diagram illustrating the four quadrants of operation for a motor in accordance with exemplary embodiments;
FIG. 4a is a block diagram that illustrates calculation of desired d-axis current in accordance with exemplary embodiments;
FIG. 4b illustrates lookup tables for finding desired d-axis current in accordance with exemplary embodiments;
FIG. 5a is a block diagram that illustrates calculation of a voltage command in accordance with exemplary embodiments;
FIG. 5b is a block diagram that illustrates calculation of a desired amount of direct axis current in accordance with exemplary embodiments;
FIG. 6a illustrates an implementation of a derivative filter in accordance with exemplary embodiments;
FIG. 6b illustrates an implementation of a derivative filter in accordance with exemplary embodiments;
FIG. 7 illustrates an implementation of a low pass filter in accordance with exemplary embodiments;
FIG. 8 is a block diagram that illustrates calculation of a voltage command in accordance with exemplary embodiments;
FIG. 9 is a block diagram that illustrates calculation of a final voltage command in accordance with exemplary embodiments; and
FIG. 10 is flow diagram illustrating a motor control method in accordance with exemplary embodiments.



DETAILED DESCRIPTION
Embodiments of the invention provide a controller for controlling a motor of an electric power steering (EPS) system by supplying a voltage command at a phase advance angle up to 90 degrees and beyond 90 degrees (i.e., the phase advance angle above the impedance angle of the motor). The controller uses a motor model that includes equations for calculating a voltage command based on inputs that include a motor velocity, a torque command, and a phase advance angle. The controller receives the inputs, calculates voltage commands specifying required voltages according to the motor model, and sends the voltage commands to the electric motor to control the torque generated by the motor. In one embodiment, the motor model allows for calculating the voltage commands even when the torque generated from the motor voltage is opposite to the rotational direction of the motor (i.e., when the motor operates in quadrant II and IV) and the phase advance angle is up to or greater than 90 degrees. In one embodiment, the motor model allows for such calculation by limiting motor regenerative current in quadrants II and IV.
Referring now to the Figures, where the invention will be described with reference to specific embodiments, without limiting same, FIG. 1 illustrates a motor control system 10 in accordance with one aspect of the invention. In the exemplary embodiment as shown, the motor control system 10 includes a motor 20, an inverter 22, a supply voltage 24, and a control module 30 (also referred to as a controller). The voltage supply 24 supplies a supply voltage VB to the motor 20. In one embodiment, the voltage supply 24 is a 12 volt battery. However, it is to be understood that other types of voltage supplies may be used as well. The inverter 22 is connected to the motor 20 by a set of three connections 32 that are labeled as ‘A’, ‘B’ and ‘C’. In one embodiment, the motor 20 is a polyphase, permanent magnet (PM) brushless motor. In this example, the motor 20 is a three-phase PM motor. The control module 30 is connected to the motor 20 through the inverter 22. The control module 30 receives a motor torque command TCMD from a source 34 such as, for example, a steering control system. The control module 30 includes control logic for sending a motor voltage command VLL to the motor 20 through the inverter 22.
Referring now to FIGS. 1 and 2, the motor 20 is operated such that a phase of the motor voltage command VLL shifts with respect to a phase of a developed back electromotive force (BEMF) voltage Eg of the motor 20. A phasor diagram of the motor 20 is shown in FIG. 2 and illustrates a voltage vector V having a magnitude that is the motor voltage command VLL. A BEMF voltage vector E has a magnitude that is the BEMF voltage Eg. An angle between voltage vector V and the BEMF voltage vector E is defined and is referred to as a phase advance angle δ. A stator phase current is referred to as I, a stator phase current in the quadrature axis (q-axis) is referred to as Iq, a stator phase current in the direct axis (d-axis) is referred to as Id, a stator phase reactance in the respective d-axis is referred to as Xd, the stator phase reactance in the q-axis is referred to as Xq, and a stator phase resistance at phase A is referred to as Ra.
In one embodiment, an encoder 36 (shown in FIG. 1) is used to measure an angular position θ of a rotor (not shown in FIG. 1) of the motor 20. The angular position θ of the motor 20 is used to determine the input phase voltages Va, Vb and Vc, where input phase voltage Va corresponds with connection A, input phase voltage Vb corresponds with connection B, and input phase voltage Vc corresponds with connection C. The control module 30 includes control logic for calculating input phase voltages Va, Vb, and Vc by the following equations:

Va=V sin(δ+θ)  Equation 1

Vb=V sin(δ+θ+120°)  Equation 2

Vc=V sin(δ+θ+240°)  Equation 3

The motor 20 rotates in a clockwise as well as a counterclockwise direction, and may also produce torque in both the clockwise and counterclockwise direction during operation. Therefore, the motor 20 is capable of operating in all four quadrants of operation, which is illustrated in FIG. 3. FIG. 3 is an exemplary diagram illustrating the four quadrants of operation for the motor 20, where quadrant I includes positive velocity and positive torque, quadrant II includes negative velocity and positive torque, quadrant III includes negative velocity and negative torque, and quadrant IV includes positive velocity and negative torque. In the event that the motor 20 is operating in either quadrant II or quadrant IV, the motor 20 may create a regenerative current that is sent back into the DC power supply 24 (shown in FIG. 1).
The control module 30 includes control logic for monitoring the motor 20 for a rotational velocity. Specifically, the control module 30 may be in communication with a speed measuring device (not shown in FIG. 1) that provides an output indicating an angular velocity ωm of the motor 20. Alternatively, the angular velocity ωm of the motor 20 may be calculated by differentiating the angular position θ, where dθ/dt=ωm. The angular velocity ωm may also be referred to as the mechanical velocity of the motor 20, and is measured in radians/second. The control module 30 also includes control logic for also calculating an electrical velocity ωe of the motor 20, where the electrical velocity is calculated by multiplying the mechanical velocity ωm by a number of poles Np of the motor 20, and dividing the product of the mechanical velocity ωm and the number of poles Np by two.
In one embodiment, a memory (not shown) of the control module 30 stores several motor circuit parameters. Specifically, in one embodiment, the motor circuit parameters include a motor voltage constant Ke that is measured in volts/radian/second, a motor and control module output circuit resistance R that is measured in Ohms, and motor inductances Lq and Ld that are measured in Henries. In another embodiment, the control module 30 may include control logic for calculating the motor circuit parameters including motor voltage constant Ke, the motor and control module output circuit resistance R, and the motor inductances Lq and Ld. In such an embodiment, the control logic may adjust the calculated motor output circuit resistance R and the calculated motor voltage constant Ke based on the temperature of the motor. The control logic may also adjust the calculated motor voltage constant Ke and the calculated motor inductances Lq and Ld with respect to the motor current in order to comprehend the saturation effects. The control module 30 also includes control logic for monitoring the supply voltage VB to the motor 20.
In an embodiment, the control module 30 is configured to generate a voltage command using a motor control model. An example of a motor control model for a sinusoidal permanent magnet (PM) motor includes the following equations:




  
    
      
        
          
            
              
                V
                ⁢
                
                  
                
                ⁢
                
                  cos
                  ⁡
                  
                    (
                    δ
                    )
                  
                
              
              =
              
              ⁢
              Vq
            
          
        
        
          
            
              =
              
              ⁢
              
                
                  
                    (
                    
                      
                        
                          
                            L
                            q
                          
                          R
                        
                        ⁢
                        s
                      
                      +
                      1
                    
                    )
                  
                  ⁢
                  
                    RI
                    q
                  
                
                +
                
                  
                    K
                    e
                  
                  ⁢
                  
                    ω
                    m
                  
                
                +
                
                  
                    L
                    d
                  
                  ⁢
                  
                    ω
                    e
                  
                  ⁢
                  
                    I
                    d
                  
                
              
            
          
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        4
      
    
  
  
    
      
        
          
            
              
                
                  -
                  V
                
                ⁢
                
                  
                
                ⁢
                
                  sin
                  ⁡
                  
                    (
                    δ
                    )
                  
                
              
              =
              
              ⁢
              Vd
            
          
        
        
          
            
              =
              
              ⁢
              
                
                  
                    (
                    
                      
                        
                          
                            L
                            q
                          
                          R
                        
                        ⁢
                        s
                      
                      +
                      1
                    
                    )
                  
                  ⁢
                  
                    RI
                    q
                  
                
                -
                
                  
                    L
                    q
                  
                  ⁢
                  
                    ω
                    e
                  
                  ⁢
                  
                    I
                    q
                  
                
              
            
          
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        5
      
    
  
  
    
      
        
          T
          e
        
        =
        
          
            K
            e
          
          ⁢
          
            I
            q
          
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        6
      
    
  




where:

    V is the magnitude of the voltage applied to the motor, i.e., the motor voltage VLL;
    Vq is the q-axis vector component of motor voltage in phase with the motor BEMF;
    Vd is the d-axis vector component of motor voltage 90 degrees out of phase with the motor BEMF;
    δ is the angle of the applied voltage relative to the BEMF in radians (the phase advance angle);
    Lq and Ld are the stator q-axis and d-axis inductances, respectively (Henries);
    R is the motor circuit resistance, including the motor stator and controller hardware (Ohms);
    Ke is the motor voltage constant (Voltage/Radian/second);
    ωm is the rotor mechanical velocity (Radian/second);
    ωe is the rotor electrical velocity (Radian/second);
    Id is the direct (d) axis current (Amperes);
    Iq is the quadrature (q) axis current (Amperes);
    Te is the electromagnetic torque (Newton meter); and
    s is the Laplace operator.


Setting the desired motor torque command TCMD equal to Te in the above equations 4-6 and solving for the voltage and phase advance angle required to deliver the desired torque yields the following:




  
    
      
        
          V
          q
        
        =
        
          
            
              T
              CMD
            
            ⁢
            
              R
              
                K
                e
              
            
            ⁢
            
              (
              
                
                  
                    
                      L
                      q
                    
                    R
                  
                  ⁢
                  s
                
                +
                1
              
              )
            
          
          +
          
            
              K
              e
            
            ⁢
            
              ω
              m
            
          
          +
          
            
              
                
                  ω
                  e
                
                ⁢
                
                  L
                  d
                
              
              R
            
            ⁢
            
              (
              
                
                  
                    
                      
                        T
                        CMD
                      
                      
                        K
                        e
                      
                    
                    ⁢
                    
                      ω
                      e
                    
                    ⁢
                    
                      L
                      q
                    
                  
                  -
                  
                    V
                    ⁢
                    
                      
                    
                    ⁢
                    
                      sin
                      ⁡
                      
                        (
                        δ
                        )
                      
                    
                  
                
                
                  
                    
                      
                        L
                        d
                      
                      R
                    
                    ⁢
                    s
                  
                  +
                  1
                
              
              )
            
          
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        7
      
    
  
  
    
      
        
          V
          d
        
        =
        
          
            
              R
              ⁡
              
                (
                
                  
                    
                      
                        L
                        d
                      
                      R
                    
                    ⁢
                    s
                  
                  +
                  1
                
                )
              
            
            ⁢
            
              (
              
                
                  
                    V
                    ⁢
                    
                      
                    
                    ⁢
                    
                      cos
                      ⁡
                      
                        (
                        δ
                        )
                      
                    
                  
                  -
                  
                    
                      T
                      CMD
                    
                    ⁢
                    
                      R
                      
                        K
                        e
                      
                    
                    ⁢
                    
                      (
                      
                        
                          
                            
                              L
                              q
                            
                            R
                          
                          ⁢
                          s
                        
                        +
                        1
                      
                      )
                    
                  
                  -
                  
                    
                      K
                      e
                    
                    ⁢
                    
                      ω
                      m
                    
                  
                
                
                  
                    ω
                    e
                  
                  ⁢
                  
                    L
                    d
                  
                
              
              )
            
          
          -
          
            
              
                T
                CMD
              
              
                K
                e
              
            
            ⁢
            
              ω
              e
            
            ⁢
            
              L
              q
            
          
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        8
      
    
  




In one embodiment, the control module 30 is configured to use the equations 7 and 8 to solve for the final motor voltage magnitude V (i.e., VLL in FIG. 1) for all four quadrants. For the quadrants I and III, the control module 30 uses the equation 7 to solve for Vq and to divide Vq by cosine of the phase advance angle as shown in the following equation 9:




  
    
      
        V
        =
        
          
            V
            q
          
          
            cos
            ⁡
            
              (
              δ
              )
            
          
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        9
      
    
  




For the quadrants II and IV (e.g., when the phase advance angle is over 90 degrees), the control module 30 uses the equations 7 and 8 to solve for Vq and Vd and uses the Vq and Vd in the following equation 10:

V=Sign(Vq)√{square root over (Vq2+Vd2)}  Equation 10

where Sign( ) is a function that outputs the sign (e.g., positive or negative) of a value. It is to be noted that the control module 30 may use the equation 10 to compute the final motor voltage magnitude V for all four quadrants I-IV.

In an embodiment, the control module 30 uses a simplified equation to calculate the final voltage magnitude. Specifically, the equation 8 for calculating Vd may be simplified by using a directly-commanded d-axis current Id. That is, using a directly commanded value as Id instead of using Id as a variable in the equation 8 allows for avoiding the implementation of the double derivative operation (i.e.,




  
    (
    
      
        
          
            L
            q
          
          R
        
        ⁢
        s
      
      +
      1
    
    )
  
  ×
  
    (
    
      
        
          
            L
            q
          
          R
        
        ⁢
        s
      
      +
      1
    
    )
  




for





  
    
      T
      CMD
    
    ⁢
    
      R
      
        K
        e
      
    
  
  )




of the equation 8. Calculating Id in order to directly command Id is described further below by reference to FIGS. 4a and 4b. 

In an embodiment, the control module 30 implements the following equation 11 to avoid a double derivative operation:




  
    
      
        
          V
          d
        
        =
        
          
            
              I
              d_des
            
            ⁢
            
              
                3
              
              2
            
            ⁢
            
              R
              ⁡
              
                (
                
                  
                    
                      
                        L
                        d
                      
                      R
                    
                    ⁢
                    s
                  
                  +
                  1
                
                )
              
            
          
          -
          
            
              
                T
                CMD
              
              
                K
                e
              
            
            ⁢
            
              ω
              e
            
            ⁢
            
              L
              q
            
          
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        11
      
    
  




The control module 30 may be configured to use the equations 7 and 11 to solve for the final motor voltage magnitude V for all four quadrants. For quadrants I and III, the control module 30 uses the equation 7 to solve for Vq and uses the Vq value in the equation 9 to solve for V. For quadrants II and IV, the control module 30 uses the equations 7 and 11 to solve for Vq, and Vd, and use the Vq, and Vd values in the equation 10 to solve for V.

The equation 11 includes an Id_des value that represents a desired amount of Id current. Id_des may be a signal from a phase control sub-function representing the desired d-axis current Id. This desired amount of Id current, in one embodiment, is calculated as an input to a regenerative current limiting function. An example of such a function is described in U.S. Patent Application Publication No. 2013/0154524, entitled “Motor Control System for Limiting Regenerative Current,” filed on Dec. 15, 2011, the entire contents of which are incorporated herein by reference. A regenerative current limiting function is also described further below after the description of FIG. 11.
An exemplary motor control system as described in the above-incorporated U.S. Patent Application Publication No. 2013/0154524 provides techniques for limiting negative supply current, or regenerative current, that is produced by an electric motor when operating in either quadrant II or quadrant IV. The system calculates a value of a target field weakening current IdTARGET, which is used as an input to calculate a motor voltage. The value Id_des may be used by the system as the IdTARGET current.
In one embodiment, the equations 7, 8 and 11 for Vq and Vd above include derivative terms (e.g.,




  
    
      
        
          T
          CMD
        
        ⁢
        
          R
          
            K
            e
          
        
        ⁢
        
          (
          
            
              
                
                  L
                  q
                
                R
              
              ⁢
              s
            
            +
            1
          
          )
        
      
      ⁢
      
        

      
      ⁢
      and
      ⁢
      
        

      
      ⁢
      
        
          I
          d_des
        
        ⁢
        
          
            3
          
          2
        
        ⁢
        
          R
          ⁡
          
            (
            
              
                
                  
                    L
                    d
                  
                  R
                
                ⁢
                s
              
              +
              1
            
            )
          
        
      
    
    )
  
  .




Discretizing a derivative can produce noise due to sampling and resolution effects at high frequencies. To address the noise, the controller 30 of one embodiment includes a digital filter (not shown in FIG. 1) to implement the derivative function utilizing a Fourier Series representation of a derivative with a Hamming window applied.

FIG. 4a is a block diagram that illustrates an implementation of desired d-axis current Id_des calculation module 400. This d-axis current is calculated for directly commanding the Id. This directly commanded Id_des is used for Vd calculations (e.g., in the equation 11) for quadrants II and IV only. In one embodiment, Id_des 405 is a function of the motor velocity ωm 410 and the absolute value of the torque command TCMD 415 as shown. In one embodiment, a sign block 425 identifies the sign (e.g., positive or negative) of the torque command TCMD 415, and the multiplier 430 multiplies the motor velocity ωm 410 by the sign value (e.g., −1 or +1) of the torque command TCMD 415. In one embodiment, the resulting product is used to look up values from a look up table. The sign of this resulting product indicates the quadrant in which the motor is operating. For instance, when the sign of the resulting product is negative because the sign of the torque command is opposite to the sign of the motor velocity, the motor is operating in quadrants II or IV. When the sign of the resulting product is positive because the sign of the torque command is the same as the sign of the motor velocity, the motor is operating in quadrants I or III. The absolute value block 435 takes the amplitude of the torque command TCMD 415 and the amplitude is used to select a look up table.
In one embodiment, Id_des can be determined from a set of calibratable, interpolated, fixed x, variable y lookup tables depicted as curves in a graph 420, each defined at a specific torque command. In one embodiment, the x-axis of the graph 420 represents the motor velocity multiplied by the sign of the torque command and the y-axis of the graph represents the desired current Id_des. FIG. 4b illustrates exemplary lookup tables depicted as curves 440-470 in a graph 475. The x-axis of the graph 475 represents the motor velocity multiplied by the sign of the torque command in revolutions per minute (RPM). The y-axis represents the desired current Id_des in amperes. In one embodiment, when the amplitude of the torque command does not exactly match any of the torque command amplitudes for the different curves, an interpolation technique is employed to find the desired current Id_des value. In one embodiment, when the motor velocity multiplied by the sign of the torque command is positive (i.e., when the motor is operating in quadrants I or III), Id_des is set to zero. The corresponding portion of the graph is not depicted in FIG. 4b. 
FIGS. 5-10 illustrate exemplary implementations of the equations 7, 8, and 11 for calculating voltage commands. Specifically, FIGS. 5a and 5b illustrate an exemplary approach for calculating Vq (i.e., using the equation 7) and other terms of the equations 8 and 11. Implementations of static versions of the equations 7, 8, and 11 (i.e., without the derivative term s) are described in the above-incorporated U.S. Patent Application Publication No. 2013/0154524. An exemplary implementation of the equation 7 is also described in U.S. Pat. No. 7,157,878, the entire content of which is incorporated herein by reference.
FIG. 5a is a block diagram that illustrates an implementation of a voltage command calculation module 500. Specifically, this module 500 calculates Vq 595 according to the equation 8 in one embodiment. As shown, the module 500 takes as inputs the torque command 415, the motor velocity ωm 410, and a phase advance angle δ 599, and outputs Vq 595.
An R/Ke block 515, an Lq/R block 520, a derivative filter 525, and an adder 527 together implement the first term




  
    T
    CMD
  
  ⁢
  
    R
    
      K
      e
    
  
  ⁢
  
    (
    
      
        
          
            L
            q
          
          R
        
        ⁢
        s
      
      +
      1
    
    )
  




of the equation 7. Exemplary implementations of the derivative filter 525 are described further below by reference to FIGS. 6a and 6b. A Ke block 530 implements the second term Keωm of the equation 7. A Lq/R block 535, a pole number block 540, an Lq/R block 550, a low pass filter (LPF) 555, a sine block 560, multipliers 565-580, and an adder 585 together implement the third term





  
    
      
        ω
        e
      
      ⁢
      
        L
        q
      
    
    R
  
  ⁢
  
    (
    
      
        
          
            
              T
              CMD
            
            
              K
              e
            
          
          ⁢
          
            ω
            e
          
          ⁢
          
            L
            q
          
        
        -
        
          V
          ⁢
          
            
          
          ⁢
          
            sin
            ⁡
            
              (
              δ
              )
            
          
        
      
      
        
          
            
              L
              d
            
            R
          
          ⁢
          s
        
        +
        1
      
    
    )
  




of the equation 7. An exemplary implementation of the LPF 555 is described further below by reference to FIG. 7. In one embodiment, the LPF 555 may be bypassed.

The phase advance angle δ 599 that the sine block 560 takes as an input may be calculated by an Id_des calculation block, which will be described further below by reference to FIG. 5b. The motor electrical velocity ωe 542 is related to the motor mechanical velocity ωm 410 and the number of motor poles by the equation ωe=(number of motor poles Np/2)×ωm. The first, second, and third terms of the equation 7 is summed by an adder 590 to output Vq 595 of the equation 7.
FIG. 5b is a block diagram that illustrates calculation of Id_des Specifically, FIG. 5b illustrates an Id_des calculation block 513. The Id_des calculation block 513 is similar to the Id_des calculation module 400 for quadrants II and IV described above by reference to FIG. 4a. The Id_des calculation block 513 takes as inputs the torque command 415, the motor velocity ωm 410, a supply voltage 503, and a set of motor circuit parameters 508. The Id_des calculation block 513 calculates the Id_des 405 and the phase advance angle δ 599. In one embodiment, the set of motor circuit parameters 508 includes an estimation of the motor circuit resistance R, an estimation of the q-axis stator inductance Lq, an estimation of the d-axis stator inductance Ld, an estimation of the motor voltage constant Ke, and a number of poles of the motor Np.
FIG. 6a illustrates an exemplary non-recursive implementation of the derivative filter 525 of FIG. 5 in various embodiments. The derivative filter 525 may be used for calculating derivative terms of the equations 7, 8, and 11. For different derivative terms from different equations, the values of the derivative input 605 would be different. Also, the gain values that the derivative filter gain block 610 uses would be different for calculating the different derivative terms. In one embodiment, the gain values are in a range of float 0-200. In one embodiment, the Vq filter coefficients include six constants, which are depicted in FIG. 6 as C0, C1, C2, C4, C5, and C6. Different sets of these constants are used for calculating the different derivative terms in one embodiment. It is to be noted that, in this example, the derivative filter 525 is non-recursive—i.e., not reusing the output as an input. In one embodiment, the derivative filter 525 is a finite impulse response (FIR) filter.
FIG. 6b illustrates another exemplary implementation of the derivative filter 525 of FIG. 5 in various embodiments. Compared to the implementation illustrated in FIG. 6a, the implementation illustrated in FIG. 6b is simplified by having a symmetric structure for the filter coefficients. For example, C6 is set to −C0, C5 is set to −C1, and C4 is set to −C2. Having such symmetric coefficients limits the number of multiplication operations (i.e., from six to three as indicated by the six multipliers 625-640 in FIG. 6a and the three multipliers 655-665 in FIG. 6b) and enforces the symmetry of the coefficients (i.e., prevents a set of six coefficients that are not symmetric from being loaded).
FIG. 7 illustrates an exemplary implementation of the LPF 555 of FIG. 5. As shown, an output of the LFP 555 is calculated based on inputs 745 and 750. In one embodiment, the input 745 is Ld/R and the input 750 is




  
    
      
        T
        CMD
      
      
        K
        e
      
    
    ⁢
    
      ω
      e
    
    ⁢
    
      L
      q
    
  
  -
  
    V
    ⁢
    
      
    
    ⁢
    
      
        sin
        ⁡
        
          (
          δ
          )
        
      
      .
    
  




In one embodiment, the LPF 555 also includes a look up table 705 to find a cut off value for the input 750 based on the input 745. In one embodiment, a ratio of one millisecond and the input 745 is used to find the cut off value from the look up table 705. Alternatively, in one embodiment, the look up table 705 may be replaced with an equation





  
    1
    -
    
      e
      
        -
        
          T
          τ
        
      
    
  
  ,




where T is a sampling time period (e.g., one millisecond) and τ is the input 745. The rest of this exemplary implementation of the LPF includes a multiplier 720, adders 725 and 730, and 1/Z blocks 735 and 740. In one embodiment, the initial conditions for the 1/Z blocks 735 and 740 are set to zero.

FIG. 8 is a block diagram that illustrates an implementation of a voltage command calculation module 800. Specifically, this module 800 calculates Vd 895 according to the equation 11 in one embodiment. As shown, the module 800 takes as inputs the torque command 415, the motor velocity ωm 410, and the directly commanded Id_des 405.
A square root(3)/2 block 805, the Lq/R block 535, the derivative filter 525, a resistance block 810, multipliers 815-825, and an adder 830 together implement the first term




  
    I
    d_des
  
  ⁢
  
    
      3
    
    2
  
  ⁢
  
    R
    ⁡
    
      (
      
        
          
            
              L
              d
            
            R
          
          ⁢
          s
        
        +
        1
      
      )
    
  




of the equation 11. Exemplary implementations of the derivative filter 525 are described above by reference to FIGS. 6a and 6b. The pole number block 540, the Lq/R block 550, the R/Ke block 515, and an adder 840 implement the second term





  
    
      T
      CMD
    
    
      K
      e
    
  
  ⁢
  
    ω
    e
  
  ⁢
  
    L
    q
  




of the equation 11. An adder 835 adds the calculated first term of the equation 11 and the negative of the second term of the equation 11 to output Vd 895.

FIG. 9 is a block diagram that illustrates an implementation of a final voltage command calculation module 900 that computes the final voltage command Vmag 945. The final voltage command calculation module 900 takes as inputs the phase advance angle 599, Vq 595, and Vd 895. A cosine block 905 and the divider 910 compute the voltage magnitude according to the equation 9 based on the phase advance angle 599 and Vq 595. The hypotenuse block 915 and the sign block 920 compute the voltage magnitude according to the equation 10 based on Vq 595 and Vd 895. The selector 935 selects one of the voltage magnitudes computed according to the equations 9 and 10 based on the quadrant in which the motor is operating. That is, the selector 935 selects the voltage magnitude computed according to the equation 9 when the motor is operating in quadrants I or III. Otherwise, the selector 935 selects the voltage magnitude computed according to the equation 10. In one embodiment, the selected voltage magnitude signal may be limited to a range of values by a saturator 940. In one embodiment, the final voltage magnitude 945 is fed back into the equations 7 and 8 to generate the next final voltage magnitude.
Referring now to FIG. 10, a flow diagram illustrates a motor control method that can be performed by the control module 30 of FIG. 1 in one embodiment. As can be appreciated in light of the disclosure, the order of operation within the method is not limited to the sequential execution as illustrated in FIG. 10, but may be performed in one or more varying orders as applicable and in accordance with the present disclosure.
In one example, the method at 1010 receives a torque command indicating a desired amount of torque to be generated by the motor. In one embodiment, the torque command originates from another module (not shown in FIG. 1) that monitors the hand wheel movement (e.g., for the hand wheel angle and the hand wheel torque) and computes a desired amount of torque based on the hand wheel movement.
At 1020, the method obtains a rotational velocity of the motor. In one embodiment, the control module 30 receives an angular position θ of a rotor of the motor 20 of FIG. 1 periodically and computes the rotational velocity based on the received angular positions. At 1030, the method receives a desired phase advance angle for driving the motor.
At 1040, the method generates a voltage command indicating a voltage magnitude to be applied to the motor based on the rotational velocity of the motor, the motor torque command, and the desired phase advance angle by using the equations 7-11 that allow the desired phase advance angle to exceed ninety degrees.
A regenerative current limiting function used for deriving the equation 11 will now be described. In various embodiments, when controlling a sinusoidally excited motor, the phase advance angle may be selected based on various design goals. For example, optimal phase advance equations are derived to minimize the peak motor current. To derive the optimal phase advance equations, the steady state motor equations are written, for example, in motor q-axis and d-axis coordinates as follows:




  
    
      
        
          V
          q
        
        =
        
          
            RI
            q
          
          +
          
            
              ω
              e
            
            ⁢
            
              L
              d
            
            ⁢
            
              I
              d
            
            ⁢
            
              
                3
              
              2
            
          
          +
          
            
              K
              e
            
            ⁢
            
              ω
              m
            
          
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        12
      
    
  
  
    
      
        
          V
          d
        
        =
        
          
            
              -
              
                ω
                e
              
            
            ⁢
            
              L
              q
            
            ⁢
            
              I
              q
            
          
          +
          
            
              RI
              d
            
            ⁢
            
              
                3
              
              2
            
          
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        13
      
    
  
  
    
      
        
          T
          e
        
        =
        
          
            K
            e
          
          ⁢
          
            I
            q
          
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        14
      
    
  
  
    
      
        
          ω
          m
        
        =
        
          
            2
            
              N
              p
            
          
          ⁢
          
            ω
            e
          
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        15
      
    
  




The phase advance angle of the motor voltage command with respect to the motor BEMF waveform is represented by δ and may be calculated with the following equation 16:




  
    
      
        δ
        =
        
          
            Tan
            
              -
              1
            
          
          ⁡
          
            (
            
              
                -
                
                  V
                  d
                
              
              
                V
                q
              
            
            )
          
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        16
      
    
  




It is to be noted that the d-axis vector is considered positive when the vector is pointing to the right side as shown in FIG. 2.

In order to minimize the peak current, the d-axis current should be zero whenever possible. For motor voltages below the available supply voltage, the optimal phase advance may be computed by the following equation, which is derived by setting Id=0 in the above equations 12-15 and solving for δ using the equation 16. The result is referred to as optimal phase advance angle δ2.




  
    
      
        
          δ
          2
        
        =
        
          
            Tan
            
              -
              1
            
          
          (
          
            
              
                ω
                e
              
              ⁢
              
                L
                q
              
              ⁢
              
                
                  T
                  CMD_SCL
                
                
                  K
                  e
                
              
            
            
              
                
                  K
                  e
                
                ⁢
                
                  ω
                  e
                
                ⁢
                
                  2
                  
                    N
                    p
                  
                
              
              +
              
                TR
                
                  K
                  e
                
              
            
          
          )
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        17
      
    
  




In one embodiment, the magnitude of the value computed for δ2 is limited by the maximum δ2 phase advance (δ2MAX) equation 18 given below (save the sign of the computed δ2 and reapply after limiting). This magnitude limiting should be performed because the noise on motor velocity near zero motor velocity could potentially cause the sign of the limit value to be opposite of the sign of δ2.




  
    
      
        
          
            δ
            2
          
          ⁢
          MAX
        
        =
        
          
            Tan
            
              -
              1
            
          
          ⁢
          
            
              
                
                
                  ω
                  e
                
                
              
              ⁢
              
                L
                q
              
            
            R
          
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        18
      
    
  




When the supply voltage limit is reached, the Id current is allowed to be nonzero to continue to get the desired torque out of the motor (this is referred to as field weakening). Using phase advance with field weakening allows the torque vs. speed performance of a given motor/control module to be expanded. In order to derive the equation for the optimal phase advance δ1 at the supply voltage limit, the equations 12-15 above may be solved again with the voltage set constant at the supply voltage (e.g., modulator input voltage, or DC Link Voltage).




  
    
      
        X
        =
        
          
            
              
                
                  T
                  
                    cmd
                    ⁢
                    _
                    ⁢
                    SCL
                  
                
                
                  K
                  e
                
              
              ⁢
              
                (
                
                  
                    R
                    2
                  
                  +
                  
                    
                      ω
                      e
                      2
                    
                    ⁢
                    
                      L
                      q
                    
                    ⁢
                    
                      L
                      d
                    
                  
                
                )
              
            
            +
            
              
                2
                ⁢
                
                  ω
                  e
                
                ⁢
                
                  K
                  e
                
                ⁢
                R
              
              
                N
                p
              
            
          
          DCLinkLimit
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        18
      
    
  
  
    
      
        
          δ
          1
        
        =
        
          
            Tan
            
              -
              1
            
          
          (
          
            
              
                X
                2
              
              -
              
                R
                2
              
            
            
              
                R
                ⁢
                
                  
                
                ⁢
                
                  ω
                  e
                
                ⁢
                
                  L
                  d
                
              
              +
              
                X
                ⁢
                
                  
                    
                      R
                      2
                    
                    +
                    
                      
                        ω
                        e
                        2
                      
                      ⁢
                      
                        L
                        q
                      
                      ⁢
                      
                        L
                        d
                      
                    
                    -
                    
                      X
                      2
                    
                  
                
              
            
          
          )
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        19
      
    
  




The value computed for δ1 may be limited by the maximum δ1 phase advance (δ1MAX) equation given below:




  
    
      
        
          
            δ
            1
          
          ⁢
          MAX
        
        =
        
          
            Tan
            
              -
              1
            
          
          ⁢
          
            
              
                ω
                e
              
              ⁢
              
                L
                q
              
            
            R
          
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        20
      
    
  




One or more of the following exceptions to the above calculations of phase advance angle may apply. The first exception is when operating in quadrant III, the minimum, or most negative value, instead of the maximum should be used for the equation 11. When the torque command is zero, the maximum should be used if the motor speed is positive and the minimum should be used if the motor speed is negative. The second exception is that after calculating δ, a limit is applied to the calculated value to ensure δ is within a legal range.
Another embodiment of phase advance calculation is described when used for control of the supply regeneration current. Equation 22 described below for phase advance may be used for quadrants II and IV when the option to limit the amount of supply current regenerated to the vehicle supply is required. This equation allows the amount of supply current regenerated to be calibratable by setting a non-zero desired value of Id current in quadrants II and IV, targeted to provide just enough supply current limiting to meet motor design requirements. An embodiment of this equation for phase advance to be used in quadrants II and IV is as follows:




  
    
      
        
          δ
          3
        
        =
        
          
            Tan
            
              -
              1
            
          
          (
          
            
              
                
                  ω
                  e
                
                ⁢
                
                  L
                  q
                
                ⁢
                
                  
                    T
                    CMD_SCL
                  
                  
                    K
                    e
                  
                
              
              -
              
                
                  RI
                  d_des
                
                ⁢
                
                  
                    3
                  
                  2
                
              
            
            
              
                
                  K
                  e
                
                ⁢
                
                  ω
                  e
                
                ⁢
                
                  2
                  
                    N
                    p
                  
                
              
              +
              
                TR
                
                  K
                  e
                
              
              +
              
                
                  ω
                  e
                
                ⁢
                
                  L
                  d
                
                ⁢
                
                  I
                  d_des
                
                ⁢
                
                  
                    3
                  
                  2
                
              
            
          
          )
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        22
      
    
  




The numerator of the input to the arc tangent in the equation 22 is a steady state version of the equation 11.

In an embodiment, the pre-calculated terms from a voltage control sub-function may be used instead of the equation 22, as follows:




  
    
      
        
          Term_D
          =
          
            
              ω
              e
            
            ⁢
            
              L
              d
            
            ⁢
            
              I
              
                d
                des
              
            
            ⁢
            
              
                3
              
              2
            
          
        
        ⁢
        
          

        
        ⁢
        
          Term_E
          =
          
            
              RI
              d_des
            
            ⁢
            
              
                3
              
              2
            
          
        
        ⁢
        
          

        
        ⁢
        
          
            V
            q
          
          =
          
            Term_A
            +
            
              Term_B
              ss
            
            +
            Term_D
          
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        23
      
    
  
  
    
      
        
          V
          d
        
        =
        
          
            
              -
              
                Term_B
                ss
              
            
            *
            
              Term_X
              q
            
          
          +
          Term_E
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        24
      
    
  
  
    
      
        
          δ
          3
        
        =
        
          
            Tan
            
              -
              1
            
          
          ⁡
          
            (
            
              
                -
                
                  V
                  d
                
              
              
                V
                q
              
            
            )
          
        
      
    
    
      
        Equation
        ⁢
        
          
        
        ⁢
        25
      
    
  




While the invention has been described in detail in connection with only a limited number of embodiments, it should be readily understood that the invention is not limited to such disclosed embodiments. Rather, the invention can be modified to incorporate any number of variations, alterations, substitutions or equivalent arrangements not heretofore described, but which are commensurate with the spirit and scope of the invention. Additionally, while various embodiments of the invention have been described, it is to be understood that aspects of the invention may include only some of the described embodiments. Accordingly, the invention is not to be seen as limited by the foregoing description.

## Claims

1. A motor control system, comprising:
a motor configured to operate at a rotational velocity; and
a control module in communication with the motor, the control module configured to:
receive a torque command indicating a desired amount of torque to be generated by the motor:
obtain a rotational velocity of the motor;
receive a desired phase advance angle for driving the motor; and
generate a voltage command indicating a voltage magnitude to be applied to the motor based on the rotational velocity of the motor, the motor torque command, and the desired phase advance angle by using a plurality of dynamic inverse motor control model equations that (i) allow the desired phase advance angle to exceed an impedance angle of the motor and (ii) specify that the voltage magnitude is a function of a voltage magnitude of a previous voltage command,
wherein the plurality of equations include:




  
    
      
    
    ⁢
    
      
        V
        q
      
      =
      
        
          
            T
            CMD
          
          ⁢
          
            R
            
              K
              e
            
          
          ⁢
          
            (
            
              
                
                  
                    L
                    q
                  
                  R
                
                ⁢
                s
              
              +
              1
            
            )
          
        
        +
        
          
            K
            e
          
          ⁢
          
            ω
            m
          
        
        +
        
          
            
              
                ω
                e
              
              ⁢
              
                L
                d
              
            
            R
          
          ⁢
          
            (
            
              
                
                  
                    
                      T
                      CMD
                    
                    
                      K
                      e
                    
                  
                  ⁢
                  
                    ω
                    e
                  
                  ⁢
                  
                    L
                    q
                  
                
                -
                
                  V
                  ⁢
                  
                    
                  
                  ⁢
                  
                    sin
                    ⁡
                    
                      (
                      δ
                      )
                    
                  
                
              
              
                
                  
                    
                      L
                      d
                    
                    R
                  
                  ⁢
                  s
                
                +
                1
              
            
            )
          
        
      
    
  




  
    
      
    
    ⁢
    and
  




  
    
      
        V
        d
      
      =
      
        
          
            R
            ⁡
            
              (
              
                
                  
                    
                      L
                      d
                    
                    R
                  
                  ⁢
                  s
                
                +
                1
              
              )
            
          
          ⁢
          
            (
            
              
                
                  V
                  ⁢
                  
                    
                  
                  ⁢
                  
                    cos
                    ⁡
                    
                      (
                      δ
                      )
                    
                  
                
                -
                
                  
                    T
                    CMD
                  
                  ⁢
                  
                    R
                    
                      K
                      e
                    
                  
                  ⁢
                  
                    (
                    
                      
                        
                          
                            L
                            q
                          
                          R
                        
                        ⁢
                        s
                      
                      +
                      1
                    
                    )
                  
                
                -
                
                  
                    K
                    e
                  
                  ⁢
                  
                    ω
                    m
                  
                
              
              
                
                  ω
                  e
                
                ⁢
                
                  L
                  d
                
              
            
            )
          
        
        -
        
          
            
              T
              CMD
            
            
              K
              e
            
          
          ⁢
          
            ω
            e
          
          ⁢
          
            L
            q
          
        
      
    
    ,
  


wherein
V is the voltage magnitude applied to the motor,
Vq is a quadrature axis vector component of a motor voltage in phase with a motor back electromotive force (BEMF);
Vd is a d-axis vector component of the motor voltage that is 90 degrees out of phase with the motor BEMF;
δ is the phase advance angle, which is an angle of the applied voltage relative to the BEMF in radians;
Lq and Ld are stator q-axis and d-axis inductances in Henries, respectively,
R is a motor circuit resistance in Ohms, including a motor stator and controller hardware,
Ke is a motor voltage constant in voltage per radian per second,
(ωm is a rotor mechanical velocity in radian per second,
(ωe is a rotor electrical velocity in radian per second,
Id is a direct axis current in amperes,
Iq is a quadrature axis current in amperes,
TCMD is the torque command in Newton meter, and
s is a Laplace operator.

2. The motor control system of claim 1, wherein the control module is further configured to: receive a desired amount of regenerative current; and limit a regenerative current to be generated by the motor to the desired amount of regenerative current by applying the generated voltage command to the motor.

3. The motor control system of claim 1, wherein the control module obtains a rotational velocity of the motor by receiving a rotational position of the motor and computing the rotational velocity based on the rotational position.

4. The motor control system of claim 1, wherein the plurality of equations further comprise




  
    V
    =
    
      
        V
        q
      
      
        cos
        ⁡
        
          (
          δ
          )
        
      
    
  
  ,




wherein the method further comprises using




  V
  =
  
    
      V
      q
    
    
      cos
      ⁡
      
        (
        δ
        )
      
    
  




to compute the voltage command when the phase advance angle δ is less than 90 degrees.

5. The motor control system of claim 1, wherein the plurality of equations further comprise V=Sign(Vq)√{square root over (Vq2+Vd2)}, wherein the control module is further configured to use V=Sign(Vq)√{square root over (Vq2+Vd2)} to compute the voltage command when the phase advance angle δ is greater than 90 degrees, wherein Sign(Vq) is a function that outputs a sign of Vq.

6. The motor control system of claim 1, wherein the control module is further configured to send the voltage command to the motor to control the motor.

7. The motor control system of claim 1, wherein the control module comprises a non-recursive derivative filter that is configured to calculate derivative terms of the dynamic inverse motor model equations.

8. The motor control system of claim 7, wherein at least two of filter coefficients that the non-recursive derivative filter is configured to use same coefficient values with opposite signs.

9. A motor control system, comprising:
a motor configured to operate at a rotational velocity; and
a control module in communication with the motor, the control module configured to:
receive a torque command indicating a desired amount of torque to be generated by the motor:
obtain a rotational velocity of the motor;
receive a desired phase advance angle for driving the motor; and
generate a voltage command indicating a voltage magnitude to be applied to the motor based on the rotational velocity of the motor, the motor torque command, and the desired phase advance angle by using a plurality of dynamic inverse motor control model equations that (i) allow the desired phase advance angle to exceed an impedance angle of the motor and (ii) specify that the voltage magnitude is a function of a voltage magnitude of a previous voltage command,
wherein the plurality of equations include:




  
    
      V
      q
    
    =
    
      
        
          T
          CMD
        
        ⁢
        
          R
          
            K
            e
          
        
        ⁢
        
          (
          
            
              
                
                  L
                  q
                
                R
              
              ⁢
              s
            
            +
            1
          
          )
        
      
      +
      
        
          K
          e
        
        ⁢
        
          ω
          m
        
      
      +
      
        
          
            
              ω
              e
            
            ⁢
            
              L
              d
            
          
          R
        
        ⁢
        
          (
          
            
              
                
                  
                    T
                    CMD
                  
                  
                    K
                    e
                  
                
                ⁢
                
                  ω
                  e
                
                ⁢
                
                  L
                  q
                
              
              -
              
                V
                ⁢
                
                  
                
                ⁢
                sin
                ⁢
                
                  
                
                ⁢
                
                  (
                  δ
                  )
                
              
            
            
              
                
                  
                    L
                    d
                  
                  R
                
                ⁢
                s
              
              +
              1
            
          
          )
        
      
    
  




  and




  
    
      
        V
        d
      
      =
      
        
          
            I
            d_des
          
          ⁢
          
            
              3
            
            2
          
          ⁢
          
            R
            ⁡
            
              (
              
                
                  
                    
                      L
                      d
                    
                    R
                  
                  ⁢
                  s
                
                +
                1
              
              )
            
          
        
        -
        
          
            
              T
              CMD
            
            
              K
              e
            
          
          ⁢
          
            ω
            e
          
          ⁢
          
            L
            q
          
        
      
    
    ,
  


wherein
V is the voltage magnitude applied to the motor,
Vq is a quadrature axis vector component of a motor voltage in phase with a motor back electromotive force (BEMF);
Vd is a d-axis vector component of the motor voltage that is 90 degrees out of phase with the motor BEMF;
δ is the phase advance angle, which is an angle of the applied voltage relative to the BEMF in radians;
Lq and Ld are stator q-axis and d-axis inductances in Henries, respectively,
R is a motor circuit resistance in Ohms, including a motor stator and controller hardware,
Ke is a motor voltage constant in voltage per radian per second,
(ωm is a rotor mechanical velocity in radian per second,
(ωe is a rotor electrical velocity in radian per second,
Id_des is a direct axis current in amperes,
TCMD is the torque command in Newton meter, and
s is a Laplace operator.

10. The motor control system of claim 9, wherein the rotor mechanical velocity corn is the rotational velocity of the motor, wherein the electrical velocity toe is calculated by multiplying the mechanical velocity C0m by a number of poles of the motor, and dividing a product of the mechanical velocity C0m and the number of poles by two.

11. A method for controlling a motor of an electronic power steering (EPS) system, the method comprising:
receiving a torque command indicating a desired amount of torque to be generated by the motor;
obtaining a rotational velocity of the motor;
receiving a desired phase advance angle for driving the motor; and
generating a voltage command indicating a voltage magnitude to be applied to the motor based on the rotational velocity of the motor, the motor torque command, and the desired phase advance angle by using a plurality of dynamic inverse motor control model equations that (i) allow the desired phase advance angle to exceed an impedance angle of the motor and (ii) specify that the voltage magnitude is a function of a voltage magnitude of a previous voltage command,
wherein the plurality of equations include:




  
    
      
    
    ⁢
    
      
        V
        q
      
      =
      
        
          
            T
            CMD
          
          ⁢
          
            R
            
              K
              e
            
          
          ⁢
          
            (
            
              
                
                  
                    L
                    q
                  
                  R
                
                ⁢
                s
              
              +
              1
            
            )
          
        
        +
        
          
            K
            e
          
          ⁢
          
            ω
            m
          
        
        +
        
          
            
              
                ω
                e
              
              ⁢
              
                L
                d
              
            
            R
          
          ⁢
          
            (
            
              
                
                  
                    
                      T
                      CMD
                    
                    
                      K
                      e
                    
                  
                  ⁢
                  
                    ω
                    e
                  
                  ⁢
                  
                    L
                    q
                  
                
                -
                
                  V
                  ⁢
                  
                    
                  
                  ⁢
                  
                    sin
                    ⁡
                    
                      (
                      δ
                      )
                    
                  
                
              
              
                
                  
                    
                      L
                      d
                    
                    R
                  
                  ⁢
                  s
                
                +
                1
              
            
            )
          
        
      
    
  




  
    
      
    
    ⁢
    and
  




  
    
      
        V
        d
      
      =
      
        
          
            R
            ⁡
            
              (
              
                
                  
                    
                      L
                      d
                    
                    R
                  
                  ⁢
                  s
                
                +
                1
              
              )
            
          
          ⁢
          
            (
            
              
                
                  V
                  ⁢
                  
                    
                  
                  ⁢
                  
                    cos
                    ⁡
                    
                      (
                      δ
                      )
                    
                  
                
                -
                
                  
                    T
                    CMD
                  
                  ⁢
                  
                    R
                    
                      K
                      e
                    
                  
                  ⁢
                  
                    (
                    
                      
                        
                          
                            L
                            q
                          
                          R
                        
                        ⁢
                        s
                      
                      +
                      1
                    
                    )
                  
                
                -
                
                  
                    K
                    e
                  
                  ⁢
                  
                    ω
                    m
                  
                
              
              
                
                  ω
                  e
                
                ⁢
                
                  L
                  d
                
              
            
            )
          
        
        -
        
          
            
              T
              CMD
            
            
              K
              e
            
          
          ⁢
          
            ω
            e
          
          ⁢
          
            L
            q
          
        
      
    
    ,
  


wherein
V is the voltage magnitude applied to the motor,
Vq is a quadrature axis vector component of a motor voltage in phase with a motor back electromotive force (BEMF);
Vd is a d-axis vector component of the motor voltage that is 90 degrees out of phase with the motor BEMF;
δ is the phase advance angle, which is an angle of the applied voltage relative to the BEMF in radians;
Lq and Ld are stator q-axis and d-axis inductances in Henries, respectively,
R is a motor circuit resistance in Ohms, including a motor stator and controller hardware,
Ke is a motor voltage constant in voltage per radian per second,
(ωm is a rotor mechanical velocity in radian per second,
(ωe is a rotor electrical velocity in radian per second,
Id is a direct axis current in amperes,
Iq is a quadrature axis current in amperes,
TCMD is the torque command in Newton meter, and
s is a Laplace operator.

12. The method of claim 11 further comprising:
receiving a desired amount of regenerative current; and
limiting a regenerative current to be generated by the motor to the desired amount of regenerative current by applying the generated voltage command to the motor.

13. The method of claim 11, wherein the obtaining a rotational velocity of the motor comprises receiving a rotational position of the motor and computing the rotational velocity based on the rotational position.

14. The method of claim 11, wherein the plurality of equations further comprise




  V
  =
  
    
      V
      q
    
    
      cos
      ⁡
      
        (
        δ
        )
      
    
  




wherein the method further comprises using




  V
  =
  
    
      V
      q
    
    
      cos
      ⁡
      
        (
        δ
        )
      
    
  




to compute the voltage command when the phase advance angle δ is less than 90 degrees.

15. The method of claim 11, wherein the plurality of equations further comprise V=Sign(Vq)√{square root over (Vq2+Vd2)}, wherein the control module is further configured to use V=Sign(Vq)√{square root over (Vq2+Vd2)} to compute the voltage command when the phase advance angle δ is greater than 90 degrees, wherein Sign(Vq) is a function that outputs a sign of Vq.

16. The method of claim 11 further comprising sending the voltage command to the motor to control the motor.

17. A method for controlling a motor of an electronic power steering (EPS) system, the method comprising:
receiving a torque command indicating a desired amount of torque to be generated by the motor;
obtaining a rotational velocity of the motor;
receiving a desired phase advance angle for driving the motor; and
generating a voltage command indicating a voltage magnitude to be applied to the motor based on the rotational velocity of the motor, the motor torque command, and the desired phase advance angle by using a plurality of dynamic inverse motor control model equations that (i) allow the desired phase advance angle to exceed an impedance angle of the motor and (ii) specify that the voltage magnitude is a function of a voltage magnitude of a previous voltage command,
wherein the plurality of equations include:




  
    
      V
      q
    
    =
    
      
        
          T
          CMD
        
        ⁢
        
          R
          
            K
            e
          
        
        ⁢
        
          (
          
            
              
                
                  L
                  q
                
                R
              
              ⁢
              s
            
            +
            1
          
          )
        
      
      +
      
        
          K
          e
        
        ⁢
        
          ω
          m
        
      
      +
      
        
          
            
              ω
              e
            
            ⁢
            
              L
              d
            
          
          R
        
        ⁢
        
          (
          
            
              
                
                  
                    T
                    CMD
                  
                  
                    K
                    e
                  
                
                ⁢
                
                  ω
                  e
                
                ⁢
                
                  L
                  q
                
              
              -
              
                V
                ⁢
                
                  
                
                ⁢
                
                  sin
                  ⁡
                  
                    (
                    δ
                    )
                  
                
              
            
            
              
                
                  
                    L
                    d
                  
                  R
                
                ⁢
                s
              
              +
              1
            
          
          )
        
      
    
  




  and




  
    
      
        V
        d
      
      =
      
        
          
            I
            d_des
          
          ⁢
          
            
              3
            
            2
          
          ⁢
          
            R
            ⁡
            
              (
              
                
                  
                    
                      L
                      d
                    
                    R
                  
                  ⁢
                  s
                
                +
                1
              
              )
            
          
        
        -
        
          
            
              T
              CMD
            
            
              K
              e
            
          
          ⁢
          
            ω
            e
          
          ⁢
          
            L
            q
          
        
      
    
    ,
  


wherein
V is the voltage magnitude applied to the motor,
Vq is a quadrature axis vector component of a motor voltage in phase with a motor back electromotive force (BEMF);
Vd is a d-axis vector component of the motor voltage that is 90 degrees out of phase with the motor BEMF;
δ is the phase advance angle, which is an angle of the applied voltage relative to the BEMF in radians;
Lq and Ld are stator q-axis and d-axis inductances in Henries, respectively,
R is a motor circuit resistance in Ohms, including a motor stator and controller hardware,
Ke is a motor voltage constant in voltage per radian per second,
(ωm is a rotor mechanical velocity in radian per second,
(ωe is a rotor electrical velocity in radian per second,
Id_des is a direct axis current in amperes,
TCMD is the torque command in Newton meter, and
s is a Laplace operator.

18. The method of claim 17, wherein the rotor mechanical velocity corn is the rotational velocity of the motor, wherein the electrical velocity toe is calculated by multiplying the mechanical velocity C0m by a number of poles of the motor, and dividing a product of the mechanical velocity C0m and the number of poles by two.