# Patent

## Title
Detection of offset errors in phase current measurement for motor control system

## Abstract

A system for detecting offset error in a power steering system comprises a programmable high pass filter module configured to filter a final voltage command and generate a filtered final voltage command that includes the sinusoidal component, a gain and phase compensation module configured to perform a gain compensation and a phase compensation on the filtered final voltage command to generate a compensated final voltage command; and an error detection module configured to determine an offset of the compensated final voltage command in a stator reference frame.

## Background
BACKGROUND OF THE INVENTION
Electric Power Steering (EPS) systems require the electric motor used to provide steering assist to be operated using a method of torque control. When using a Permanent Magnet Synchronous Machine (PMSM), Field Oriented Control (FOC) may be utilized. FOC transforms the AC phase motor voltage and current signals in the stationary reference frame to the synchronously rotating reference frame, commonly referred to as the d/q axis reference frame, in which the motor voltages and currents become direct current (DC) quantities. FOC torque control is commonly implemented through a closed loop current control method that employs current regulators to minimize the error between commanded and measured currents to achieve perfect current tracking. Thus, current control requires the motor currents to be measured, which may be achieved by measuring the phase currents of the electric machine, which are then transformed into the synchronous frame via the Park Transform to perform the control in the synchronous reference frame.
When an offset error of a given magnitude occurs in a phase current measurement, the closed loop current control operating in the synchronous reference frame adjusts the motor voltage so that the measurement of motor current matches the command. Since the measurement is incorrect, the actual motor currents are also incorrect. The failure mode results in motor position dependent motor torque and current errors, which may be perceived as a large torque ripple at the motor shaft, and potentially larger than rated motor currents (for the hardware design). When the torque ripple caused by the phase current measurement offset error exceeds a certain threshold, the offset error can produce motor torque in the opposite direction from the motor torque command. When used in EPS systems, failures which produce torque in a direction opposite to the desired motor torque command result in efforts above manual from the driver.
SUMMARY OF THE INVENTION
A system for detecting current measurement offset error in a power steering system comprises a programmable high pass filter module configured to filter a final voltage command and generate a filtered final voltage command that includes the sinusoidal component, a gain and phase compensation module configured to perform a gain compensation and a phase compensation on the filtered final voltage command to generate a compensated final voltage command; and an error detection module configured to determine an offset of the compensated final voltage command in a stator reference frame.
In another embodiment of the invention, a method for detecting current measurement offset error in a power steering system comprises determining a voltage difference of a reference voltage command and a final voltage command in a rotor reference frame, the voltage difference includes a constant component and a sinusoidal component; filtering the voltage difference to generate a filtered voltage difference that includes the sinusoidal component; performing a gain compensation and a phase compensation on the filtered voltage difference to generate a compensated voltage difference; and determining an offset of the compensated voltage difference in a stator reference frame.
In another embodiment of the invention, a system for detecting current measurement offset error in a power steering system comprises a voltage difference calculation module configured to determine a voltage difference of a reference voltage command and a final voltage command in a rotor reference frame, the voltage difference includes a constant component and a sinusoidal component; a programmable high pass filter module configured to filter the voltage difference and generate a filtered voltage difference that includes the sinusoidal component; a gain and phase compensation module configured to perform a gain compensation and a phase compensation on the filtered voltage difference to generate a compensated voltage difference; and an error detection module configured to determine an offset of the compensated voltage difference in a stator reference frame.
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 one embodiment;
FIG. 2 illustrates a schematic diagram of a phase current measurement diagnostic module in accordance with some embodiments;
FIG. 3 illustrates a schematic diagram of a phase current measurement diagnostic module in accordance with another embodiment;
FIG. 4 depicts plots that illustrate processing results in accordance with some embodiments; and
FIG. 5 illustrates a method of determining an offset error in accordance with one embodiment.



DETAILED DESCRIPTION
Referring now to the Figures, where the invention will be described with reference to specific embodiments, without limiting same, FIG. 1 depicts a block diagram of a torque control module 100 of a poly-phase permanent magnet synchronous machine (PMSM), utilizing phase current measurements in a current control feedback loop in accordance with some embodiments of the invention. As shown, the torque control module 100 includes a motor reference current generator 102, a current regulator module 104, and a current measurement diagnostic module 106. FIG. 1 also depicts a current measurement module 108 and a motor 110.
As used herein, the term “module” or “sub-module” refers to an application specific integrated circuit (ASIC), an electronic circuit, a processor (shared, dedicated, or group) and memory that executes one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that provide the described functionality. When implemented in software, a module or a sub-module can be embodied in memory as a non-transitory machine-readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method. Moreover, the modules and sub-modules shown in the Figures may be combined and/or further partitioned.
The motor reference current generator 102 generates a feedforward voltage command 120 and a current command 122 based on input signals, including a motor torque command 114, a motor velocity 116, a source voltage signal 118, and motor parameters 112. The motor torque command 114 represents a commanded torque value, and may be derived from another torque control module (not shown), or may correspond to a torque value generated by an operator. The motor velocity 116 is an angular speed of the motor 110 measured by a speed sensor (not shown). The speed sensor may include, for example, an encoder and a speed calculation circuit for calculating the angular speed of a rotor of the motor 110 based on a signal received by the encoder. The source voltage signal 118 represents a bridge voltage from a DC power source (not shown).
The motor parameters 112 are estimated values for the motor 110, including, for example, a motor constant Ke (Volt/rad/s), a motor circuit resistance R (Ohm), a direct axis inductance Ld (Henry) and a quadrature axis inductance Lq (Henry).
In some embodiments, the current command 122 generated by the motor reference current generator 102 includes a reference d-axis current command and a reference q-axis current command based on the motor torque command 114, the source voltage signal 118, and the angular speed. The motor reference current generator 102 also calculates the feedforward voltage command 120, which may include a feedforward d-axis voltage command and a feedforward q-axis voltage command. The feedforward voltage command 120 and the current command 122 satisfy the motor torque command 114.
The current regulator module 104 determines a final voltage command 126 based on the feedforward voltage command 120, the current command 122, and the measured motor currents 124. The measured motor currents 124 include a measured d-axis current and a measured q-axis current, which are transformed from the current measurement signals in the stator reference frame.
The feedforward voltage commands are typically different for different types of current regulators designs. It should be understood that the feedforward voltage terms used for the current measurement offset diagnostic implementation may be similar or identical to feedforward voltage terms for motor control using pure static feedforward control. Further, the final voltage commands may be the output of the current regulator. However, the actual voltages applied by the inverter to the motor, or any other suitable voltages, may also be used instead of a final voltage command if a measurement of those voltages is available.
The current regulator module 104 sends the final voltage command 126 to the motor 110 to control the motor. Specifically, in some embodiments, a polar conversion controller (not shown) receives as inputs the d-axis voltage command and the q-axis voltage command. Based on the inputs, the polar conversion controller determines a voltage command and a phase advance angle. A PWM inverter controller (not shown) then receives as input signals the voltage command and the phase advance angle from the polar conversion controller. The PWM inverter controller also receives a rotor angle value of the motor 110 measured by a motor position sensor (not shown). In some embodiments, the PWM inverter controller may include an over-modulation space vector PWM unit that generates three respective duty cycle values. The duty cycle values are used to drive gate drive circuits of an inverter (not shown) that energize phases of the motor 110.
For feedback control purposes, the current measurement module 108 generates measured motor currents 124 based on the actual currents 128 from the motor 110. In some embodiments, the current measurement module 108 includes current measurement sensors that generate the measured motor currents 124 from the actual currents 128 transmitted to the motor 110. The measured motor currents 124 therefore represent the values of phase currents (e.g. two phase, three phase) measured by the current measurement module 108. In some embodiments, the current measurement module 108 converts measured values of the AC phase currents into equivalent measured DC current components, which are a measured d-axis current and a measured q-axis current in the d/q reference frame (rotor reference frame).
In operation, the actual currents 128 may have offset errors in the stationary reference frame. The measured actual currents, including the offset errors in the αβ frame, which is also the stationary frame and represents the phase currents. The stationary reference frame may be expressed according to the following equations:

Iαm=Iα−ΔIα

Iβm=Iβ−ΔIβ

where Iαm and Iβm are the respective measured currents in the stationary reference frame, Iα and Iβ are the actual currents in the stationary reference frame, ΔIα and ΔIβ are the current measurement offset errors expressed in the stationary reference frame. The stationary reference frame may be used to simplify mathematical derivations shown here.
When transformed into the synchronous reference frame, the measured motor currents are in the rotating reference frame and can be expressed as:



  
    
      
        
          
            I
            dm
          
          =
          
          ⁢
          
            
              I
              d
            
            -
            
              Δ
              ⁢
              
                
              
              ⁢
              
                I
                d
              
            
          
        
      
    
    
      
        
          =
          
          ⁢
          
            
              I
              d
            
            -
            
              
                I
                0
              
              ⁢
              
                cos
                ⁡
                
                  (
                  
                    θ
                    -
                    φ
                  
                  )
                
              
            
          
        
      
    
  




  
    
      
        
          
            I
            qm
          
          =
          
          ⁢
          
            
              I
              q
            
            -
            
              Δ
              ⁢
              
                
              
              ⁢
              
                I
                q
              
            
          
        
      
    
    
      
        
          =
          
          ⁢
          
            
              I
              q
            
            -
            
              
                I
                0
              
              ⁢
              
                sin
                ⁡
                
                  (
                  
                    θ
                    -
                    φ
                  
                  )
                
              
            
          
        
      
    
  




  where




  
    
      I
      0
    
    =
    
      
        
          
            
              Δ
              ⁢
              
                
              
              ⁢
              
                I
                α
                2
              
            
            +
            
              Δ
              ⁢
              
                
              
              ⁢
              
                I
                β
                2
              
            
          
        
        ⁢
        
          
        
        ⁢
        and
        ⁢
        
          
        
        ⁢
        φ
      
      =
      
        
          
            tan
            
              -
              1
            
          
          (
          
            
              Δ
              ⁢
              
                
              
              ⁢
              
                I
                β
              
            
            
              Δ
              ⁢
              
                
              
              ⁢
              
                I
                α
              
            
          
          )
        
        .
      
    
  



In operation, the measured motor currents 124 may become equal to the current command 122, resulting in distortion of the actual currents 128. This distortion is propagated through the torque control module 100, causing a d/q offset error between the feedforward voltage command 120 and the final voltage command 126 in the synchronously rotating reference frame. The d/q offset error (rotating reference frame offset error) under the assumption of accurate parameter estimation can be expressed as:

ΔVd=−ΔI0(R cos(θ−φ)+ωe(Lq−Ld)sin(θ−φ))

ΔVq=−ΔI0(R sin(θ−φ)+ωe(Lq−Ld)cos(θ−φ))

