dm00112717

AN4470
Application note
The STPM3x application calibration
Introduction
The STPM3x is an ASSP family designed for high accuracy measurement of power and energy in
power line systems using the Rogowski coil, current transformer or shunt current sensors. The STPM3x
devices embed a full set of calibration and compensation parameters which allow the meter to fit tight
accuracy standards (EN 50470x, IEC 62053-2x, ANSI12.2x for AC watt meters) using low cost
components, after a fast calibration procedure explained in this document.
According to energy meter measurements, the customer has to pay for energy consumption. The
correct operation of the meter, as well as its accuracy and reliability are very important features both for
the customer and the electricity company. That’s why the quality control of meter is so important and
strict.
Special care has to be given both to the design stage and the calibration procedure. The former allows
the right dimensioning of analog front-end components so to fit the current dynamics and the meter
constant pulse. The latter impacts on many meter key ratings directly.
October 2015
DocID026176 Rev 2
1/19
www.st.com
Contents
AN4470
Contents
1
2
Calibration principles and underlying theory ................................ 3
1.1
Principles of digital energy measurement system ............................. 3
1.2
Accuracy and stability influence factors ............................................ 5
Measuring system design ............................................................... 6
2.1
3
Design example ................................................................................ 7
System calibration........................................................................... 9
3.1
Amplitude calibration ....................................................................... 10
3.1.1
3.2
3.3
Phase-shift calibration ..................................................................... 13
3.2.1
Step-by-step phase-shift calibration procedure ................................ 15
3.2.2
Example:phase-shift compensation ................................................. 16
Offset calibration ............................................................................. 16
3.3.1
4
2/19
Step-by-step amplitude calibration procedure .................................. 12
Step-by-step offset calibration procedure......................................... 17
Revision history ............................................................................ 18
DocID026176 Rev 2
AN4470
Calibration principles and underlying theory
1
Calibration principles and underlying theory
1.1
Principles of digital energy measurement system
Digital energy measuring system, based on the STPM3x, is composed of:


Analog section with high-resolution sigma-delta analog/digital converters (ADCs)
Digital section with powerful digital signal processor (DSP) to perform power and
energy measurement, as well as other secondary parameters
The main scheme of this system is indicated in the below figure.
Figure 1: Digital power and energy measurement system
ANALOG SECTION
v(t)
V(φ U )
Voltage
transducer
AFE
DIGITAL SECTION
V’(φ U ) + V off
ΣΔ
modulator
Decimation
CHV
voff (t)
θ
i(t)
Current
transducer
I(φ I )
Compensation
AFE
VREF
CLK
Voltage
reference
Time
base
ΣΔ
modulator
I’(φ I’)
PHV
Output data
DSP
CHC
+ I off
Decimation
PHC
Compensation
OFAF OFS
OFA
OFR
ioff (t)
STPM3x
GIPG1706151231LM


Voltage and current paths include the following blocks:

Sensors for voltage and current

Signal conditioning (to optimize signals to match the required ADC input level)

ADCs
Common section consists of the following elements:

System DC reference voltage

System time base, provided by a quartz crystal oscillator or by an external (MCU)
clock
A/D converters collect samples of phase current and phase-to-neutral voltage
synchronized to the sample clock. Outputs of the analog section are samples of voltage
and current in digital form with an exact time relationship.
The digital section consists of DSP providing real time calculation based on the voltage and
current sampled values to calculate power, energy, RMS values and other parameters
through standard mathematical formulas.
A correction algorithm hardwired in DSP corrects amplitude and phase-angle errors of the
measured samples, while correction parameters are calculated during the calibration
phase.
From the same set of corrected samples, power, energy and all other parameters are
calculated in real time through standard mathematical formulas. Calculated values are
stored in 32-bit registers, from which output pulses are generated with frequency
proportional to the measured power.
DocID026176 Rev 2
3/19
Calibration principles and underlying theory
Basic definitions and formulas are given below:
Active power
Equation 1:
P = V · I · cosφ
Apparent power
Equation 2:
S = V·I
Reactive power
Equation 3:
2
2
S – P = V·I· sinφ
Q =
Power factor
Equation 4:
P
PF = cos φ = ---S
where: V, I = effective values of voltage and current
φ = φv - φI current-to-voltage phase-angles
φv φI voltage and current to common reference phase-angles
Measured active power
Equation 5:
P'= V'· I' · cosφ' +Pof f
where: V' = V (1 + εv)
I' = I (1 + εi)
φ' = φ+ θ
εv = voltage amplitude error
εi = current amplitude error
θ = current-to-voltage phase-angle error
Poff = power offset (due to Voff, Ioff residual signals)
Neglecting term εv*εi, the measured active power is:
4/19
DocID026176 Rev 2
AN4470
AN4470
Calibration principles and underlying theory
Equation 6:
P'=V· I · (1+
1.2
v+ i
) cos (φ+ɵ)+ Pof f
Accuracy and stability influence factors
All components, which have some influence on system accuracy and stability, can be found
in the input analog section.
Only a limited number of internal components determines system accuracy:





Voltage and current sensors
Signal conditioning section
Oscillator frequency
Internal reference voltage source
Analog-to-digital converter gain
To reach the desired stability and linearity, high quality components have to be used.
Moreover, the circuit has to be carefully designed to minimize some issues such as:
shorttime repeatability, linearity or immunity degrade.
Besides, external influences can affect meter accuracy, such as:








Capacitive and inductive coupling to inputs and between phases (crosstalk)
High frequency electrical and magnetic fields (EMC)
Common-mode voltage between inputs and to earth
Low frequency magnetic fields
Measuring setup (wiring, earth connection ground loop)
Source (stability of V, I, φ, signal quality)
Long-time drift
Humidity
Undesired external influences should be reduced to minimum through the shielding of the
analog part or compensated in hardware or software.
If system is not immune to external influences, it can only work under very special
conditions and results cannot be reproduced in other locations, where there may be a
different measuring setup. In this case, also statistical effects, due to noise, have higher
impact on short-time repeatability.
External influences on total system accuracy can be more important than the basic
specified error.
The STPM3x does not introduce any crosstalk error neither between voltage and
current inputs nor among different phases. However, the voltage front-end
handles considerable amplitude voltages, which make it a potential source of
noise. Disturbances could be emitted into current measurement circuitry,
interfering with the signal to be measured. Typically, this shows a non-linear error
at small signal amplitudes and non-unity power factors. At unity power factor,
voltage and current signals are in phase, and crosstalk between voltage and
current channels appears as a gain error, which can be calibrated. When voltage
and current are not in phase, crosstalk has a non-linear effect on measurements,
which cannot be calibrated. Crosstalk is minimized by a well-planned PCB and the
correct use of filter components.
DocID026176 Rev 2
5/19
Measuring system design
2
AN4470
Measuring system design
The maximum voltage and current measurement, the number of pulses per kWh (indicated
as CP, constant pulses) and the measurement accuracy are the main ratings of the meter.
A correct analog front-end component choice allows the line signal to fit the device input
dynamics; selectable gain of internal current amplifier scales the input signal according to
sensor sensitivity.
A typical application example is shown in Figure 2: "Application example".
Figure 2: Application example
L
N
R1
Vip
LED
CP pulses
Vin
R2
STPM3x
Iip
CT
CP pulses
SPI/UART
Iin
MCU
Converted data
LOAD
230 VRMS
80 A RMS
Input
± 300 mV
± 35 mV
Sensors
± 300 mV
± 300 mV
230 VRMS
80 A RMS
AFE gain
Output
GIPG0304141257LM
The choice of external components in the transduction section of the application is a crucial
point of the application design, affecting the precision and the resolution of the whole
system.
A compromise has to be found among the following needs:
1. Maximizing signal-to-noise ratio in the voltage and current channel
2. Choosing kS current-to-voltage conversion ratio and the voltage divider ratio, to achieve
calibration for a given CP
3. Choosing kS to take advantage of the whole current dynamic range according to the
desired maximum current and resolution
Rules for a good application design are described in this section. After the design phase,
any tolerance of the real components respect to these values or the device internal
parameter drift can be compensated by calibration. This stage is necessary to get the
desired CP after calibration. To reach CP target output constant pulse, the analog front-end
component dimensioning can be carried out in two ways:

6/19
Choosing the value of R1 voltage divider resistor, given R2 and kS current sensor
sensitivity
DocID026176 Rev 2
AN4470
Measuring system design

Choosing kS given R1 and R2 voltage divider resistors
Calculations for these two methods are developed below:

First method: constant kS
Given R2 (smaller voltage divider resistor), kS (current sensor sensitivity) and CP, target
meter constant pulse (pulses/kWh), as calculation inputs, R1 voltage divider resistor value
derives from the following formula:
Equation 7:

Second method: constant R1
Given R1, R2 (voltage divider resistors) and CP target meter constant pulse (pulses/kWh) as
calculation inputs, kS current sensor value derives from the following formula:
Equation 8:
CP value can be scaled by a division factor through LPWx[3:0] bits in DSP_CR1, DSP_CR2
for the two channels according to the device p/n.
The resistor (in the first method) or the current channel sensor (in the second
method) has to be chosen as closer as possible to the target value; small
tolerance is compensated by calibration.
2.1
Design example
This example shows the correct dimensioning of a meter using a current transformer with
the following specifications:
Table 1: Example1 design data
Parameter
Value
VN nominal voltage
230 VRMS
IN nominal current
5 ARMS
IMAX maximum current
40 ARMS
CP constant pulses
1000 imp/kWh
The values of voltage divider resistors are 770 kΩ and 470 Ω. Setting C P = 64000
pulses/kWh (at LED_PWM = 1, the device default value) and according to the previous
calculation, the following values are obtained:
DocID026176 Rev 2
7/19
Measuring system design
AN4470
Table 2: Example1 calculated data
Parameter
Value
Current sensor sensitivity
VMAX
IMAX
1 Vre f R1 + R2
VM A X = --- ------------------ -------------------- = 347.8 V
2 A
R2
2
V
· · ·
V ref
1
1
I MAX = --- · ------------------- · ------------------- = 60.5 A
2 A · 2
kS
I
To set the desired LED pulse output, a division factor can be set through LPWx[3:0] bits in
DSP_CR1 and DSP_CR2 configuration registers. Any tolerance, producing C P small
variation respect to 1000 imp/kWh, is compensated by calibration.
8/19
DocID026176 Rev 2
AN4470
3
System calibration
System calibration
The calibration procedure is a key feature among main meter requirements. In fact, it
impacts directly on accuracy, cost, manufacturing and reliability of the meter. After the final
assembly phase, an energy meter requires a calibration procedure due to unknown
tolerances respect to nominal values of the following analog blocks:




Voltage and current sensors
Oscillator frequency
Internal or external reference voltage source
Analog-to-digital converter gain
The STPM3x device is composed of independent channels for line voltage and current
respectively. Each channel includes its own 12-bit digital calibrator to adjust the signal
amplitude, digital filter to remove any signal DC component; moreover the device embeds
phase calibration registers for each line and power offset compensation registers.
Calibration is carried out in three steps:



Amplitude calibration is mandatory for class accuracy higher than Class 2
Phase-shift calibration is mandatory for CT-based meters
Power offset calibration (optional for class accuracy higher than 0.2)
To calibrate, the following equipment has to be interfaced:





Precision current and voltage source (Gen)
Higher class precision energy meter (HPM) (optional)
Meter under calibration (MUC)
Calibration process controller (CPC)
UART/SPI interface to the STPM3x device
Please see Figure 3: "Meter calibration setup".
Figure 3: Meter calibration setup
SPI / UART
Interface
pulses
error
MUC
IN
HPM*
Calibration
process
controller
VN
M1*
VRMS
VRMS
M2*
I RMS
(*)
I RMS
optional equipment
optional signal
GIPG0304141302LM
DocID026176 Rev 2
9/19
System calibration
AN4470
Gen equipment generates voltage and current line signals at the same frequency and a
phase-shift between them. HPM and MUC equipment measures the same signals, and
HPM computes the error by comparing LED frequency output.
If HPM is not available, amplitude calibration can be performed having either a precise
voltage/current generator or a voltage/current RMS meter.
Calibration process controller is an automated system which runs calibration process
routines to configure the STPM3x device on MUC before calibration, controls Gen,
monitors HPM equipment, reads from the device, calculates the correction parameters and
writes them into the device. Since the STPM3x hasn’t any non-volatile memory, CPC
should take into account the permanent storage of calculated calibrators.
CPC can be interfaced to the STPM3x through its SPI/UART peripherals.
If an STPM3x evaluation board is used, the following interfaces are available:



The STPM3x parallel programmer
The STEVAL-IPE023V1 USB isolated interface
RS232 interface (as the one embedded in the STPM3x evaluation board)
The STPM3x evaluation software, running automatic calibration procedure, can be found
on www.st.com; it can be used with all above listed interfaces. Further information is
available in the UM1719.
For all available tools and software please visit www.st.com.
3.1
Amplitude calibration
Any energy measure performed by the device (active wideband and active fundamental,
reactive or apparent power and energy) is calculated digitally (without error) from current
and voltage signals. This means that every measure is automatically calibrated if current
and voltage channels are calibrated.
CP (power sensitivity constant pulse) target value is achieved by amplitude calibration of
these signals.
Independent and precise line signal generators could be used for this calibration, because
line frequency and phase between line signals have not a significant impact, observing
RMS values.
If the line generator is precise and stable enough, theoretically, the additional precision
energy meter (HPM) is not necessary to perform the calibration; in fact signal amplitudes
(voltage and current RMS value) are calibrated and DC offset is rejected, thanks to the
almost ideal linearity of the STPM3x. This may simplify the generation of reference line
signals of accurate output values. If accuracy is not guaranteed, reference values of line
signals can be obtained by RMS meters.
Meter calibration is achieved by calibrating the device, just one measuring point, at nominal
values, such as: 230 VRMS, 5 ARMS, 50 Hz.
Calibrating voltage and current in a single operating point leads to a very short (one second
in an automated environment) calibration time.
Each voltage and current channel of the device (according to the p/n) have to be
compensated following the same procedure.
Given the device internal parameters in Table 3, and having one between R 1 or kS
calculated as stated in Equation 7 and Equation 8, voltage and current RMS register target
values, XV and XI respectively, are calculated by DSP as follows:
Voltage register value at VN nominal voltage
10/19
DocID026176 Rev 2
AN4470
System calibration
Equation 9:
Current register value at IN nominal voltage
Equation 10:
17
IN · A I · cal I · kS· 2
X I = --------------------------------------------------------------V ref
Table 3: STPM3x internal parameters
Parameter
Value
Voltage reference
Vref = 1.20 [V]
Decimation clock
DCLK = 7812.5 [Hz]
kint = 1 (if ROC bit = 0 in DSP_CR1,2)
Integrator gain (for Rogowski coil only)
kint = 0.8155773 (if ROC bit = 1 in DSP_CR1,2)
Voltage channel gain
AV = 2
Current channel gain
AI= 2/16
AV voltage ADC gain is constant, while AI current ADC gain is chosen according to the
sensor used and to the desired current input dynamics.
The calibration procedure has as final result k V and kI correction parameters which, applied
to the STPM3x voltage and current, introduce signal path attenuation or amplification
compensating small tolerances of analog components.
kV and kI calibration parameters are the decimal representation of the corresponding
voltage and current 12-bit calibrators: CHVx[11:0], CHCx[11:0] (where x = 1 or 2
respectively for primary and secondary channel according to the device p/n) from
DSP_CR5 to DSP_CR8 registers.
Through hardwired formulas, kV and kI fine-tune measured values from 0,75 to 1 in 4096
steps, according to CHV and CHC values.
For example: CHV = 0 generates a correction factor -12.5% (kV = 0.75) and CHV = 4065
determines a correction factor +12.5% (k V = 1) following below equations:
Voltage correction factor
Equation 11:
CHV
k V = 0.125 · ------------ + 0.75
2048
Current correction factor
Equation 12:
CHC
k I = 0.125 · ------------ + 0.75
2048
When system is connected and powered on, having the applied VN and IN nominal values,
a certain number of readings has to be performed to average voltage and current RMS
DocID026176 Rev 2
11/19
System calibration
AN4470
values. After RMS register samples have been read and averaged, obtaining V AV and IAV
values, voltage and current channel calibrators are calculated as follows:
Voltage calibrator
Equation 13:
XV
CHV =14336 ------------ 12288
VAV
·
Current calibrator
Equation 14:
XI
CHC =14336 ------------ 12288
IAV
·
where XV and XI are those calculated in Equation 9 and Equation 10.
kI and kV correction parameters can fine-tune measured values only within the calibration
range of ±12.5% of voltage or current channel.
If after the calibration, CHV or CHC calculated values are out of range (less than 0 or more
than 4095), the application cannot reach the target value of CP power sensitivity. In this
case, design and calibration phase should be repeated choosing a smaller C P value.
If one or more calibrator values are out of range, energy meter board could be not able to
perform these measurements, maybe because component tolerance is too big, or due to
some issues during the layout phase, so the application has to be redesigned.
Otherwise, calibrator values can be written into the STPM3x, the average RMS readings
are very close to XI and XV target values and LED output frequency is very close to HPM
frequency output.
Since the RMS resolution is a bit lower than the energy resolution, it is still possible, after
CHC and CHV calculation, to fine tune these calibrators in order to reduce the error on
active power shown from the HPM.
3.1.1
Step-by-step amplitude calibration procedure
The following steps summarize the calibration procedure explained above
1. Design the application as stated in Section 3: "System calibration" so that the
relationship among R1, R2, kS and CP is coherent with equation 7 and equation 8
2. Reset the STPM3x to have registers in the default state
3. Configure the device through CPC according to the chosen application. The following
registers have to be configured (one or both primary and secondary channels, according to
the application and to the device p/n):



