TIDUF72 August   2024

 

  1.   1
  2.   Description
  3.   Resources
  4.   Features
  5.   Applications
  6.   6
  7. 1System Description
    1. 1.1 Key System Specifications
    2. 1.2 End Equipment
    3. 1.3 Electricity Meter
    4. 1.4 Power Quality Meter, Power Quality Analyzer
  8. 2System Overview
    1. 2.1 Block Diagram
    2. 2.2 Design Considerations
      1. 2.2.1 Magnetic Tamper Detection With TMAG5273 Linear 3D Hall-Effect Sensor
      2. 2.2.2 Analog Inputs of Standalone ADCs
      3. 2.2.3 Voltage Measurement Analog Front End
      4. 2.2.4 Analog Front End for Current Measurement
    3. 2.3 Highlighted Products
      1. 2.3.1 AMC131M03
      2. 2.3.2 ADS131M02
      3. 2.3.3 MSPM0G1106
      4. 2.3.4 TMAG5273
      5. 2.3.5 ISO6731
      6. 2.3.6 TRS3232E
      7. 2.3.7 TPS709
  9. 3Hardware, Software, Testing Requirements, and Test Results
    1. 3.1 Hardware Requirements
      1. 3.1.1  Software Requirements
      2. 3.1.2  UART for PC GUI Communication
      3. 3.1.3  Direct Memory Access (DMA)
      4. 3.1.4  ADC Setup
      5. 3.1.5  Foreground Process
      6. 3.1.6  Formulas
        1. 3.1.6.1 Standard Metrology Parameters
        2. 3.1.6.2 Power Quality Formulas
      7. 3.1.7  Background Process
      8. 3.1.8  Software Function per_sample_dsp()
      9. 3.1.9  Voltage and Current Signals
      10. 3.1.10 Pure Waveform Samples
      11. 3.1.11 Frequency Measurement and Cycle Tracking
      12. 3.1.12 LED Pulse Generation
      13. 3.1.13 Phase Compensation
    2. 3.2 Test Setup
      1. 3.2.1 Power Supply Options and Jumper Setting
      2. 3.2.2 Electricity Meter Metrology Accuracy Testing
      3. 3.2.3 Viewing Metrology Readings and Calibration
        1. 3.2.3.1 Calibrating and Viewing Results From PC
      4. 3.2.4 Calibration and FLASH Settings for MSPM0+ MCU
      5. 3.2.5 Gain Calibration
      6. 3.2.6 Voltage and Current Gain Calibration
      7. 3.2.7 Active Power Gain Calibration
      8. 3.2.8 Offset Calibration
      9. 3.2.9 Phase Calibration
    3. 3.3 Test Results
      1. 3.3.1 Energy Metrology Accuracy Results
  10. 4Design and Documentation Support
    1. 4.1 Design Files
      1. 4.1.1 Schematics
      2. 4.1.2 BOM
      3. 4.1.3 PCB Layout Recommendations
      4. 4.1.4 Layout Prints
      5. 4.1.5 Altium Project
      6. 4.1.6 Gerber Files
      7. 4.1.7 Assembly Drawings
    2. 4.2 Tools and Software
    3. 4.3 Documentation Support
    4. 4.4 Support Resources
    5. 4.5 Trademarks
  11. 5About the Authors

Standard Metrology Parameters

This section briefly describes the formulas used for the voltage, current, power, and energy calculations. As previously described, voltage and current samples are obtained at a sampling rate of 7812.5Hz. All of the samples that are taken in approximately 10 or 12 cycle frames are kept and used to obtain the RMS values for voltage and current for each phase.

The RMS, voltage overdeviation, and voltage underdeviation values are obtained with the following formulas:

Equation 4.
TIDA-010944

Equation 5.
TIDA-010944

Equation 6.
TIDA-010944

Equation 7.
TIDA-010944

