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.

Energy Measurement Design Center (EMDC): Phase Angle and Power Factor relationship

Hi again,

I've asked a couple of questions previously, and we're continuing to work with the EMDC library (on an MSP430F67621A, with some changes made to the ADC parts of EMDC to support the ADC10 unit in this part).

We're now looking at calibration, and the measurements that are available from the library.

One thing we've noticed is that there is not a "phase angle" value available to read back - there is only the "power factor". Initially we thought this would be fine (of course the two are inherently related), but after looking more closely at the results obtained after calibration, in particular by changing the "active power scaling factor" and the "reactive power scaling factor", it seems like the power factor is calculated from the magnitude of the active and reactive power. Mathematically this is fine, that is what the power factor is a measurement of, but the problem we have is what to do with the two different power scaling numbers - changing one of the factors but not the other will cause a change in the reported power factor.

I have the following questions:

  • How come there is no actual "phase angle" value available from the EMDC library?

  • What is the intention behind the separate active and reactive power scaling numbers?

  • Wouldn't the power factor come directly from the measured phase angle between the voltage and current waveforms?

  • Why does power factor instead seem to be calculated from the scaled active and reactive power? (which themselves presumably must be calculated from the phase angle)

This makes it hard for me to comprehend how calibration is meant to work - it is possible to change both the integer shift and preload values in the "phase correction" setting to adjust the power factor, as well as changing the separate active and reactive power scaling factors. Essentially, there are more inputs than outputs to solve for, what is the recommended approach for calibration? For example, suppose we apply a known test load with a power factor of 0.5, and then adjust the phase correction to have this be reported correctly (or as close as possible). Why would we not use the same scaling for active and reactive power? Surely using these to achieve a correct power factor at 0.5 would just make the measurement incorrect at other power factors?

Thanks for your help.

  • Hi Sean,

    Thanks for your post. Nice progress!

    Sean Lanigan said:
    How come there is no actual "phase angle" value available from the EMDC library?

    You're correct. The EMDC does not directly support a "phase angle" result, but as you pointed out, it can be calculated using the active/reactive/apparent power results and power factor results, you can calculate the phase angle. Since this is the same information in different forms, we chose to support the power factor over the phase angle with the assumption that it could be easily calculated if necessary using the other results. Also, the inverse cosine operation for converting power factor to the phase angle is a math-intensive operation to be running on the MCU. Thus, it's most likely better to perform this calculation on a host MCU or in a GUI like the EMDC GUI. Obviously, this can be done on the MCU if necessary.

    Sean Lanigan said:
    What is the intention behind the separate active and reactive power scaling numbers?

    They were separated in case they ever needed to be different. Here, they are different variables but equal to the same value.

    Sean Lanigan said:
    Wouldn't the power factor come directly from the measured phase angle between the voltage and current waveforms?

    Yes, as the phase angle between the voltage and current signals changes, this directly affects the active/reactive/apparent power/energy results. Different types of loads cause this phase angle to change. For example, a purely resistive load will make the phase angle between voltage and current equal to zero, which means there's no reactive power/energy consumed.

    Sean Lanigan said:
    Why does power factor instead seem to be calculated from the scaled active and reactive power? (which themselves presumably must be calculated from the phase angle)

    Please see my earlier comments and read the following articles about power factor and the helpful power triangle.

    Calculating Power Factor

    Power Triangle and Power Factor

    Sean Lanigan said:
    This makes it hard for me to comprehend how calibration is meant to work - it is possible to change both the integer shift and preload values in the "phase correction" setting to adjust the power factor, as well as changing the separate active and reactive power scaling factors. Essentially, there are more inputs than outputs to solve for, what is the recommended approach for calibration? For example, suppose we apply a known test load with a power factor of 0.5, and then adjust the phase correction to have this be reported correctly (or as close as possible). Why would we not use the same scaling for active and reactive power? Surely using these to achieve a correct power factor at 0.5 would just make the measurement incorrect at other power factors?

    For calibration, it's two parts. Gain calibration is done at zero degrees phase angle (or power factor equal to one). This calibration scales the voltage, current, and power scaling factors accordingly. For phase calibration, we normally adjust our accurate test source to 60 degrees phase angle (or power factor equal to 0.5) and then adjust the whole and fractional sample delays. With devices using only SD24 ADCs, you can calculate the degrees per sample since you know your input frequency (50Hz or 60Hz period, one period equals 360 degrees) and your sampling frequency (defined by OSR and modulation frequency). If you multiply 360 degrees by (input frequency divided by SD24 ADC sampling frequency), you get degrees per whole sample. For example, if you have 60Hz input and 4096Hz sampling frequency, each whole sample phase delay is equal to approximately 5.273 degrees. Now, fractional delays are adjusted using the SD24 ADC preload. Each preload value splits one whole sample time into small chunks. For OSR = 256, there are 256 fractional samples (or delays) between samples. Thus, each preload value equals the whole sample phase delay divided by the OSR. Thus, 5.273 degrees divided by 256 means each preload can adjust by approximately 0.0206 degrees. Thus, the un-calibrated measured phase angle between voltage and current can be adjusted very accuarately by choosing the correct number of whole and fractional delays. For example, if you're measuring 65.8 degrees at 60 degrees applied, you would need to delay by 1 whole sample and 25 or 26 fractional delays (or preload).

    Now, the F67621A measures voltage inputs with the SAR ADC and current inputs with the SD ADC. This is slightly different than just using SD ADCs on F6779. For F67621A, there's a trigger between the SAR ADC sample and the SD ADCs that you can use to implement the fractional (preload) delays. The whole sample delay is done using a pointer to locations in the voltage and current buffers. Depending on the analog front end circuitry and sensor, you may need to advance rather than delay. Covering all scenarios is done in the EMDC-generated code, so hopefully that's a good reference for you.

    Regards,

    James

  • Thank you James for your very detailed answer, I'm extremely grateful for the prompt support you've offered (and in my other questions too) and continue to be impressed with Texas Instruments' Support.
  • Hi Sean,

    Thanks very much for your feedback. We're happy to help. This is not an easy effort, so I respect the work you've done here. If you have any more questions, let us know.

    Regards,

    James

**Attention** This is a public forum