![Logo](ti_logo.svg) |
AM243x Motor Control SDK
09.02.00
|
|
Go to the documentation of this file.
56 #include "math_types.h"
63 typedef struct _VOLREC_Obj_
169 obj->
VaRms = sqrtf(obj->
VaSum) * invSamplesSqrt;
173 obj->
sf = MATH_sat(obj->
sfCalc, 0.95f, 0.85f);
220 float32_t Vdcbus, MATH_Vec3 *pVin, MATH_Vec2 *pVab)
229 Vtemp = Vdcbus * MATH_ONE_OVER_THREE;
231 Vin.value[0] = Vtemp * (pVin->value[0] * 2.0f - pVin->value[1] - pVin->value[2]);
232 Vin.value[1] = Vtemp * (pVin->value[1] * 2.0f - pVin->value[0] - pVin->value[2]);
233 Vin.value[2] = Vtemp * (pVin->value[2] * 2.0f - pVin->value[1] - pVin->value[0]);
235 for(cn = 0; cn < 3; cn++)
239 obj->
Vin_V.value[cn] = (obj->
b0 * Vin.value[cn]) +
240 (obj->
b1 * obj->
x1.value[cn]) - (obj->
a1 * obj->
y1.value[cn]);
242 obj->
x1.value[cn] = Vin.value[cn];
244 obj->
y1.value[cn] = obj->
Vin_V.value[cn];
246 obj->
Vs_V.value[cn] = obj->
Vin_V.value[cn] * obj->
sf;
250 pVab->value[0] = (obj->
Vs_V.value[0] * 2.0f -
251 (obj->
Vs_V.value[1] + obj->
Vs_V.value[2])) * MATH_ONE_OVER_THREE;
253 pVab->value[1] = (obj->
Vs_V.value[1] - obj->
Vs_V.value[2]) *
254 MATH_ONE_OVER_SQRT_THREE;
331 #endif // end of VOLT_RECONS_H defines
float32_t a1
the denominator filter coefficient value for z^(-1)
Definition: volt_recons.h:65
MATH_Vec3 Vin_V
the input Phase voltage phase (V)
Definition: volt_recons.h:70
static void VOLREC_setFlagCalSf(VOLREC_Handle handle, const bool flagCalSf)
Sets up the SF enable flag.
Definition: volt_recons.h:284
float32_t sf
the scale factor of phase voltage
Definition: volt_recons.h:73
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:219
static bool VOLREC_getFlagCalSf(VOLREC_Handle handle)
Gets the SF enable flag.
Definition: volt_recons.h:268
int32_t numSamples
the sampling points
Definition: volt_recons.h:84
int32_t jitterCount
the jitter count due to noise on input
Definition: volt_recons.h:90
float32_t b0
the numerator filter coefficient value for z^0
Definition: volt_recons.h:66
int32_t signPrev
the flag to detect ZCD
Definition: volt_recons.h:88
Defines the VOLREC controller object.
Definition: volt_recons.h:64
int32_t minSamples
the sampling points
Definition: volt_recons.h:85
static void VOLREC_enableFlagCalSf(VOLREC_Handle handle)
Enables the SF enable flag.
Definition: volt_recons.h:300
static void VOLREC_disableFlagEnableSf(VOLREC_Handle handle)
Disables the SF enable flag.
Definition: volt_recons.h:316
float32_t sfCalc
the scale factor of phase voltage
Definition: volt_recons.h:74
float32_t VaSum
the square calculation over one sine cycle
Definition: volt_recons.h:79
VOLREC_Handle VOLREC_init(void *pMemory, const size_t numBytes)
Initializes the Voltage reconstruct module.
float32_t b1
the numerator filter coefficient value for z^(-1)
Definition: volt_recons.h:67
float32_t VaRms
the RMS Value
Definition: volt_recons.h:82
MATH_Vec3 x1
the input value at time sample n=-1
Definition: volt_recons.h:68
float32_t VaSen
the input Phase voltage phase (V)
Definition: volt_recons.h:77
float32_t VaSenRms
the RMS Value
Definition: volt_recons.h:81
int32_t maxSamples
the sampling points
Definition: volt_recons.h:86
void VOLREC_setParams(VOLREC_Handle handle, const float32_t filterPole_rps, const float32_t ctrlFreq_Hz)
set the Phase Voltage reconstruction parameters
float32_t threshold
the voltage level corresponding to zero i/p
Definition: volt_recons.h:75
static void VOLREC_calcVolSF(VOLREC_Handle handle, float32_t VaSen)
Runs the Phase Voltage reconstruction.
Definition: volt_recons.h:149
MATH_Vec3 y1
the output value at time sample n=-1
Definition: volt_recons.h:69
float32_t VaSenSum
the square calculation over one sine cycle
Definition: volt_recons.h:78
struct _VOLREC_Obj_ * VOLREC_Handle
Defines the VOLREC_Handle.
Definition: volt_recons.h:100
void VOLREC_reset(VOLREC_Handle handle)
reset the Phase Voltage reconstruction variables
int32_t signCurr
the flag to detect ZCD
Definition: volt_recons.h:89
float float32_t
Definition: dcl_common.h:58
bool flagCalSf
Definition: volt_recons.h:92
MATH_Vec3 Vs_V
the input Phase voltage phase (V)
Definition: volt_recons.h:71