Data Structures | |
| struct | POWER_MEAS_SINE_ANALYZER |
| Defines the POWER_MEAS_SINE_ANALYZER structure. More... | |
Functions | |
| static void | POWER_MEAS_SINE_ANALYZER_reset (POWER_MEAS_SINE_ANALYZER *v) |
| Resets internal data to zero. More... | |
| static void | POWER_MEAS_SINE_ANALYZER_config (POWER_MEAS_SINE_ANALYZER *v, float32_t isrFrequency, float32_t threshold, float32_t gridMaxFreq, float32_t gridMinFreq) |
| Configures the power measurment module. More... | |
| static void | POWER_MEAS_SINE_ANALYZER_run (POWER_MEAS_SINE_ANALYZER *v) |
| Perform calculations using the POWER_MEAS_SINE_ANALYZER module. More... | |
Typedefs | |
| typedef float | float32_t |
| typedef long double | float64_t |
Macros | |
| #define | C2000_IEEE754_TYPES |
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:
The following is a sequence of steps that can be followed to use the POWER_MEAS_SINE_ANALYZER API library functions in an existing C program. For a set of code examples that illustrates the use of this library, see the examples in the Digial Power SDK.
Before you can using the library you must add the libraries directory path as a searchable directory in the project include options. This can be done by right-clicking on the project in the Project Explorer window, selecting "Properties". In the window that opens, navigate to "Build, C2000 Compiler, Include Options". In the include path
window, click on the green add directory path button on the right and enter the path to the Digital Power SDK libraries directory.
This allows CCS to search the entire directory for library files.
Once that is done you should follow these steps incorporate this library into your project:
There is only one module in this package, the APIs can be referenced at POWER_MEAS_SINE_ANALYZER. The module headers are located at power_meas_sine_analyzer.h.
| #define C2000_IEEE754_TYPES |
Definition at line 49 of file power_meas_sine_analyzer.h.
| typedef float float32_t |
Definition at line 54 of file power_meas_sine_analyzer.h.
| typedef long double float64_t |
Definition at line 55 of file power_meas_sine_analyzer.h.
|
inlinestatic |
Resets internal data to zero.
| *v | The POWER_MEAS_SINE_ANALYZER structure pointer |
Definition at line 106 of file power_meas_sine_analyzer.h.
|
inlinestatic |
Configures the power measurment module.
| *v | The POWER_MEAS_SINE_ANALYZER structure pointer |
| isrFrequency | Frequency at which SPLL module is run |
| threshold | Threshold value to avoid zero crossing issues |
| gridMaxFreq | Max grid frequency |
| gridMinFreq | Min grid frequency |
Definition at line 146 of file power_meas_sine_analyzer.h.
|
inlinestatic |
Perform calculations using the POWER_MEAS_SINE_ANALYZER module.
| *v | The POWER_MEAS_SINE_ANALYZER structure pointer |
Definition at line 163 of file power_meas_sine_analyzer.h.