Rotor position estimation

A motor controller includes current measurement circuitry and estimation circuitry. The current measurement circuitry is adapted to be coupled to a motor, and configured to measure current in the motor. The estimation circuitry is coupled to the current measurement circuitry, and includes a memory, current computation circuitry, and summation circuitry. The memory stores coefficients of a function for estimating current related to variation of inductance of the motor. The current computation circuitry is coupled to the memory, and is configured to compute a compensation current value based on the coefficients. The summation circuitry is coupled to the current compensation circuitry, and is configured to generate a position error signal by subtracting the compensation current value from a measured current value generated by the current measurement circuitry.

BACKGROUND

A permanent magnet motor represents a type of motor where a fixed stator causes rotation of a movable rotor. The rotor typically includes multiple magnets embedded in or connected to the rotor, and the stator typically includes multiple conductive windings. Electrical current in the windings generates a rotating magnetic field that interacts with the magnets of the rotor, causing the rotor to rotate. Because the stator has multiple phase windings the relative inductance between the windings can be used to determine rotor position.

“Sensorless” motor control refers to an approach where one or more characteristics of a motor, such as motor speed or rotor position, are mathematically derived. Sensorless motor control typically avoids the use of separate speed and position sensors that are mechanically attached to a motor.

SUMMARY

A method for motor control that improves the accuracy of rotor angle determination by accounting for motor non-linear behavior, and a motor controller that implements the method are disclosed herein. In one example, a motor controller includes current measurement circuitry and estimation circuitry. The current measurement circuitry is adapted to be coupled to a motor, and configured to measure current in the motor. The estimation circuitry is coupled to the current measurement circuitry, and includes a memory, current computation circuitry, and summation circuitry. The memory stores coefficients of a function for estimating current related to variation of inductance of the motor. The current computation circuitry is coupled to the memory, and is configured to compute a compensation current value based on the coefficients. The summation circuitry is coupled to the current compensation circuitry, and is configured to generate a position error signal by subtracting the compensation current value from a measured current value generated by the current measurement circuitry.

In another example, a method for motor control includes measuring a current flowing in a motor. An angle of a rotor of the motor is determined based on the measured current. A coefficient value is retrieved from memory based on the angle of the rotor. A compensation current value is computed based on the coefficient value. A position error signal is generated by computing a difference of the compensation current value and a value of the measured current. The position error signal is applied to adjust a value of the angle of the rotor.

In a further example, a motor controller includes a speed control circuit, a current measurement circuit, and an estimation circuit. The speed control circuit is adapted to be coupled to a motor, and configured to generate a reference current that controls the speed of the motor. The current measurement circuitry is adapted to be coupled to the motor and configured to measure current in the motor. The estimation circuitry is coupled to the current measurement circuitry. The estimation circuitry includes an observer, a memory, current computation circuitry and summation circuitry. The observer is configured to generate an estimate of current in the motor based on the reference current. The memory stores coefficients of a function for estimating current related to variation of inductance of the motor. The current computation circuitry is coupled to the memory and configured to compute a compensation current value based on the coefficients and the estimate of the current in the motor. The summation circuitry is coupled to the current compensation circuitry, and is configured to generate a position error signal by subtracting the compensation current value from a measured current value generated by the current measurement circuitry.

DETAILED DESCRIPTION

In this description, the term “couple” or “couples” means either an indirect or direct wired or wireless connection. Thus, if a first device couples to a second device, that connection may be through a direct connection or through an indirect connection via other devices and connections. Also, in this description, the recitation “based on” means “based at least in part on.” Therefore, if X is based on Y, then X may be a function of Y and any number of other factors. Additional symbols used here are defined in Table 1 below.

In a sensorless motor control system, the absence of a significant back-electromotive force (EMF) signal at low rotor speeds necessitates signal injection methods that exploit rotor saliency to estimate angle based on rotor position dependent signatures in voltage and current. Most methods do not account for motor non-linearity such as saturation, cross-saturation and higher order saliencies that cause the inductance model to deviate from the constant inductance model. This simplification results in large angle errors in the angle estimate, which may lead to unstable operation at higher current levels. The circuits and methods disclosed herein improve the accuracy of rotor angle estimation by accounting for motor non-linear behavior.

