APPLICATION NOTE 5596

In-System Calibration with the 78M6610+PSU Energy Measurement Processor


Abstract: The 78M6610+PSU is an energy measurement processor that is embedded in high-power switch-mode power-supply units (PSUs) to measure and report the real-time power used by the system. As with any measurement device, the sense circuit used with the 78M6610+PSU must be calibrated before its measurements can be accepted as accurate. This application note demonstrates how to calibrate a measurement subsystem using the 78M6610+PSU.

Introduction

The 78M6610+PSU provides automated routines for in-system calibration of voltage and current measurements to account for system-to-system variations in the components of the voltage and current measurement signal chain. For AC measurements, a one-point calibration is performed to calculate the correct current and voltage gain settings for the system. The newly calculated gains can be stored in the on-chip flash memory as the new defaults. Any DC component of the voltage or current input is removed by a digital highpass filter implemented in the 78M6610+PSU firmware; therefore, DC offset calibrations are not needed or performed.
This application note describes the calibration procedures and scaling for voltage and current measurement of the 78M6610+PSU. Note that these procedures are only relevant to firmware version CB26 and might be different for future versions.
The 78M6610+PSU data sheet and the 78M6610+PSU Evaluation Kit User Manual provide additional information that complements this application note.
The examples given here assume that a resistive voltage-divider is used for voltage sensing and a current shunt resistor is used for current measurement. The type of sensor used does not change the calibration procedure, but examples are not provided for other sensor types. A practical example of a calibration procedure using the GUI and board provided with the standard 78M6610+PSU evaluation (EV) kit is shown in the section Example of the Calibration Procedure Using the 78M6610+PSUEVK.

Scaling Values

In order to calibrate the voltage and current measurements and to allow the 78M6610+PSU to perform proper power calculations, the user must first set the correct scaling values to match the selected sensors and LSB size.
The firmware provides scaling registers for current, voltage, power, and frequency. For the first three (current, voltage, and power), these scaling registers have two functions:
  1. Setting the expected full-scale values for the measurements.
  2. Setting the resolution, or least significant bit (LSB) value, for the reported values.
For the last item (frequency), the scaling parameter does not define the full-scale value, but it does set the resolution.

Determining Scaling Values

The values selected for the scaling registers are determined by the input range of the 78M6610+PSU’s analog-to-digital converter (ADC), by the sensor and input signal conditioning circuitry implemented on the target system or evaluation (EV) board, and by the length of the 78M6610+PSU’s data word.

ADC Input Range

The input range of the 78M6610+PSU’s ADC is ±250mV referenced to the 3.3V power supply (V3P3A). The first step in determining the scaling values for voltage and current is to determine the peak input voltage and current (at the sensor input) that produce a ±250mV peak to the 78M6610+PSU’s ADC input. Consider the following example.
The 78M6610+PSU EV board has a voltage-divider for line voltage measurement that consists of two 1MΩ resistors in series with a 750Ω resistor, as shown in Figure 1.
Figure 1. Voltage-divider for inlet voltage sensing.
Figure 1. Voltage-divider for inlet voltage sensing.
The line voltage is applied across the entire resistor chain. The ADC input is the voltage across the 750Ω resistor. The voltage at the input to the ADC, VADC, can be calculated as:
VADC = VLINE × (750/(750 + 2 × 106)) (Eq. 1)
This scales the input line voltage by a factor of 0.000375. With this voltage-divider, the maximum voltage that can be measured by the 78M6610+PSU is:
VMAX = ±0.25V/0.00375 ±667VPEAK (Eq. 2)
Thus, the maximum input voltage for this voltage-divider is ±667VPEAK, or 472VRMS, assuming a sinusoidal voltage waveform.
For the current measurement, the 78M6610+PSU EV board uses a 0.004Ω shunt resistor. The current magnitude that produces a ±250mV drop across this resistor is:
IMAX = (±0.250V)/0.004Ω ±62.5APEAK (Eq. 3)
The highest peak current that can be measured with the 4mΩ shunt is 62.5A. For a sinusoidal current waveform, this corresponds to 44.19ARMS. It is necessary to consider the peak current rather than the RMS current when determining the maximum current to be measured. In power-supply applications, the current waveform at high loads is usually almost sinusoidal due to the power factor correction. Because of that, assuming a crest factor (i.e., the ratio of peak current to RMS current) between 1.414 and 1.5 is reasonable.
These calculations represent the upper limit on the scaling values for voltage and current. The values set in the scaling registers define the largest magnitude input that can be measured and reported by the firmware.

