AN1-Achieving Accuracy in Digital Meter Design
AN1-Achieving Accuracy in Digital Meter Design
AN1-Achieving Accuracy in Digital Meter Design
Introduction
This application note would mention the various factors contributing to the successful achievements of accuracy in a digital energy
meter design.
These factors would cover both the hardware and software aspect in the implementation.
Target Device
Not Applicable.
Contents
3. Software Consideration..................................................................................................................... 5
3.1 Gain Switching .................................................................................................................................. 5
3.2 Sampling Rate .................................................................................................................................. 5
3.3 Calibration ......................................................................................................................................... 6
4. References........................................................................................................................................ 7
Revision Record........................................................................................................................................ 8
In order to be able to provide accurate energy measurement, the digital meter plays an important role. Hence, significant effort must
be spent to ensure that the design of the digital meter complies with accuracy standards outlined by the governing authority in each
country.
In the following sections, we would mention about the critical components required to achieve accuracy of a digital meter in two
aspects: hardware and software aspect.
2. Hardware Consideration
The various factors of hardware design that would contribute to the system for the achievement of accuracy are listed as below: -
2.1 High Resolution by 10-bit Analog to Digital Converter [ADC] & its Reference
Voltage stabilization
An analog to digital converter accepts an analog input a voltage or current and converts it to a digital value that can be understood by
a microcomputer. The resolution of an ADC is determined by the reference input and number of bits. The resolution defines the
smallest change in voltage that can be measured by the ADC.
For H8/38024 microcomputer, there is only analog voltage input available, and this is being fed into the reference voltage module
within the device, which then provides the voltage to the comparator based on the AVCC input reference.
Therefore, with reduction in this AVCC value, say 3.3V, the resolution can be improved and it is calculated as follow:
Similarly, as mentioned before, the resolution of an ADC is dependent on the reference voltage input. It plays a pivotal role in the
success of achieving an accurate result. For a microcomputer, which uses the supply voltage as a reference, for example, a 3.3V
system, this means the reference voltage is always 3.3V; hence measuring a 2.5V signal with an 10-bit ADC, would produce the
following result:
However, the value of 3.3V has a bearing on the accuracy of the result obtained. If the supply voltage is high by 1%, it has a value of
3.333V. This will yield a result as follow:
Hence a 1% change in the supply voltage causes the conversion result to change by 8 count. The example cited shows that the
stability of power supply input has an impact on the result obtained. Therefore it is mandatory to maintain a stable reference voltage
to guarantee repeatability of values for the same input voltage, which does not fluctuate with temperature, loading and AC input
variations. A good provision to achieve a stable reference voltage is to made use of a shunt regulator capable of delivering Fast Turn-
On response, guaranteed thermal stability over applicable temperature ranges.
Rail-to-rail operational amplifier can achieve a maximum output signal swing in systems with low single-supply voltages. Thus
within a single gain selected, a wider range of input signal can be covered.
If the value read by ADC is very small, then the software controls the switching such that the amplifier is set to a higher gain and if
the value read by ADC is very big, the software controls the switching such that the amplifier is set to a lower gain. With this
mechanism, the entire range of current is being covered and accuracy is achieved.
When switching from high gain to low gain, current needs to be increased and due to this, there is a possibility that the operational
amplifier would saturate, hence it is important to switch the gain quickly. However, when switching from low gain to high gain value,
a tolerance period should be added to prevent the toggle switching of gain index due to certain period of inaccuracy. This would be
taken care by the software.
The continuous analog data must be sampled at discrete intervals which must be carefully chosen to ensure that an accurate
representation of the original analog signal. It is obvious that the more samples taken (at higher sampling rate), the more accurate the
digital representation. However, if the fewer samples are taken (at lower sampling rate), a point is reached where critical information
about the signal is actually lost. This would lead us to the Nyquist’s theorem:
• An analog signal with a bandwidth of fa must be sampled at a rate fs ≥ 2fa in order to avoid the loss of information.
• If fs < 2fa, then a phenomena called aliasing will occur in the analog signal bandwidth illustrated in below figure, Eg. 4.
Eg. 1 fs = 8fa
Eg. 2 fs = 4fa
Eg. 3 fs = 2fa
Eg. 4 fs = 1.3fa
In order to avoid loss of data, this sampling rate must be carefully derived such that it provides sufficient data for calculating of
parameters collected such as voltage & current parameters.
As an illustration, samples per cycle are chosen as 32 and the sampling rate derived below would provide a good digital
representation of the analog signal targeted.
= 20 /32
= 625usec
= 1600Hz
3.3 Calibration
Calibration is inevitable because in a real world design, a digital meter is never ideal such that it achieves good accuracy.
After the calculation of energy is obtained, this energy is multiplied with a calibration coefficient in order to bring the calculated
energy to accurate value. To obtain this coefficient, energy is applied to a standard meter and the same energy is also applied to the
meter under calibration. The energy read from the meters is compared to the nominal energy.
Taking an illustration for the calibration of the gain coefficient in the energy calibration, if the energy read from the meter under
calibration is X watts and the energy read by the standard meter is Y watts, if the percentage error between the ‘X’ and ‘Y’ readings
is more than ±0.5%, the meter is calibrated by changing the coefficient in the meter under calibration.
With the necessary calibration performed, the digital meter shall be able to perform the energy measurement accurately hence this
has further strengthen the migration from electromechanical meter to perform electronic measurement.
4. References
1. H8/38024, H8/38024S, H8/38024F-ZTAT Group Hardware Manual, Revision 4, 26 May 2003, Renesas
Technology Corporation.
2. Analog-to-Digital Converters, 1 May 2001, Embedded.com
5. Current –Transformer Phase Shift Compensation and Calibration, February 2001, Texas Instruments
Revision Record
Description
Rev. Date Page Summary
1.00 Mar.15.04 — First edition issued