MotorWare f2806x Module API Documentation
Functions
CTRL

Functions

void CTRL_addVdq_offset (CTRL_Handle handle)
 Adds the Vdq offset to the Vdq values. More...
 
uint_least16_t CTRL_getCount_current (CTRL_Handle handle)
 Gets the current loop count. More...
 
uint_least16_t CTRL_getCount_isr (CTRL_Handle handle)
 Gets the isr count. More...
 
uint_least16_t CTRL_getCount_speed (CTRL_Handle handle)
 Gets the speed loop count. More...
 
uint_least32_t CTRL_getCount_state (CTRL_Handle handle)
 Gets the state count. More...
 
uint_least16_t CTRL_getCount_traj (CTRL_Handle handle)
 Gets the trajectory loop count. More...
 
uint_least32_t CTRL_getCtrlFreq (CTRL_Handle handle)
 Gets the controller execution frequency. More...
 
float_t CTRL_getCtrlPeriod_sec (CTRL_Handle handle)
 Gets the controller execution period. More...
 
CTRL_ErrorCode_e CTRL_getErrorCode (CTRL_Handle handle)
 Gets the error code from the controller (CTRL) object. More...
 
EST_Handle CTRL_getEstHandle (CTRL_Handle handle)
 Gets the estimator handle for a given controller. More...
 
static _iq CTRL_getFbackValue_spd_pu (CTRL_Handle handle)
 Gets the feedback value for the speed controller. More...
 
bool CTRL_getFlag_enableCtrl (CTRL_Handle handle)
 Gets the enable controller flag value from the estimator. More...
 
bool CTRL_getFlag_enableCurrentCtrl (CTRL_Handle handle)
 Gets the enable current controllers flag value from the controller. More...
 
bool CTRL_getFlag_enableDcBusComp (CTRL_Handle handle)
 Gets the enable DC bus compensation flag value from the estimator. More...
 
bool CTRL_getFlag_enablePowerWarp (CTRL_Handle handle)
 Gets the PowerWarp enable flag value from the estimator. More...
 
bool CTRL_getFlag_enableOffset (CTRL_Handle handle)
 Gets the enable offset flag value from the controller. More...
 
bool CTRL_getFlag_enableSpeedCtrl (CTRL_Handle handle)
 Gets the enable speed control flag value from the controller. More...
 
bool CTRL_getFlag_enableUserMotorParams (CTRL_Handle handle)
 Gets the enable user motor parameters flag value from the controller. More...
 
void CTRL_getGains (CTRL_Handle handle, const CTRL_Type_e ctrlType, _iq *pKp, _iq *pKi, _iq *pKd)
 Gets the gain values for the specified controller. More...
 
void CTRL_getIab_filt_pu (CTRL_Handle handle, MATH_vec2 *pIab_filt_pu)
 Gets the alpha/beta filtered current vector values from the controller. More...
 
MATH_vec2CTRL_getIab_filt_addr (CTRL_Handle handle)
 Gets the alpha/beta filtered current vector memory address from the controller. More...
 
MATH_vec2CTRL_getIab_in_addr (CTRL_Handle handle)
 Gets the alpha/beta current input vector memory address from the controller. More...
 
void CTRL_getIab_in_pu (CTRL_Handle handle, MATH_vec2 *pIab_in_pu)
 Gets the alpha/beta current input vector values from the controller. More...
 
_iq CTRL_getId_in_pu (CTRL_Handle handle)
 Gets the direct current input value from the controller. More...
 
_iq CTRL_getId_ref_pu (CTRL_Handle handle)
 Gets the direct current (Id) reference value from the controller. More...
 
MATH_vec2CTRL_getIdq_in_addr (CTRL_Handle handle)
 Gets the direct/quadrature current input vector memory address from the controller. More...
 
void CTRL_getIdq_in_pu (CTRL_Handle handle, MATH_vec2 *pIdq_in_pu)
 Gets the direct/quadrature current input vector values from the controller. More...
 
void CTRL_getIdq_ref_pu (CTRL_Handle handle, MATH_vec2 *pIdq_ref_pu)
 Gets the direct/quadrature current reference vector values from the controller. More...
 
static _iq CTRL_getId_offset_pu (CTRL_Handle handle)
 Gets the direct current (Id) offset value from the controller. More...
 
_iq CTRL_getIdRated_pu (CTRL_Handle handle)
 Gets the Id rated current value from the controller. More...
 
_iq CTRL_getIq_in_pu (CTRL_Handle handle)
 Gets the quadrature current input value from the controller. More...
 
static _iq CTRL_getIq_offset_pu (CTRL_Handle handle)
 Gets the quadrature current (Iq) offset value from the controller. More...
 
_iq CTRL_getIq_ref_pu (CTRL_Handle handle)
 Gets the quadrature current (Iq) reference value from the controller. More...
 
static _iq CTRL_getRefValue_Iq_pu (CTRL_Handle handle)
 Gets the reference value for the Iq current controller. More...
 
static _iqCTRL_getIq_ref_pu_addr (CTRL_Handle handle)
 Gets the quadrature current (Iq) reference memory address from the controller. More...
 
_iq CTRL_getKi (CTRL_Handle handle, const CTRL_Type_e ctrlType)
 Gets the integral gain (Ki) value from the specified controller. More...
 
_iq CTRL_getKd (CTRL_Handle handle, const CTRL_Type_e ctrlType)
 Gets the derivative gain (Kd) value from the specified controller. More...
 
_iq CTRL_getKp (CTRL_Handle handle, const CTRL_Type_e ctrlType)
 Gets the proportional gain (Kp) value from the specified controller. More...
 
float_t CTRL_getLhf (CTRL_Handle handle)
 Gets the high frequency inductance (Lhf) value from the controller. More...
 
_iq CTRL_getMagCurrent_pu (CTRL_Handle handle)
 Gets the magnetizing current value from the controller. More...
 
_iq CTRL_getMaxVsMag_pu (CTRL_Handle handle)
 Gets the maximum voltage vector. More...
 
_iq CTRL_getMaximumSpeed_pu (CTRL_Handle handle)
 Gets the maximum speed value from the controller. More...
 
float_t CTRL_getMotorRatedFlux (CTRL_Handle handle)
 Gets the motor rated flux from the controller. More...
 
MOTOR_Type_e CTRL_getMotorType (CTRL_Handle handle)
 Gets the motor type from the controller. More...
 
uint_least16_t CTRL_getNumCtrlTicksPerCurrentTick (CTRL_Handle handle)
 Gets the number of controller clock ticks per current controller clock tick. More...
 
uint_least16_t CTRL_getNumCtrlTicksPerSpeedTick (CTRL_Handle handle)
 Gets the number of controller clock ticks per speed controller clock tick. More...
 
uint_least16_t CTRL_getNumCtrlTicksPerTrajTick (CTRL_Handle handle)
 Gets the number of controller clock ticks per trajectory clock tick. More...
 
uint_least16_t CTRL_getNumIsrTicksPerCtrlTick (CTRL_Handle handle)
 Gets the number of Interrupt Service Routine (ISR) clock ticks per controller clock tick. More...
 
_iq CTRL_getRefValue_pu (CTRL_Handle handle, const CTRL_Type_e ctrlType)
 Gets the reference value from the specified controller. More...
 
static _iq CTRL_getRefValue_Id_pu (CTRL_Handle handle)
 Gets the reference value for the Id current controller. More...
 
static _iq CTRL_getRefValue_spd_pu (CTRL_Handle handle)
 Gets the reference value for the speed controller. More...
 
float_t CTRL_getRhf (CTRL_Handle handle)
 Gets the high frequency resistance (Rhf) value from the controller. More...
 
float_t CTRL_getRoverL (CTRL_Handle handle)
 Gets the R/L value from the controller. More...
 
_iq CTRL_getSpd_max_pu (CTRL_Handle handle)
 Gets the maximum speed value from the controller. More...
 
_iqCTRL_getSpd_out_addr (CTRL_Handle handle)
 Gets the output speed memory address from the controller. More...
 
_iq CTRL_getSpd_out_pu (CTRL_Handle handle)
 Gets the output speed value from the controller. More...
 
_iq CTRL_getSpd_ref_pu (CTRL_Handle handle)
 Gets the output speed reference value from the controller. More...
 
_iq CTRL_getSpd_int_ref_pu (CTRL_Handle handle)
 Gets the output speed intermediate reference value from the controller. More...
 
static _iq CTRL_getSpeed_outMax_pu (CTRL_Handle handle)
 Gets the maximum output value for the speed controller. More...
 
CTRL_State_e CTRL_getState (CTRL_Handle handle)
 Gets the controller state. More...
 
uint_least32_t CTRL_getTrajFreq (CTRL_Handle handle)
 Gets the trajectory execution frequency. More...
 
_iq CTRL_getTrajPeriod_sec (CTRL_Handle handle)
 Gets the trajectory execution period. More...
 
void CTRL_getTrajStep (CTRL_Handle handle)
 Gets the trajectory step size. More...
 
_iq CTRL_getUi (CTRL_Handle handle, const CTRL_Type_e ctrlType)
 Gets the integrator (Ui) value from the specified controller. More...
 
MATH_vec2CTRL_getVab_in_addr (CTRL_Handle handle)
 Gets the alpha/beta voltage input vector memory address from the controller. More...
 
void CTRL_getVab_in_pu (CTRL_Handle handle, MATH_vec2 *pVab_in_pu)
 Gets the alpha/beta voltage input vector values from the controller. More...
 
MATH_vec2CTRL_getVab_out_addr (CTRL_Handle handle)
 Gets the alpha/beta voltage output vector memory address from the controller. More...
 
void CTRL_getVab_out_pu (CTRL_Handle handle, MATH_vec2 *pVab_out_pu)
 Gets the alpha/beta voltage output vector values from the controller. More...
 
_iqCTRL_getVd_out_addr (CTRL_Handle handle)
 Gets the direct voltage output value memory address from the controller. More...
 
_iq CTRL_getVd_out_pu (CTRL_Handle handle)
 Gets the direct voltage output value from the controller. More...
 
MATH_vec2CTRL_getVdq_out_addr (CTRL_Handle handle)
 Gets the direct/quadrature voltage output vector memory address from the controller. More...
 
void CTRL_getVdq_out_pu (CTRL_Handle handle, MATH_vec2 *pVdq_out_pu)
 Gets the direct/quadrature voltage output vector values from the controller. More...
 
void CTRL_getVersion (CTRL_Handle handle, CTRL_Version *pVersion)
 Gets the controller version number. More...
 
_iqCTRL_getVq_out_addr (CTRL_Handle handle)
 Gets the quadrature voltage output value memory address from the controller. More...
 
_iq CTRL_getVq_out_pu (CTRL_Handle handle)
 Gets the quadrature voltage output value from the controller. More...
 
uint_least32_t CTRL_getWaitTime (CTRL_Handle handle, const CTRL_State_e ctrlState)
 Gets the wait time for a given state. More...
 
void CTRL_getWaitTimes (CTRL_Handle handle, uint_least32_t *pWaitTimes)
 Gets the wait times from the estimator. More...
 
void CTRL_incrCounter_current (CTRL_Handle handle)
 Increments the current counter. More...
 
void CTRL_incrCounter_isr (CTRL_Handle handle)
 Increments the isr counter. More...
 
void CTRL_incrCounter_speed (CTRL_Handle handle)
 Increments the speed counter. More...
 
void CTRL_incrCounter_state (CTRL_Handle handle)
 Increments the state counter. More...
 
void CTRL_incrCounter_traj (CTRL_Handle handle)
 Increments the trajectory counter. More...
 
CTRL_Handle CTRL_initCtrl (const uint_least8_t estNumber, void *pMemory, const size_t numBytes)
 Initializes a specified controller. More...
 
bool CTRL_isError (CTRL_Handle handle)
 Determines if there is a controller error. More...
 
void CTRL_resetCounter_current (CTRL_Handle handle)
 Resets the current counter. More...
 
void CTRL_resetCounter_isr (CTRL_Handle handle)
 Resets the isr counter. More...
 
void CTRL_resetCounter_speed (CTRL_Handle handle)
 Resets the speed counter. More...
 
void CTRL_resetCounter_state (CTRL_Handle handle)
 Resets the state counter. More...
 
void CTRL_resetCounter_traj (CTRL_Handle handle)
 Resets the trajectory counter. More...
 
void CTRL_run (CTRL_Handle handle, HAL_Handle halHandle, const HAL_AdcData_t *pAdcData, HAL_PwmData_t *pPwmData)
 Runs the controller. More...
 
void CTRL_runTraj (CTRL_Handle handle)
 Runs the trajectory. More...
 
static void CTRL_setAngle_pu (CTRL_Handle handle, const _iq angle_pu)
 Sets the angle value, pu. More...
 
void CTRL_setCtrlFreq_Hz (CTRL_Handle handle, const uint_least32_t ctrlFreq_Hz)
 Sets the controller frequency. More...
 
void CTRL_setCtrlPeriod_sec (CTRL_Handle handle, const float_t ctrlPeriod_sec)
 Sets the controller execution period. More...
 
void CTRL_setErrorCode (CTRL_Handle handle, const CTRL_ErrorCode_e errorCode)
 Sets the error code in the controller. More...
 
void CTRL_setEstParams (EST_Handle estHandle, USER_Params *pUserParams)
 Sets the default estimator parameters. More...
 
void CTRL_setFlag_enableCtrl (CTRL_Handle handle, const bool state)
 Sets the enable controller flag value in the estimator. More...
 
static void CTRL_setFlag_enableCurrentCtrl (CTRL_Handle handle, const bool state)
 Sets the enable current controllers flag value in the controller. More...
 
void CTRL_setFlag_enableDcBusComp (CTRL_Handle handle, const bool state)
 Sets the enable DC bus compensation flag value in the estimator. More...
 
void CTRL_setFlag_enablePowerWarp (CTRL_Handle handle, const bool state)
 Sets the PowerWarp enable flag value in the estimator. More...
 
void CTRL_setFlag_enableOffset (CTRL_Handle handle, const bool state)
 Sets the enable offset flag value in the estimator. More...
 
void CTRL_setFlag_enableSpeedCtrl (CTRL_Handle handle, const bool state)
 Sets the enable speed control value in the estimator. More...
 
void CTRL_setFlag_enableUserMotorParams (CTRL_Handle handle, const bool state)
 Sets the enable user motor parameters flag value in the estimator. More...
 
void CTRL_setGains (CTRL_Handle handle, const CTRL_Type_e ctrlType, const _iq Kp, const _iq Ki, const _iq Kd)
 Sets the gain values for the specified controller. More...
 
void CTRL_setIab_in_pu (CTRL_Handle handle, const MATH_vec2 *pIab_in_pu)
 Sets the alpha/beta current (Iab) input vector values in the controller. More...
 
void CTRL_setIab_filt_pu (CTRL_Handle handle, const MATH_vec2 *pIab_filt_pu)
 Sets the alpha/beta filtered current vector values in the controller. More...
 
void CTRL_setId_ref_pu (CTRL_Handle handle, const _iq Id_ref_pu)
 Sets the direct current (Id) reference value in the controller. More...
 
void CTRL_setIdq_in_pu (CTRL_Handle handle, const MATH_vec2 *pIdq_in_pu)
 Sets the direct/quadrature current (Idq) input vector values in the controller. More...
 
static void CTRL_setIdq_offset_pu (CTRL_Handle handle, const MATH_vec2 *pIdq_offset_pu)
 Sets the direct/quadrature current (Idq) offset vector values in the controller. More...
 
void CTRL_setIdq_ref_pu (CTRL_Handle handle, const MATH_vec2 *pIdq_ref_pu)
 Sets the direct/quadrature current (Idq) reference vector values in the controller. More...
 
void CTRL_setIdRated_pu (CTRL_Handle handle, const _iq IdRated_pu)
 Sets the Id rated current value in the controller. More...
 
static void CTRL_setImmediateUi (CTRL_Handle handle, const CTRL_Type_e ctrlType, const _iq Ui)
 Sets the integrator (Ui) value in the specified controller immediately. More...
 
void CTRL_setIq_ref_pu (CTRL_Handle handle, const _iq IqRef_pu)
 Sets the quadrature current (Iq) reference value in the controller. More...
 
void CTRL_setKd (CTRL_Handle handle, const CTRL_Type_e ctrlType, const _iq Kd)
 Sets the derivative gain (Kd) value for the specified controller. More...
 
void CTRL_setKi (CTRL_Handle handle, const CTRL_Type_e ctrlType, const _iq Ki)
 Sets the integral gain (Ki) value for the specified controller. More...
 
void CTRL_setKp (CTRL_Handle handle, const CTRL_Type_e ctrlType, const _iq Kp)
 Sets the proportional gain (Kp) value for the specified controller. More...
 
void CTRL_setLhf (CTRL_Handle handle, const float_t Lhf)
 Sets the high frequency inductance (Lhf) value in the controller. More...
 
void CTRL_setMagCurrent_pu (CTRL_Handle handle, const _iq magCurrent_pu)
 Sets the magnetizing current value in the controller. More...
 
void CTRL_setMaxVsMag_pu (CTRL_Handle handle, const _iq maxVsMag)
 Sets the maximum voltage vector in the controller. More...
 
void CTRL_setMaxAccel_pu (CTRL_Handle handle, const _iq maxAccel_pu)
 Sets the maximum acceleration of the speed controller. More...
 
void CTRL_setMaximumSpeed_pu (CTRL_Handle handle, const _iq maxSpeed_pu)
 Sets the maximum speed value in the controller. More...
 
void CTRL_setMotorParams (CTRL_Handle handle, const MOTOR_Type_e motorType, const uint_least16_t numPolePairs, const float_t ratedFlux, const float_t Ls_d, const float_t Ls_q, const float_t Rr, const float_t Rs)
 Sets the parameters for the motor in the controller. More...
 
void CTRL_setParams (CTRL_Handle handle, USER_Params *pUserParams)
 Sets the controller parameters. More...
 
void CTRL_setNumCtrlTicksPerCurrentTick (CTRL_Handle handle, const uint_least16_t numCtrlTicksPerCurrentTick)
 Sets the number of controller clock ticks per current controller clock tick. More...
 
void CTRL_setNumCtrlTicksPerSpeedTick (CTRL_Handle handle, const uint_least16_t numCtrlTicksPerSpeedTick)
 Sets the number of controller clock ticks per speed controller clock tick. More...
 
void CTRL_setNumCtrlTicksPerTrajTick (CTRL_Handle handle, const uint_least16_t numCtrlTicksPerTrajTick)
 Sets the number of controller clock ticks per trajectory clock tick. More...
 
void CTRL_setNumIsrTicksPerCtrlTick (CTRL_Handle handle, const uint_least16_t numIsrTicksPerCtrlTick)
 Sets the number of Interrupt Service Routine (ISR) clock ticks per controller clock tick. More...
 
void CTRL_setRhf (CTRL_Handle handle, const float_t Rhf)
 Sets the high frequency resistance (Rhf) value in the controller. More...
 
void CTRL_setRoverL (CTRL_Handle handle, const float_t RoverL)
 Sets the R/L value in the controller. More...
 
static void CTRL_setSpeed_fb_pu (CTRL_Handle handle, const _iq speed_fb_pu)
 Sets the feedback speed value in the controller. More...
 
void CTRL_setSpd_max_pu (CTRL_Handle handle, const _iq maxSpd_pu)
 Sets the maximum speed value in the controller. More...
 
void CTRL_setSpd_out_pu (CTRL_Handle handle, const _iq spd_out_pu)
 Sets the output speed value in the controller. More...
 
static void CTRL_setSpeed_outMax_pu (CTRL_Handle handle, const _iq speed_outMax_pu)
 Sets the maximum output value for the speed controller. More...
 
static void CTRL_setSpeed_ref_pu (CTRL_Handle handle, const _iq speed_ref_pu)
 Sets the output speed reference value in the controller. More...
 
void CTRL_setSpd_ref_pu (CTRL_Handle handle, const _iq spd_ref_pu)
 Sets the output speed reference value in the controller. More...
 