Measurement Resolution

The values in the scaling registers also set the resolution for the reported measurement. For voltage, current, and power, the scaling value is calculated by dividing the basic unit of measurement (volts, amps, or watts) by the desired resolution or the weighting of the LSB.
VScale = VMAX/(Voltage LSB Weighting) (Eq. 4)
IScale = IMAX/(Current LSB Weighting) (Eq. 5)
The LSB weightings are not limited to decimal fractions of the units of measurement, as illustrated in Tables 1 and 2.
Table 1. VScale Examples
Maximum Peak Voltage (V) Voltage Resolution (V) VScale Register
667 1 667
667 0.001 667000
170 1/2048 348160
Table 2. IScale Examples
Maximum Peak Current (A) Current Resolution (A) IScale Register
32 1/2048 65536
62.5 0.001 62500
62.5 0.0000078125 8000000

PScale Value

Because power is a product of current and voltage, the value entered into the PScale register is determined by the product of the maximum peak voltage and current values used to determine the VScale and IScale register values and by the desired power reporting resolution.
PScale = (VMAX × IMAX)/(Power LSB Weighting) (Eq. 6)
For example, if VMAX = 200V and the voltage resolution is 10mV/LSB; IMAX = 20A and the current resolution is 1mA/LSB; and power has an LSB weight of 1mW, PScale is calculated as:
PScale = (200 × 20)/0.001 = 4000000 (Eq. 7)
All of the scaling values, especially PScale, are subject to size limitations: they must fit into the 24-bit data word of the 78M6610+PSU. The scaling values are implemented as 24-bit integers, but they must always be positive values. The maximum positive value that can be represented in a 24-bit integer is 8,388,607 (223 - 1). If a calculated scaling value is greater than 8,388,607, then the maximum values, the LSB weighting, or both must be adjusted to generate a positive value that can be expressed as a 24-bit signed integer. The default scaling for the 78M6610+PSUEVK is shown in Table 3.
Table 3. The 78M6610+PSUEVK Default Scaling
  Maximum Resolution Scaling Value
Voltage 667V 0.001V 667000
Current 62.5A 0.0000078125A (1/128mA) 8000000
Power 41687.5W 0.005W 8337500
The PC demonstration program for the 78M6610+PSUEVK accounts for the scaling parameters when data values are displayed and calibration target values are entered.

TScale, PFScale, and FScale

The remaining scaling values—TScale, PFScale, and FScale—do not directly affect calibration or the full-scale range of the measurement values, but only determine the resolution, or the LSB weighting, with which the value is reported. For example, if FScale is set to 1000, frequency is reported with a resolution of 1/1000Hz. Likewise, setting PFScale to 1000 means that the power factor is reported with three digits to the right of the decimal point.

Measurement Considerations

In most cases, the measurements of interest for power-supply applications are voltage, current, and power. These measurements are provided at the power inlet of the system. However, system considerations such as electrical isolation, physical constraints, and EMI might mean that measuring directly at the power inlet is not feasible. In order to achieve high accuracy, the components preceding the measurement point should be accounted for during calibration. For switch-mode power supplies, it is common for the voltage and current measurements to be taken between sections of the input EMI filter, as shown in Figure 2. In this case, the current flowing in the filter capacitors—commonly referred to as X and Y capacitors—and the voltage drop across PCB traces and common mode chokes are not measured by the 78M6610+PSU, but should be accounted for in the measurements.
Figure 2. Typical measurement locations in power supplies.
Figure 2. Typical measurement locations in power supplies.
The 78M6610+PSU firmware was specifically designed to compensate for these voltage and current components that cannot be directly measured. The compensation coefficients for these can be entered as fixed values calculated from test data. The firmware also includes automated calibration routines for determining the correct coefficients for the X and Y capacitors and any voltage drop.

