Reconstruction of an average motor supply current using phase current measurement
10819257 ยท 2020-10-27
Assignee
Inventors
- Kamyar Khosravi (Manchester, NH, US)
- Masahira Kurihara (Edinburgh, GB)
- Andrew Adib (Musselburgh, GB)
- Robert D. Christie (Fife, GB)
Cpc classification
H02P6/153
ELECTRICITY
International classification
Abstract
Systems and methods for computing an average supply current to a motor include a current sensor that is configured to sense a current through the motor. A converter is configured to sample the output of the current sensor at times that are established by a trigger signal and convert the samples into digital current values. A trigger signal generator generates the trigger signal based on one or more pulse width modulated (PWM) motor control signals within a PWM cycle. An average supply current value that indicates the average supply current to the motor is computed by a controller using the digital current values received from the converter.
Claims
1. A method for computing an average supply current to a motor, the method comprising: sensing a current through the motor with a current sensor, wherein the motor comprises three phases, wherein each of a plurality of samples of the current sensor output is indicative of a current through one or more of a first phase of the motor and a second phase of the motor; generating a trigger signal based on one or more pulse width modulation (PWM) motor control signals within a PWM cycle; sampling an output of the current sensor at times established by the trigger signal; converting samples of the current sensor output into digital current values; and computing an average supply current value using the plurality of samples by integrating each of the plurality of samples over its corresponding PWM portion, summing the integration results, and dividing the summed integration results by the PWM cycle, the average supply current value being indicative of the average supply current to the motor based on the digital current values.
2. The method of claim 1, wherein sensing the current comprises sensing the current with one or more shunt resistors.
3. The method of claim 2, wherein sensing the current comprises coupling inputs of an amplifier across the one or more shunt resistors.
4. The method of claim 1, wherein generating the trigger signal comprises generating the trigger signal at a midpoint of one or more portions of the PWM cycle of the one or more PWM motor control signals.
5. The method of claim 1, wherein converting samples of the current sensor output comprises converting the current sensor output samples using an analog to digital converter.
6. Apparatus comprising: a current sensor configured to sense a current through a motor comprising three phases, wherein each of a plurality of samples of the current sensor output is indicative of a current through one or more of a first phase of the motor and a second phase of the motor; a converter configured to sample an output of the current sensor at times established by a trigger signal and to convert the current sensor output samples into digital current values; a controller configured to compute an average supply current value indicative of an average supply current to the motor based on the digital current values received from the converter using the plurality of samples by integrating each of the plurality of samples over its corresponding PWM portion, summing the integration results, and dividing the summed integration results by the PWM cycle; and a trigger signal generator configured to generate the trigger signal based on one or more pulse width modulation (PWM) motor control signals within a PWM cycle.
7. The apparatus of claim 6, wherein the current sensor comprises one or more shunt resistors.
8. The apparatus of claim 7, wherein the current sensor further comprises an amplifier having inputs coupled across the one or more shunt resistors.
9. The apparatus of claim 6, wherein the trigger signal generator is configured to generate the trigger signal at a midpoint of one or more portions of the PWM cycle of the one or more PWM motor control signals.
10. The apparatus of claim 6, wherein the converter comprises an analog to digital converter.
11. Apparatus comprising: means for sensing a current through a motor with a current sensor; means for generating a trigger signal based on one or more pulse width modulation (PWM) motor control signals within a PWM cycle; means for sampling an output of the current sensor at times established by the trigger signal; means for converting samples of current sensor output into digital current values; and means for computing an average supply current value indicative of an average supply current to the motor based on the digital current values, the computing means for computing the average supply current value comprising means for integrating each of the plurality of samples over its corresponding PWM portion, summing the integration results, and dividing the summed integration results by the PWM cycle.
12. The apparatus of claim 11, wherein the sensing means comprises one or more shunt resistors.
13. The apparatus of claim 12, wherein the sensing means comprises an amplifier having inputs coupled across the one or more shunt resistors.
14. The apparatus of claim 11, wherein the trigger signal generating means comprises means for generating the trigger signal at a midpoint of one or more portions of the PWM cycle of the one or more PWM motor control signals.
15. The apparatus of claim 11, wherein the converting means comprises an analog to digital converter.
16. The apparatus of claim 11, wherein the motor comprises three phases and wherein each of a plurality of samples of the current sensor output is indicative of a current through one or more of a first phase of the motor and a second phase of the motor.
17. The apparatus of claim 16, wherein the computing means comprises means for computing the average supply current value using the plurality of samples.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The foregoing and other objects, features and advantages will be apparent from the following more particular description of the embodiments and the appended claims, as illustrated in the accompanying drawings in which like reference characters refer to the same parts throughout the detailed description. Reference characters introduced in a figure may be repeated in one or more subsequent figures without additional description in the detailed description in order to provide context for other features of the described embodiments.
(2)
(3)
(4)
(5)
DETAILED DESCRIPTION
(6) Referring to
(7) The motor driver 20 includes a plurality of switches 80-90 that are coupled to the motor 30 to drive current through each phase coil of the motor 30. A current sensor or shunt resistor 94 connected between the low side switches 82, 86, 90 and ground can be used to sense the current through the motor 30. The voltage across the shunt resistor 94 can be measured and sampled with an analog to digital (ADC) converter 50 to obtain digital values of the measured voltage. A sense amplifier 96 can be used to obtain or sense the voltage across the shunt resistor 94 and amplify the sensed voltage. A trigger signal 75 can be used to direct the converter 50 to obtain the voltage across the shunt resistor 94 at predetermined times. With this arrangement, the average motor current can be computed by sampling the current sensor 94 output at a midpoint of one or more portion of the PWM cycle of the motor control signals and computing the average based on a plurality of current sensor output samples. In this way, the average motor supply current can be reconstructed by integration and summation of a plurality of samples of the current sensor output taken at the midpoints of the PWM cycle portions.
(8) More particularly, each phase of the motor 30 can be electrically connected to the motor driver 20 via one or more motor winding connection nodes S.sub.A 70, S.sub.B 72, S.sub.C 74, where each of these connection nodes can have an associated current, I.sub.A 60, I.sub.B 62, and I.sub.C 64 that flows into or out of the respective phase coils of the motor 30. While
(9) Switches within the motor driver circuit 20 can be associated with a phase of the motor 30. For example, the voltage provided to the motor 30 during phase A can be pulse width modulated by the switching of high side switch H.sub.A 80 and low side switch L.sub.A 82, and the modulated potential can be provided at motor winding connection node S.sub.A 70. The voltage provided to the motor 30 during phase B can be pulse width modulated by the switching of high side switch H.sub.B 84 and low side switch L.sub.B 86, and the modulated potential can be provided at motor winding connection node S.sub.B 72. The voltage provided to the motor 30 during phase C can be pulse width modulated by the switching of high side switch H.sub.C 88 and low side switch L.sub.C 90, and the modulated potential can be provided at motor winding connection node S.sub.C 74. Thus, switches H.sub.A 80 and L.sub.A 82 are associated with phase A of the motor 30, switches H.sub.B 84 and L.sub.B 86 are associated with the phase B of the motor 30, and switches H.sub.C 88 and L.sub.C 90 are associated with the phase C of the motor 30. The switches 80, 82, 84, 86, 88, 90 can be any switch including high-speed analog switches such as a Field Effect Transistor (FET). Each switch 80, 82, 84, 86, 88, 90 can have a body diode associated therewith.
(10) The switches within the motor driver circuit 20 can be pulse width modulated according to one or more control signals. The switches can be switched using center aligned pulse width modulated control signals. When the control signal is modulated using a center aligned modulation, the midpoint of each switch's PWM control signal is aligned. This alignment is demonstrated in
(11) The controller 10 can be electrically and communicatively connected to the motor 30 and the motor driver 20, and in particular the converter 50 and the PWM module 40 within the motor driver 20. In some instances, the controller 10 can be electrically and communicatively connected to each switch 80, 82, 84, 86, 88, 90 such that the controller 10 can issue control signals to each switch to control its operation. The controller 10 can be a microcontroller, microprocessor, processor, a combination of logic gates or any other element capable of processing code or a set of instructions to carry out an algorithmic process. As used herein, the term processor is used to describe an electronic circuit that performs a function, an operation, or a sequence of operations. The function, operation, or sequence of operations can be hard coded into the electronic circuit or soft coded by way of instructions held in a memory device. A processor can perform the function, operation, or sequence of operations using digital values or using analog signals. In some embodiments, the processor can be embodied in an application specific integrated circuit (ASIC), which can be an analog ASIC or a digital ASIC. In some embodiments, the processor can be embodied in a microprocessor with associated program memory. In some embodiments, the processor can be embodied in a discrete electronic circuit, which can be an analog or digital. A processor can contain internal processors or internal modules that perform portions of the function, operation, or sequence of operations of the processor. Similarly, a module can contain internal processors or internal modules that perform portions of the function, operation, or sequence of operations of the module.
(12) It should be appreciated that while
(13) A supply voltage or potential (Vsupply) 98 can be provided to the motor driver circuit 20. Current I.sub.A-C 60-64 is delivered to the motor phases (i.e., phase A, phase B, and phase C), by pulse width modulation (PWM) control of switches 80, 82, 84, 86, 88, 90. More particularly, control signals generated by the controller 10 can be coupled to the control terminal (e.g., gate) of each of the switches 80, 82, 84, 86, 88, 90 to selectively turn on and off the switches with a predetermined sequence and duty cycle to actuate the motor 30.
(14) A shunt resistor 94 senses the current flowing through each of the motor's phases, i.e., phase A, phase B, and phase C, and is connected between ground and a connection node 93 electrically connected to the low side switches of the motor driver 20. Current flows through the shunt resistor 94 when at least one low side switch, i.e. L.sub.A 82, L.sub.B 86, L.sub.C 90, is on or closed. When current flows through the shunt resistor 94, a voltage is generated across the resistor 94. A sense amplifier 96 that has inputs coupled across the shunt resistor 94 senses the voltage across the shunt resistor 94 and outputs a conditioned, sensed voltage signal to an analog to digital converter 50.
(15) The shunt resistor 94 can be referred to as a current sensor, and in some instances the combination of the shunt resistor 94 and the sense amplifier 96 can be referred to as a current sensor. It should be appreciated that while
(16) The converter 50 can be an analog to digital converter that converts the output of the sense amplifier 96 to a digital voltage signal. In some embodiments, the converter 50 can have input voltage requirements that require attenuation of the voltage output by the sense amplifier 96. The converter 50 outputs the digitized, sensed voltage values to the controller 10, and using the resistance value of the shunt resistor 94 and the voltage value output by the converter 50, the controller 10 can calculate the amount of current flowing through the shunt resistor 94.
(17) Included within the PWM module 40 is a comparator that handles dead time 46 associated with the switch signals (Hx, Lx) 54. It will be appreciated that switch signals (Hx, Lx) 54 refer to control signals for switches H.sub.A 80, H.sub.B 84, H.sub.C 88, L.sub.A 82, L.sub.B 86 and L.sub.C 90. This dead time comparator 46 receives the switch control signals 54 and identifies periods of dead time within the received signals 54. When a high side switch opens and before a low side switch closes, there can be a period of time during which both switches are open. This period of time is referred to as dead time and is implemented to prevent short circuits within the system.
(18) A PWM trigger point reference 44 receives the identified dead time periods from the dead time comparator 46 and uses the identified dead time periods to determine an optimum time period during each low side switch's PWM period to sample the shunt resistor 94 current. Determining when to sample the shunt resistor 94 and/or the sense comparator 96 includes identifying the midpoint for each PWM period of the low side switches (i.e., L.sub.A 82, L.sub.B 86, L.sub.C 90) and then shifting that midpoint by a time period equal to one-half of the corresponding dead time period. Identifying the midpoint for each PWM period and quantifying an amount of dead time can include using a number of counts corresponding to the counts generated by the counter 52. For example, the PWM trigger point reference 44 determines using the switch signal 54 for the L.sub.C 90 switch that the PWM period occurs from count one (1) to count twenty-seven (27) and therefore the midpoint of that PWM period occurs at count thirteen (13). The PWM trigger point reference 44 obtains dead time period information for switch L.sub.C 90; in this example the dead time period for that switch 90 can be two (2) counts. The PWM trigger point reference 44 shifts the midpoint of the L.sub.C switch's PWM period (i.e., thirteen) by a value equal to one-half of the dead time value (i.e., one) such that the modified midpoint is fourteen (14). The PWM periods for the low side switches 82, 86, 90 are center aligned and therefore have the same midpoint. In the previous example, if the midpoint of the L.sub.C switch's PWM period is fourteen (14), then the midpoint of the L.sub.A switch's PWM period and the L.sub.B switch's PWM period is also fourteen (14). By identifying the midpoint of the one switch's PWM period, the PWM trigger point reference 44 identifies the midpoint of all low side switches' PWM period.
(19) It should be appreciated that in some embodiments, the controller 10 carries out the above-described methods and uses the switch signals 54 and the dead time period(s) identified by the dead time comparator 46 to identify the midpoint of each switch signal's PWM period and shift that midpoint by an amount equal to one-half of the corresponding dead time period. In these embodiments, the controller 10 can store the calculated midpoint as a PWM trigger point reference 44 value in a memory element within the PWM module 40.
(20) Referenced above, the counter 52 included within the PWM module 40 counts incrementally for a predetermined period of time and is used to identify units of time within the motor driver 20 and the controller 10. For example, the counter 52 can continuously count from one to four thousand, or for any period of time. The counts of the counter 52 can be used to define PWM periods, dead time periods of time, the midpoint of each PWM period and trigger points.
(21) The ADC trigger point reference 48 can be used to identify trigger reference values that can be used by a comparator 42 to generate a trigger signal 75. The trigger signal 75 can be relayed via a communication line between the comparator 42 and the converter 50. Once the midpoint for the PWM periods of the low side switches is identified by either the PWM trigger point reference 44 or the controller 10, the ADC trigger point reference 48 can calculate one or more trigger reference values. For example, the ADC trigger point reference 48 can use an obtained midpoint value of two thousand (2000) counts to identify trigger point references values at one thousand (1000) and three thousand (3000).
(22) Comparator 42 receives a count value from the counter 52 and one or more trigger reference values from the ADC trigger point reference 48 and generates one or more trigger signals 75. This comparator 42 can be referred to as a trigger signal generator and can generate the trigger signal 75 by comparing a current count from the counter 52 to the ADC trigger point reference 48 value and outputting a trigger signal when the counter's count is the same as the count identified by the ADC trigger point reference 48.
(23) The comparator 42 outputs trigger signals 75 to the converter 50 and the converter 50 uses the trigger signals 75 to determine when to sample the output of the sense comparator 96. In the previous example, the converter 50 would respond to the trigger signals 75 and sample the sense comparator 96 output at count one thousand (1000) and count three thousand (3000). In some embodiments, the converter 50 can further include a sample and hold circuit (S/H circuit) that holds the sampled value for a predetermined period of time or until the converter 50 receives another trigger signal. For example, when the converter 50 receives a trigger signal at count one thousand (1000), the converter 50 samples the output of the sense comparator 96, converts that output to a digital voltage signal and holds the digital voltage signal value until the next trigger signal at count three thousand (3000) is received.
(24) As previously stated, the controller 10 obtains the voltage signal from the converter 50 and uses that value and the known resistance value of the shunt resistor 94 to calculate the current flow through the shunt resistor 94. The average supply current can be reconstructed by the controller 10 using these calculated shunt resistor 94 current values.
(25) At any point in time, the current flowing through the shunt resistor 94 can be indicative of the phase current of one or more motor phases, therefore further processing is required to extract each phase current from the measured current. According to Kirchhoff's law, the sum of all currents in a three-phase machine is 0 as shown in Equation 1:
i.sub.A+i.sub.B+i.sub.C=0 Equation 1
where i.sub.A is the current through phase A of the motor 30, i.sub.B is the current through phase B of the motor 30 and i.sub.C is the current through phase C of the motor 30. As demonstrated by Equation 1, the sum of currents from two phases will give the negative of the third phase current (i.e., i.sub.A+i.sub.B=i.sub.C), therefore the third current can be calculated when the controller 10 knows the value of at least two currents.
(26) Trigger reference values are determined so that the converter 50 samples the output of the sense comparator 96 at points in time when the current flowing through the shunt resistor 94 represents one or more phase currents of the motor 30. By calculating current values at certain points in time along the PWM period and knowing the points in time, the average supply current can be calculated using Equation 2:
(27)
(28) where i.sub.avg1 is the current sampled by the converter 50 at the midpoint of time period t1, i.sub.avg2 is the current sampled by the converter 50 at the midpoint of time period t2, i.sub.avg3 is the current sampled by the converter 50 at the midpoint of time period t3, i.sub.avg4 is the current sampled by the converter a 50 at the midpoint of time period t4, is the length of the first time period, t2 is the length of the second time period, t3 is the length of the third time period, t4 is the length of the fourth time period, and t.sub.PWM is the PWM time period. Equation 2 can be used to calculate the average supply current because current flows from a supply (V.sub.supply 98) to a load (motor 30), or from the load (motor 30) to the supply voltage (V.sub.supply 98) when one or two of the low side switches, i.e., L.sub.A 82, L.sub.B 86 and L.sub.C 90, are switched on. In other instances, (i.e., when no low side switches are switched on, or when all three low side switches are switched on), the current will recirculate through the phases of the load (motor 30). Therefore, by measuring current when one or two of the low side switches 82, 86, 90 are switched on and computing the average current value within each PWM period, Equation 2 can be used to determine the average supply current to the load (motor 30).
(29) The controller 10 is electrically and communicatively connected to the PWM module 40 and can access various modules and stored values within the PWM module 40. For example, the value of the PWM trigger point reference 44 and the ADC trigger point reference 48 can be received from the PWM module 40 and/or generated by the controller 10 using values obtained from the converter 50 and the PWM module 40. Illustrated in
(30) The controller 10 is communicatively and electrically connected to the converter 50 and receives the converted voltage signal from the converter 50. In some instances, the controller 10 can obtain a continuous voltage signal from the converter 50 and in other instances the controller 10 can obtain a voltage signal value from the converter 50 at discrete points in time that correspond to an ADC trigger point reference 48 value or a PWM trigger point reference 44 value (step 210). Using the sampled voltage signal from the converter 50 and the resistance value of the shunt resistor 94, the controller 10 can calculate the current flowing through the shunt resistor 94 at particular points in time. This calculation is repeated iteratively while the controller 10 continues obtaining converter 50 signals (step 210). The controller 10 also continuously calculates the ADC trigger point reference 48 and the PWM trigger point reference 44 using the switch signals 54 and the identified dead time periods (step 230). Iteratively calculating these trigger point reference values 44, 48 accounts for changes in the PWM periods of the switches 80, 82, 84, 86, 88, 90.
(31) Illustrated in
(32) TABLE-US-00001 TABLE 1 t1 t2 t3 t4 t5 i.sub.A i.sub.C 0 i.sub.C i.sub.A
As demonstrated in Table 1, when the current through the shunt resistor 94 is sampled during t1, the measured current 310 is equivalent to the phase current for phase A of the motor 30, i.e., i.sub.A. When the current through the shunt resistor 94 is sampled during t2, the measured current 310 is equivalent to the negative phase current for phase C of the motor 30, i.e., i.sub.C. Per Equation 1, the negative current for phase C of the motor 30, i.sub.C, is equal to the sum of the current through phase A and the current through phase B, i.e., i.sub.A+i.sub.B. The current sampled at time t4 is the same as the current sampled at t2, and the current sampled at t5 is the same as the current sampled at t1. When the current through the shunt resistor 94 is sampled during t3, the measured current 310 is zero (0) because at that point, all three phase currents are sampled, i.e., i.sub.A+i.sub.B+i.sub.C. It should be noted that sensing the current through the shunt resistor 94 can include using the sense comparator 96 to sense the voltage across the shunt resistor 94, and using the controller 10 to ultimately calculate the current through the shunt resistor 94 using the sensed voltage and resistance value of the shunt resistor 94, as described above.
(33) The controller can use the sensed i.sub.A and i.sub.C current according to Equation 1 to determine the current through phase B of the motor 30. Upon determining the current through all phases of the motor 30, the controller can use Equation 2 to calculate the average supply current. Although
(34) Illustrated in
(35) TABLE-US-00002 TABLE 2 t1 t2 t3 t4 t5 I.sub.avg1 I.sub.avg2 0 I.sub.avg3 I.sub.avg4
Because the current sensor current 410 is recreated using the digital voltage values from the converter 50, the actual waveform 410 illustrated in
(36) TABLE-US-00003 TABLE 3 Time Period t1 t2 t3 t4 t5 Current through the Current I.sub.avg1 I.sub.avg2 0 I.sub.avg3 I.sub.avg4 Sensor Sampled Current I1 I2 N/A I3 I4 Corresponding Phase Current i.sub.A i.sub.C 0 i.sub.C i.sub.A
(37) Using the sampled current values, i.e., I1 450, I2 455, I3 460 and I4 465, and the values of the time period, the controller 10 can reconstruct the average supply current in accordance with Equation 2. It should be appreciated that prior to applying Equation 2 to the obtained values, the output of the converter 50 obtained by the controller 10 is used to calculate the corresponding current through the shunt resistor 94.
(38) It should be appreciated that the circuit architectures and methods described herein are merely embodiments of the system for reconstructing the average current supplied to a motor, and that aspects of this system can be modified while maintaining the function of the system. All publications and references cited herein are expressly incorporated by reference in their entirety.