FIG. 1shows a block diagram for a motor control system100in accordance with this description. The motor control system100includes a motor controller102and an electric motor104(e.g., a three-phase electric motor). The motor controller102is coupled to the electric motor104. The motor controller102includes a speed control circuit106, a current control circuit108, a signal generation circuit110, an inverse Park transform circuit112, a space vector generation circuit114, an inverter116, measurement circuitry118, a Clarke transform circuit120, position and speed estimation circuitry122, and Park transform circuit124. The speed control circuit106receives a speed input ωreffrom an external source and compares ωrefto {circumflex over (ω)}reprovided by the position and speed estimation circuitry122. The speed control circuit106generates a reference current (Iq,ref) for the q-axis of the d-q reference frame. An additional reference current (Id,ref) for the d-axis is supplied by the user to control the motor's magnetic field. In various implementations of the100, the speed control circuit106may be replaced by a position control circuit or a torque/current control circuit.

FIG. 2shows a rotor of the electric motor104with different coordinate systems referenced herein. The coordinate systems are referenced according to currents associated with a stator of the electric motor104, which are referenced to the rotor202of the electric motor104. The currents Iqand Idrelate to the q-axis and the d-axis of the electric motor104and are fixed with respect to the rotor202. The d/q-axes relate to torque control of the electric motor104and are orthogonal. The IM-axis and IN-axis are arbitrary axes that are used as references for determining the position of the rotor202. The IMand INaxes may be predetermined axes in the electric motor104from which the position of the rotor202is determined. The Iα-axis and the Iβ-axis represent an orthogonal coordinate system where the Iα-axis is aligned with the phase of a motor winding. The angle of the rotor202based on the angle between the Iα-axis and the IM-axis is referred to as the angle θ. A rotational angle θRis defined as the angle between the Iα-axis and the Id-axis. As the rotor202rotates, the rotational angle θRchanges wherein the change per unit time is equal to the velocity of the rotor202.

Referring back toFIG. 1, the current control circuit108receives the q-axis reference current (Iq,ref) generated by the speed control circuit106and the d-axis reference current (Id,ref) generated by the user, reduces the reference currents by the measured currents Id{circumflex over (r)}and Iq{circumflex over (r)}respectively, and produces d and q axis voltages, Vdand Vq. The signal generation circuit110provides a signal126that is added to the Vdand/or the Vqoutput of the current control circuit108by a summation circuit128to aid in estimation of the angle of the rotor202. The inverse Park transform circuit112converts the voltages Vdand Vqto the alpha/beta domain to produce Vαand Vβ. The space vector generation circuit114receives the voltages Vαand Vβand generates a three-phase output signal. The inverter116converts the three-phase output of the space vector generation circuit114to alternating current signals to drive the electric motor104.

The measurement circuitry118measures the current and voltage output of each phase of the electric motor104. The measurement circuitry118includes voltage and current sensors to perform the measurements. The measurement circuitry118also includes an analog-to-digital converter to digitize the current and voltage measurements. The Clarke transform circuit120receives the digitized current and voltage measurements provide by the measurement circuitry118and generates alpha/beta domain voltage and current values. The alpha/beta domain voltage and current values generated by the Clarke transform circuit120are provided to the position and speed estimation circuitry122and the Park transform circuit124to generate speed ({circumflex over (ω)}re) current (Id{circumflex over (r)}, Iq{circumflex over (r)}), and rotor angle ({circumflex over (θ)}re) estimates that are fed back to the speed control circuit106, the current control circuit108, and the inverse Park transform circuit112and Park transform circuit124, respectively.

A basic implementation of the motor control system100is based on the constant inductance motor model shown in equation (1).

When a tonal voltage signal is injected in the d-axis of the estimated reference frame (as shown inFIG. 1), the tonal components of the reflected currents in the d and q axes are given by equation (2).

From equation (2), the error signal sin 2({circumflex over (θ)}e−θe) is modulated up by the carrier frequency in the current Iq{circumflex over (r)}.