void CTRL_setSpd_ref_krpm (CTRL_Handle handle, const _iq spd_ref_krpm)
 Sets the output speed reference value in the controller. More...
 
void CTRL_setState (CTRL_Handle handle, const CTRL_State_e state)
 Sets the controller state. More...
 
void CTRL_setTrajFreq_Hz (CTRL_Handle handle, const uint_least32_t trajFreq_Hz)
 Sets the trajectory execution frequency. More...
 
void CTRL_setTrajPeriod_sec (CTRL_Handle handle, const _iq trajPeriod_sec)
 Sets the trajectory execution period. More...
 
void CTRL_setUi (CTRL_Handle handle, const CTRL_Type_e ctrlType, const _iq Ui)
 Sets the integrator (Ui) value in the specified controller. More...
 
void CTRL_setupClarke_I (CTRL_Handle handle, uint_least8_t numCurrentSensors)
 Sets the number of current sensors. More...
 
void CTRL_setupClarke_V (CTRL_Handle handle, uint_least8_t numVoltageSensors)
 Sets the number of voltage sensors. More...
 
void CTRL_setupEstIdleState (CTRL_Handle handle)
 Sets up the controller and trajectory generator for the estimator idle state. More...
 
void CTRL_setupEstOnLineState (CTRL_Handle handle)
 Sets up the controller and trajectory generator for the estimator online state. More...
 
void CTRL_setup_user (CTRL_Handle handle, const _iq angle_pu, const _iq speed_ref_pu, const _iq speed_fb_pu, const _iq speed_outMax_pu, const MATH_vec2 *pIdq_offset_pu, const MATH_vec2 *pVdq_offset_pu, const bool flag_enableSpeedCtrl, const bool flag_enableCurrentCtrl)
 Sets up the speed and current controllers. More...
 
void CTRL_setUserMotorParams (CTRL_Handle handle)
 Sets the controller and estimator with motor parameters from the user.h file. More...
 
void CTRL_setVab_in_pu (CTRL_Handle handle, const MATH_vec2 *pVab_in_pu)
 Sets the alpha/beta voltage input vector values in the controller. More...
 
void CTRL_setVab_out_pu (CTRL_Handle handle, const MATH_vec2 *pVab_out_pu)
 Sets the alpha/beta current output vector values in the controller. More...
 
static void CTRL_setVdq_offset_pu (CTRL_Handle handle, const MATH_vec2 *pVdq_offset_pu)
 Sets the direct/quadrature voltage (Vdq) offset vector values in the controller. More...
 
void CTRL_setVdq_out_pu (CTRL_Handle handle, const MATH_vec2 *pVdq_out_pu)
 Sets the direct/quadrature voltage output vector values in the controller. More...
 
void CTRL_setWaitTimes (CTRL_Handle handle, const uint_least32_t *pWaitTimes)
 Sets the wait times for the controller states. More...
 
void CTRL_setup (CTRL_Handle handle)
 Sets up the controller (CTRL) object and all of the subordinate objects. More...
 
void CTRL_setupCtrl (CTRL_Handle handle)
 Sets up the controllers. More...
 
void CTRL_setupEst (CTRL_Handle handle)
 Sets up the estimator (CTRL) object. More...
 
void CTRL_setupTraj (CTRL_Handle handle)
 Sets up the trajectory (TRAJ) object. More...
 
bool CTRL_updateState (CTRL_Handle handle)
 Updates the controller state. More...
 
bool CTRL_useZeroIq_ref (CTRL_Handle handle)
 Determines if a zero Iq current reference should be used in the controller. More...
 
void CTRL_checkForErrors (CTRL_Handle handle)
 Checks for any controller errors and, if found, sets the controller state to the error state. More...
 
static void CTRL_computeOutputLimits_Id (CTRL_Handle handle, const _iq maxVsMag, _iq *outMin, _iq *outMax)
 Computes the Id controller output limits. More...
 
static void CTRL_computeOutputLimits_Iq (CTRL_Handle handle, const _iq maxVsMag, const _iq Vd_out_pu, _iq *outMin, _iq *outMax)
 Computes the Iq controller output limits. More...
 
void CTRL_computePhasor (const _iq angle_pu, MATH_vec2 *pPhasor)
 Computes a phasor for a given angle. More...
 
bool CTRL_doCurrentCtrl (CTRL_Handle handle)
 Determines if the current controllers should be run. More...
 
bool CTRL_doSpeedCtrl (CTRL_Handle handle)
 Determines if the speed controller should be executed. More...
 
void CTRL_runOffLine (CTRL_Handle handle, HAL_Handle halHandle, const HAL_AdcData_t *pAdcData, HAL_PwmData_t *pPwmData)
 Runs the offline controller. More...
 
void CTRL_setSpdMax (CTRL_Handle handle, const _iq spdMax)
 Sets maximum speed controller output. More...
 
_iq CTRL_angleDelayComp (CTRL_Handle handle, const _iq angle_pu)
 Runs angle delay compensation. More...
 
void CTRL_runOnLine (CTRL_Handle handle, const HAL_AdcData_t *pAdcData, HAL_PwmData_t *pPwmData)
 Runs the online controller. More...
 
void CTRL_runOnLine_User (CTRL_Handle handle, const HAL_AdcData_t *pAdcData, HAL_PwmData_t *pPwmData)
 Runs the online user controller. More...
 
void CTRL_runPiOnly (CTRL_Handle handle)
 Runs the online controller. More...
 
void CTRL_run (CTRL_Handle handle, HAL_Handle halHandle, const HAL_AdcData_t *pAdcData, HAL_PwmData_t *pPwmData, uint32_t electricalAngle)
 Runs the controller. More...
 
void CTRL_runOnLine_User (CTRL_Handle handle, const HAL_AdcData_t *pAdcData, HAL_PwmData_t *pPwmData, uint32_t electricalAngle)
 Runs the online user controller. More...
 
static void CTRL_computePhasor (const float_t angle_rad, MATH_vec2 *pPhasor)
 Computes a phasor for a given angle. More...
 
static void CTRL_disable (CTRL_Handle handle)
 Disables the controller. More...
 
static void CTRL_enable (CTRL_Handle handle)
 Enables the controller. More...
 
static float_t CTRL_getBWc_rps (CTRL_Handle handle)
 Gets the current controller bandwidth. More...
 
static float_t CTRL_getBWdelta (CTRL_Handle handle)
 Gets the bandwidth scale factor used to maximize phase margin. More...
 
static float_t CTRL_getKctrl_Wb_p_kgm2 (CTRL_Handle handle)
 Gets the speed controller constant. More...
 
static float_t CTRL_getVd_sf (CTRL_Handle handle)
 Gets the direct voltage scale factor. More...
 
static float_t CTRL_getMaxVsMag_V (CTRL_Handle handle)
 Gets the maximum stator voltage magnitude value. More...
 
static void CTRL_computeOutputLimits_Id (CTRL_Handle handle, float_t *outMin, float_t *outMax)
 Computes the Id controller output limits. More...
 
static void CTRL_computeOutputLimits_Iq (CTRL_Handle handle, const float_t Vd_out_V, float_t *outMin, float_t *outMax)
 Computes the Iq controller output limits. More...
 
static float_t CTRL_getCtrlFreq_Hz (CTRL_Handle handle)
 Gets the controller execution frequency. More...
 
static float_t CTRL_getCurrentCtrlPeriod_sec (CTRL_Handle handle)
 Gets the current controller period. More...
 
static bool CTRL_getFlag_enable (CTRL_Handle handle)
 Gets the enable controller flag value from the controller. More...
 
static bool CTRL_getFlag_resetInt_Id (CTRL_Handle handle)
 Gets the reset Id integrator flag value from the controller. More...
 
static bool CTRL_getFlag_resetInt_Iq (CTRL_Handle handle)
 Gets the reset Iq integrator flag value from the controller. More...
 
static bool CTRL_getFlag_resetInt_spd (CTRL_Handle handle)
 Gets the reset speed integrator flag value from the controller. More...
 
static bool CTRL_getFlag_useZeroIq_ref (CTRL_Handle handle)
 Gets the use zero Iq reference flag value from the controller. More...
 
static float_t CTRL_getId_A (CTRL_Handle handle)
 Gets the direct current (Id) value from the controller. More...
 
static float_tCTRL_getId_A_addr (CTRL_Handle handle)
 Gets the direct current (Id) memory address from the controller. More...
 
static float_t CTRL_getId_offset_A (CTRL_Handle handle)
 Gets the direct offset current (Id_offset) value from the controller. More...
 
static float_tCTRL_getId_offset_A_addr (CTRL_Handle handle)
 Gets the direct offset current (Id_offset) memory address from the controller. More...
 
static float_t CTRL_getId_ref_A (CTRL_Handle handle)
 Gets the direct reference current (Id_ref) value from the controller. More...
 
static float_tCTRL_getId_ref_A_addr (CTRL_Handle handle)
 Gets the direct reference current (Id_ref) memory address from the controller. More...
 
static void CTRL_getIdq_A (CTRL_Handle handle, MATH_vec2 *pIdq_A)
 Gets the direct/quadrature current vector values from the controller. More...
 
static MATH_vec2CTRL_getIdq_A_addr (CTRL_Handle handle)
 Gets the direct/quadrature current (Idq) vector memory address from the controller. More...
 
static void CTRL_getIdq_offset_A (CTRL_Handle handle, MATH_vec2 *pIdq_offset_A)
 Gets the direct/quadrature offset current (Idq_offset) vector values from the controller. More...
 
static MATH_vec2CTRL_getIdq_offset_A_addr (CTRL_Handle handle)
 Gets the direct/quadrature offset current (Idq_offset) vector memory address from the controller. More...
 
static void CTRL_getIdq_ref_A (CTRL_Handle handle, MATH_vec2 *pIdq_ref_A)
 Gets the direct/quadrature reference current (Idq_ref) vector values from the controller. More...
 
static MATH_vec2CTRL_getIdq_ref_A_addr (CTRL_Handle handle)
 Gets the direct/quadrature reference current (Idq_ref) vector memory address from the controller. More...
 
static float_t CTRL_getIq_A (CTRL_Handle handle)
 Gets the quadrature current (Iq) value from the controller. More...
 
static float_tCTRL_getIq_A_addr (CTRL_Handle handle)
 Gets the quadrature current (Iq) memory address from the controller. More...
 
static float_t CTRL_getIq_offset_A (CTRL_Handle handle)
 Gets the quadrature offset current (Iq_offset) value from the controller. More...
 
static float_tCTRL_getIq_offset_A_addr (CTRL_Handle handle)
 Gets the quadrature offset current (Iq_offset) memory address from the controller. More...
 
static float_t CTRL_getIq_ref_A (CTRL_Handle handle)
 Gets the quadrature reference current (Iq_ref) value from the controller. More...
 
static float_tCTRL_getIq_ref_A_addr (CTRL_Handle handle)
 Gets the quadrature reference current (Iq_ref) memory address from the controller. More...
 
static void CTRL_getGains (CTRL_Handle handle, const CTRL_Type_e ctrlType, float_t *pKp, float_t *pKi)
 Gets the gain values for the specified controller. More...
 
static float_t CTRL_getRefValue (CTRL_Handle handle, const CTRL_Type_e ctrlType)
 Gets the reference value from the specified controller. More...
 
static float_t CTRL_getSpeed_fb_Hz (CTRL_Handle handle)
 Gets the feedback speed value from the controller. More...
 
static float_t CTRL_getSpeed_out_A (CTRL_Handle handle)
 Gets the output value from the speed controller. More...
 
static float_tCTRL_getSpeed_out_A_addr (CTRL_Handle handle)
 Gets the output value memory address from the speed controller. More...
 
static float_t CTRL_getSpeed_outMax_A (CTRL_Handle handle)
 Gets the maximum value for the speed controller. More...
 
static float_t CTRL_getSpeed_outMin_A (CTRL_Handle handle)
 Gets the minimum value for the speed controller. More...
 
static float_t CTRL_getSpeed_ref_Hz (CTRL_Handle handle)
 Gets the output speed reference value from the controller. More...
 
static float_t CTRL_getSpeedCtrlPeriod_sec (CTRL_Handle handle)
 Gets the speed controller period. More...
 
static float_t CTRL_getVd_V (CTRL_Handle handle)
 Gets the direct voltage (Vd) value from the controller. More...
 
static float_tCTRL_getVd_V_addr (CTRL_Handle handle)
 Gets the direct voltage (Vd) value memory address from the controller. More...
 
static float_t CTRL_getVd_offset_V (CTRL_Handle handle)
 Gets the direct offset voltage (Vd_offset) value from the controller. More...
 
static float_tCTRL_getVd_offset_V_addr (CTRL_Handle handle)
 Gets the direct offset voltage (Vd_offset) value memory address from the controller. More...
 
static void CTRL_getVdq_V (CTRL_Handle handle, MATH_vec2 *pVdq_V)
 Gets the direct/quadrature voltage (Vdq) vector values from the controller. More...
 
static MATH_vec2CTRL_getVdq_V_addr (CTRL_Handle handle)
 Gets the direct/quadrature voltage (Vdq) vector memory address from the controller. More...
 
static void CTRL_getVdq_offset_V (CTRL_Handle handle, MATH_vec2 *pVdq_offset_V)
 Gets the direct/quadrature offset voltage (Vdq_offset) vector values from the controller. More...
 
static MATH_vec2CTRL_getVdq_offset_V_addr (CTRL_Handle handle)
 Gets the direct/quadrature offset voltage (Vdq_offset) vector memory address from the controller. More...
 
static float_t CTRL_getVq_V (CTRL_Handle handle)
 Gets the quadrature voltage (Vq) value from the controller. More...
 
static float_tCTRL_getVq_V_addr (CTRL_Handle handle)
 Gets the quadrature voltage (Vq) value memory address from the controller. More...
 
static float_t CTRL_getVq_offset_V (CTRL_Handle handle)
 Gets the quadrature offset voltage (Vq_offset) value from the controller. More...
 
static float_tCTRL_getVq_offset_V_addr (CTRL_Handle handle)
 Gets the quadrature offset voltage (Vq_offset) value memory address from the controller. More...
 
void CTRL_getWaitTimes (CTRL_Handle handle, int_least32_t *pWaitTimes)
 Gets the wait times from the controller. More...
 
CTRL_Handle CTRL_init (void *pMemory, const size_t numBytes)
 Initializes the controller. More...
 
static bool CTRL_isEnabled (CTRL_Handle handle)
 Determines if the controller is enabled. More...
 
static bool CTRL_isIdle (CTRL_Handle handle)
 Determines if the controller is in the idle state. More...
 
static bool CTRL_isNotIdle (CTRL_Handle handle)
 Determines if the controller is not in the idle state. More...
 
void CTRL_reset (CTRL_Handle handle)
 Resets the controller. More...
 
static void CTRL_setBWc_rps (CTRL_Handle handle, const float_t BWc_rps)
 Sets the current controller bandwidth. More...
 
static void CTRL_setBWdelta (CTRL_Handle handle, const float_t BWdelta)
 Sets the bandwidth scale factor used to maximize phase margin. More...
 
static void CTRL_setCtrlFreq_Hz (CTRL_Handle handle, const float_t ctrlFreq_Hz)
 Sets the controller frequency. More...
 
static void CTRL_setCurrentCtrlPeriod_sec (CTRL_Handle handle, const float_t currentCtrlPeriod_sec)
 Sets the current controller period value. More...
 
static void CTRL_setFlag_enable (CTRL_Handle handle, const bool state)
 Sets the enable controller flag value in the controller. More...
 
static void CTRL_setFlag_resetInt_Id (CTRL_Handle handle, const bool state)
 Sets the reset Id integrator flag value in the controller. More...
 
static void CTRL_setFlag_resetInt_Iq (CTRL_Handle handle, const bool state)
 Sets the reset Iq integrator flag value in the controller. More...
 
static void CTRL_setFlag_resetInt_spd (CTRL_Handle handle, const bool state)
 Sets the reset speed integrator flag value in the controller. More...
 
static void CTRL_setFlag_useZeroIq_ref (CTRL_Handle handle, const bool state)
 Sets the use zero Iq reference flag value in the controller. More...
 
static void CTRL_setId_A (CTRL_Handle handle, const float_t Id_A)
 Sets the direct current (Id) value in the controller. More...
 
static void CTRL_setId_offset_A (CTRL_Handle handle, const float_t Id_offset_A)
 Sets the direct current (Id) offset value in the controller. More...
 
static void CTRL_setId_ref_A (CTRL_Handle handle, const float_t Id_ref_A)
 Sets the direct current (Id) reference value in the controller. More...
 
static void CTRL_setIdq_A (CTRL_Handle handle, const MATH_vec2 *pIdq_A)
 Sets the direct/quadrature current (Idq) vector values in the controller. More...
 
static void CTRL_setIdq_offset_A (CTRL_Handle handle, const MATH_vec2 *pIdq_offset_A)
 Sets the direct/quadrature current (Idq) offset vector values in the controller. More...
 
static void CTRL_setIdq_ref_A (CTRL_Handle handle, const MATH_vec2 *pIdq_ref_A)
 Sets the direct/quadrature current (Idq) reference vector values in the controller. More...
 
static void CTRL_setIq_A (CTRL_Handle handle, const float_t Iq_A)
 Sets the quadrature current (Iq) value in the controller. More...
 
static void CTRL_setIq_offset_pu (CTRL_Handle handle, const float_t Iq_offset_A)
 Sets the quadrature current (Iq) offset value in the controller. More...
 
static void CTRL_setIq_ref_A (CTRL_Handle handle, const float_t Iq_ref_A)
 Sets the quadrature current (Iq) reference value in the controller. More...
 
static void CTRL_setKctrl_Wb_p_kgm2 (CTRL_Handle handle, const float_t Kctrl_Wb_p_kgm2)
 Sets the speed controller constant. More...
 
static void CTRL_setKi (CTRL_Handle handle, const CTRL_Type_e ctrlType, const float_t Ki)
 Sets the integral gain (Ki) value for the specified controller. More...
 
static void CTRL_setKp (CTRL_Handle handle, const CTRL_Type_e ctrlType, const float_t Kp)
 Sets the proportional gain (Kp) value for the specified controller. More...
 
static void CTRL_setGains (CTRL_Handle handle, const CTRL_Type_e ctrlType, const float_t Kp, const float_t Ki)
 Sets the gain values for the specified controller. More...
 
static void CTRL_setMaxVsMag_V (CTRL_Handle handle, const float_t maxVsMag_V)
 Sets the maximum stator voltage magnitude value. More...
 
static void CTRL_setMotorParams (CTRL_Handle handle, const MOTOR_Type_e motorType, const uint_least16_t numPolePairs, const float_t ratedFlux_Wb, const float_t Ls_d_H, const float_t Ls_q_H, const float_t Rs_d_Ohm, const float_t Rs_q_Ohm, const float_t Rr_d_Ohm, const float_t Rr_q_Ohm)
 Sets the parameters for the motor in the controller. More...
 
static void CTRL_setNumCtrlTicksPerCurrentTick (CTRL_Handle handle, const int_least16_t numCtrlTicksPerCurrentTick)
 Sets the number of controller clock ticks per current controller clock tick. More...
 
static void CTRL_setNumCtrlTicksPerSpeedTick (CTRL_Handle handle, const int_least16_t numCtrlTicksPerSpeedTick)
 Sets the number of controller clock ticks per speed controller clock tick. More...
 
static void CTRL_setNumIsrTicksPerCtrlTick (CTRL_Handle handle, const int_least16_t numIsrTicksPerCtrlTick)
 Sets the number of Interrupt Service Routine (ISR) clock ticks per controller clock tick. More...
 
static void CTRL_setSpeed_fb_Hz (CTRL_Handle handle, const float_t speed_fb_Hz)
 Sets the feedback speed value in the controller. More...
 
static void CTRL_setSpeed_out_A (CTRL_Handle handle, const float_t speed_out_A)
 Sets the maximum output value for the speed controller. More...
 
static void CTRL_setSpeed_outMax_A (CTRL_Handle handle, const float_t speed_outMax_A)
 Sets the maximum output value for the speed controller. More...
 