ROCx (in DSP_CR1 or DSP_CR2)

0: for CT or shunt

1: for Rogowski coil
GAINx (in DFE_CR1 or DFE_CR2) to set the correct current gain channel
CHVx and CHCx (in DSP_CR5 and DSP_CR8) have to be set to default (0x800)
obtaining a calibration range of ±12.5% of voltage or current channel
4. Apply stable and accurate nominal values of VN and IN voltage and current signals, with
PF =1 to one or both primary and secondary channels. For the stability of the source
please refer to the equipment documentation; add 0.5 seconds to the maximum so that the
STPM3x RMS values are stable
12/19
DocID026176 Rev 2
AN4470
System calibration
5. Perform RMS register sample acquisition (DSP_REG14 and/or DSP_REG15) through
CPC; average the values to obtain VAV and IAV; minimum suggested values are 20 samples
in 5 line cycles
6. Calculate CHVx and CHCx calibrators using equation 13 and equation 14
7. Write calibration values to the device and store them in a non-volatile memory
The whole procedure requires one second in an automated environment.
3.2
Phase-shift calibration
The STPM3x does not introduce any phase-shift between voltage and current channels.
However, voltage and current signals come from transducers, which could have inherent
phase errors. For example, a phase error from 0.1 ° to 0.3 ° is common for a current
transformer (CT). These phase errors can vary from part-to-part, and have to be corrected
in order to perform accurate power calculations. Errors associated with phase mismatch
are particularly evident at low power factors.
The phase compensation block provides a digital correction of the phase-shift for primary
and secondary channel independently. This block introduces a delay between current and
voltage samples which is fine-tuned by PHCx[9:0] and PHVx[1:0] phase calibration bits in
DSP_CR4. The delay (in degree) introduced by these registers on the waveforms is given
below:
Table 4: Phase-delay
Parameter
Value
Current shift
fline
°
φC = --------------- · PHCx [ 9:0] ·360
SCLK
Voltage shift
φ
V
fline
= ---------------- · PHVx [ 1:0 ] ·29 ·360 °
SCLK
fline
°
9
φ = --------------- ·( PHCx [ 9:0 ] - PHVx [1:0 ] · 2 )·360
SCLK
Global phase shift
Where SCLK = 4 MHz and fline is voltage and current signal frequency.
As shown in figure 4, a capacitive behavior is determined by the current leading the voltage
waveform to a certain angle. In this case, there is the compensation by delaying the current
waveform by the same angle through PHCx register. For a 50 Hz line the current channel
waveform maximum delayed is:
φC ≤ 4.6035° with step ΔφC =0.0045°
An inductive behavior has the opposite effect, so that current lags the voltage waveform. In
this case, PHV register delays the voltage waveform by the minimum angle to invert the
behavior to capacitive and then acting on PHCx register to fine tune the current waveform.
PHV impacts on the calculation of power and energies related to both current channels. For
a 50 Hz line, the voltage channel waveform maximum delayed is:
φV≤ 6.912° with step ΔφV = 2.304°
DocID026176 Rev 2
13/19
System calibration
AN4470
Figure 4: Phase-shift error
Voltage
Current capacitive
Current indu ctive
GIPG160620150948LM
From the equation indicated in global phase shift parameter in table "phase-delay", the
following correction range is calculated for 50 and 60 Hz line signals:
Table 5: Phase error correction range
Line frequency
Minimum value
Maximum value
Step
50 Hz
-6.120 °
4.6035 °
0.0045 °
60 Hz
-8.2944 °
5.5242 °
0.0054 °
To compensate phase-shift, stable nominal values of voltage and current signals (VN and
IN) shifted by φ = 60 ° angle, have to be applied to MUC. Given e, the error on active power
(averaged over a certain number of samples through HPM), the phase-shift angle (θ)
between voltage and current can be measured as shown below. Without any phase-shift
error, the ideal active power at φ = 60° is:
Equation 15:
PI = V · I · cos (60)
Since voltage and current are shifted by angle θ, the measured power is:
Equation 16:
PM = V · I · cos (60+ θ)
Leading to an error, at PF = 0.5, equal to:
Equation 17:
PM – PI
VIcos 60+θ)-VIcos (60)
e = ------------------ = ----------------------------------------------------------------- = 2 cos(60+θ)-1
PI
VIcos (60)
By measuring the error, the phase-shift derives from the above formula as follows:
Equation 18:
14/19
DocID026176 Rev 2
AN4470
System calibration
To compensate this error, PHCx and PHVx bits have to be set as below, to introduce a
correction factor φ = -θ, according to the following table:
Table 6: Phase compensation
Parameter
Value
PHVx = 0x0
PHVx = 0x1
PHCx[9] = 0x0
PHVx = 0x2
PHCx[9] = 0
PHVx = 0x3
PHCx[9] = 0
3.2.1
Step-by-step phase-shift calibration procedure
The following steps summarize the calibration procedure explained above:
1. Perform MUC amplitude calibration following steps listed in Section 3: "System
calibration"
2. Configure the device through CPC. All registers should be in default state; the following
registers have to be configured (according to the channel under calibration and to the
device p/n):






