Average Current Sensing Empowers Blower Motors
Jun 1, 2007 12:00 PM
By Ramesh T. Ramamoorthy, Senior Applications Engineer, STMicroelectronics, Schaumburg, Ill.
News & Features From Auto Electronics
Committed to improving hybrid electric cars
New Motors for Hybrid Vehicles
Battery Firms Battle for Hybrid Hegemony
Innovative Bipolar Plates for Fuel Cells
See More Headlines
Top Articles
Exploring Current Transformer Applications
Ultracapacitor Technology Powers Electronic Circuits
Buck-Converter Design Demystified
Sensorless Motor Control Simplifies Washer Drives
PET Resources
Buyer's Guide
Conferences
Engineering Jobs
Power Electronics Events
Rent Our Lists
Spotlight on Digital Power
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
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 Converters

