MotorWare f2806x Module API Documentation
Functions
ctrlQEP.c File Reference
#include <math.h>
#include "sw/modules/dlog/src/32b/dlog4ch.h"
#include "sw/modules/math/src/32b/math.h"
#include "ctrlQEP.h"
#include "hal.h"
#include "user.h"

Go to the source code of this file.

Functions

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...
 
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...
 
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...
 
_iq CTRL_getMagCurrent_pu (CTRL_Handle handle)
 Gets the magnetizing current value from the controller. More...
 
_iq CTRL_getMaximumSpeed_pu (CTRL_Handle handle)
 Gets the maximum speed value 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...
 
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...
 
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_getWaitTimes (CTRL_Handle handle, uint_least32_t *pWaitTimes)
 Gets the wait times from the estimator. 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_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_setMagCurrent_pu (CTRL_Handle handle, const _iq magCurrent_pu)
 Sets the magnetizing current value in the controller. More...
 
void CTRL_setMaximumSpeed_pu (CTRL_Handle handle, const _iq maxSpeed_pu)
 Sets the maximum speed value in the controller. More...
 
void CTRL_setParams (CTRL_Handle handle, USER_Params *pUserParams)
 Sets the controller parameters. 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_setup (CTRL_Handle handle)
 Sets up the controller (CTRL) object and all of the subordinate objects. 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_setWaitTimes (CTRL_Handle handle, const uint_least32_t *pWaitTimes)
 Sets the wait times for the controller states. More...
 
bool CTRL_updateState (CTRL_Handle handle)
 Updates the controller state. More...