3-phase PV router
Loading...
Searching...
No Matches
NewImplementation Struct Reference

Public Member Functions

float getAveragePower () const
 Get average power per sample.
 
int16_t getOffsetAsADC () const
 Get DC offset as ADC value.
 
float getRmsVoltage () const
 Get RMS voltage (relative, not calibrated)
 
void processCurrentRawSample (uint16_t rawSample)
 Process current sample and calculate power (new method)
 
void processMinusHalfCycle ()
 Update DC filter at end of half cycle (new method)
 
void processPolarity (uint16_t rawSample)
 Process voltage sample (new method - left aligned)
 
void processVoltage ()
 Process voltage for RMS calculation (new method)
 
void resetCycle ()
 Reset accumulators for new cycle.
 

Public Attributes

uint16_t i_DCoffset_V { i_DCoffset_V_nom }
 
int16_t i_sampleVminusDC { 0 }
 
uint32_t l_filterDC_V { static_cast< uint32_t >(i_DCoffset_V_nom) << 15 }
 
uint32_t l_sum_Vsquared { 0 }
 
int32_t l_sumP { 0 }
 
int32_t l_sumP_atSupplyPoint { 0 }
 
uint16_t n_samples { 0 }
 

Static Public Attributes

static constexpr uint16_t i_DCoffset_V_nom { 511U << 6 }
 

Detailed Description

Definition at line 149 of file test_main.cpp.

Member Function Documentation

◆ getAveragePower()

float NewImplementation::getAveragePower ( ) const
inline

Get average power per sample.

Definition at line 237 of file test_main.cpp.

◆ getOffsetAsADC()

int16_t NewImplementation::getOffsetAsADC ( ) const
inline

Get DC offset as ADC value.

Definition at line 229 of file test_main.cpp.

◆ getRmsVoltage()

float NewImplementation::getRmsVoltage ( ) const
inline

Get RMS voltage (relative, not calibrated)

Definition at line 245 of file test_main.cpp.

◆ processCurrentRawSample()

void NewImplementation::processCurrentRawSample ( uint16_t rawSample)
inline

Process current sample and calculate power (new method)

Definition at line 179 of file test_main.cpp.

Here is the caller graph for this function:

◆ processMinusHalfCycle()

void NewImplementation::processMinusHalfCycle ( )
inline

Update DC filter at end of half cycle (new method)

Definition at line 212 of file test_main.cpp.

Here is the caller graph for this function:

◆ processPolarity()

void NewImplementation::processPolarity ( uint16_t rawSample)
inline

Process voltage sample (new method - left aligned)

Definition at line 170 of file test_main.cpp.

Here is the caller graph for this function:

◆ processVoltage()

void NewImplementation::processVoltage ( )
inline

Process voltage for RMS calculation (new method)

Definition at line 198 of file test_main.cpp.

Here is the caller graph for this function:

◆ resetCycle()

void NewImplementation::resetCycle ( )
inline

Reset accumulators for new cycle.

Definition at line 220 of file test_main.cpp.

Member Data Documentation

◆ i_DCoffset_V

uint16_t NewImplementation::i_DCoffset_V { i_DCoffset_V_nom }

Definition at line 153 of file test_main.cpp.

◆ i_DCoffset_V_nom

uint16_t NewImplementation::i_DCoffset_V_nom { 511U << 6 }
staticconstexpr

Definition at line 152 of file test_main.cpp.

◆ i_sampleVminusDC

int16_t NewImplementation::i_sampleVminusDC { 0 }

Definition at line 155 of file test_main.cpp.

◆ l_filterDC_V

uint32_t NewImplementation::l_filterDC_V { static_cast< uint32_t >(i_DCoffset_V_nom) << 15 }

Definition at line 154 of file test_main.cpp.

◆ l_sum_Vsquared

uint32_t NewImplementation::l_sum_Vsquared { 0 }

Definition at line 162 of file test_main.cpp.

◆ l_sumP

int32_t NewImplementation::l_sumP { 0 }

Definition at line 158 of file test_main.cpp.

◆ l_sumP_atSupplyPoint

int32_t NewImplementation::l_sumP_atSupplyPoint { 0 }

Definition at line 159 of file test_main.cpp.

◆ n_samples

uint16_t NewImplementation::n_samples { 0 }

Definition at line 165 of file test_main.cpp.


The documentation for this struct was generated from the following file: