9.6. Sigma-Delta ADC Interface for Drive Axes
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.
|Data rate (kHz)
|Settling Time (µs)
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.
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.