Sensorless Control of a Brushless DC Motor
Digital signal controllers make it possible to meet motor torque and speed demands without employing rotor position sensors.
This article discusses a sensorless technique to control brushless direct current (BLDC) motors using a majority filter implemented on a digital signal controller (DSC). It is intended for the developer who wants to drive a sensorless BLDC motor using a new motor-control technique.
The technique, called sensorless trapezoidal control, eliminates the use of discrete, low-pass filtering hardware or off-chip comparators, while providing high efficiency and excellent performance. The algorithm utilizes a majority function for digitally filtering the back-electromotive force (BEMF). Each phase of the motor is filtered to determine when to commutate the motor drive voltages.
Sensorless trapezoidal control has five parts:
Sampling trapezoidal BEMF signals using the analog-to-digital converter (ADC) peripheral on a DSC;
Reconstructing the motor virtual neutral point;
Comparing the trapezoidal BEMF signals to the reconstructed motor virtual neutral point to detect the zero-crossing points;
Filtering the signals coming from the comparisons, using a majority-function filter; and
Commutating the motor driving voltages.
Sensored vs. sensorless control
The BLDC motor is used for both consumer and industrial applications, owing to its compact size, controllability and high efficiency. Increasingly, it is also used in automotive applications as part of a strategy to eliminate belts and hydraulic systems, to provide additional functionality and improve fuel economy. The continuing reduction in the cost of magnets and the electronics required for the control of the BLDC motor has contributed to its use in an increasing number of applications, and at higher power levels.
The BLDC motor is usually operated with one or more rotor-position sensors, since the electrical excitation must be synchronous to the rotor position. For reasons of cost, reliability, mechanical packaging and especially if the rotor runs immersed in fluid, it is desirable to run the motor without position sensors, which is known as sensorless operation.
It is possible to determine when to commutate the motor-drive voltages by sensing the BEMF voltage on an undriven motor terminal during one of the drive phases. The obvious cost advantage of sensorless control is the elimination of the Hall position sensors. If low cost is a primary concern and low-speed motor operation is not a requirement, and the motor load is not expected to change rapidly, sensorless control may be the better choice for your application.
Six-step (trapezoidal) commutation
The method for energizing the motor windings in the sensorless algorithm described in this article is called six-step trapezoidal, or 120 degree, commutation. Each step, or sector, is equivalent to 60 electrical degrees. Six sectors make up one electrical revolution. Figure 1 shows the commutation process.
For every sector, two windings are energized and one winding is not energized. The fact that one of the windings is not energized during each sector is an important characteristic of six-step control that allows for the use of a sensorless control algorithm. When a BLDC motor rotates, each winding generates BEMF, which opposes the main voltage supplied to the windings according to Lenz’s Law. The polarity of this BEMF is in the opposite direction of the energizing voltage. Figure 2 shows ideal BEMF waveforms and the zero-crossing points.
The BEMF waveform of the motor varies as both a function of the rotor’s position and its speed. Detection of rotor position using the BEMF at zero and very low speeds is, therefore, not possible. Nevertheless, there are many applications (e.g., fans and pumps) that do not require positioning control or closed-loop operation at low speeds. Likewise, there are many different methods of using the BEMF. The majority of these methods can be summarized as follows:
Motor-terminal voltage sensing
Mid-point voltage sensing
Bus-current gradient sensing
The selected technique utilized the Mid-point voltage reconstruction and it is based on detecting the instances when the BEMF of an inactive phase is zero. The sensorless zero-crossing technique is suitable for a wide range of applications where closed-loop operation near zero speed is not required.
Assuming that only three motor leads are available for sensing the BEMF, the voltage at the star point of the motor must be determined because the BEMF waveform will be offset by the star-point voltage.
Most of the time, motor manufacturers do not wire the motor neutral point. However, it can be generated by software. Three networks are connected in parallel with the motor windings to sense the voltage at each phase. The neutral voltage is equal to the average of the phase signals. Figure 3 shows how the voltage is measured at each phase, using six resistors.
The reconstructed motor neutral voltage is compared to each BEMF signal to determine the zero-crossing events. A zero-crossing event exists when the BEMF signals are equal to the motor neutral point.
Implementing the algorithm
The first task is sampling the BEMF signals. To achieve this, the DSC’s ADC is configured in such a way that it simultaneously samples the BEMF signals at a sampling rate equal to the DSC’s Pulse-Width Modulator (PWM) reload frequency. Hence, the ADC is synchronized with the PWM reload event.
The ADC samples at the PWM ON time, with the purpose of avoiding the ringing noise produced by the electronic switches. The point at which the signals are sampled is variable across the PWM ON time, depending on the motor speed.
The motor neutral point is then reconstructed and compared to the BEMF signals. The produced signals with these software comparisons still have some noise, which will be filtered out using a majority function.
Digital filter: the majority function
This BEMF filtering method is a non-linear digital filter called a majority function. The majority function is a Boolean function that takes a number of binary inputs and returns the value that is most common among them. It can be expressed as follows:
Majority = ( A^B )v( A^C )v( B^C )
The first stage of the majority-function filter is achieved by two logic operations; the first operator (AND) detects the active BEMF signal. The second operator (XOR) detects the falling and rising edges on the active BEMF signal. The output of these two operations is called the “active-masked BEMF” signal.
The active-masked BEMF signal is then filtered using the majority-detection filter. This filter is implemented with an array compounded by 64 values and a special logic test condition, which is used to modify the pointer of the next data value.
There are 64 values that represent the 26 possible combinations that the six-sample window could have for the active-masked BEMF signal. Each value in the look-up table is a pointer to the next possible six-sample window. Figure 4, below, shows how the six-sample window is updated according to the BEMF signal.
The filter is always looking for a true-to-false change at the output of the logic test condition. If this true-to-false condition is detected, the filter looks for three consecutive false states to validate that a zero-crossing event occurred. A true-to-false condition at the output of the logic test condition represents a commutation on the motor; hence a new BEMF signal is then monitored.
There are 16 unique index values that represent the true-to-false condition. These values are 24, 25, 26, 28, 40, 41, 42, 44, 48, 49, 50, 52, 56, 57, 58 and 60. These unique values are replaced by 1, in order to indicate that a true-to-false condition occurred.
Sixteen unique values are selected using the following majority-function criteria. A number is a unique value when its binary representation contains a majority of one in the three most significant bits, followed by a majority of zeros.
The 48 remaining numbers are pointers to the unique values, in case a true-to-false condition occurs. There are some values that never point to any of the unique values because they are not multiples of any of the 16 unique numbers. Those numbers are then pointed to their multiples and trapped into a loop in such a way that the filter is waiting for a new value that points to one of the 16 unique numbers. Figure 5, below, shows a block diagram of the complete majority filter.
An interesting property of BLDC motors is that they will operate synchronously, to a certain extent. This means that for a given load, applied voltage and commutation rate, the motor will maintain open-loop lock with the commutation rate; provided these three variables do not deviate from the ideal by a significant amount. In real implementations, Proportional Integral and Differential (PID) control loops are utilized to control these variables.
Powerful and cost-effective DSP engines have made it possible to efficiently control the torque and speed demands in sensorless applications. digital signal controllers are very well-suited in applications where efficiency, high performance and cost are key requirements.
Daniel Torres joined Microchip Technology Inc. in 2007 as an applications engineer in the company’s High Performance Microcontroller Div., and has worked in motor control, power conversion and embedded systems since 2003.
- Events & Awards
- Magazine Archives
- Oil & Gas Engineering
- Salary Survey
- Digital Reports
- Survey Prize Winners
- CFE Edu
Annual Salary Survey
Before the calendar turned, 2016 already had the makings of a pivotal year for manufacturing, and for the world.
There were the big events for the year, including the United States as Partner Country at Hannover Messe in April and the 2016 International Manufacturing Technology Show in Chicago in September. There's also the matter of the U.S. presidential elections in November, which promise to shape policy in manufacturing for years to come.
But the year started with global economic turmoil, as a slowdown in Chinese manufacturing triggered a worldwide stock hiccup that sent values plummeting. The continued plunge in world oil prices has resulted in a slowdown in exploration and, by extension, the manufacture of exploration equipment.
Read more: 2015 Salary Survey