|
MotorWare f2806x Module API Documentation
|
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_vec2 * | CTRL_getIab_filt_addr (CTRL_Handle handle) |
| Gets the alpha/beta filtered current vector memory address from the controller. More... | |
| MATH_vec2 * | CTRL_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_vec2 * | CTRL_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 _iq * | CTRL_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... | |
| _iq * | CTRL_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_vec2 * | CTRL_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_vec2 * | CTRL_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... | |
| _iq * | CTRL_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_vec2 * | CTRL_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... | |
| _iq * | CTRL_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_t * | CTRL_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_t * | CTRL_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_t * | CTRL_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_vec2 * | CTRL_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_vec2 * | CTRL_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_vec2 * | CTRL_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_t * | CTRL_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_t * | CTRL_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_t * | CTRL_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_t * | CTRL_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_t * | CTRL_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_t * | CTRL_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_vec2 * | CTRL_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_vec2 * | CTRL_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_t * | CTRL_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_t * | CTRL_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... | |
|
inline |
Adds the Vdq offset to the Vdq values.
| [in] | handle | The 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().
|
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.
| [in] | handle | The controller (CTRL) handle |
| [in] | angle_pu | The angle delayed |
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().
|
inline |
Checks for any controller errors and, if found, sets the controller state to the error state.
| [in] | handle | The 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().
|
inlinestatic |
Computes the Id controller output limits.
| [in] | handle | The controller (CTRL) handle |
| [in] | outMin | The pointer to the minimum output value |
| [in] | outMax | The 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().
|
inlinestatic |
Computes the Id controller output limits.
| [in] | handle | The controller (CTRL) handle |
| [in] | maxVsMag | The maximum output voltage vector, pu |
| [in] | outMin | The pointer to the minimum output value |
| [in] | outMax | The pointer to the maximum output value |
Definition at line 2005 of file 32b/ctrl.h.
Referenced by CTRL_runPiOnly().
|
inlinestatic |
Computes the Iq controller output limits.
| [in] | handle | The controller (CTRL) handle |
| [in] | Vd_out_V | The Vd output voltage value, V |
| [in] | outMin | The pointer to the minimum output value |
| [in] | outMax | The pointer to the maximum output value |
Definition at line 192 of file float/ctrl.h.
References CTRL_getMaxVsMag_V().
Referenced by CTRL_run().
|
inlinestatic |
Computes the Iq controller output limits.
| [in] | handle | The controller (CTRL) handle |
| [in] | maxVsMag | The maximum output voltage vector, pu |
| [in] | Vd_out_pu | The Vd output voltage value, pu |
| [in] | outMin | The pointer to the minimum output value |
| [in] | outMax | The pointer to the maximum output value |
Definition at line 2023 of file 32b/ctrl.h.
References _IQmpy, and _IQsqrt.
Referenced by CTRL_runPiOnly().
Computes a phasor for a given angle.
| [in] | angle_rad | The angle, rad |
| [out] | pPhasor | The pointer to the phasor vector values |
Definition at line 75 of file float/ctrl.h.
References _MATH_vec2_::value.
Computes a phasor for a given angle.
| [in] | angle_pu | The angle, pu |
| [out] | pPhasor | The 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().
|
inlinestatic |
Disables the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 92 of file float/ctrl.h.
References _CTRL_Obj_::flag_enable.
|
inline |
Determines if the current controllers should be run.
| [in] | handle | The controller (CTRL) handle |
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().
|
inline |
Determines if the speed controller should be executed.
| [in] | handle | The controller (CTRL) handle |
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().
|
inlinestatic |
Enables the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 104 of file float/ctrl.h.
References _CTRL_Obj_::flag_enable.
|
inlinestatic |
Gets the current controller bandwidth.
| [in] | handle | The controller (CTRL) handle |
Definition at line 117 of file float/ctrl.h.
References _CTRL_Obj_::BWc_rps.
|
inlinestatic |
Gets the bandwidth scale factor used to maximize phase margin.
| [in] | handle | The controller (CTRL) handle |
Definition at line 128 of file float/ctrl.h.
References _CTRL_Obj_::BWdelta.
|
inline |
Gets the current loop count.
| [in] | handle | The controller (CTRL) handle |
Definition at line 95 of file 32b/ctrl.h.
References _CTRL_Obj_::counter_current.
Referenced by CTRL_run().
|
inline |
Gets the isr count.
| [in] | handle | The controller (CTRL) handle |
Definition at line 106 of file 32b/ctrl.h.
References _CTRL_Obj_::counter_isr.
Referenced by CTRL_run().
|
inline |
Gets the speed loop count.
| [in] | handle | The controller (CTRL) handle |
Definition at line 117 of file 32b/ctrl.h.
References _CTRL_Obj_::counter_speed.
Referenced by CTRL_run().
|
inline |
Gets the state count.
| [in] | handle | The controller (CTRL) handle |
Definition at line 128 of file 32b/ctrl.h.
References _CTRL_Obj_::counter_state.
Referenced by CTRL_updateState().
|
inline |
Gets the trajectory loop count.
| [in] | handle | The controller (CTRL) handle |
Definition at line 139 of file 32b/ctrl.h.
References _CTRL_Obj_::counter_traj.
Referenced by CTRL_setup(), and CTRL_setup_user().
|
inline |
Gets the controller execution frequency.
| [in] | handle | The controller (CTRL) handle |
Definition at line 150 of file 32b/ctrl.h.
References _CTRL_Obj_::ctrlFreq_Hz.
|
inlinestatic |
Gets the controller execution frequency.
| [in] | handle | The controller (CTRL) handle |
Definition at line 258 of file float/ctrl.h.
References _CTRL_Obj_::ctrlFreq_Hz.
|
inline |
Gets the controller execution period.
| [in] | handle | The controller (CTRL) handle |
Definition at line 161 of file 32b/ctrl.h.
References _CTRL_Obj_::ctrlPeriod_sec.
Referenced by USER_calcPIgains().
|
inlinestatic |
Gets the current controller period.
| [in] | handle | The controller (CTRL) handle |
Definition at line 269 of file float/ctrl.h.
References _CTRL_Obj_::currentCtrlPeriod_sec.
|
inline |
Gets the error code from the controller (CTRL) object.
| [in] | handle | The controller (CTRL) handle |
Definition at line 172 of file 32b/ctrl.h.
References _CTRL_Obj_::errorCode.
|
inline |
Gets the estimator handle for a given controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 183 of file 32b/ctrl.h.
References _CTRL_Obj_::estHandle.
|
inlinestatic |
Gets the feedback value for the speed controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 193 of file 32b/ctrl.h.
References _CTRL_Obj_::speed_fb_pu.
Referenced by CTRL_runPiOnly().
|
inlinestatic |
Gets the enable controller flag value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 302 of file float/ctrl.h.
References _CTRL_Obj_::flag_enable.
Referenced by CTRL_updateState().
|
inline |
Gets the enable controller flag value from the estimator.
| [in] | handle | The controller (CTRL) handle |
Definition at line 204 of file 32b/ctrl.h.
References _CTRL_Obj_::flag_enableCtrl.
Referenced by CTRL_updateState().
|
inline |
Gets the enable current controllers flag value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 215 of file 32b/ctrl.h.
References _CTRL_Obj_::flag_enableCurrentCtrl.
Referenced by CTRL_doCurrentCtrl(), and CTRL_run().
|
inline |
Gets the enable DC bus compensation flag value from the estimator.
| [in] | handle | The controller (CTRL) handle |
Definition at line 226 of file 32b/ctrl.h.
References _CTRL_Obj_::flag_enableDcBusComp.
Referenced by CTRL_runOnLine(), CTRL_runOnLine_User(), and CTRL_runPiOnly().
|
inline |
Gets the enable offset flag value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 248 of file 32b/ctrl.h.
References _CTRL_Obj_::flag_enableOffset.
Referenced by CTRL_updateState().
|
inline |
Gets the PowerWarp enable flag value from the estimator.
| [in] | handle | The controller (CTRL) handle |
Definition at line 237 of file 32b/ctrl.h.
References _CTRL_Obj_::flag_enablePowerWarp.
|
inline |
Gets the enable speed control flag value from the controller.
| [in] | handle | The controller (CTRL) handle |
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().
|
inline |
Gets the enable user motor parameters flag value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 270 of file 32b/ctrl.h.
References _CTRL_Obj_::flag_enableUserMotorParams.
Referenced by CTRL_updateState().
|
inlinestatic |
Gets the reset Id integrator flag value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 335 of file float/ctrl.h.
References _CTRL_Obj_::flag_resetInt_Id.
Referenced by CTRL_setup().
|
inlinestatic |
Gets the reset Iq integrator flag value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 346 of file float/ctrl.h.
References _CTRL_Obj_::flag_resetInt_Iq.
Referenced by CTRL_setup().
|
inlinestatic |
Gets the reset speed integrator flag value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 357 of file float/ctrl.h.
References _CTRL_Obj_::flag_resetInt_spd.
Referenced by CTRL_setup().
|
inlinestatic |
Gets the use zero Iq reference flag value from the controller.
| [in] | handle | The controller (CTRL) handle |
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.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlType | The controller type |
| [in] | pKp | The pointer for the Kp value, pu |
| [in] | pKi | The pointer for the Ki value, pu |
| [in] | pKd | The pointer for the Kd value, pu |
Definition at line 78 of file 32b/ctrl.c.
References CTRL_getKd(), CTRL_getKi(), and CTRL_getKp().
|
inlinestatic |
Gets the gain values for the specified controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlType | The controller type |
| [in] | pKp | The pointer for the Kp value |
| [in] | pKi | The pointer for the Ki value |
Definition at line 650 of file float/ctrl.h.
References CTRL_getKi(), and CTRL_getKp().
|
inline |
Gets the alpha/beta filtered current vector memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
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.
| [in] | handle | The controller (CTRL) handle |
| [out] | pIab_filt_pu | The 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.
|
inline |
Gets the alpha/beta current input vector memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
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.
| [in] | handle | The controller (CTRL) handle |
| [out] | pIab_in_pu | The 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.
|
inlinestatic |
Gets the direct current (Id) value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 379 of file float/ctrl.h.
References _CTRL_Obj_::Idq_A, and _MATH_vec2_::value.
Referenced by CTRL_run().
|
inlinestatic |
Gets the direct current (Id) memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 390 of file float/ctrl.h.
References _CTRL_Obj_::Idq_A, and _MATH_vec2_::value.
|
inline |
Gets the direct current input value from the controller.
| [in] | handle | The controller (CTRL) handle |
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().
|
inlinestatic |
Gets the direct offset current (Id_offset) value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 401 of file float/ctrl.h.
References _CTRL_Obj_::Idq_offset_A, and _MATH_vec2_::value.
Referenced by CTRL_run().
|
inlinestatic |
Gets the direct offset current (Id_offset) memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 412 of file float/ctrl.h.
References _CTRL_Obj_::Idq_offset_A, and _MATH_vec2_::value.
|
inlinestatic |
Gets the direct current (Id) offset value from the controller.
| [in] | handle | The controller (CTRL) handle |
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().
|
inlinestatic |
Gets the direct reference current (Id_ref) value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 423 of file float/ctrl.h.
References _CTRL_Obj_::Idq_ref_A, and _MATH_vec2_::value.
|
inlinestatic |
Gets the direct reference current (Id_ref) memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 434 of file float/ctrl.h.
References _CTRL_Obj_::Idq_ref_A, and _MATH_vec2_::value.
|
inline |
Gets the direct current (Id) reference value from the controller.
| [in] | handle | The controller (CTRL) handle |
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().
|
inlinestatic |
Gets the direct/quadrature current vector values from the controller.
| [in] | handle | The controller (CTRL) handle |
| [out] | pIdq_A | The 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.
|
inlinestatic |
Gets the direct/quadrature current (Idq) vector memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 459 of file float/ctrl.h.
References _CTRL_Obj_::Idq_A.
|
inline |
Gets the direct/quadrature current input vector memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
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.
| [in] | handle | The controller (CTRL) handle |
| [out] | pIdq_in_pu | The 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.
|
inlinestatic |
Gets the direct/quadrature offset current (Idq_offset) vector values from the controller.
| [in] | handle | The controller (CTRL) handle |
| [out] | pIdq_offset_A | The 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.
|
inlinestatic |
Gets the direct/quadrature offset current (Idq_offset) vector memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 484 of file float/ctrl.h.
References _CTRL_Obj_::Idq_offset_A.
|
inlinestatic |
Gets the direct/quadrature reference current (Idq_ref) vector values from the controller.
| [in] | handle | The controller (CTRL) handle |
| [out] | pIdq_ref_A | The 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.
|
inlinestatic |
Gets the direct/quadrature reference current (Idq_ref) vector memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
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.
| [in] | handle | The controller (CTRL) handle |
| [out] | pIdq_ref_pu | The 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.
|
inline |
Gets the Id rated current value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 381 of file 32b/ctrl.h.
References _CTRL_Obj_::IdRated.
Referenced by CTRL_getMagCurrent_pu().
|
inlinestatic |
Gets the quadrature current (Iq) value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 520 of file float/ctrl.h.
References _CTRL_Obj_::Idq_A, and _MATH_vec2_::value.
Referenced by CTRL_run().
|
inlinestatic |
Gets the quadrature current (Iq) memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 531 of file float/ctrl.h.
References _CTRL_Obj_::Idq_A, and _MATH_vec2_::value.
|
inline |
Gets the quadrature current input value from the controller.
| [in] | handle | The controller (CTRL) handle |
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().
|
inlinestatic |
Gets the quadrature offset current (Iq_offset) value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 542 of file float/ctrl.h.
References _CTRL_Obj_::Idq_offset_A, and _MATH_vec2_::value.
Referenced by CTRL_run().
|
inlinestatic |
Gets the quadrature offset current (Iq_offset) memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 553 of file float/ctrl.h.
References _CTRL_Obj_::Idq_offset_A, and _MATH_vec2_::value.
|
inlinestatic |
Gets the quadrature current (Iq) offset value from the controller.
| [in] | handle | The controller (CTRL) handle |
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().
|
inlinestatic |
Gets the quadrature reference current (Iq_ref) value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 564 of file float/ctrl.h.
References _CTRL_Obj_::Idq_ref_A, and _MATH_vec2_::value.
|
inlinestatic |
Gets the quadrature reference current (Iq_ref) memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 575 of file float/ctrl.h.
References _CTRL_Obj_::Idq_ref_A, and _MATH_vec2_::value.
|
inline |
Gets the quadrature current (Iq) reference value from the controller.
| [in] | handle | The controller (CTRL) handle |
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().
|
inlinestatic |
Gets the quadrature current (Iq) reference memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 435 of file 32b/ctrl.h.
References _CTRL_Obj_::Idq_ref, and _MATH_vec2_::value.
Referenced by CTRL_runPiOnly().
|
inlinestatic |
Gets the speed controller constant.
| [in] | handle | The controller (CTRL) handle |
Definition at line 139 of file float/ctrl.h.
References _CTRL_Obj_::Kctrl_Wb_p_kgm2.
|
inline |
Gets the derivative gain (Kd) value from the specified controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlType | The controller type |
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().
|
inline |
Gets the integral gain (Ki) value from the specified controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlType | The controller type |
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().
|
inline |
Gets the proportional gain (Kp) value from the specified controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlType | The controller type |
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().
|
inline |
Gets the high frequency inductance (Lhf) value from the controller.
| [in] | handle | The controller (CTRL) handle |
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.
| [in] | handle | The controller (CTRL) handle |
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.
| [in] | handle | The controller (CTRL) handle |
Definition at line 141 of file 32b/ctrl.c.
References CTRL_getSpd_max_pu().
|
inline |
Gets the maximum voltage vector.
| [in] | handle | The controller (CTRL) handle |
Definition at line 541 of file 32b/ctrl.h.
References _CTRL_Obj_::maxVsMag_pu.
Referenced by CTRL_runOnLine(), CTRL_runOnLine_User(), and CTRL_runPiOnly().
|
inlinestatic |
Gets the maximum stator voltage magnitude value.
| [in] | handle | The controller (CTRL) handle |
Definition at line 161 of file float/ctrl.h.
References _CTRL_Obj_::maxVsMag_V.
Referenced by CTRL_computeOutputLimits_Id(), and CTRL_computeOutputLimits_Iq().
|
inline |
Gets the motor rated flux from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 558 of file 32b/ctrl.h.
References _CTRL_Obj_::motorParams, and _MOTOR_Params_::ratedFlux_VpHz.
|
inline |
Gets the motor type from the controller.
Gets the motor type.
| [in] | handle | The controller (CTRL) handle |
Definition at line 569 of file 32b/ctrl.h.
References _CTRL_Obj_::motorParams, and _MOTOR_Params_::type.
|
inline |
Gets the number of controller clock ticks per current controller clock tick.
| [in] | handle | The controller (CTRL) handle |
| [in] | handle | The controller (CTRL) handle |
Definition at line 580 of file 32b/ctrl.h.
References _CTRL_Obj_::numCtrlTicksPerCurrentTick.
Referenced by CTRL_run().
|
inline |
Gets the number of controller clock ticks per speed controller clock tick.
| [in] | handle | The controller (CTRL) handle |
Definition at line 591 of file 32b/ctrl.h.
References _CTRL_Obj_::numCtrlTicksPerSpeedTick.
Referenced by CTRL_run().
|
inline |
Gets the number of controller clock ticks per trajectory clock tick.
| [in] | handle | The controller (CTRL) handle |
Definition at line 602 of file 32b/ctrl.h.
References _CTRL_Obj_::numCtrlTicksPerTrajTick.
Referenced by CTRL_setup(), and CTRL_setup_user().
|
inline |
Gets the number of Interrupt Service Routine (ISR) clock ticks per controller clock tick.
| [in] | handle | The controller (CTRL) handle |
Definition at line 613 of file 32b/ctrl.h.
References _CTRL_Obj_::numIsrTicksPerCtrlTick.
Referenced by CTRL_run().
|
inlinestatic |
Gets the reference value from the specified controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlType | The controller type |
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.
|
inlinestatic |
Gets the reference value for the Id current controller.
| [in] | handle | The 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().
|
inlinestatic |
Gets the reference value for the Iq current controller.
| [in] | handle | The 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().
|
inline |
Gets the reference value from the specified controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlType | The controller type |
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.
|
inlinestatic |
Gets the reference value for the speed controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 668 of file 32b/ctrl.h.
References _CTRL_Obj_::speed_ref_pu.
Referenced by CTRL_runPiOnly().
|
inline |
Gets the high frequency resistance (Rhf) value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 679 of file 32b/ctrl.h.
References _CTRL_Obj_::Rhf.
|
inline |
Gets the R/L value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 690 of file 32b/ctrl.h.
References _CTRL_Obj_::RoverL.
|
inline |
Gets the output speed intermediate reference value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 745 of file 32b/ctrl.h.
References TRAJ_getIntValue(), and _CTRL_Obj_::trajHandle_spd.
|
inline |
Gets the maximum speed value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 701 of file 32b/ctrl.h.
References _CTRL_Obj_::spd_max.
Referenced by CTRL_getMaximumSpeed_pu().
|
inline |
Gets the output speed memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 712 of file 32b/ctrl.h.
References _CTRL_Obj_::spd_out.
Referenced by CTRL_runOnLine(), and CTRL_runOnLine_User().
|
inline |
Gets the output speed value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 723 of file 32b/ctrl.h.
References _CTRL_Obj_::spd_out.
Referenced by CTRL_runOnLine(), and CTRL_runOnLine_User().
|
inline |
Gets the output speed reference value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 734 of file 32b/ctrl.h.
References _CTRL_Obj_::spd_ref.
|
inlinestatic |
Gets the feedback speed value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 738 of file float/ctrl.h.
References _CTRL_Obj_::speed_fb_Hz.
Referenced by CTRL_run().
|
inlinestatic |
Gets the output value from the speed controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 749 of file float/ctrl.h.
References _CTRL_Obj_::speed_out_A.
Referenced by CTRL_run().
|
inlinestatic |
Gets the output value memory address from the speed controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 760 of file float/ctrl.h.
References _CTRL_Obj_::speed_out_A.
Referenced by CTRL_run().
|
inlinestatic |
Gets the maximum value for the speed controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 771 of file float/ctrl.h.
References _CTRL_Obj_::speed_outMax_A.
Referenced by CTRL_run().
|
inlinestatic |
Gets the maximum output value for the speed controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 756 of file 32b/ctrl.h.
References _CTRL_Obj_::speed_outMax_pu.
Referenced by CTRL_runPiOnly().
|
inlinestatic |
Gets the minimum value for the speed controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 782 of file float/ctrl.h.
References _CTRL_Obj_::speed_outMin_A.
Referenced by CTRL_run().
|
inlinestatic |
Gets the output speed reference value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 793 of file float/ctrl.h.
References _CTRL_Obj_::speed_ref_Hz.
Referenced by CTRL_run().
|
inlinestatic |
Gets the speed controller period.
| [in] | handle | The controller (CTRL) handle |
Definition at line 804 of file float/ctrl.h.
References _CTRL_Obj_::speedCtrlPeriod_sec.
|
inline |
Gets the controller state.
| [in] | handle | The controller (CTRL) handle |
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().
|
inline |
Gets the trajectory execution frequency.
| [in] | handle | The controller (CTRL) handle |
Definition at line 778 of file 32b/ctrl.h.
References _CTRL_Obj_::trajFreq_Hz.
|
inline |
Gets the trajectory execution period.
| [in] | handle | The controller (CTRL) handle |
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.
| [in] | handle | The controller (CTRL) handle |
|
inline |
Gets the integrator (Ui) value from the specified controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlType | The controller type |
| [in] | handle | The controller (CTRL) handle |
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().
|
inline |
Gets the alpha/beta voltage input vector memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
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.
| [in] | handle | The controller (CTRL) handle |
| [out] | pVab_in_pu | The 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.
|
inline |
Gets the alpha/beta voltage output vector memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
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.
| [in] | handle | The controller (CTRL) handle |
| [out] | pVab_out_pu | The 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.
|
inlinestatic |
Gets the direct offset voltage (Vd_offset) value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 878 of file float/ctrl.h.
References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_offset_V.
Referenced by CTRL_run().
|
inlinestatic |
Gets the direct offset voltage (Vd_offset) value memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 889 of file float/ctrl.h.
References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_offset_V.
|
inline |
Gets the direct voltage output value memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
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().
|
inline |
Gets the direct voltage output value from the controller.
| [in] | handle | The controller (CTRL) handle |
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().
|
inlinestatic |
Gets the direct voltage scale factor.
| [in] | handle | The controller (CTRL) handle |
Definition at line 150 of file float/ctrl.h.
References _CTRL_Obj_::Vd_sf.
Referenced by CTRL_computeOutputLimits_Id().
|
inlinestatic |
Gets the direct voltage (Vd) value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 856 of file float/ctrl.h.
References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_V.
|
inlinestatic |
Gets the direct voltage (Vd) value memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 867 of file float/ctrl.h.
References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_V.
|
inlinestatic |
Gets the direct/quadrature offset voltage (Vdq_offset) vector values from the controller.
| [in] | handle | The controller (CTRL) handle |
| [out] | pVdq_offset_V | The 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.
|
inlinestatic |
Gets the direct/quadrature offset voltage (Vdq_offset) vector memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 939 of file float/ctrl.h.
References _CTRL_Obj_::Vdq_offset_V.
|
inline |
Gets the direct/quadrature voltage output vector memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
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.
| [in] | handle | The controller (CTRL) handle |
| [out] | pVdq_out_pu | The 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.
|
inlinestatic |
Gets the direct/quadrature voltage (Vdq) vector values from the controller.
| [in] | handle | The 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().
|
inlinestatic |
Gets the direct/quadrature voltage (Vdq) vector memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
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.
| [in] | handle | The controller (CTRL) handle |
| [in] | pVersion | A 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.
|
inlinestatic |
Gets the quadrature offset voltage (Vq_offset) value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 978 of file float/ctrl.h.
References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_offset_V.
Referenced by CTRL_run().
|
inlinestatic |
Gets the quadrature offset voltage (Vq_offset) value memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 989 of file float/ctrl.h.
References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_offset_V.
|
inline |
Gets the quadrature voltage output value memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
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().
|
inline |
Gets the quadrature voltage output value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 921 of file 32b/ctrl.h.
References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_out.
|
inlinestatic |
Gets the quadrature voltage (Vq) value from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 956 of file float/ctrl.h.
References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_V.
|
inlinestatic |
Gets the quadrature voltage (Vq) value memory address from the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 967 of file float/ctrl.h.
References _MATH_vec2_::value, and _CTRL_Obj_::Vdq_V.
|
inline |
Gets the wait time for a given state.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlState | The controller state |
| [in] | handle | The controller (CTRL) handle |
| [in] | state | The controller state |
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.
| [in] | handle | The controller (CTRL) handle |
| [in] | pWaitTimes | A 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.
| [in] | handle | The controller (CTRL) handle |
| [in] | pWaitTimes | A 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.
|
inline |
Increments the current counter.
| [in] | handle | The 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().
|
inline |
Increments the isr counter.
| [in] | handle | The controller (CTRL) handle |
Definition at line 967 of file 32b/ctrl.h.
References _CTRL_Obj_::counter_isr.
Referenced by CTRL_run().
|
inline |
Increments the speed counter.
| [in] | handle | The 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().
|
inline |
Increments the state counter.
| [in] | handle | The 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().
|
inline |
Increments the trajectory counter.
| [in] | handle | The 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.
| [in] | pMemory | A pointer to the memory for the controller object |
| [in] | numBytes | The number of bytes allocated for the controller object, bytes |
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.
| [in] | ctrlNumber | The controller number |
| [in] | estNumber | The estimator number |
|
inlinestatic |
Determines if the controller is enabled.
| [in] | handle | The controller (CTRL) handle |
Definition at line 1120 of file float/ctrl.h.
References _CTRL_Obj_::flag_enable.
|
inline |
Determines if there is a controller error.
| [in] | handle | The controller (CTRL) handle |
Definition at line 1053 of file 32b/ctrl.h.
References CTRL_getState(), and CTRL_State_Error.
|
inlinestatic |
Determines if the controller is in the idle state.
| [in] | handle | The controller (CTRL) handle |
Definition at line 1150 of file float/ctrl.h.
References CTRL_getState(), and CTRL_State_Idle.
|
inlinestatic |
Determines if the controller is not in the idle state.
| [in] | handle | The controller (CTRL) handle |
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 | ) |
Resets the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 130 of file float/ctrl.c.
References CTRL_setIdq_A(), CTRL_setIdq_offset_A(), CTRL_setSpeed_fb_Hz(), CTRL_setSpeed_out_A(), CTRL_setSpeed_ref_Hz(), CTRL_setVdq_offset_V(), CTRL_setVdq_V(), PI_setUi(), _CTRL_Obj_::piHandle_Id, _CTRL_Obj_::piHandle_Iq, and _CTRL_Obj_::piHandle_spd.
Referenced by CTRL_updateState().
|
inline |
Resets the current counter.
| [in] | handle | The 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().
|
inline |
Resets the isr counter.
| [in] | handle | The controller (CTRL) handle |
Definition at line 1083 of file 32b/ctrl.h.
References _CTRL_Obj_::counter_isr.
Referenced by CTRL_run(), and CTRL_setParams().
|
inline |
Resets the speed counter.
| [in] | handle | The 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().
|
inline |
Resets the state counter.
| [in] | handle | The controller (CTRL) handle |
Definition at line 1107 of file 32b/ctrl.h.
References _CTRL_Obj_::counter_state.
Referenced by CTRL_setParams(), and CTRL_updateState().
|
inline |
Resets the trajectory counter.
| [in] | handle | The 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.
| [in] | handle | The controller (CTRL) handle |
| [in] | halHandle | The hardware abstraction layer (HAL) handle |
| [in] | pAdcData | The pointer to the ADC data |
| [out] | pPwmData | The pointer to the PWM data |
| [in] | electricalAngle | The 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.
| [in] | handle | The controller (CTRL) handle |
| [in] | halHandle | The hardware abstraction layer (HAL) handle |
| [in] | pAdcData | The pointer to the ADC data |
| [out] | pPwmData | The 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.
|
inlinestatic |
Run the controller.
| [in] | handle | The controller (CTRL) handle |
| [out] | pVdq_V | The pointer to the direct/quadrature voltage vector, V |
Definition at line 2001 of file float/ctrl.h.
References CTRL_computeOutputLimits_Id(), CTRL_computeOutputLimits_Iq(), CTRL_getCount_current(), CTRL_getCount_speed(), CTRL_getFlag_enableCurrentCtrl(), CTRL_getFlag_enableSpeedCtrl(), CTRL_getFlag_useZeroIq_ref(), CTRL_getId_A(), CTRL_getId_offset_A(), CTRL_getIq_A(), CTRL_getIq_offset_A(), CTRL_getNumCtrlTicksPerCurrentTick(), CTRL_getNumCtrlTicksPerSpeedTick(), CTRL_getSpeed_fb_Hz(), CTRL_getSpeed_out_A(), CTRL_getSpeed_out_A_addr(), CTRL_getSpeed_outMax_A(), CTRL_getSpeed_outMin_A(), CTRL_getSpeed_ref_Hz(), CTRL_getVd_offset_V(), CTRL_getVdq_V(), CTRL_getVq_offset_V(), CTRL_incrCounter_state(), CTRL_resetCounter_current(), CTRL_resetCounter_speed(), CTRL_setId_ref_A(), CTRL_setIq_ref_A(), CTRL_setSpeed_out_A(), CTRL_setVdq_V(), PI_run_series(), PI_setMinMax(), _CTRL_Obj_::piHandle_Id, _CTRL_Obj_::piHandle_Iq, _CTRL_Obj_::piHandle_spd, and _MATH_vec2_::value.
|
inline |
Runs the offline controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | halHandle | The hardware abstraction layer (HAL) handle |
| [in] | pAdcData | The pointer to the ADC data |
| [out] | pPwmData | The 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().
|
inline |
Runs the online controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | pAdcData | The pointer to the ADC data |
| [out] | pPwmData | The 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().
|
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.
| [in] | handle | The controller (CTRL) handle |
| [in] | pAdcData | The pointer to the ADC data |
| [out] | pPwmData | The pointer to the PWM data |
| [in] | electricalAngle | The 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.
|
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.
| [in] | handle | The controller (CTRL) handle |
| [in] | pAdcData | The pointer to the ADC data |
| [out] | pPwmData | The 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().
|
inline |
Runs the online controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 2513 of file 32b/ctrl.h.
References _IQ, _IQmpy, CTRL_addVdq_offset(), CTRL_computeOutputLimits_Id(), CTRL_computeOutputLimits_Iq(), CTRL_doCurrentCtrl(), CTRL_doSpeedCtrl(), CTRL_getFbackValue_spd_pu(), CTRL_getFlag_enableDcBusComp(), CTRL_getFlag_enableSpeedCtrl(), CTRL_getId_in_pu(), CTRL_getIq_in_pu(), CTRL_getIq_ref_pu_addr(), CTRL_getKp(), CTRL_getMaxVsMag_pu(), CTRL_getRefValue_Id_pu(), CTRL_getRefValue_Iq_pu(), CTRL_getRefValue_spd_pu(), CTRL_getSpeed_outMax_pu(), CTRL_getVd_out_addr(), CTRL_getVd_out_pu(), CTRL_getVq_out_addr(), CTRL_resetCounter_current(), CTRL_resetCounter_speed(), CTRL_setIq_ref_pu(), CTRL_Type_PID_Id, CTRL_Type_PID_Iq, EST_getOneOverDcBus_pu(), EST_setId_ref_pu(), EST_setIq_ref_pu(), EST_updateId_ref_pu(), _CTRL_Obj_::estHandle, PID_run(), PID_run_spd(), PID_setKp(), PID_setMinMax(), PID_setUi(), _CTRL_Obj_::pidHandle_Id, _CTRL_Obj_::pidHandle_Iq, and _CTRL_Obj_::pidHandle_spd.
| void CTRL_runTraj | ( | CTRL_Handle | handle | ) |
Runs the trajectory.
| [in] | handle | The controller (CTRL) handle |
Referenced by CTRL_setup(), and CTRL_setup_user().
|
inlinestatic |
Sets the angle value, pu.
| [in] | handle | The controller (CTRL) handle |
| [in] | angle_pu | The angle value, pu |
Definition at line 1150 of file 32b/ctrl.h.
References _CTRL_Obj_::angle_pu.
Referenced by CTRL_setup_user().
|
inlinestatic |
Sets the current controller bandwidth.
| [in] | handle | The controller (CTRL) handle |
| [in] | BWc_rps | The current controller bandwidth, rad/sec |
Definition at line 1237 of file float/ctrl.h.
References _CTRL_Obj_::BWc_rps.
Referenced by CTRL_setParams().
|
inlinestatic |
Sets the bandwidth scale factor used to maximize phase margin.
| [in] | handle | The controller (CTRL) handle |
| [in] | BWdelta | The bandwidth scale factor |
Definition at line 1250 of file float/ctrl.h.
References _CTRL_Obj_::BWdelta.
Referenced by CTRL_setParams().
|
inline |
Sets the controller frequency.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlFreq_Hz | The controller frequency, Hz |
Definition at line 1163 of file 32b/ctrl.h.
References _CTRL_Obj_::ctrlFreq_Hz.
Referenced by CTRL_setParams().
|
inlinestatic |
Sets the controller frequency.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlFreq_Hz | The controller frequency, Hz |
Definition at line 1263 of file float/ctrl.h.
References _CTRL_Obj_::ctrlFreq_Hz.
|
inline |
Sets the controller execution period.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlPeriod_sec | The controller execution period, sec |
Definition at line 1176 of file 32b/ctrl.h.
References _CTRL_Obj_::ctrlPeriod_sec.
Referenced by CTRL_setParams().
|
inlinestatic |
Sets the current controller period value.
| [in] | handle | The controller (CTRL) handle |
| [in] | currentCtrlPeriod_sec | The current controller period value, sec |
Definition at line 1289 of file float/ctrl.h.
References _CTRL_Obj_::currentCtrlPeriod_sec.
Referenced by CTRL_setParams().
|
inline |
Sets the error code in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | errorCode | The 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.
| [in] | estHandle | The estimator (EST) handle |
| [in] | pUserParams | The pointer to the user parameters |
Referenced by CTRL_setParams().
|
inlinestatic |
Sets the enable controller flag value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | state | The desired state |
Definition at line 1315 of file float/ctrl.h.
References _CTRL_Obj_::flag_enable.
Referenced by CTRL_setParams().
|
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.
| [in] | handle | The controller (CTRL) handle |
| [in] | state | The desired state |
Definition at line 1214 of file 32b/ctrl.h.
References _CTRL_Obj_::flag_enableCtrl.
Referenced by CTRL_setParams(), and CTRL_updateState().
|
inlinestatic |
Sets the enable current controllers flag value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | state | The desired state |
Definition at line 1227 of file 32b/ctrl.h.
References _CTRL_Obj_::flag_enableCurrentCtrl.
Referenced by CTRL_setParams(), and CTRL_setup_user().
|
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.
| [in] | handle | The controller (CTRL) handle |
| [in] | state | The desired state |
Definition at line 1242 of file 32b/ctrl.h.
References _CTRL_Obj_::flag_enableDcBusComp.
Referenced by CTRL_setParams().
|
inline |
Sets the enable offset flag value in the estimator.
| [in] | handle | The controller (CTRL) handle |
| [in] | state | The desired state |
Definition at line 1271 of file 32b/ctrl.h.
References _CTRL_Obj_::flag_enableOffset.
Referenced by CTRL_setParams().
|
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.
| [in] | handle | The controller (CTRL) handle |
| [in] | state | The desired state |
Definition at line 1258 of file 32b/ctrl.h.
References _CTRL_Obj_::flag_enablePowerWarp.
Referenced by CTRL_setParams().
|
inline |
Sets the enable speed control value in the estimator.
Sets the enable speed control value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | state | The 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().
|
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.
| [in] | handle | The controller (CTRL) handle |
| [in] | state | The desired state |
Definition at line 1300 of file 32b/ctrl.h.
References _CTRL_Obj_::flag_enableUserMotorParams.
Referenced by CTRL_setParams().
|
inlinestatic |
Sets the reset Id integrator flag value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | state | The 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().
|
inlinestatic |
Sets the reset Iq integrator flag value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | state | The 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().
|
inlinestatic |
Sets the reset speed integrator flag value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | state | The 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().
|
inlinestatic |
Sets the use zero Iq reference flag value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | state | The 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.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlType | The controller type |
| [in] | Kp | The Kp gain value, pu |
| [in] | Ki | The Ki gain value, pu |
| [in] | Kd | The 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().
|
inlinestatic |
Sets the gain values for the specified controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlType | The controller type |
| [in] | Kp | The Kp gain value, pu |
| [in] | Ki | The 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.
| [in] | handle | The controller (CTRL) handle |
| [in] | pIab_filt_pu | The vector of the alpha/beta filtered current vector values, pu |
|
inline |
Sets the alpha/beta current (Iab) input vector values in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | pIab_in_pu | The 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().
|
inlinestatic |
Sets the direct current (Id) value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | Id_A | The direct current value, A |
Definition at line 1406 of file float/ctrl.h.
References _CTRL_Obj_::Idq_A, and _MATH_vec2_::value.
|
inlinestatic |
Sets the direct current (Id) offset value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | Id_offset_A | The direct current offset value, A |
Definition at line 1419 of file float/ctrl.h.
References _CTRL_Obj_::Idq_offset_A, and _MATH_vec2_::value.
|
inlinestatic |
Sets the direct current (Id) reference value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | Id_ref_A | The 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().
|
inline |
Sets the direct current (Id) reference value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | Id_ref_pu | The direct current reference value, pu |
Definition at line 1343 of file 32b/ctrl.h.
References _CTRL_Obj_::Idq_ref, and _MATH_vec2_::value.
|
inlinestatic |
Sets the direct/quadrature current (Idq) vector values in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | pIdq_in_A | The 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().
|
inline |
Sets the direct/quadrature current (Idq) input vector values in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | pIdq_in_pu | The 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().
|
inlinestatic |
Sets the direct/quadrature current (Idq) offset vector values in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | pIdq_offset_A | The 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().
|
inlinestatic |
Sets the direct/quadrature current (Idq) offset vector values in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | pIdq_offset_pu | The 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().
|
inlinestatic |
Sets the direct/quadrature current (Idq) reference vector values in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | pIdq_ref_A | The 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().
|
inline |
Sets the direct/quadrature current (Idq) reference vector values in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | pIdq_ref_pu | The 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().
|
inline |
Sets the Id rated current value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | IdRated_pu | The 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().
|
inlinestatic |
Sets the integrator (Ui) value in the specified controller immediately.
| [in] | handle | The controller (CTRL) handle |
| [in] | Ui | The 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.
|
inlinestatic |
Sets the quadrature current (Iq) value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | Id_A | The direct current value, A |
Definition at line 1487 of file float/ctrl.h.
References _CTRL_Obj_::Idq_A, and _MATH_vec2_::value.
|
inlinestatic |
Sets the quadrature current (Iq) offset value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | Iq_offset_A | The quadrature current reference value, A |
Definition at line 1500 of file float/ctrl.h.
References _CTRL_Obj_::Idq_offset_A, and _MATH_vec2_::value.
|
inlinestatic |
Sets the quadrature current (Iq) reference value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | Iq_ref_A | The 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().
|
inline |
Sets the quadrature current (Iq) reference value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | IqRef_pu | The 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().
|
inlinestatic |
Sets the speed controller constant.
| [in] | handle | The controller (CTRL) handle |
| [in] | Kctrl_Wb_p_kgm2 | The 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().
|
inline |
Sets the derivative gain (Kd) value for the specified controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlType | The controller type |
| [in] | Kd | The 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().
|
inline |
Sets the integral gain (Ki) value for the specified controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlType | The controller type |
| [in] | Ki | The 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().
|
inlinestatic |
Sets the integral gain (Ki) value for the specified controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlType | The controller type |
| [in] | Ki | The 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().
|
inline |
Sets the proportional gain (Kp) value for the specified controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlType | The controller type |
| [in] | Kp | The 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().
|
inlinestatic |
Sets the proportional gain (Kp) value for the specified controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlType | The controller type |
| [in] | Kp | The 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().
|
inline |
Sets the high frequency inductance (Lhf) value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | Lhf | The 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.
| [in] | handle | The controller (CTRL) handle |
| [in] | magCurrent_pu | The magnetizing current value, pu |
Definition at line 274 of file 32b/ctrl.c.
References CTRL_setIdRated_pu().
|
inline |
Sets the maximum acceleration of the speed controller.
Sets the maximum acceleration rate of the speed reference.
| [in] | handle | The controller (CTRL) handle |
| [in] | maxAccel_pu | The 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.
| [in] | handle | The controller (CTRL) handle |
| [in] | maxSpeed_pu | The maximum speed value, pu |
Definition at line 283 of file 32b/ctrl.c.
References CTRL_setSpd_max_pu().
|
inline |
Sets the maximum voltage vector in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | maxVsMag | The 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().
|
inlinestatic |
Sets the maximum stator voltage magnitude value.
| [in] | handle | The controller (CTRL) handle |
| [in] | maxVsMax_V | The maximum stator voltage magnitude value, V |
Definition at line 1614 of file float/ctrl.h.
References _CTRL_Obj_::maxVsMag_V.
Referenced by CTRL_setParams().
|
inline |
Sets the parameters for the motor in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | motorType | The motor type |
| [in] | numPolePairs | The number of motor pole pairs |
| [in] | ratedFlux | The rated flux value, V*sec |
| [in] | Ls_d | The direct stator inductance, Henry |
| [in] | Ls_q | The quadrature stator inductance, Henry |
| [in] | Rr | The rotor resistance, ohm |
| [in] | Rs | The 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().
|
inlinestatic |
Sets the parameters for the motor in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | motorType | The motor type |
| [in] | numPolePairs | The number of motor pole pairs |
| [in] | ratedFlux_Wb | The rated flux value, Wb |
| [in] | Ls_d_H | The direct stator inductance, Henry |
| [in] | Ls_q_H | The quadrature stator inductance, Henry |
| [in] | Rs_d_Ohm | The direct stator resitance, Ohm |
| [in] | Rs_q_Ohm | The quadrature stator resitance, Ohm |
| [in] | Rr_d_Ohm | The direct rotor resistance, Ohm |
| [in] | Rr_q_Ohm | The 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.
|
inline |
Sets the number of controller clock ticks per current controller clock tick.
| [in] | handle | The controller (CTRL) handle |
| [in] | numCtrlTicksPerCurrentTick | The 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().
|
inlinestatic |
Sets the number of controller clock ticks per current controller clock tick.
| [in] | handle | The controller (CTRL) handle |
| [in] | numCtrlTicksPerCurrentTick | The number of controller clock ticks per current controller clock tick |
Definition at line 1665 of file float/ctrl.h.
References _CTRL_Obj_::numCtrlTicksPerCurrentTick.
|
inline |
Sets the number of controller clock ticks per speed controller clock tick.
| [in] | handle | The controller (CTRL) handle |
| [in] | numCtrlTicksPerSpeedTick | The 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().
|
inlinestatic |
Sets the number of controller clock ticks per speed controller clock tick.
| [in] | handle | The controller (CTRL) handle |
| [in] | numCtrlTicksPerSpeedTick | The number of controller clock ticks per speed clock tick |
Definition at line 1679 of file float/ctrl.h.
References _CTRL_Obj_::numCtrlTicksPerSpeedTick.
|
inline |
Sets the number of controller clock ticks per trajectory clock tick.
| [in] | handle | The controller (CTRL) handle |
| [in] | numCtrlTicksPerTrajTick | The 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().
|
inline |
Sets the number of Interrupt Service Routine (ISR) clock ticks per controller clock tick.
| [in] | handle | The controller (CTRL) handle |
| [in] | numIsrTicksPerCtrlTick | The 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().
|
inlinestatic |
Sets the number of Interrupt Service Routine (ISR) clock ticks per controller clock tick.
| [in] | handle | The controller (CTRL) handle |
| [in] | numIsrTicksPerCtrlTick | The 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.
| [in] | handle | The controller (CTRL) handle |
| [in] | pUserParams | The pointer to the user parameters |
| [in] | handle | The controller (CTRL) handle |
| [in] | pUserParams | The pointer to the user parameters |
This function allows for updates in scale factors during real-time operation of the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | pUserParams | The pointer to the user parameters |
| [in] | handle | The controller (CTRL) handle |
| [in] | pUserParams | The 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.
|
inline |
Sets the high frequency resistance (Rhf) value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | Rhf | The Rhf value |
Definition at line 1671 of file 32b/ctrl.h.
References _CTRL_Obj_::Rhf.
Referenced by CTRL_setParams().
|
inline |
Sets the R/L value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | RoverL | The R/L value |
Definition at line 1684 of file 32b/ctrl.h.
References _CTRL_Obj_::RoverL.
Referenced by CTRL_setParams().
|
inline |
Sets the maximum speed value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | maxSpd_pu | The maximum speed value, pu |
Definition at line 1710 of file 32b/ctrl.h.
References _CTRL_Obj_::spd_max.
Referenced by CTRL_setMaximumSpeed_pu().
|
inline |
Sets the output speed value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | spd_out_pu | The 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.
| [in] | handle | The controller (CTRL) handle |
| [in] | spd_ref_krpm | The 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.
| [in] | handle | The controller (CTRL) handle |
| [in] | spd_ref_pu | The output speed reference value, pu |
Definition at line 465 of file 32b/ctrl.c.
References _CTRL_Obj_::spd_ref.
Referenced by CTRL_setParams().
|
inline |
Sets maximum speed controller output.
| [in] | handle | The controller (CTRL) handle |
| [in] | spdMax | The maximum allowed output of the speed controller |
Definition at line 2108 of file 32b/ctrl.h.
References TRAJ_setIntValue(), and _CTRL_Obj_::trajHandle_spdMax.
|
inlinestatic |
Sets the feedback speed value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | speed_fb_Hz | The 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().
|
inlinestatic |
Sets the feedback speed value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | speed_fb_pu | The feedback speed value, pu |
Definition at line 1697 of file 32b/ctrl.h.
References _CTRL_Obj_::speed_fb_pu.
Referenced by CTRL_setup_user().
|
inlinestatic |
Sets the maximum output value for the speed controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | speed_out_A | The 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().
|
inlinestatic |
Sets the maximum output value for the speed controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | speed_outMax_A | The maximum speed value, A |
Definition at line 1739 of file float/ctrl.h.
References _CTRL_Obj_::speed_outMax_A.
Referenced by CTRL_setParams().
|
inlinestatic |
Sets the maximum output value for the speed controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | speed_outMax_pu | The 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().
|
inlinestatic |
Sets the minimum output value for the speed controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | speed_outMin_A | The minimum speed value, A |
Definition at line 1752 of file float/ctrl.h.
References _CTRL_Obj_::speed_outMin_A.
Referenced by CTRL_setParams().
|
inlinestatic |
Sets the output speed reference value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | speed_ref_Hz | The 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().
|
inlinestatic |
Sets the output speed reference value in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | speed_ref_pu | The 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().
|
inlinestatic |
Sets the speed controller period value.
| [in] | handle | The controller (CTRL) handle |
| [in] | speedCtrlPeriod_sec | The speed controller period value, sec |
Definition at line 1778 of file float/ctrl.h.
References _CTRL_Obj_::speedCtrlPeriod_sec.
Referenced by CTRL_setParams().
|
inline |
Sets the controller state.
| [in] | handle | The controller (CTRL) handle |
| [in] | state | The 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().
|
inline |
Sets the trajectory execution frequency.
| [in] | handle | The controller (CTRL) handle |
| [in] | trajFreq_Hz | The trajectory execution frequency, Hz |
Definition at line 1788 of file 32b/ctrl.h.
References _CTRL_Obj_::trajFreq_Hz.
Referenced by CTRL_setParams().
|
inline |
Sets the trajectory execution period.
| [in] | handle | The controller (CTRL) handle |
| [in] | trajPeriod_sec | The trajectory execution period, sec |
Definition at line 1801 of file 32b/ctrl.h.
References _CTRL_Obj_::trajPeriod_sec.
Referenced by CTRL_setParams().
|
inlinestatic |
Sets the integrator (Ui) value in the specified controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | Ui | The 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.
|
inline |
Sets the integrator (Ui) value in the specified controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | ctrlType | The controller type |
| [in] | Ui | The 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().
|
inlinestatic |
Sets up the user controller (CTRL) object.
| [in] | handle | The controller (CTRL) handle |
| [in] | speed_ref_Hz | The reference speed value to use for the speed controller, Hz |
| [in] | speed_fb_Hz | The feedback speed value to use for the speed controller, Hz |
| [in] | pIdq_A | The pointer to the Idq values, A |
| [in] | pIdq_offset_A | The pointer to the Idq offset values, A |
| [in] | pVdq_offset_V | The pointer to the Vdq offset values, V |
| [in] | flag_enableSpeedCtrl | The flag used to enable the speed controller |
| [in] | flag_enableCurrentCtrl | The flag used to enable the current controller |
| [in] | flag_useZeroIq_ref | The 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().
| [in] | handle | The 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 | ||
| ) |
Sets up the speed and current controllers.
Definition at line 570 of file 32b/ctrl.c.
References CTRL_getCount_traj(), CTRL_getNumCtrlTicksPerTrajTick(), CTRL_getState(), CTRL_incrCounter_current(), CTRL_incrCounter_speed(), CTRL_incrCounter_state(), CTRL_incrCounter_traj(), CTRL_resetCounter_traj(), CTRL_runTraj(), CTRL_setAngle_pu(), CTRL_setFlag_enableCurrentCtrl(), CTRL_setFlag_enableSpeedCtrl(), CTRL_setIdq_offset_pu(), CTRL_setSpeed_fb_pu(), CTRL_setSpeed_outMax_pu(), CTRL_setSpeed_ref_pu(), CTRL_setVdq_offset_pu(), and CTRL_State_OnLine.
| 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.
| [in] | handle | The controller (CTRL) handle |
| [in] | numCurrentSensors | The 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.
| [in] | handle | The controller (CTRL) handle |
| [in] | numVoltageSensors | The 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.
| [in] | handle | The controller (CTRL) handle |
Referenced by CTRL_updateState().
| void CTRL_setupEst | ( | CTRL_Handle | handle | ) |
Sets up the estimator (CTRL) object.
| [in] | handle | The controller (CTRL) handle |
| void CTRL_setupEstIdleState | ( | CTRL_Handle | handle | ) |
Sets up the controller and trajectory generator for the estimator idle state.
| [in] | handle | The 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.
| [in] | handle | The controller (CTRL) handle |
Referenced by CTRL_updateState().
| void CTRL_setupTraj | ( | CTRL_Handle | handle | ) |
Sets up the trajectory (TRAJ) object.
| [in] | handle | The 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.
| [in] | handle | The controller (CTRL) handle |
Referenced by CTRL_updateState().
|
inline |
Sets the alpha/beta voltage input vector values in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | pVab_in_pu | The 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().
|
inline |
Sets the alpha/beta current output vector values in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | pVab_out_pu | The 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().
|
inlinestatic |
Sets the direct voltage scale factor.
| [in] | handle | The controller (CTRL) handle |
| [in] | Vd_sf | The direct voltage scale factor |
Definition at line 1841 of file float/ctrl.h.
References _CTRL_Obj_::Vd_sf.
Referenced by CTRL_setParams().
|
inlinestatic |
Sets the direct/quadrature voltage (Vdq) offset vector values in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | pVdq_offset_pu | The 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().
|
inlinestatic |
Sets the direct/quadrature offset voltage (Vdq_offset) vector values in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | pVdq_offset_V | The 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().
|
inline |
Sets the direct/quadrature voltage output vector values in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | pVdq_out_pu | The 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().
|
inlinestatic |
Sets the direct/quadrature voltage (Vdq) vector values in the controller.
| [in] | handle | The controller (CTRL) handle |
| [in] | pVdq_V | The 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.
| [in] | handle | The controller (CTRL) handle |
| [in] | targetProc | The target processor |
| [in] | majorReleaseNumber | The major release number |
| [in] | minorReleaseNumber | The 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.
| [in] | handle | The controller (CTRL) handle |
| [in] | pWaitTimes | A 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.
| [in] | handle | The controller (CTRL) handle |
| [in] | pWaitTimes | A 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 | ) |
Updates the controller state.
| [in] | handle | The controller (CTRL) handle |
Definition at line 642 of file 32b/ctrl.c.
References _IQ30, CTRL_checkForErrors(), CTRL_getCount_state(), CTRL_getFlag_enable(), CTRL_getFlag_enableCtrl(), CTRL_getFlag_enableOffset(), CTRL_getFlag_enableUserMotorParams(), CTRL_getState(), CTRL_getWaitTime(), CTRL_isNotIdle(), CTRL_reset(), CTRL_resetCounter_state(), CTRL_setFlag_enableCtrl(), CTRL_setState(), CTRL_setupCtrl(), CTRL_setupEstIdleState(), CTRL_setupEstOnLineState(), CTRL_setupTraj(), CTRL_setUserMotorParams(), CTRL_State_Error, CTRL_State_Idle, CTRL_State_OffLine, CTRL_State_OnLine, EST_isIdle(), EST_isLockRotor(), EST_isMotorIdentified(), EST_isOnLine(), EST_setIdle(), EST_setIdle_all(), EST_setRs_pu(), EST_updateState(), _CTRL_Obj_::estHandle, _CTRL_Obj_::flag_enableCtrl, _CTRL_Obj_::flag_enableUserMotorParams, TRAJ_getTargetValue(), and _CTRL_Obj_::trajHandle_Id.
|
inline |
Determines if a zero Iq current reference should be used in the controller.
| [in] | handle | The controller (CTRL) handle |
Definition at line 1972 of file 32b/ctrl.h.
References EST_useZeroIq_ref(), and _CTRL_Obj_::estHandle.
Referenced by CTRL_runOnLine().
1.8.9.1