Go to the documentation of this file.
66 #ifdef __TMS320C28XX_CLA__
67 #include "libraries/math/include/CLAmath.h"
static void FWC_disable(FWC_Handle handle)
Disables the FWC function.
Definition: fwc.h:102
static float32_t * FWC_getCurrentAngle_rad_addr(FWC_Handle handle)
Gets the stator current phase angle memory address.
Definition: fwc.h:127
static void FWC_enable(FWC_Handle handle)
Enables the FWC function.
Definition: fwc.h:114
static bool FWC_getFlagEnable(FWC_Handle handle)
Gets the enable controller flag value from the FWC.
Definition: fwc.h:149
struct _FWC_Obj_ * FWC_Handle
Defines the FWC handle.
Definition: fwc.h:93
float32_t angleCurrent_rad
the stator current phase angle
Definition: fwc.h:84
float float32_t
Definition: sfra_f32.h:42
static void PI_setUi(PI_Handle handle, const float32_t Ui)
Sets the integrator start value in the PI controller.
Definition: pi.h:506
static void PI_setKi(PI_Handle handle, const float32_t Ki)
Sets the integral gain in the PI controller.
Definition: pi.h:376
static void FWC_setKp(FWC_Handle handle, const float32_t Kp)
Sets the proportional gain (Kp) value.
Definition: fwc.h:198
#define MATH_PI_OVER_TWO
Defines pi/2.
Definition: math.h:182
static void FWC_setAngleMinMax(FWC_Handle handle, const float32_t angleMin_rad, const float32_t angleMax_rad)
Sets the minimum and maximum output values of FWC.
Definition: fwc.h:227
static void FWC_setUi(FWC_Handle handle, const float32_t Ui)
Sets the integrator start value (Ui)
Definition: fwc.h:272
void FWC_setParams(FWC_Handle handle, const float32_t Kp, const float32_t Ki, const float32_t angleMin_rad, const float32_t angleMax_rad)
Sets the Field Weakening Control (FWC) module parmaeters.
static void PI_setOutMin(PI_Handle handle, const float32_t outMin)
Sets the minimum output value allowed in the PI controller.
Definition: pi.h:464
static void FWC_setFlagEnable(FWC_Handle handle, const bool flagEnable)
Sets the enable flag.
Definition: fwc.h:172
struct _FWC_Obj_ FWC_Obj
Defines the Field Weakening Control (FWC) object.
PI_Handle piHandle
the handle for the fwc angle PI controller
Definition: fwc.h:81
static void FWC_setGains(FWC_Handle handle, const float32_t Kp, const float32_t Ki)
Sets the gain values.
Definition: fwc.h:211
static void FWC_setAngleMax(FWC_Handle handle, const float32_t angleMax_rad)
Sets the maximum output values of FWC.
Definition: fwc.h:243
bool flagEnable
a flag to enable the controller
Definition: fwc.h:85
static void PI_setKp(PI_Handle handle, const float32_t Kp)
Sets the proportional gain in the PI controller.
Definition: pi.h:397
FWC_Handle cla_FWC_init(void *pMemory, const size_t numBytes)
Defines the PI controller object.
Definition: pi.h:73
static void FWC_setCurrentAngle_rad(FWC_Handle handle, const float32_t angleCurrent_rad)
Sets the stator current phase angle value.
Definition: fwc.h:159
FWC_Handle FWC_init(void *pMemory, const size_t numBytes)
Initializes the Field Weakening Control (FWC) module.
Defines the Field Weakening Control (FWC) object.
Definition: fwc.h:79
static void FWC_resetUi(FWC_Handle handle)
Resets the integrator start value (Ui)
Definition: fwc.h:258
static void FWC_computeCurrentAngle(FWC_Handle handle, const float32_t Vs_V, const float32_t VsRef_V)
Runs the Field Weakening Control (FWC)
Definition: fwc.h:308
PI_Obj pi
the fwc angle PI controller object
Definition: fwc.h:82
static void PI_setMinMax(PI_Handle handle, const float32_t outMin, const float32_t outMax)
Sets the minimum and maximum output value allowed in the PI controller.
Definition: pi.h:421
static float32_t FWC_getCurrentAngle_rad(FWC_Handle handle)
Gets the stator current phase angle value (angleCurrent_rad)
Definition: fwc.h:138
static void FWC_setKi(FWC_Handle handle, const float32_t Ki)
Sets the integral gain (Ki) value.
Definition: fwc.h:185
static void PI_run_series(PI_Handle handle, const float32_t refValue, const float32_t fbackValue, const float32_t ffwdValue, float32_t *pOutValue)
Runs the series form of the PI controller.
Definition: pi.h:588
Copyright 2023, Texas Instruments Incorporated