Micro Control Journal                                                      November 2001

 

 

Dealing with Motor Control

Dead time Distortion

 

Dave Wilson, Ross Bannatyne

Motorola Semiconductor Products Sector

 

 

Introduction

Precise control of electric motors is becoming more popular and affordable due to specific enhancements to ‘general purpose’ 8-bit microcontrollers. This article will discuss the type of hardware feature that has been added to (what would be widely considered) a low-cost microcontroller (MCU) to improve its motor control capability.

 

A major problem facing designers of motor controllers is the source of distortion that is common to power stages using totem-pole transistor configurations driving inductive loads.  On AC induction motors running open loop, the problem typically manifests itself as poor low speed performance, such as torque ripple and rough operation.

 

The MC68HC908MR32 MCU solves the problem by sensing the motor phase voltages during the dead-time intervals and modifying the modulation waveform to cancel the effects of the distortion. This results in quieter and smoother running motors.

 

 

Figure 1. MC68HC908MR32

 

A block diagram of the MC68HC908MR32 is shown in Figure 1. The main features of the microcontroller are the 32K bytes of Flash EEPROM program memory and 768 bytes of RAM. There is also an A/D converter used to interface to signals such as sensor inputs and other analog waveforms. There are two serial communications systems: the Serial Peripheral Interface (SPI), which is synchronous, and the Serial Communications Interface (SCI), which is asynchronous. The LVI is a low-voltage inhibit module with software selectable trip points and there are also 2 timer modules that each offer a variety of hardware timer functions. The specific functions that have been implemented to facilitate the low distortion motor control are included in the Pulse-Width Modulator module.

 

Dead-time Distortion

To drive a 3-phase electric motor, a 6-transistor inverter circuit is commonly used. Most voltage sourced inverters require that a “dead-time” must be inserted between the turn-off of one transistor in a half-bridge, and the turn-on of its complementary device.  Otherwise, both transistors in a half-bridge may be on momentarily at the same time, which will destroy the circuit by shorting together Vdd and Ground.  As a result of inserting this dead time, a distortion is introduced in the output voltage and current waveforms when the inverter is driving an inductive load (such as a motor). This distortion can be satisfactorily corrected in most situations.  By using a Hall Effect Current sensor or other current sensing device, correction waveforms can be generated that are synchronous to the motor phase currents and applied to the PWM signals. 

 

There is also a sensor-less technique that accomplishes this, without the need for current sensors. This feature has been integrated into the MC68HC908MR32 microcontroller.  Thus, the benefits of distortion correction can be brought to the arena of low-cost motor control applications that cannot afford the more expensive current sensing techniques.

 

Figure 2 illustrates a half-bridge circuit composed of IGBTs that generate a desired PWM output waveform with 50% duty cycle.  With no dead time, this could easily be achieved by turning on the top transistor for half of the cycle, and turning the bottom transistor on for the remainder of the cycle.  However, with dead time inserted, the on-time of both the top and bottom transistors are shortened evenly, so that neither the top nor bottom PWM signal corresponds to a 50% duty cycle.

 

 


Figure 2.  Distortion created from load inductance

 

 


Due to the inductive effects of the load during the dead-time interval, the pulse width of the output voltage will be affected.  It will either be larger or smaller than desired (depending on the current polarity) by an amount equal to one dead-time interval.  This in turn causes an offset in the average output voltage.  Once the voltage waveform has been affected, the current waveform will be distorted as well. This is shown in Figure 3.

 

Figure 3. Voltage and current distortion due to dead time.

 

To understand the shape of the current waveform, it is necessary to consider the distortions and interactions of all three phases.  If we assume a steady state load, it is safe to also assume that the angular separation of each line current is 120 degrees.  Since the distortion voltage is 180 degrees out of phase with the current for each phase, then each of the distortion waveforms are also separated by 120 degrees, as illustrated in Figure 4.

 

Assuming the motor load is linear, superposition can be used to analyze the system response to the distortion alone (i.e., modulation signal equals zero).  Under this condition, if we assume that the motor load is balanced, we can average the three distortion voltages to obtain the motor neutral voltage n.  Unlike three phase sine waves, the distortion waveforms do not result in a neutral voltage of zero over time.  Instead, it is a square wave with transitions every 60 degrees.

 

