Go to the documentation of this file.
68 #define MOTOR_MIN_ELEC_FREQ_Hz 5.0f
69 #define MOTOR_MAX_ELEC_FREQ_Hz 800.0f
70 #define MOTOR_THRESHOLD_VOLTAGE_V 0.20f
165 obj->
VaRms = sqrtf(obj->
VaSum) * invSamplesSqrt;
169 obj->
sf = __fsat(obj->
sfCalc, 0.95f, 0.85f);
233 for(cn = 0; cn < 3; cn++)
372 #endif // end of VOLT_RECONS_H defines
Defines a two element vector.
Definition: math.h:218
static void VOLREC_disableFlagEnableSf(VOLREC_Handle handle)
Disables the SF enable flag.
Definition: volt_recons.h:318
int16_t jitterCount
the jitter count due to noise on input
Definition: volt_recons.h:104
int16_t signCurr
the flag to detect ZCD
Definition: volt_recons.h:103
int32_t minSamples
the sampling points
Definition: volt_recons.h:99
float float32_t
Definition: sfra_f32.h:42
VOLREC_Handle VOLREC_init(void *pMemory, const size_t numBytes)
Initializes the Voltage reconstruct module.
MATH_Vec3 x1
the input value at time sample n=-1
Definition: volt_recons.h:82
float32_t VaSenSum
the square calculation over one sine cycle
Definition: volt_recons.h:92
static void VOLREC_run(VOLREC_Handle handle, float32_t Vdcbus, MATH_Vec3 *pVin, MATH_Vec2 *pVab)
Runs the Phase Voltage reconstruction.
Definition: volt_recons.h:217
Defines the VOLREC controller object.
Definition: volt_recons.h:77
float32_t sfCalc
the scale factor of phase voltage
Definition: volt_recons.h:88
void VOLREC_setParams(VOLREC_Handle handle, const float32_t filterPole_rps, const float32_t ctrlFreq_Hz)
set the Phase Voltage reconstruction parameters
float32_t VaRms
the RMS Value
Definition: volt_recons.h:96
static bool VOLREC_getFlagCalSf(VOLREC_Handle handle)
Gets the SF enable flag.
Definition: volt_recons.h:266
float32_t VaSenRms
the RMS Value
Definition: volt_recons.h:95
#define MATH_ONE_OVER_THREE
Defines 1/3.
Definition: math.h:89
bool flagCalSf
Definition: volt_recons.h:106
float32_t value[3]
Definition: math.h:232
float32_t VaSen
the input Phase voltage phase (V)
Definition: volt_recons.h:91
float32_t sf
the scale factor of phase voltage
Definition: volt_recons.h:87
MATH_Vec3 Vin_V
the input Phase voltage phase (V)
Definition: volt_recons.h:84
MATH_Vec3 y1
the output value at time sample n=-1
Definition: volt_recons.h:83
int32_t maxSamples
the sampling points
Definition: volt_recons.h:100
struct _VOLREC_Obj_ * VOLREC_Handle
Defines the VOLREC_Handle.
Definition: volt_recons.h:114
static void VOLREC_enableFlagCalSf(VOLREC_Handle handle)
Enables the SF enable flag.
Definition: volt_recons.h:300
struct _VOLREC_Obj_ VOLREC_Obj
Defines the VOLREC controller object.
MATH_Vec3 Vs_V
the input Phase voltage phase (V)
Definition: volt_recons.h:85
float32_t threshold
the voltage level corresponding to zero i/p
Definition: volt_recons.h:89
static void VOLREC_calcVolSF(VOLREC_Handle handle, float32_t VaSen)
Runs the Phase Voltage reconstruction.
Definition: volt_recons.h:145
float32_t b1
the numerator filter coefficient value for z^(-1)
Definition: volt_recons.h:81
float32_t b0
the numerator filter coefficient value for z^0
Definition: volt_recons.h:80
int16_t signPrev
the flag to detect ZCD
Definition: volt_recons.h:102
static void VOLREC_setFlagCalSf(VOLREC_Handle handle, const bool flagCalSf)
Sets up the SF enable flag.
Definition: volt_recons.h:282
void VOLREC_reset(VOLREC_Handle handle)
reset the Phase Voltage reconstruction variables
#define MATH_ONE_OVER_SQRT_THREE
Defines 1/sqrt(3)
Definition: math.h:119
int32_t numSamples
the sampling points
Definition: volt_recons.h:98
float32_t VaSum
the square calculation over one sine cycle
Definition: volt_recons.h:93
float32_t a1
the denominator filter coefficient value for z^(-1)
Definition: volt_recons.h:79
float32_t value[2]
Definition: math.h:220
Defines a three element vector.
Definition: math.h:230
Copyright 2023, Texas Instruments Incorporated