The invention relates to control of a direct current (“DC”) motor, and more particularly to methods and devices for self-sensing rotor position in a DC motor.
In order to properly commutate a brushless DC (“BLDC”) motor, the position of the rotor, relative to the stator, must be known. Determination of the rotor position is traditionally accomplished using Hall-Effect devices (“HEDs”), resolvers, and/or encoders. However, the addition of such rotor position measuring device to a motor may increase the cost of the motor and may decrease the reliability of the motor due to the potential failure of additional components.
Sensorless techniques for determining rotor (i.e., shaft) position have been developed in the past. For example, techniques for determining rotor position based on so-called “back EMF” have been used in the past. However, such sensorless techniques are not able to determine the position of the rotor when the rotor is moving at low speed or not moving at all. Thus, such techniques are not useful for proper commutation of a DC motor from start-up.
There is a long-felt need for a technique to determine the rotor position of a BLDC motor without the use of additional measuring components.
The present disclosure provides methods and systems for determining the rotor position of a BLDC motor having a saliency using phase-shifted (skewed) PWM drive signals to create a current ripple. Techniques according to the present disclosure may advantageously be used to determine a rotor position of a rotor which is not moving.
For a fuller understanding of the nature and objects of the disclosure, reference should be made to the following detailed description taken in conjunction with the accompanying drawings, in which:
The present disclosure describes methods and systems for determining a rotor position in a permanent magnet direct current (“DC”) motor, such as a brushless DC (“BLDC”) motor having a saliency. Such motors may be, for example, interior permanent magnet (“IPM”) motors or surface permanent magnet (“SPM”) motors with shaped magnets (see, e.g.,
Pulse-width modulation (“PWM”) drive signals are commonly used to drive BLDC motors.
The present disclosure provides a new PWM scheme which introduces a phase shift between at least two phases of a BLDC motor.
The phase-shifted drive signals cause a ripple in the current used to drive the motor. Traditionally, designers have sought to minimize (or, ideally, to eliminate) such current ripples, particularly in low-inductance motors. Embodiments of the present disclosure utilize the current ripple to determine the phase inductances and derive the rotor position based on the inductances.
The present disclosure may be embodied as a method 100 for determining a rotational position of a rotor of a BLDC motor. The motor has at least two phases, each phase being driven by a corresponding PWM drive signal. In some embodiments, the motor has three phases, a first phase, a second phase, and a third phase, and the phases are driven by a first PWM drive signal, a second PWM drive signal, and a third PWM drive signal, respectively.
The method 100 comprises the step of shifting 103 a phase of the first PWM drive signal relative to a phase of the second PWM drive signal. In an embodiment of a three-phase BLDC motor, the method 100 may comprise the step of shifting 106 a phase of the third PWM drive signal relative to the phase of the first and second PWM drive signals. It should be noted that in a three-phase (or more) motor, shifting each phase is not required, so long as the drive signal for at least one phase is shifted. The PWM drive signals may be shifted 103 using any technique, such as, for example, generating each PWM drive signal from phase-shifted reference signals.
The method 100 further comprises the step of obtaining 109 a plurality of measurements, over a sampling period, of a current of the first phase and a current of the second phase of the motor. In embodiments where additional phases are shifted, the measurements may include corresponding measurements of the currents of the additional phases.
A current ripple is determined 111 using the plurality of measurements. In an exemplary embodiment, the current measured over a PWM cycle is averaged. A line is extrapolated using this average current and the average current over the previous PWM cycle. This extrapolated line is then subtracted from the measured currents to provide the ripple current. Other techniques for deriving a ripple current useful for determining the inductance will be apparent in light of the present disclosure. An inductance is determined 112 over time based on the current ripple and the first and second PWM drive signals. The inductance may be determined 112 using the known voltage of the PWM drive signals and the determined 111 current ripple by way of the equation
In some embodiments, it is advantageous to determine 112 the inductance by integrating the voltages (referred to herein as a voltage “flux,” ‘λ’) and using the determined 111 current ripple such that inductance is determined according to λ=Li. Further details are provided below for determining the inductances as a function of rotational position (θ).
The method 100 further comprises the step of determining 115 a rotational position of the rotor based on the determined 112 inductance. Again, details of deriving the position of the rotor based on the inductance is provided below.
The present disclosure may be embodied as a controller 10 for a three-phase BLDC motor 90 having a saliency. A suitable motor 90 for connection to the present controller 10 has a rotor 99 which is rotatable within a stator 98. The rotor 99 is driven by coils of a first phase 92, a second phase 94, and a third phase 96 of the motor 90. The controller 10 comprises a first PWM generator 12, which is adapted to be in electrical communication with the first phase 92 of the motor 90. For example, the first PWM generator 12 may communicate with the first phase 92 of the motor 90 via electrical leads and an electrical connector. The first PWM generator 12 is configured to generate a first PWM drive signal having a drive frequency (i.e., the frequency of the PWM pulses) and a first signal phase.
The controller 10 comprises a second PWM generator 14, which is adapted to be in electrical communication with the second phase 94 of the motor 90. The second PWM generator 14 is configured to generate a second PWM drive signal having the drive frequency and a second signal phase. As such, the second PWM drive signal has the same frequency as the first PWM drive signal, but each pulse is shifted in time relative to the pulses of the first PWM drive signal by a phase shift value. The controller 10 comprises a third PWM generator 16, which is adapted to be in electrical communication with the third phase 96 of the motor 90. The third PWM generator 16 is configured to generate a third PWM drive signal having the drive frequency and a third signal phase—thereby having a pulse train which is phase-shifted relative to the pulses of the first and second PWM drive signals.
It should be noted that other components may be disposed in the electrical connection between the PWM generators 12, 14, 16 and the motor 90. For example, the controller 10 may include an inverter as is commonly known with such BLDC motor controllers. As such, the electrical communication between the PWM generators 12, 14, 16 and the motor 90 need not be direct. PWM generators 12, 14, 16 may be separate, or may be embodied within one or more PWM generators configured to generate one or more PWM drive signals appropriate for the presently disclosed techniques.
The controller 10 comprises a ripple analyzer 20 configured to obtain a plurality of voltage samples of each of the PWM drive signals and a plurality of current samples of each phase of the motor 90 at a sampling rate. In some embodiments, the ripple analyzer 20 is in communication with each PWM generator 12, 14, 16 and receives a value of the voltage of each PWM drive signal from the PWM generators 12, 14, 16. In other embodiments, the ripple analyzer 20 is configured to receive the PWM drive signal voltage samples from a voltage sensor. In other embodiments, the ripple analyzer 20 is configure to measure voltages. Other techniques for obtaining voltage samples will be apparent in light of the present disclosure. The ripple analyzer 20 determines a rotational (angular) position of the rotor 99. The rotational position of the rotor 99 may be determined as a position relative to the stator 98.
The ripple analyzer 20 may further comprise a current sensor 22 configured to obtain a plurality of current samples of each phase 92, 94, 96 of the motor 90 at the sampling rate. The current sensor 22 may be configured to determine a ripple current based on the current samples. The ripple analyzer 20 may further comprise a ripple flux generator 24 configured to obtain a plurality of voltage samples of each PWM drive signal at the sampling rate. As described above with respect to the ripple analyzer 20, the ripple flux generator 24 may obtain the plurality of voltages in various ways. The ripple flux generator 24 is configured to determine a ripple flux based on the plurality of voltage samples.
The ripple analyzer 20 may further comprise a position sensor 26 in electrical communication with the current sensor 22 and the ripple flux generator 24. In this manner, the position sensor 26 may be configured to receive the ripple current and ripple flux from the current sensor 22 and the ripple flux generator 24, respectively. The position sensor 26 is configured to determine a position of the rotor 99 of the motor 90 based on the ripple current and the ripple flux. Additional detail regarding the determination of ripple current, ripple flux, and rotor 99 position is provided below. A signal embodying the determined position of the rotor 99 may be used in a feedback loop to adjust the speed or other characteristics of the motor 90.
In another embodiment of the present disclosure, a processor-based controller 50 for a BLDC motor 90 having a saliency is provided. The controller 50 comprises a processor 52. The processor 52 may be any type of processor including a general-use processor, such as, for example, a microprocessor or microcontroller. In some embodiments, the processor 52 and programming may be implemented in hardware such as, for example, a field-programmable gate array (“FPGA”) or a digital signal processor (“DSP”), which may be an application-specific integrated circuit (“ASIC”), etc. Although described as a processor, it is to be appreciated that the processor 52 may be implemented in practice by any combination of hardware, software, and firmware. Also, the processor 52 steps as described herein may be performed by one unit, or divided up among different components, each of which may be implemented in turn by any combination of hardware, software, and firmware. Program code or instructions for the processor 52 to implement the various methods and steps described herein may be stored in processor readable storage media, such as, for example, memory, which may be a non-transitory medium.
The controller 50 comprises interface circuitry 54 configured to operable couple the processor 52 to the motor 90. Suitable interface circuitry 54 will be apparent to one having skill in the art in light of the present disclosure. Interface circuitry 54 may comprise, for example, electrical leads, electrical connectors, inverters, dead-band generators, etc., and combinations.
The processor 52 is programmed to perform any method according to the present disclosure. For example, in one embodiment, the processor 52 is programmed to provide a first PWM drive signal having a first voltage waveform to a first phase 92 of the motor 90 and a second PWM drive signal having a second voltage waveform to a second phase 94 of the motor 90, the first and second PWM drive signals being phase-shifted relative to each other. In the example, the processor 52 may be further programmed to obtain a plurality of measurements of a current of each phase 92, 94 of the motor over time and determine a position of a rotor 99 of the motor 90 based on the first and second voltage waveforms and the measured currents of the motor 90.
The present disclosure has been found to advantageously provide a fault detection capability for the current sensor and other circuitry. This capability results from the requirement of a ripple current. As such, if a ripple current is not present (e.g., not detected), a fault condition exists. Therefore, the present disclosure may be embodied as a method and/or system for fault detection, wherein a ripple current is determined by techniques such as those described herein, and wherein if the ripple current is determined to be non-existent (or the ripple current is outside of one or more pre-determined parameters), a fault condition exists. Embodiments of such methods for fault detection may be used in conjunction with the rotor position embodiments disclosed herein, or separately from the rotor position embodiments.
Exemplary Determination of Shaft Position
The present disclosure was confirmed using a MATLAB/Simulink model and was tested using the dSPACE prototyping system to drive an IPM motor. The following describes an exemplary mathematical derivation of rotor position using phase-shifted PWM drive signals, which can be embodied in circuitry and/or programming.
Although most motors have three phases, mathematically it is more convenient to work with a two phase equivalent for position sensing. It is possible to go directly from a complete mathematical motor model in three phases to two, but it is not convenient to deal rotor saliency directly. And even if the assumption is made that the inductances and mutual inductance vary sinusoidally with rotor angle (but offset by 120 degrees), the math is still somewhat tedious. A simpler approach is to start with the motor model in the dq reference frame and work back to the two phase model in the stationary (αβ) reference frame.
Motor Model
dq Reference Frame
Equation 1 shows the dq motor equation in its general form where Ld does not necessarily equal Lq. For many motors Ld≈Lq, but this is not true for IPM's or salient pole machines. Furthermore, it is possible to design in a saliency intentionally by shaping the magnets used on the rotor (see, e.g.,
This can be written more compactly as:
Noting that:
αβ Reference Frame
By using the park transform (a rotational transform), equation 2 is converted to the αβ reference frame using the relations:
Substituting equations 3 and 4 into equation 2, yields:
Then, solving for ναβ provides:
And, using the chain rule on the derivative provides:
The following terms are evaluated:
(θ)−1(θ), resulting in:
Remarkably, this means:
Which is independent of θ itself. This means that equation 8 can be greatly simplified as:
Where:
And:
But over one PWM cycle, ναβ and iαβ have an average part and a part oscillates with the PWM:
ν
αβ
=V
αβ
+{tilde over (ν)}
αβ (16)
i
αβ
=I
αβ
+{tilde over (ι)}
αβ (17)
Where Vαβ and Iαβ are the average parts (over one PWM cycle) and {tilde over (ν)}αβ and {tilde over (ι)}αβ are the parts that oscillate with the PWM.
And because of this, integrating the oscillating part of ναβ(τ) (that is {tilde over (ν)}αβ(τ)) gives:
∫tt+T
Note that the same holds true for Iαβ and {tilde over (ι)}αβ as well. Then substitution of equations 16 and 17 into equation 13 yields:
In addition, averaging equation 13 over one PWM period (and using equation 18) gives:
But as long as Tpwm is sufficiently small, the above equation can be approximated as:
Then, subtracting this (equation 22) from equation 20, results in an equation for the oscillating part:
This equation is useful in determining shaft position from the current ripple—equation 23 does not contain a magnet term, and there is only one term that is a function of θ.
Shaft Position Calculation
In the previous section, equation 23 was determined for the ripple currents in the motor. In the present section, this result is built upon to develop the mathematics and the methods that can be used for shaft position calculation in the exemplary embodiment. Recall that a resolver gives sine and cosine signals such that, once decoded, determination of shaft position is a rather trivial matter. One can use a tracking loop architecture, a straight up arctangent approach, etc. Only one term in equation 23 is a function of θ, that is 1(θ), and it is made up of the functions sin and cos (exactly what is needed to determine shaft position).
Recovering SIN and COS
Using the ripple current equation (same as equation 23):
And:
For most PWM systems, the magnitude of {tilde over (ν)}αβ will be the bus voltage (unless one is using a multilevel inverter), and the magnitude of the current ripple {tilde over (ι)}αβ is rarely greater than a couple of amps. For high voltage systems, the resistance is usually a couple of ohms and for low voltage systems the motor resistance is in the milliohms. The means that at low speeds, {tilde over (ν)}αβ>>(+ω2){tilde over (ι)}αβ. So, the following approximation holds:
Then, integrating both sides, results in:
{tilde over (λ)}
αβ=1(θ){tilde over (ι)}αβ (29)
Where
{tilde over (λ)}
αβ
=∫{tilde over (ν)}
αβ
dt (30)
{tilde over (λ)}
αβ can be determined directly from the PWM command. Then, over one PWM cycle, N samples of {tilde over (λ)}αβ and {tilde over (ι)}αβ can be accumulated to form the following 2×N matrices:
{tilde over (Λ)}αβ=[{tilde over (λ)}αβ(t1){tilde over (λ)}αβ(t2) . . . {tilde over (λ)}αβ(tN-1){tilde over (λ)}αβ(tN)] (31)
And
Ĩ
αβ
=[{tilde over (ι)}
αβ(t1){tilde over (ι)}αβ(t2) . . . {tilde over (ι)}αβ(tN-1){tilde over (ι)}αβ(tN)] (32)
And because of equation 29, the following is also true:
{tilde over (Λ)}αβ=1(θ)Ĩαβ (33)
As long as N>2, it will be possible to solve for 1 (θ). To do this, both sides of equation 33 are first multiplied by ĨαβT (the transpose of Ĩαβ) on the right. Which results in:
{tilde over (Λ)}αβĨαβT=1(θ)ĨαβĨαβT (34)
But ĨαβĨαβT is just a 2×2 matrix which is guaranteed to be invertible, so 1(θ) can be solved for:
1(θ)={tilde over (Λ)}αβĨαβT(ĨαβĨαβT)−1 (35)
Now, this will be unpacked to further review the calculation.
Similarly:
Furthermore:
Now it will be apparent how to calculate the inductance matrix in equation 35. But recall its structure from equation 24. Letting
provides:
So, to recover the sine's and cosine's from the inductance matrix:
Although the present disclosure has been described with respect to one or more particular embodiments, it will be understood that other embodiments of the present disclosure may be made without departing from the spirit and scope of the present disclosure. Hence, the present disclosure is deemed limited only by the appended claims and the reasonable interpretation thereof.