ROCx (in DSP_CR1 or DSP_CR2)

0: for CT, shunt

1: for Rogowski coil
GAINx (in DFE_CR1 or DFE_CR2) to set the correct current gain channel
CHVx and CHCx (in DSP_CR5 and DSP_CR8) have to be set as calculated in
equation 13 and 14
PHVx and PHCx (in DSP_CR4) are preset to default (0x0)
LCSx (in DSP_CR1 and DSP_CR2) is set to 0 or 1 to output on LEDx the desired
channel
LPSx is set to zero (to output on LEDx the active power signal)
3. Apply stable and accurate nominal values of VN and IN voltage and current signals,
shifted by φ = 60 ° angle
4. Read from HPM the e error on the active power from LED frequency
5. Calculate phase-shift error from equation 18 and correction factor from Table 6: "Phase
compensation"
DocID026176 Rev 2
15/19
System calibration
6. Write PHVx, PHCx to the device and store them in a non-volatile memory
3.2.2
AN4470
Example:phase-shift compensation
In a 50 Hz line, after amplitude calibration, the error on active power at PF = 0,5 is
measured as: e = 0.038 = 3.8%.
From equation 18 the current waveform leads the voltage to θ =1.26 °, so the value to
introduce is φ = -θ through PHCx[9:0] = 0x119 (φC=1.2654 °).
If the voltage leads current to the same angle, values to introduce are PHV[1:0]=0x1 (φ V =
2.304 °) and PHCx[9:0]=0xE7 (φC =1.0395 °) the current shift, respect to the voltage, is: φV
- φC = 1.2654 °.
3.3
Offset calibration
The STPM3x has power offset compensation register for all measured powers to
compensate, for each channel, the amount of power measured due to noise capture in the
application.
Power offset compensation registers: OFAx[9:0], OFRx[9:0], OFAFx[9:0], OFSx[9:0],
compensating active, reactive, active fundamental and apparent power for each channel
(according to the p/n) are located in registers from DSP_CR9 to DSP_CR12.
The purpose of power offset compensation is to eliminate the error at low power due to
noise and external influences. Applying a minimum current IMIN (for example 2% of IN) and
measuring power error e, the offset to apply is:
Equation 19:
pOFF =-(VN· IMIN · e)
Power registers are signed values, (MSB is the sign, and negative values are two's
complemented); power offset registers are signed registers as well, and LSB value is equal
to 4 times power LSB.
Power register LSB
Equation 20:
2
W
Vref · (1 + R1 R2 )
LSB P = ------------------------------------------------------------------------------------- -----------28
k int· A V· A I · k S· cal V· cal I · 2 LSB
LSB power offset register
Equation 21:
2
2
2 W
Vref · (1 + R1 R2 )
LSB PO= LSB P· 2 = ------------------------------------------------------------------------------------- · 2
28
LSB
k int· A V · A I· k S· cal V· cal I · 2
LSB value of power and power offset registers is equal in all power types (reactive,
apparent, fundamental).
16/19
DocID026176 Rev 2
AN4470
3.3.1
System calibration
Step-by-step offset calibration procedure
The following steps summarize the calibration procedure explained above:
1. Perform MUC amplitude calibration following steps listed in the above paragraphs
2. Configure the device through CPC. All registers should be in default state; the following
registers have to be configured (according to the channel under calibration and to the
device p/n):