where ωe, R, Ld, Lq are synchronous frequency (electrical motor velocity), the motor resistance, d-axis inductance and q-axis inductance respectively. When these voltages are transformed back to the stationary frame, the offset in the voltage signals stationary reference frame remains.
In the stationary reference frame, the voltage offset signals may be expressed as ΔVα, ΔVβ. The voltage offsets ΔVα, ΔVβ in the stationary reference frame contain respective constant components and respective sinusoidal components. The sinusoidal components may be equal to twice a synchronous frequency of the motor and generally has a small effect on the stationary reference frame offsets ΔVα, ΔVβ.
The d/q voltage offsets contain a constant term in addition to the sinusoidal term due to parameter errors, which transform into sinusoidal components when transformed into the stationary frame. Furthermore, depending on the specific parameter, these terms may be functions of the synchronous frequency, and become larger in magnitude with increasing speed.
The current measurement diagnostic module 106 removes the constant component of the d/q voltage offsets to increase the accuracy of the error condition detection after transformation into the stationary reference frame.
Specifically, the current measurement diagnostic module 106 determines whether the measured motor currents 124 generated by the current measurement module 108 represent correct measurements. That is, the current measurement diagnostic module 106 determines whether one or more of the phase current measurement sensors of the current measurement module 108 have an acceptable level of current measurement offset error by analyzing the stationary reference frame voltage offsets ΔVα and ΔVβ.
The current measurement diagnostic module 106 compares the final voltage command 126 with the feedforward voltage commands 120 to determine whether the phase current measurement has a stationary reference frame offset error that is large enough to indicate the sensor disablement or failure. In some embodiments, the current measurement diagnostic module 106 determines that the received voltage commands indicate no offset error in the current measurement. The current measurement diagnostic module 106 generates a diagnostic flag 130 when the stationary reference frame offset errors in the current measurement exceeds a threshold, for example. Diagnostic defects may introduce offset error in phase current measurements. The systems and methods described below increase the robustness of the diagnostic.
FIG. 2 illustrates the current measurement diagnostic module 106 of some embodiments in more detail. As shown, the current measurement diagnostic module 106 includes a programmable high pass filter module 204, a gain and phase compensation module 206, a transformation module 208, and an error detection module 210.
The programmable high pass filter module 204 receives the final voltage command 126. The programmable high pass filter module 204 is configured to filter the final voltage command 126, resulting in a removal of constant components from the final voltage command 126. Accordingly, the programmable high pass filter module 204 is configured to generate a filtered final voltage command 214 that includes the sinusoidal component of the final voltage command 126, without the constant components. Accordingly, the programmable high pass filter module 204 may have a cutoff frequency that proportional to a synchronous frequency ωe of the motor 110 (FIG. 1). The programmable high pass filter module 204 may be programmed based on a calibratable constant value. The calibratable constant value may be tuned to reduce gain and phase error in the sinusoidal voltage component. A transfer function of the programmable high pass filter module 204 may be written as follows:




  
    H
    ⁡
    
      (
      s
      )
    
  
  =
  
    s
    
      s
      +
      
        k
        ⁢
        
          
        
        ⁢
        
          ω
          e
        
      
    
  




where, k is the calibratable constant, which may be tuned to reduce gain and phase error in the sinusoidal component. The programmable high pass filter module 204 may utilize the synchronous frequency ωe and the gain and phase error introduced by the filter is static. Also, with the programmable high pass filter module 204, the calibratable constant k may be independently tuned to ensure minimal distortion of the input signal. The programmable high pass filter module 204 is not limited to the above embodiment. For instance, a higher order filter may be used, so long as the programmable filter removes the constant component of the final voltage command 126.
The filtered final voltage command 214 is sent to a gain and phase compensation module 206. The programmable high pass filter module 204 may introduce magnitude and phase errors to filtered final voltage command 214, requiring a compensation to be performed by the gain and phase compensation module 206. In some embodiments, the gain and phase compensation module 206 includes a first-order unity gain programmable low-pass filter (PLPF) with the following transfer function:




  
    L
    ⁡
    
      (
      s
      )
    
  
  =
  
    
      
        k
        ′
      
      ⁢
      
        ω
        e
      
    
    
      s
      +
      
        
          k
          ′
        
        ⁢
        
          ω
          e
        
      
    
  




The first-order unity gain programmable low-pass filter may compensate filtered final voltage command 214 to restore the gain and phase of the final voltage command 126. The compensation may be performed according to constraint equations written as:

∠H(jωe)−∠L(jωe)=0

