AN 669: Drive-On-Chip Design Example for Cyclone V Devices

ID 683466
Date 5/15/2022
Public
Document Table of Contents

9.6. Sigma-Delta ADC Interface for Drive Axes

The Drive-On-Chip Design Example sigma-delta ADC interface samples the 20-MHz 1-bit ADC serial input for 3 phase current inputs for each drive axis. A decimating sinc3 filter in the FPGA then low-pass filters the serial input. The sinc3 filter does not require hardware multipliers.

Sinc3 Filter

Figure 33. Sinc3 Filter TopologyThe input samples pass through three integrator stages before a factor M decimates them. The design reserves every Mth sample and discards M-1 samples. The design passes the reserved samples through three differentiators to produce a final output value.

The pulse-width modulation (PWM) block triggers ADC conversion with a reset signal that resets the filters and control logic. The design calculates:

  • The direct-current gain of the sinc3 filter as GainDC = MK (where K = 3 for sinc3).
  • The internal bus width of the filters as Internal bus width = 1 + Klog2M, to account for word growth in the filter stages
  • The output data rate for an input sample rate fS and decimation factor M as Data rate = fS/M.

When the settling time satisfies and the ADC conversion completes, the design sends an interrupt to the processor.

The sinc3 filter requires a time period 3× longer than the time period of the output data rate to settle. The standard settings of M=128 keeps the settling time short and a deliver a suitable ENOB of 16bits. By choosing to synchronize sampling to the quiet periods of the PWM waveform, signal quality is acceptable when sampled at 16 kHz despite the theoretical output data rate of 156.2 kHz.

Table 14.  Sinc3 Filter: Fs = 20 MHz
Decimation (M) GainDC Word Size Bus Width Data rate (kHz) Settling Time (µs) ENOB
8 512 9 10 2500 1.2 6.4
16 4096 12 13 1250 2.4 8.9
64 262,144 18 19 312.5 9.6 13.9
128 2,097,152 21 22 156.2 19.2 16.4

Two Filter Paths

The design has two separate filter paths: a control loop filter path and an overcurrent detection filter path.

The control loop filters are slower but more accurate than the overcurrent detection filters with a software selectable decimation factor of M=128 or M=64. The control loop filters have an offset correction feature for zero-offset correction. The filter output is a signed 16 bit (2's complement) format.

The overcurrent detection filters are faster but less accurate than the control loop filters with a software selectable decimation factor of M=16 or M=8. A software configurable overcurrent output provides a direct output to disable the motor when under hardware control.

The control loop and overcurrent detection filters use the same control bit for decimation selection. The possible selections are:

  • control loop M=128, overcurrent M=16
  • control loop M=64, overcurrent M=8.

Clocks

The design performs synchronization between the ADC clock and the FPGA system clock at the output stage before the design delivers output data in the Avalon memory-mapped interface agent registers.

The external ADC components require a clock source from the FPGA and return samples synchronous to the FPGA-sourced clock. The same clock within the FPGA drives the ADC filters.

You must apply appropriate timing constraints in the Intel Quartus Prime software project to guarantee correct sampling of the ADC interface data. Base the sampling on the clock to output specification of the ADC.

Did you find the information on this page useful?

Characters remaining:

Feedback Message