static void CTRL_setSpeed_outMin_A (CTRL_Handle handle, const float_t speed_outMin_A)
 Sets the minimum output value for the speed controller. More...
 
static void CTRL_setSpeed_ref_Hz (CTRL_Handle handle, const float_t speed_ref_Hz)
 Sets the output speed reference value in the controller. More...
 
static void CTRL_setSpeedCtrlPeriod_sec (CTRL_Handle handle, const float_t speedCtrlPeriod_sec)
 Sets the speed controller period value. More...
 
static void CTRL_setUi (CTRL_Handle handle, const CTRL_Type_e ctrlType, const float_t Ui)
 Sets the integrator (Ui) value in the specified controller. More...
 
static void CTRL_setVd_sf (CTRL_Handle handle, const float_t Vd_sf)
 Sets the direct voltage scale factor. More...
 
static void CTRL_setVdq_V (CTRL_Handle handle, const MATH_vec2 *pVdq_V)
 Sets the direct/quadrature voltage (Vdq) vector values in the controller. More...
 
static void CTRL_setVdq_offset_V (CTRL_Handle handle, const MATH_vec2 *pVdq_offset_V)
 Sets the direct/quadrature offset voltage (Vdq_offset) vector values in the controller. More...
 
void CTRL_setVersion (CTRL_Handle handle, const CTRL_TargetProc_e targetProc, const uint16_t majorReleaseNumber, const uint16_t minorReleaseNumber)
 Sets the controller version. More...
 
void CTRL_setWaitTimes (CTRL_Handle handle, const int_least32_t *pWaitTimes)
 Sets the wait times for the controller states. More...
 
static void CTRL_setup (CTRL_Handle handle, const float_t speed_ref_Hz, const float_t speed_fb_Hz, const MATH_vec2 *pIdq_A, const MATH_vec2 *pIdq_offset_A, const MATH_vec2 *pVdq_offset_V, const bool flag_enableSpeedCtrl, const bool flag_enableCurrentCtrl, const bool flag_useZeroIq_ref)
 Sets up the user controller (CTRL) object. More...
 
static void CTRL_run (CTRL_Handle handle, MATH_vec2 *pVdq_V)
 Run the controller. More...
 

Detailed Description

Function Documentation

void CTRL_addVdq_offset ( CTRL_Handle  handle)
inline

Adds the Vdq offset to the Vdq values.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 81 of file 32b/ctrl.h.

References _MATH_vec2_::value, _CTRL_Obj_::Vdq_offset_pu, and _CTRL_Obj_::Vdq_out.

Referenced by CTRL_runPiOnly().

_iq CTRL_angleDelayComp ( CTRL_Handle  handle,
const _iq  angle_pu 
)
inline

Runs angle delay compensation.

This function takes the decimation rates to calculate a phase delay, and it compensates the delay. This allows the voltage output to do a better correction of the error.

Parameters
[in]handleThe controller (CTRL) handle
[in]angle_puThe angle delayed
Returns
The phase delay compensated angle

Definition at line 2126 of file 32b/ctrl.h.

References _IQ, _IQabs, _IQmpy, EST_getFm_pu(), _CTRL_Obj_::estHandle, and GLOBAL_Q.

Referenced by CTRL_runOnLine_User().

static void CTRL_checkForErrors ( CTRL_Handle  handle)
inline

Checks for any controller errors and, if found, sets the controller state to the error state.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 1982 of file 32b/ctrl.h.

References CTRL_ErrorCode_EstError, CTRL_setErrorCode(), CTRL_setState(), CTRL_State_Error, EST_isError(), and _CTRL_Obj_::estHandle.

Referenced by CTRL_updateState().

static void CTRL_computeOutputLimits_Id ( CTRL_Handle  handle,
float_t outMin,
float_t outMax 
)
inlinestatic

Computes the Id controller output limits.

Parameters
[in]handleThe controller (CTRL) handle
[in]outMinThe pointer to the minimum output value
[in]outMaxThe pointer to the maximum output value

Definition at line 173 of file float/ctrl.h.

References CTRL_getMaxVsMag_V(), and CTRL_getVd_sf().

Referenced by CTRL_run().

static void CTRL_computeOutputLimits_Id ( CTRL_Handle  handle,
const _iq  maxVsMag,
_iq outMin,
_iq outMax 
)
inlinestatic

Computes the Id controller output limits.

Parameters
[in]handleThe controller (CTRL) handle
[in]maxVsMagThe maximum output voltage vector, pu
[in]outMinThe pointer to the minimum output value
[in]outMaxThe pointer to the maximum output value

Definition at line 2005 of file 32b/ctrl.h.

Referenced by CTRL_runPiOnly().

static void CTRL_computeOutputLimits_Iq ( CTRL_Handle  handle,
const float_t  Vd_out_V,
float_t outMin,
float_t outMax 
)
inlinestatic

Computes the Iq controller output limits.

Parameters
[in]handleThe controller (CTRL) handle
[in]Vd_out_VThe Vd output voltage value, V
[in]outMinThe pointer to the minimum output value
[in]outMaxThe pointer to the maximum output value

Definition at line 192 of file float/ctrl.h.

References CTRL_getMaxVsMag_V().

Referenced by CTRL_run().

static void CTRL_computeOutputLimits_Iq ( CTRL_Handle  handle,
const _iq  maxVsMag,
const _iq  Vd_out_pu,
_iq outMin,
_iq outMax 
)
inlinestatic

Computes the Iq controller output limits.

Parameters
[in]handleThe controller (CTRL) handle
[in]maxVsMagThe maximum output voltage vector, pu
[in]Vd_out_puThe Vd output voltage value, pu
[in]outMinThe pointer to the minimum output value
[in]outMaxThe pointer to the maximum output value

Definition at line 2023 of file 32b/ctrl.h.

References _IQmpy, and _IQsqrt.

Referenced by CTRL_runPiOnly().

static void CTRL_computePhasor ( const float_t  angle_rad,
MATH_vec2 pPhasor 
)
inlinestatic

Computes a phasor for a given angle.

Parameters
[in]angle_radThe angle, rad
[out]pPhasorThe pointer to the phasor vector values

Definition at line 75 of file float/ctrl.h.

References _MATH_vec2_::value.

void CTRL_computePhasor ( const _iq  angle_pu,
MATH_vec2 pPhasor 
)
inline

Computes a phasor for a given angle.

Parameters
[in]angle_puThe angle, pu
[out]pPhasorThe pointer to the phasor vector values

Definition at line 2040 of file 32b/ctrl.h.

References _IQcosPU, _IQsinPU, and _MATH_vec2_::value.

Referenced by CTRL_runOnLine(), and CTRL_runOnLine_User().

static void CTRL_disable ( CTRL_Handle  handle)
inlinestatic

Disables the controller.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 92 of file float/ctrl.h.

References _CTRL_Obj_::flag_enable.

bool CTRL_doCurrentCtrl ( CTRL_Handle  handle)
inline

Determines if the current controllers should be run.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The value denoting that the current controllers should be run (true) or not (false)

Definition at line 2053 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_current, CTRL_getFlag_enableCurrentCtrl(), and _CTRL_Obj_::numCtrlTicksPerCurrentTick.

Referenced by CTRL_runOnLine(), CTRL_runOnLine_User(), and CTRL_runPiOnly().

bool CTRL_doSpeedCtrl ( CTRL_Handle  handle)
inline

Determines if the speed controller should be executed.

Parameters
[in]handleThe controller (CTRL) handle
Returns
A boolean value denoting if the speed controller should be executed (true) or not (false)

Definition at line 2070 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_speed, and _CTRL_Obj_::numCtrlTicksPerSpeedTick.

Referenced by CTRL_runOnLine(), CTRL_runOnLine_User(), and CTRL_runPiOnly().

static void CTRL_enable ( CTRL_Handle  handle)
inlinestatic

Enables the controller.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 104 of file float/ctrl.h.

References _CTRL_Obj_::flag_enable.

static float_t CTRL_getBWc_rps ( CTRL_Handle  handle)
inlinestatic

Gets the current controller bandwidth.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The current controller bandwidth, rad/sec

Definition at line 117 of file float/ctrl.h.

References _CTRL_Obj_::BWc_rps.

static float_t CTRL_getBWdelta ( CTRL_Handle  handle)
inlinestatic

Gets the bandwidth scale factor used to maximize phase margin.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The bandwidth scale factor

Definition at line 128 of file float/ctrl.h.

References _CTRL_Obj_::BWdelta.

static int_least16_t CTRL_getCount_current ( CTRL_Handle  handle)
inline

Gets the current loop count.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The current loop count

Definition at line 95 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_current.

Referenced by CTRL_run().

static int_least16_t CTRL_getCount_isr ( CTRL_Handle  handle)
inline

Gets the isr count.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The isr count

Definition at line 106 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_isr.

Referenced by CTRL_run().

static int_least16_t CTRL_getCount_speed ( CTRL_Handle  handle)
inline

Gets the speed loop count.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The speed loop count

Definition at line 117 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_speed.

Referenced by CTRL_run().

static int_least32_t CTRL_getCount_state ( CTRL_Handle  handle)
inline

Gets the state count.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The state count

Definition at line 128 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_state.

Referenced by CTRL_updateState().

uint_least16_t CTRL_getCount_traj ( CTRL_Handle  handle)
inline

Gets the trajectory loop count.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The trajectory loop count

Definition at line 139 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_traj.

Referenced by CTRL_setup(), and CTRL_setup_user().

uint_least32_t CTRL_getCtrlFreq ( CTRL_Handle  handle)
inline

Gets the controller execution frequency.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The controller execution frequency, Hz

Definition at line 150 of file 32b/ctrl.h.

References _CTRL_Obj_::ctrlFreq_Hz.

static float_t CTRL_getCtrlFreq_Hz ( CTRL_Handle  handle)
inlinestatic

Gets the controller execution frequency.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The controller execution frequency, Hz

Definition at line 258 of file float/ctrl.h.

References _CTRL_Obj_::ctrlFreq_Hz.

static float_t CTRL_getCtrlPeriod_sec ( CTRL_Handle  handle)
inline

Gets the controller execution period.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The controller execution period, sec

Definition at line 161 of file 32b/ctrl.h.

References _CTRL_Obj_::ctrlPeriod_sec.

Referenced by USER_calcPIgains().

static float_t CTRL_getCurrentCtrlPeriod_sec ( CTRL_Handle  handle)
inlinestatic

Gets the current controller period.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The current controller period, sec

Definition at line 269 of file float/ctrl.h.

References _CTRL_Obj_::currentCtrlPeriod_sec.

static CTRL_ErrorCode_e CTRL_getErrorCode ( CTRL_Handle  handle)
inline

Gets the error code from the controller (CTRL) object.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The error code

Definition at line 172 of file 32b/ctrl.h.

References _CTRL_Obj_::errorCode.

EST_Handle CTRL_getEstHandle ( CTRL_Handle  handle)
inline

Gets the estimator handle for a given controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The estimator handle for the given controller

Definition at line 183 of file 32b/ctrl.h.

References _CTRL_Obj_::estHandle.

static _iq CTRL_getFbackValue_spd_pu ( CTRL_Handle  handle)
inlinestatic

Gets the feedback value for the speed controller.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 193 of file 32b/ctrl.h.

References _CTRL_Obj_::speed_fb_pu.

Referenced by CTRL_runPiOnly().

static bool CTRL_getFlag_enable ( CTRL_Handle  handle)
inlinestatic

Gets the enable controller flag value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The enable controller flag value

Definition at line 302 of file float/ctrl.h.

References _CTRL_Obj_::flag_enable.

Referenced by CTRL_updateState().

bool CTRL_getFlag_enableCtrl ( CTRL_Handle  handle)
inline

Gets the enable controller flag value from the estimator.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The enable controller flag value

Definition at line 204 of file 32b/ctrl.h.

References _CTRL_Obj_::flag_enableCtrl.

Referenced by CTRL_updateState().

static bool CTRL_getFlag_enableCurrentCtrl ( CTRL_Handle  handle)
inline

Gets the enable current controllers flag value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The enable current controller flag value

Definition at line 215 of file 32b/ctrl.h.

References _CTRL_Obj_::flag_enableCurrentCtrl.

Referenced by CTRL_doCurrentCtrl(), and CTRL_run().

bool CTRL_getFlag_enableDcBusComp ( CTRL_Handle  handle)
inline

Gets the enable DC bus compensation flag value from the estimator.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The enable DC bus compensation flag value

Definition at line 226 of file 32b/ctrl.h.

References _CTRL_Obj_::flag_enableDcBusComp.

Referenced by CTRL_runOnLine(), CTRL_runOnLine_User(), and CTRL_runPiOnly().

bool CTRL_getFlag_enableOffset ( CTRL_Handle  handle)
inline

Gets the enable offset flag value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The enable offset flag value

Definition at line 248 of file 32b/ctrl.h.

References _CTRL_Obj_::flag_enableOffset.

Referenced by CTRL_updateState().

bool CTRL_getFlag_enablePowerWarp ( CTRL_Handle  handle)
inline

Gets the PowerWarp enable flag value from the estimator.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The PowerWarp enable flag value

Definition at line 237 of file 32b/ctrl.h.

References _CTRL_Obj_::flag_enablePowerWarp.

static bool CTRL_getFlag_enableSpeedCtrl ( CTRL_Handle  handle)
inline

Gets the enable speed control flag value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The enable speed control flag value

Definition at line 259 of file 32b/ctrl.h.

References _CTRL_Obj_::flag_enableSpeedCtrl.

Referenced by CTRL_getRefValue_Id_pu(), CTRL_run(), CTRL_runOnLine(), CTRL_runOnLine_User(), and CTRL_runPiOnly().

bool CTRL_getFlag_enableUserMotorParams ( CTRL_Handle  handle)
inline

Gets the enable user motor parameters flag value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The enable user motor parameters flag value

Definition at line 270 of file 32b/ctrl.h.

References _CTRL_Obj_::flag_enableUserMotorParams.

Referenced by CTRL_updateState().

static bool CTRL_getFlag_resetInt_Id ( CTRL_Handle  handle)
inlinestatic

Gets the reset Id integrator flag value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The reset Id integrator flag value

Definition at line 335 of file float/ctrl.h.

References _CTRL_Obj_::flag_resetInt_Id.

Referenced by CTRL_setup().

static bool CTRL_getFlag_resetInt_Iq ( CTRL_Handle  handle)
inlinestatic

Gets the reset Iq integrator flag value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The reset Iq integrator flag value

Definition at line 346 of file float/ctrl.h.

References _CTRL_Obj_::flag_resetInt_Iq.

Referenced by CTRL_setup().

static bool CTRL_getFlag_resetInt_spd ( CTRL_Handle  handle)
inlinestatic

Gets the reset speed integrator flag value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The reset speed integrator flag value

Definition at line 357 of file float/ctrl.h.

References _CTRL_Obj_::flag_resetInt_spd.

Referenced by CTRL_setup().

static bool CTRL_getFlag_useZeroIq_ref ( CTRL_Handle  handle)
inlinestatic

Gets the use zero Iq reference flag value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The use zero Iq reference flag value

Definition at line 368 of file float/ctrl.h.

References _CTRL_Obj_::flag_useZeroIq_ref.

Referenced by CTRL_run().

void CTRL_getGains ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType,
_iq pKp,
_iq pKi,
_iq pKd 
)

Gets the gain values for the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlTypeThe controller type
[in]pKpThe pointer for the Kp value, pu
[in]pKiThe pointer for the Ki value, pu
[in]pKdThe pointer for the Kd value, pu

Definition at line 78 of file 32b/ctrl.c.

References CTRL_getKd(), CTRL_getKi(), and CTRL_getKp().

static void CTRL_getGains ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType,
float_t pKp,
float_t pKi 
)
inlinestatic

Gets the gain values for the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlTypeThe controller type
[in]pKpThe pointer for the Kp value
[in]pKiThe pointer for the Ki value

Definition at line 650 of file float/ctrl.h.

References CTRL_getKi(), and CTRL_getKp().

MATH_vec2 * CTRL_getIab_filt_addr ( CTRL_Handle  handle)
inline

Gets the alpha/beta filtered current vector memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The alpha/beta filtered current vector memory address

Definition at line 297 of file 32b/ctrl.h.

References _CTRL_Obj_::Iab_filt.

void CTRL_getIab_filt_pu ( CTRL_Handle  handle,
MATH_vec2 pIab_filt_pu 
)

Gets the alpha/beta filtered current vector values from the controller.

Parameters
[in]handleThe controller (CTRL) handle
[out]pIab_filt_puThe vector for the alpha/beta filtered current vector values, pu

Definition at line 90 of file 32b/ctrl.c.

References _CTRL_Obj_::Iab_filt, and _MATH_vec2_::value.

MATH_vec2 * CTRL_getIab_in_addr ( CTRL_Handle  handle)
inline

Gets the alpha/beta current input vector memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The alpha/beta current input vector memory address

Definition at line 308 of file 32b/ctrl.h.

References _CTRL_Obj_::Iab_in.

Referenced by CTRL_runOnLine(), and CTRL_runOnLine_User().

void CTRL_getIab_in_pu ( CTRL_Handle  handle,
MATH_vec2 pIab_in_pu 
)

Gets the alpha/beta current input vector values from the controller.

Parameters
[in]handleThe controller (CTRL) handle
[out]pIab_in_puThe vector for the alpha/beta current input vector values, pu

Definition at line 101 of file 32b/ctrl.c.

References _CTRL_Obj_::Iab_in, and _MATH_vec2_::value.

static float_t CTRL_getId_A ( CTRL_Handle  handle)
inlinestatic

Gets the direct current (Id) value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct current value, A

Definition at line 379 of file float/ctrl.h.

References _CTRL_Obj_::Idq_A, and _MATH_vec2_::value.

Referenced by CTRL_run().

static float_t* CTRL_getId_A_addr ( CTRL_Handle  handle)
inlinestatic

Gets the direct current (Id) memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct current memory address

Definition at line 390 of file float/ctrl.h.

References _CTRL_Obj_::Idq_A, and _MATH_vec2_::value.

_iq CTRL_getId_in_pu ( CTRL_Handle  handle)
inline

Gets the direct current input value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct current input value, pu

Definition at line 325 of file 32b/ctrl.h.

References _CTRL_Obj_::Idq_in, and _MATH_vec2_::value.

Referenced by CTRL_runOnLine(), CTRL_runOnLine_User(), and CTRL_runPiOnly().

static float_t CTRL_getId_offset_A ( CTRL_Handle  handle)
inlinestatic

Gets the direct offset current (Id_offset) value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct current offset value, A

Definition at line 401 of file float/ctrl.h.

References _CTRL_Obj_::Idq_offset_A, and _MATH_vec2_::value.

Referenced by CTRL_run().

static float_t* CTRL_getId_offset_A_addr ( CTRL_Handle  handle)
inlinestatic

Gets the direct offset current (Id_offset) memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct offset current memory address

Definition at line 412 of file float/ctrl.h.

References _CTRL_Obj_::Idq_offset_A, and _MATH_vec2_::value.

static _iq CTRL_getId_offset_pu ( CTRL_Handle  handle)
inlinestatic

Gets the direct current (Id) offset value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct current offset value, pu

Definition at line 370 of file 32b/ctrl.h.

References _CTRL_Obj_::Idq_offset_pu, and _MATH_vec2_::value.

Referenced by CTRL_getRefValue_Id_pu().

static float_t CTRL_getId_ref_A ( CTRL_Handle  handle)
inlinestatic

Gets the direct reference current (Id_ref) value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct current reference value, A

Definition at line 423 of file float/ctrl.h.

References _CTRL_Obj_::Idq_ref_A, and _MATH_vec2_::value.

static float_t* CTRL_getId_ref_A_addr ( CTRL_Handle  handle)
inlinestatic

Gets the direct reference current (Id_ref) memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct current reference memory address

Definition at line 434 of file float/ctrl.h.

References _CTRL_Obj_::Idq_ref_A, and _MATH_vec2_::value.

_iq CTRL_getId_ref_pu ( CTRL_Handle  handle)
inline

