rhitee05
10 kW
One of my goals is to eventually develop a high-performance controller. I plan to incorporate some advanced features, including field-oriented control and hybrid sensored/sensorless operation. For the time being, I'm focused on the algorithmic details of how the control will function, especially the sensorless aspect. I thought the community might benefit from a discussion on this topic. So, what I plan to do is go over the basics of sensorless control and discuss the various approaches to implementing it. It's far from a "solved" problem, and there seems to be a lot of active academic research in this area which I've been mining to try and find the "best" technique for our purposes. I'm hoping this thread will lure some of the experts to share their knowledge and experiences, and can help to answer questions from other members looking to learn more.
Sensored vs. Sensorless
For the un-initiated, BLDC motor control requires knowledge of the motor position so we can sent the appropriate signals to the FET switches. Many e-bike motors use Hall effect sensors to provide this information (AFAIK, virtually all motors designed for e-bike use). Most RC motors and some others do not have Hall sensors, and so require the use of sensorless controllers (RC ESCs, mainly). Sensorless controllers measure the phase currents and/or voltages and use them to estimate the position. Some members have come up with various ways to add sensors to these motors to allow the use of regular sensored e-bike controllers. Most just accept (grudgingly) the limitations of the ESCs and live with them.
Sensorless advantages:
- Obviously, does not require the extra sensor hardware. This can mean a smaller motor, and also means fewer wires going to/from the motor.
- More reliable (no chance of sensors failing)
- At high speeds, more accurate position information (sensor accuracy relies on accuracy of their physical position)
Sensorless disadvantages:
- For the most part, no way to detect motor position at zero speed. This means less torque capability from stop and at low speeds
- Position accuracy decreases at lower speeds
- Requires more processing power, especially for more advanced techniques
Goals
I think it should be fairly obvious from the above that for our purposes a controller using a combination of both techniques would be ideal. Sensors allow for reliable, high-torque operation from a stop and at low speeds. Sensorless methods give very accurate position at higher speeds, which allows the use of more advanced control techniques for high-performance operation. Since there are a large number of techniques to accomplish sensorless control, we'd like to determine what the best one is. For my purposes, I consider that to be ease of implementation, good accuracy at lower speeds, and flexibility for a variety of motors. We also need to develop the best method to combine the information from both sensors and sensorless.
Sensorless Techniques
Most of the techniques rely on measuring or estimating the back EMF waveforms of the motor, or sometimes the flux waveforms (which are basically equivalent). Since these waveforms depend on the rotor position, they can be used to provide the desired information. If the Kv is known, the magnitude of the EMF can also be used to estimate the speed (speed can also be determined by the rate of change of position).
I plan to go into more detail in later posts. For now, a quick overview of the techniques I'm planning to investigate so far:
Zero-Crossing Detection
AFAIK, this is the technique used by most (perhaps all) of the sensorless ESCs commonly in use here. The controller directly senses the back EMF on the undriven phase and uses this to control commutation. This is pretty simple to implement, requires only a small amount of additional hardware, and very little extra processing. However, it completely fails a low speeds and only allows for basic 6-step commutation (not sinusoidal or field-oriented control). I plan to use a post to discuss this since its so widely used, but I'm looking for a better method.
Structural Methods
I'm going to lump a variety of different methods under this heading. The inductance of the phase coils will vary as the rotor moves, which can be used to sense position. However, this requires knowledge of the motor structure, and generally doesn't work very well for motors using surface-mounted magnets (which are virtually all e-bike motors). Some variations on this will inject high-frequency signals into the motor or rely on harmonics of the PWM signal. In general these methods are highly dependent on the type and structure of the motor, so I would prefer a method that's more general. I don't plan to investigate these techniques any further.
Estimation Methods
The electrical theory of BLDC motors is well known. The controller knows what voltages are being applied to the phases, and current sensors measure the phase currents, so we can use the electrical theory to develop a formula for either the back EMF or the magnetic flux. Either one will allow us to estimate the rotor position. This requires we know the electrical parameters of the motor - phase resistance and inductance, also possibly the Kv. These methods show some promise as being relatively easy to implement.
Luenberger Observer
This is similar to the estimation methods. Knowing the electrical parameters of the motor, we can construct a model which given the inputs (phase voltages) will predict the outputs (phase currents and back EMFs). We can also compare the measured and predicted phase currents, and use the error as feedback to correct the model. This is called a Luenberger observer. The back EMFs can then be used as in the estimation method to estimate the rotor position. This is a little more complex than straight estimation, but feedback should make it more accurate. In particular, this method seems to be robust even when the electrical parameters are not exact.
Kalman Filter
This technique also relies on a model of the motor and feedback using the measured currents. However, the feedback is now based on the estimated error in the measurement, as well. This has the potential to perform better at low speeds, when more error is present, but is probably the most complex of all techniques.
More to come!
Sensored vs. Sensorless
For the un-initiated, BLDC motor control requires knowledge of the motor position so we can sent the appropriate signals to the FET switches. Many e-bike motors use Hall effect sensors to provide this information (AFAIK, virtually all motors designed for e-bike use). Most RC motors and some others do not have Hall sensors, and so require the use of sensorless controllers (RC ESCs, mainly). Sensorless controllers measure the phase currents and/or voltages and use them to estimate the position. Some members have come up with various ways to add sensors to these motors to allow the use of regular sensored e-bike controllers. Most just accept (grudgingly) the limitations of the ESCs and live with them.
Sensorless advantages:
- Obviously, does not require the extra sensor hardware. This can mean a smaller motor, and also means fewer wires going to/from the motor.
- More reliable (no chance of sensors failing)
- At high speeds, more accurate position information (sensor accuracy relies on accuracy of their physical position)
Sensorless disadvantages:
- For the most part, no way to detect motor position at zero speed. This means less torque capability from stop and at low speeds
- Position accuracy decreases at lower speeds
- Requires more processing power, especially for more advanced techniques
Goals
I think it should be fairly obvious from the above that for our purposes a controller using a combination of both techniques would be ideal. Sensors allow for reliable, high-torque operation from a stop and at low speeds. Sensorless methods give very accurate position at higher speeds, which allows the use of more advanced control techniques for high-performance operation. Since there are a large number of techniques to accomplish sensorless control, we'd like to determine what the best one is. For my purposes, I consider that to be ease of implementation, good accuracy at lower speeds, and flexibility for a variety of motors. We also need to develop the best method to combine the information from both sensors and sensorless.
Sensorless Techniques
Most of the techniques rely on measuring or estimating the back EMF waveforms of the motor, or sometimes the flux waveforms (which are basically equivalent). Since these waveforms depend on the rotor position, they can be used to provide the desired information. If the Kv is known, the magnitude of the EMF can also be used to estimate the speed (speed can also be determined by the rate of change of position).
I plan to go into more detail in later posts. For now, a quick overview of the techniques I'm planning to investigate so far:
Zero-Crossing Detection
AFAIK, this is the technique used by most (perhaps all) of the sensorless ESCs commonly in use here. The controller directly senses the back EMF on the undriven phase and uses this to control commutation. This is pretty simple to implement, requires only a small amount of additional hardware, and very little extra processing. However, it completely fails a low speeds and only allows for basic 6-step commutation (not sinusoidal or field-oriented control). I plan to use a post to discuss this since its so widely used, but I'm looking for a better method.
Structural Methods
I'm going to lump a variety of different methods under this heading. The inductance of the phase coils will vary as the rotor moves, which can be used to sense position. However, this requires knowledge of the motor structure, and generally doesn't work very well for motors using surface-mounted magnets (which are virtually all e-bike motors). Some variations on this will inject high-frequency signals into the motor or rely on harmonics of the PWM signal. In general these methods are highly dependent on the type and structure of the motor, so I would prefer a method that's more general. I don't plan to investigate these techniques any further.
Estimation Methods
The electrical theory of BLDC motors is well known. The controller knows what voltages are being applied to the phases, and current sensors measure the phase currents, so we can use the electrical theory to develop a formula for either the back EMF or the magnetic flux. Either one will allow us to estimate the rotor position. This requires we know the electrical parameters of the motor - phase resistance and inductance, also possibly the Kv. These methods show some promise as being relatively easy to implement.
Luenberger Observer
This is similar to the estimation methods. Knowing the electrical parameters of the motor, we can construct a model which given the inputs (phase voltages) will predict the outputs (phase currents and back EMFs). We can also compare the measured and predicted phase currents, and use the error as feedback to correct the model. This is called a Luenberger observer. The back EMFs can then be used as in the estimation method to estimate the rotor position. This is a little more complex than straight estimation, but feedback should make it more accurate. In particular, this method seems to be robust even when the electrical parameters are not exact.
Kalman Filter
This technique also relies on a model of the motor and feedback using the measured currents. However, the feedback is now based on the estimated error in the measurement, as well. This has the potential to perform better at low speeds, when more error is present, but is probably the most complex of all techniques.
More to come!