Volume 34, Number 06, October, 2000Download this article in PDF format. (70 KB)
Fundamentals of DSP-Based Control for AC Machines
The principles of vector control are now well established for controlling these ac motors; and most modern high performance drives now implement digital closed-loop current control. In such systems, the achievable closed-loop bandwidths are directly related to the rate at which the computationally intensive vector-control algorithms and associated vector rotations can be implemented in real time. Because of this computational burden, many high-performance drives now use digital signal processors (DSPs) to implement the embedded motor- and vector-control schemes. The inherent computational power of the DSP permits very fast cycle times and closed-loop current control bandwidths (between 2 and 4 kHz) to be achieved.
The complete current control scheme for these machines also requires a high-precision pulse-width modulation (PWM) voltage-generation scheme and high-resolution analog-to-digital (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 rotor-position 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 three-phase ac motorscombining an integrated DSP controller, with a powerful DSP core, flexible PWM generation, high-resolution 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 three-phase ac voltage with an average sinusoidal waveform can be synthesized at the output terminals. The actual output voltage waveform is a pulse-width modulated (PWM) high-frequency waveform, as shown in Figure 1b. In practical inverter circuits using solid-state switches, high-speed 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 frequenciesnominally in the range of 0 to 250 Hz.
The inductive reactance of the motor increases with frequency so that the higher-order harmonic currents are very small, and near-sinusoidal 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.
b. Typical PWM waveforms in the generation of a variable-voltage, variable-frequency supply for the motor.
In typical ac motor-controller 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 three-phase 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 duty-cycle 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 cycle-by-cycle 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 PWM-and-controller 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, 10-to-12 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 high-side power device of inverter leg A and AL is used to drive the low-side power device. The duty cycle effectively adjusts the average voltage applied to the motor on a cycle-by-cycle 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 dead-time 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 dead-time insertion into the PWM signals.
Figure 2. Typical PWM waveforms for a single inverter leg.
GENERAL STRUCTURE OF A THREE-PHASE 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 pulsewidth-modulation 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 on-state voltages and dc-link voltage ripple.
Figure 3. Configuration of typical control system for three-phase ac motor.
The two components of the stator current vector are known as the direct-axis and quadrature-axis components. The direct-axis current controls the motor flux and is usually controlled to be zero with permanent-magnet machines. The motor torque may then be controlled directly by regulation of the quadrature axis component. Fast, accurate torque control is essential for high-performance drives in order to ensure rapid acceleration and decelerationand 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 on-chip 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 three-phase 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 amperei.e., operates at optimal efficiency. The vector rotations require real-time calculation of the sine and cosine of the measured rotor angle, plus a number of multiply-and-accumulate operations. The overall control-loop bandwidth depends on the speed of implementation of the closed-loop control calculationsand the resulting computation of new duty-cycle values. The inherent fast computational capability of the 26-MIPS, 16-bit fixed-point DSP core makes it the ideal computational engine for these embedded motor-control 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 non-linearities. In any current-sensor electronics, the analog signal processing is often subject to gain and offset errors. Gain mismatches, for example, can exist between the current-measuring 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 12-to-14-bit A/D converters, depending on the cost/performance trade-off 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 closed-loop system will degrade the achievable bandwidth of the system, and bandwidth is one of the most important figures of merit in these high-performance drives. Therefore, fast analog-to-digital 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 three-phase 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 non-ideality translates directly into a ripple of the torquea very undesirable characteristic.
The ADC system that is integrated into the ADMC401 provides a fast (6-MSPS), high-resolution (12-bit) 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 high-speed 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 state-of the art in embedded DSP motor controllers for high-performance 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 cost-sensitive servo-motor 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 rotor-position 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 real-time computation of a sufficiently accurate model of the motor in the DSP. In general, these sensor-less algorithms can be made to work as well as the sensor-based algorithms at medium to high-speeds of rotation. But as the speed of the motor decreases, the extraction of reliable speed-dependent information from voltage- and current measurements becomes more difficult. In general, sensor-less motor control is applicable principally to applications such as compressors, fans and pumps, where continuous operation at zero or low speeds is not required.