For the sake of our analysis, let’s assume that the motor is a three phase “Y” connected load (although the results apply equally to delta connected loads).   By subtracting n from d1, we obtain the distortion voltage, which is actually impressed across the phase 1 leg of the load, which is shown as the bottom waveform of Figure 4.  This voltage sets up a current in that phase which is a function of the load impedance.  When the original sine wave current is added back in by superposition, the result is a current waveform whose peaks are clipped, as seen in Figure 3.  In fact, under certain conditions when the distortion waveform is large with respect to the modulation waveform, the distortion can actually cause the current to dip at its peaks.

 

Figure 4.  Calculated distortion waveforms

 

 

Problems with Dead Time Distortion

Several serious problems can arise due to dead-time distortion. The amplitude of the distortion per unit of bus voltage is equal to the ratio of the dead time to the PWM period.  Since dead-time is a system parameter which is usually fixed in accordance with the switching characteristics of the power devices, the problem is usually associated with higher PWM frequencies.  In some cases, an engineer will specify a higher PWM frequency to minimize Total Harmonic Distortion (THD) without realizing that the distortion from dead time actually gets worse.

 

Another problem is that voltage distortion causes a current distortion, and the net result is torque pulsations felt on the motor shaft.  This can translate into stability problems between the motor and drive under certain conditions.

 

Unlike the modulation signal that is purposefully impressed upon the motor windings, the amplitude of the distortion is NOT affected by the modulation index.  This means that the problem when viewed from a signal-to-noise perspective is most severe when the voltage is small.  On an AC induction motor, this occurs when the motor RPM is also small, and the momentum of the rotor cannot smooth out the torque pulsations, making them even more apparent.

 

Another common problem is that the distortion is synchronous with the motor current, and 180 degrees out of phase with it.  At low frequencies, this effect combines with the stator resistor losses to further reduce the motor torque.  Over-modulation in the form of a voltage boost can be used to mitigate this problem.  However, the torque pulsations from the distortion are still present.

 

The previous analysis is based on the supposition that the distortion waveform is a perfect rectangular waveform.  There can be variances from this premise that have an impact on the correction technique – making it even more complex to correct for.

 

 

Correcting for Dead-time distortion using the PWM hardware

Since the distortion effect from dead time can be fairly well characterized, it stands to reason that the cure should be equally straightforward.  With the exception of a few second-order effects, this is true.  Since the output waveform has a distortion whose characteristics can be closely approximated, the answer is to “counter-modulate” the original PWM signal to provide noise cancellation.  In other words, a correction signal is superimposed on top of the sine wave signal in the processor to exactly cancel the output distortion. Since the distortion signal resembles a square wave, the correction term is also a square wave.  Since the distortion signal is synchronized to the current waveform for that phase, the correction term must also be synchronized to the same current waveform.

 

Another way to view the correction process is illustrated in Figure 5.  Recall from Figure 2 that the dead time was balanced between the top and bottom PWM signals.  For that particular example, 50% duty cycle was desired.  With the insertion of dead time, the top and bottom PWM signals had their on-times reduced by an equal amount to something less than 50%.  The MC68HC908MR32 always uses a single PWM register to derive the top and bottom signals for each transistor in a half-bridge, and automatically inserts a programmable dead-time in these signals.  With no distortion correction applied, the register chosen for each half-bridge driving a motor phase does not change during the course of operation, and defaults to an odd numbered PWM value register.  When correction is enabled, the PWM module toggles between two PWM registers for each motor phase; one when the current polarity for that phase is positive, and the other when it is negative. The waveforms of Figure 5 are obtained by programming one register with the desired pulse width plus the dead time, and the other register with the desired pulse width minus  the dead time.

Figure 5.  Distortion correction accomplished by redistribution of dead time.

 

 

In actuality, to obtain an output pulse width delta of plus or minus one dead time on the MC68HC908MR32 when using center-aligned mode, the correction value should be plus or minus one half of the value in the dead time register.  This is because the PWM resolution in center-aligned mode is one half that of edge aligned mode.

 