Gets the direct current (Id) reference value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct current reference value, pu

Definition at line 336 of file 32b/ctrl.h.

References _CTRL_Obj_::Idq_ref, and _MATH_vec2_::value.

Referenced by CTRL_getRefValue_Id_pu(), CTRL_runOnLine(), and CTRL_runOnLine_User().

static void CTRL_getIdq_A ( CTRL_Handle  handle,
MATH_vec2 pIdq_A 
)
inlinestatic

Gets the direct/quadrature current vector values from the controller.

Parameters
[in]handleThe controller (CTRL) handle
[out]pIdq_AThe vector for the direct/quadrature current vector values, A

Definition at line 445 of file float/ctrl.h.

References _CTRL_Obj_::Idq_A, and _MATH_vec2_::value.

static MATH_vec2* CTRL_getIdq_A_addr ( CTRL_Handle  handle)
inlinestatic

Gets the direct/quadrature current (Idq) vector memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct/quadrature current vector memory address

Definition at line 459 of file float/ctrl.h.

References _CTRL_Obj_::Idq_A.

MATH_vec2 * CTRL_getIdq_in_addr ( CTRL_Handle  handle)
inline

Gets the direct/quadrature current input vector memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct/quadrature current input vector memory address

Definition at line 347 of file 32b/ctrl.h.

References _CTRL_Obj_::Idq_in.

Referenced by CTRL_runOnLine(), and CTRL_runOnLine_User().

void CTRL_getIdq_in_pu ( CTRL_Handle  handle,
MATH_vec2 pIdq_in_pu 
)

Gets the direct/quadrature current input vector values from the controller.

Parameters
[in]handleThe controller (CTRL) handle
[out]pIdq_in_puThe vector for the direct/quadrature input current vector values, pu

Definition at line 112 of file 32b/ctrl.c.

References _CTRL_Obj_::Idq_in, and _MATH_vec2_::value.

static void CTRL_getIdq_offset_A ( CTRL_Handle  handle,
MATH_vec2 pIdq_offset_A 
)
inlinestatic

Gets the direct/quadrature offset current (Idq_offset) vector values from the controller.

Parameters
[in]handleThe controller (CTRL) handle
[out]pIdq_offset_AThe vector for the direct/quadrature offset current vector values, A

Definition at line 470 of file float/ctrl.h.

References _CTRL_Obj_::Idq_offset_A, and _MATH_vec2_::value.

static MATH_vec2* CTRL_getIdq_offset_A_addr ( CTRL_Handle  handle)
inlinestatic

Gets the direct/quadrature offset current (Idq_offset) vector memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct/quadrature offset current vector memory address

Definition at line 484 of file float/ctrl.h.

References _CTRL_Obj_::Idq_offset_A.

static void CTRL_getIdq_ref_A ( CTRL_Handle  handle,
MATH_vec2 pIdq_ref_A 
)
inlinestatic

Gets the direct/quadrature reference current (Idq_ref) vector values from the controller.

Parameters
[in]handleThe controller (CTRL) handle
[out]pIdq_ref_AThe vector for the direct/quadrature reference current vector values, A

Definition at line 495 of file float/ctrl.h.

References _CTRL_Obj_::Idq_ref_A, and _MATH_vec2_::value.

static MATH_vec2* CTRL_getIdq_ref_A_addr ( CTRL_Handle  handle)
inlinestatic

Gets the direct/quadrature reference current (Idq_ref) vector memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct/quadrature reference current vector memory address

Definition at line 509 of file float/ctrl.h.

References _CTRL_Obj_::Idq_ref_A.

void CTRL_getIdq_ref_pu ( CTRL_Handle  handle,
MATH_vec2 pIdq_ref_pu 
)

Gets the direct/quadrature current reference vector values from the controller.

Parameters
[in]handleThe controller (CTRL) handle
[out]pIdq_ref_puThe vector for the direct/quadrature current reference vector values, pu

Definition at line 123 of file 32b/ctrl.c.

References _CTRL_Obj_::Idq_ref, and _MATH_vec2_::value.

_iq CTRL_getIdRated_pu ( CTRL_Handle  handle)
inline

Gets the Id rated current value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The Id rated current value, pu

Definition at line 381 of file 32b/ctrl.h.

References _CTRL_Obj_::IdRated.

Referenced by CTRL_getMagCurrent_pu().

static float_t CTRL_getIq_A ( CTRL_Handle  handle)
inlinestatic

Gets the quadrature current (Iq) value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The quadrature current value, A

Definition at line 520 of file float/ctrl.h.

References _CTRL_Obj_::Idq_A, and _MATH_vec2_::value.

Referenced by CTRL_run().

static float_t* CTRL_getIq_A_addr ( CTRL_Handle  handle)
inlinestatic

Gets the quadrature current (Iq) memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The quadrature current memory address

Definition at line 531 of file float/ctrl.h.

References _CTRL_Obj_::Idq_A, and _MATH_vec2_::value.

_iq CTRL_getIq_in_pu ( CTRL_Handle  handle)
inline

Gets the quadrature current input value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The quadrature current input value, pu

Definition at line 392 of file 32b/ctrl.h.

References _CTRL_Obj_::Idq_in, and _MATH_vec2_::value.

Referenced by CTRL_runOnLine(), CTRL_runOnLine_User(), and CTRL_runPiOnly().

static float_t CTRL_getIq_offset_A ( CTRL_Handle  handle)
inlinestatic

Gets the quadrature offset current (Iq_offset) value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The quadrature current offset value, A

Definition at line 542 of file float/ctrl.h.

References _CTRL_Obj_::Idq_offset_A, and _MATH_vec2_::value.

Referenced by CTRL_run().

static float_t* CTRL_getIq_offset_A_addr ( CTRL_Handle  handle)
inlinestatic

Gets the quadrature offset current (Iq_offset) memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The quadrature offset current memory address

Definition at line 553 of file float/ctrl.h.

References _CTRL_Obj_::Idq_offset_A, and _MATH_vec2_::value.

static _iq CTRL_getIq_offset_pu ( CTRL_Handle  handle)
inlinestatic

Gets the quadrature current (Iq) offset value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The quadrature current offset value, pu

Definition at line 403 of file 32b/ctrl.h.

References _CTRL_Obj_::Idq_offset_pu, and _MATH_vec2_::value.

Referenced by CTRL_getRefValue_Iq_pu().

static float_t CTRL_getIq_ref_A ( CTRL_Handle  handle)
inlinestatic

Gets the quadrature reference current (Iq_ref) value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The quadrature reference current value, A

Definition at line 564 of file float/ctrl.h.

References _CTRL_Obj_::Idq_ref_A, and _MATH_vec2_::value.

static float_t* CTRL_getIq_ref_A_addr ( CTRL_Handle  handle)
inlinestatic

Gets the quadrature reference current (Iq_ref) memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The quadrature reference current memory address

Definition at line 575 of file float/ctrl.h.

References _CTRL_Obj_::Idq_ref_A, and _MATH_vec2_::value.

_iq CTRL_getIq_ref_pu ( CTRL_Handle  handle)
inline

Gets the quadrature current (Iq) reference value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The quadrature current reference value, pu

Definition at line 414 of file 32b/ctrl.h.

References _CTRL_Obj_::Idq_ref, and _MATH_vec2_::value.

Referenced by CTRL_getRefValue_Iq_pu(), CTRL_runOnLine(), and CTRL_runOnLine_User().

static _iq* CTRL_getIq_ref_pu_addr ( CTRL_Handle  handle)
inlinestatic

Gets the quadrature current (Iq) reference memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The quadrature current reference memory address

Definition at line 435 of file 32b/ctrl.h.

References _CTRL_Obj_::Idq_ref, and _MATH_vec2_::value.

Referenced by CTRL_runPiOnly().

static float_t CTRL_getKctrl_Wb_p_kgm2 ( CTRL_Handle  handle)
inlinestatic

Gets the speed controller constant.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The speed controller constant, Wb/(kg*m^2)

Definition at line 139 of file float/ctrl.h.

References _CTRL_Obj_::Kctrl_Wb_p_kgm2.

_iq CTRL_getKd ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType 
)
inline

Gets the derivative gain (Kd) value from the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlTypeThe controller type
Returns
The Kd value

Definition at line 473 of file 32b/ctrl.h.

References _IQ, CTRL_Type_PID_Id, CTRL_Type_PID_Iq, CTRL_Type_PID_spd, _CTRL_Obj_::Kd_Id, _CTRL_Obj_::Kd_Iq, and _CTRL_Obj_::Kd_spd.

Referenced by CTRL_getGains().

static float_t CTRL_getKi ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType 
)
inline

Gets the integral gain (Ki) value from the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlTypeThe controller type
Returns
The Ki value

Definition at line 447 of file 32b/ctrl.h.

References _IQ, CTRL_Type_PID_Id, CTRL_Type_PID_Iq, CTRL_Type_PID_spd, _CTRL_Obj_::Ki_Id, _CTRL_Obj_::Ki_Iq, and _CTRL_Obj_::Ki_spd.

Referenced by CTRL_getGains(), and CTRL_setup().

static float_t CTRL_getKp ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType 
)
inline

Gets the proportional gain (Kp) value from the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlTypeThe controller type
Returns
The Kp value

Definition at line 499 of file 32b/ctrl.h.

References _IQ, CTRL_Type_PID_Id, CTRL_Type_PID_Iq, CTRL_Type_PID_spd, _CTRL_Obj_::Kp_Id, _CTRL_Obj_::Kp_Iq, and _CTRL_Obj_::Kp_spd.

Referenced by CTRL_getGains(), CTRL_runOnLine(), CTRL_runOnLine_User(), CTRL_runPiOnly(), and CTRL_setup().

float_t CTRL_getLhf ( CTRL_Handle  handle)
inline

Gets the high frequency inductance (Lhf) value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The Lhf value

Definition at line 524 of file 32b/ctrl.h.

References _CTRL_Obj_::Lhf.

_iq CTRL_getMagCurrent_pu ( CTRL_Handle  handle)

Gets the magnetizing current value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The magnetizing current value, pu

Definition at line 134 of file 32b/ctrl.c.

References CTRL_getIdRated_pu().

_iq CTRL_getMaximumSpeed_pu ( CTRL_Handle  handle)

Gets the maximum speed value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The maximum speed value, pu

Definition at line 141 of file 32b/ctrl.c.

References CTRL_getSpd_max_pu().

_iq CTRL_getMaxVsMag_pu ( CTRL_Handle  handle)
inline

Gets the maximum voltage vector.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The maximum voltage vector (value betwen 0 and 4/3)

Definition at line 541 of file 32b/ctrl.h.

References _CTRL_Obj_::maxVsMag_pu.

Referenced by CTRL_runOnLine(), CTRL_runOnLine_User(), and CTRL_runPiOnly().

static float_t CTRL_getMaxVsMag_V ( CTRL_Handle  handle)
inlinestatic

Gets the maximum stator voltage magnitude value.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The maximum stator voltage magnitude value, V

Definition at line 161 of file float/ctrl.h.

References _CTRL_Obj_::maxVsMag_V.

Referenced by CTRL_computeOutputLimits_Id(), and CTRL_computeOutputLimits_Iq().

float_t CTRL_getMotorRatedFlux ( CTRL_Handle  handle)
inline

Gets the motor rated flux from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The motor rated flux, V*sec

Definition at line 558 of file 32b/ctrl.h.

References _CTRL_Obj_::motorParams, and _MOTOR_Params_::ratedFlux_VpHz.

static MOTOR_Type_e CTRL_getMotorType ( CTRL_Handle  handle)
inline

Gets the motor type from the controller.

Gets the motor type.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The motor type

Definition at line 569 of file 32b/ctrl.h.

References _CTRL_Obj_::motorParams, and _MOTOR_Params_::type.

static int_least16_t CTRL_getNumCtrlTicksPerCurrentTick ( CTRL_Handle  handle)
inline

Gets the number of controller clock ticks per current controller clock tick.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The number of controller clock ticks per estimator clock tick
Parameters
[in]handleThe controller (CTRL) handle
Returns
The number of controller clock ticks per controller clock tick

Definition at line 580 of file 32b/ctrl.h.

References _CTRL_Obj_::numCtrlTicksPerCurrentTick.

Referenced by CTRL_run().

static int_least16_t CTRL_getNumCtrlTicksPerSpeedTick ( CTRL_Handle  handle)
inline

Gets the number of controller clock ticks per speed controller clock tick.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The number of controller clock ticks per speed clock tick

Definition at line 591 of file 32b/ctrl.h.

References _CTRL_Obj_::numCtrlTicksPerSpeedTick.

Referenced by CTRL_run().

uint_least16_t CTRL_getNumCtrlTicksPerTrajTick ( CTRL_Handle  handle)
inline

Gets the number of controller clock ticks per trajectory clock tick.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The number of controller clock ticks per trajectory clock tick

Definition at line 602 of file 32b/ctrl.h.

References _CTRL_Obj_::numCtrlTicksPerTrajTick.

Referenced by CTRL_setup(), and CTRL_setup_user().

static int_least16_t CTRL_getNumIsrTicksPerCtrlTick ( CTRL_Handle  handle)
inline

Gets the number of Interrupt Service Routine (ISR) clock ticks per controller clock tick.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The number of Interrupt Service Routine (ISR) clock ticks per controller clock tick

Definition at line 613 of file 32b/ctrl.h.

References _CTRL_Obj_::numIsrTicksPerCtrlTick.

Referenced by CTRL_run().

static float_t CTRL_getRefValue ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType 
)
inlinestatic

Gets the reference value from the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlTypeThe controller type
Returns
The reference value

Definition at line 708 of file float/ctrl.h.

References CTRL_Type_PI_Id, CTRL_Type_PI_Iq, CTRL_Type_PI_spd, PI_getRefValue(), _CTRL_Obj_::piHandle_Id, _CTRL_Obj_::piHandle_Iq, and _CTRL_Obj_::piHandle_spd.

static _iq CTRL_getRefValue_Id_pu ( CTRL_Handle  handle)
inlinestatic

Gets the reference value for the Id current controller.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 649 of file 32b/ctrl.h.

References _IQ, CTRL_getFlag_enableSpeedCtrl(), CTRL_getId_offset_pu(), and CTRL_getId_ref_pu().

Referenced by CTRL_runPiOnly().

static _iq CTRL_getRefValue_Iq_pu ( CTRL_Handle  handle)
inlinestatic

Gets the reference value for the Iq current controller.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 424 of file 32b/ctrl.h.

References CTRL_getIq_offset_pu(), and CTRL_getIq_ref_pu().

Referenced by CTRL_runPiOnly().

_iq CTRL_getRefValue_pu ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType 
)
inline

Gets the reference value from the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlTypeThe controller type
Returns
The reference value, pu

Definition at line 625 of file 32b/ctrl.h.

References _IQ, CTRL_Type_PID_Id, CTRL_Type_PID_Iq, CTRL_Type_PID_spd, PID_getRefValue(), _CTRL_Obj_::pidHandle_Id, _CTRL_Obj_::pidHandle_Iq, and _CTRL_Obj_::pidHandle_spd.

static _iq CTRL_getRefValue_spd_pu ( CTRL_Handle  handle)
inlinestatic

Gets the reference value for the speed controller.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 668 of file 32b/ctrl.h.

References _CTRL_Obj_::speed_ref_pu.

Referenced by CTRL_runPiOnly().

float_t CTRL_getRhf ( CTRL_Handle  handle)
inline

Gets the high frequency resistance (Rhf) value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The Rhf value

Definition at line 679 of file 32b/ctrl.h.

References _CTRL_Obj_::Rhf.

float_t CTRL_getRoverL ( CTRL_Handle  handle)
inline

Gets the R/L value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The the R/L value

Definition at line 690 of file 32b/ctrl.h.

References _CTRL_Obj_::RoverL.

_iq CTRL_getSpd_int_ref_pu ( CTRL_Handle  handle)
inline

Gets the output speed intermediate reference value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The output speed intermediate reference value, pu

Definition at line 745 of file 32b/ctrl.h.

References TRAJ_getIntValue(), and _CTRL_Obj_::trajHandle_spd.

_iq CTRL_getSpd_max_pu ( CTRL_Handle  handle)
inline

Gets the maximum speed value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The maximum speed value, pu

Definition at line 701 of file 32b/ctrl.h.

References _CTRL_Obj_::spd_max.

Referenced by CTRL_getMaximumSpeed_pu().

_iq * CTRL_getSpd_out_addr ( CTRL_Handle  handle)
inline

Gets the output speed memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The output speed memory address

Definition at line 712 of file 32b/ctrl.h.

References _CTRL_Obj_::spd_out.

Referenced by CTRL_runOnLine(), and CTRL_runOnLine_User().

_iq CTRL_getSpd_out_pu ( CTRL_Handle  handle)
inline

Gets the output speed value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The output speed value, pu

Definition at line 723 of file 32b/ctrl.h.

References _CTRL_Obj_::spd_out.

Referenced by CTRL_runOnLine(), and CTRL_runOnLine_User().

_iq CTRL_getSpd_ref_pu ( CTRL_Handle  handle)
inline

Gets the output speed reference value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The output speed reference value, pu

Definition at line 734 of file 32b/ctrl.h.

References _CTRL_Obj_::spd_ref.

static float_t CTRL_getSpeed_fb_Hz ( CTRL_Handle  handle)
inlinestatic

Gets the feedback speed value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The feedback speed value, Hz

Definition at line 738 of file float/ctrl.h.

References _CTRL_Obj_::speed_fb_Hz.

Referenced by CTRL_run().

static float_t CTRL_getSpeed_out_A ( CTRL_Handle  handle)
inlinestatic

Gets the output value from the speed controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The output value, A

Definition at line 749 of file float/ctrl.h.

References _CTRL_Obj_::speed_out_A.

Referenced by CTRL_run().

static float_t* CTRL_getSpeed_out_A_addr ( CTRL_Handle  handle)
inlinestatic

Gets the output value memory address from the speed controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The output value memory address

Definition at line 760 of file float/ctrl.h.

References _CTRL_Obj_::speed_out_A.

Referenced by CTRL_run().

static float_t CTRL_getSpeed_outMax_A ( CTRL_Handle  handle)
inlinestatic

Gets the maximum value for the speed controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The maximum output value, A

Definition at line 771 of file float/ctrl.h.

References _CTRL_Obj_::speed_outMax_A.

Referenced by CTRL_run().

static _iq CTRL_getSpeed_outMax_pu ( CTRL_Handle  handle)
inlinestatic

Gets the maximum output value for the speed controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The maximum output value, pu

Definition at line 756 of file 32b/ctrl.h.

References _CTRL_Obj_::speed_outMax_pu.

Referenced by CTRL_runPiOnly().

static float_t CTRL_getSpeed_outMin_A ( CTRL_Handle  handle)
inlinestatic

Gets the minimum value for the speed controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The minimum output value, A

Definition at line 782 of file float/ctrl.h.

References _CTRL_Obj_::speed_outMin_A.

Referenced by CTRL_run().

static float_t CTRL_getSpeed_ref_Hz ( CTRL_Handle  handle)
inlinestatic

Gets the output speed reference value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The output speed reference value, Hz

Definition at line 793 of file float/ctrl.h.

References _CTRL_Obj_::speed_ref_Hz.

Referenced by CTRL_run().

static float_t CTRL_getSpeedCtrlPeriod_sec ( CTRL_Handle  handle)
inlinestatic

Gets the speed controller period.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The speed controller period, sec

Definition at line 804 of file float/ctrl.h.

References _CTRL_Obj_::speedCtrlPeriod_sec.

static CTRL_State_e CTRL_getState ( CTRL_Handle  handle)
inline

Gets the controller state.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The controller state

Definition at line 767 of file 32b/ctrl.h.

References _CTRL_Obj_::state.

Referenced by CTRL_isError(), CTRL_isIdle(), CTRL_isNotIdle(), CTRL_run(), CTRL_setup_user(), and CTRL_updateState().

uint_least32_t CTRL_getTrajFreq ( CTRL_Handle  handle)
inline

