AM243x Motor Control SDK  09.02.00
APIs for Field Weakening Control (FWC)

Introduction

Here is the list of FWC function APIs

Files

file  fwc.h
 Contains Field Weakening Control (FWC) functions implementation.
 

Data Structures

struct  FWC_Handle
 Defines the Field Weakening Control (FWC) object. More...
 

Functions

FWC_Handle FWC_init (void *pMemory, const size_t numBytes)
 Initializes the Field Weakening Control (FWC) module. More...
 
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. More...
 
static void FWC_disable (FWC_Handle handle)
 Disables the FWC function. More...
 
static void FWC_enable (FWC_Handle handle)
 Enables the FWC function. More...
 
static float32_tFWC_getCurrentAngle_rad_addr (FWC_Handle handle)
 Gets the stator current phase angle memory address. More...
 
static float32_t FWC_getCurrentAngle_rad (FWC_Handle handle)
 Gets the stator current phase angle value (angleCurrent_rad) More...
 
static bool FWC_getFlagEnable (FWC_Handle handle)
 Gets the enable controller flag value from the FWC. More...
 
static void FWC_setCurrentAngle_rad (FWC_Handle handle, const float32_t angleCurrent_rad)
 Sets the stator current phase angle value. More...
 
static void FWC_setFlagEnable (FWC_Handle handle, const bool flagEnable)
 Sets the enable flag. More...
 
static void FWC_setKi (FWC_Handle handle, const float32_t Ki)
 Sets the integral gain (Ki) value. More...
 
static void FWC_setKp (FWC_Handle handle, const float32_t Kp)
 Sets the proportional gain (Kp) value. More...
 
static void FWC_setGains (FWC_Handle handle, const float32_t Kp, const float32_t Ki)
 Sets the gain values. More...
 
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. More...
 
static void FWC_setAngleMax (FWC_Handle handle, const float32_t angleMax_rad)
 Sets the maximum output values of FWC. More...
 
static void FWC_setAngleMin (FWC_Handle handle, const float32_t angleMin_rad)
 Sets the minimum output values of FWC. More...
 
static void FWC_resetController (FWC_Handle handle)
 
static void FWC_setUi (FWC_Handle handle, const float32_t Ui)
 Sets the integrator start value (Ui) More...
 
static void FWC_computeCurrentAngle (FWC_Handle handle, const float32_t Vs_V, const float32_t VsRef_V)
 Runs the Field Weakening Control (FWC) More...
 

Macros

#define FWC_resetUi   FWC_resetController
 Resets the integrator start value (Ui) More...
 

Macro Definition Documentation

◆ FWC_resetUi

#define FWC_resetUi   FWC_resetController

Resets the integrator start value (Ui)

Parameters
[in]handleThe Field Weakening Control (FWC) handle

Function Documentation

◆ FWC_init()

FWC_Handle FWC_init ( void *  pMemory,
const size_t  numBytes 
)

Initializes the Field Weakening Control (FWC) module.

Note

Parameters
[in]pMemoryA pointer to the memory for the FWC object
[in]numBytesThe number of bytes allocated for the FWC object
Returns
The Field Weakening Control (FWC) object handle

◆ FWC_setParams()

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.

Parameters
[in]handleThe Field Weakening Control (FWC) handle
[in]KpThe Kp gain value
[in]KiThe Ki gain value
[in]angleMin_radThe angle out minimum value
[in]angleMax_radThe angle out maximum value

◆ FWC_disable()

static void FWC_disable ( FWC_Handle  handle)
inlinestatic

Disables the FWC function.

Parameters
[in]handleThe Field Weakening Control (FWC) handle

◆ FWC_enable()

static void FWC_enable ( FWC_Handle  handle)
inlinestatic

Enables the FWC function.

Parameters
[in]handleThe Field Weakening Control (FWC) handle

◆ FWC_getCurrentAngle_rad_addr()

static float32_t* FWC_getCurrentAngle_rad_addr ( FWC_Handle  handle)
inlinestatic

Gets the stator current phase angle memory address.

