IDENTIFICATION AND CLASSIFICATION OF CURRENT AMPLIFICATION FAULTS AND RESISTANCE INCREASE IN A CURRENT REGULATION SYNCHRONOUS MOTOR DRIVE

DE102024129014A1Pending Publication Date: 2025-04-10STEERING SOLUTIONS IP HOLDING CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
DE102024129014
Authority / Receiving Office
DE · DE
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-10-10
Filing Date
2024-10-08
Publication Date
2025-04-10

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

A method for detecting and distinguishing a current-sensing gain error and a resistance imbalance in a motor drive system includes: determining a first voltage command signal, a first motor position signal, and a first quadrature-axis current command when the motor is rotating at a first speed; calculating, based on the first voltage command and motor position signals, a first demodulated voltage signal; determining a second voltage command signal, a second motor position signal, and a second quadrature-axis current command while the motor is rotating at a second speed different from the first speed; and calculating, based on the second voltage command and the motor position signals, a second demodulated voltage signal.and calculating a resistance imbalance flag, which indicates a resistance imbalance, and a current gain error flag, which indicates a current sensing gain error.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELDThis disclosure relates to electric motor drives and, more particularly, to detecting and distinguishing between scaling errors in current measurement and resistance imbalance in a synchronous motor drive system operating with current regulation.BACKGROUND OF THE INVENTIONA vehicle, such as a car, truck, sport utility vehicle, crossover, mini-van, watercraft, aircraft, sport utility vehicle, recreational vehicle, or other suitable means of transportation, typically includes a steering system, such as an electronic power steering (EPS) system, steer-by-wire (SbW) steering system, hydraulic steering system, or other suitable steering system. The steering system and / or other features of the vehicle may include one or more electric motors. Such electric motors may include synchronous motors, such as permanent magnet synchronous motors (PMSM).Safety-critical, high-performance, and fault-tolerant applications with PMSM drives, such as electric steering and vehicle drives, to name a few, require smart diagnostic algorithms that not only detect problems in different parts of the motor drive system, but can also distinguish between different non-idealities or faults with possibly similar signatures.Synchronous machines in current control operation generate current and voltage harmonics at twice the synchronous frequency in response to an imbalance in the interphase resistance and error in the gain (scaling) of the current sensor. Due to the similarity of the signatures of these two non-idealities, the development of algorithms that use different signals to detect or distinguish between the presence of the two problems turns out to be difficult, especially if they both occur simultaneously.SUMMARY OF THE INVENTIONThis disclosure relates generally to control of electric motors.One aspect of the disclosed embodiments includes a method for detecting and distinguishing a current sense gain error and a resistance imbalance in a motor drive system. The method includes: determining, for a motor, a first voltage command signal, a first motor position signal, and a first quadrature axis current command when the motor rotates at a first speed; calculating, based on the first voltage command signal and the first motor position signal, a first demodulated voltage signal; determining a second voltage command signal, a second motor position signal, and a second quadrature axis current command when the motor rotates at a second speed different than the first speed; calculating, based on the second voltage command signal and the second motor position signal, a second demodulated voltage signal; and calculating, based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command and the second quadrature axis current command, a resistance imbalance flag and a current gain error flag. The resistance imbalance flag has a non-zero value in response to a resistance imbalance in the motor and remains unaffected by a current sense gain error. The current gain error flag has a non-zero value in response to a current sense gain error and remains unaffected by resistance imbalance in the motor.Another aspect of the disclosed embodiments includes an electronic controller. The electronic controller includes a processor and a memory. The memory includes instructions that, when executed by the processor, cause the processor to: determine, for a motor, a first voltage command signal, a first motor position signal, and a first quadrature axis current command when the motor rotates at a first speed; calculate, based on the first voltage command signal and the first motor position signal, a first demodulated voltage signal; determine a second voltage command signal, a second motor position signal, and a second quadrature axis current command when the motor rotates at a second speed different than the first speed; calculate, based on the second voltage command signal and the second motor position signal, a second demodulated voltage signal; and calculating, based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command and the second quadrature axis current command, a resistance imbalance flag and a current gain error flag. The resistance imbalance flag has a non-zero value in response to a resistance imbalance in the motor and remains unaffected by a current sense gain error. The current gain error flag has a non-zero value in response to a current sense gain error and remains unaffected by resistance imbalance in the motor.Another aspect of the disclosed embodiments includes a system for detecting and distinguishing current sense gain error and resistance imbalance in a motor drive system. The system includes a controller configured to: determine, for a motor, a first voltage command signal, a first motor position signal, and a first quadrature axis current command when the motor rotates at a first speed; calculate, based on the first voltage command signal and the first motor position signal, a first demodulated voltage signal; determine a second voltage command signal, a second motor position signal, and a second quadrature axis current command when the motor rotates at a second speed different than the first speed; calculate, based on the second voltage command signal and the second motor position signal, a second demodulated voltage signal; and based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command, and the second quadrature axis current command, calculating a resistance imbalance flag and a current gain error flag, respectively.The resistance imbalance flag has a non-zero value in response to a resistance imbalance in the motor and remains unaffected by a current sense gain error. The current gain error flag has a non-zero value in response to a current sense gain error and remains unaffected by resistance imbalance in the motor.These and other aspects of the present disclosure are disclosed in the following detailed description of the embodiments, the appended claims, and the accompanying drawings.BRIEF DESCRIPTION OF THE DRAWINGSThe disclosure will be best understood from the following detailed description when read in conjunction with the accompanying drawings. It is emphasized that the various features of the drawings are not to scale according to common practice. On the contrary, the dimensions of the various features are arbitrarily expanded or reduced for clarity. FIG. 1 generally illustrates a current-controlled electric motor drive system having a non-ideal operation detector in accordance with the principles of the present disclosure. FIG. 2 illustrates a synchronous motor drive system under current control in the presence of both current sensor gain errors and resistance imbalance, in accordance with the principles of the present disclosure. FIG. 3 is a block diagram showing the hardware components of an electric motor drive system according to aspects of the present disclosure. FIG. 4 is a flow chart generally illustrating a method for detecting and distinguishing current sense gain error and resistance imbalance in a motor drive system according to the principles of the present disclosure.DETAILED DESCRIPTIONThe following discussion relates to various embodiments of the disclosure. Although one or more of these embodiments may be preferred, the disclosed embodiments should not be interpreted or otherwise used as limiting the scope of the disclosure, including the claims. Moreover, one skilled in the art will understand that the following description has a broad scope of application and the discussion of an embodiment is intended only as an example of this embodiment and does not mean that the scope of the disclosure, including the claims, is limited to this embodiment.The present disclosure uses a ^ (hat) to indicate estimated parameters, a * (asterisk) to indicate an instruction parameter, and a -( bar) to indicate a vector parameter.The present disclosure provides a detailed mathematical model for synchronous motor drives that considers both problems simultaneously and explains the specific effects of each problem and its relative dominance on signals in different operating ranges to enable their identification and separation. The present disclosure also provides a strategy for differentiating between different fault types (current gain / resistance imbalance / both) in a range of operating conditions.The present disclosure provides an algorithm that detects the presence of resistance imbalance and / or current sense gain errors during runtime in the vehicle. The systems and methods of the present disclosure may serve as a diagnostic to take the necessary actions after the fault is detected, such as generating a corresponding fault message and / or utilizing a fallback or redundant set of motor windings and / or current sensors, depending on the type of fault identified.FIG. 1 generally illustrates a synchronous motor drive system 100 with current regulation in accordance with the principles of the present disclosure. The system 100 may include a current command generator 112, a current regulator 114, a commutation controller 106, a gate driver 107, an inverter 104, a motor 102, a current sensor 110, a current estimator 118, a position estimator 116, and a position sensor 108.In some embodiments, current regulator 114, commutation controller 106, gate driver 107, inverter 104, motor 102, current sensor 110, and current estimator 118 form a current control system. It should be appreciated that fewer or more components may be included in the system 100 to perform the techniques disclosed herein, as desired, and that the illustrated components are for explanatory purposes only.In some embodiments, the synchronous motor drive system 100 may operate as follows. The current regulator 114 receives a command or reference current and outputs a corresponding voltage command signal. The position sensor 108 may be configured to detect a position of the motor 102. The position sensor 108 may communicate the detected position to the position estimator 116. The position estimator 116 may estimate one or more positions of the motor 102 based on the position sensed by the position sensor 108.Having described the foregoing, additional details and operation of the system 100 will now be discussed. The motor 102 may generate a rotational or linear force used to power a machine, such as those described herein. The motor 102 may include a synchronous motor, such as a PMSM or other suitable motor. The system 100 may selectively control the electrical energy provided to the motor 102. The system 100 may provide electrical energy to the motor 102 in varying amounts and at varying frequencies, and thereby indirectly control the speed and torque of the motor 102.Current sensor 110 may include any suitable current sensor configured to sense or measure an electric current in a circuit. Current sensor 110 may provide signals indicative of the current to current estimator 118. The current sensor 110 may be configured to receive the signals indicative of the current and measure the amount of current output by the motor 102 (e.g., based on the current indicated by the signals). The current estimator 118 may be configured to either transmit the stationary frame currents of the motor 102 or convert the measured current to a synchronous reference frame using a position estimate from the position estimator 116 of the motor 102.The current command generator 112 may receive a torque command. the current command generator 112 may generate a commanded current based on the torque command. The current command I* may be composed of a direct axis (direct axis) and a quadrature axis (quadrature axis). The current regulator 114 receives the commanded current and transmits a voltage command signal to the commutation controller 106. The voltage command V* may be composed of a direct axis component and a quadrature axis component. The commutation controller 106 may control a portion of time in which the output voltage signal is high compared to when it is low for a constant period of time, whereby a direction and speed of the motor 102 may be controlled. The gate driver 107 receives one or more signals from the commutation controller 106 and uses this one or more signals to control a conductive state of one or more switches within the inverter 104. Inverter 104 may include a voltage source inverter or other suitable inverter and may be configured to vary the frequency of the electrical supply energy provided to motor 102 to control the speed of motor 102. The motor 102 may receive an output voltage signal V abe as input (which may include, e.g., V a, V b and V c ). The motor 102 may use the input to generate an amount of current I abc, as output (which may include, e.g., I a, I b and I c ) that may be equal to or deviate from the commanded current (e.g., when there is a current harmonic).The current I abc output by the motor 102 may be sensed by the current sensor 110 to determine a measured current. The current estimator 118 may receive the measured current and determine the estimated current Lithographically. The current estimator 118 outputs the estimated current Lithographically dq to the current regulator 114. Accordingly, a closed loop is used by system 100 as shown. However, as discussed above, in some cases the measured current may be incorrect due to degradation of the circuit, drift, or the like.The current regulator 114 may receive the estimated current and compare it to the commanded current. If there is a deviation, the current regulator 114 may transmit an output voltage command signal that causes the estimated current Lithographically dq to nearly match the commanded current. Since the commanded current is constant (or varies slowly) and the estimated current Lithographically equals the commanded current, the estimated current Lithographically dq is then also constant. When current harmonics are present in the current measurement system, the current regulator 114 may include a pulsating component in the output voltage command signal.In some embodiments, and as shown in FIG. 1, synchronous motor drive system 100 also includes a non-ideal operation detector 122 configured to determine one or more of a resistance imbalance in motor 102 and / or a current sense gain error of current sensor 110. Non-ideal operation detector 122 takes as input the output voltage command signal from current regulator 114. The non-ideal operation detector 122 may generate one or more output signals indicative of the presence and / or characteristics of a resistance imbalance and / or a current sense gain error.A mathematical model 200 for current regulation in the presence of both a current gain error and a resistance imbalance is shown in FIG. 2. Mathematical model 200 includes a first subtractor 202 that takes a command current having direct axis and quadrature axis components and that supplies a difference signal to a forward path current controller 204, also designated C. The forward path current controller 204 may implement a transfer function C(s) that may be defined as follows:Mathematical model 200 also includes a BEMF compensator 206, also referred to as that which generates a back EMF compensation voltage signal that compensates for the back EMF generated in motor 102. The BEMF compensator 206 may generate the back EMF compensation voltage signal having direct axis and quadrature axis components, and may be defined as follows: The mathematical model 200 also includes a first adder 208 that adds an output of the forward path current controller 204 to the back EMF compensation voltage signal to generate a voltage command signal having direct axis and quadrature axis components and that represents a voltage command to the inverter 104.Mathematical model 200 also includes an inverter model 210, also referred to as A, that calculates an actual voltage signal based on the voltage command signal and models a delay caused by the operation of inverter 104. The voltage generation model 210 may be defined as follows: where T p represents a propagation delay.The mathematical model 200 also includes a plant model 212, 214, 216, 218, 220 that together models operation of the motor 102 to determine an actual current signal based on the actual voltage signal. The plant model 212, 214, 216, 218, 220 includes a resistance imbalance model 212, also called N, that generates a signal representing noise due to imbalance in the resistances of the stator windings of the motor 102. The resistance imbalance model 212 may be defined as: where K r is a magnitude of the resistance imbalance and φ r is a resistance imbalance angle that represents an angle of the resistance imbalance error and that may be used to indicate one or more specific stator windings that have a resistance imbalance. The plant model 212, 214, 216, 218, 220 also includes a second subtractor 214 that subtracts an output of the resistance imbalance model 212 from the actual voltage signal.The plant model 212, 214, 216, 218, 220 also includes a BEMF model 216 that models back EMF effects of the engine 102. The BEMF model 216 may be defined as follows: The plant model 212, 214, 216, 218, 220 also includes a third subtractor 218 that subtracts an output of the BEMF model 216 from the output of the second subtractor 214.The plant model 212, 214, 216, 218, 220 also includes a plant winding model 220, also designated P. The controlled-path winding model 220 takes as input the output of the third subtractor 218 and calculates the actual current signal DasControlled-route winding model 220 may implement a transfer function P(s), which may be defined as follows:Mathematical model 200 also includes a current measurement model 222, 224, 226 that together models the operation of the current sensor to determine a measured current signal based on the actual current signal. The current measurement model 222, 224, 226 includes a position independent model 222, also referred to as J+M s. The position independent sensor model 222 takes the actual current signal and calculates a position independent measured current signal that does not vary with the position of the motor 102. The position-independent sensor model 222 may be defined as follows: The current measurement model 222, 224, 226 also includes a position-dependent sensor model 224, also referred to as M p. The position dependent sensor model 224 takes the actual current signal and calculates a position dependent measured current signal that varies with the position of the motor 102. The position dependent sensor model 224 may be defined as follows:using the fault phase due to current sense gain errors φ gp to indicate one or more specific phases having a current sense fault. The current measurement model 222, 224, 226 also includes a second adder 226 that adds the position independent measured current signal and the position dependent measured current signal from the position independent sensor model 222 and the position dependent sensor model 224, respectively, to produce the measured current signal.In some embodiments, the system of the present disclosure may include a controller 150, as generally illustrated in FIG. 3. The controller 150 may include any suitable controller, such as an electronic control unit or other suitable controller. The controller 150 may be configured to control, for example, the various functions of the steering system and / or various functions of a vehicle. The controller 150 may include a processor 152 and a memory 154. Processor 152 may include any suitable processor, such as those described herein. Additionally or alternatively, the controller 150 may include any number of processors, in addition to or different from the processor 152. The memory 154 may comprise a single disk or a plurality of disks (e.g., hard disks) and includes a memory management module that manages one or more partitions within the memory 154. In some embodiments, the memory 154 may include flash memory, solid state memory (semiconductor memory), or the like. The memory 154 may include random access memory (RAM), read only memory (ROM), or a combination thereof. The memory 154 may include instructions that, when executed by the processor 152, cause the processor 152 to control at least various aspects of the vehicle. Additionally or alternatively, the memory 154 may include instructions that, when executed by the processor 152, cause the processor 152 to perform functions associated with the systems and methods described herein.The controller 150 may be operatively connected to an electric actuator 156. The electric actuator 156 may include the motor 102 and the inverter 104. The controller 150 may be configured to command the inverter to drive the motor 102 to rotate at a particular speed or produce a particular amount of torque. The controller 150 may receive one or more signals from the electric actuator 156, such as signals indicative of the voltages applied to the motor 102. In some embodiments, the electric actuator 156 may include the position sensor 108, which may be configured to measure a rotational position of the motor 102.Alternatively or additionally, the electric actuator 156 may include the current sensor 110, which may measure phase currents of one or more conductors between the inverter 104 and the motor 102. In some embodiments, the electric actuator 156 may include one or more other sensors, such as one or more torque sensors or devices, one or more hand wheel position sensors or devices, one or more motor position sensors or devices, one or more position sensors or devices, other suitable sensors or devices, or a combination thereof.In some embodiments, the controller 150 may perform the methods described herein. However, the methods described herein as executed by the controller 150 are not to be understood as limiting, and any type of software executed on a controller or processor may execute the methods described herein without departing from the scope of this disclosure. For example, a controller, such as a processor, executing software within a computing device may perform the methods described herein.To understand and differentiate the errors and to develop and implement corresponding detection and mitigation techniques in a stable manner, it is instructive to develop a detailed mathematical model for the concurrent occurrence of both a current sense gain error and a resistance imbalance.Analytical Modeling - Resistance imbalanceA mathematical model for resistance imbalance in PMSMs in the synchronous or dq reference frame is given in equation set (1): where V represents an actual voltage applied to the stator windings of motor 102, which may also be written as P -1 is the inverse open loop model; I is the actual current signal, which may also be written as follows: E is a BEMF model representing the voltage generated by the back EMF in motor 102; N is a noise transfer function that describes the effect of imbalance in phase resistances in motor 102; L d and L g are direct axis and quadrature axis inductances, respectively; R is a rated winding resistance of the motor 102, ω e is an electric speed, s is a derivative operator that can be discretized based on a closed loop implementation; ω e, and θ e are the electric speed and the electric position, respectively, λ m is the PM flux linkage, K r represents the magnitude of error in the voltage command due to imbalance of the phase resistance; φ r represents a phase of the error introduced due to imbalance in the phase resistances; ΔRx represents the deviation (imbalance) of the resistance of phase x from the rated winding resistance R of the motor 102; and ΔR y represents the deviation (imbalance) of the resistance of phase y from the rated winding resistance R of the motor 102. The indices x, y, and z may refer to phases a, b, and c, respectively, of the motor 120.Analytical Modeling - Current Measurement Gain Error (Scaling Error)The measured motor phase currents with only gain errors in the current measurement (i.e., without any phase resistance imbalance) may be written as follows: where I x and I xm represent the actual and measured currents for phase x, while ΔK gx represents the gain error in the measurement.Synchronous frame current estimates with respect to the actual motor currents for gain errors K gx for phase x are modeled as provided in equation set (2): where gp is the measured dq current matrix; I is the actual dq current matrix, φ gp represents an error phase due to current sense gain errors; K represents an error magnitude due to current sense gain errors; and inverse matrices of M s and M, respectively. M are p.Combined AnalysisUsing feedback current control, the gain error of the current measurement and the resistance imbalance modulate and manifest themselves in different signals in a (mathematically) complex manner. Assuming that high bandwidth current regulation is employed, the estimated current may be approximately equal to the commanded currents to obtain the actual currents according to equation (3): where the estimated current is I* is the current command, I is the actual current, a transfer matrix for a static (i.e., position independent) term, and a transfer matrix for a position dependent term.The voltage commands that can be assumed to correspond to the actual voltage signal can be calculated as shown in equation (4): where V* is the voltage command, V is the actual voltage applied to the windings of the motor 102, P -1 is the inverse plant model, E is the BEMF model 216, and N is the noise transfer function due to the resistance imbalance model 212.By expanding equation (4), the voltage signal can be decomposed into three separate terms as shown in equation set (5): where V DC is a constant voltage term, Vθis a position-dependent voltage term that varies with position θ of motor 102, Vθωis a position- and speed-dependent voltage term that varies with both position θ and speed ω of motor 102, and Δ g is defined in equation set (2).Demodulation of Ripple Content into Voltage Equations:By demodulating the dq voltage waveforms, the pulsating components unique to imbalance and current sense gain errors can be separated. An inverse frame transform from synchronous frame to biphasic stationary frame at the appropriate frequency of two per electrical revolution is employed as set forth in equation set (6): where V u and V v are demodulated diagnostic voltages and θ e is the electrical position.ERROR DETECTION STRATEGYBased on the equation set (6), a resistance imbalance flag A and a current amplification error flag B are defined as set forth in equation (7):The resistance imbalance flag A and the current amplification fault flag B each provide a corresponding fault to be individually identified. The resistance imbalance flag A has a non-zero value in response to a resistance imbalance in the motor 102 and is unaffected by a current sense gain error, and the current gain error flag B has a non-zero value in response to a current sense gain error and is unaffected by a resistance imbalance in the motor 102.To determine the type of errors in the system, the system and method of the present disclosure take into account two operating conditions, one at low speed ω m1 and one at high speed ω m2.At very low speed ω m1= ω e1( i.e., in a first region where motor 102 generates torque that is fixed in speed), direct axis current command 0 and first demodulated voltages V u1, V v1 corresponding to first speed ω e1 may be defined by equation set (8): where ω m1 represents a first mechanical motor speed and ω e1 is a corresponding first motor speed. Normally, torque is plotted in torque-speed curves as a function of mechanical speed, while both mechanical and electrical speed terms can be used in equations. The conversion is ω e= number of pole pairs * ω m.At high speed ω m2= ω e2( i.e., a higher speed than the first mechanical motor speed ω ml and with a direct axis current command) and second demodulated voltages V u2, V v2 corresponding to the second speed ω e2 may be defined by equation set (9):Solving the four equations of equation sets (8) and (9) provides values for each of the four unknown variables (i.e., resistance imbalance flag A, current gain error flag B, current gain error angle φ gp and resistance imbalance angle φ r), as set forth in equation set (10):Once the values for the resistance imbalance flag A and the current amplification fault flag B have been determined, the type of fault can be determined based on the following Table 1:Table 1 Table 100No errorNon-zero Non-zero0Resistance Imbalance Error0Non-zero Non-zeroCurrent Detection Gain ErrorNon-zero Non-zeroNon-zero Non-zeroBoth Resistance Imbalance and Current Sense Gain ErrorsAs indicated in Table 1, a value of zero indicates that neither resistance imbalance fault nor current gain fault is present for both resistance imbalance flag A and current gain fault flag B. A non-zero value of the resistance imbalance flag A and a zero value of the current amplification error flag B indicate that only one resistance imbalance error is present. A zero value of the resistance imbalance flag A and a non-zero value of the current amplification fault flag B indicate that only one current amplification fault is present. A non-zero value of the resistance imbalance flag A and a non-zero value of the current amplification error flag B indicate that both a resistance imbalance error and a current amplification error are present.FIG. 4 is a flow diagram generally illustrating a method 500 for detecting and distinguishing current sense gain error and resistance imbalance in a motor drive system according to the principles of the present disclosure. Method 500 may be performed as part of a dedicated fault diagnostic procedure. Alternatively, the steps of method 500 may be performed during normal operation of a vehicle or other system.At 502, method 500 determines, for a motor, a first voltage command signal, a first motor position signal, and a first quadrature axis current command when the motor is rotating at a first speed. For example, the processor 152 may execute instructions to implement the current regulator 114 to calculate the first voltage command when the motor 102 rotates at the first speed ω ml. The controller 150 may also determine the first motor position signal θ 1. For example, the processor 152 may execute instructions to implement the position estimator 116 to determine the first motor position signal θ 1 based on the estimated position θ̂ e when the motor 102 rotates at the first speed ω m1. In some embodiments, the processor 152 may execute instructions that cause the controller 150 to command the inverter 104 to drive the motor 102 to rotate at the first speed ω m1 which is a relatively low speed. In cases where the method 500 is performed during normal operation, the system may wait until the motor 102 is operated to rotate at the first speed ω m1 and only then perform the subsequent steps depending on the motor 102 being driven at the first speed ω m1.At 504, the method 500 calculates a first demodulated voltage signal based on the first voltage command signal and the first motor position signal. For example, processor 152 may execute instructions to calculate the first demodulated voltage signal V u1, V v1 based on the first motor position signal θ e and the corresponding first voltage command signal V d1, V q1 and based on the following equation: as set forth in equation set (7).At 506, method 500 determines, for the motor, a second voltage command signal, a second motor position signal, and a second quadrature axis current command when the motor is rotating at a second speed different than the first speed. For example, the processor 152 may execute instructions to implement the current regulator 114 to determine the second voltage command when the motor 102 rotates at the second speed ω m2. The controller 150 may also determine the second motor position signal θ 2. For example, the processor 152 may execute instructions to implement the position estimator 116 to determine the second motor position signal θ 2 based on the estimated position θ̂ e when the motor 102 rotates at the second speed ω m2. In some embodiments, the processor 152 may execute instructions to selectively command the inverter 104 to drive the motor 102 to rotate at the second speed ω m2 that is higher than the first speed ω m1. In cases where the method 500 is performed during normal operation, the system may wait until the motor 102 is commanded to rotate at the second speed ω m2 and only then perform the subsequent steps that depend on the motor 102 being driven at the first speed ω m2.At 508, method 500 calculates a second demodulated voltage signal based on a second voltage command signal and the second motor position signal. For example, processor 152 may execute instructions to calculate second demodulated voltage signal V u2, V v2 based on second motor position signal θ e and corresponding second voltage command signal V d2, V q1 based on the following equation: as set forth in equation set (7).At 510, method 500 calculates a resistance imbalance flag and a current gain error flag, respectively, based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command, and the second quadrature axis current command. The resistance imbalance flag has a non-zero value in response to a resistance imbalance in the motor and is unaffected by a current sense gain error, and the current gain error flag has a non-zero value in response to a current sense gain error and is unaffected by a resistance imbalance in the motor. For example, processor 152 may execute instructions to solve each of the four equations of equation sets (9) and (10) to calculate the values for each of: resistance imbalance flag A, current gain error flag B, current gain error angle φ gp and resistance imbalance angle φ r.The present disclosure provides a method for detecting and distinguishing a current sense gain error and a resistance imbalance in a motor drive system. The method includes: determining, for a motor, a first voltage command signal, a first motor position signal, and a first quadrature axis current command when the motor rotates at a first speed; calculating, based on the first voltage command signal and the first motor position signal, a first demodulated voltage signal; determining a second voltage command signal, a second motor position signal, and a second quadrature axis current command when the motor rotates at a second speed different than the first speed; calculating, based on the second voltage command signal and the second motor position signal, a second demodulated voltage signal; and based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command, and the second quadrature axis current command, calculating a resistance imbalance flag and a current gain error flag, respectively. In some embodiments, the resistance imbalance flag has a non-zero value in response to a resistance imbalance in the motor and remains unaffected by a current sense gain error, and the current gain error flag has a non-zero value in response to a current sense gain error and remains unaffected by a resistance imbalance in the motor.In some embodiments, the first speed corresponds to the motor producing a speed invariant torque and the second speed is greater than the first speed and corresponds to a d-axis current commandIn some embodiments, each of the first demodulated voltage signal and the second demodulated voltage signal includes two components V u, V v calculated as follows: where θ e is a corresponding one of the first motor position signal or the second motor position signal representing an electrical position of the motor, and V d, V q are direct axis and quadrature axis components of a corresponding one of the first voltage command signal and the second voltage command signal.In some embodiments, calculating the resistance imbalance flag includes calculating the resistance imbalance flag according to the following equation: where A is the resistance imbalance flag, V u1 and V v1 are two components of the first demodulated voltage signal, V u2 and V v2 are two components of the second demodulated voltage signal, the first quadrature axis current command is when the motor rotates at the first speed ω e1 the second quadrature axis current command is when the motor rotates at the second speed ω e2 B is the current gain error flag, R is a rated winding resistance of the motor, and Φ gp is a current amplification fault angle.In some embodiments, calculating the current gain error flag includes calculating the current gain error flag according to the following equation: where B is the current gain error flag, V u1, and V v1 are two components of the first demodulated voltage signal, V u2 and V v2 are two components of the second demodulated voltage signal, the first quadrature axis current command is when the motor is rotating at the first speed ω e1 the second quadrature axis current command is when the motor is rotating at the second speed ω e2 and L is a nominal synchronous inductance of the motor.In some embodiments, the method further includes: calculating, based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command, and the second quadrature axis current command, a current gain error angle; and in some embodiments, the current gain error angle indicates a particular one or more current sensors having a current sense gain error.In some embodiments, calculating the current gain error angle includes calculating the current gain error angle according to the following equation: where φ gp is the current gain error angle, V u1 and V v1 are two components of the first demodulated voltage signal, V u2 and V v2 are two components of the second demodulated voltage signal, the first quadrature axis current command is when the motor is rotating at the first speed ω e1 the second quadrature axis current command is when the motor is rotating at the second speed ω e2.In some embodiments, the method further includes calculating, based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command, and the second quadrature axis current command, a resistance imbalance angle, and in some embodiments, the resistance imbalance angle indicates a particular one or more windings of the motor with a resistance imbalance.In some embodiments, calculating the resistance imbalance angle includes calculating the resistance imbalance angle according to the following equation:where φ r is the resistance imbalance angle, V u1 and V v1 are two components of the first demodulated voltage signal, V u2 and V v2 are two components of the second demodulated voltage signal, the first quadrature axis current command is when the motor is rotating at the first speed ω e1 the second quadrature axis current command is when the motor is rotating at the second speed ω e2 B is the current gain error flag, R is a nominal winding resistance of the motor, and φ gp is a current gain error angle.The present disclosure provides an electronic controller. The electronic controller includes a processor; and a memory including instructions. The instructions, when executed by the processor, cause the processor to: determine, for a motor, a first voltage command signal, a first motor position signal, and a first quadrature axis current command when the motor rotates at a first speed; calculate, based on the first voltage command signal and the first motor position signal, a first demodulated voltage signal; determine a second voltage command signal, a second motor position signal, and a second quadrature axis current command when the motor rotates at a second speed different than the first speed; calculate, based on the second voltage command signal and the second motor position signal, a second demodulated voltage signal; and based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command, and the second quadrature axis current command, calculating a resistance imbalance flag and a current gain error flag, respectively. In some embodiments, the resistance imbalance flag has a non-zero value in response to a resistance imbalance in the motor and remains unaffected by a current sense gain error, and the current gain error flag has a non-zero value in response to a current sense gain error and remains unaffected by a resistance imbalance in the motor.In some embodiments, the first speed corresponds to the motor producing a speed invariant torque and the second speed is greater than the first speed and corresponds to a d-axis current command equalIn some embodiments, each of the first demodulated voltage signal and the second demodulated voltage signal includes two components V u, V v calculated as follows:where θ e is a corresponding one of the first motor position signal and the second motor position signal representing an electrical position of the motor, and V d, V q are direct axis and quadrature axis components of a corresponding one of the first voltage command signal and the second voltage command signal.In some embodiments, the instructions cause the processor to calculate the resistance imbalance flag according to the following equation: where A is the resistance imbalance flag, V u1 and V v1 are two components of the first demodulated voltage signal, V u2 and V v2 are two components of the second demodulated voltage signal, the first quadrature axis current command is when the motor is rotating at the first speed ω e1 the second quadrature axis current command is when the motor is rotating at the second speed ω e2 B is the current gain error flag, R is a rated winding resistance of the motor and φ gp is a current amplification fault angle.In some embodiments, the instructions cause the processor to calculate the current gain error flag according to the following equation: wherein B is the current gain error flag, V u1 and V v1 are two components of the first demodulated voltage signal, V u2 and V v2 are two components of the second demodulated voltage signal, the first quadrature axis current command is when the motor is rotating at the first speed ω e1 the second quadrature axis current command is when the motor is rotating at the second speed ω e2 and L is a nominal synchronous inductance of the motor.In some embodiments, the instructions further cause the processor to calculate, based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command, and the second quadrature axis current command, a current gain error angle; and in some embodiments, the current gain error angle indicates a particular one or more current sensors having a current sense gain error.In some embodiments, the instructions cause the processor to calculate the current gain error angle according to the following equation: where φ gp is the current gain error angle, V u1 and V v1 are two components of the first demodulated voltage signal, V u2 and V v2 are two components of the second demodulated voltage signal, the first quadrature axis current command is when the motor is rotating at the first speed ω e1 and the second quadrature axis current command is when the motor is rotating at the second speed ω e2.In some embodiments, the instructions cause the processor to calculate, based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command, and the second quadrature axis current command, a resistance imbalance angle; and in some embodiments, the resistance imbalance angle indicates a particular one or more windings of the motor that have a resistance imbalance.In some embodiments, the instructions cause the processor to calculate the resistance imbalance angle according to the following equation: where φ r is the resistance imbalance angle, V u1 and V v1 are two components of the first demodulated voltage signal, V u2 and V v2 are two components of the second demodulated voltage signal, the first quadrature axis current command is when the motor is rotating at the first speed ω e1 the second quadrature axis current command is when the motor is rotating at the second speed ω e2 B is the current gain error flag, R is a rated winding resistance of the motor and φ gp is a current amplification fault angle.The present disclosure provides a system for detecting and distinguishing current sense gain error and resistance imbalance in a motor drive system. The system includes an inverter operatively connected to a motor and a controller operatively connected to the inverter. The controller is configured to: determine, for a motor, a first voltage command signal, a first motor position signal, and a first quadrature axis current command when the motor rotates at a first speed; calculate, based on the first voltage command signal and the first motor position signal, a first demodulated voltage signal; determine a second voltage command signal, a second motor position signal, and a second quadrature axis current command when the motor rotates at a second speed different than the first speed; calculate, based on the second voltage command signal and the second motor position signal, a second demodulated voltage signal; and based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command, and the second quadrature axis current command, calculating a resistance imbalance flag and a current gain error flag, respectively. In some embodiments, the resistance imbalance flag has a non-zero value in response to a resistance imbalance in the motor and remains unaffected by a current sense gain error, and the current gain error flag has a non-zero value in response to a current sense gain error and remains unaffected by a resistance imbalance in the motor.In some embodiments, the first speed corresponds to the motor producing a speed invariant torque, and the second speed is greater than the first speed and corresponds to a substantially zero d-axis current command.The above is intended to illustrate the principles and various embodiments of the present invention. Numerous variations and modifications will be apparent to those skilled in the art once having fully understood the above disclosure. It is intended to interpret the following claims as including all such variations and modifications.The word "example" is used herein to serve as an example, instance, or illustration. Any aspect or design described herein as an "example" is not necessarily to be considered preferred or advantageous over other aspects or designs. Rather, the use of the word "example" is intended to represent concepts in a concrete manner. As used in this application, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or.". That is, unless otherwise stated or clear from context, "X includes A or B" is intended to mean any of the natural inclusive permutations. That is, when X includes A; X includes B; or X includes both A and B, then "X includes A or B" is satisfied in each of the above cases. Moreover, the articles "a" and "an" as used in this application and the appended claims should generally be construed to mean "one(s / s) or more" unless otherwise stated or clearly understood from the context to refer to a singular form. Moreover, the use of the term "implementation" or "an implementation" does not mean that it is the same embodiment or implementation unless described as such."A", "an" and "the" refer to both the singular and plural, unless the context clearly dictates otherwise. By way of example, "a processor" programmed to perform various functions refers to a processor programmed to perform each individual function or more than one processor jointly programmed to perform each of the various functions.Implementations of the systems, algorithms, methods, instructions, etc. described herein may be implemented in hardware, software, or any combination thereof. The hardware may include, for example, computers, intellectual property (IP) cores, application specific integrated circuits (ASICs), programmable logic arrays, optical processors, programmable logic controllers, microcode, microcontrollers, servers, microprocessors, digital signal processors, or any other suitable circuit. In the claims, the term "processor" is to be understood to include any of the foregoing hardware, either alone or in combination. The terms "signal" and "data" are used interchangeably.As used herein, the term module may include a packaged functional hardware unit designed for use with other components, a series of instructions executable by a controller (e.g., a processor executing software or firmware), processing circuitry configured to perform a particular function, and a self-contained hardware or software component interfacing with a larger system. A module may include, for example, an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a circuit, a digital logic circuit, an analog circuit, a combination of discrete circuits, gates, and other types of hardware, or a combination thereof. In other embodiments, a module may include a memory storing instructions executable by a controller to implement a feature of the module.Further, in one aspect, the systems described herein may be implemented, for example, using a general purpose computer or a general purpose processor having a computer program that, when executed, executes any of the methods, algorithms, and / or instructions described herein. Additionally or alternatively, for example, a dedicated computer / processor may be used that may include other hardware for executing the methods, algorithms, or instructions described herein.Further, all or part of the implementations of the present disclosure may take the form of a computer program product accessible from, for example, a computer-usable or computer-readable medium. A computer-usable or computer-readable medium may be any device that can, for example, tangibly contain, store, communicate, or transport the program for use by or in connection with any processor. The medium may be, for example, an electronic, magnetic, optical, electromagnetic, or semiconductor device. Other suitable media are also available.The above-described embodiments, implementations, and aspects have been described in order to allow easy understanding of the present invention and do not limit the present invention. Rather, the invention is intended to cover various modifications and equivalent arrangements included within the scope of the appended claims, which scope is to be construed as broadly as possible to include all modifications and equivalent structures which are legally permitted.

