This example demonstrates capability of power measurements library. In this ramp generator is used to create ramp signal and with sine function, a sine wave of 50Hz frequency is generated. This genrated sine wave with amplitude multiplication[10] provided as one of input (v) and same sine wave with 45deg phase shift and another amplitude multiplication[5] provided as another input (i) for power measurement library. In this example input voltage rms, input current rms and power factor are calculated and printed on console using power measurements library.
Folder/Files | Description |
---|---|
power_measurements_main.c | Main function for power measurements library testing |
power_meas_sine_analyzer.h | power measurement library header file |
rampgen.h | rampgen library header file |
powermeas.syscfg | DAC configuration as per test usage |
Parameter | Value |
---|---|
CPU + OS | r5fss0-0 nortos |
r5fss0-0 freertos | |
Toolchain | ti-arm-clang |
Boards | am263x-cc |
Example folder | examples/power_measurements |
Shown below is a sample output when the application is run :
Sine input(sinwt) generated provided is shown in figure:
Power factor need to be 0.707 (cos45deg) as 45deg phase shift is introduced while providing voltage(10*sinwt) and current(5*sin(wt+45deg)) waveform.