ADI Sigma Delta Conversion Used For Motor Control
ADI Sigma Delta Conversion Used For Motor Control
ADI Sigma Delta Conversion Used For Motor Control
SIGMA-DELTA
CONVERSION USED
Jens Sorensen
Analog Devices FOR MOTOR CONTROL
A Σ-Δ ADC has the lowest possible resolution of 1 bit, but through oversam-
| Share on Twitter | Share on LinkedIn | Email pling, noise shaping, digital filtering, and decimation, very high signal quality
can be achieved. The theory behind Σ-Δ ADCs and sinc filters is well under-
stood and well documented,1, 2 so it will not be discussed in this article. Rather,
the focus will be on how to get the best performance in a motor drive and how
Abstract
to utilize the performance in the control algorithms.
Ʃ-Δ analog-to-digital converters are widely used in motor drives
where high signal integrity and galvanic isolation are required. Phase Current Measurement with Σ-Δ ADCs
While the Σ-Δ technology itself is well understood, the converters
When a 3-phase motor is fed by a switching voltage source inverter, the
are often used in ways that fail to unlock the full potential of the
phase current can be seen as two components: an average component and
technology. This article looks at Σ-Δ ADCs from an application
a switching component, as seen in Figure 2. The top signal shows one phase
point of view and discusses how to get the best performance in a
current, the middle signal shows high-side PWM for the inverter phase-leg,
motor drive.
and the lower signal shows the sample synchronizing signal from the PWM
timer, PWM_SYNC. PWM_SYNC is asserted at the beginning and the center
Introduction of a PWM cycle and so it aligns with the midpoint of the current and voltage
ripple waveforms. For simplicity, it is assumed all three phases run with a duty
When it comes to isolated phase current measurement in a 3-phase motor
cycle of 50%, which means there is only one rising slope and one falling slope
drive, there are several technologies to choose from. Three popular methods
of the current.
are outlined in Figure 1; an isolated sensor, such as a Hall effect or current
transformer, combined with an amplifier, a resistive shunt combined with an Average Current
isolation amplifier, and a resistive shunt combined with an isolating Σ-Δ ADC.
Phase Current
iu, iv, iw U
V High-Side PWM
AC Motor
W
PWM_SYNC
TSW/2 Time
TSW
ADC Figure 2. Phase current assumes average value at the beginning and center of
Motor the PWM period.
Control
Algorithm Σ For control purposes, only the average component of the current is of interest.
Sinc3
The most common way to extract the average component is to sample the
signal synchronized to PWM_SYNC. In these instances, the current assumes
Figure 1. Common current measurement technologies for 3-phase motor drives. its average value so if there is tight control of the sampling instant, under
sampling is possible without suffering from aliasing.
This article focuses on the highest performing method—Σ-Δ conversion.
Typically, Σ-Δ ADCs target variable frequency motor drives and servo With conventional successive approximation (SAR) ADCs, sampling is done
applications where high signal quality and galvanic isolation are required. by a dedicated sample-and-hold circuit giving the user tight control of the
Along with the ADC comes demodulation and filtering, which are typically sampling instant. Σ-Δ conversion, on the other hand, is a continuous sampling
handled by an FIR filter such as a 3rd-order sinc filter (sinc3). process and other means of extracting the average value of the current are
Visit analog.com
2 Sigma-Delta Conversion Used for Motor Control
needed. To get a better understanding of the problem at hand, a high level As can be seen, the filter is a weighted sum, which gives more weight to
view of the Σ-Δ signal chain is helpful, as shown in Figure 3. samples at the center and less weight to samples at the beginning/end of the
sequence. Due to the switching component of the phase currents this must
be taken into account or feedback will suffer from aliasing. Fortunately, the
Σ-Δ
Converter
Filter Decimation impulse response is symmetrical, meaning the sinc filter gives equal weight
Analog 1-Bit Multibit To MC
Input Digital Digital Algorithm to samples before and after the center pin. Furthermore, the switching compo-
Figure 3. Signal chain when using Σ-Δ conversion. nent of the phase current is symmetrical around the point of average current.
That is, if x equally spaced samples are taken before the instant of average
The first element is the converter itself. By sampling the analog signal at current and added to x equally spaced samples taken after the instant of
several MHz, the signal is converted into a 1-bit data stream. Furthermore, average current, the switching component sums to zero. This is achieved by
the converter shapes and pushes the quantization noise to higher fre- aligning the center pin of the impulse response to the PWM_SYNC pulse as
quencies. Following the converter is demodulation in the form of a filter illustrated in Figure 5.
and decimation. The filter converts the 1-bit signal into a multibit signal
and the decimation process brings the update rate down so it matches
Sample Point
that of the control algorithm. Filtering and decimation can be done in
two stages, but a very common approach is to use a sinc filter which Phase Current
can do both in one stage. The sinc filter can be implemented in an
FPGA, or as is becoming commonplace, the filter can also be a standard
peripheral in a microprocessor.3 Regardless of how the sinc filter is
Impulse Response
implemented, 3rd-order (sinc3) is the most popular variant.
From a control point of view the ADC can be seen as ideal—a conversion rate
PWM_SYNC
of typically 10 MHz to 20 MHz introduces insignificant delay in a control loop
with a bandwidth of a few kHz. The sinc3 filter, however, introduces a delay Time
and makes it impossible to talk about one defined sampling instant. To get a Figure 5. Aligning sinc filter impulse response to PWM.
better grasp on this, the filter’s representation in complex frequency domain,
G(z), is helpful: To align the impulse response to PWM correctly, the length of the impulse
response must be known. The number of pins in impulse response of a
( 1 – z –DR N
) ( 1
)
N
1 1 3rd-order filter is:
G ( z) = × = × × 1 – z –DR
DR 1 – z –1 DR 1 – z –1
N × DR – 2
DR is decimation rate and N is order. The filter is N integrators (1/(1 – z – 1))
updated at sampling frequency and N differentiators (1 – z – DR ) updated at the Using this equation the length of impulse response in seconds can be
decimation frequency (sampling frequency/DR). The filter has memory, which calculated as:
means the current output depends not only on current input but also on previ- tM (N × DR – 2)
ous inputs and outputs. The behavior of the filter is best illustrated by plotting
the filters impulse response: with tM being the period of the modulator clock. This time is important
because it tells how long it takes a sample to propagate through the
∞
y[n] = ∑ x[k] × h[n – k]
filter. The center pin of the impulse response is exactly halfway through
the total filter length so the time it takes a sample to propagate halfway
k = –∞
through must be:
where y is the output sequence, x is the input sequence and h is the systems
impulse response. Because a sinc filter is a linear and time invariant system, τM (N × DR – 2)
τd =
the impulse response h[n] can be used to determine the response to any input 2
at any time. As an example, the impulse response of a 3rd-order sinc filter with Therefore, if input sampling starts τd before PWM_SYNC and data from the
a decimation rate of 5 is shown in Figure 4. filter is read τd after PWM_SYNC, alignment will be as shown in Figure 5.
The start of sampling is controlled by the enable/disable of the modulator
0.15
clock. Once enabled, the filter will remain synchronized with the PWM and
there is no need to realign.
Control Timing
0.10
By aligning the impulse response to PWM_SYNC it is possible to measure
Amplitude
the phase current without aliasing but great care must be taken when data is
read from the filter. The sinc filter is started τd before PWM_SYNC but it takes
0.05
2 × τd for data to propagate though the filter. In other words, it is vital to wait
τd after PWM_SYNC before reading data from the filter. Only at this instant
is the true average value of the current available. Compared to a SAR-based
current measurement this makes a difference in control scheduling, as shown
in Figure 6.
0
0 1 2 3 4 5 6 7 8 9 10 11 12
Sample Number
In the SAR case (a), the PWM_SYNC pulse triggers the ADC to do a number of
samples and conversions. When data is ready for the control loop, an interrupt
Figure 4. Impulse response of 3 rd-order sinc3 filter with decimation rate of 5.
is generated and execution of the control loop can begin. In the Σ-Δ case,
Visit analog.com 3
A A
PWM B PWM B
C C
PWM_SYNC PWM_SYNC
ADC Sinc IR
𝛕𝛕d
Interrupt Interrupt
(a) (b)
Figure 6. Scheduling of a control algorithm, (a) using an SAR ADC, (b) using a Σ-Δ ADC.
Reference Y Reference
PI P P
+ Reference + Y
– + Y
Feedback + + +
–
I I
Feedback +
Feedback 1 –
Feedback 2
Figure 7. PI controller implementations. (a) Conventional implementation, (b) split P path and I path, (c) split P path and I path and split feedback.
the wait is not for the ADC but to let data propagate through the sinc filter. two sinc filters—one that is tuned for the P controller and one that tuned for
When data is ready, an interrupt is generated, indicating that the control loop the I controller. In Figure 8, the Clark and Park transformations are omitted for
can be executed. To make an analogy, the conversion time of the SAR ADC simplicity. However, current control is done in a rotating dq frame.
is comparable to the duration of half an impulse response. How long half an Current
impulse response is depends on modulation clock and decimation rate. Current
Reference
Controller
signal quality is high. At low decimation rates the opposite is true. This flex- Figure 8. Dual sinc filter and seperate P path and I path of current controller.
ibility is an advantage when it comes to design of motor control algorithms.
Usually parts of the algorithm are sensitive to delay but less sensitive to To assess the impact of splitting the current feedback into two paths, a
the accuracy of the feedback. Other parts of the algorithm work with lower stability analysis of the closed-loop has been performed. For the traditional
dynamics and benefit from accuracy but are less sensitive to delay. As an Z-domain analysis, the sinc filter poses a problem. It introduces a delay, which
example, consider Figure 7 (a) showing a conventional proportional-integral for any practical decimation rate is less than one sample period. For example,
controller (PI).4, 5 Both the P part and I part operate with the same feedback if a system running at fsw = 10 kHz, the delay of the filter will be less than
signal, meaning the signal must have dynamics that fit both control paths. 100 μs. From the control loop’s point of view, the sinc block is a fractional
However, it is possible to split the P path and I path, as shown in Figure 7 delay filter. To model a fractional delay, the sinc filter was approximated by
(b) and from this stage it is a small step to Figure 7 (c) where the P path and an all-pass filter. At lower frequencies—up to about half the Nyquist
I path are separate and operate with feedback signals that have different frequency—the approximation is accurate but at a higher frequency there
dynamic properties. is some deviation from the ideal filter. However, the purpose here is to get
an understanding of how dual feedback affects loop stability and for this the
The task of the P part is to suppress fast load changes and fast speed approximation serves well.
changes, but precision is not a main concern. In other words, the P part
would benefit from a sinc filter with a low decimation rate and short delay. For comparison, Figure 9 (a) shows the closed-loop amplitude response
The task of the I part is ensure stable and accurate steady state perfor- when only one sinc filter is used in the feedback path (no dual feedback).
mance, which requires high precision. Therefore, the I part would benefit The switching frequency fsw is 10 kHz, setting the Nyquist frequency at 5 kHz.
from a sinc filter with a high decimation rate and longer delay. This leads With these system parameters, the closed-loop response is plotted for
to an implementation as shown in Figure 8. sinc filter group delays ranging from 0 μs to 80 μs. Note, group delay relates
directly to decimation rate. As expected, low decimation rate and group delay
The motor phase current is measured by a sensor (shunt) and through an has little effect on closed-loop stability, but as the delay is increased, the
antialiasing filter fed to the Σ-Δ ADC. The 1-bit data stream is then input into system becomes less and less damped.
4 Sigma-Delta Conversion Used for Motor Control
6 6
4 4
Closed-Loop Amplitude Response (dB)
0 0
–2 –2
–4 No filter –4 No Filter
Delay = 20 µs Delay = 20 µs
–6 Delay = 40 µs –6 Delay = 40 µs
Delay = 60 µs Delay = 60 µs
–8 Delay = 80 µs –8 Delay = 80 µs
–10 –10
101 102 103 101 102 103
Frequency (Hz) Frequency (Hz)
(a) (b)
Figure 9. Effect of dual feedback on current control performance, (a) with shared sinc filters for P controller and I controller, (b) with separate sinc filters for P controller and I controller.
Now when splitting the feedback into separate paths for the P controller and 0
I controller, Figure 9 (b) is obtained. In this case the decimation rate of the 0
sinc filter for the P controller is fixed to give a group delay of 10 μs. Only the
Sinc Amplitude Response (dB)
As seen in Figure 9 (b), increasing the delay for the I controller has very little
effect on closed-loop stability. As discussed, these properties can be utilized to
increase the dynamic, as well as steady state performance of the loop. –100 –50
In this article the algorithm using split feedback is a PI controller. However, this
is only one example and most control systems have several algorithms that
–150
would benefit from having their feedback tuned, according to the dynamic
and precision requirements. A few examples are flux observers, feed forward
controllers, and differential parts of a PID controller.
–200 –100
0 10 20 30 40 50 60 70 80
Filtering Technique Frequency (kHz)
A filter has a finite attenuation and some switching noise from turning on/off Figure 10. Power spectrum of phase current (green) along with sinc filter amplitude
the IGBTs of the inverter will pass through filter. This section will explore a response (purple).
technique that helps eliminate switching noise from the current feedback. Some HW implementations of the sinc filter will not support decimation rates
If a motor is driven by a voltage source inverter using standard space high enough to place a pole/zero around the PWM frequency. Furthermore,
vector modulation (SVPWM6) the noise spectrum of the phase current the filter group delay associated with such high decimation rates may be
will be characterized by side bands centered around integer multiples of unacceptable. In the example used in Figure 10, the decimation rate of
the switching frequency. For example, if 10 kHz switching frequency is 800 and modulation frequency of 8 MHz gives a delay of 150 μs.
used, there would be high levels of noise around n × 10 kHz with n being Another approach is to let the sinc filter run with a lower decimation rate and
an integer. A typical spectrum is shown by the green curve in Figure 10. then do postprocessing of the data in software. Still assuming fsw = 10 kHz
These sidebands introduce noise in the current feedback and effective and fM is 8 MHz, a possible approach is to let the HW sinc filter run with a
attenuation is therefore desirable. decimation rate of 200, which results in a data rate of 8 MHz/200 is 40 kHz.
The location of the poles/zeros of the sinc filter are determined by Now this data rate is too high for the motor control algorithm, which makes it
the decimation rate and modulation frequency. That means the user possible to introduce a SW filter that takes the data rate down to 10 kHz.
has freedom to tune the frequency response of the filter to best fit the An example of such a filter is a 1st-order sinc filter with a decimation rate of
application. An amplitude response of a 3rd-order sinc filter is shown 4 (effectively a moving average of over four samples). This configuration is
by the purple curve in Figure 10. As expected, the amplitude trails shown in Figure 11.
off at higher frequencies but the amplitude also has characteristic Hardware Software
notches where the attenuation approaches infinity. The notches are at Data Stream Feedback to
from Σ-Δ ADC MC Algorithm
frequencies determined by modulator clock and decimation rate: Sinc3
DR of 200
Sinc1
DR of 4
8 MHz 40 kHz 10 kHz
fM Data Rate Data Rate Data Rate
fNOTCH =
DR Figure 11. Combining HW and SW sinc filter.
If notches are put at the same frequencies as the sidebands of the phase Since the HW filter outputs data at a rate higher than needed by the control
current spectrum, the inverter switching noise is very effectively attenuated. algorithm, the SW filter adds little delay to the signal—much less than what
As an example, consider a case where the inverter switching frequency fsw would be the case if the HW filter is used directly to decimate down to the
is 10 kHz, the ADC modulator clock fM is 8 MHz and decimation rate DR is updated rate of the control algorithm. Furthermore, the sinc1 filter still puts
800. This puts the notches at n × 10 kHz and the response is as shown in a notch at all the sidebands of the phase current spectrum. Therefore, the
Figure 10. Note how each sideband is attenuated by a notch. benefits of highly attenuating the switching noise from the inverter still exists.
Visit analog.com 5
The filtering technique can be combined with the split feedback path. Since References
the combination of an HW and SW sinc filter gives very high attenuation but
Application Note AN-283. Sigma-Delta ADCs and DACs. Analog Devices.
1
adds some phase to the current feedback, the technique lends itself best to
the I path. Hogenauer, Eugene B. “An Economical Class of Digital Filters for Decimation
2
a 400 V motor control platform from Analog Devices, see Figure 12. The power
board features universal 110 VAC /230 VAC input voltage, boost power factor Klarenbach, Christoph, Jens Onno Krah, and Heiko Schmirgel. “Design of
4
correction, 3-phase IGBT inverter rated at 5 ARMS continuous. The motor Fast and Robust Current Controllers for Servo Drives Based on Space Vector
is a Kollmorgen AKM22 3-phase PM servo motor with incremental encoder Modulation.” PCIM Europe. 2011.
feedback. The Σ-Δ ADC used for current feedback is AD7403. The Σ-Δ ADCs Krah, Jens Onno. “Closed-Loop Control Method and Closed-Loop Control
5
interface directly to a processor, ADSP-CM408, which has built-in sinc filters Device with Multi-Channel Feedback.” US 20100141198 A1.
that support the measuring techniques described in this article. For further
information refer to.7 Holtz, Joachim. “Pulsewidth Modulation—A Survey.” IEEE Transactions
6