General Calibration

For general calibration of devices, the user can set and start a calibration routine through the Command register. When the calibration process completes, Command register bits 23:16 (set to 0xCA to issue a calibration command) are cleared, along with bits associated with the parameters that calibrated successfully. Bits associated with any parameters that failed remain set. The bit map of the Command register is shown in Figure 3. After calibration has completed, the new coefficients can be saved into flash memory as defaults by issuing the Access (ACC) command.
Figure 3. The 78M6610+PSU Command register bit map.
Figure 3. The 78M6610+PSU Command register bit map.
The subsequent sections in this application note address the specific calibration process when using the 78M6610+PSU.

Voltage and Current Gain Calibration

In order to perform a successful calibration of the 78M6610+PSU, the user must set the proper scaling factors for voltage and current, based on the sensor used in the system, as explained in the section Determining Scaling Values.
The system must be supplied with known and stable voltage source and load, as shown in Figure 4, and a stable AC supply and load must be applied to the sensors to be calibrated. The value corresponding to the applied AC supply (usually measured with a power meter) must be entered into the relevant target register (e.g., VTarget, ITarget).
To start the calibration, write the calibration command to the Command register. It is recommended that line-lock mode be set during calibration.
Initially, the value of the gain is set to unity for the selected parameters. RMS values are then calculated on all inputs and averaged over the number of measurement cycles set by the CalCyc register. The new gain is calculated by dividing the appropriate target register value by the averaged measured value. The new gain is then written to the selected gain registers, unless an error occurred. The calculations of the voltage and current gains are based on the error between target values (entered through the registers VTarget and ITarget) and the measured values. The error is an average of multiple measurements, hence the need for a stable source and load.
Upon completion, the command bits are cleared in the Command register, leaving only the system setup bits. In case of a failed calibration, the corresponding bit in the Command register is left set. The calibration routines store the new gain coefficients in the relevant registers. In order to save the new coefficients to flash memory as defaults, the user must issue the Access command.
Figure 4. Typical connections for system calibration.
Figure 4. Typical connections for system calibration.

Offset Calibration

The 78M6610+PSU firmware provides built-in routines for calibration of the offset registers (Ioff, Voff).
To calibrate offset, all DC signals should be removed from all inputs; it is possible to do the calibration in the presence of AC signals. In the Command register, the user specifies which channel(s) to calibrate. Target registers are not used for offset calibration.
During the calibration process, each input is accumulated over the entire calibration interval as specified by the CalCyc register. The result is divided by the total number of samples and is written to the appropriate offset register, if the particular offset register was selected in the calibration command. The Offset Calibration command sets the highpass filter (HPF) coefficients (HPFCoeffV, HPFCoeffI) to zero, thereby fixing the offset registers (Ioff, Voff) to their calibrated values.
In order to save the new coefficients to flash memory as defaults, the user must issue the Access command.

Calibration of the X+Y Capacitor and R Compensation Coefficients

Most high-power applications use a line input filter to minimize the EMI emissions, as shown in Figure 5. The current in the filter capacitors (ICAP) preceding the 78M6610+PSU cannot be measured. Since the current is 90° phase shifted with respect to the voltage, there is no effect on the power measurements. However, in order to obtain high accuracy in the current measurement, the current in the capacitors should be compounded in the total current (IRMS) calculation.
Fixed compensation coefficient values, which are calculated from the filter capacitor values, can be used. The tolerance of the filter capacitors, often ±20%, might require a specific coefficient for each system in order to obtain higher accuracy in the current measurement. The 78M6610+PSU provides a calibration routine for the X+Y capacitor compensation coefficient. Routine calibration of the X+Y capacitor compensation coefficient utilizes measured voltage and frequency as well as the target current that is measured using an external power meter, as in Figure 5.
To start the calibration, the user writes the calibration command, setting bits X, Y, R, and I and other needed options, such as line lock. During the calibration process, each input is accumulated over the entire calibration interval as specified by the CalCyc register. On completion, the XYcomp parameter is written with an estimate for the bulk capacitance. The calibration routines store the new gain coefficients in the relevant registers.
This routine is not recursive; the user might need to reissue the calibration command until the current reading matches the target current.
In order to save the new coefficients to flash memory as defaults, the user must issue the Access command.
Figure 5. Use of line input filter to minimize EMI in a typical calibration setup.
Figure 5. Use of line input filter to minimize EMI in a typical calibration setup.

