1.2.2 Metrology Library - Core 1
Overview
The Metrology Library runs on the metrology coprocessor (Core 1). This processor acquires Voltage and Current data samples at a 16 kHz rate from the Energy Metering AFE. Then, calculates the meter energy consumption, monitors related line voltage conditions and generates, as output, an entire suite of metrology measurements at a configurable rate (1 Hz being the default value for the integration period).
Key features:
- 16 kHz ADC sample rate
- Dynamic range 1:3000
- 4-quadrant measurement
- Discrete Fourier Transform (DFT) Harmonic measurement options
- Active and reactive energy accuracy: up to class 0.2, compliant with ANSI C12.20-2002 and IEC 62053-22
- Line frequency monitor and measurement
- Current transformer, Rogowski coil or Shunt for current sensing circuit implementation
Metrology Library and Core 1 Resources Usage
- Core 1
- SRAM1 and SRAM2
- PWM peripheral
- Energy Metering Analog Front-End (EMAFE) (only in PIC32CXMTSH)
- Multi-Channel Core 1 SPI (MCSPI)
- GPIOs of the PORTD, such as the ones associated to the pulse outputs PD17, PD18, PD19
Samples Processing
The metrology firmware collects the raw data samples at 16 kHz (every 62.5 μs) from the Energy Metering AFE. Metrology filters and decimates the data to 4 kHz (0.25 ms) to integrate and calculate all the output data measurements. The integration period is 1 second by default, but it can be configured as it is explained in the “PIC32CXMTx Metrology Reference Guide” (DS50003461).
Key features:
- Voltages (A, B, C)
- Currents (A, B, C, N (N-measured, N-imputed, N-measured to imputed))
- Calibration compensation (V, I and Phase)
- Pulse Output
- Zero crossing detection and counting
- Metrology DSP data capture for debugging and verifying algorithm
Integration Period Processing
The Metrology firmware collects the acquired raw data and converts it into scaled and integrated measurements at each integration period (by default 1 second, so having 50 or 60 power line cycles). The Metrology firmware supports a wide range of measurement quantities (and accumulations) including active and reactive energy, supply voltage and frequency, apparent power. Some quantities are derived from the fundamental plus harmonics, while other quantities are derived from the fundamental only:
- Total Energy and individual phases with harmonics (Wh)
- Total Quadergy and individual phases with harmonics (VArh)
- Power factor
- Total Harmonic Distortion (Power, Current and Voltage)
- Line Voltage Monitoring (Frequency, Sag, Voltage line to Line phase)
- Metrology status (On/Off, OK/Error, Swell/Sag Alarm)
Constraints
All computed quantities available through the Metrology firmware are integrated over a time interval equivalent to an integral number of periods of the fundamental frequency. All integration periods are approximated by the final output sample rate of the DSP filters, 4000 Hz. So, the measurement accuracy will increase using longer integration periods. One second is the recommended minimum integration period (50 cycles at 50 Hz or 60 cycles at 60 Hz), but fewer numbers of samples may still yield acceptable results. DSP filters require a settling time before accurate measurements may be used for revenue-quality metering. It is recommended to wait at least 250 ms after start-up when testing to revenue-grade accuracy.
Assumptions and Dependencies
The Smart Meter DSP Module is specifically designed to accept samples from an Energy Metering AFE - Δ/Σ ADC using an OSR = 64, at an input sample rate of 16.000 kHz. This input data stream is filtered to an internal sample rate of 4.000 kHz for generation of metrology measurements. All computed metrology measurements are available at a rate of approximately 1 Hz when using default settings.
