Volume 34, Number 06, October, 2000 Download this article in PDF format. (70 KB)
Fundamentals of DSPBased Control for AC Machines
INTRODUCTION The principles of vector control are now well established for controlling these ac motors; and most modern high performance drives now implement digital closedloop current control. In such systems, the achievable closedloop bandwidths are directly related to the rate at which the computationally intensive vectorcontrol algorithms and associated vector rotations can be implemented in real time. Because of this computational burden, many highperformance drives now use digital signal processors (DSPs) to implement the embedded motor and vectorcontrol schemes. The inherent computational power of the DSP permits very fast cycle times and closedloop current control bandwidths (between 2 and 4 kHz) to be achieved. The complete current control scheme for these machines also requires a highprecision pulsewidth modulation (PWM) voltagegeneration scheme and highresolution analogtodigital (A/D) conversion (ADC) for measurement of the motor currents. In order to maintain smooth control of torque to zero speed, rotor position feedback is essential for modern vector controllers. Therefore, many systems include rotorposition transducers, such as resolvers and incremental encoders. We describe here the fundamental principles behind the implementation of high performance controllers (such as the ADMC401) for threephase ac motors—combining an integrated DSP controller, with a powerful DSP core, flexible PWM generation, highresolution A/D conversion, and an embedded encoder interface.
VARIABLE SPEED CONTROL OF AC MACHINES By rapid sequential opening and closing of the six switches (Figure 1a), a threephase ac voltage with an average sinusoidal waveform can be synthesized at the output terminals. The actual output voltage waveform is a pulsewidth modulated (PWM) highfrequency waveform, as shown in Figure 1b. In practical inverter circuits using solidstate switches, highspeed switching of about 20 kHz is possible, and sophisticated PWM waveforms can be generated with all voltage harmonic components at very high frequencies; well above the desired fundamental frequencies—nominally in the range of 0 to 250 Hz. The inductive reactance of the motor increases with frequency so that the higherorder harmonic currents are very small, and nearsinusoidal currents flow in the stator windings. The fundamental voltage and output frequency of the inverter, as indicated in Figure 1b, are adjusted by changing the PWM waveform using an appropriate controller. When controlling the fundamental output voltage, the PWM process inevitably modifies the harmonic content of the output voltage waveform. A proper choice of modulation strategy can minimize these harmonic voltages and their associated harmonic effects and high frequency losses in the motor.
Figure 1
b. Typical PWM waveforms in the generation of a variablevoltage, variablefrequency supply for the motor. In typical ac motorcontroller design, both hardware and software considerations are involved in the process of generating the PWM signals that are ultimately used to turn on or off the power devices in the threephase inverter. In typical digital control environments, the controller generates a regularly timed interrupt at the PWM switching frequency (nominally 10 to 20 kHz). In the interrupt service routine, the controller software computes new dutycycle values for the PWM signals used to drive each of the three legs of the inverter. The computed duty cycles depend on both the measured state of the motor (torque and speed) and the desired operating state. The duty cycles are adjusted on a cyclebycycle basis in order to make the actual operating state of the motor follow the desired trajectory. Once the desired duty cycle values have been computed by the processor, a dedicated hardware PWM generator is needed to ensure that the PWM signals are produced over the next PWMandcontroller cycle. The PWM generation unit typically consists of an appropriate number of timers and comparators that are capable of producing very accurately timed signals. Typically, 10to12 bit performance in the generation of the PWM timing waveforms is desirable. The PWM generation unit of the ADMC401 is capable of an edge resolution of 38.5 ns, corresponding to approximately 11.3 bits of resolution at a switching frequency of 10 kHz. Typical PWM signals produced by the dedicated PWM generation unit of the ADMC401 are shown in Figure 2, for inverter leg A. In the figure, AH is the signal used to drive the highside power device of inverter leg A and AL is used to drive the lowside power device. The duty cycle effectively adjusts the average voltage applied to the motor on a cyclebycycle basis to achieve the desired control objective. In general, there is a small delay required between turning off one power device (say AL) and turning on the complementary power device (AH). This deadtime is required to ensure the device being turned off has sufficient time to regain its blocking capability before the other device is turned on. Otherwise a short circuit of the dc voltage could result. The PWM generation unit of the ADMC401 contains the necessary hardware for automatic deadtime insertion into the PWM signals.
Figure 2. Typical PWM waveforms for a single inverter leg.
GENERAL STRUCTURE OF A THREEPHASE AC MOTOR CONTROLLER Sometimes it may be desirable to implement a decoupling between voltage and speed that removes the speed dependencies and associated axes cross coupling from the control loop. The reference voltage components are then synthesized on the inverter using a suitable pulsewidthmodulation strategy, such as space vector modulation (SVM). It is also possible to incorporate some compensation schemes to overcome the distorting effects of the inverter switching dead time, finite inverter device onstate voltages and dclink voltage ripple.
Figure 3. Configuration of typical control system for threephase ac motor. The two components of the stator current vector are known as the directaxis and quadratureaxis components. The directaxis current controls the motor flux and is usually controlled to be zero with permanentmagnet machines. The motor torque may then be controlled directly by regulation of the quadrature axis component. Fast, accurate torque control is essential for highperformance drives in order to ensure rapid acceleration and deceleration—and smooth rotation down to zero speed under all load conditions. The actual direct and quadrature current components are obtained by first measuring the motor phase currents with suitable current sensing transducers and converting them to digital, using an onchip ADC system. It is usually sufficient to simultaneously sample just two of the motor line currents: since the sum of the three currents is zero, the third current can, when necessary, be deduced from simultaneous measurements of the other two currents. The controller software makes use of mathematical vector transformations, known as Park Transformations, that ensure that the threephase set of currents applied to the motor is synchronized to the actual rotation of the motor shaft, under all operating conditions. This synchronism ensures that the motor always produces the optimal torque per ampere—i.e., operates at optimal efficiency. The vector rotations require realtime calculation of the sine and cosine of the measured rotor angle, plus a number of multiplyandaccumulate operations. The overall controlloop bandwidth depends on the speed of implementation of the closedloop control calculations—and the resulting computation of new dutycycle values. The inherent fast computational capability of the 26MIPS, 16bit fixedpoint DSP core makes it the ideal computational engine for these embedded motorcontrol applications.
ANALOG TO DIGITAL CONVERSION REQUIREMENTS At the other end of the scale, in order to achieve the smooth and accurate rotations desired in these machines, it is wise to compensate for small offsets and nonlinearities. In any currentsensor electronics, the analog signal processing is often subject to gain and offset errors. Gain mismatches, for example, can exist between the currentmeasuring systems for different windings. These effects combine to produce undesirable oscillations in the torque. To meet both of these conflicting resolution requirements, modern servo drives use 12to14bit A/D converters, depending on the cost/performance tradeoff required by the application. The bandwidth of the system is essentially limited by the amount of time it takes to input information and then perform the calculations. A/D converters that take many microseconds to convert can produce intolerable delays in the system. A delay in a closedloop system will degrade the achievable bandwidth of the system, and bandwidth is one of the most important figures of merit in these highperformance drives. Therefore, fast analogtodigital conversion is a necessity for these applications. A third important characteristic of the A/D converter used in these applications is timing. In addition to high resolution and fast conversion, simultaneous sampling is needed. In any threephase motor, it's necessary to measure the currents in the three windings of the motor at exactly the same time in order to get an instantaneous "snapshot" of the torque in the machine. Any time skew (time delay between the measurements of the different currents) is an error factor that's artificially inserted by the means of measurement. Such a nonideality translates directly into a ripple of the torque—a very undesirable characteristic. The ADC system that is integrated into the ADMC401 provides a fast (6MSPS), highresolution (12bit) ADC core integrated with dual sample and hold amplifiers so that two input signals may be sampled simultaneously. (As noted earlier, this allows the simultaneous value of the third current to be calculated.) The ADC core is a highspeed pipeline flash architecture. A total of 8 analog input channels may be converted, accepting additional system or feedback signals for use as part of the control algorithm. This level of integrated performance represents the stateof the art in embedded DSP motor controllers for highperformance applications.
POSITION SENSING & ENCODER INTERFACE UNITS It is usual to have a dedicated encoder interface unit (EIU) on the motor controller; it manages the conversion of the dual quadrature encoder output signals to produce a parallel digital word that represents the actual rotor position at all times. In this way, the DSP control software can simply read the actual rotor position whenever it is needed by the algorithm. This is all very well, but there is an increasing class of costsensitive servomotor drive applications with lower performance demands that can afford neither the cost nor the space requirements of the rotor position transducer. In these cases, the same motor control algorithms can be implemented with estimated rather than measured rotor position. The DSP core is quite capable of computing rotor position using sophisticated rotorposition estimation algorithms, such as extended Kalman estimators that extract estimates of the rotor position from measurements of the motor voltages and currents. These estimators rely on the realtime computation of a sufficiently accurate model of the motor in the DSP. In general, these sensorless algorithms can be made to work as well as the sensorbased algorithms at medium to highspeeds of rotation. But as the speed of the motor decreases, the extraction of reliable speeddependent information from voltage and current measurements becomes more difficult. In general, sensorless motor control is applicable principally to applications such as compressors, fans and pumps, where continuous operation at zero or low speeds is not required.
CONCLUSIONS