FIG. 3shows an example of basic position and speed estimation circuitry300. The basic position and speed estimation circuitry300is an implementation of the position and speed estimation circuitry122. The basic position and speed estimation circuitry300includes Park transform circuit302, demodulation circuitry304, low-pass filter circuitry306, and phased locked loop (PLL) observer circuitry308. The Park transform circuit302computes q-axis current in the estimated reference frame Iq{circumflex over (r)}. The demodulation circuitry304demodulates the Iq{circumflex over (r)}signal, and the low-pass filter circuitry306removes high frequency components to extract a signal dependent on position error sin 2({circumflex over (θ)}e−θe). The PLL observer circuitry308processes the error signal to drive the position error to zero, thereby obtaining an estimated rotor angle.FIG. 4shows a block diagram for an example Luenberger observer400, andFIG. 5shows a block diagram for an example PLL observer500. The PLL observer circuitry308may be implemented using the Luenberger observer400or the PLL observer500.

The constant inductance motor flux to current relationship that leads to the model in equation (1) is given by equation (3).

The inductance matrix under the assumption of constant inductances and no additional spatial harmonics forms the lower order inductance model, (Lαβ)lo, given by equation (4).

However, positioning performance using such a lower order inductance model may be limited. For example, a wide range of error (−30° to 20°), depending on position, has been observed in some implementations.

As shown in equation (5), the motor model includes higher order, angle dependent inductance terms in additional to the signal term. In addition to the primary inductive saliency L2, the inductance model includes higher order saliencies corresponding to Lhi, where ‘i’ denotes the order of the saliency. Each higher order saliency also has an associated phase φi.

The higher order inductance terms, (Lαβ)ho, in the summation cause errors in the angle estimation if not modeled. The position estimation circuitry and methods disclosed herein account for the non-linear motor model whose parameters vary with current levels, and thereby improve position estimation accuracy.

The current in the estimated rotor frame (shown in equation (6)) has additional components because of the inductance variation.
Idq{circumflex over (r)}=[IL0−IL2ej(2Δθre)+Σi=2,3, . . .nILhi*ej(iθre−2{circumflex over (θ)}re−φi)]*sin(ωit)  (6)

The constant inductance model, Idq{circumflex over (r)}=[IL0−IL2ej(2Δθre)]*sin(ωit), includes a position independent term Idq{circumflex over (r)}=′IL0and a position dependent term IL2ej(2Δθre). The basic position and speed estimation circuitry300extracts the position dependent term in Iq{circumflex over (r)}i.e., IL2sin(2Δθre).

The position determination circuitry and method disclosed herein remove the components in the current Iq{circumflex over (r)}that correspond to cross saturation, multiple saliencies, etc., leaving only the signal term. The high frequency q-axis current in the estimated rotor frame Iq{circumflex over (r)}can be expressed according to equation (7).
Iq{circumflex over (r)}=(Iq{circumflex over (r)})s+(Iq{circumflex over (r)})h(7)
where
(Iq{circumflex over (r)})s={a2sin 2Δθre}*sin(ωit)
and
(Iq{circumflex over (r)})h={b2cos 2Δθre+Σi=3, . . .naisin(iθre−2{circumflex over (θ)}re)+bicos(iθre−2{circumflex over (θ)}re)}*sin(ωit).

The coefficients aiand bi, which represent the contribution of higher order saliencies to the injected current, vary with current level and frequency. These coefficients are related to the underlying inductance model terms Lhiand φi. The circuits and methods of position determination disclosed herein determine and apply the coefficients to improve position estimation.

FIG. 6shows a block diagram for example position estimation circuitry600that includes compensation for spatial harmonics in the inductance of a motor in accordance with this description. The position estimation circuitry600is an implementation of the position and speed estimation circuitry122, and uses compensation coefficients to extract a position error signal that is used to improve position estimation. Values of the coefficients are determined in an offline motor characterization process that is described herein. The position estimation circuitry600includes a Park transform circuit602, a summation circuit604, demodulation circuitry606, low pass filter circuitry608, saturation compensation circuitry610, observer circuitry612, model-based compensation circuitry614, and feed-forward observer circuitry616. The model-based compensation circuitry614includes a memory618and current computation circuitry620. The memory618stores coefficients (aiand bi) of a function (see equation (7)) for estimating current related to variation of inductance in the electric motor104. The current computation circuitry620is coupled to the memory618and computes a compensation current value based on the coefficients stored in the memory618.