ROCx (in DSP_CR1 or DSP_CR2)

0: for CT, shunt

1: for Rogowski coil
GAINx (in DFE_CR1 or DFE_CR2) to set the correct current gain channel
CHVx and CHCx (in DSP_CR5 and DSP_CR8) have to be set as calculated in
equation 13 and 14
PHVx and PHCx (in DSP_CR4) have to be set as calculated in equation 18 and table
6
OFAx[9:0], OFRx[9:0], OFAFx[9:0], OFSx[9:0] power offset compensation registers
from DSP_CR9 to DSP_CR12 are set to zero
3. Apply stable and accurate nominal values of VN voltage signal and IMIN = 0.02 IN
4. Read from HPM the e error on the active power from LED frequency
5. Calculate offset compensation from equation 18 and related register value from equation
19 and related register value from equation 21
6. Write OFAx, OFRx, OFAFx, OFSx to the device and store them in a non-volatile memory
DocID026176 Rev 2
17/19
Revision history
4
AN4470
Revision history
Table 7: Document revision history
Date
Revision
07-Apr-2014
1
Initial release.
2
Updated the equations from 8 to 9, from 12 to 13 and from 20 to
21.
Updated Table 3: "STPM3x internal parameters", Table 4: "Phasedelay" and Table 5: "Phase error correction range".
Updated Section 3: "System calibration", Section 3.2.2:
"Example:phase-shift compensation", Section 3.3: "Offset
calibration", Section 3.2.1: "Step-by-step phase-shift calibration
procedure".
15-Oct-2015
18/19
Changes
DocID026176 Rev 2
AN4470
IMPORTANT NOTICE – PLEASE READ CAREFULLY
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and
improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST
products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order
acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the
design of Purchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. All other product or service names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.
© 2015 STMicroelectronics – All rights reserved
DocID026176 Rev 2
19/19
Similar pages