Shaft sensors and their wiring make field-oriented motor control pricey, but sensorless alternatives are available.
Field-oriented control has permanently changed the way engineers think about motor control. But in order to work, it needs to know the angle of the rotor flux axis. If you are willing to pay the high cost of a motor shaft sensor, painstakingly mount that sensor on said motor shaft, connect the long cable between the sensor and the control electronics, and deal with the noise susceptibility and intermittent connections of said cable, then thereís no problem. But, if like most people you prefer a more economical and robust solution, then we need to find another way to get flux angle information.
Most techniques to eliminate the shaft sensor depend on measuring other signals within the motor that are related to the flux signal. In some cases, these signals just naturally occur in a spinning motor and all we have to do is listen for them. Such algorithms fall into the category of passive techniques. Other signals only become visible if we actively stimulate the motor with higher-frequency signals.
Regardless of which technique you use, the signals of interest are often buried deep inside the motor and cannot be directly measured at the motor terminals. In such cases, we must employ a special algorithm called an observer to extract the desired signal(s) from other signals that we can observe outside the motor. There are far too many sensorless techniques to cover in one article, but we can investigate one of the most popular algorithms to provide an example of how sensorless control works. This technique is based on recreating the back-EMF signals inside the motor.
Consider the three-phase permanent magnet motor shown in Figure 1. If we perform a forward Clarke transform on the three windings and write the voltage equations for the resulting alpha and beta windings, we get the equations in Figure 1. This is simply the result of summing up the voltage drops across the windingsí parametric elements and equating them to the applied voltage at the motorís terminals.
Figure 1. Stationary frame voltage equations for permanent magnet synchronous motor
From the expression in Figure 1, can you find the angle information? Sure enough, itís hiding in the back-EMF signals. It would be great if we could somehow stick two voltage probes down inside the motor to measure these signals. Unfortunately, the back-EMF signals do not exist in a specific location within the motor. These signals are distributed throughout the stator coils and only appear on the motor terminals when the motor current is zero and isnít changing.
Using the differential voltage equations in Figure 1, we can create block diagrams for calculating ialpha and ibeta, as shown in Figure 2. The required inputs are the applied motor voltage, the back-EMF voltage, the stator resistance (Rs) and the stator inductance (Ls).
Figure 2. Phase current estimator blocks
Unfortunately, we donít have the back-EMF voltages. But we can measure the motor phase currents! Letís try to leverage this information to extract the missing back-EMF signals.
Initially we will just assume the back-EMF voltages in Figure 2 are zero. As a result, the estimates of ialpha and ibeta will likely be wrong. To determine the quality of these estimates, we compare them to the actual measurements of ialpha and ibeta, and generate error signals, as shown in Figure 3.
Figure 3. Comparing current estimates to actual values
Now what we do with these error signals borders on magic! If there was a ďMotor Control Wizardís Book of Spells,Ē this neat little trick would certainly be in it. In Figure 4, we supply the error signals to PI controllers and wrap the controller outputs around to the Back-EMF inputs.
Figure 4. Stationary frame back EMF estimators
This may not be intuitive at first, but consider this. If we take any closed-loop system utilizing negative feedback, we can drive the error signal to nearly zero if we have high enough loop gain. In this case, an error of zero means the phase current estimate is equal to the measured value of phase current. But this can only be true if the signal at the back-EMF input actually equals the missing back-EMF voltage (assuming Ls and Rs estimates are accurate). In other words, the PI controller's high gain servos the error signal to zero by forcing the controller's output to become the back-EMF signal.
Figure 5. Spice model of back-EMF observer
Figure 5 shows a Spice simulation of a single-phase back-EMF observer running at 10 kHz. The back-EMF signal inside of the motor block is unknown to the observer. But once the simulation starts, the observer output quickly converges on the back-EMF signal as shown in Figure 6. Even when you change the back-EMF waveform to different wave shapes, the observer morphs its output to match it!
Figure 6. Simulation output showing observer performance
From Figure 4, we can create the back-EMF waveforms for the alpha and beta coils, but just having the back-EMF signals doesnít mean we are done. The angle information is still embedded in these sinusoidal waveforms, and we have to figure out how to extract it. One way is to use the arc tan function:
Besides requiring floating point capability to calculate this value, you will also need to trap for the singularity when EMFalpha(t) = 0. But consider another technique (borrowed from the world of resolvers) shown in Figure 7. Not only does it solve the problems associated with the arc tan function, it offers another very nice perk: a filtered speed signal! A free Spice simulation of an entire three-phase back-EMF sensorless algorithm based on Figure 7 can be downloaded here.
Figure 7. Angle demodulator using the relationship: sin(θ)cos(θest)-cos(θ)sin(θest) = sin(θ-θest)
Now that we have solved for the angle, I need to tell you that we solved for the wrong angle. What we wanted was the angle of the rotor flux vector. What we get is the angle of the back-EMF vector.
Before you close your browser in disgust, you should also know that the back-EMF vector always lies on the quadrature axis, so we are very close! All that remains is to determine the polarity of the back-EMF vector on the q-axis in order to know exactly where the rotor flux vector is. This is where the frequency signal from Figure 7 can help. If the frequency is positive, we subtract 90 degrees from the back-EMF angle. If it is negative, we add 90 degrees instead. Now that we have the angle of the rotor flux, we can proceed with the four steps of FOC presented in my previous series.
Wow! All these calculations, just to find the angle of the rotor flux vector! But considering the low cost of embedded MIPS compared to the high cost of a motor shaft sensor, it is still way worth the effort in most cases.
In my next article, I will conclude this series by introducing a new sensorless FOC algorithm, which is available in ROM on select TI C2000 microcontroller products. If you are new to sensorless motor control, or are just tired of writing your own sensorless algorithm every time, then you will definitely want to stay tuned for my next article!