On-Chip Temperature Calibration

To calibrate the on-chip temperature sensor, the user must first write only the “T” command bit to a “1” (all other bits 0). This command prevents the 78M6610+PSU firmware from overwriting the TempC register. Next, the user must write the known chip temperature to TempC. Finally, the user writes the calibration command to 0xCA0400 (calibrate temperature). This causes the Toff parameter to be updated with a new offset based on the known temperature supplied by the user.
In order to save the new coefficients to flash memory as defaults, the user must issue the Access command.

External Temperature Calibration

To calibrate external temperature, the user must first write only the “X” command bit to a “1” (all other bits 0). This prevents the 78M6610+PSU firmware from overwriting the ExtTemp register. Next, the user must write the known external temperature reading to ExtTemp. Finally, the user writes the calibration command to 0xCA0100 (calibrate external temperature). This causes the Xgain parameter to be updated with a new gain based on the known external temperature value supplied by the user.
In order to save the new coefficients to flash memory as defaults, the user must issue the Access command.

Calibration Procedures

The 78M6610+PSU calibration functions provide a great deal of flexibility in terms of the calibration points and the sequence in which calibrations are performed. For example, current and voltage can be calibrated in either order or simultaneously. When the firmware completes the current calibration, it checks to see if voltage calibration has also been requested. If so, voltage calibration is then started. While voltage and current calibration can be done at any operating point, the best accuracy is obtained by choosing the calibration point based upon the system characteristics.
Some other calibration operations, such as temperature calibrations, must be performed as separate operations. If a calibration function represented by an oval in Figure 6 has no exit arrow shown, it means that once that calibration function has completed, the firmware does not initiate any further calibration operations until another calibrate command (0xCA0000 + request bits) is written to the Command register. For example, if chip temperature (bit 10), current (bit 11), and voltage (bit 12) were all requested simultaneously, only the temperature calibration (bit 10) would be performed; current (bit 11) and voltage (bit 12) would remain set.
The sequence in which the firmware handles the different calibration requests is illustrated in Figure 6. It may be helpful to refer to the Command register bit map in Figure 3 when examining Figure 6.
Figure 6. Flowchart of the 78M6610+PSU calibration command process.
Figure 6. Flowchart of the 78M6610+PSU calibration command process.

Recommended Calibration Sequence

The sequence in which different calibration operations are performed affects the accuracy of the measurement results across the expected operating range. The sequence described below has been shown to provide the best results.
  1. Calibrate the current measurement at an AC inlet voltage that is near the low end of the design voltage range for the PSU. The PSU should be loaded to provide a power factor of 0.9 or greater, as shown on the reference meter. When the current calibration is done at low line voltage, the current in the X and Y capacitors, which is measured by the reference meter but not by the metering device, is minimized.
  2. Calibrate the voltage measurement at high line voltage and low current (IRMS < 500mA). The voltage and current measurements are independent. Calibrating voltage at low input current minimizes the voltage drop in the PCB and the components that are between the AC power inlet and the 78M6610+PSU’s measurement point.
  3. Calibrate X+Y capacitor compensation at high line voltage and low current. At high voltage, the current in the X and Y capacitors is increased, and at low current, the ratio of the capacitor current to the current measured by the 78M6610+PSU is larger, which improves the results of the X+Y capacitor compensation calibration.
  4. Calibrate R compensation at low input voltage and high current. The high current increases the magnitude of the voltage drop in the PCB and the EMI filters; the low input voltage increases the ratio of the voltage drop between the inlet and the measurement point to the voltage measured by the 78M6610+PSU.
  5. Save the updated calibration values to flash memory.