|H(jωe)L(jωe)|=1

In other embodiments, the gain and phase compensation module 206 may utilize a second order low-pass filter with a transfer function shown below.




  
    L
    ⁡
    
      (
      s
      )
    
  
  =
  
    
      
        
          k
          ′
        
        2
      
      ⁢
      
        ω
        e
        2
      
    
    
      
        s
        2
      
      +
      
        2
        ⁢
        
          
        
        ⁢
        
          
            ζ
            ⁢
            k
          
          ′
        
        ⁢
        
          ω
          e
        
        ⁢
        s
      
      +
      
        
          k
          ′2
        
        ⁢
        
          ω
          e
          2
        
      
    
  




The second order low-pass filter shown above may allow for more specific transient responses by using two tuning parameters k′ and ζ. The gain and phase compensation will require different k′ and ζ respectively to achieve the steady state specifications, which must be calculated appropriately with the method presented above.
The gain and phase compensation module 206 generates a compensated final voltage command 216 that is sent to a transformation module 208 for processing. Specifically, the transformation module 208 typically utilizes an inverse Park transformation or a similar mathematical transformation to convert the measured phase currents in the DC frame (rotor reference frame, or d/q reference frame) to the AC frame (stator reference frame), simplifying the analysis of the error determination. The output of the transformation module 208 is sent to error detection module 210 as a transformed voltage offset, which is represented in a stator frame. The error detection module 210 determines a magnitude of the transformed voltage offset as compared to a threshold value, for example, in a stator reference frame, and determines whether a current measurement offset error is present.
The current measurement diagnostic module 106 provides diagnostic robustness for high synchronous frequencies, as well as a full spectrum of synchronous frequencies.
The programmable high pass filter module 204 and the gain and phase compensation module 206 may be digitally implemented to mitigate a difference in magnitude and phase of a continuous time filter. The digital implementation of the programmable high pass filter module 204 and the gain and phase compensation module 206 may be based on the synchronous frequency but implemented in a discrete domain, as shown in the following equation, where ωe is a synchronous frequency of a motor of the power steering system and Ts is a sampling time:




  
    s
    =
    
      
        
          ω
          e
        
        
          tan
          (
          
            
              
                ω
                e
              
              ⁢
              
                T
                s
              
            
            2
          
          )
        
      
      ⁢
      
        
          1
          -
          
            z
            
              -
              1
            
          
        
        
          1
          +
          
            z
            
              -
              1
            
          
        
      
    
  
  ,




Although the programmable high pass filter module 204 is a first order filter in FIG. 2, it is further contemplated and understood that the programmable high pass filter module 204 may of higher order, a second order filter for example.
FIG. 3 illustrates a phase current measurement diagnostic module of another embodiment in more detail. As shown, the phase current measurement diagnostic module 106A includes a voltage difference calculation module 302, a programmable high pass filter module 304, a gain and phase compensation module 306, a transformation module 308, and an error detection module 310.
The voltage difference calculation module 302 calculates a voltage difference 312 based on the feedforward voltage command 120 and the final voltage command 126. In some embodiments, the voltage difference 312 is represented in the d/q domain as a d/q offset, by determining the feedforward voltage command 120 and the final voltage command 126. The voltage difference 312 may have a constant component and a sinusoidal component, both of which are represented in the d/q reference frame.
The programmable high pass filter module 304 receives the voltage difference 312. The programmable high pass filter module 304 is configured to filter the voltage difference 312, resulting in a removal of the constant component. Accordingly, the programmable high pass filter module 304 is configured to generate a filtered voltage difference 314 that includes the sinusoidal component of the voltage difference 312, without the constant component. Accordingly, the programmable high pass filter module 304 may have a cutoff frequency that proportional to a synchronous frequency ωe of the motor 110 (FIG. 1). The programmable high pass filter module 304 may be programmed based on a calibratable constant value. The calibratable constant value may be tuned to reduce gain and phase error in the sinusoidal voltage component. A transfer function of the programmable high pass filter module 304 may be written as follows:




  
    H
    ⁡
    
      (
      s
      )
    
  
  =
  
    s
    
      s
      +
      
        k
        ⁢
        
          
        
        ⁢
        
          ω
          e
        
      
    
  