Gets the trajectory execution frequency.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The trajectory execution frequency, Hz

Definition at line 778 of file 32b/ctrl.h.

References _CTRL_Obj_::trajFreq_Hz.

_iq CTRL_getTrajPeriod_sec ( CTRL_Handle  handle)
inline

Gets the trajectory execution period.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The trajectory execution period, sec

Definition at line 789 of file 32b/ctrl.h.

References _CTRL_Obj_::trajPeriod_sec.

void CTRL_getTrajStep ( CTRL_Handle  handle)

Gets the trajectory step size.

Parameters
[in]handleThe controller (CTRL) handle
static float_t CTRL_getUi ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType 
)
inline

Gets the integrator (Ui) value from the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlTypeThe controller type
Returns
The Ui value
Parameters
[in]handleThe controller (CTRL) handle
Returns
The Ui value

Definition at line 806 of file 32b/ctrl.h.

References _IQ, CTRL_Type_PID_Id, CTRL_Type_PID_Iq, CTRL_Type_PID_spd, _CTRL_Obj_::Ui_Id, _CTRL_Obj_::Ui_Iq, and _CTRL_Obj_::Ui_spd.

Referenced by CTRL_setup().

MATH_vec2 * CTRL_getVab_in_addr ( CTRL_Handle  handle)
inline

Gets the alpha/beta voltage input vector memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The alpha/beta voltage input vector memory address

Definition at line 831 of file 32b/ctrl.h.

References _CTRL_Obj_::Vab_in.

Referenced by CTRL_runOnLine(), and CTRL_runOnLine_User().

void CTRL_getVab_in_pu ( CTRL_Handle  handle,
MATH_vec2 pVab_in_pu 
)

Gets the alpha/beta voltage input vector values from the controller.

Parameters
[in]handleThe controller (CTRL) handle
[out]pVab_in_puThe vector for the alpha/beta voltage input vector values, pu

Definition at line 148 of file 32b/ctrl.c.

References _CTRL_Obj_::Vab_in, and _MATH_vec2_::value.

MATH_vec2 * CTRL_getVab_out_addr ( CTRL_Handle  handle)
inline

Gets the alpha/beta voltage output vector memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The alpha/beta voltage output vector memory address

Definition at line 848 of file 32b/ctrl.h.

References _CTRL_Obj_::Vab_out.

Referenced by CTRL_runOnLine(), and CTRL_runOnLine_User().

void CTRL_getVab_out_pu ( CTRL_Handle  handle,
MATH_vec2 pVab_out_pu 
)

Gets the alpha/beta voltage output vector values from the controller.

Parameters
[in]handleThe controller (CTRL) handle
[out]pVab_out_puThe vector for the alpha/beta voltage output vector values, pu

Definition at line 159 of file 32b/ctrl.c.

References _CTRL_Obj_::Vab_out, and _MATH_vec2_::value.

static float_t CTRL_getVd_offset_V ( CTRL_Handle  handle)
inlinestatic

Gets the direct offset voltage (Vd_offset) value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct voltage offset value, V

Definition at line 878 of file float/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_offset_V.

Referenced by CTRL_run().

static float_t* CTRL_getVd_offset_V_addr ( CTRL_Handle  handle)
inlinestatic

Gets the direct offset voltage (Vd_offset) value memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct offset voltage value memory address

Definition at line 889 of file float/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_offset_V.

_iq * CTRL_getVd_out_addr ( CTRL_Handle  handle)
inline

Gets the direct voltage output value memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct voltage output value memory address

Definition at line 865 of file 32b/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_out.

Referenced by CTRL_runOnLine(), CTRL_runOnLine_User(), and CTRL_runPiOnly().

_iq CTRL_getVd_out_pu ( CTRL_Handle  handle)
inline

Gets the direct voltage output value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct voltage output value, pu

Definition at line 876 of file 32b/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_out.

Referenced by CTRL_runOnLine(), CTRL_runOnLine_User(), and CTRL_runPiOnly().

static float_t CTRL_getVd_sf ( CTRL_Handle  handle)
inlinestatic

Gets the direct voltage scale factor.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct voltage scale factor

Definition at line 150 of file float/ctrl.h.

References _CTRL_Obj_::Vd_sf.

Referenced by CTRL_computeOutputLimits_Id().

static float_t CTRL_getVd_V ( CTRL_Handle  handle)
inlinestatic

Gets the direct voltage (Vd) value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct voltage value, V

Definition at line 856 of file float/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_V.

static float_t* CTRL_getVd_V_addr ( CTRL_Handle  handle)
inlinestatic

Gets the direct voltage (Vd) value memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct voltage value memory address

Definition at line 867 of file float/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_V.

static void CTRL_getVdq_offset_V ( CTRL_Handle  handle,
MATH_vec2 pVdq_offset_V 
)
inlinestatic

Gets the direct/quadrature offset voltage (Vdq_offset) vector values from the controller.

Parameters
[in]handleThe controller (CTRL) handle
[out]pVdq_offset_VThe vector for the direct/quadrature offset voltage vector values, V

Definition at line 925 of file float/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_offset_V.

static MATH_vec2* CTRL_getVdq_offset_V_addr ( CTRL_Handle  handle)
inlinestatic

Gets the direct/quadrature offset voltage (Vdq_offset) vector memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct/quadrature offset voltage vector memory address

Definition at line 939 of file float/ctrl.h.

References _CTRL_Obj_::Vdq_offset_V.

MATH_vec2 * CTRL_getVdq_out_addr ( CTRL_Handle  handle)
inline

Gets the direct/quadrature voltage output vector memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct/quadrature voltage output vector memory address

Definition at line 887 of file 32b/ctrl.h.

References _CTRL_Obj_::Vdq_out.

Referenced by CTRL_runOnLine(), and CTRL_runOnLine_User().

void CTRL_getVdq_out_pu ( CTRL_Handle  handle,
MATH_vec2 pVdq_out_pu 
)

Gets the direct/quadrature voltage output vector values from the controller.

Parameters
[in]handleThe controller (CTRL) handle
[out]pVdq_out_puThe vector for the direct/quadrature voltage output vector values, pu

Definition at line 170 of file 32b/ctrl.c.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_out.

static void CTRL_getVdq_V ( CTRL_Handle  handle,
MATH_vec2 pVdq_V 
)
inlinestatic

Gets the direct/quadrature voltage (Vdq) vector values from the controller.

Parameters
[in]handleThe controller (CTRL) handle
[out]pVdq_The vector for the direct/quadrature voltage vector values, V

Definition at line 900 of file float/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_V.

Referenced by CTRL_run().

static MATH_vec2* CTRL_getVdq_V_addr ( CTRL_Handle  handle)
inlinestatic

Gets the direct/quadrature voltage (Vdq) vector memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The direct/quadrature voltage vector memory address

Definition at line 914 of file float/ctrl.h.

References _CTRL_Obj_::Vdq_V.

void CTRL_getVersion ( CTRL_Handle  handle,
CTRL_Version pVersion 
)

Gets the controller version number.

Parameters
[in]handleThe controller (CTRL) handle
[in]pVersionA pointer to the version

Definition at line 58 of file float/ctrl.c.

References _CTRL_Version_::major, _CTRL_Version_::minor, _CTRL_Version_::rsvd, _CTRL_Version_::targetProc, and _CTRL_Obj_::version.

static float_t CTRL_getVq_offset_V ( CTRL_Handle  handle)
inlinestatic

Gets the quadrature offset voltage (Vq_offset) value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The quadrature voltage offset value, V

Definition at line 978 of file float/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_offset_V.

Referenced by CTRL_run().

static float_t* CTRL_getVq_offset_V_addr ( CTRL_Handle  handle)
inlinestatic

Gets the quadrature offset voltage (Vq_offset) value memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The quadrature voltage value memory address

Definition at line 989 of file float/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_offset_V.

_iq * CTRL_getVq_out_addr ( CTRL_Handle  handle)
inline

Gets the quadrature voltage output value memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The quadrature voltage output value memory address

Definition at line 910 of file 32b/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_out.

Referenced by CTRL_runOnLine(), CTRL_runOnLine_User(), and CTRL_runPiOnly().

_iq CTRL_getVq_out_pu ( CTRL_Handle  handle)
inline

Gets the quadrature voltage output value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The quadrature voltage output value, pu

Definition at line 921 of file 32b/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_out.

static float_t CTRL_getVq_V ( CTRL_Handle  handle)
inlinestatic

Gets the quadrature voltage (Vq) value from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The quadrature voltage value, pu

Definition at line 956 of file float/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_V.

static float_t* CTRL_getVq_V_addr ( CTRL_Handle  handle)
inlinestatic

Gets the quadrature voltage (Vq) value memory address from the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
The quadrature voltage value memory address

Definition at line 967 of file float/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_V.

static int_least32_t CTRL_getWaitTime ( CTRL_Handle  handle,
const CTRL_State_e  state 
)
inline

Gets the wait time for a given state.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlStateThe controller state
Returns
The wait time, controller clock counts
Parameters
[in]handleThe controller (CTRL) handle
[in]stateThe controller state
Returns
The wait time, controller clock counts

Definition at line 933 of file 32b/ctrl.h.

References _CTRL_Obj_::waitTimes.

Referenced by CTRL_updateState().

void CTRL_getWaitTimes ( CTRL_Handle  handle,
uint_least32_t *  pWaitTimes 
)

Gets the wait times from the estimator.

Parameters
[in]handleThe controller (CTRL) handle
[in]pWaitTimesA pointer to a vector for the wait times, estimator clock counts

Definition at line 181 of file 32b/ctrl.c.

References CTRL_numStates, and _CTRL_Obj_::waitTimes.

void CTRL_getWaitTimes ( CTRL_Handle  handle,
int_least32_t *  pWaitTimes 
)

Gets the wait times from the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pWaitTimesA pointer to a vector for the wait times, isr clock counts

Definition at line 71 of file float/ctrl.c.

References CTRL_numStates, and _CTRL_Obj_::waitTimes.

static void CTRL_incrCounter_current ( CTRL_Handle  handle)
inline

Increments the current counter.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 949 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_current.

Referenced by CTRL_run(), CTRL_setup(), and CTRL_setup_user().

static void CTRL_incrCounter_isr ( CTRL_Handle  handle)
inline

Increments the isr counter.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 967 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_isr.

Referenced by CTRL_run().

static void CTRL_incrCounter_speed ( CTRL_Handle  handle)
inline

Increments the speed counter.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 985 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_speed.

Referenced by CTRL_run(), CTRL_setup(), and CTRL_setup_user().

static void CTRL_incrCounter_state ( CTRL_Handle  handle)
inline

Increments the state counter.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 1003 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_state.

Referenced by CTRL_run(), and CTRL_setup_user().

void CTRL_incrCounter_traj ( CTRL_Handle  handle)
inline

Increments the trajectory counter.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 1021 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_traj.

Referenced by CTRL_run(), and CTRL_setup_user().

CTRL_Handle CTRL_init ( void *  pMemory,
const size_t  numBytes 
)

Initializes the controller.

Parameters
[in]pMemoryA pointer to the memory for the controller object
[in]numBytesThe number of bytes allocated for the controller object, bytes
Returns
The controller (CTRL) object handle

Definition at line 85 of file float/ctrl.c.

References CTRL_MAJOR_RELEASE_NUMBER, CTRL_MINOR_RELEASE_NUMBER, CTRL_setVersion(), CTRL_TargetProc_2806x, _CTRL_Obj_::pi_Id, PI_init(), _CTRL_Obj_::pi_Iq, _CTRL_Obj_::pi_spd, _CTRL_Obj_::piHandle_Id, _CTRL_Obj_::piHandle_Iq, and _CTRL_Obj_::piHandle_spd.

CTRL_Handle CTRL_initCtrl ( const uint_least8_t  estNumber,
void *  pMemory,
const size_t  numBytes 
)

Initializes a specified controller.

Initializes all handles required for field oriented control and FAST observer interface. Returns a handle to the CTRL object.

Parameters
[in]ctrlNumberThe controller number
[in]estNumberThe estimator number
Returns
The controller (CTRL) object handle
static bool CTRL_isEnabled ( CTRL_Handle  handle)
inlinestatic

Determines if the controller is enabled.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 1120 of file float/ctrl.h.

References _CTRL_Obj_::flag_enable.

static bool CTRL_isError ( CTRL_Handle  handle)
inline

Determines if there is a controller error.

Parameters
[in]handleThe controller (CTRL) handle
Returns
A boolean value denoting if there is a controller error (true) or not (false)

Definition at line 1053 of file 32b/ctrl.h.

References CTRL_getState(), and CTRL_State_Error.

static bool CTRL_isIdle ( CTRL_Handle  handle)
inlinestatic

Determines if the controller is in the idle state.

Parameters
[in]handleThe controller (CTRL) handle
Returns
A boolean value denoting if the controller is in the idle state (true) or not (false)

Definition at line 1150 of file float/ctrl.h.

References CTRL_getState(), and CTRL_State_Idle.

static bool CTRL_isNotIdle ( CTRL_Handle  handle)
inlinestatic

Determines if the controller is not in the idle state.

Parameters
[in]handleThe controller (CTRL) handle
Returns
A boolean value denoting if the controller is in the idle state (false) or not (true)

Definition at line 1167 of file float/ctrl.h.

References CTRL_getState(), and CTRL_State_Idle.

Referenced by CTRL_updateState().

void CTRL_reset ( CTRL_Handle  handle)
static void CTRL_resetCounter_current ( CTRL_Handle  handle)
inline

Resets the current counter.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 1071 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_current.

Referenced by CTRL_run(), CTRL_runOnLine(), CTRL_runOnLine_User(), CTRL_runPiOnly(), and CTRL_setParams().

static void CTRL_resetCounter_isr ( CTRL_Handle  handle)
inline

Resets the isr counter.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 1083 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_isr.

Referenced by CTRL_run(), and CTRL_setParams().

static void CTRL_resetCounter_speed ( CTRL_Handle  handle)
inline

Resets the speed counter.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 1095 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_speed.

Referenced by CTRL_run(), CTRL_runOnLine(), CTRL_runOnLine_User(), CTRL_runPiOnly(), and CTRL_setParams().

static void CTRL_resetCounter_state ( CTRL_Handle  handle)
inline

Resets the state counter.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 1107 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_state.

Referenced by CTRL_setParams(), and CTRL_updateState().

void CTRL_resetCounter_traj ( CTRL_Handle  handle)
inline

Resets the trajectory counter.

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 1119 of file 32b/ctrl.h.

References _CTRL_Obj_::counter_traj.

Referenced by CTRL_setParams(), CTRL_setup(), and CTRL_setup_user().

void CTRL_run ( CTRL_Handle  handle,
HAL_Handle  halHandle,
const HAL_AdcData_t pAdcData,
HAL_PwmData_t pPwmData,
uint32_t  electricalAngle 
)

Runs the controller.

The CTRL_run function implements the field oriented control. There are two parts to CTRL_run, CTRL_runOffline, CTRL_runOnline, and CTRL_runOnlineUser.

Parameters
[in]handleThe controller (CTRL) handle
[in]halHandleThe hardware abstraction layer (HAL) handle
[in]pAdcDataThe pointer to the ADC data
[out]pPwmDataThe pointer to the PWM data
[in]electricalAngleThe electrical angle in Q24

Definition at line 195 of file ctrlQEP.c.

References _IQ, CTRL_getCount_isr(), CTRL_getNumIsrTicksPerCtrlTick(), CTRL_getState(), CTRL_incrCounter_current(), CTRL_incrCounter_isr(), CTRL_incrCounter_speed(), CTRL_incrCounter_state(), CTRL_incrCounter_traj(), CTRL_resetCounter_isr(), CTRL_runOffLine(), CTRL_runOnLine(), CTRL_runOnLine_User(), CTRL_State_Idle, CTRL_State_OffLine, CTRL_State_OnLine, EST_getState(), EST_State_MotorIdentified, _CTRL_Obj_::estHandle, _CTRL_Obj_::numIsrTicksPerCtrlTick, _HAL_PwmData_t_::Tabc, and _MATH_vec3_::value.

void CTRL_run ( CTRL_Handle  handle,
HAL_Handle  halHandle,
const HAL_AdcData_t pAdcData,
HAL_PwmData_t pPwmData 
)

Runs the controller.

The CTRL_run function implements the field oriented control. There are two parts to CTRL_run, CTRL_runOffline, CTRL_runOnline, and CTRL_runOnlineUser.

Parameters
[in]handleThe controller (CTRL) handle
[in]halHandleThe hardware abstraction layer (HAL) handle
[in]pAdcDataThe pointer to the ADC data
[out]pPwmDataThe pointer to the PWM data

Definition at line 195 of file 32b/ctrl.c.

References _IQ, CTRL_getCount_isr(), CTRL_getNumIsrTicksPerCtrlTick(), CTRL_getState(), CTRL_incrCounter_current(), CTRL_incrCounter_isr(), CTRL_incrCounter_speed(), CTRL_incrCounter_state(), CTRL_incrCounter_traj(), CTRL_resetCounter_isr(), CTRL_runOffLine(), CTRL_runOnLine(), CTRL_runOnLine_User(), CTRL_State_Idle, CTRL_State_OffLine, CTRL_State_OnLine, EST_getState(), EST_State_MotorIdentified, _CTRL_Obj_::estHandle, _HAL_PwmData_t_::Tabc, and _MATH_vec3_::value.

static void CTRL_run ( CTRL_Handle  handle,
MATH_vec2 pVdq_V 
)
inlinestatic
void CTRL_runOffLine ( CTRL_Handle  handle,
HAL_Handle  halHandle,
const HAL_AdcData_t pAdcData,
HAL_PwmData_t pPwmData 
)
inline

Runs the offline controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]halHandleThe hardware abstraction layer (HAL) handle
[in]pAdcDataThe pointer to the ADC data
[out]pPwmDataThe pointer to the PWM data

Definition at line 2089 of file 32b/ctrl.h.

References _IQ, HAL_runOffsetEst(), _HAL_PwmData_t_::Tabc, and _MATH_vec3_::value.

Referenced by CTRL_run().

void CTRL_runOnLine ( CTRL_Handle  handle,
const HAL_AdcData_t pAdcData,
HAL_PwmData_t pPwmData 
)
inline

Runs the online controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pAdcDataThe pointer to the ADC data
[out]pPwmDataThe pointer to the PWM data

Definition at line 2158 of file 32b/ctrl.h.

References _IQ, _IQabs, _IQmpy, CLARKE_run(), _CTRL_Obj_::clarkeHandle_I, _CTRL_Obj_::clarkeHandle_V, CTRL_computePhasor(), CTRL_doCurrentCtrl(), CTRL_doSpeedCtrl(), CTRL_getFlag_enableDcBusComp(), CTRL_getFlag_enableSpeedCtrl(), CTRL_getIab_in_addr(), CTRL_getId_in_pu(), CTRL_getId_ref_pu(), CTRL_getIdq_in_addr(), CTRL_getIq_in_pu(), CTRL_getIq_ref_pu(), CTRL_getKp(), CTRL_getMaxVsMag_pu(), CTRL_getSpd_out_addr(), CTRL_getSpd_out_pu(), CTRL_getVab_in_addr(), CTRL_getVab_out_addr(), CTRL_getVd_out_addr(), CTRL_getVd_out_pu(), CTRL_getVdq_out_addr(), CTRL_getVq_out_addr(), CTRL_resetCounter_current(), CTRL_resetCounter_speed(), CTRL_setSpd_out_pu(), CTRL_Type_PID_Id, CTRL_Type_PID_Iq, CTRL_useZeroIq_ref(), _HAL_AdcData_t_::dcBus, EST_doCurrentCtrl(), EST_doSpeedCtrl(), EST_getAngle_pu(), EST_getFm_pu(), EST_getOneOverDcBus_pu(), EST_run(), EST_setId_ref_pu(), EST_setIq_ref_pu(), EST_updateId_ref_pu(), _CTRL_Obj_::estHandle, _HAL_AdcData_t_::I, IPARK_run(), IPARK_setPhasor(), _CTRL_Obj_::iparkHandle, PARK_run(), PARK_setPhasor(), _CTRL_Obj_::parkHandle, PID_run(), PID_run_spd(), PID_setKp(), PID_setMinMax(), PID_setUi(), _CTRL_Obj_::pidHandle_Id, _CTRL_Obj_::pidHandle_Iq, _CTRL_Obj_::pidHandle_spd, SVGEN_run(), _CTRL_Obj_::svgenHandle, _HAL_PwmData_t_::Tabc, TRAJ_getIntValue(), _CTRL_Obj_::trajHandle_Id, _CTRL_Obj_::trajHandle_spd, _CTRL_Obj_::trajHandle_spdMax, and _HAL_AdcData_t_::V.

