Design Article

IMG1

Designing a MCU-driven permanent magnet BLDC motor controller: Part 1

David Swanson and Kurt Perski, STMicroelectronics

7/13/2008 3:23 PM EDT

BLDC motors have a lot of advantages in automotive applications. They are lighter weight, more durable, and consume less current than their brushed cousins. They have an excellent low end torque capability and can be quite capable of a very wide speed range.

This translates to an optimum solution for many applications within the nasty automotive environment we all know and love. Applications such as fuel pump, HVAC blower motor, seat cooling fan, engine cooling fan, AC compressor motor, and water pump, to name a few, can benefit greatly from BLDC technology.

Anything with a continuous or high duty and/or in need of variable speed control could easily benefit both fiscally and durability-wise from BLDC motor technology.

It wasn't so long ago when BLDC motor controllers were cumbersome and expensive. Their difficulty to implement, inability to start reliably (without extra position sensing help), and overall cost kept the BLDC option off of the table. The inverters used to drive the windings alone were prohibitive in cost and in size.

Thanks to Moore's law (and the Power MOSFET derivative of it), the cost and size of these components have dropped dramatically. So much so that folks are looking seriously at those aforementioned applications and thinking positively. When performance and reliability go up, at the same time that costs comes down, the folks that count the pennies begin to smile. I think that we're there.

There are many microcontrollers that can easily control a brushless motor. Some are more capable than others at doing this task. A lot has to do with their peripherals. Some have the right kind of analog to digital converter controls allowing synchronous sampling of an analog voltage.

Others have dedicated motor control peripherals allowing for efficient Back EMF sensing, proper timing of different key moments in a brushless control algorithm. Since there are several different micros to choose from, we will begin by focusing on the tasks at hand, controlling a brushless motor, and then start getting a bit specific as we get into the design of the controller itself.

Typical motor configurations
A brush-type permanent magnet motor has the magnets in the stator, or the stationary part of the motor, and the windings in the rotor. As the rotor rotates between the brushes, the commutation, or switching from one phase to the next, naturally happens. It's a mechanical thing. It is a simple and somewhat reliable solution although brushes are the weakest link in the durability "chain."

Brushless motors are just that, brushless. They have to commutate the windings by some other means other than brushes and commutator bars. We hope to do it using semiconductors. Things are a bit switched around in a brushless motor. In a permanent magnet brushless DC motor, the magnets are in the rotor and the switched, or commutated, windings are in the stator.

Figure 1. Wye and Delta winding configurations

This takes a fairly simple design, brushes and commutator bars, and makes it much more complex (resistors, MOSFETs, capacitors, a microcontroller, Voltage regulator), more reliable, easier to use, cheaper and better " we know it will be better... It has to be.

Typical brushless motors are three phase machines with either wye or delta wound stators, with the vast majority of them being wye wound. The driving mechanism is the same for both.

The difference is that a wye wound machine has one end of all of the phases connected together in the middle. If there are three phases then this looks like a "Y"; hence the "wye" nomenclature. A delta wound machine ties the ends together such that, for a three phase machine, the configuration looks like a triangle, or a delta.

Phases and Poles
Phases refer to the number of separate sets of windings in the stator. Within a phase there may be a number of poles. Poles are typically referred to in pairs of 2, 4, 6, 8, or more (or it can be expressed in pole pairs such as 1, 2, 3, or 4 pole pairs).

Each phase will have the same number of poles. In a 3 phase 2 pole motor going around the 360° (electrical) corresponds to the actual or mechanical 360° rotation.

As poles are added, the number of electrical degrees is multiplied to create the same mechanical or rotational degrees. For example, a 4 pole machine will take 720° (360°x2) electrical to obtain one full revolution of the rotor.

Other than this subtle difference, the number of poles does not change how the motor is driven. It only changes the actual speed of the motor with a given "electrical speed."

Back Electro-Motive Force
Take a brushless motor of any kind, stick an oscilloscope across any two leads and spin the rotor. You will see a periodic voltage oscillating at a frequency proportional to the motor rotational speed (see "Phases and Poles" above).

This is the basic result of passing a winding through a magnetic field (or B-Field). The changing B-field causes a voltage to appear across the windings. This voltage is called Back Electro-Motive Force, Back EMF, or BEMF for short.

Figure 2. Back EMF voltages in a spinning motor (Top: Three Phases; Bottom: Three Phases Overlap)

A motor can be wound such that the waveform you get when you spin it is either sinusoidal or more trapezoidal. Figure 2 above illustrates a more trapezoidal configuration. Driving a sinusoidal wound motor with a pure three phase sinusoidal signal provides the smooth control needed for applications like electric power steering.

However, the applications addressed here do not require such finesse. These applications just need to spin at a given speed. A little torque ripple due to not being driven optimally is not a big issue. As a result, this discussion is limited to trapezoidal wound / controlled motors.

Driving the Phases
A trapezoidally driven three phase brushless motor traverses 360 degrees electrical through a six step approach as shown in Figure 3 below. Each phase is driven for 120 degrees electrical then tri-stated for 60 degree electrical.

At any given point, one phase is driven high and another is driven low with the third phase left floating, or tri-stated. That tri-stated portion of the waveform is where the BEMF is transitioning from one polarity to the other. The rotor position information for commutation timing is found during this transition time.

Figure 3. Driving a three phase brushless motor

Position Sensing - When to Commutate
Sensing the BEMF generated during normal rotation of the rotor is a "free" solution to knowing rotor position. An easy reference point is where the BEMF transits from one polarity to another, or the "zero crossing point."

The "zero crossing point" occurs during the 60° electrical time when the phase is floating. Commutation does not occur at this point; rather it is used as a reference point to get a good idea as to where the rotor is positioned.

Figure 4. A simplified illustration of the three phases of a driven motor.

The BEMF information used to discern rotor position is essentially the voltage from the center point to the motor lead of the floating phase. To measure this voltage, we have to know what the center point is.

One typical method is to fabricate this neutral voltage by tying three resistors together, one from each phase. Another common method is to tap into the neutral point directly. The method to be discussed here will do something altogether different " and better.

Figure 5. One phase during normal PWM switching

As stated earlier, in a trapezoidally driven BLDC motor, at any given moment one phase is pulled high, and other is pulled low while the third is floating and in transition from either high-to-low or low-to-high. If the MOSFET that is pulling the one phase high is chopped, then motor inductance will cause that phase voltage to fall to just below ground as the lower transistor conducts on that phase in the reverse direction (see Figure 6 below).

Figure 6.Inductance causes the current to continue to flow when the high-side switch is turned off.

Starting from when the Phase A upper switch is off and the lower switch is conducting from ground (Figure 6 above), the following equations can be generated:

From phase A, we can derive the value of the neutral voltage Vn:

From phase B, we can derive the value of Vn in a different way:

For the unused Phase C we can derive the value of Vn in a third way:

From (1) and (2), we derive a value of Vn that is independent of motor inductance or resistance:

In a balanced three-phase system the sum of the phase EMF voltages is equal to zero:

Incorporating equation (5) into equation (4) yields

Using equations (3) and (6) the terminal voltage Vc can be expressed:

A few observations can be made. First, the voltage seen at VC is zero when the BEMF on phase C is crossing zero. Second, the gain of the BEMF signal is 150% of the actual BEMF.

From this it is apparent that the sensitivity of this sensing method is superior to anything that has to attenuate the sensed voltage prior to bringing it into a control circuit.

The ability to sense BEMF is the key factor in fast and reliable starting. This is the fastest way of starting a brushless motor. With this, you can even drive any higher voltage motor without any signal attenuation.

Figure 7 below illustrates what the micro sees when sensing BEMF in this way. Note that the zero crossing information is well within the 5V range of the micro input.

Figure 7. BEMF signal sensing at the micro - capped at 5V.

Since there needs to be an "off-time" to discern the BEMF on the unused phase, the PWM duty cycle is limited to a maximum. This limits the amount of power the motor can deliver since the phases can never be fully turned on.

At this point the BEMF is quite high. During this time, the sensing method can change from sensing only when the upper phase is freewheeling to when the upper phase is on.

This requires dynamically adding a voltage divider on the phase sense inputs and changing the zero crossing reference point (see the "high-side Sensing" block in Figure 8 below). Using three micro ports and three resistors the system can, on demand, begin to attenuate the BEMF signal such that the micro can "read" the unused phase voltage when the high-side switch is on.

This changes the zero crossing point from something close to zero volts (according to Equation 7 above) to something close to half of the battery voltage. If we go back through the equations with the Phase A high-side switch still on, the resulting neutral or center point voltage looks like this:

Now using this new reference point (1/2VDC) when the other two phases are active (one driven high and the other low) and attenuating the phase voltage appropriately, the motor can be driven with no PWM-ing or chopping.

This provides for a full-on condition. Attenuation of the BEMF signal at this point is not critical. The motor is already spinning fairly quickly and generating a healthy amount of BEMF.

Figure 8. A running motor at full duty cycle.

Starting a sensorless motor
There is only one minor catch with sensing BEMF to determine rotor position. In order to rotate the motor properly, and in the right direction, the position of the rotor must be known first.

But that information is not available until the rotor is spinning. So, the rotor is pulled into a known position by powering two phases and holding them for a while. This provides a known electrical positioning of the motor.

Figure 9. Current and motor speed information at start-up.

From that position, the phases can be stepped blindly as a stepper motor would be but in a way that smoothly accelerates the rotor up to a "sense-able" speed. At that point, the BEMF sensing can be used to determine when to commutate the stator.

Next in Part 2: Designing the hardware and software

David Swanson is a principal engineer in the Automotive Business Unit of STMicroelectronics. He has a BSEE from North Carolina State University and holds several automotive-related patents. Kurt Perski is a Microcontroller Field Applications Engineer with STMicroelectronics, whose professional interests focus on embedded software design.


print

email

rss

Bookmark and Share

Joinpost comment




Please sign in to post comment

Navigate to related information

Most Popular

Product Parts Search

Enter part number or keyword
PartsSearch


FeedbackForm