where, k is the calibratable constant, which may be tuned to reduce gain and phase error in the sinusoidal component. The programmable high pass filter module 304 may utilize the synchronous frequency ωe and the gain and phase error introduced by the filter is static. Also, with the programmable high pass filter module 304, the calibratable constant k may be independently tuned to ensure minimal distortion of the input signal. The programmable high pass filter module 304 is not limited to the above embodiment. For instance, a higher order filter may be used, so long as the programmable filter removes the constant component of the voltage difference 312.
The filtered voltage difference 314 is sent to a gain and phase compensation module 306. The programmable high pass filter module 304 may introduce magnitude and phase errors to filtered voltage difference 314, requiring a compensation to be performed by the gain and phase compensation module 306. In some embodiments, the gain and phase compensation module 306 includes a first-order unity gain programmable low-pass filter (PLPF) with the following transfer function:




  
    L
    ⁡
    
      (
      s
      )
    
  
  =
  
    
      
        k
        ′
      
      ⁢
      
        ω
        e
      
    
    
      s
      +
      
        
          k
          ′
        
        ⁢
        
          
        
        ⁢
        
          ω
          e
        
      
    
  




The first-order unity gain programmable low-pass filter may compensate filtered voltage difference 314 to restore the gain and phase of the voltage difference 312. The compensation may be performed according to constraint equations written as:

∠H(jωe)−∠L(jωe)=0

|H(jωe)L(jωe)|=1

In other embodiments, the gain and phase compensation module 306 may utilize a second order low-pass filter with a transfer function shown below.




  
    L
    ⁡
    
      (
      s
      )
    
  
  =
  
    
      
        
          k
          ′
        
        2
      
      ⁢
      
        ω
        e
        2
      
    
    
      
        s
        2
      
      +
      
        2
        ⁢
        
          
        
        ⁢
        
          ζk
          ′
        
        ⁢
        
          ω
          e
        
        ⁢
        s
      
      +
      
        
          k
          ′2
        
        ⁢
        
          ω
          e
          2
        
      
    
  




The second order low-pass filter shown above may allow for more specific transient responses by using two tuning parameters k′ and ζ. The gain and phase compensation will require different ζ and k′ respectively to achieve the steady state specifications, which must be calculated appropriately with the method presented above.
The gain and phase compensation module 306 generates a compensated voltage difference 316 that is sent to a transformation module 308 for processing. Specifically, the transformation module 308 typically utilizes an inverse Park transformation or a similar mathematical transformation to convert the measured phase currents in the DC frame (rotor reference frame, or d/q reference frame) to the AC frame (stator reference frame), simplifying the analysis of the error determination. The output of the transformation module 308 is sent to error determination module 310 as a transformed voltage offset, which is represented in a stator frame. The error detection module 310 determines a magnitude of the transformed voltage offset as compared to a threshold value, for example, in a stator reference frame. The error detection module 310 may determine whether a current measurement offset error exists based on the transformed voltage offset.
The phase current measurement diagnostic module 106A provides diagnostic robustness for high synchronous frequencies, as well as a full spectrum of synchronous frequencies.
The programmable high pass filter module 304 and the gain and phase compensation module 306 may be digitally implemented to mitigate a difference in magnitude and phase of a continuous time filter. The digital implementation of the programmable high pass filter module 304 and the gain and phase compensation module 306 may be based on the synchronous frequency but implemented in a discrete domain, as shown in the following equation:




  s
  =
  
    
      
        ω
        e
      
      
        
          ta
          ⁢
          n
        
        (
        
          
            
              ω
              e
            
            ⁢
            
              T
              s
            
          
          2
        
        )
      
    
    ⁢
    
      
        
          1
          -
          
            z
            
              -
              1
            
          
        
        
          1
          +
          
            z
            
              -
              1
            
          
        
      
      .
    
  