Referenced by CTRL_run().

void CTRL_runOnLine_User ( CTRL_Handle  handle,
const HAL_AdcData_t pAdcData,
HAL_PwmData_t pPwmData,
uint32_t  electricalAngle 
)
inline

Runs the online user controller.

An implementation of the field oriented control. The online user controller is executed in user's memory i.e. RAM/FLASH and can be changed in any way suited to the user.

Parameters
[in]handleThe controller (CTRL) handle
[in]pAdcDataThe pointer to the ADC data
[out]pPwmDataThe pointer to the PWM data
[in]electricalAngleThe electrical angle in Q24

Definition at line 2064 of file ctrlQEP.h.

References _IQmpy, _IQsqrt, _CTRL_Obj_::angle_pu, CLARKE_run(), _CTRL_Obj_::clarkeHandle_I, _CTRL_Obj_::clarkeHandle_V, CTRL_angleDelayComp(), CTRL_computePhasor(), CTRL_doCurrentCtrl(), CTRL_doSpeedCtrl(), CTRL_getFlag_enableDcBusComp(), CTRL_getFlag_enableSpeedCtrl(), CTRL_getIab_in_addr(), CTRL_getId_in_pu(), CTRL_getId_ref_pu(), CTRL_getIdq_in_addr(), CTRL_getIq_in_pu(), CTRL_getIq_ref_pu(), CTRL_getKp(), CTRL_getMaxVsMag_pu(), CTRL_getSpd_out_addr(), CTRL_getSpd_out_pu(), CTRL_getVab_in_addr(), CTRL_getVab_out_addr(), CTRL_getVd_out_addr(), CTRL_getVd_out_pu(), CTRL_getVdq_out_addr(), CTRL_getVq_out_addr(), CTRL_resetCounter_current(), CTRL_resetCounter_speed(), CTRL_Type_PID_Id, CTRL_Type_PID_Iq, _HAL_AdcData_t_::dcBus, EST_getAngle_pu(), EST_getFm_pu(), EST_getOneOverDcBus_pu(), EST_run(), EST_updateId_ref_pu(), _CTRL_Obj_::estHandle, _HAL_AdcData_t_::I, IPARK_run(), IPARK_setPhasor(), _CTRL_Obj_::iparkHandle, PARK_run(), PARK_setPhasor(), _CTRL_Obj_::parkHandle, PID_run(), PID_run_spd(), PID_setKp(), PID_setMinMax(), _CTRL_Obj_::pidHandle_Id, _CTRL_Obj_::pidHandle_Iq, _CTRL_Obj_::pidHandle_spd, SVGEN_run(), _CTRL_Obj_::svgenHandle, _HAL_PwmData_t_::Tabc, TRAJ_getIntValue(), _CTRL_Obj_::trajHandle_Id, _CTRL_Obj_::trajHandle_spd, _CTRL_Obj_::trajHandle_spdMax, and _HAL_AdcData_t_::V.

void CTRL_runOnLine_User ( CTRL_Handle  handle,
const HAL_AdcData_t pAdcData,
HAL_PwmData_t pPwmData 
)
inline

Runs the online user controller.

An implementation of the field oriented control. The online user controller is executed in user's memory i.e. RAM/FLASH and can be changed in any way suited to the user.

Parameters
[in]handleThe controller (CTRL) handle
[in]pAdcDataThe pointer to the ADC data
[out]pPwmDataThe pointer to the PWM data

Definition at line 2343 of file 32b/ctrl.h.

References _IQmpy, _IQsqrt, CLARKE_run(), _CTRL_Obj_::clarkeHandle_I, _CTRL_Obj_::clarkeHandle_V, CTRL_angleDelayComp(), CTRL_computePhasor(), CTRL_doCurrentCtrl(), CTRL_doSpeedCtrl(), CTRL_getFlag_enableDcBusComp(), CTRL_getFlag_enableSpeedCtrl(), CTRL_getIab_in_addr(), CTRL_getId_in_pu(), CTRL_getId_ref_pu(), CTRL_getIdq_in_addr(), CTRL_getIq_in_pu(), CTRL_getIq_ref_pu(), CTRL_getKp(), CTRL_getMaxVsMag_pu(), CTRL_getSpd_out_addr(), CTRL_getSpd_out_pu(), CTRL_getVab_in_addr(), CTRL_getVab_out_addr(), CTRL_getVd_out_addr(), CTRL_getVd_out_pu(), CTRL_getVdq_out_addr(), CTRL_getVq_out_addr(), CTRL_resetCounter_current(), CTRL_resetCounter_speed(), CTRL_Type_PID_Id, CTRL_Type_PID_Iq, _HAL_AdcData_t_::dcBus, EST_getAngle_pu(), EST_getFm_pu(), EST_getOneOverDcBus_pu(), EST_run(), EST_updateId_ref_pu(), _CTRL_Obj_::estHandle, _HAL_AdcData_t_::I, IPARK_run(), IPARK_setPhasor(), _CTRL_Obj_::iparkHandle, PARK_run(), PARK_setPhasor(), _CTRL_Obj_::parkHandle, PID_run(), PID_run_spd(), PID_setKp(), PID_setMinMax(), _CTRL_Obj_::pidHandle_Id, _CTRL_Obj_::pidHandle_Iq, _CTRL_Obj_::pidHandle_spd, SVGEN_run(), _CTRL_Obj_::svgenHandle, _HAL_PwmData_t_::Tabc, TRAJ_getIntValue(), _CTRL_Obj_::trajHandle_Id, _CTRL_Obj_::trajHandle_spd, _CTRL_Obj_::trajHandle_spdMax, and _HAL_AdcData_t_::V.

Referenced by CTRL_run().

void CTRL_runPiOnly ( CTRL_Handle  handle)
inline
void CTRL_runTraj ( CTRL_Handle  handle)

Runs the trajectory.

Parameters
[in]handleThe controller (CTRL) handle

Referenced by CTRL_setup(), and CTRL_setup_user().

static void CTRL_setAngle_pu ( CTRL_Handle  handle,
const _iq  angle_pu 
)
inlinestatic

Sets the angle value, pu.

Parameters
[in]handleThe controller (CTRL) handle
[in]angle_puThe angle value, pu

Definition at line 1150 of file 32b/ctrl.h.

References _CTRL_Obj_::angle_pu.

Referenced by CTRL_setup_user().

static void CTRL_setBWc_rps ( CTRL_Handle  handle,
const float_t  BWc_rps 
)
inlinestatic

Sets the current controller bandwidth.

Parameters
[in]handleThe controller (CTRL) handle
[in]BWc_rpsThe current controller bandwidth, rad/sec

Definition at line 1237 of file float/ctrl.h.

References _CTRL_Obj_::BWc_rps.

Referenced by CTRL_setParams().

static void CTRL_setBWdelta ( CTRL_Handle  handle,
const float_t  BWdelta 
)
inlinestatic

Sets the bandwidth scale factor used to maximize phase margin.

Parameters
[in]handleThe controller (CTRL) handle
[in]BWdeltaThe bandwidth scale factor

Definition at line 1250 of file float/ctrl.h.

References _CTRL_Obj_::BWdelta.

Referenced by CTRL_setParams().

void CTRL_setCtrlFreq_Hz ( CTRL_Handle  handle,
const uint_least32_t  ctrlFreq_Hz 
)
inline

Sets the controller frequency.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlFreq_HzThe controller frequency, Hz

Definition at line 1163 of file 32b/ctrl.h.

References _CTRL_Obj_::ctrlFreq_Hz.

Referenced by CTRL_setParams().

static void CTRL_setCtrlFreq_Hz ( CTRL_Handle  handle,
const float_t  ctrlFreq_Hz 
)
inlinestatic

Sets the controller frequency.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlFreq_HzThe controller frequency, Hz

Definition at line 1263 of file float/ctrl.h.

References _CTRL_Obj_::ctrlFreq_Hz.

static void CTRL_setCtrlPeriod_sec ( CTRL_Handle  handle,
const float_t  ctrlPeriod_sec 
)
inline

Sets the controller execution period.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlPeriod_secThe controller execution period, sec

Definition at line 1176 of file 32b/ctrl.h.

References _CTRL_Obj_::ctrlPeriod_sec.

Referenced by CTRL_setParams().

static void CTRL_setCurrentCtrlPeriod_sec ( CTRL_Handle  handle,
const float_t  currentCtrlPeriod_sec 
)
inlinestatic

Sets the current controller period value.

Parameters
[in]handleThe controller (CTRL) handle
[in]currentCtrlPeriod_secThe current controller period value, sec

Definition at line 1289 of file float/ctrl.h.

References _CTRL_Obj_::currentCtrlPeriod_sec.

Referenced by CTRL_setParams().

static void CTRL_setErrorCode ( CTRL_Handle  handle,
const CTRL_ErrorCode_e  errorCode 
)
inline

Sets the error code in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]errorCodeThe error code

Definition at line 1189 of file 32b/ctrl.h.

References _CTRL_Obj_::errorCode.

Referenced by CTRL_checkForErrors(), and CTRL_setParams().

void CTRL_setEstParams ( EST_Handle  estHandle,
USER_Params pUserParams 
)

Sets the default estimator parameters.

Copies all scale factors that are defined in the file user.h and used by CTRL into the CTRL object.

Parameters
[in]estHandleThe estimator (EST) handle
[in]pUserParamsThe pointer to the user parameters

Referenced by CTRL_setParams().

static void CTRL_setFlag_enable ( CTRL_Handle  handle,
const bool  state 
)
inlinestatic

Sets the enable controller flag value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]stateThe desired state

Definition at line 1315 of file float/ctrl.h.

References _CTRL_Obj_::flag_enable.

Referenced by CTRL_setParams().

void CTRL_setFlag_enableCtrl ( CTRL_Handle  handle,
const bool  state 
)
inline

Sets the enable controller flag value in the estimator.

Enables/Disables the sensorless controller. The first time this function is called and the function CTRL_setFlag_enableUserMotorParams() is not set true, motor commissioning is performed and then subsequent times it is called the motor starts to run.

Parameters
[in]handleThe controller (CTRL) handle
[in]stateThe desired state

Definition at line 1214 of file 32b/ctrl.h.

References _CTRL_Obj_::flag_enableCtrl.

Referenced by CTRL_setParams(), and CTRL_updateState().

static void CTRL_setFlag_enableCurrentCtrl ( CTRL_Handle  handle,
const bool  state 
)
inlinestatic

Sets the enable current controllers flag value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]stateThe desired state

Definition at line 1227 of file 32b/ctrl.h.

References _CTRL_Obj_::flag_enableCurrentCtrl.

Referenced by CTRL_setParams(), and CTRL_setup_user().

void CTRL_setFlag_enableDcBusComp ( CTRL_Handle  handle,
const bool  state 
)
inline

Sets the enable DC bus compensation flag value in the estimator.

The DC bus compensation algorithm will compensate the Iq and Id PI controller's proportional gains for DC bus variations.

Parameters
[in]handleThe controller (CTRL) handle
[in]stateThe desired state

Definition at line 1242 of file 32b/ctrl.h.

References _CTRL_Obj_::flag_enableDcBusComp.

Referenced by CTRL_setParams().

void CTRL_setFlag_enableOffset ( CTRL_Handle  handle,
const bool  state 
)
inline

Sets the enable offset flag value in the estimator.

Parameters
[in]handleThe controller (CTRL) handle
[in]stateThe desired state

Definition at line 1271 of file 32b/ctrl.h.

References _CTRL_Obj_::flag_enableOffset.

Referenced by CTRL_setParams().

void CTRL_setFlag_enablePowerWarp ( CTRL_Handle  handle,
const bool  state 
)
inline

Sets the PowerWarp enable flag value in the estimator.

PowerWarp is only used when controlling an induction motor. PowerWarp adjusts field levels so that the least amount of power is used according to the load on the motor.

Parameters
[in]handleThe controller (CTRL) handle
[in]stateThe desired state

Definition at line 1258 of file 32b/ctrl.h.

References _CTRL_Obj_::flag_enablePowerWarp.

Referenced by CTRL_setParams().

static void CTRL_setFlag_enableSpeedCtrl ( CTRL_Handle  handle,
const bool  state 
)
inline

Sets the enable speed control value in the estimator.

Sets the enable speed control value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]stateThe desired state

Definition at line 1284 of file 32b/ctrl.h.

References _CTRL_Obj_::flag_enableSpeedCtrl.

Referenced by CTRL_setParams(), CTRL_setup(), and CTRL_setup_user().

void CTRL_setFlag_enableUserMotorParams ( CTRL_Handle  handle,
const bool  state 
)
inline

Sets the enable user motor parameters flag value in the estimator.

When this function is called with a true parameter, the motor parameters in user.h are used instead of performing a motor commissioning at startup.

Parameters
[in]handleThe controller (CTRL) handle
[in]stateThe desired state

Definition at line 1300 of file 32b/ctrl.h.

References _CTRL_Obj_::flag_enableUserMotorParams.

Referenced by CTRL_setParams().

static void CTRL_setFlag_resetInt_Id ( CTRL_Handle  handle,
const bool  state 
)
inlinestatic

Sets the reset Id integrator flag value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]stateThe desired state

Definition at line 1354 of file float/ctrl.h.

References _CTRL_Obj_::flag_resetInt_Id.

Referenced by CTRL_setParams(), CTRL_setUi(), and CTRL_setup().

static void CTRL_setFlag_resetInt_Iq ( CTRL_Handle  handle,
const bool  state 
)
inlinestatic

Sets the reset Iq integrator flag value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]stateThe desired state

Definition at line 1367 of file float/ctrl.h.

References _CTRL_Obj_::flag_resetInt_Iq.

Referenced by CTRL_setParams(), CTRL_setUi(), and CTRL_setup().

static void CTRL_setFlag_resetInt_spd ( CTRL_Handle  handle,
const bool  state 
)
inlinestatic

Sets the reset speed integrator flag value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]stateThe desired state

Definition at line 1380 of file float/ctrl.h.

References _CTRL_Obj_::flag_resetInt_spd.

Referenced by CTRL_setParams(), CTRL_setUi(), and CTRL_setup().

static void CTRL_setFlag_useZeroIq_ref ( CTRL_Handle  handle,
const bool  state 
)
inlinestatic

Sets the use zero Iq reference flag value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]stateThe desired state

Definition at line 1393 of file float/ctrl.h.

References _CTRL_Obj_::flag_useZeroIq_ref.

Referenced by CTRL_setParams(), and CTRL_setup().

void CTRL_setGains ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType,
const _iq  Kp,
const _iq  Ki,
const _iq  Kd 
)

Sets the gain values for the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlTypeThe controller type
[in]KpThe Kp gain value, pu
[in]KiThe Ki gain value, pu
[in]KdThe Kd gain value, pu

Definition at line 262 of file 32b/ctrl.c.

References CTRL_setKd(), CTRL_setKi(), and CTRL_setKp().

Referenced by CTRL_setParams(), and USER_calcPIgains().

static void CTRL_setGains ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType,
const float_t  Kp,
const float_t  Ki 
)
inlinestatic

Sets the gain values for the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlTypeThe controller type
[in]KpThe Kp gain value, pu
[in]KiThe Ki gain value, pu

Definition at line 1601 of file float/ctrl.h.

References CTRL_setKi(), and CTRL_setKp().

void CTRL_setIab_filt_pu ( CTRL_Handle  handle,
const MATH_vec2 pIab_filt_pu 
)

Sets the alpha/beta filtered current vector values in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pIab_filt_puThe vector of the alpha/beta filtered current vector values, pu
void CTRL_setIab_in_pu ( CTRL_Handle  handle,
const MATH_vec2 pIab_in_pu 
)
inline

Sets the alpha/beta current (Iab) input vector values in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pIab_in_puThe vector of the alpha/beta current input vector values, pu

Definition at line 1323 of file 32b/ctrl.h.

References _CTRL_Obj_::Iab_in, and _MATH_vec2_::value.

Referenced by CTRL_setParams().

static void CTRL_setId_A ( CTRL_Handle  handle,
const float_t  Id_A 
)
inlinestatic

Sets the direct current (Id) value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]Id_AThe direct current value, A

Definition at line 1406 of file float/ctrl.h.

References _CTRL_Obj_::Idq_A, and _MATH_vec2_::value.

static void CTRL_setId_offset_A ( CTRL_Handle  handle,
const float_t  Id_offset_A 
)
inlinestatic

Sets the direct current (Id) offset value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]Id_offset_AThe direct current offset value, A

Definition at line 1419 of file float/ctrl.h.

References _CTRL_Obj_::Idq_offset_A, and _MATH_vec2_::value.

static void CTRL_setId_ref_A ( CTRL_Handle  handle,
const float_t  Id_ref_A 
)
inlinestatic

Sets the direct current (Id) reference value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]Id_ref_AThe direct current reference value, A

Definition at line 1432 of file float/ctrl.h.

References _CTRL_Obj_::Idq_ref_A, and _MATH_vec2_::value.

Referenced by CTRL_run().

void CTRL_setId_ref_pu ( CTRL_Handle  handle,
const _iq  Id_ref_pu 
)
inline

Sets the direct current (Id) reference value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]Id_ref_puThe direct current reference value, pu

Definition at line 1343 of file 32b/ctrl.h.

References _CTRL_Obj_::Idq_ref, and _MATH_vec2_::value.

static void CTRL_setIdq_A ( CTRL_Handle  handle,
const MATH_vec2 pIdq_A 
)
inlinestatic

Sets the direct/quadrature current (Idq) vector values in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pIdq_in_AThe vector of the direct/quadrature current vector values, A

Definition at line 1445 of file float/ctrl.h.

References _CTRL_Obj_::Idq_A, and _MATH_vec2_::value.

Referenced by CTRL_reset(), CTRL_setParams(), and CTRL_setup().

void CTRL_setIdq_in_pu ( CTRL_Handle  handle,
const MATH_vec2 pIdq_in_pu 
)
inline

Sets the direct/quadrature current (Idq) input vector values in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pIdq_in_puThe vector of the direct/quadrature current input vector values, pu

Definition at line 1356 of file 32b/ctrl.h.

References _CTRL_Obj_::Idq_in, and _MATH_vec2_::value.

Referenced by CTRL_setParams().

static void CTRL_setIdq_offset_A ( CTRL_Handle  handle,
const MATH_vec2 pIdq_offset_A 
)
inlinestatic

Sets the direct/quadrature current (Idq) offset vector values in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pIdq_offset_AThe vector of the direct/quadrature current offset vector values, A

Definition at line 1459 of file float/ctrl.h.

References _CTRL_Obj_::Idq_offset_A, and _MATH_vec2_::value.

Referenced by CTRL_reset(), CTRL_setParams(), and CTRL_setup().

static void CTRL_setIdq_offset_pu ( CTRL_Handle  handle,
const MATH_vec2 pIdq_offset_pu 
)
inlinestatic

Sets the direct/quadrature current (Idq) offset vector values in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pIdq_offset_puThe vector of the direct/quadrature current offset vector values, pu

Definition at line 1370 of file 32b/ctrl.h.

References _CTRL_Obj_::Idq_offset_pu, and _MATH_vec2_::value.

Referenced by CTRL_setup_user().

static void CTRL_setIdq_ref_A ( CTRL_Handle  handle,
const MATH_vec2 pIdq_ref_A 
)
inlinestatic

Sets the direct/quadrature current (Idq) reference vector values in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pIdq_ref_AThe vector of the direct/quadrature current reference vector values, A

