SDAA160 November   2025 TMS320F28P550SJ , TMS320F28P650DK

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Library Architecture
  6. 3Metrology Calculations
  7. 4Configuration and Data Structures
  8. 5Calibration Module
  9. 6Applications and Use Cases
  10. 7Helpful Links

Configuration and Data Structures

  1. These files define constants (for example, nominal voltage/frequency, sample rates), preprocessor macros for feature enablement (for example, HARMONICS_SUPPORT, NEUTRAL_MONITOR_SUPPORT), and the critical data structures that hold all metrology-related information.
  2. metrologyData: The top-level global structure, an instance of which holds all data for all phases, neutral, totals, and system status.
  3. phaseMetrology / neutralMetrology: Structures within metrology data containing parameters (params) and readings (readings) for each phase and the neutral line.
    1. params: Stores configuration, intermediate accumulations from background (like dotProd arrays), calibration-derived values, and state variables (for example, for PLL, sag/swell).
    2. readings: Stores the final calculated metrology values (RMS, power, PF, and so on).
  4. calibrationData (metrology_nv_structs.h): Holds the calibration coefficients.