where

  • ph = V-I mapping being calculated [that is, V-IA (= 1) V-IB (= 2) and V-IC (= 3)]
  • Vph(n) = Voltage sample at a sample instant n
  • Voffset,ph = Offset used to subtract effects of the additive white Gaussian noise from the voltage converter. This is in units of mV.
  • VNom = Defined nominal voltage of design
  • Iph(n) = Each current sample at a sample instant n
  • Ioffset,ph = Offset used to subtract effects of the additive white Gaussian noise from the current converter. This is in units of µA.
  • Sample count = Number of samples within the present frame
  • Kv,ph = Scaling factor for voltage
  • Ki,ph = Scaling factor for current

Power and energy are calculated for active and reactive energy samples of one frame. These samples are phase-corrected and passed on to the foreground process, which uses the number of samples (sample count) to calculate phase active and reactive powers through the following formulas:

Equation 8.
TIDA-010944

Equation 9.
TIDA-010944

Equation 10.
TIDA-010944

where

  • V90,ph(n) = Voltage sample at a sample instant ‘n’ shifted by 90°
  • KACT,ph = Scaling factor for active power
  • KREACT,ph = Scaling factor for reactive power
  • PACT_offset,ph = Offset used to subtract effects of crosstalk on the active power measurements from other currents
  • PREACT_offset,ph = Offset used to subtract effects of crosstalk on the reactive power measurements from other currents

For reactive energy, the 90° phase shift approach is used for two reasons:

  1. This approach allows accurate measurement of the reactive power for very small currents.
  2. This approach conforms to the measurement method specified by IEC and ANSI standards.

The calculated mains frequency is used to calculate the 90 degrees-shifted voltage sample. Because the frequency of the mains varies, the mains frequency is first measured accurately to phase shift the voltage samples accordingly.

To get an exact 90° phase shift, interpolation is used between two samples. For these two samples, a voltage sample slightly more than 90 degrees before the most recent voltage sample and a voltage sample slightly less than 90 degrees before the most recent voltage sample are used. The phase shift implementation of the application consists of an integer part and a fractional part. The integer part is realized by providing an N samples delay. The fractional part is realized by a one-tap FIR filter. In the test software, a lookup table provides the filter coefficients that are used to create the fractional delays.

Using the calculated powers, energies are calculated with the following formulas :

Equation 11.
TIDA-010944

Equation 12.
TIDA-010944

Equation 13.
TIDA-010944

The calculated energies are then accumulated into buffers that store the total amount of energy consumed since system reset. These energies are different from the working variables used to accumulate energy for outputting energy pulses. There are three sets of buffers that are available: one for each V-I mapping. Within each set of buffers, the following energies are accumulated:

  1. Active import energy (active energy when active power ≥ 0)
  2. Active export energy (active energy when active power < 0)
  3. Fundamental active import energy (fundamental active energy when fundamental active power ≥ 0)
  4. Fundamental active export energy (fundamental active energy when fundamental active power < 0)
  5. React. Quad I energy (reactive energy when reactive power ≥ 0 and active power ≥ 0; inductive load)
  6. React. Quad II energy (reactive energy when reactive power ≥ 0 and active power < 0; capacitive generator)
  7. React. Quad III energy (reactive energy when reactive power < 0 and active power < 0; inductive generator)
  8. React. Quad IV energy (reactive energy when reactive power < 0 and active power ≥ 0; capacitive load)
  9. Apparent import energy (apparent energy when active power ≥ 0)
  10. Apparent export energy (apparent energy when active power < 0)

The background process also calculates the frequency in terms of samples-per-mains cycle. The foreground process then converts this samples-per-mains cycle to Hertz with Equation 14:

Equation 14.
TIDA-010944

After the active power and apparent power have been calculated, the absolute value of the power factor is calculated. In the internal representation of power factor of the system, a positive power factor corresponds to a capacitive load; a negative power factor corresponds to an inductive load. The sign of the internal representation of power factor is determined by whether the current leads or lags voltage, which is determined in the background process. Therefore, the internal representation of power factor is calculated with Equation 15:

Equation 15.
TIDA-010944