The position estimation circuitry600removes terms corresponding to cross saturation (b2cos 2Δθre) and higher order inductance saliencies Σi=3, . . .naisin((i−2){circumflex over (θ)}re)+bicos((i−2){right arrow over (θ)}re) from the current in the estimated rotor frame, which is also the frame of signal injection. The Park transform circuit602computes q-axis current in the estimated reference frame Iq{circumflex over (r)}. The summation circuit604is coupled to the Park transform circuit602and the model-based compensation circuitry614, and subtracts a compensation value (Iq{circumflex over (r)})hprovided by the model-based compensation circuitry614from the q-axis current to produce an error signal ε″. The compensation step can be expressed as:
ε″≈Iq{circumflex over (r)}−(Iq{circumflex over (r)})h(8)

After the subtraction, the residual current takes the following form
ε″=a2sin 2Δθre*sin(ωit)  (9)
which only contains the position error signal sin 2Δθremodulated to higher frequency ωi.

The demodulation circuitry606demodulates the error signal, and the low pass filter circuitry608removes high frequency components of the demodulated error signal to produce the baseband position error signal ε=a2sin 2Δθre. The coefficient a2is a function of Idand Iq. The saturation compensation circuitry610normalizes the error signal for its dependence on current according to equation (10).

The resulting position error signal ε′=a2(0,0)sin 2Δθreproduced by the saturation compensation circuitry610is processed by the observer circuitry612to generate a position estimate (e.g., a rotor angle estimate). The subtraction performed by the summation circuit604requires knowledge of the rotor angle, and the estimated rotor angle is used by the Park transform circuit602and the model-based compensation circuitry614as a substitute for the true rotor angle. The Park transform circuit602and the model-based compensation circuitry614apply the rotor angle estimate to generate the values of current Iq{circumflex over (r)}and (Iq{circumflex over (r)})hprovided to the summation circuit604. Accordingly, the compensation performed by the position estimation circuitry600assumes that the estimate ({circumflex over (θ)}re) of the rotor angle is close to the true rotor angle.

The coefficients aiand bi(as per equation (7)) are functions of the currents Idand Iq, the d and q axes currents in the true rotor frame. As these signals are not available for use in the compensation, the position estimation circuitry600generates estimates of Idand Iq. Instead of using the measured currents to provide Iq{circumflex over (r)}and Id{circumflex over (r)}to the model-based compensation circuitry614, the feed-forward observer circuitry616generates the estimates Id{circumflex over (r)}and Iq{circumflex over (r)}based on the reference currents Id,refand Iq,refprovided by the speed control circuit106. This approach mitigates the impact of the residual harmonics in the measured Iq{circumflex over (r)}and Id{circumflex over (r)}, which could cause the harmonics to recirculate in the estimation-control loop.

The various circuits of the motor control system100and/or the position estimation circuitry600may be implemented as dedicated hardware circuits configured to perform the operations disclosed herein or as a processor (such as a microcontroller or digital signal processor) executing instructions that cause the processor to perform the functions disclosed herein. For example, one or more of the Park transform circuit602, a summation circuit604, demodulation circuitry606, low pass filter circuitry608, saturation compensation circuitry610, observer circuitry612, model-based compensation circuitry614, and/or feed-forward observer circuitry616may be implemented as a processor coupled to a memory (i.e., a non-transitory computer-readable medium), where the memory stores instructions that cause the processor to perform the operations describe herein with respect to the circuits.

FIG. 7shows a flow diagram for a method700for determining coefficient values for use in compensation for spatial harmonics in the inductance of a motor in accordance with this description. Though depicted sequentially as a matter of convenience, at least some of the actions shown can be performed in a different order and/or performed in parallel. Additionally, some implementations may perform only some of the actions shown. The operations of the method700are performed offline (i.e., as part of motor characterization performed prior to application-related use of the motor).

