Microchip Technology ARD00330 データシート

ページ / 62
Meter Calibration
© 2011 Microchip Technology Inc.
DS51964A-page 17
EQUATION 2-7:
CALCULATIONS WITH THE INTERPOLATION METHOD
Equation 2-7 implements the linear interpolation on the previous sample of voltage for
the phase compensation. The present or the previous sample of current is considered,
depending on the voltage lag or lead condition respectively, as explained in Case1 and
Case 2, thus accounting to compensate phase by a maximum angle of ±N/2.
Case 1: Current Leads Voltage by Angle β
Phase correction factor “PHASE_COMPENSATION” is calculated for the correction
angle ‘β’ as explained in Equation 2-5 and Equation 2-6. In this case ‘β’ is positive, there-
fore “PHASE_COMPENSATION” value will be positive as explained in Note 1.
As the current leads the voltage during phase compensation, the voltage sample needs
to be given a lead by an angle ‘β’. From the interpolation method, it is possible to deter-
mine X(Θ + β) from X(Θ) and X(Θ - N) and achieve a lead. The lead can only be applied
to the previous sample, but not to the present sample.
Therefore, keeping the above argument in consideration to compensate the current
lead:
• Phase compensation is carried out on the voltage sample, introducing a lead by
using the present and the previous sample of voltage. This phase lead is applied
to the previous sample of voltage.
• As the phase lead is applied to the previous sample of voltage, the corresponding
previous sample of current is considered. This compensation brings voltage and
current in synchronization.
Case 2: Current Lags Voltage by Angle β
The phase correction factor “PHASE_COMPENSATION”, is calculated for the
correction angle ‘β’ as explained in Equation 2-5 and Equation 2-6. In this case, ‘β’ is
negative, therefore the “PHASE_COMPENSATION” value will be negative as
explained in Note 1.
As the current lags voltage during phase compensation, the voltage sample needs to
be given a lead by angle ‘N-β’. From the interpolation method, it is possible to deter-
mine X[Θ + N - β] from X(Θ) and X(Θ-N) as Θ-N ≤ Θ+ N-β ≤ Θ and achieve a lead. The
lead can only be applied to the previous sample, but not to the present sample.
Therefore, keeping the above argument in consideration in order to compensate the
current lag:
• Phase compensation is carried out on the voltage sample, introducing a lead by
using the present and the previous sample of voltage. This phase lead is applied to
the previous sample of voltage.
• As the phase lead is applied to the previous sample of voltage, the present sample of
current is considered. This compensation brings voltage and current in
synchronization.
Consider, X(Θ) and X(Θ - N) as known samples
X[Θ + β] = X[Θ] + (X[Θ] - X[Θ - N] ) * PHASE_COMPENSATION (magnitude)/256
Where:
Θ - N  
 Θ + β  
≤ 
Θ
Θ = Varies between 0 and 360°
= Angle between successive samples = (360 * frequency of signal / sampling rate)
PHASE_COMPENSATION value is derived from Equations 2-2 to 2-6.