Analog Devices ADE7880 energy meter Application Note
Below you will find brief information for energy meter ADE7880. This application note explains the steps involved in calibrating a three-phase energy meter based on the ADE7880.
Advertisement
Advertisement
AN-1171
APPLICATION NOTE
One Technology Way • P.O.
Box 9106 • Norwood, MA 02062-9106, U.S.A.
• Tel: 781.329.4700
• Fax: 781.461.3113
• www.analog.com
Calibrating a Three-Phase Energy Meter Based on the
ADE7880
by Aileen Ritchie
INTRODUCTION
This application note describes how to calibrate the ADE7880 .
Details on the calibration procedure, including equations and examples of how to calculate each constant are provided.
The ADE7880 is a high accuracy, 3-phase electrical energy measurement IC with serial interfaces and three flexible pulse outputs. The ADE7880 device incorporates second- order sigma-delta (Σ-Δ) analog-to-digital converters (ADCs), a digital integrator, reference circuitry, and all of the signal processing required to perform the total (fundamental and harmonic) active, and apparent energy measurements, rms calculations, as well as fundamental-only active and reactive energy measurements. In addition, the ADE7880 computes the rms of harmonics on the phase and neutral currents and on the phase voltages, together with the active, reactive, and apparent powers, and the power factor and harmonic distortion on each harmonic for all phases. Total harmonic distortion plus noise (THD + N) is computed for all currents and voltages.
Rev. A | Page 1 of 16
AN-1171
TABLE OF CONTENTS
Revision History ............................................................................... 2
Calibration Basics ............................................................................. 3
Calibration Steps ........................................................................... 3
Calibration Method (CF Output or Registers) ......................... 3
Calibration Setups ........................................................................ 4
Calibration Inputs ........................................................................ 4
Required Register Settings .......................................................... 5
Calibrating Using the CF Pulse Output ......................................... 6
REVISION HISTORY
3/13—Rev. 0 to Rev. A
Change to Title ................................................................................... 1
11/12—Revision 0: Initial Version
Application Note
Gain Matching ...............................................................................7
Energy Calibration ........................................................................8
Phase Calibration (Optional).......................................................8
Current and Voltage RMS ......................................................... 10
Calibrating Using the Energy Registers ....................................... 12
Gain Matching ............................................................................ 12
Phase Calibration (Optional).................................................... 12
Energy Gain Calibration ........................................................... 13
Current and Voltage RMS ......................................................... 15
Rev. A | Page 2 of 16
Application Note AN-1171
CALIBRATION BASICS
To obtain accurate readings that do not reflect meter-to-meter variations in external components or the internal voltage reference, the ADE7880 requires calibration. Calibration is required on every meter; however, it is a simple process that can be performed quickly.
CALIBRATION STEPS
When designing a meter using the ADE7880 , a maximum of three calibration stages are required: gain, phase, and offset.
Depending on the external configuration and meter class, one
or more of these stages can be omitted.
ENERGY DATA
÷
CFxDEN
CFx PULSE
ENERGY REGISTERS
Figure 1. Accessing Energy Data
As shown in Figure 1, the energy register data and CFx output
data are related by a factor of the CFxDEN register.
CFxOutput (Hz) = 1/CFxDEN × Energy Register (Update Rate)
Table 1 provides guidance on which calibration steps are
typically required for a particular configuration. Because the requirements and performance can differ on a design-by-
design basis, use Table 1 only as a general guideline. The
performance of the meter should be evaluated to determine whether any additional calibration steps are required.
CALIBRATION METHOD (CF OUTPUT OR
REGISTERS)
The ADE7880 can be calibrated by either reading the internal energy registers or measuring the external calibration frequency
(CF) output pulse. The relationship between these two measure-
The decision of whether to calibrate using the CF or energy register depends on both the application and available calibration
equipment (see the Calibration Setups section).
If the meter specification requires calibration to a particular meter constant, the CF output pin is typically used. If the CF output pin is not being used and no meter constant is specified by design, the register may be a more convenient method. Calibrating the energy registers result in accurate readings on the CF output pin and vice versa. Both methods result in the same level of accuracy.
Table 1. Typical Calibration Steps
Calibration Stage Typical Requirement
Gain Calibration
Phase Calibration
Offset Calibration
It is always required.
When using a current sensor that introduces a phase delay, such as a current transformer (CT) or Rogowski coil, it is often required.
When using a current sensor that does not introduce a delay it is not typically required.
When looking for high accuracy over a large dynamic range, it is often required.
It is not usually required for all other meter designs.
Rev. A | Page 3 of 16
AN-1171
CALIBRATION SETUPS
Two calibration setups can be used to calibrate the ADE7880 : a reference meter or an accurate source. When using a reference meter, the CF output method of calibrating must be used. When using an accurate source, either the CF output or energy register can be used. Additional information on the two calibration set-
ups are in the Reference Meter section and the Accurate Source
section.
Reference Meter
The most popular method of calibration uses an external reference meter to determine the required compensation. If using reference metering, the CF output must be used because the reference
meter determines the error based on the CF pulse (see Figure 2).
The reference meter should be more accurate than desired specifications of the resulting meter.
REFERENCE METER
% ERROR
CF
THE REFERENCE METER
PROVIDES THE ACCURACY
FOR THE CALIBRATION
SOURCE
CURRENT X3
VOLTAGE X3
Figure 2. Reference Meter Configuration
When using a reference meter, a source is required to provide the required inputs to the meter; however, the accuracy of the source is not as critical because the reference meter determines the calibration result. Typically, reference meters are more cost effective than accurate sources; therefore, this is the most popular calibration method.
Accurate Source
The second calibration method is to use an accurate source to perform the calibration. If using an accurate source, either the
CF output or the energy registers can be used to access the energy data. The accurate source must be able to provide a controllable voltage and current input with higher accuracy
than that required in the resulting meter. Figure 3 shows a
typical setup using an accurate source.
Application Note
CF THE SOURCE PROVIDES THE
ACCURACY FOR CALIBRATION
SOURCE
CURRENT X3
VOLTAGE X3
Figure 3. Accurate Source
An accurate source is typically more expensive than a reference meter and is, therefore, a less popular method of calibration.
CALIBRATION INPUTS
As shown in Table 1, a maximum of three calibration steps are
required. Each calibration step requires a separate measurement to be taken and calculation to be performed. To allow the separate gain, phase, and offset errors to be extracted, three separate sets of input conditions are typically required. These
Table 2. Typical Input Conditions
Calibration
Step
Voltage
Input
Current
Input
Phase
Gain
Offset
Nominal
Nominal
Nominal
Nominal
Nominal
Minimum
Power
Factor
0.5
1
1 where:
The nominal voltage is typically 110 V or 220 V.
The nominal current is typically around 1/10 of the maximum current, such as 10 A.
The minimum current is the minimum current specified in the meter while staying within the specification of the measurement for the ADE7880 , such as 100 mA.
To speed up the calibration procedure and minimize the number of input conditions, the gain calibration can also be performed at a power factor of 0.5. This allows one single calibration point to be used for both the gain and phase calibration. In many cases, this reduces the total calibration procedure to one single point since offset calibration is not always required.
Rev. A | Page 4 of 16
Application Note
Table 3 shows the modified calibration conditions.
Table 3. Modified Input Conditions
Calibration Step
Voltage
Input Current Input
Phase
Gain
Offset
Nominal
Nominal
Nominal
Nominal
Nominal
Minimum
Power
Factor
0.5
0.5
1
AN-1171
When using the input conditions shown in Table 3, it is
important that the power factor used is as close to 0.5 as possible and that it is not varying. Note that an inductive or capacitive load can be used. This application note provides example calculations with the modified input conditions
REQUIRED REGISTER SETTINGS
Prior to calibrating the ADE7880 , it is important that a set of
registers are configured. These registers are listed in Table 4.
Refer to the ADE7880 data sheet for details on these registers.
Table 4. Default Registers Required Prior to Calibration
Register
Address Register Name Register Description
0xEA02 WTHR
0xEA03
0xEA04
0x4388
0x439F
0xE60E
VARTHR
VATHR
DICOEFF
VLEVEL
Threshold register for active energy
Threshold register for reactive energy
Threshold register for apparent energy
Digital integrator algorithm; required only if using di/dt sensors
Threshold register used in fundamental only calculation
COMPMODE[14]
(SELFREQ)
50 Hz or 60 Hz selection for fundamental only measurement
Suggested
Value
0x03
0x03
0x03
0xFFF8000
Comment
See the ADE7880 data sheet, Equation 26 for details on modifying this constant.
See the ADE7880 data sheet, Equation 37 for details on modifying this constant.
See the ADE7880 data sheet, Equation 44 for details on modifying this constant.
Only required when using a Rogowski coil
0x38000 See the ADE7880 data sheet, Equation 22 for details on modifying this constant. Required for fundamental only readings.
50 Hz 0 Required for fundamental only readings.
60 Hz 1
Rev. A | Page 5 of 16
AN-1171
CALIBRATING USING THE CF PULSE OUTPUT
When calibrating using the pulse output, the CFx pin must be configured to output the measurement and channel that is being calibrated. For example, when calibrating active energy on Channel A, configure CF1, CF2, or CF3 to be proportional to the active power on Channel A. This is achieved by setting
Bit 0 through Bit 8 of the CFMODE register (Address 0xE610) as well as Bit 0 through Bit 8 of the COMPMODE register
(Address 0xE60E). CF1, CF2, or CF3 can be used.
For faster calibration, multiple different measurements or channels can be output on CF1, CF2, and CF3, simultaneously, with up to three calibrations performed in parallel. This allows all three phases to be calibrated simultaneously.
Figure 4 shows the calibration flow for the energy measure-
ment. Use this flow to determine a calibration routine.
Application Note
START
CALIBRATION WITH
CF PULSE
MATCH PHASES
(SEE GAIN
MATCHING
SECTION)
SET CFxDEN
(SEE THE
SET METER
CONSTANT
SECTION)
CALCULATION ONLY
REQUIRED ON FIRST
METER. THE SAME
VALUE CAN THEN BE
USED ON ALL
SUBSEQUENT
METERS.
CALIBRATE xPHCAL
(SEE THE PHASE
CALIBRATION
SECTION)
NO
DOES
THE METER
ACCURACY MEET
SPECIFICATION
OVER
PF?
YES
CALIBRATE xPGAIN
(SEE THE GAIN
CALIBRATION
SECTION)
CALIBRATE xWATTOS AND xFWATTOS
(SEE THE ACTIVE
ENERGY OFFSET
CALIBRATION
SECTION)
NO
DOES
THE METER
ACCURACY MEET
SPECIFICATION
AT LOW
CURRENT?
YES
CALIBRATE xFVAROS
(SEE THE REACTIVE
ENERGY OFFSET
CALIBRATION
SECTION)
ENERGY
CALIBRATION
COMPLETE
Figure 4. Energy Calibration Flow
Rev. A | Page 6 of 16
Application Note
GAIN MATCHING
Table 5. xGAIN
Calibration Registers
AIGAIN
BIGAIN
CIGAIN
AVGAIN
BVGAIN
CVGAIN
Address
0x4380
0x4382
0x4384
0x4381
0x4383
0x4385
It is convenient to match all three phases prior to calibrating.
Matching the phases results in easier computations because one pulse on the CF output has the same weight on each phase. It is recommended that phase matching be performed as the first calibration step.
To match phase current B and phase current C to phase current A, apply the same fixed input current to all phase currents. Because the meter has not yet been calibrated, it is recommended that the amplitude of the applied signal be between full scale and
100:1. The current rms reading can then be used to determine if there is any error between the phase currents. This error can then be corrected using the BIGAIN register (Address 0x4382) and the CIGAIN register (Address 0x4384).
AN-1171
The following equation describes how to adjust the BIRMS and
CIRMS readings to match that in AIRMS using the BIGAIN register and CIGAIN register respectively:
BIGAIN
CIGAIN
=
=
2
23
×
AIRMS
BIRMS
−
1
2
23 ×
AIRMS
CIRMS
−
1
It is recommended that the xIRMS measurements are taken synchronous to the zero crossing interrupt to reduce ripple. It is also recommended that some averaging be performed to obtain a more stable reading.
The same procedure can then be used on the voltage channels to match the xVRMS readings. The voltage channel gain register
BVGAIN (Address 0x4383) and CVGAIN (Address 0x4385) can be used to match the BVRMS and CVRMS to the AVRMS measurement, respectively.
BVGAIN
=
2
23 ×
AVRMS
BVRMS
−
1
CVGAIN
=
2
23
×
AVRMS
CVRMS
−
1
Once this step is complete, all phase currents and all phase voltages will have the same weight.
Rev. A | Page 7 of 16
AN-1171
ENERGY CALIBRATION
Table 6. CFxDEN
Calibration Registers
CF1DEN
CF2DEN
CF3DEN
Address
0xE611
0xE612
0xE613
The CFx pulse output can be configured so that each pulse represents a fraction of a kWh. This relationship is known as the meter constant. Typically, design specifications require a particular meter constant to allow the utility to verify the accuracy of meters from multiple manufacturers. Typical meter constants are 1600 imp/kWh, 3200 imp/kWh, and
6400 imp/kWh. If designing a meter that does not require a specific meter constant, an arbitrary value can be chosen.
The CFx output is configured using the divider, CFxDEN. This divider is calculated based on the meter constant and the nominal scaling on the current and voltage channels.
Assuming a meter constant of 3200 imp/kWh is required, the expected CFx can be determined under a given load.
With a load of 220 V and 10 A at a power factor of 0.5, the CFx output frequency is calculated as follows:
CF
EXPTECTED
=
Meter Constant
[kW]
3600 s/h
CF
EXPTECTED
=
3200 imp/kWh
×
220 V
×
10 A/ 1000
× cos( 60 )
3600 s/h
= 0.97778 Hz
Select the CFxDEN to obtain a frequency of 0.97778 Hz under the given load conditions. This can be done by determining the scale on the input pins.
Figure 5 shows a standard voltage channel input network.
PHASE
1MΩ
V
P
1kΩ
22nF
220V
NEUTRAL
V
N
1kΩ
22nF
Figure 5. Voltage Channel Inputs
V
P
( 220
=
V
INPUT
V
×
2 )
_
MAX
×
(
×
(1000
1
1000
+
1 )
1 kΩ
+
1) kΩ
=
=
0 .
311 mV
V
AS
%
OF FULL SCALE
=
0 .
311
×
100
=
62 .
29 %
0 .
5
With a voltage channel amplitude of 220 V rms, the input is
operating at 62.29% of full scale. Figure 6 shows a typical current
Rev. A | Page 8 of 16
Application Note
channel configuration. Assuming a CT turns ratio of 2500:1 and a burden resistor of 20 Ω, with a current channel amplitude of
10 A rms, the input operates at 16% of full scale.
PHASE
R1
I
AP
C1
220V
R
BURDEN
R3
NEUTRAL
I
N
C1
Figure 6. Current Channel Inputs
I
At CT Secondary
= 10 A/2500 = 0.004 A
I
V
Across Burden
= I × R = 0.004 × 20 = 0.08 V
AS % of FULL SCALE
=
0 .
08
0 .
5
× 100 = 16%
From the ADE7880 data sheet, the maximum CFx output with full-scale analog inputs is 68.818 kHz assuming WTHR = 3.
When a PF of 0.5 is applied, this reduces to 34.409 kHz. To obtain 0.9778 Hz with the given 220 V, 10 A, PF = 0.5 input, the CF denominator should be set to 0xDB3, as shown:
CFxDEN =
Output Freq
FULL SCALE
×
V
OPERATING
%
×
I
OPERATING
%
CF
EXPECTED
CFxDEN =
34 .
409 kHz
×
62 .
29 %
×
1 6 %
=
0xDB3
0 .
97778 Hz
Remember, writing 0xDB3 to the CFxDEN register sets the
CF output to around 0.97778 Hz for the conditions previously described. This CFxDEN setting can now be used on every
meter. The Gain Calibration provides a finer resolution
calibration that should be done on every meter to ensure that the 0.97778 Hz is precisely met.
PHASE CALIBRATION (OPTIONAL)
Table 7. xPHCAL
Calibration Registers
APHCAL
BPHCAL
CPHCAL
Address
0xE614
0xE615
0xE616
Phase calibration is required when using a current transformer
(CT) to remove any phase shift introduced by the sensor. CTs can add significant phase shift that introduce large errors at low power factors. If using a current sensor that does not introduce a phase delay calibration is not typically necessary as the
ADE7880 is very well phase matched.
The phase calibration is ideally performed with an inductive or capacitive load at a power factor of 0.5. If this load is not available, another power factor can be chosen. For best results, the power factor should be as close to 0.5 as possible. To perform phase calibration in one step with one reading, the active and reactive
Application Note
powers must be measured simultaneously. The following equation outlines how to determine the phase error in degrees.
Error
( ° )
= tan
−
1
CF
Active
CF
Reactive
sin( ϕ
) sin( ϕ
)
−
CF
Reactive
+
CF
Active
cos( ϕ
) cos( ϕ
)
where:
φ refers to the angle between the voltage and the current
(in degrees).
Once the error in degrees is determined, the following formula can be used to determine the required phase compensation.
PhaseResol ution
=
1 .
360
024
° ×
f
MHz
PhaseCompe nsation
=
abs
Error
( ° )
PhaseResol ution
where:
f refers to the line frequency.
Note that the format of the APHCAL register is such that if the value of the Error(degrees) is positive then a value of 512d must be added to the calculated PhaseCompensation prior to writing to the APHCAL register.
APHCAL
=
Error
Error
( ° )
( ° )
≤
>
0 ,
⇒
0 ,
⇒
APHCAL
APHCAL
=
=
PhaseCompe nsation
PhaseCompe nsation
+
512
For example, at 220 V and 10 A at a power factor of 0.5, if the total active power CFx output frequency is 0.0.9709 Hz and the fundamental only reactive power CFx output frequency is
1.7347 Hz:
Error
(
o
)
= tan
−
1
0 .
9709 sin( 60 )
1 .
7347 sin( 60 )
−
1 .
7347 cos( 60 )
+
0 .
9709 cos( 60 )
= −
0 .
76 °
Assuming that the line frequency is 50 Hz, the APHCAL compensation can be determined as
PhaseCompe nsation
=
abs
−
0 .
76
360
° ×
APHCAL
=
50
×
1 .
024
PhaseCompe
MHz
=
nsation
0
=
×
2B
0
×
2B
Depending on the current sensors being used on Phases A, B and C, different phase calibration values may be required in
APHCAL and BPHCAL.
Gain Calibration
Table 8. xPGAIN
Calibration Registers
APGAIN
BPGAIN
CPGAIN
Address
0x4389
0x438B
0x438D
AN-1171
The purpose of the energy gain calibration is to compensate for small gain errors due to part-to-part variation in the internal reference voltage and external components, such as the time error introduced by the crystal. Gain calibration is required on every meter and is performed with nominal voltage and current inputs at a power factor of 0.5. The total active, fundamental active, and reactive power as well as the apparent power are internally gain matched. One single gain calibration step is therefore required to calibrate all powers on a single phase.
This section describes calibrating the gain using the total active energy; however, any of the other energy values can be output on the CFx output for calibration.
As discussed in the Table 6, the expected CF output is deter-
mined from the meter constant. The actual CF output is measured and the APGAIN register is used to adjust any error. The following formula describes this relationship:
APGAIN
=
2
23 ×
CF
EXPECTED
CF
ACTUAL
−
1
Using the previous example, at 220 V and 10 A, the expected CF is 0.97778 Hz. Assuming the actually measured CF is 0.9937 Hz, the APGAIN is calculated as
APGAIN
=
2
23 ×
0.97778
0.9937
−
1
=
0xFDF3B0
The BPGAIN and CPGAIN registers control the gain calibration for Phase B and Phase C, respectively. Assuming that the channels are correctly matched, as described in the Gain Matching section, the previous procedure does not need to be repeated for
Phase B or Phase C. Write the value calculated for APGAIN to
BPGAIN and CPGAIN for accurate results. The fundamental only reactive energy and the apparent energy are also effected by the xPGAIN calibration. Since all power calculations are internally gain matched, setting the xPGAIN registers will gain calibrate all energy measurements.
Total and Fundamental Only Active Energy Offset
Calibration (Optional)
Table 9. xWATTOS
Calibration Registers
AWATTOS
BWATTOS
CWATTOS
AFWATTOS
BFWATTOS
CFWATTOS
Address
0x438A
0x438C
0x438E
0x43A2
0x43A3
0x43A4
Active energy offset calibration is only required if accuracy at low loads is outside the required specification prior to offset calibration.
To correct for any voltage-to-current channel crosstalk that may degrade the accuracy of the measurements at low current levels, perform an active energy offset calibration. Apply the minimum expected current signal to allow the offset magnitude to be
Rev. A | Page 9 of 16
AN-1171
measured and then removed. Do not perform offset calibration with grounded inputs because a low level signal is necessary to accurately measure the offset.
In this example, an input current of 100 mA is applied to perform the offset calibration. With a voltage channel input of
220 V at a power factor of 1, the expected CFx output frequency is determined as
CF
EXPECTED
=
3200 imp/kWh
×
220 V
×
0 .
1 A/ 1000
× cos( 0
3600 s/h
=
0 .
0195556 Hz
If the actual CF frequency is 0.01947 Hz, the percentage error due to offset is determined as
)
%
Error
=
0 .
01947
−
0 .
0195556
0 .
0195556
= −
0 .
4377 %
The offset in the watt measurement is corrected according to the following equation:
AWATTOS
=
−
%
Error
×
CF
EXPECTED
×
CFxDEN
×
8
Threshold
kHz
×
128 register joined to an internal 27 bits equal to 0. where Threshold is made up of the value in the 8-bit WTHR
If the WTHR is set to the default value of 3h, the threshold value would, therefore, be 18000000h.
AWATTOS
=
−
0 .
004377
×
0 .
0195556
×
0 xDB 3
×
0x18000000
8 kHz
×
128
=
0x76
The AFWATTOS register effects the fundamental only active energy offset in the same way as the AWATTOS register effects the total active energy offset. Typically, the same value that was calculated for the AWATTOS can be written to the AFWATTOS for accurate calculations.
Depending on the board layout and the crosstalk on the meter design, Phase B and Phase C may need separate offset calibration. This can be achieved through the BWATTOS and
BFWATTOS registers for Phase B, and the CWATTOS and
CFWATTOS registers for Phase C.
Reactive Energy Offset Calibration (Optional)
Typically, the value calculated for the xWATTOS register can be used in the xVAROS register for accurate results.
Table 10. xFVAROS
Calibration Registers
AFVAROS
BFVAROS
CFVAROS
Address
0x43A5
0x43A6
0x43A7
Fundamental only reactive energy offset calibration is only required if accuracy at low loads is outside the required specification prior to offset calibration.
Rev. A | Page 10 of 16
Application Note
To correct for any voltage-to-current channel crosstalk that may degrade the accuracy of the measurements at low current levels, perform a fundamental only reactive energy offset calibration.
A low level current signal at a power factor of 0 must be applied to allow the offset magnitude to be measured and then removed.
Similar to the total and fundamental active energy, the fundamental only reactive energy offset is corrected according to the following equation:
AFVAROS
=
−
%
Error
×
VARCF
EXPECTED
×
CFxDEN
×
8
Threshold
kHz
×
128 where Threshold is made up of the value in the 8-bit WTHR register joined to an internal 27 bits equal to 0. If the WTHR is set to the default value of 3h, the threshold value would, therefore, be 18000000h.
Depending on the board layout and the crosstalk on the meter design, Phase B and Phase C may need separate offset calibration. This can be achieved through the BFVAROS and
CVAROS registers, respectively. BFVAROS and CFVAROS correct the Phase B and Phase C fundamental only reactive energy CF output in the same way that the AFVAROS affects the
Channel A fundamental only reactive energy CF output.
Harmonic Offset Calibration
Calibration of individual harmonic measurement is not required to achieve the specified accuracy.
CURRENT AND VOLTAGE RMS
Calibrating the voltage and current rms is only required if the instantaneous rms readings are required. Perform the rms calibration using the instantaneous rms register readings. The current readings can be obtained from the AIRMS register, the
BIRMS register, and the CIRMS register. The voltage readings can be obtained from the AVRMS register, the BVRMS register, and the CVRMS register. The CFx pulse output is not used for this calibration. For increased stability, synchronize the rms register readings to the ZX measurement. This reduces the effects of ripple in the readings caused by nonidealities of the internal filtering. See the ADE7880 data sheet for details on zero crossing detection.
RMS Gain
Assuming that the channel matching has been performed as described in the Gain Matching section, no further gain calibration should be required on the xIRMS or xVRMS measurement. The readings from the xIRMS and xVRMS registers can be converted into current and voltage values in amps and volts using the V/LSB and Amps/LSB constants.
This procedure is performed by the microcontroller and the resulting constants must be saved in the microcontroller. These constants can be calculated using the following formulas:
Application Note
V Constant
[V/LSB]
Voltage Input
[V]
VRMS
[LSBs]
I Constant
[Amps/LSB]
CurrentInp ut
[A]
IRMS
[LSBs]
Since all phases on all meters are matched, the same constant can be used for all current rms and voltage rms readings on all meters. This constant should be stored in the microcontroller.
If this constant is not convenient for storing or a different constant is required, then the xIGAIN and xVGAIN registers can be used to adjust the constant.
xVGAIN
V
Voltage Input
[V]
Constant
[
Volts
/LSB]
2
23
xVRMS
[LSBs]
xIGAIN
I
CurrentInp ut
[
I
]
Constant
[
Amps
/LSB]
2
23
xIRMS
[LSBs]
Note that any adjustment to the xIGAIN register and the xVGAIN register affect all measurements, including the active and reactive powers. Therefore, any adjustments to the xIGAIN or xVAGIN register should be done prior to calibrating the energy.
RMS Offset
Table 11. xRMSOS
Calibration Registers Address
As illustrated in Figure 7, the rms offset calibration is based
on two points, where the expected reading is derived from the rms measurement with nominal inputs.
NOMINAL READING
AN-1171
INPUT AMPLITUDE
ACTUAL RMS
ERROR
OFFSET
EXPECTED RMS
Figure 7. RMS Reading
The rms measurements are specified over a dynamic range of
1000:1. This is the minimum input level at which the measurement is accurate and, thus, the minimum point at which the offset calibration should take place. In this example, the voltage rms offset is calibrated at 22 V, and the current rms offset is calibrated at 100 mA. To determine the expected rms reading, take a measurement at the nominal current and the nominal voltage. This reading should then be scaled down to obtain the expected value at the calibration point.
For example:
Reading at I
NOMINAL
(10 A) = 613390
Expected reading at I
CAL
(100 mA) = (0.1/10) × 613390 = 6134
Actual reading obtained at I
CAL
(100 mA) = 6349
BIRMSOS 0x4391
CIRMSOS 0x4393
6134
2
128
6349
2
0xFFAE18
To obtain accurate readings at low signal levels, the current and voltage rms offset may have to be calibrated. This calibration is done using the internal xVRMSOS and xIRMSOS registers that apply an offset prior to the square root function. The compensation factor is determined by applying the following equations:
xVRMSOS
xVRMS
EXPECTED
2
xVRMS
ACTUAL
2
128
xIRMSOS
xIRMS
EXPECTED
2
128
xIRMS
ACTUAL
2
For example:
Reading at V
NOMINAL
(220 V) = 2273500
Expected reading at V
CAL
(22 V) = (22/220) × 2273500
= 227350
Actual reading obtained at V
CAL
(22 V) = 226595
Therefore,
VRMSOS
227350
2
128
226595
2
0 x 28DB3E
Rev. A | Page 11 of 16
AN-1171 Application Note
CALIBRATING USING THE ENERGY REGISTERS
This section explains the calibration procedure and calculations when using the internal energy registers. The internal energy registers provide access energy metering measurements via the SPI or I
2 C interface (see the ADE7880 data sheet for more details).
If calibrating using the internal energy registers, use an accurate source. Calibration via the internal registers is typically performed when the CF pulse is not required in the final meter design.
Figure 1 shows the relationship between the CF output and
energy registers. Figure 8 shows the calibration flow for the
energy measurements. Use this flowchart to determine a calibration routine.
START
CALIBRATION
GAIN MATCHING
It is convenient to match all three phases prior to calibrating.
Matching the phases results in easier computations because one bit in the energy has the same weight on each phase. It is recommended to perform phase matching as the first calibration step. See the Gain Matching section for details on matching the phases.
PHASE CALIBRATION (OPTIONAL)
Table 12. xPHCAL
Calibration Registers
APHCAL
BPHCAL
CPHCAL
Address
0xE614
0xE615
0xE616
CALIBRATE xPHCAL
(SEE PHASE
CALIBRATION
SECTION)
CALIBRATE xWATTOS AND xFWATTOS
(SEE THE ACTIVE
ENERGY OFFSET
CALIBRATION
SECTION)
NO
NO
MATCH PHASES
(SEE GAIN
MATCHING
SECTION)
DOES
THE METER
ACCURACY MEET
SPECIFICATION
OVER
PF?
YES
SET WH/LSB
(SEE THE
ESTABLISHING
THE WH/LSB
CONSTANT
SECTION)
CALIBRATE xPGAIN
(SEE GAIN
CALIBRATION
SECTION)
DOES THE
METER
ACCURACY MEET
SPECIFICATION AT
LOW CURRENT
CALCULATION ONLY
REQUIRED ON FIRST
METER. THE SAME
VALUE CAN THEN BE
USED ON ALL
SUBSEQUENT
METERS.
Phase calibration is required when the sensor currently being used introduces a phase shift. CTs can add significant phase shift that introduces large errors at low power factors. Phase calibration should be performed before gain or offset calibration because large phase corrections can alter the gain response of the
ADE7880 .
Phase calibration can be performed with a single inductive or capacitive load at a power factor of 0.5. If this load is not available, another power factor can be chosen; however, for best results, the power factor should be as close to 0.5 as possible. The following equation outlines how to determine the phase error in degree where φ refers to the angle between the voltage and the current
(in degrees).
Error
( ° )
= tan
−
1
AWATTHR
AVARHR
sin( ϕ sin( ϕ
)
)
+
−
AVARHR
AWATTHR
cos( cos( ϕ ϕ
)
)
where:
φ refers to the angle between the voltage and the current
(in degrees).
Once the error in degrees is determined, the following formula can be used to determine the required phase compensation:
PhaseResol ution
=
360
1 .
024
° ×
f
MHz
CALIBRATE xFVAROS
(SEE THE REACTIVE
ENERGY OFFSET
CALIBRATION
SECTION)
YES
ENERGY
CALIBRATION
COMPLETE
PhaseCompe nsation
=
abs
Error
(°)
PhaseResol ution
where:
f refers to the line frequency.
Note that the format of the APHCAL register is such that if the value of the Error(degrees) is positive, then a value of 512d must be added to the calculated PhaseCompensation prior to writing to the APHCAL register.
Figure 8. Active Energy Calibration Flow
Rev. A | Page 12 of 16
Application Note
APHCAL
=
Error
Error
( ° )
( ° )
≤
0 ,
⇒
>
0 ,
⇒
APHCAL
=
APHCAL
=
PhaseCompe nsation
PhaseCompe nsation
+
512
For example, if, at 220 V and 10 A at a power factor of 0.5, the
AWATTHR value is 3384 and the AVARHR is 5663, the error in degrees can be calculated as follows:
Error
( ° )
= tan
−
1
3384
5663 sin( 60 ) sin( 60 )
−
+
5663 cos( 60 )
3384 cos( 60 )
= +
0 .
86 °
Assuming the line frequency is 50 Hz, the APHCAL compensation can be determined as:
PhaseCompe nsation
=
abs
+
360
0 .
°
86
×
50
APHCAL
=
×
1 .
024
M
PhaseCompe
Hz
=
nsation
0
+
×
31
512
=
0
×
231
Depending on the current sensors being used on Phases A, B, and C, different phase calibration values may be required in
APHCAL, BPHCAL and CPHCAL.
Establishing the Wh/LSB Constant—First Meter Only
When calibrating the first meter, the Wh/LSB must be determined. The Wh/LSB constant is used to set the weighting of each LSB in the active energy register. This constant allows the energy register readings to be converted into real world values.
Once established, the same Wh/LSB meter can be used for each subsequent meter. The weighting of each LSB in the energy register is often stated in the specifications of the design. If no specification is provided, then the user can select the weighting.
To determine the Wh/LSB constant, the following formula can be used:
Wh
/
LSB
=
Load
(
W
)
×
Accumulati on Time xWATTHR
×
3600
(sec) where:
AccumulationTime is the line cycle accumulation time.
xWATTHR is the energy register reading after this time has elapsed.
For example, if a line cycle value of 100 has been set and the frequency of the input signal is 50 Hz, the accumulation time will be 1 second (0.5 × (1/50) × 100) assuming that only one phase is selected for the zero crossing detection (LCYCMODE bits 4:6). With a load of 220 V and 10 A with a power factor of
0.5, this produces an AWATTHR reading of 3299. The Wh/LSB constant can be calculated as follows:
Wh
/
LSB
=
220 V
×
10 A
×
3299
× cos( 60 )
3600
×
1 sec
=
9 .
6262
×
10
−
5
Should the user wish to adjust the constant to meet a particular specification or make the constant a rounder number for storing purposes, the APGAIN register can be used. The
APGAIN register can be used to modify the Wh/LSB constant
AN-1171
by ±100%. The APGAIN register affects the AWATTHR register as shown in the following formula:
APGAIN
=
2
23
×
AWATTHR
Expected
AWATTHR
Actual
−
1
To achieve a different meter constant, the AWATTHR reading must be altered based on the desired Wh/LSB.
AWATTHR
Expected
=
Load
(
W
)
×
Accumulati on Time
(sec)
Wh
/
LSB
×
3600
For example, to alter the previously calculated Wh/LSB constant of 9.6262 × 10 −5 to 9 × 10 −5 for storing purposes, the desired
AWATTHR reading is
AWATTHR
Expected
=
220 V
×
10 A
× cos(
9
×
10
−
5
×
60
3600
)
×
1 sec
=
3395 d
The required PWGAIN value is then
APGAIN
=
2
23
×
3395
3299
−
1
=
0x3AF52
ENERGY GAIN CALIBRATION
Table 13. xPGAIN
Calibration Registers
APGAIN
BPGAIN
CPGAIN
Address
0x4389
0x438B
0x438D
The purpose of the active energy gain calibration is to compensate for small gain errors due to part-to-part variation in the internal reference voltage and external components, such as the time error introduced by the crystal. Gain calibration is required on every meter and is performed with nominal voltage and current inputs at a power factor of 0.5. The total active, fundamental active and reactive power and the apparent power are internally gain matched. One single gain calibration step is thus required to calibrate all powers on a single phase.
For simplicity, it is recommended that all meters be calibrated to use the same Wh/LSB value, and this should be set up in the first
meter as explained in the Establishing the Wh/LSB Constant—
First Meter Only section. Use the following formula to determine
the expected reading in the AWATTHR register:
AWATTHR
EXPECTED
Load
(
W
)
×
=
Accumulati on Time
Wh
/
LSB
×
3600
s
/
h
(sec)
The actual value can then be read from the AWATTHR register and the APGAIN register can be used to correct any error. The following formula shows how APGAIN can be used to adjust the AWATTHR reading:
APGAIN
=
2
23
×
AWATTHR
EXPECTED
AWATTHR
ACTUAL
−
1
Rev. A | Page 13 of 16
AN-1171
Using the previous example, at 220 V and 10 A, the expected
AWATTHR reading is 3395d. Assuming that the actual
AWATTHR reading is 3380d, APGAIN is calculated as
AWGAIN
=
2
23
×
3395
3380
−
1
=
0x916C
Note that the gain calibration for Phase B and Phase C is controlled by the BPGAIN and CPGAIN registers, respectively.
Assuming that the channels are correctly matched, as described
in the Gain Matching section, the previous procedure does not
need to be repeated for the other channels.
Write the value calculated for APGAIN to BPGAIN and
CWGAIN for accurate results. Since all power calculations are internally gain matched, setting the xPGAIN registers gain calibrate all energy measurements.
Total and Fundamental Only Active Energy Offset
Calibration (Optional)
Table 14. xWATTOS
Calibration Registers
AWATTOS
BWATTOS
CWATTOS
AFWATTOS
BFWATTOS
CFWATTOS
Address
0x438A
0x438C
0x438E
0x43A2
0x43A3
0x43A4
Total and fundamental only active energy offset calibration is only required if accuracy at low loads is outside the required specification prior to offset calibration.
To correct for any voltage-to-current channel crosstalk that may degrade the accuracy of the measurements at low current levels, perform active energy offset calibration. A low level current signal must be applied to allow the offset magnitude to be measured and then removed.
When performing offset calibration, it is often required to increase the accumulation time to minimize the resolution error. As the line-cycle accumulation mode accumulates energy over a fixed time, the result is accurate to ±1 LSB. If the number of bits accumulated in the xWATTHR register is small after this time, the ±1 LSB error can result in a large error in the output. For example, if only 10 bits are accumulated in the xWATTHR register, the resolution error is 10%. Increasing the number of accumulation bits to 1000 reduces the resolution error to 0.1%.
In the following example, a LINECYC of 5000 half line cycles is set, and an input current of 100 mA is applied. With a voltage channel input of 220 V at a power factor of 1, the expected
AWATTHR reading is determined as
AWATTHR
EXPECTED
=
220 V
×
9
0.1
×
A
10
−
×
5 cos(0)
×
5 0
×
3600 sec
=
3395
Application Note
If the actual AWATTHR register reading is 3380 at 100 mA, the percentage error due to offset is determined as
%
Error
=
3380
−
3395
3395
= −
0 .
44 %
The offset in the watt measurement is corrected according to
AWATTOS
= −
%
Error
×
AWATTHR
EXPECTED
Accumulati onTime
(sec)
×
8
Threshold
kHz
×
128 where:
Threshold is made up of the value in the 8-bit WTHR register joined to an internal 27 bits equal to 0. If the WTHR is set to the default value of 3h, the threshold value would, therefore, be
18000000h.
AWATTOS
=
0.0044
×
3395
50
×
0x18000000
8 kHz
×
128
=
0x76
The AFWATTOS register effects the fundamental only active energy offset in the same way as the AWATTOS register effects the total active energy offset.
Depending on the board layout and the crosstalk on the meter design, Phase B and Phase C may need separate offset calibration. This can be achieved through the BWATTOS and
BFWATTOS registers for Phase B, and the CWATTOS and
CFWATTOS registers for Phase C.
Fundamental Only Reactive Energy Offset Calibration
Table 15. xFVAROS
Calibration Registers
AFVAROS
BFVAROS
CFVAROS
Address
0x43A5
0x43A6
0x43A7
Fundamental only reactive energy offset calibration is only required if accuracy at low loads is outside the required specification prior to offset calibration.
To correct for any voltage-to-current channel crosstalk that may degrade the accuracy of the measurements at low current levels, reactive energy offset calibration is performed. A low level current signal must be applied to allow the offset magnitude to be measured and then removed.
When performing offset calibration, it is often required to increase the accumulation time to minimize the resolution error.
Because the line-cycle accumulation mode accumulates energy over a fixed time, the result is accurate to ±1 LSB. If the number of bits accumulated in the xVARHR register is small after this time, the ±1 LSB error can result in a large error in the output.
Rev. A | Page 14 of 16
Application Note
For example, if only 10 bits are accumulated in the xVARHR register, the resolution error is 10%. Increasing the number of accumula-tion bits to 1000 reduces the resolution error to 0.1%.
The expected xVARHR reading is determine as
AVARHR
EXPECTED
=
Load
(
VAR
)
×
Accumulati on Time
VARhr
/
LSB
×
3600 s/h
(sec)
The offset in the reactive energy measurement is corrected according to the following equations:
AVAROS
= −
%
Error
×
AFVARHR
Accumulati om
EXPECTED
Time
(sec)
×
8
Threshold
kHz
×
128 where:
Threshold is made up of the value in the 8-bit WTHR register joined to an internal 27 bits equal to 0.
If the WTHR is set to the default value of 3h, the threshold value would therefore be 18000000h.
AN-1171
Note that, depending on the board layout and the crosstalk on the meter design, Phase B and Phase C may need a separate offset calibration. This can be achieved through the BFVAROS and
CFVAROS registers. These registers correct the respective xVARTHR register reading in the same way that AFVAROS affects the AWATTHR register reading.
Harmonic Offset Calibration
Calibration of individual harmonic measurement is not required to achieve the specified accuracy.
CURRENT AND VOLTAGE RMS
Calibrating the voltage and current rms is only required if the instantaneous rms readings are required. Perform the rms calibration using the instantaneous rms register readings. See the
Current and Voltage RMS section for full details on calibrating the
current and voltage rms.
Rev. A | Page 15 of 16
AN-1171
NOTES
Application Note
©2012–2013 Analog Devices, Inc. All rights reserved. Trademarks and
registered trademarks are the property of their respective owners.
AN11090-0-3/13(A)
Rev. A | Page 16 of 16
Advertisement
Key features
- high accuracy
- 3-phase energy measurement
- serial interfaces
- flexible pulse outputs
- active and apparent energy measurements
- rms calculations
- fundamental-only active and reactive energy measurements
- rms of harmonics
- active, reactive, and apparent powers
- power factor and harmonic distortion