Definition at line 1473 of file float/ctrl.h.

References _CTRL_Obj_::Idq_ref_A, and _MATH_vec2_::value.

Referenced by CTRL_setParams().

void CTRL_setIdq_ref_pu ( CTRL_Handle  handle,
const MATH_vec2 pIdq_ref_pu 
)
inline

Sets the direct/quadrature current (Idq) reference vector values in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pIdq_ref_puThe vector of the direct/quadrature current reference vector values, pu

Definition at line 1384 of file 32b/ctrl.h.

References _CTRL_Obj_::Idq_ref, and _MATH_vec2_::value.

Referenced by CTRL_setParams().

void CTRL_setIdRated_pu ( CTRL_Handle  handle,
const _iq  IdRated_pu 
)
inline

Sets the Id rated current value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]IdRated_puThe Id rated current value, pu

Definition at line 1398 of file 32b/ctrl.h.

References _CTRL_Obj_::IdRated.

Referenced by CTRL_setMagCurrent_pu(), and CTRL_setParams().

static void CTRL_setImmediateUi ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType,
const _iq  Ui 
)
inlinestatic

Sets the integrator (Ui) value in the specified controller immediately.

Parameters
[in]handleThe controller (CTRL) handle
[in]UiThe Ui value

Definition at line 1411 of file 32b/ctrl.h.

References CTRL_Type_PID_Id, CTRL_Type_PID_Iq, CTRL_Type_PID_spd, PID_setUi(), _CTRL_Obj_::pidHandle_Id, _CTRL_Obj_::pidHandle_Iq, and _CTRL_Obj_::pidHandle_spd.

static void CTRL_setIq_A ( CTRL_Handle  handle,
const float_t  Iq_A 
)
inlinestatic

Sets the quadrature current (Iq) value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]Id_AThe direct current value, A

Definition at line 1487 of file float/ctrl.h.

References _CTRL_Obj_::Idq_A, and _MATH_vec2_::value.

static void CTRL_setIq_offset_pu ( CTRL_Handle  handle,
const float_t  Iq_offset_A 
)
inlinestatic

Sets the quadrature current (Iq) offset value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]Iq_offset_AThe quadrature current reference value, A

Definition at line 1500 of file float/ctrl.h.

References _CTRL_Obj_::Idq_offset_A, and _MATH_vec2_::value.

static void CTRL_setIq_ref_A ( CTRL_Handle  handle,
const float_t  Iq_ref_A 
)
inlinestatic

Sets the quadrature current (Iq) reference value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]Iq_ref_AThe quadrature current reference value, A

Definition at line 1513 of file float/ctrl.h.

References _CTRL_Obj_::Idq_ref_A, and _MATH_vec2_::value.

Referenced by CTRL_run().

void CTRL_setIq_ref_pu ( CTRL_Handle  handle,
const _iq  IqRef_pu 
)
inline

Sets the quadrature current (Iq) reference value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]IqRef_puThe quadrature current reference value, pu

Definition at line 1435 of file 32b/ctrl.h.

References _CTRL_Obj_::Idq_ref, and _MATH_vec2_::value.

Referenced by CTRL_runPiOnly().

static void CTRL_setKctrl_Wb_p_kgm2 ( CTRL_Handle  handle,
const float_t  Kctrl_Wb_p_kgm2 
)
inlinestatic

Sets the speed controller constant.

Parameters
[in]handleThe controller (CTRL) handle
[in]Kctrl_Wb_p_kgm2The speed controller constant, Wb/(kg*m^2)

Definition at line 1526 of file float/ctrl.h.

References _CTRL_Obj_::Kctrl_Wb_p_kgm2.

Referenced by CTRL_setParams().

void CTRL_setKd ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType,
const _iq  Kd 
)
inline

Sets the derivative gain (Kd) value for the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlTypeThe controller type
[in]KdThe Kd value

Definition at line 1449 of file 32b/ctrl.h.

References CTRL_Type_PID_Id, CTRL_Type_PID_Iq, CTRL_Type_PID_spd, _CTRL_Obj_::Kd_Id, _CTRL_Obj_::Kd_Iq, and _CTRL_Obj_::Kd_spd.

Referenced by CTRL_setGains().

void CTRL_setKi ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType,
const _iq  Ki 
)
inline

Sets the integral gain (Ki) value for the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlTypeThe controller type
[in]KiThe Ki value

Definition at line 1474 of file 32b/ctrl.h.

References CTRL_Type_PID_Id, CTRL_Type_PID_Iq, CTRL_Type_PID_spd, _CTRL_Obj_::Ki_Id, _CTRL_Obj_::Ki_Iq, and _CTRL_Obj_::Ki_spd.

Referenced by CTRL_setGains().

static void CTRL_setKi ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType,
const float_t  Ki 
)
inlinestatic

Sets the integral gain (Ki) value for the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlTypeThe controller type
[in]KiThe Ki value

Definition at line 1540 of file float/ctrl.h.

References CTRL_Type_PI_Id, CTRL_Type_PI_Iq, CTRL_Type_PI_spd, _CTRL_Obj_::Ki_Id, _CTRL_Obj_::Ki_Iq, and _CTRL_Obj_::Ki_spd_ApHz.

Referenced by CTRL_setGains().

void CTRL_setKp ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType,
const _iq  Kp 
)
inline

Sets the proportional gain (Kp) value for the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlTypeThe controller type
[in]KpThe Kp value

Definition at line 1499 of file 32b/ctrl.h.

References CTRL_Type_PID_Id, CTRL_Type_PID_Iq, CTRL_Type_PID_spd, _CTRL_Obj_::Kp_Id, _CTRL_Obj_::Kp_Iq, and _CTRL_Obj_::Kp_spd.

Referenced by CTRL_setGains().

static void CTRL_setKp ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType,
const float_t  Kp 
)
inlinestatic

Sets the proportional gain (Kp) value for the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlTypeThe controller type
[in]KpThe Kp value

Definition at line 1570 of file float/ctrl.h.

References CTRL_Type_PI_Id, CTRL_Type_PI_Iq, CTRL_Type_PI_spd, _CTRL_Obj_::Kp_Id_VpA, _CTRL_Obj_::Kp_Iq_VpA, and _CTRL_Obj_::Kp_spd_ApHz.

Referenced by CTRL_setGains().

void CTRL_setLhf ( CTRL_Handle  handle,
const float_t  Lhf 
)
inline

Sets the high frequency inductance (Lhf) value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]LhfThe Lhf value

Definition at line 1523 of file 32b/ctrl.h.

References _CTRL_Obj_::Lhf.

Referenced by CTRL_setParams().

void CTRL_setMagCurrent_pu ( CTRL_Handle  handle,
const _iq  magCurrent_pu 
)

Sets the magnetizing current value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]magCurrent_puThe magnetizing current value, pu

Definition at line 274 of file 32b/ctrl.c.

References CTRL_setIdRated_pu().

void CTRL_setMaxAccel_pu ( CTRL_Handle  handle,
const _iq  maxAccel_pu 
)
inline

Sets the maximum acceleration of the speed controller.

Sets the maximum acceleration rate of the speed reference.

Parameters
[in]handleThe controller (CTRL) handle
[in]maxAccel_puThe maximum acceleration (value betwen 0 and 1)

Definition at line 1556 of file 32b/ctrl.h.

References _TRAJ_Obj_::maxDelta, and _CTRL_Obj_::traj_spd.

void CTRL_setMaximumSpeed_pu ( CTRL_Handle  handle,
const _iq  maxSpeed_pu 
)

Sets the maximum speed value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]maxSpeed_puThe maximum speed value, pu

Definition at line 283 of file 32b/ctrl.c.

References CTRL_setSpd_max_pu().

void CTRL_setMaxVsMag_pu ( CTRL_Handle  handle,
const _iq  maxVsMag 
)
inline

Sets the maximum voltage vector in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]maxVsMagThe maximum voltage vector (value betwen 0 and 4/3)

Definition at line 1542 of file 32b/ctrl.h.

References _CTRL_Obj_::maxVsMag_pu.

Referenced by CTRL_setParams().

static void CTRL_setMaxVsMag_V ( CTRL_Handle  handle,
const float_t  maxVsMag_V 
)
inlinestatic

Sets the maximum stator voltage magnitude value.

Parameters
[in]handleThe controller (CTRL) handle
[in]maxVsMax_VThe maximum stator voltage magnitude value, V

Definition at line 1614 of file float/ctrl.h.

References _CTRL_Obj_::maxVsMag_V.

Referenced by CTRL_setParams().

void CTRL_setMotorParams ( CTRL_Handle  handle,
const MOTOR_Type_e  motorType,
const uint_least16_t  numPolePairs,
const float_t  ratedFlux,
const float_t  Ls_d,
const float_t  Ls_q,
const float_t  Rr,
const float_t  Rs 
)
inline

Sets the parameters for the motor in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]motorTypeThe motor type
[in]numPolePairsThe number of motor pole pairs
[in]ratedFluxThe rated flux value, V*sec
[in]Ls_dThe direct stator inductance, Henry
[in]Ls_qThe quadrature stator inductance, Henry
[in]RrThe rotor resistance, ohm
[in]RsThe stator resitance, ohm

Definition at line 1581 of file 32b/ctrl.h.

References _MOTOR_Params_::Ls_d_H, _MOTOR_Params_::Ls_q_H, _CTRL_Obj_::motorParams, _MOTOR_Params_::numPolePairs, _MOTOR_Params_::ratedFlux_VpHz, _MOTOR_Params_::Rr_Ohm, _MOTOR_Params_::Rs_Ohm, and _MOTOR_Params_::type.

Referenced by CTRL_setParams().

static void CTRL_setMotorParams ( CTRL_Handle  handle,
const MOTOR_Type_e  motorType,
const uint_least16_t  numPolePairs,
const float_t  ratedFlux_Wb,
const float_t  Ls_d_H,
const float_t  Ls_q_H,
const float_t  Rs_d_Ohm,
const float_t  Rs_q_Ohm,
const float_t  Rr_d_Ohm,
const float_t  Rr_q_Ohm 
)
inlinestatic

Sets the parameters for the motor in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]motorTypeThe motor type
[in]numPolePairsThe number of motor pole pairs
[in]ratedFlux_WbThe rated flux value, Wb
[in]Ls_d_HThe direct stator inductance, Henry
[in]Ls_q_HThe quadrature stator inductance, Henry
[in]Rs_d_OhmThe direct stator resitance, Ohm
[in]Rs_q_OhmThe quadrature stator resitance, Ohm
[in]Rr_d_OhmThe direct rotor resistance, Ohm
[in]Rr_q_OhmThe quadrature rotor resistance, Ohm

Definition at line 1635 of file float/ctrl.h.

References _MOTOR_Params_::Ls_d_H, _MOTOR_Params_::Ls_q_H, _CTRL_Obj_::motorParams, _MOTOR_Params_::numPolePairs, _MOTOR_Params_::ratedFlux_Wb, _MOTOR_Params_::Rr_d_Ohm, _MOTOR_Params_::Rr_q_Ohm, _MOTOR_Params_::Rs_d_Ohm, _MOTOR_Params_::Rs_q_Ohm, and _MOTOR_Params_::type.

void CTRL_setNumCtrlTicksPerCurrentTick ( CTRL_Handle  handle,
const uint_least16_t  numCtrlTicksPerCurrentTick 
)
inline

Sets the number of controller clock ticks per current controller clock tick.

Parameters
[in]handleThe controller (CTRL) handle
[in]numCtrlTicksPerCurrentTickThe number of controller clock ticks per estimator clock tick

Definition at line 1615 of file 32b/ctrl.h.

References _CTRL_Obj_::numCtrlTicksPerCurrentTick.

Referenced by CTRL_setParams().

static void CTRL_setNumCtrlTicksPerCurrentTick ( CTRL_Handle  handle,
const int_least16_t  numCtrlTicksPerCurrentTick 
)
inlinestatic

Sets the number of controller clock ticks per current controller clock tick.

Parameters
[in]handleThe controller (CTRL) handle
[in]numCtrlTicksPerCurrentTickThe number of controller clock ticks per current controller clock tick

Definition at line 1665 of file float/ctrl.h.

References _CTRL_Obj_::numCtrlTicksPerCurrentTick.

void CTRL_setNumCtrlTicksPerSpeedTick ( CTRL_Handle  handle,
const uint_least16_t  numCtrlTicksPerSpeedTick 
)
inline

Sets the number of controller clock ticks per speed controller clock tick.

Parameters
[in]handleThe controller (CTRL) handle
[in]numCtrlTicksPerSpeedTickThe number of controller clock ticks per speed clock tick

Definition at line 1629 of file 32b/ctrl.h.

References _CTRL_Obj_::numCtrlTicksPerSpeedTick.

Referenced by CTRL_setParams().

static void CTRL_setNumCtrlTicksPerSpeedTick ( CTRL_Handle  handle,
const int_least16_t  numCtrlTicksPerSpeedTick 
)
inlinestatic

Sets the number of controller clock ticks per speed controller clock tick.

Parameters
[in]handleThe controller (CTRL) handle
[in]numCtrlTicksPerSpeedTickThe number of controller clock ticks per speed clock tick

Definition at line 1679 of file float/ctrl.h.

References _CTRL_Obj_::numCtrlTicksPerSpeedTick.

void CTRL_setNumCtrlTicksPerTrajTick ( CTRL_Handle  handle,
const uint_least16_t  numCtrlTicksPerTrajTick 
)
inline

Sets the number of controller clock ticks per trajectory clock tick.

Parameters
[in]handleThe controller (CTRL) handle
[in]numCtrlTicksPerTrajTickThe number of controller clock ticks per trajectory clock tick

Definition at line 1643 of file 32b/ctrl.h.

References _CTRL_Obj_::numCtrlTicksPerTrajTick.

Referenced by CTRL_setParams().

void CTRL_setNumIsrTicksPerCtrlTick ( CTRL_Handle  handle,
const uint_least16_t  numIsrTicksPerCtrlTick 
)
inline

Sets the number of Interrupt Service Routine (ISR) clock ticks per controller clock tick.

Parameters
[in]handleThe controller (CTRL) handle
[in]numIsrTicksPerCtrlTickThe number of Interrupt Service Routine (ISR) clock ticks per controller clock tick

Definition at line 1657 of file 32b/ctrl.h.

References _CTRL_Obj_::numIsrTicksPerCtrlTick.

Referenced by CTRL_setParams().

static void CTRL_setNumIsrTicksPerCtrlTick ( CTRL_Handle  handle,
const int_least16_t  numIsrTicksPerCtrlTick 
)
inlinestatic

Sets the number of Interrupt Service Routine (ISR) clock ticks per controller clock tick.

Parameters
[in]handleThe controller (CTRL) handle
[in]numIsrTicksPerCtrlTickThe number of Interrupt Service Routine (ISR) clock ticks per controller clock tick

Definition at line 1693 of file float/ctrl.h.

References _CTRL_Obj_::numIsrTicksPerCtrlTick.

void CTRL_setParams ( CTRL_Handle  handle,
USER_Params pUserParams 
)

Sets the controller parameters.

This function allows for updates in scale factors during real-time operation of the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pUserParamsThe pointer to the user parameters
[in]handleThe controller (CTRL) handle
[in]pUserParamsThe pointer to the user parameters

This function allows for updates in scale factors during real-time operation of the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pUserParamsThe pointer to the user parameters
[in]handleThe controller (CTRL) handle
[in]pUserParamsThe pointer to the user parameters

Definition at line 292 of file 32b/ctrl.c.

References _IQ, _USER_Params_::BWc_rps, _USER_Params_::BWdelta, CTRL_ErrorCode_NoError, CTRL_resetCounter_current(), CTRL_resetCounter_isr(), CTRL_resetCounter_speed(), CTRL_resetCounter_state(), CTRL_resetCounter_traj(), CTRL_setBWc_rps(), CTRL_setBWdelta(), CTRL_setCtrlFreq_Hz(), CTRL_setCtrlPeriod_sec(), CTRL_setCurrentCtrlPeriod_sec(), CTRL_setErrorCode(), CTRL_setEstParams(), CTRL_setFlag_enable(), CTRL_setFlag_enableCtrl(), CTRL_setFlag_enableCurrentCtrl(), CTRL_setFlag_enableDcBusComp(), CTRL_setFlag_enableOffset(), CTRL_setFlag_enablePowerWarp(), CTRL_setFlag_enableSpeedCtrl(), CTRL_setFlag_enableUserMotorParams(), CTRL_setFlag_resetInt_Id(), CTRL_setFlag_resetInt_Iq(), CTRL_setFlag_resetInt_spd(), CTRL_setFlag_useZeroIq_ref(), CTRL_setGains(), CTRL_setIab_in_pu(), CTRL_setIdq_A(), CTRL_setIdq_in_pu(), CTRL_setIdq_offset_A(), CTRL_setIdq_ref_A(), CTRL_setIdq_ref_pu(), CTRL_setIdRated_pu(), CTRL_setKctrl_Wb_p_kgm2(), CTRL_setLhf(), CTRL_setMaxVsMag_pu(), CTRL_setMaxVsMag_V(), CTRL_setMotorParams(), CTRL_setNumCtrlTicksPerCurrentTick(), CTRL_setNumCtrlTicksPerSpeedTick(), CTRL_setNumCtrlTicksPerTrajTick(), CTRL_setNumIsrTicksPerCtrlTick(), CTRL_setRhf(), CTRL_setRoverL(), CTRL_setSpd_out_pu(), CTRL_setSpd_ref_pu(), CTRL_setSpeed_fb_Hz(), CTRL_setSpeed_out_A(), CTRL_setSpeed_outMax_A(), CTRL_setSpeed_outMin_A(), CTRL_setSpeed_ref_Hz(), CTRL_setSpeedCtrlPeriod_sec(), CTRL_setState(), CTRL_setTrajFreq_Hz(), CTRL_setTrajPeriod_sec(), CTRL_setUi(), CTRL_setupClarke_I(), CTRL_setupClarke_V(), CTRL_setVab_in_pu(), CTRL_setVab_out_pu(), CTRL_setVd_sf(), CTRL_setVdq_offset_V(), CTRL_setVdq_out_pu(), CTRL_setVdq_V(), CTRL_setWaitTimes(), CTRL_State_Idle, CTRL_Type_PI_Id, CTRL_Type_PI_Iq, CTRL_Type_PI_spd, CTRL_Type_PID_Id, CTRL_Type_PID_Iq, CTRL_Type_PID_spd, _USER_Params_::ctrlFreq_Hz, _USER_Params_::ctrlPeriod_sec, _USER_Params_::ctrlWaitTime, _USER_Params_::dcBus_nominal_V, _CTRL_Obj_::estHandle, _USER_Params_::IdRated, _USER_Params_::iqFullScaleCurrent_A, _USER_Params_::iqFullScaleFreq_Hz, _USER_Params_::Kctrl_Wb_p_kgm2, MATH_TWO_OVER_THREE, MATH_TWO_PI, _USER_Params_::maxCurrent, _USER_Params_::maxCurrent_A, _USER_Params_::maxVsMag_pu, _USER_Params_::maxVsMag_V, _USER_Params_::motor_Ls_d, _USER_Params_::motor_Ls_d_H, _USER_Params_::motor_Ls_q, _USER_Params_::motor_Ls_q_H, _USER_Params_::motor_numPolePairs, _USER_Params_::motor_ratedFlux, _USER_Params_::motor_ratedFlux_Wb, _USER_Params_::motor_Rr, _USER_Params_::motor_Rr_d_Ohm, _USER_Params_::motor_Rr_q_Ohm, _USER_Params_::motor_Rs, _USER_Params_::motor_Rs_d_Ohm, _USER_Params_::motor_Rs_q_Ohm, _USER_Params_::motor_type, _USER_Params_::numCtrlTicksPerCurrentTick, _USER_Params_::numCtrlTicksPerSpeedTick, _USER_Params_::numCtrlTicksPerTrajTick, _USER_Params_::numCurrentSensors, _USER_Params_::numIsrTicksPerCtrlTick, _USER_Params_::numVoltageSensors, PI_setMinMax(), PID_setGains(), PID_setMinMax(), PID_setUi(), _CTRL_Obj_::pidHandle_Id, _CTRL_Obj_::pidHandle_Iq, _CTRL_Obj_::pidHandle_spd, _CTRL_Obj_::piHandle_Id, _CTRL_Obj_::piHandle_Iq, _CTRL_Obj_::piHandle_spd, SVGEN_setMaxModulation(), _CTRL_Obj_::svgenHandle, TRAJ_setIntValue(), TRAJ_setMaxDelta(), TRAJ_setMaxValue(), TRAJ_setMinValue(), TRAJ_setTargetValue(), _USER_Params_::trajFreq_Hz, _CTRL_Obj_::trajHandle_Id, _CTRL_Obj_::trajHandle_spd, _CTRL_Obj_::trajHandle_spdMax, and _USER_Params_::Vd_sf.

