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.

MSP430F6736: The accuracy of voltage, current and power acquisition is very high, but the accuracy of electric energy is very low

Part Number: MSP430F6736

Tool/software:

As the title says, the actual test, found that the voltage, current, power data accuracy is very high, the error is very small; However, the error of the electric energy data is very large, more than 1%. Is the electric energy not the integration of power against time? Why is the power accuracy very high, but the electric energy error is large?Sometimes the power error is very large, but the electric energy error is very small;Please refer to the following table data

/resized-image/__size/640x480/__key/communityserver-discussions-components-files/166/pastedimage1719975242049v2.png

  • Hi Tang,

    I think this is application specifc scenarios and I am not the experts on this topic.

    I suppose there should be some algorithm to do the energy calcuation.

    From my perspective, Voltage and Ciurrent are the instantaneous value, so the accuracy depends on your input signal. Also with the Power, it is multipled with U and I. (If it is AC, there have some algorithm to do calcualtion.)

    While for power consumption, continuous testing will result in large cumulative errors.

    B.R.

    Sal

  • thanks sal!

    I according to the hardware analog acquisition circuit, together with the < EnergyMeasurementDesignCenter > generate a demo project to measure electric energy data, calibration according to the project after the completion of the voltage, current, power precision can meet the requirements of plus or minus 1%, actual test can meet the requirements; Finally, the test of electric energy data found that the accuracy error is very large, so why is the error of electric energy really large in the case of high accuracy of power data?

  • Hi tang,

    Could you share the data with a excel or other source file format, And we can check the error value. The image you shared is not clearly to observe.

    I think the energy calculation method might misses some steps. Could you also share the code calculation formula of energy data?

    B.R.

    Sal

  • Thanks Sal!

    input volt 240v ,currenr Max80A,L-N Connection:

    We use the electrical energy interface in the library function(lib/EM/include/emSwlib.h) to obtain the data;

  • Hi Tang,

    Thanks for your sharing, I will forward this to metering experts in my team and check his feedback.

    B.R.

    Sal

  • Hi Tang,

    Update the experts' feedback here.

    The calculation between voltage and current will also have a phase component multiplied. So if the voltage and current have a 60 degree phase shift your Active Power would be V*I*Cos(60). For the energy component, it is Power * Sample Count, so potential error sources can be from the phase and the compounded samples.

    B.R.

    Sal

  • Thanks Sal!

    Thank you very much for your patient reply!

    However, when we continue to observe the voltage and current data, we find that the data is 0 when reading the current data through the library function interface(lib/EM/include/emSwlib.h),During an output process lasting 52 minutes, the read current value of 0 appeared four times, and each time it lasted for about 1s, it returned to normal.

    Is this normal? Calling library function interface to read voltage and current data;Is the amount of energy lost when the current is zero the cause of the error?

  • Hi Tang,

    Here is a document which introduce the principle of the library calculation: https://www.ti.com/lit/an/slaa577g/slaa577g.pdf?ts=1720756684523 

    The library will use every samples to calculate the enegry consumption:

    And you record shows that the detected enegry is always smaller than your test. So, I think it should be one reason.

    By the way, whatis the enegry error when there is no abnormal current detected?

    B.R.

    Sal

  • Thanks Sal!

    Because the phenomenon of the current value of 0 always occurs during each test, and the time of each occurrence is random, the electric energy error data without the current value of 0 cannot be obtained.But if for the energy component, it is Power * Sample Count,So When the current is 0, the power should also be 0, but from the test data, the power is not 0 when the current is 0,So we don't know if the current is 0 when the sample value is 0 or the function interface itself internal problems.Do electricity experts have any conclusions about this?

  • Hi tang,

    I am not an expert on the details algorithm method.

    If you know how many samples used in calculation, can you try to manually calibration with the missed one, and then check the corrected enegry, whether it have expected accuracy?

    Anyway, I will foward your new findings to the expert.

    B.R.

    Sal

**Attention** This is a public forum