Claims

A method for detecting and distinguishing a current sense gain error and a resistance imbalance in a motor drive system, the method comprising: determining, for a motor, a first voltage command signal, a first motor position signal, and a first quadrature axis current command when the motor rotates at a first speed; calculating, based on the first voltage command signal and the first motor position signal, a first demodulated voltage signal; determining a second voltage command signal, a second motor position signal, and a second quadrature axis current command when the motor rotates at a second speed different from the first speed; calculating, based on the second voltage command signal and the second motor position signal, a second demodulated voltage signal; calculating, based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command and the second quadrature axis current command, a resistance imbalance flag and a current gain error flag, wherein the resistance imbalance flag has a non-zero value in response to a resistance imbalance in the motor and remains unaffected by a current sense gain error, and wherein the current gain error flag has a non-zero value in response to a current sense gain error and remains unaffected by a resistance imbalance in the motor.The method of claim 1, wherein the first speed corresponds to the motor producing a speed invariant torque, and the second speed is greater than the first speed and corresponds to a substantially zero d-axis current command.The method of claim 1, wherein the first demodulated voltage signal and the second demodulated voltage signal each include two components, V u, V v, calculated by: [V u V v ] = [cos 2 θ e sin 2 θ e sin 2 θ e - cos 2 θ e ] [V d V q ] where θ e is a corresponding one of the first motor position signal and the second motor position signal representing an electrical position of the motor, and V d, V q are direct axis and quadrature axis components of a corresponding one of the first voltage command signal and the second voltage command signal.The method of claim 1, wherein calculating the resistance imbalance flag includes calculating the resistance imbalance flag according to the equation: A = ( V u 1 I q 1 * + ω e 1 ( V u 2 I q 2 * - V u 1 I q 1 * ω e 1 - ω e 2 ) + B R s i n ( φ g p ) ) 2 + ( V v 1 I q 1 * ⋅ ω e 1 ( V v v 2 I q 2 * - V v 1 I q 1 * ω e 2 - ω e 1 ) + B R c o s ( φ g p ) ) 2 where A is the resistance imbalance flag, V u1 and V v1 are two components of the first demodulated voltage signal, V u2 and V v2 are two components of the second demodulated voltage signal, I q 1 * is the first quadrature axis current command when the motor is rotating at the first speed ω e1 I q 2 * is the second quadrature axis current command when the motor is rotating at the second speed ω e2 B is the current gain error flag, R is a rated winding resistance of the motor, and φ gp is a current gain error angle.The method of claim 1, wherein calculating the current gain error flag includes calculating the current gain error flag according to the equation: B = ( V u 2 I q 2 * - V u 1 I q 1 *) 2 + ( V v 2 I q 2 * - V v 1 I q 1 *) 2 ( ω e 2 - ω e 1 ) L where B is the current gain error flag, V u1 and V v1 are two components of the first demodulated voltage signal, V u2 and V v2 are two components of the second demodulated voltage signal, I q 1 * is the first quadrature axis current command, when the motor is rotating at the first speed ω e1 I q 2 * is the second quadrature axis current command when the motor is rotating at the second speed ω e2 and L is a rated synchronous inductance of the motor.The method of claim 1, further comprising: calculating, based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command, and the second quadrature axis current command, a current gain error angle, wherein the current gain error angle indicates a particular one or more current sensors having or having a current sense gain error.The method of claim 6, wherein calculating the current gain error angle includes calculating the current gain error angle according to the equation: φ g p = tan - 1 ( V v 2 I q 2 * - V v 1 I q 1 * V u 1 I q 1 * - V u 2 I q 2 * ) where φ gp is the current gain error angle, Y u1 and V v1 are two components of the first demodulated voltage signal, V u2 and V v2 are two components of the second demodulated voltage signal, I q 1 * is the first quadrature axis current command, when the motor rotates at the first speed ω e1 and I q 2 * is the second quadrature axis current command when the motor rotates at the second speed ω e2.The method of claim 1, further comprising: calculating, based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command, and the second quadrature axis current command, a resistance imbalance angle, wherein the resistance imbalance angle indicates a particular one or more windings of the motor that has or have a resistance imbalance.The method of claim 8, wherein calculating the resistance imbalance angle includes calculating the resistance imbalance angle according to the following equation: φ r = tan - 1 ( V u 1 I q 1 * + ω e 1 ( V u 2 I q 2 * - V u 1 I q 1 * ω e 1 - ω e 2 ) + B R s i n ( φ g p ) V v 1 I q 1 * - ω e 1 ( V v 2 I q 2 * - V v v 1 I q 1 * ω e 2 - ω e 1 ) + B R c o s ( φ g p ) ) where φ R is the resistance imbalance angle, V u1 and V v1 are two components of the first demodulated voltage signal, V u2 and V v2 are two components of the second demodulated voltage signal, I q 1 * is the first quadrature axis current command when the motor is rotating at the first speed ω e1 I q 2 * is the second quadrature axis current command when the motor is rotating at the second speed ω e2 B is the current gain error flag, R is a rated winding resistance of the motor, and φ gp is a current gain error angle.An electronic controller, comprising: a processor; and a memory including instructions that, when executed by the processor, cause the processor to: determine, for a motor, a first voltage command signal, a first motor position signal, and a first quadrature axis current command when the motor rotates at a first speed; calculate, based on the first voltage command signal and the first motor position signal, a first demodulated voltage signal; determine a second voltage command signal, a second motor position signal, and a second quadrature axis current command when the motor rotates at a second speed different than the first speed; calculate, based on the second voltage command signal and the second motor position signal, a second demodulated voltage signal; calculating, based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command and the second quadrature axis current command, a resistance imbalance flag and a current gain error flag, wherein the resistance imbalance flag has a non-zero value in response to a resistance imbalance in the motor and remains unaffected by a current sense gain error, and wherein the current gain error flag has a non-zero value in response to a current sense gain error and remains unaffected by a resistance imbalance in the motor.The electronic controller of claim 10, wherein the first speed corresponds to the motor generating a speed invariant torque and the second speed is greater than the first speed and corresponds to a substantially zero d-axis current command.The electronic controller of claim 10, wherein the first demodulated voltage signal and the second demodulated voltage signal each include two components, V u, V v, calculated as [V u V v ] = [cos 2 θ e sin 2 θ e sin 2 θ 2 - cos 2 θ e ] [V d V q ] where θ e is a corresponding one of the first motor position signal and the second motor position signal representing an electrical position of the motor, and V d, V q are direct axis and quadrature axis components of a corresponding one of the first voltage command signal and the second voltage command signal.The electronic controller of claim 10, wherein the instructions cause the processor to calculate the resistance imbalance flag according to the equation: A = ( V u 1 I q 1 * + ω e 1 ( V u 2 I q 2 * - V u 1 I q 1 * ω e 1 - ω e 2) + B R s i n ( φ g p ) ) 2 + ( V v 1 I q 1 * ω e 1 ( V v 2 I q 2 * - V v v 1 I q 1 * ω e 2 - ω e 1 ) + B R c o s ( φ g p ) ) 2 where A is the resistance imbalance flag, V u1 and V v1 are two components of the first demodulated voltage signal, V u2 and V v2 are two components of the second demodulated voltage signal, I q 1 * is the first quadrature axis current command when the motor is rotating at the first speed ω e1 I q 2 * is the second quadrature axis current command when the motor is rotating at the second speed ω e2 B is the current gain error flag, R is a rated winding resistance of the motor, and φ gp is a current gain error angle.The electronic controller of claim 10, wherein the instructions cause the processor to calculate the current gain error flag according to the equation: B = ( V u 2 I q 2 * - V u 1 I q 1 * ) 2 + ( V v 2 I q 2 * - V v 1 I q 1 * ) 2 ( ω e 2 - ω e 1 ) L wherein B is the current gain error flag, V u1 and V v1 are two components of the first demodulated voltage signal, V u2 and V v2 are two components of the second demodulated voltage signal, I q 1 * is the first quadrature axis current command, when the motor is rotating at the first speed ω e1 I q 2 * is the second quadrature axis current command when the motor is rotating at the second speed ω e2 and L is a rated synchronous inductance of the motor.The electronic controller of claim 10, wherein the instructions further cause the processor to calculate, based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command, and the second quadrature axis current command, a current gain error angle, wherein the current gain error angle indicates a particular one or more current sensors that includes or have a current sense gain error.The electronic controller of claim 15, wherein the instructions cause the processor to calculate the current gain error angle according to the equation: φ g p = tan - 1 ( V v 2 I q 2 * - V v 1 I q 1 * V u 1 I q 1 * - V u 2 I q 2 * ) where φ gp is the current gain error angle, V u1 and V v1 are two components of the first demodulated voltage signal, V u2 and V v2 are two components of the second demodulated voltage signal, I q 1 * is the first quadrature axis current command, when the motor rotates at the first speed ω e1 and I q 2 * is the second quadrature axis current command when the motor rotates at the second speed ω e2.The electronic controller of claim 10, wherein the instructions cause the processor to calculate, based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command, and the second quadrature axis current command, a resistance imbalance angle, the resistance imbalance angle indicative of a particular one or more windings of the motor having or having a resistance imbalance.The electronic controller of claim 17, wherein the instructions cause the processor to calculate the resistance imbalance angle according to the following equation: φ r = tan - 1 ( V u 1 I q 1 * + ω e 1 ( V u 2 I q 2 * - V u 1 I q 1 * ω e 1 - ω e 2 ) + B R s i n ( φ g p ) V v 1 I q 1 * + ω e 1 ( V v 2 I q 2 * - V v 1 I q 1 * ω e 2 - ω e 1 ) + B R c o s ( φ g p ) ) wherein φ R is the resistance imbalance angle, V u1, V v1 are two components of the first demodulated voltage signal, V u2 and V v2 are two components of the second demodulated voltage signal, I q 1 * is the first quadrature axis current command when the motor rotates at the first speed ω e1 I q 2 * is the second quadrature axis current command when the motor rotates at the second speed ω e2 B is the current gain error flag, R is a rated winding resistance of the motor, and φ gp is a current gain error angle.A system for detecting and distinguishing a current sense gain error and a resistance imbalance in a motor drive system, the system comprising: a controller configured to: determine, for a motor, a first voltage command signal, a first motor position signal, and a first quadrature axis current command when the motor rotates at a first speed; calculate, based on the first voltage command signal and the first motor position signal, a first demodulated voltage signal; determine a second voltage command signal, a second motor position signal, and a second quadrature axis current command when the motor rotates at a second speed different from the first speed; calculate, based on the second voltage command signal and the second motor position signal, a second demodulated voltage signal; calculating, based on the first demodulated voltage signal, the second demodulated voltage signal, the first quadrature axis current command and the second quadrature axis current command, a resistance imbalance flag and a current gain error flag, wherein the resistance imbalance flag has a non-zero value in response to a resistance imbalance in the motor and remains unaffected by a current sense gain error, and wherein the current gain error flag has a non-zero value in response to a current sense gain error and remains unaffected by a resistance imbalance in the motor.The system of claim 19, wherein the first speed corresponds to the motor producing a speed invariant torque and the second speed is greater than the first speed and corresponds to a substantially zero d-axis current command.