SBOA444 November 2020 TMCS1100
The user must compensate the relative phase shift between voltage and current samples to ensure accurate measurements. The implementation of the phase-shift compensation consists of an integer part and a fractional part. The integer part is realized by providing an N samples delay. The fractional part is realized by a one-tap finite impulse response (FIR) filter that interpolates between two samples, similar to the FIR filter used for providing 90°-shifted voltage samples for reactive energy measurements. In the test software, a lookup table provides the filter coefficients that are used to create the fractional delays. The lookup table provides fractional phase shifts as small as 1/256th of a sample. The 7812.5-Hz sample rate used in this application corresponds to a 0.0090° degree resolution at 50 Hz. In addition to the filter coefficients, the lookup table also has an associated gain variable for each set of filter coefficients. This gain variable is used to cancel out the resulting gain from using a certain set of filter coefficients.
An alternative option to the software phase compensation used in this design is to use the phase compensation feature on the ADS131M04 device. If this hardware phase compensation scheme is used, filter coefficients are not necessary so it is not needed to divide by the gain of the filter coefficients.