FIG. 4 shows two plots, a first plot 402 illustrates Vd, and Vq under the presence of a current measurement offset error. A result of the processing by the current measurement diagnostic module 106 (e.g. FIG. 3) is shown at second plot 404. As can be appreciated, the phase current offset show up as voltage offsets in Vα and Vβ.
FIG. 5 is a flow diagram for a control method that can be performed by the torque control module 100 (FIG. 1) in accordance with some embodiments of the invention.
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. 5, but may be performed in one or more varying orders as applicable and in accordance with the present disclosure.
At block 510, the torque control module 100 determines a voltage difference of a reference voltage command and a final voltage command in a rotor reference frame. The final voltage difference includes a constant component and a sinusoidal component. At block 520, the torque control module 100 filters the final voltage difference to generate a filtered final voltage difference that includes the sinusoidal component.
At block 530, the torque control module 100 performs a gain compensation and a phase compensation on the filtered final voltage difference to generate a compensated final voltage difference. The phase compensation may restore the gain and phase of the voltage difference with a first or second order filter, for example.
At block 540, the torque control module 100 determines an offset of the compensated final voltage difference in a stator reference frame. The torque control module 100 may also send the direct-axis voltage signal and the quadrature-axis voltage signal to the motor to control the motor. In some embodiments, the torque control module 100 causes a status indicating the correctness or incorrectness of the current measurement to be displayed. For instance, torque control module 100 outputs the status to an operator or a technician for diagnosing the motor current sensor functioning.
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 system for detecting offset error in a power steering system, the system comprising:
a control module that generates a final voltage command for a motor in response to an operator command;
a programmable high pass filter module that filters the final voltage command and generates a filtered final voltage command that includes a sinusoidal component using a transfer function based on a synchronous motor frequency and a calibratable constant, the calibratable constant being tuned to reduce a magnitude and phase error of the sinusoidal component;
a gain and phase compensation module that performs a gain compensation and a phase compensation on the filtered final voltage command to generate a compensated final voltage command;
an error detection module that determines a current measurement offset error based on the compensated final voltage command in a stator reference frame; and
a transformation module that performs an inverse park transform on the compensated final voltage command to transform the compensated final voltage command to the stator reference frame, wherein the compensated final voltage command causes the motor to generate a corresponding amount of torque.

2. The system of claim 1, at least one of the gain compensation and the phase compensation is performed with a first order filtering technique that utilizes a transfer function, the transfer function is written as:




  
    
      L
      ⁡
      
        (
        s
        )
      
    
    =
    
      
        
          k
          ′
        
        ⁢
        
          ω
          e
        
      
      
        s
        +
        
          
            k
            ′
          
          ⁢
          
            ω
            e
          
        
      
    
  
  ,



where ki is a constant value and ωe is a synchronous frequency of a motor of the power steering system.

3. The system of claim 1, the gain compensation and the phase compensation are performed in a discrete domain.

4. The system of claim 3, the gain compensation and the phase compensation implemented in a discrete domain according to:




  
    s
    =
    
      
        
          ω
          e
        
        
          tan
          (
          
            
              
                ω
                e
              
              ⁢
              
                T
                s
              
            
            2
          
          )
        
      
      ⁢
      
        
          1
          -
          
            z
            
              -
              1
            
          
        
        
          1
          +
          
            z
            
              -
              1
            
          
        
      
    
  
  ,



ωe is a synchronous frequency of a motor of the power steering system and Ts is a sampling time.

5. The system of claim 1, the current measurement offset error is further determined based on the final voltage command in a rotor reference frame.

6. A method for detecting offset error in a power steering system, the method comprising:
generating a final voltage command for a motor of the power steering system in response to an operator command;
determining a voltage difference of a reference voltage command and the final voltage command in a rotor reference frame, the voltage difference includes a constant component and a sinusoidal component;
filtering the voltage difference to generate a filtered voltage difference that includes the sinusoidal component using a transfer function based on a synchronous motor frequency and a calibratable constant, the calibratable constant being tuned to reduce a magnitude and phase error of the sinusoidal component;
performing a gain compensation and a phase compensation on the filtered voltage difference to generate a compensated voltage difference;
transforming the compensated voltage difference to a stator reference frame using an inverse park transform; and
determining a current measurement offset error based on the compensated voltage difference in a stator reference frame, wherein the compensated voltage difference causes the motor to generate a corresponding amount of torque.

7. The method of claim 6, at least one of the gain compensation and the phase compensation is performed with a first order filtering technique that utilizes a transfer function, the transfer function is written as:




  
    
      L
      ⁡
      
        (
        s
        )
      
    
    =
    
      
        
          k
          ′
        
        ⁢
        
          ω
          e
        
      
      
        s
        +
        
          
            k
            ′
          
          ⁢
          
            ω
            e
          
        
      
    
  
  ,



where ki is a constant value and ωe is a synchronous frequency of a motor of the power steering system.

8. The method of claim 6, the gain compensation and the phase compensation are performed in a discrete domain.

9. The method of claim 6, a transformed voltage offset is based on the difference of a feedforward voltage command and the final voltage command in a rotor reference frame, the current measurement offset is determined at least in part on the transformed voltage offset.

10. The method of claim 9, wherein an error flag signal is generated based on a magnitude of the current measurement offset error.

11. A power steering system comprising:
a control module to generate a final voltage command for a motor in response to an operator command;
a voltage difference calculation module to determine a voltage difference of a reference voltage command and the final voltage command in a rotor reference frame, the voltage difference includes a constant component and a sinusoidal component;
a programmable high pass filter module to filter the voltage difference and generate a filtered voltage difference that includes the sinusoidal component using a transfer function based on a synchronous motor frequency and a calibratable constant, the calibratable constant being tuned to reduce a magnitude and phase error of the sinusoidal component;
a gain and phase compensation module to perform a gain compensation and a phase compensation on the filtered voltage difference to generate a compensated voltage difference;
a transformation module to perform an inverse park transform on the compensated voltage difference to transform the compensated voltage difference to a stator reference frame; and
an error detection module configured to determine an offset of the compensated voltage difference in a stator reference frame, wherein the compensated voltage difference causes the motor to generate a corresponding amount of torque.

12. The power steering system of claim 11, at least one of the gain compensation and the phase compensation is performed with a first order filtering technique that utilizes a transfer function, the transfer function is written as:




  
    
      L
      ⁡
      
        (
        s
        )
      
    
    =
    
      
        
          k
          ′
        
        ⁢
        
          ω
          e
        
      
      
        s
        +
        
          
            k
            ′
          
          ⁢
          
            ω
            e
          
        
      
    
  
  ,



where ki is a constant value and ωe is a synchronous frequency of a motor of the power steering system.

13. The power steering system of claim 11, the gain compensation and the phase compensation are performed in a discrete domain.

14. The power steering system of claim 13, the gain compensation and the phase compensation implemented in a discrete domain according to:




  
    s
    =
    
      
        
          ω
          e
        
        
          tan
          (
          
            
              
                ω
                e
              
              ⁢
              
                T
                s
              
            
            2
          
          )
        
      
      ⁢
      
        
          1
          -
          
            z
            
              -
              1
            
          
        
        
          1
          +
          
            z
            
              -
              1
            
          
        
      
    
  
  ,




ωe is a synchronous frequency of a motor of the power steering system and Ts is a sampling time.

15. The power steering system of claim 11, the offset is further determined based on the final voltage command in a rotor reference frame.