Table 4. Calibration and Scaling Checklist
Step Description
1 Calculate the new voltage, current, and power scaling values based on the sensors used in the system and the desired resolution. Set the VScale, IScale, and PScale registers accordingly and store these parameters in flash memory.
2 Calculate the frequency and power factor scaling parameters to obtain the desired resolution (if required). Set the relevant FScale and PFScale registers and store these parameters in flash memory.
3 Connect source and load for voltage and current calibration. Set the calibration point values.
4 Set the VTarget, ITarget, and TTarget registers.
5 Perform VCAL , ICAL, and TCAL.
6 If necessary, perform XYComp and RComp calibrations.
7 Store the newly calculated coefficients in flash memory.

Example of the Calibration Procedure Using the 78M6610+PSUEVK

This section explains step-by-step the calibration procedure using a standard 78M6610+PSU EV board mounted to a 750W server power supply. Calibration requires two points and includes voltage, current, and X+Y capacitor compensation coefficients.
The power supply has been modified to allow the EV board to be easily connected. The measurement location is typical for this kind of application; Figure 7 shows the power-supply input stage (EMI filters) and the EV board.
Figure 7. Test setup for calibration example.
Figure 7. Test setup for calibration example.
In order to perform in-system calibration of the 78M6610+PSU, a stable AC supply source and load on the output of the power supply is needed. The inlet current and voltage also need to be known. If the AC source cannot provide accurate readings of current and voltage, a power meter is needed.
For this example, the following equipment is used:
  • AC source: Chroma® model 6430
  • Power meter: Chroma model 66202
  • DC load: Chroma model 6314, 63106 (DC load mainframe and DC electronic load module)
  • Computer with the standard GUI that is provided with the 78M6610+PSUEVK
Step 1. Current Gain Calibration
In this step (see Figure 8), the current gain is calibrated. The value of the X+Y capacitor compensation coefficient must be set to zero. The power-supply output must be loaded in order to obtain a power factor approximating unity; the power factor is measured through the power meter. The power-supply input should be set to the lower range of the working voltage (e.g., 100VAC). By doing so, the effect of the current on the filter capacitors is minimized and thus, a greater accuracy can be obtained. The value of the current read through the power meter must be entered as a new target current, and the calibration command must be entered.
Figure 8. Calibrating the current gain in the 78M6610+PSUEVK GUI.
Figure 8. Calibrating the current gain in the 78M6610+PSUEVK GUI.
Step 2. Voltage Gain Calibration
The second step (see Figure 9) consists of calibrating the voltage gain. In this step, the output load can be reduced. The input voltage should be set to the upper range.
Figure 9. Calibrating the voltage gain in the 78M6610+PSUEVK GUI.
Figure 9. Calibrating the voltage gain in the 78M6610+PSUEVK GUI.
Step 3. X+Y Capacitor Compensation Coefficient Calibration
In the third step (see Figure 10), the compensation coefficient for the X+Y capacitor is set.
Figure 10. Calibrating the X+Y capacitor compensation coefficient in the 78M6610+PSUEVK GUI.
Figure 10. Calibrating the X+Y capacitor compensation coefficient in the 78M6610+PSUEVK GUI.
Step 4. Storing the Newly Calculated Coefficients in Flash as Defaults

Accuracy Results

The accuracy results following calibration are shown in Figures 11 and 12.
Figure 11. Load line at 120VRMS.
Figure 11. Load line at 120VRMS.
Figure 12. Load line at 230VRMS.
Figure 12. Load line at 230VRMS.

Conclusion

Many systems (such as server power supplies) require accurate real-time reporting of power, current, voltage, and all electrical characteristics of the load. This reporting is required for proper load management and diagnostics. In order to achieve high accuracy, an in-system calibration is recommended. As we have seen in this application note, the 78M6610+PSU provides on-chip routines to perform fast in-system calibration. These routines allow the reduction of test and calibration time, thereby reducing costs.