Average Current Sensing Empowers Blower Motors
Brushless dc (BLDC) motors are widely used in industrial and home applications, such as in HVAC blowers, because of their efficiency and cost advantage. Furthermore, sensorless control of BLDC motors is preferred because of the even lower cost this method provides. The operating speed range in such applications does not warrant sensors either. However, accurate control of torque for blower motors is critical from a performance standpoint, as the air-flow rate is characterized based on torque.
Torque is directly proportional to the average motor current and hence current loop is crucial to the performance. Linearity of this loop is influenced by the faithfulness of current feedback. Most simple methods based on shunt-current sensing are not linear, whereas other approaches are expensive.
However, a new technique overcomes these limitations by sampling the dc-link current at the center of the pulse width modulator (PWM) on-time. This technique has been implemented in a control chip that provides sensorless control of a BLDC motor.
Approaches to Torque Control
A BLDC motor driven in the conventional six-step method resembles a brushed-dc motor, except that the winding positions are reversed and the commutator is replaced by an inverter. Hence, one might think of regulating the average dc-link current for torque control, but this will result in regulating power instead of torque. Because at a constant dc-link voltage, regulating average dc-link current will only regulate power output. This will lead to the motor current (torque) varying inversely with its speed, depending on applied motor load. Any effort to compensate the average dc-link current data with the duty cycle to obtain the average phase current can be impaired by noise-filter time constants, usually rendering this option ineffective.
The dc-link current does not reveal winding currents during the PWM off-time, so a designer could choose to monitor all three winding currents continuously and build a regulator. To do so would require two current sensors to monitor any two-phase currents. While the third-phase current can be reconstructed from these two, the cost of the sensors makes this option expensive.
A third option would be to regulate the peak current per PWM period. Though this method is inexpensive and easy to implement, it is not linear. During the PWM on-time, at lower duty cycles where speed and back electromotive force (BEMF) are small, the phase current rises much faster than at higher duty cycles where speed and BEMF are large. The same peak currents per PWM period represent different average currents for different duty cycles. An intuitive geometric approach reveals this (Fig. 1). A typical variation in average current versus duty cycle at a given peak-current reference is shown in Fig. 2.
More on Buck Converters
• Buck-Converter Design Demystified • Optimizing Voltage Selection in Buck Converters • Power Conversion Synthesis Part 1: Buck Converter Design • Improving Efficiency in Synchronous Buck ConvertersObtaining Average Current
For linear torque control, it is important to have the average phase current as feedback to the current regulator. Preferably, this information will come from the dc-link current using only a shunt resistor because of its low cost and simplicity. However, the dc-link current is not continuous and is present only during the PWM on-time. During the PWM off-time, the load current freewheels back through the freewheeling diodes in the inverter without passing through the dc-link resistor. To appreciate this fact, analyze a simple buck converter feeding an R-L load (Fig. 3).
Consider that the switching frequency, PWM on-time and load inductance are such that the load current is continuous. If the PWM frequency is greater than the corner frequency of the load by a few orders of magnitude, then the load current will be more linear than exponential.
Fig. 4 shows the load voltage, load current and dc-link current waveforms. A close look at the load current waveform reveals that its average value is equal to its instantaneous value at the center of the PWM on-time or off-time. Since the load current flows through the dc-link shunt resistor only during the PWM on-time, sampling the dc-link current at the center of the PWM on-time gives the average load current.
When considering the dc-link current, there is an analogy between a buck converter feeding an R-L load and a three-phase inverter feeding a BLDC motor operating in six-step mode (Fig. 5). In six-step mode, only two of the three phases of the BLDC motor carry current, while the third phase simply floats (except for short durations after a commutation when the outgoing phase is in the process of losing its stored inductive energy).
From an inverter standpoint, only two switches are enabled to carry current at any time: one from the group of three high-side devices and one from the group of three bottom-side devices, depending on which windings should carry the current at that instant. The impedance presented to the dc bus appears as two windings in series, connecting with the bus at a certain duty cycle. This is true even though the windings get switched in and out sequentially at different times. Under these circumstances, the inverter closely resembles the buck converter. Hence, sampling the dc-link current at the center of the PWM on-time directly gives the average motor current, which can then be used in a feedback loop for torque control or current control.
ST7FMC Motor Control
The main feature of STMicroelectronics' ST7FMC is its motor control macro cell, which is capable of generating control signals to drive a sensorless or sensored three-phase BLDC or ac motor. References 1 through 5 explain in detail the various methods used to control a three-phase BLDC motor using ST7FMC.
Fig. 6 shows the simplified block diagram of the ST7FMC's motor-control macrocell hardware. The macro-cell has multiple timers performing various functions in parallel to generate control pulses for the motor. A self-clock-scaling 8-bit timer (MTIM) monitors the time difference between successive phase BEMF zero crossings (Z events) of the motor.
When a Z event occurs, the timer value is captured into MZREG and the timer restarts counting from zero. Simultaneously, the previous content of MZREG is transferred to MZPRV. This timer is a part of what is called delay manager, which establishes the timing for the next instant of phase commutation (C events). All in parallel, a 12-bit free-running counter generates the PWM carrier for inverter switching. A PWM output is generated as a result of comparison between this carrier and a compare register (MCPU) that carries pulse-width (duty cycle) information. This PWM signal is directed to one of the six inverter switches by a channel manager that acts as a de-multiplexer on the PWM output. The channel manager also selects a complementary switch, as programmed by the user, that, together with the switch receiving PWM, will force current into the motor windings. Based on the motor-terminal voltages or Hall sensor outputs, an analog block identifies the motor-phase BEMF Z events and captures the contents of the MTIM timer into MZREG and the previous value of MZREG into MZPRV, beginning a new cycle.
ST7FMC Implementation
A typical diagram of the ST7FMC-based sensorless control of a BLDC motor[2] is shown in Fig. 7.
Any digital implementation of closed-loop control will require the sampling of reference and feedback parameters at regular time intervals, followed by a corrective action. In this particular case of closed-loop average-current control, the periodic sampling instances must coincide with the center of the PWM on-time for the reasons described previously. This can be easily realized if the sampling period is an integral multiple of the PWM period.
Fig. 8 shows the PWM carrier configured in center-aligned mode, where the counter counts up to a maximum value (as defined by MCP0) and then counts down to zero and repeats this cycle again. The frequency of clock and the magnitude of carrier decides the period (or frequency) of the PWM carrier (see the “Carrier Frequency Example” section for how to set the PWM frequency). Once every N carrier cycles, as set by MREP, a duty-cycle update interrupt (UEVENT) is generated when a new duty-cycle value is transferred from a preload register (MCPU) to an active register (see the “Carrier Frequency Example” section for how to set the periodicity of this interrupt). The timing of the UEVENT or interrupt is such that it happens right at the center of the PWM on-time. Hence, this instance provides the appropriate timing for sampling the dc-link current for closed-loop control. The number of carrier cycles per sampling period must be chosen to provide enough compute time for corrective action.
Because of the time-sensitive nature of this update interrupt, it must be set to the highest priority. The very first instruction in this interrupt service routine (ISR) should read the dc-link current value. In any case, there is an interrupt latency time of approximately 3 µs to 4 µs, which is also the typical conversion time of the on-chip analog-to-digital converter (ADC). If the current feedback analog input channel was previously selected and set for sampling continuously, then when the first instruction in the UEVENT ISR reads the ADC data register, it will aptly hold the dc-link current value fairly close to that during the center of the PWM on-time.
The sequential steps listed in the sidebar above show the actions within the UEVENT ISR. To coordinate the reading of any other analog inputs to the ADC, it is recommended that they all be read within this UEVENT subroutine after the dc-link current's read. However, before returning from the interrupt, it is important to restore the ADC to sample the dc-link current channel again so that on re-entry in the next UEVENT, the dc-link current value can be read from the ADC right away. If required, interrupt priority of this routine can be lowered after reading the current value upon entry, but should be restored to the highest value before returning for obvious reasons.
Experimental Results
Experimental implementation of the ST7FMC sensorless motor-control scheme yielded satisfactory results. A closed-loop regulator for BLDC motor control with inner current and outer speed loops (Fig. 9) was implemented. A current-loop sampling time of 500 µs and a speed-loop sampling time of 2 ms were chosen. The amount of computing time required within a 2-ms time window to execute through a full cycle of the control loop and all the motor-control ISRs at an electrical frequency of 200 Hz is less than 1 ms. The waveforms obtained from this system in Fig. 10 show the convergence of the reference and dc-link current values at the instance of occurrence of UEVENT, which is the feedback sampling instance. Notice that the UEVENT occurs at the center of the PWM on-time. Fig. 11 shows the tight control of motor average phase current provided by this system for a given current reference.
The experiments performed based on the described method gave fairly linear current control. One limitation of this sampling method occurs when the motor current becomes discontinuous. In this case, the actual average current is less than the instantaneous value at the midpoint of the PWM on-time, and correcting this error is quite cumbersome.
Carrier Frequency Example
A procedure to set the carrier frequency (FPWM) and periodicity of a UEVENT (TU) for sampling the inner current loop (Fig. 12) is as follows:
Choosing FPWM = 16 kHz,
FMTC is the frequency of the carrier generation timer clock. And given that FMTC = 16 MHz and choosing Prescaler = 1, then MCP0 = 500.
Choosing TU = 500 µs,
Substituting for TU and TPWM , MREP = 15.
References
1. Shao, J., “An Improved Microcontroller-Based Sensorless Brushless DC (BLDC) Motor Drive for Automotive Applications,” IEEE IAS 2005.
2. Shao, J., and Nolan, D., “Further Improvement of Direct Back EMF Detection for Sensorless Brushless DC (BLDC) Motor Drives,” APEC 2005.
4. Application Note AN1946, “Sensorless BLDC Motor Control and BEMF Sampling Methods with ST7MC,” STMicro-electronics, www.st.com/stonline/books/pdf/docs/10401.pdf.
5. Application Note AN2030, “Back EMF Detection During PWM On-time by ST7MC,” STMicroelectronics, www.st.com/stonline/books/pdf/docs/10775.pdf.
Update Event Interrupt Subroutine
UEVENTISR
- Start U
- Read current feedback
- Set U ISR priority lower if required
- Read other analog inputs
- Current loop PI regulator
- Duty-cycle update
- Set ADC channel back to sample current feedback
- Restore ISR priority to the highest
- End U