AM263x Digital Power SDK  09.01.00
Power Measurements

Introduction

The Sine Analyzer with Power Measurement (POWER_MEAS_SINE_ANALYZER) API provides a set of functions that accumulates the sampled sine wave inputs, checks for threshold crossing point and calculates the RMS, Average, and EMA values of the input sine wave. This module can also calculate the Frequency of the sine wave and indicate zero (or threshold) crossing point.

This module expects the following key inputs:

  • Voltage in PU (v), Current in PU (i): This is the signal sampled by ADC and ADC result converted to pu format. The offset is subtracted from the reading, hence for a max scale signal the value will vary from -1 to 1.
  • Threshold Value (threshold): Threshold value is used for detecting the cross over of the input signal across the threshold value set, in pu format. By default threshold is set to Zero. Sampling Frequency (sampleFreq): This is set to the Frequency at which the input sine wave is sampled, the sine analyzer block is called.
  • Minimum and maximum number of samples in a sine cycle (nSamplesMin, nSamplesMax): These values are used to discard any noisy samples which can generate erroneous values on rms and avg signal. This module generates the following key outputs:
  • Voltage, Current and Power RMS values (vRms, iRms, pRms): Output reflects the RMS value of the input signal in pu format. RMS value is calculated and updated at every threshold crossover point for the voltage and current, the power RMS value is filtered further to provide a more stable output.
  • Power Factor (powerFactor): This value represents the PF of the input current and voltage signals.
  • AC Frequency (acFreq): This value represents the AC frequency of the input signal.

Features Supported

Power measurements includes calculation of:

  • rms input voltage
  • rms input current
  • rms power
  • power factor
  • zero cross detection
  • AC frequency

Features Not Supported

N/A

Benchmark Results

A benchmark on R5F core has been conducted to observe the following results when running the following functions:

POWER_MEAS Function Cpu Cycles
POWER_MEAS_SINE_ANALYZER_reset 37
POWER_MEAS_SINE_ANALYZER_config 19
POWER_MEAS_SINE_ANALYZER_run 79
  • Ran with TI Clang Compiler v3.2.1.LTS, with -Os flag and functions force-inlined onto the benchmarking function placed in TCM memory. Obtained the average result from 500 consecutive loops of running power_measurements functions with DPL CycleCountP, mimicking the usage of a control loop and overhead (~10 cycles) is removed.
  • Actual result may vary depending on provided datasets and memory configuration. For R5F, it is recommended for users to map control loops to TCM for the best performance.

Provided Examples

The following examples has been provided to demonstrate power measurements module:

Additional References

N/A

API

APIs for Power Measurements Library