SBOA444 November   2020 TMCS1100

 

  1.   Trademarks
  2. 1Introduction
  3. 2Implementation Block Diagram
  4. 3Hardware Implemenation
    1. 3.1 Analog Inputs
      1. 3.1.1 Voltage Measurement Analog Front End
      2. 3.1.2 Current Measurement Analog Front End
    2. 3.2 MSP432 LaunchPad Connections
    3. 3.3 PCB Layout Recommendations
  5. 4How to Implement Software for Metrology Testing
    1. 4.1 Setup
      1. 4.1.1 Clock
      2. 4.1.2 UART Setup for GUI Communication
      3. 4.1.3 Real-Time Clock (RTC)
      4. 4.1.4 Direct Memory Access (DMA)
      5. 4.1.5 ADC Setup
    2. 4.2 Foreground Process
      1. 4.2.1 Formulas
        1. 4.2.1.1 Standard Metrology Parameters
        2. 4.2.1.2 Power Quality Formulas
    3. 4.3 Background Process
      1. 4.3.1 per_sample_dsp( )
        1. 4.3.1.1 Voltage and Current ADC Samples
        2. 4.3.1.2 Pure Waveform Samples
        3. 4.3.1.3 Frequency Measurement and Cycle Tracking
      2. 4.3.2 LED Pulse Generation
      3. 4.3.3 Phase Compensation
  6. 5Metrology Accuracy Testing
    1. 5.1 Test Setup
    2. 5.2 Results
  7. 6Schematics
  8. 7References

Power Quality Formulas

For calculating the fundamental RMS voltage, a pure sine wave is generated and tightly locked to the fundamental of the incoming voltage waveform. Using the generated waveform, the fundamental voltage, fundamental active power, and fundamental reactive power are calculated by the following equations:

Equation 19.
GUID-20201005-CA0I-Z80W-LGTB-65TX4CS8RPHT-low.gif

Equation 20.
GUID-20201005-CA0I-D7CT-K6PH-7WNPQRJLJRV0-low.gif

Equation 21.
GUID-20201005-CA0I-NRX8-0WL4-FLXW1XS1F197-low.gif

Where,

  • Vpure,ph(n) = Voltage sample of the pure sine wave generated, taken at a sample instant n

  • V90_pure,ph(n) = Voltage sample of the waveform that results from shifting Vpure,ph(n) by 90° , taken at a sample instant n

  • Kv_fund,ph = Scaling factor for fundamental voltage

  • KACT_fund,ph = Scaling factor for fundamental active power

  • KREACT_fund,ph = Scaling factor for fundamental active power

  • Vfund_offset_,ph= Offset to subtract from fundamental voltage calculation. This is in units of mV.

  • PACT_fund_offset,ph = Offset to subtract from fundamental active power calculation. This is in units of mW.

  • PREACT_fund_offset,ph = Offset to subtract from fundamental reactive power calculation. This is in units of mvar.

After calculating the fundamental voltage, fundamental active power, and fundamental reactive power, the fundamental current and fundamental apparent power are calculated by the following formula:

Equation 22.
GUID-20201005-CA0I-M2PF-TPMM-VRKQKLVFNWN5-low.gif

Equation 23.
GUID-20201005-CA0I-QFQ7-8L0T-R71PP6F8C3T4-low.gif

Where,

  • Ki_fund,ph = Scaling factor for fundamental current

  • Ifund_offset_,ph= Offset to subtract from fundamental current calculation. This is in units of µA.

Once the fundamental current and fundamental voltage are calculated, the voltage THD and current THD can also be calculated. This software supports three different methods of calculating THD that are referred to as THDIEC_F, THDIEC_R, and THDIEEE. The formulas used to calculate voltage THD (V_THD) and current THD (I_THD) with the different methods as follows:

Equation 24.
GUID-20201005-CA0I-J8WD-T7W1-HJXJQMMXZB20-low.gif

Equation 25.
GUID-20201005-CA0I-2SCM-91RR-KJBTRBHNMMWX-low.gif

Equation 26.
GUID-20201005-CA0I-FLBR-X0MR-B7J0XP6DH3LC-low.gif

To calculate THD correctly, it is necessary to select the proper method of THD calculation and to ensure that any reference meter used for measuring THD uses the same THD method as the method selected in software.