This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EVM430-F6736: How are the Energy Measurement Design Center calibration values calculated?

Part Number: EVM430-F6736
Other Parts Discussed in Thread: MSP-IQMATHLIB

Dear Sirs,

We try to develop a single phase electricity meter.

We started the design based on EVM430-F6736 and Energy Measurement Design Centre, with the idea to replace communication protocol and add display and other functionality.

We reached to the calibration process and here came the question - how to calculate calibration values (Scaling Factors), mentioned in Energy Measurement Technology Guide, Communication Protocol Spec.

Could you send any reference to how these values are calculated.

Thank you in advance.

Best regards

Maxim Karakash

  • Hi Maxim,

    I'm going to ask a colleague to help you.

    BR,
    Leo

  • Hello Maxim,

    Thanks for your question and for using EMDC.

    Here are some typical EMDC scaling factors for a three-phase configuration before calibration:

    EM_Phase_Calibration g_emPhaseCalibration[EM_PHASE_LENGTH] =
    {
        //PHASE_A
        {
            .voltageSF = _IQ24(1.000000000),
            .currentSF = _IQ24(1.000000000),
            .activePowerSF = _IQ30(1.000000000),
            .reactivePowerSF = _IQ30(1.000000000),
            .phaseCorrection = 0x0080,
        },
        //PHASE_B
        {
            .voltageSF = _IQ24(1.000000000),
            .currentSF = _IQ24(1.000000000),
            .activePowerSF = _IQ30(1.000000000),
            .reactivePowerSF = _IQ30(1.000000000),
            .phaseCorrection = 0x0080,
        },
        //PHASE_C
        {
            .voltageSF = _IQ24(1.000000000),
            .currentSF = _IQ24(1.000000000),
            .activePowerSF = _IQ30(1.000000000),
            .reactivePowerSF = _IQ30(1.000000000),
            .phaseCorrection = 0x0080,
        },
    };

    Here are the same factors after calibration:

    EM_Phase_Calibration g_emPhaseCalibration[EM_PHASE_LENGTH] =
    {
        //PHASE_A
        {
            .voltageSF = _IQ24(15.032730162),
            .currentSF = _IQ24(21.504314005),
            .activePowerSF = _IQ30(0.323262063),
            .reactivePowerSF = _IQ30(0.323262063),
            .phaseCorrection = 0x0059,
        },
        //PHASE_B
        {
            .voltageSF = _IQ24(15.031717598),
            .currentSF = _IQ24(21.527243435),
            .activePowerSF = _IQ30(0.323541185),
            .reactivePowerSF = _IQ30(0.323541185),
            .phaseCorrection = 0x0059,
        },
        //PHASE_C
        {
            .voltageSF = _IQ24(15.036997855),
            .currentSF = _IQ24(21.533266544),
            .activePowerSF = _IQ30(0.323773472),
            .reactivePowerSF = _IQ30(0.323773472),
            .phaseCorrection = 0x005C,
        },
    };

    Now, notice that .voltageSF is in fixed-point IQ format from our MSP-IQMATHLIB (see Section 2.2 in the user's guide). This scaling factor is used to calculate VRMS and helps convert an ADC register value to a human-understandable value (e.g. 23000 in units of millivolts). Let's assume you're calibrating VRMS and are applying 230 V (VRMS_calibration) but only measuring 10 V (VRMS_measured). You can calculate your new .voltageSF using the following equation.

    new .voltageSF = .voltageSF x (VRMS_calibration / VRMS_measured)

    The same approach applies for .currentSF. However, .activePowerSF is a little different.

    new .activePowerSF = .activePowerSF x ((VRMS_calibration x IRMS_calibration x cos (measured phase angle)) / activePower_measured)

    The power factor is calculated on the MSP430, and the GUI converts that to a phase angle between VRMS and IRMS. After calibrating .activePowerSF, we set it equal to .reactivePowerSF. Last, .phaseCorrection is made up of both whole + fractional sample delays. The following thread discusses why we may run out of preload bits and require whole sample delays.

    SLAA577 - phase calibration and V->I phase shift calculation

    Here's another thread that may help you.

    MSP-EM-DESIGN-CENTER: Unable to re-calibrate after calibrating without a load

    I hope this helps.

    Regards,

    James

  • Hello James,

    Thanks for your explanations.

    The calibration of voltage, current and active energy seemed quite clear, so after some experiments with the demo kit I decided to move to our design, in order to be able to put some real load and experiment with phase correction. And here came the problem.

    I created a new project using EMDC. In our design we use a shunt for current measurement.

    After importing the project to CCS and changing the MCU (to F6723) I started the calibration.

    Everything was fine with the voltage, but not with the current. I was getting some very small reading (0.003A) and even applying maximum scaling factor I was not able to get close to the applied current of 1 A.

    I decided that it was a problem with our design, so I got back to the demo kit.

    I installed a shunt in the demo kit on channel 1, and again - new project, build and calibration - with the same result: Applied current is 3 A, measured current is 0.001 A, with max. correction - 0.074 A.

    Any advice will be highly appreciated.

    Thank you in advance.

    Maxim Karakash

  • Hi Maxim,

    Thanks for your detailed question. Did you happen to double-click the shunt sensor icon in the EMDC Design Center GUI workspace and configure the shunt parameters such as the resistance, maximum current, etc.? EMDC then calculates the max ADC input voltage from the max current flowing through the shunt and then the PGA gain is selected automatically. I suspect you're using a shunt with a lower resistance than the default value, so a lower PGA was selected by EMDC.

    There's a training video that covers how to configure the shunt sensor using EMDC in the link below. Although the MCU in the video is MSP430i20xx, it's a very similar configuration process on F67xxA.

    Energy Measurement Design Center for MSP430 MCUs: Designing a single-phase shunt-based smart appliance

    Please see this FAQ thread as well since you're using F6723.

    [FAQ] MSP-EM-DESIGN-CENTER: Why isn't my MSP430 part number listed?

    Hope this helps!

    Regards,

    James

**Attention** This is a public forum