void CTRL_setRhf ( CTRL_Handle  handle,
const float_t  Rhf 
)
inline

Sets the high frequency resistance (Rhf) value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]RhfThe Rhf value

Definition at line 1671 of file 32b/ctrl.h.

References _CTRL_Obj_::Rhf.

Referenced by CTRL_setParams().

void CTRL_setRoverL ( CTRL_Handle  handle,
const float_t  RoverL 
)
inline

Sets the R/L value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]RoverLThe R/L value

Definition at line 1684 of file 32b/ctrl.h.

References _CTRL_Obj_::RoverL.

Referenced by CTRL_setParams().

void CTRL_setSpd_max_pu ( CTRL_Handle  handle,
const _iq  maxSpd_pu 
)
inline

Sets the maximum speed value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]maxSpd_puThe maximum speed value, pu

Definition at line 1710 of file 32b/ctrl.h.

References _CTRL_Obj_::spd_max.

Referenced by CTRL_setMaximumSpeed_pu().

void CTRL_setSpd_out_pu ( CTRL_Handle  handle,
const _iq  spd_out_pu 
)
inline

Sets the output speed value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]spd_out_puThe output speed value, pu

Definition at line 1723 of file 32b/ctrl.h.

References _CTRL_Obj_::spd_out.

Referenced by CTRL_runOnLine(), and CTRL_setParams().

void CTRL_setSpd_ref_krpm ( CTRL_Handle  handle,
const _iq  spd_ref_krpm 
)

Sets the output speed reference value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]spd_ref_krpmThe output speed reference value, krpm

Definition at line 475 of file 32b/ctrl.c.

References _IQmpy, EST_get_krpm_to_pu_sf(), _CTRL_Obj_::estHandle, and _CTRL_Obj_::spd_ref.

void CTRL_setSpd_ref_pu ( CTRL_Handle  handle,
const _iq  spd_ref_pu 
)

Sets the output speed reference value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]spd_ref_puThe output speed reference value, pu

Definition at line 465 of file 32b/ctrl.c.

References _CTRL_Obj_::spd_ref.

Referenced by CTRL_setParams().

void CTRL_setSpdMax ( CTRL_Handle  handle,
const _iq  spdMax 
)
inline

Sets maximum speed controller output.

Parameters
[in]handleThe controller (CTRL) handle
[in]spdMaxThe maximum allowed output of the speed controller

Definition at line 2108 of file 32b/ctrl.h.

References TRAJ_setIntValue(), and _CTRL_Obj_::trajHandle_spdMax.

static void CTRL_setSpeed_fb_Hz ( CTRL_Handle  handle,
const float_t  speed_fb_Hz 
)
inlinestatic

Sets the feedback speed value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]speed_fb_HzThe feedback speed value, Hz

Definition at line 1713 of file float/ctrl.h.

References _CTRL_Obj_::speed_fb_Hz.

Referenced by CTRL_reset(), CTRL_setParams(), and CTRL_setup().

static void CTRL_setSpeed_fb_pu ( CTRL_Handle  handle,
const _iq  speed_fb_pu 
)
inlinestatic

Sets the feedback speed value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]speed_fb_puThe feedback speed value, pu

Definition at line 1697 of file 32b/ctrl.h.

References _CTRL_Obj_::speed_fb_pu.

Referenced by CTRL_setup_user().

static void CTRL_setSpeed_out_A ( CTRL_Handle  handle,
const float_t  speed_out_A 
)
inlinestatic

Sets the maximum output value for the speed controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]speed_out_AThe output value from the speed controller

Definition at line 1726 of file float/ctrl.h.

References _CTRL_Obj_::speed_out_A.

Referenced by CTRL_reset(), CTRL_run(), and CTRL_setParams().

static void CTRL_setSpeed_outMax_A ( CTRL_Handle  handle,
const float_t  speed_outMax_A 
)
inlinestatic

Sets the maximum output value for the speed controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]speed_outMax_AThe maximum speed value, A

Definition at line 1739 of file float/ctrl.h.

References _CTRL_Obj_::speed_outMax_A.

Referenced by CTRL_setParams().

static void CTRL_setSpeed_outMax_pu ( CTRL_Handle  handle,
const _iq  speed_outMax_pu 
)
inlinestatic

Sets the maximum output value for the speed controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]speed_outMax_puThe maximum output value for the speed controller

Definition at line 1736 of file 32b/ctrl.h.

References _CTRL_Obj_::speed_outMax_pu.

Referenced by CTRL_setup_user().

static void CTRL_setSpeed_outMin_A ( CTRL_Handle  handle,
const float_t  speed_outMin_A 
)
inlinestatic

Sets the minimum output value for the speed controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]speed_outMin_AThe minimum speed value, A

Definition at line 1752 of file float/ctrl.h.

References _CTRL_Obj_::speed_outMin_A.

Referenced by CTRL_setParams().

static void CTRL_setSpeed_ref_Hz ( CTRL_Handle  handle,
const float_t  speed_ref_Hz 
)
inlinestatic

Sets the output speed reference value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]speed_ref_HzThe output speed reference value, Hz

Definition at line 1765 of file float/ctrl.h.

References _CTRL_Obj_::speed_ref_Hz.

Referenced by CTRL_reset(), CTRL_setParams(), and CTRL_setup().

static void CTRL_setSpeed_ref_pu ( CTRL_Handle  handle,
const _iq  speed_ref_pu 
)
inlinestatic

Sets the output speed reference value in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]speed_ref_puThe output speed reference value, pu

Definition at line 1749 of file 32b/ctrl.h.

References _CTRL_Obj_::speed_ref_pu.

Referenced by CTRL_setup_user().

static void CTRL_setSpeedCtrlPeriod_sec ( CTRL_Handle  handle,
const float_t  speedCtrlPeriod_sec 
)
inlinestatic

Sets the speed controller period value.

Parameters
[in]handleThe controller (CTRL) handle
[in]speedCtrlPeriod_secThe speed controller period value, sec

Definition at line 1778 of file float/ctrl.h.

References _CTRL_Obj_::speedCtrlPeriod_sec.

Referenced by CTRL_setParams().

static void CTRL_setState ( CTRL_Handle  handle,
const CTRL_State_e  state 
)
inline

Sets the controller state.

Parameters
[in]handleThe controller (CTRL) handle
[in]stateThe new state

Definition at line 1774 of file 32b/ctrl.h.

References _CTRL_Obj_::prevState, and _CTRL_Obj_::state.

Referenced by CTRL_checkForErrors(), CTRL_setParams(), and CTRL_updateState().

void CTRL_setTrajFreq_Hz ( CTRL_Handle  handle,
const uint_least32_t  trajFreq_Hz 
)
inline

Sets the trajectory execution frequency.

Parameters
[in]handleThe controller (CTRL) handle
[in]trajFreq_HzThe trajectory execution frequency, Hz

Definition at line 1788 of file 32b/ctrl.h.

References _CTRL_Obj_::trajFreq_Hz.

Referenced by CTRL_setParams().

void CTRL_setTrajPeriod_sec ( CTRL_Handle  handle,
const _iq  trajPeriod_sec 
)
inline

Sets the trajectory execution period.

Parameters
[in]handleThe controller (CTRL) handle
[in]trajPeriod_secThe trajectory execution period, sec

Definition at line 1801 of file 32b/ctrl.h.

References _CTRL_Obj_::trajPeriod_sec.

Referenced by CTRL_setParams().

static void CTRL_setUi ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType,
const float_t  Ui 
)
inlinestatic

Sets the integrator (Ui) value in the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]UiThe Ui value

Definition at line 1805 of file float/ctrl.h.

References CTRL_setFlag_resetInt_Id(), CTRL_setFlag_resetInt_Iq(), CTRL_setFlag_resetInt_spd(), CTRL_Type_PI_Id, CTRL_Type_PI_Iq, CTRL_Type_PI_spd, _CTRL_Obj_::Ui_Id_V, _CTRL_Obj_::Ui_Iq_V, and _CTRL_Obj_::Ui_spd_A.

void CTRL_setUi ( CTRL_Handle  handle,
const CTRL_Type_e  ctrlType,
const _iq  Ui 
)
inline

Sets the integrator (Ui) value in the specified controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]ctrlTypeThe controller type
[in]UiThe Ui value

Definition at line 1815 of file 32b/ctrl.h.

References CTRL_Type_PID_Id, CTRL_Type_PID_Iq, CTRL_Type_PID_spd, _CTRL_Obj_::Ui_Id, _CTRL_Obj_::Ui_Iq, and _CTRL_Obj_::Ui_spd.

Referenced by CTRL_setParams().

static void CTRL_setup ( CTRL_Handle  handle,
const float_t  speed_ref_Hz,
const float_t  speed_fb_Hz,
const MATH_vec2 pIdq_A,
const MATH_vec2 pIdq_offset_A,
const MATH_vec2 pVdq_offset_V,
const bool  flag_enableSpeedCtrl,
const bool  flag_enableCurrentCtrl,
const bool  flag_useZeroIq_ref 
)
inlinestatic

Sets up the user controller (CTRL) object.

Parameters
[in]handleThe controller (CTRL) handle
[in]speed_ref_HzThe reference speed value to use for the speed controller, Hz
[in]speed_fb_HzThe feedback speed value to use for the speed controller, Hz
[in]pIdq_AThe pointer to the Idq values, A
[in]pIdq_offset_AThe pointer to the Idq offset values, A
[in]pVdq_offset_VThe pointer to the Vdq offset values, V
[in]flag_enableSpeedCtrlThe flag used to enable the speed controller
[in]flag_enableCurrentCtrlThe flag used to enable the current controller
[in]flag_useZeroIq_refThe flag used to enable the zero Iq reference input

Definition at line 1913 of file float/ctrl.h.

References CTRL_getFlag_resetInt_Id(), CTRL_getFlag_resetInt_Iq(), CTRL_getFlag_resetInt_spd(), CTRL_getKi(), CTRL_getKp(), CTRL_getUi(), CTRL_incrCounter_current(), CTRL_incrCounter_speed(), CTRL_setFlag_enableCurrentCtrl(), CTRL_setFlag_enableSpeedCtrl(), CTRL_setFlag_resetInt_Id(), CTRL_setFlag_resetInt_Iq(), CTRL_setFlag_resetInt_spd(), CTRL_setFlag_useZeroIq_ref(), CTRL_setIdq_A(), CTRL_setIdq_offset_A(), CTRL_setSpeed_fb_Hz(), CTRL_setSpeed_ref_Hz(), CTRL_setVdq_offset_V(), CTRL_Type_PI_Id, CTRL_Type_PI_Iq, CTRL_Type_PI_spd, PI_setKi(), PI_setKp(), PI_setUi(), _CTRL_Obj_::piHandle_Id, _CTRL_Obj_::piHandle_Iq, and _CTRL_Obj_::piHandle_spd.

void CTRL_setup ( CTRL_Handle  handle)

Sets up the controller (CTRL) object and all of the subordinate objects.

Is responsible for updating the CTRL state machine and must be called in the same timing sequence as CTRL_run().

Parameters
[in]handleThe controller (CTRL) handle

Definition at line 489 of file 32b/ctrl.c.

References CTRL_getCount_traj(), CTRL_getNumCtrlTicksPerTrajTick(), CTRL_resetCounter_traj(), CTRL_runTraj(), _CTRL_Obj_::numCtrlTicksPerTrajTick, TRAJ_getIntValue(), and _CTRL_Obj_::trajHandle_Id.

void CTRL_setup_user ( CTRL_Handle  handle,
const _iq  angle_pu,
const _iq  speed_ref_pu,
const _iq  speed_fb_pu,
const _iq  speed_outMax_pu,
const MATH_vec2 pIdq_offset_pu,
const MATH_vec2 pVdq_offset_pu,
const bool  flag_enableSpeedCtrl,
const bool  flag_enableCurrentCtrl 
)
void CTRL_setupClarke_I ( CTRL_Handle  handle,
uint_least8_t  numCurrentSensors 
)

Sets the number of current sensors.

Different algorithms are used for calculating the Clarke transform when different number of currents are read in.

Parameters
[in]handleThe controller (CTRL) handle
[in]numCurrentSensorsThe number of current sensors

Definition at line 513 of file 32b/ctrl.c.

References _IQ, CLARKE_setNumSensors(), CLARKE_setScaleFactors(), _CTRL_Obj_::clarkeHandle_I, MATH_ONE_OVER_SQRT_THREE, and MATH_ONE_OVER_THREE.

Referenced by CTRL_setParams().

void CTRL_setupClarke_V ( CTRL_Handle  handle,
uint_least8_t  numVoltageSensors 
)

Sets the number of voltage sensors.

Different algorithms are used for calculating the Clarke transform when different number of voltages are read in.

Parameters
[in]handleThe controller (CTRL) handle
[in]numVoltageSensorsThe number of voltage sensors

Definition at line 544 of file 32b/ctrl.c.

References _IQ, CLARKE_setNumSensors(), CLARKE_setScaleFactors(), _CTRL_Obj_::clarkeHandle_V, MATH_ONE_OVER_SQRT_THREE, and MATH_ONE_OVER_THREE.

Referenced by CTRL_setParams().

void CTRL_setupCtrl ( CTRL_Handle  handle)

Sets up the controllers.

Parameters
[in]handleThe controller (CTRL) handle

Referenced by CTRL_updateState().

void CTRL_setupEst ( CTRL_Handle  handle)

Sets up the estimator (CTRL) object.

Parameters
[in]handleThe controller (CTRL) handle
void CTRL_setupEstIdleState ( CTRL_Handle  handle)

Sets up the controller and trajectory generator for the estimator idle state.

Parameters
[in]handleThe controller (CTRL) handle

Referenced by CTRL_updateState().

void CTRL_setupEstOnLineState ( CTRL_Handle  handle)

Sets up the controller and trajectory generator for the estimator online state.

Parameters
[in]handleThe controller (CTRL) handle

Referenced by CTRL_updateState().

void CTRL_setupTraj ( CTRL_Handle  handle)

Sets up the trajectory (TRAJ) object.

Parameters
[in]handleThe controller (CTRL) handle

Referenced by CTRL_updateState().

void CTRL_setUserMotorParams ( CTRL_Handle  handle)

Sets the controller and estimator with motor parameters from the user.h file.

Parameters
[in]handleThe controller (CTRL) handle

Referenced by CTRL_updateState().

void CTRL_setVab_in_pu ( CTRL_Handle  handle,
const MATH_vec2 pVab_in_pu 
)
inline

Sets the alpha/beta voltage input vector values in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pVab_in_puThe vector of alpha/beta voltage input vector values, pu

Definition at line 1882 of file 32b/ctrl.h.

References _CTRL_Obj_::Vab_in, and _MATH_vec2_::value.

Referenced by CTRL_setParams().

void CTRL_setVab_out_pu ( CTRL_Handle  handle,
const MATH_vec2 pVab_out_pu 
)
inline

Sets the alpha/beta current output vector values in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pVab_out_puThe vector of alpha/beta current output vector values, pu

Definition at line 1896 of file 32b/ctrl.h.

References _CTRL_Obj_::Vab_out, and _MATH_vec2_::value.

Referenced by CTRL_setParams().

static void CTRL_setVd_sf ( CTRL_Handle  handle,
const float_t  Vd_sf 
)
inlinestatic

Sets the direct voltage scale factor.

Parameters
[in]handleThe controller (CTRL) handle
[in]Vd_sfThe direct voltage scale factor

Definition at line 1841 of file float/ctrl.h.

References _CTRL_Obj_::Vd_sf.

Referenced by CTRL_setParams().

static void CTRL_setVdq_offset_pu ( CTRL_Handle  handle,
const MATH_vec2 pVdq_offset_pu 
)
inlinestatic

Sets the direct/quadrature voltage (Vdq) offset vector values in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pVdq_offset_puThe vector of the direct/quadrature voltage offset vector values, pu

Definition at line 1910 of file 32b/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_offset_pu.

Referenced by CTRL_setup_user().

static void CTRL_setVdq_offset_V ( CTRL_Handle  handle,
const MATH_vec2 pVdq_offset_V 
)
inlinestatic

Sets the direct/quadrature offset voltage (Vdq_offset) vector values in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pVdq_offset_VThe vector of direct/quadrature offset voltage vector values, V

Definition at line 1868 of file float/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_offset_V.

Referenced by CTRL_reset(), CTRL_setParams(), and CTRL_setup().

void CTRL_setVdq_out_pu ( CTRL_Handle  handle,
const MATH_vec2 pVdq_out_pu 
)
inline

Sets the direct/quadrature voltage output vector values in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pVdq_out_puThe vector of direct/quadrature voltage output vector values, pu

Definition at line 1924 of file 32b/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_out.

Referenced by CTRL_setParams().

static void CTRL_setVdq_V ( CTRL_Handle  handle,
const MATH_vec2 pVdq_V 
)
inlinestatic

Sets the direct/quadrature voltage (Vdq) vector values in the controller.

Parameters
[in]handleThe controller (CTRL) handle
[in]pVdq_VThe vector of direct/quadrature voltage vector values, V

Definition at line 1854 of file float/ctrl.h.

References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_V.

Referenced by CTRL_reset(), CTRL_run(), and CTRL_setParams().

void CTRL_setVersion ( CTRL_Handle  handle,
const CTRL_TargetProc_e  targetProc,
const uint16_t  majorReleaseNumber,
const uint16_t  minorReleaseNumber 
)

Sets the controller version.

Parameters
[in]handleThe controller (CTRL) handle
[in]targetProcThe target processor
[in]majorReleaseNumberThe major release number
[in]minorReleaseNumberThe minor release number

Definition at line 296 of file float/ctrl.c.

References _CTRL_Version_::major, _CTRL_Version_::minor, _CTRL_Version_::rsvd, _CTRL_Version_::targetProc, and _CTRL_Obj_::version.

Referenced by CTRL_init().

void CTRL_setWaitTimes ( CTRL_Handle  handle,
const int_least32_t *  pWaitTimes 
)

Sets the wait times for the controller states.

Parameters
[in]handleThe controller (CTRL) handle
[in]pWaitTimesA pointer to a vector of wait times, controller clock counts

Definition at line 310 of file float/ctrl.c.

References CTRL_numStates, and _CTRL_Obj_::waitTimes.

Referenced by CTRL_setParams().

void CTRL_setWaitTimes ( CTRL_Handle  handle,
const uint_least32_t *  pWaitTimes 
)

Sets the wait times for the controller states.

Parameters
[in]handleThe controller (CTRL) handle
[in]pWaitTimesA pointer to a vector of wait times, controller clock counts

Definition at line 628 of file 32b/ctrl.c.

References CTRL_numStates, and _CTRL_Obj_::waitTimes.

Referenced by CTRL_setParams().

bool CTRL_updateState ( CTRL_Handle  handle)
bool CTRL_useZeroIq_ref ( CTRL_Handle  handle)
inline

Determines if a zero Iq current reference should be used in the controller.

Parameters
[in]handleThe controller (CTRL) handle
Returns
A boolean value denoting if a zero Iq current reference should be used (true) or not (false)

Definition at line 1972 of file 32b/ctrl.h.

References EST_useZeroIq_ref(), and _CTRL_Obj_::estHandle.

Referenced by CTRL_runOnLine().