One economical way to measure the current polarity for each phase is to use the current polarity sense inputs on the ‘MR32.  These three pins are used to monitor the PWM voltage waveforms supplied to each terminal of a 3-phase motor.  Each input is sampled during the dead time of the PWM signals associated with that motor phase.  If the input is high during the dead time, the current polarity is determined to be negative, and vice versa.  This information can then be used by hardware in the PWM module to automatically toggle between one of two PWM registers, as discussed earlier.

 

Zero-Crossing Distortion

When the distortion is corrected in this manner, the current waveform of Figure 6 is obtained. The modulation index is scaled so that the current peak amplitude matches that of Figure 3.  Otherwise, the same modulation index results in a 50% increase in the peak amplitude, which demonstrates the severity of the distortion.  Although most of the distortion is gone, some still exists at the zero-crossings that causes torque pulsations that can be detected on the motor shaft.  To eliminate this distortion, we need to go beyond our first order explanation of the distortion source to understand what is happening to the system during the current zero-crossings.

Figure 6.  Partially Corrected Current Waveform

 

 

Up to now, we have assumed that the distortion waveform is a perfect rectangular waveshape, and therefore has “snappy” rising and falling edges.  Related to this premise, we have also implied that the inverter output voltages are either high or low at any given time, including the dead-time intervals. These assumptions are true when the current amplitude is high.  However, under low current conditions which occur near the  zero crossings, the inductor is less aggressive in snapping the voltage high or low, presumably due to parasitic capacitance in the motor and drive which can support the inductor’s low current flow.  Prior to the dead-time interval, if the output voltage was already driven in the direction that the inductor would drive it anyway based on the current polarity, this phenomenon is not observable.  The problem occurs when the other transistor was on, and the inductor must drive the output voltage through the full power supply range during the dead-time interval.

 

The net effect is that the voltage waveform does not transition instantaneously when the current polarity changes.  Instead, a softer transition occurs which takes the “edge” off of the distortion waveform. Figure 7 shows the voltage waveforms out of one half-bridge of the inverter under various current conditions. 


 

Figure 7.  Output Voltage Waveforms Under Various Current Conditions

 

 

We now draw a distinction between the dead-time interval before the assertion of the top PWM, and the dead-time interval before the assertion of the bottom PWM.  If we compare the two dead-time regions in a given PWM period, we notice that when the current magnitude is large, the voltages during the dead-times are the same, regardless of polarity.  However, when the current magnitude is small, the voltage waveforms are different in the dead-time intervals.  This suggests a strategy for detecting when the current waveform is approaching a zero crossing, and acting before it actually occurs.  What we need is a “waveform discriminator” which can tell the difference between these voltage waveforms.

 

Figure 8 illustrates a distortion correction system acting on a single phase, which incorporates such a voltage sensing technique.  By using either hysteresis or a simple low pass filter, the sensor detects whether the load inductor aggressively snaps the voltage waveform during the dead-time intervals.  At the end of each dead-time region, the comparator output is sampled by the D-type flip-flops, and the results are stored for both dead-time intervals.  As seen in the chart of Figure 8, if the voltage waveform is cleanly snapped by the inductor, then both results will agree with each other.  For example, if both outputs are low, the current is large and flowing out of the inverter. If both outputs are high, the current is large and flowing into the inverter.  However, under low current conditions regardless of polarity, the sampled results will be different, indicating to the control algorithm that a current zero-crossing is looming in the near future.  The distortion correction value can thus be toggled before the current begins to flatten out.

 

Figure 8.  Sense scheme for optimized dead time distortion correction

 

Results of dead-time distortion correction

Figure 9 illustrates the results of dead-time distortion correction using this technique and the hardware on the MC68HC908MR32.  By using the voltage information obtained during the dead time, the software can counter-modulate the PWM waveforms to cancel the distortion. These results were measured from a half horsepower 3-phase motor with a PWM frequency of 7.3kHz with 3uS dead time.

 

                    Figure 9.  Results of distortion correction using the MC68HC708MP16.

 

Micro Control Journal

__________