In block702an angle encoder is coupled to an electric motor to be characterized. For example, an angle encoder is coupled to an instance of the electric motor104, where the electric motor104is to be characterized.

In block704, the electric motor is driven at the (Id, Iq) bias points at which characterization is desired.

In block706, information such as the rotor angle and motor current are measured. For example, rotor angle is measured via the angle encoder coupled to the electric motor. In a first measurement step, signal is injected in the electric motor in block704such that {circumflex over (θ)}re=θre, and in block706Iq{circumflex over (r)}, θreand sin(ωct) are measured and recorded. In a second measurement step, signal is injected in the electric motor in block704such that {circumflex over (θ)}re=θre+π/4, and in block706Iq{circumflex over (r)}, θreand sin(ωct) are measured and recorded.

In block708, coefficients for storage in the memory618are generated based on information acquired in block706. The information is processed via curve fitting to generate the coefficients aiand bias a function of currents.

Some implementations of the method700generate coefficient values without use of an encoder. In such implementations, the electric motor is rotated at a high speed, and back-EMF of the motor is measured. The measured back-EMF of the motor operating according to a motor position model at high speed is used to generate the coefficient values for the motor operating at a lower speed.

FIG. 8shows a flow diagram for a method800of motor control that includes compensation for spatial harmonics in the inductance of a motor in accordance with this description. Though depicted sequentially as a matter of convenience, at least some of the actions shown can be performed in a different order and/or performed in parallel. Additionally, some implementations may perform only some of the actions shown. The operations of the method800may be performed by an example motor control system100that includes an implementation of the position estimation circuitry600.

In block802, the speed control circuit106generates a reference current to drive the electric motor104. For example, the speed control circuit106generates the reference current (Iq,ref) based on a speed input ωrefreceived from an external source and {circumflex over (ω)}rereceived from the position and speed estimation circuitry122.

In block804, the measurement circuitry118measures the current and voltage in the electric motor104.

In block806, the observer circuitry612determines an angle ({circumflex over (θ)}re) of the rotor of the electric motor104.

In block808, the feed-forward observer circuitry616estimates currents (Id{circumflex over (r)}and Iq{circumflex over (r)}) in the electric motor104based on the reference current generated by the802.

In block810, the current computation circuitry620retrieves a coefficient from the memory618based on the current estimate generated in block808and the rotor angle estimate generated in block806.

In block812, the current computation circuitry620computes a compensation current (Iq{circumflex over (r)})hbased on the coefficient retrieved in block810.

In block814, the position estimation circuitry600generates a position error signal. The position error signal may be computed as a difference of the compensation current value and a value of the measured current. For example, the summation circuit604computes an error signal as a difference of Iq{circumflex over (r)}and (Iq{circumflex over (r)})h. The position error signal is a modulated position error signal, and the position error signal is demodulated and low-pass filtered to generate a baseband position error signal. The baseband position error signal is normalized for dependence on current.

In block816, the observer circuitry612applies the error signal to adjust the estimated angle of the rotor of the electric motor104.

In some implementations of the motor control system100, compensation is performed prior to generation of the signal126.FIG. 9shows the signal generation circuit110coupled to a model-based pre-shaping circuit902. The model-based pre-shaping circuit902is similar to the model-based compensation circuitry614, and includes a memory for storing coefficients. The model-based pre-shaping circuit902generates, based on the stored coefficients, a signal904that is provided to the signal generator circuit110. The signal generation circuit110applies the signal904to shape the signal126. The model-based pre-shaping circuit902generates the signal904based on the current (Id{circumflex over (r)}, Iq{circumflex over (r)}) estimates generated by the feed-forward observer circuitry616, and rotor angle ({circumflex over (θ)}re) estimates generated by the observer circuitry612.

FIG. 10shows a block diagram for example position estimation circuitry1000suitable for use with the model-based pre-shaping circuit902. The position estimation circuitry1000is an implementation of the position and speed estimation circuitry122. The position estimation circuitry1000is similar to the position estimation circuitry600, but lacks the summation circuit604and the model-based compensation circuitry614because compensation is performed using the model-based pre-shaping circuit902, the signal generation circuit110, and the summation circuit128.