Isolated sigma-delta (∑-Δ)-based analogue-to-digital converters (ADCs) have become the preferred method for phase current measurement in high performance motor and servo drives. The converters have deservedly earned a reputation for robust galvanic isolation and excellent measurement performance. With every new generation of ADCs, the performance is increased even further, but to fully utilise the potential of the latest ADCs, the rest of the motor drive needs to be designed accordingly.
This article discusses demodulation of sigma-delta coded data using sinc filters in a motor control application. It then takes a close look at different approaches for sinc filter and control algorithm synchronisation.
Introduction
Motor drive manufacturers continue to improve the performance and robustness of their products. Some of the improvements have been realised through more advanced control algorithms and higher computational power. Other improvements have been accomplished by minimising non-ideal effects in the feedback circuits such as latency, skewing, and temperature drift.1
When it comes to feedback for the motor control algorithm, the most critical part is phase current measurement. As control performance increases, the system becomes more and more sensitive to non-ideal effects such as timing accuracy, offset/gain errors, and synchronisation of multiple feedback channels. Over the years, semiconductor companies have focused on reducing these non-ideal effects in the feedback signal chain, and that trend is likely to continue. The ADuM7701 is one example of the latest generation of isolated sigma-delta ADCs optimised for phase current measurement. While the performance of the ADC is important, there is a high risk of introducing non-ideal effects in the rest of the feedback path as well. This article goes beyond the ADC and primarily discusses the remaining part of feedback path. While the main focus is on motor control applications, this article applies to any system that requires tight synchronisation of sigma-delta ADCs.
The typical signal chain, when using a sigma-delta ADC, is shown in Figure 1. An analogue input voltage is created by letting the phase current pass through a resistive shunt. The sigma-delta ADC converts the analogue signal into a 1-bit data stream and provides galvanic isolation so everything that follows the ADC is isolated from the motor phase potential. Following the converter is demodulation in the form of a filter. The filter converts the 1-bit signal into a multi-bit signal (M-bit) and brings the data update rate down through the process of decimation. While the decimation in the filter lowers the data rate, it is typically still too high to match the update rate of the control algorithm. To solve this problem, a final downsampling stage is added.
Figure 1. A sigma-delta signal chain for phase current measurement.
Throughout this article it is assumed the filter and decimation stages are implemented in an FPGA and that the filter is a third-order sinc filter (sinc3).
Sinc Filter Synchronisation
Sigma-delta ADCs and sinc filters are criticised for being difficult to control in the time domain and for their lack of a defined sampling instant.2 When compared to a conventional ADC with a dedicated sample-and-hold circuit, there is some reason for concern. However, there are ways to work around this. As will be shown in this section, it is crucial to synchronise the sinc filter to the rest of the system and to sample the phase current at the right instant. If this is not done correctly, the resulting measurement will suffer from significant distortion.
The output from a sinc filter is not a representation of what the input to the sigma-delta ADC is at that instant. Rather, the output is a weighted average of what the input was during a windowed period in the past. This behaviour is due to the filter’s impulse response. Figure 2a shows the impulse response of a sinc3 with a decimation rate of 5. The figure shows how the filter output is a weighted sum of the input sequence that gives more weight to samples at the centre and less weight to samples at the beginning/end.
Before proceeding, a few basic definitions are needed. The sigma-delta ADC clock, also called the modulator clock, is referred to as fmod. The decimation rate (DR) determines the decimation frequency (fdec) and is linked to fmod, as shown in Equation 1:
The right side of Figure 2 shows the effect the impulse response has on the filter’s step response. As the step is applied, the filter output is unaffected, and it takes 3 full decimation cycles before the filter reaches steady state. Based on this, some important properties of a sinc3 filter can be stated:
- The group delay is 5 decimation cycles long
- The settling time is 3 decimation cycles long
These properties are important when it comes to synchronising the filter to the control system and they will be utilised throughout the article.
Figure 2. (a) Sinc filter impulse response for a filter with a decimation rate of 5. (b) Sinc filter step response and relation to impulse response.
Before discussing sinc filter synchronisation, the characteristics of the input signal must be defined. This in turn will define what the filter must be synchronised to.
Figure 3 shows a simulated phase current of a 3-phase permanent magnet motor driven by a voltage source inverter. The modulation scheme is space vector PWM3 and the switching frequency is 10kHz. The motor is loaded to 5A peak phase current and the rotational speed is 3000rpm. This setup, along with 3 pole pairs, results in an electrical fundamental period of 6.67ms.
Figure 3. Motor phase current with space vector pulse-width modulation.
The phase current can be seen as two components: an average and a switching component. For control purposes, only the average component of the current is of interest, so the switching component must be fully removed. The most common way to extract the average component is to sample the signal synchronised to the PWM waveform applied to the motor terminals. This is illustrated in Figure 4. The top signal shows the switching waveform of a phase current, the middle signal shows a high-side PWM signal for the corresponding inverter phase leg, and the lower signal shows the synchronising signal from the PWM timer. The PWM synchronisation signal is asserted at the beginning and the centre of a PWM cycle. For simplicity, it is assumed that all three phases run with a duty cycle of 50%, which means there is only one rising slope and one falling slope of the current. At the rising edge of the PWM synchronisation signal, the current assumes its average value, so if the currents are sampled at exactly that moment, the switching component will be fully suppressed. Effectively, the sample-and-hold circuit is equivalent to a filter with infinite attenuation at the switching frequency.
Figure 4. Measuring phase current at the beginning and centre points of a PWM period attenuates the current ripple.
Figure 5 shows the result of what happens when this kind of sampling is applied to the waveform appearing in Figure 3. The right side shows a close-up of the actual phase current and the sampled current. Note how the sample-and-hold process completely removes the ripple.
Figure 5. Ideal sampling of phase current: (a) a fundamental period of ideally sampled phase current, (b) a close-up look at phase current and sampled phase current.
A per-unit representation of the sampled current is used where 0A is mapped to 0.5 and the full scale is 8A. This scaling is chosen for easier comparison to the sigma-delta measurements that follow. The result shown in Figure 5 is the ideal scenario, with only the fundamental component left after sampling. As such, these data can be considered the benchmark to which the sigma-delta measurements will be compared.
Sigma-Delta Measurement and Aliasing
With the ideal sample-and-hold ADC, it is possible to extract the fundamental component because of tight control of the sampling instant. However, sigma-delta conversion is a continuous sampling process and the ripple component will inevitably be part of the measurement.
With sigma-delta conversion there is a close link between the decimation rate and signal-to-noise ratio (SNR). The higher the decimation rate, the more effective number of bits (ENOB) of the output. The downside is, as the decimation rate increases, the group delay also increases so the designer must compromise between signal resolution and delay in the feedback chain. As a general rule, the delay must be kept small compared to the control cycle period. For motor control, typical decimation rates fall in the range of 128 to 256, which provides a good compromise between SNR and group delay.
For data sheet specifications, a decimation rate of 256 is commonly used. For example, ADuM7701 has an ENOB of 14bits, at a decimation rate of 256. With such a high ENOB number, a very clean measurement is to be expected. To verify this, suppose the phase current shown in Figure 3 is measured with a sigma-delta ADC clocked at 20MHz and that the data stream is demodulated by a sinc3 using a decimation rate of 256. The result is shown in Figure 6a.
Figure 6. (a) The output from the sinc filter. (b) A close-up look at the actual phase current and decimated output from the sinc filter.
The fundamental component of the phase current is obvious, but the measured signal is very noisy when compared to the ideal sampling shown in Figure 5a. So while the ADC and sinc filter by themselves provide impressive ENOB numbers, the quality of the feedback signal is quite poor. The reason for this can be seen in Figure 6b, which shows a close-up of the sinc filter output and the actual phase current. Notice how the 10kHz switching component of the phase current is phase shifted but hardly attenuated by the sinc filter. Now, suppose the motor control algorithm is executed once per PWM period and that the latest sinc filter output is read at the beginning of the period. Effectively, the sinc filter output is downsampled to match the update rate of the control algorithm. The downsampling and resulting signal is shown as the sampled sinc output in Figure 6b. Figure 7a shows the result of a full fundamental period that is filtered and sampled at the PWM rate.
Figure 7. (a) Sampled output from the sinc filter. (b) Measurement error.
It is clear the phase current measurement is highly distorted and would lead to poor control performance. Increased torque ripple and a need to reduce the bandwidth of the current control loop should be expected. If the measurement in Figure 7a is subtracted from the ideal measurement (Figure 5a), the error is obtained (see Figure 7b). The error is approximately 7% of the full-scale signal, which is very far from matching the expected 14 ENOB.
This sigma-delta measurement and aliasing scenario demonstrates a very common operating mode of sigma-delta-based current measurement and how it has led designers to conclude that sigma-delta ADCs are unsuited for motor drives. However, the example does not demonstrate the poor performance of the ADC itself. Rather, it demonstrates poor performance of the remaining signal chain because it is not properly set up for phase current measurement.
The ADC samples the input signal at several megahertz (typically 10MHz to 20MHz), and, with a decimation rate of 256, the sinc filter effectively removes the modulation noise. With such a high sampling rate the ripple component of the phase current is present in the filter output and that can become a problem in the downsampling stage of the signal chain (see Figure 1). If the ripple component is not sufficiently attenuated, and the motor control algorithm consumes current feedback at the PWM rate, the result is aliasing due to downsampling.
To avoid aliasing, the signal must be free of energy above half the sampling frequency, as per standard sampling theory. If the sigma-delta ADC output is downsampled to 10kHz, any noise at 5kHz or higher would fold into the measurement. As shown, there was plenty of 10kHz switching noise left in the signal after the sinc filter. One option to attenuate the 10kHz noise is to increase the decimation rate, but doing so would result in an unacceptably long group delay. A different approach is needed.
Improving Measurement Through Synchronisation
The main problem with the antialiasing approach discussed in the previous section is illustrated in Figure 8. The output from the sinc filter is read at some instant uncorrelated to the switching component of the phase current. When the output is read, the filter delivers a weighted average of the input signal according to the impulse response. Sometimes this weighted average spans the low point of the switching waveform and sometimes it spans the highpoint. As a result, the signal used as feedback contains significant noise with frequencies from 0Hz to half the PWM frequency.
Figure 8. The impulse response is uncorrelated to the switching waveform.
A sigma-delta ADC samples continuously and the sinc filter outputs multiple measurements per PWM cycle (typically 10 to 20). Since each measurement spans 3 decimation cycles, the impulse responses overlap. For simplification, only three of these measurement/impulse responses are shown in Figure 8.
The source of the problem is that the impulse response is not locked to the switching component of current, which in turn is locked to PWM. The solution is to select the decimation rate so that there is a fixed integer number of decimation cycles per PWM period. For example, with a PWM frequency of 10kHz, a modulator clock of 20MHz, and a decimation rate of 200, there are exactly 10 decimation cycles per PWM period. With a fixed number of decimation cycles per PWM period, the impulse response is locked to PWM at all times and the measurement used for feedback is captured at the same point within the PWM cycle. The measurement of the phase current in this synchronisation scheme is shown in Figure 9a.
Figure 9. (a) Sampled output from the sinc filter when the impulse response is locked to PWM. (b) Measurement error.
It is clear that synchronising the impulse response to PWM has had a positive effect. The noise has been eliminated and, at first glance, the result seems similar to the ideal measurement in Figure 5a. However, when the sigma-delta measurement is subtracted from the ideal measurement, the result is the error signal in Figure 9b. The error magnitude is similar to the one shown in Figure 7b, but the frequency spectrum has changed. Now the error is a first-order harmonic that is equivalent to a gain error. The reason for this error pattern is illustrated in Figure 10.
Figure 10. The impulse response is locked to a fixed point within the switching period.
While the white noise error component has been eliminated, the signal is still distorted because the measurement is biased by the switching component. In Figure 10, notice how the sinc filter impulse response gives a weighted average around the peak of the switching waveform. Depending on the phase of the impulse response with respect to PWM, the size of the bias is limited only by the magnitude of the ripple current. As illustrated in Figure 3, the magnitude of the ripple component changes over a fundamental period, with the highest ripple at the peak of the fundamental current and the lowest ripple at zero-crossing. Because of this, the measurement error is a first-order harmonic component.
To get rid of the first-order harmonic measurement error, the impulse response must always be centred around the beginning or around the centre of a PWM period where the phase current is exactly at its average value. Figure 11 shows the impulse response centred at the beginning of a switching period. Around this point the switching waveform is symmetrical, so by having an equal number of measurement points on either side, the ripple component averages out to zero around this point.
Figure 11. The impulse response is locked to the switching period and aligned to the ideal measurement point.
With the impulse response locked and centred around the instant of average current, the resulting measurement is shown in Figure 12a and the measurement error is shown in Figure 12b. As the ideally sampled measurement, the signal is free of both white noise and gain error.
Figure 12. (a) Sampled output from the sinc filter when the impulse response is locked to PWM and centred around the instant of average current. (b) Measurement error.
The presented results show that the quality of a sigma-delta measurement relies on much more than just the decimation rate. The common belief that increasing the decimation rate will result in higher ENOB is only true in the absence of aliasing. Controlling the filter update rate and phase with respect to the input signal is much more important than the decimation rate. As an example, compare Figure 7, which was based on a decimation rate of 256, and Figure 12, which was based on a decimation rate of 200. Lowering the decimation rate improved the measurement significantly.
Summary
In summary, the conditions for an optimised sigma-delta-based phase current measurement are:
- The impulse response of a third-order sinc filter is 3 decimation cycles long, meaning it takes 3 decimation cycles for data to propagate through the
- The impulse response of the filter must be centred around the instant of average
- 5 decimation cycles of the impulse response must be located before the instant of average current and 1.5 decimation cycles of the impulse response must be located after the instant of average current.
- The sinc filter generates multiple outputs during a PWM period, but only one of these outputs is The rest are ignored.
References
1 Jens Sorensen and Dara O’Sullivan.“A System Approach to Understanding the Impact of Non-ideal Effects in a Motor Drive Current Loop.” Proceedings of PCIM Europe 2016.
2 Jens Sorensen. “∑-Δ Conversion Used for Motor Control.” Proceedings of PCIM Europe 2015.
3 Ahmet M. Hava, Russel J. Kerkman, and Thomas A. Lipo. “Simple Analytical and Graphical Methods for Carrier-Based PWM-VSI Drives.” IEEE Transactions on Power Electronics, January 1999.
About the Author
Jens Sorensen is a system applications engineer at Analog Devices, where he works with motor control solutions for industrial applications. He received his M.Eng.Sc. from Aalborg University, Denmark. His main interests are control algorithms, power electronics, and control processors. He can be reached at jens.sorensen@analog.com.
About the Author
Dara O’Sullivan is a system applications manager with the connected motion and robotics team within the Automation and Energy Business Unit at Analog Devices. His area of expertise is power conversion, control, and monitoring in industrial motion control applications. He received his B.E, M.Eng.Sc., and Ph.D. from University College Cork, Ireland, and he has worked in industrial and renewable energy applications in a range of research, consultancy, and industry positions since 2001. He can be reached at dara.osullivan@analog.com.
About the Author
Shane O’Meara is a system applications engineer with the Connected Motion and Robotics Team at Analog Devices. His area of expertise is precision conversion and signal chains for control and monitoring in industrial motion control applications. He received his B.Eng. from the University of Limerick and joined Analog Devices in 2011. He can be reached at shane.omeara@analog.com.
Promoted content: Does social media work for engineers – and how can you make it work for you?
So in addition to doing their own job, engineers are expected to do the marketing department´s work for them as well? Sorry, wait a minute, I know the...