Parameters
[in]handleThe Field Weakening Control (FWC) handle
Returns
The stator current phase angle memory address

◆ FWC_getCurrentAngle_rad()

static float32_t FWC_getCurrentAngle_rad ( FWC_Handle  handle)
inlinestatic

Gets the stator current phase angle value (angleCurrent_rad)

Parameters
[in]handleThe Field Weakening Control (FWC) handle
Returns
The stator current phase angle value, rad

◆ FWC_getFlagEnable()

static bool FWC_getFlagEnable ( FWC_Handle  handle)
inlinestatic

Gets the enable controller flag value from the FWC.

Parameters
[in]handleThe Field Weakening Control (FWC) handle
Returns
The enable FWC flag value

◆ FWC_setCurrentAngle_rad()

static void FWC_setCurrentAngle_rad ( FWC_Handle  handle,
const float32_t  angleCurrent_rad 
)
inlinestatic

Sets the stator current phase angle value.

Parameters
[in]handleThe Field Weakening Control (FWC) handle
[in]angleCurrent_radThe stator current phase angle value, rad

◆ FWC_setFlagEnable()

static void FWC_setFlagEnable ( FWC_Handle  handle,
const bool  flagEnable 
)
inlinestatic

Sets the enable flag.

Parameters
[in]handleThe Field Weakening Control (FWC) handle
[in]flagEnableThe enable flag

◆ FWC_setKi()

static void FWC_setKi ( FWC_Handle  handle,
const float32_t  Ki 
)
inlinestatic

Sets the integral gain (Ki) value.

Parameters
[in]handleThe Field Weakening Control (FWC) handle
[in]KiThe Ki value

◆ FWC_setKp()

static void FWC_setKp ( FWC_Handle  handle,
const float32_t  Kp 
)
inlinestatic

Sets the proportional gain (Kp) value.

Parameters
[in]handleThe Field Weakening Control (FWC) handle
[in]KpThe Kp value

◆ FWC_setGains()

static void FWC_setGains ( FWC_Handle  handle,
const float32_t  Kp,
const float32_t  Ki 
)
inlinestatic

Sets the gain values.

Parameters
[in]handleThe Field Weakening Control (FWC) handle
[in]KpThe Kp gain value
[in]KiThe Ki gain value

◆ FWC_setAngleMinMax()

static void FWC_setAngleMinMax ( FWC_Handle  handle,
const float32_t  angleMin_rad,
const float32_t  angleMax_rad 
)
inlinestatic

Sets the minimum and maximum output values of FWC.

Parameters
[in]handleThe Field Weakening Control (FWC) handle
[in]angleMin_radThe angle out minimum value
[in]angleMax_radThe angle out maximum value

◆ FWC_setAngleMax()

static void FWC_setAngleMax ( FWC_Handle  handle,
const float32_t  angleMax_rad 
)
inlinestatic

Sets the maximum output values of FWC.

Parameters
[in]handleThe Field Weakening Control (FWC) handle
[in]angleMax_radThe angle out maximum value

◆ FWC_setAngleMin()

static void FWC_setAngleMin ( FWC_Handle  handle,
const float32_t  angleMin_rad 
)
inlinestatic

Sets the minimum output values of FWC.

Parameters
[in]handleThe Field Weakening Control (FWC) handle
[in]angleMin_radThe angle out minimum value

◆ FWC_resetController()

static void FWC_resetController ( FWC_Handle  handle)
inlinestatic

◆ FWC_setUi()

static void FWC_setUi ( FWC_Handle  handle,
const float32_t  Ui 
)
inlinestatic

Sets the integrator start value (Ui)

Parameters
[in]handleThe Field Weakening Control (FWC) handle
[in]UiThe integrator start value

◆ FWC_computeCurrentAngle()

static void FWC_computeCurrentAngle ( FWC_Handle  handle,
const float32_t  Vs_V,
const float32_t  VsRef_V 
)
static

Runs the Field Weakening Control (FWC)

Parameters
[in]handleThe Field Weakening Control (FWC) handle
[in]Vs_VThe output voltage vector, V
[in]VsRef_VThe reference voltage vector, V