# BLDC speed and position from back-emf

I'm trying to make my own sensorless speed controller and I need to know the speed and the position.

What are the basic techniques used to determine the speed and position of a BLDC motor from the Back-EMF.

• Commented Oct 31, 2013 at 19:38

In addition to the links supplied by @suha in the answer to the question linked by @Scott Winder, as well as my own excellent answer to the same question (shameless self plug), the following Freescale paper is also worth reading as it specifically references position sensing:

AN1913 3-phase BLDC Motor Control with Sensorless Back-EMF ADC Zero Crossing Detection using 56F80x

In a nutshell, it comes down to counting the number of zero-crossings and measuring the timing between them. For a 3-phase BLDC motor, one phase will be high voltage, one phase will be low voltage and one phase will be off. You will know which is which because you will be providing it. You will also know how many poles the motor has. Combining this information with your measurement of when the off phase crosses the mid-point between the high and low phases (the zero crossing), you can determine speed and position.

By looking at each phase state, you can determine what your electrical angle is:

You can then convert the electrical angle to a mechanical angle by taking into account the number poles using the following equation:

$$\theta_{electrical} = \dfrac{p}{2}\theta_{mechanical}$$

Where: $p= \text{number of poles}$

Then, by timing and counting the number of zero crossings, you can determine how long it takes to complete 360° of mechanical rotation which can then be converted into a speed in RPM.

• hi thanks, here is what i understood :if i want to turn the motor to 10rpm i have to repeat the combinations of the commutations during 10*2/p minute,and if i want 20rpm repeat them for 20*2/p minutes in open loop,and if i want it in a feedback i measure the bemf by the sensorless methods,am i right? Commented Nov 1, 2013 at 15:32
• @BerrimaHadjtahar That's correct. I usually write an step routine that changes states at a command or button push. Then write an open loop routine that calls that step function repeatedly on an adjustable time interval. Once you've adjusted the time interval to a semi-smooth commutation, then you can close the feedback loop for much smoother operation. Commented Nov 1, 2013 at 18:46
• but why the signal in each step is (1-0) instead of just 1 (untill the next step),it's like for each commutation has a frecuency,and then there is a frecuency of the whole process Commented Nov 2, 2013 at 11:12
• @BerrimaHadjtahar That's also correct. The frequency of the whole process is your RPM. The pulse-width modulation (PWM) of the signal is used to control the current. When a rotor pole is in between 2 stator coils, more current is needed in the stator to pull the rotor pole towards it and away from the previous coil. When the rotor pole and the stator coil are aligned, less current is needed. So the signal, while it is high or low and not off, is varied to modulate the current and control the force of attraction. Commented Nov 2, 2013 at 21:22