MotorWare f2806x Module API Documentation
Modules | Data Structures | Typedefs | Enumerations | Functions
EST

Modules

 Module overview
 

Data Structures

struct  _EST_InputData_
 Defines the estimator (EST) input data. More...
 
struct  _EST_OutputData_
 Defines the estimator (EST) output data. More...
 

Typedefs

typedef struct _EST_Obj_ * EST_Handle
 Defines the estimator (EST) handle. More...
 
typedef struct _EST_InputData_ EST_InputData_t
 Defines the estimator (EST) input data. More...
 
typedef struct _EST_OutputData_ EST_OutputData_t
 Defines the estimator (EST) output data. More...
 
typedef struct _EST_Obj_ * EST_Handle
 Defines the estimator (EST) handle. More...
 

Enumerations

enum  EST_RsOnLineFilterType_e { EST_RsOnLineFilterType_Current =0, EST_RsOnLineFilterType_Voltage, EST_RsOnLineFilterType_Current =0, EST_RsOnLineFilterType_Voltage }
 Enumeration for the Rs online filter types. More...
 
enum  EST_RsOnLineFilterType_e { EST_RsOnLineFilterType_Current =0, EST_RsOnLineFilterType_Voltage, EST_RsOnLineFilterType_Current =0, EST_RsOnLineFilterType_Voltage }
 Enumeration for the Rs online filter types. More...
 

Functions

float_t EST_computeLr_H (EST_Handle handle, const _iq current)
 Computes the rotor inductance in Henries (H) More...
 
bool EST_doCurrentCtrl (EST_Handle handle)
 Determines if current control should be performed during motor identification. More...
 
bool EST_doSpeedCtrl (EST_Handle handle)
 Determines if speed control should be performed during motor identification. More...
 
void EST_genOutputLimits_Pid_Id (EST_Handle handle, const _iq maxDutyCycle, _iq *outMin, _iq *outMax)
 Generated the PID Id controller output limits. More...
 
void EST_genOutputLimits_Pid_Iq (EST_Handle handle, const _iq maxDutyCycle, const _iq out_Id, _iq *outMin, _iq *outMax)
 Generated the PID Id controller output limits. More...
 
_iq EST_get_krpm_to_pu_sf (EST_Handle handle)
 Gets the krpm to pu scale factor in per unit (pu), IQ24. More...
 
_iq EST_get_pu_to_krpm_sf (EST_Handle handle)
 Gets the pu to krpm scale factor in per unit (pu), IQ24. More...
 
_iq EST_getAngle_pu (EST_Handle handle)
 Gets the angle value from the estimator in per unit (pu), IQ24. More...
 
_iq EST_getDcBus_pu (EST_Handle handle)
 Gets the DC bus value from the estimator in per unit (pu), IQ24. More...
 
EST_ErrorCode_e EST_getErrorCode (EST_Handle handle)
 Gets the error code from the estimator. More...
 
float_t EST_getFe (EST_Handle handle)
 Gets the electrical frequency of the motor in Hertz (Hz). More...
 
_iq EST_getFe_pu (EST_Handle handle)
 Gets the electrical frequency of the motor in per unit (pu), IQ24. More...
 
bool EST_getFlag_enableForceAngle (EST_Handle handle)
 Gets the enable force angle flag value from the estimator. More...
 
bool EST_getFlag_enableRsOnLine (EST_Handle handle)
 Gets the value of the flag which enables online stator resistance (Rs) estimation. More...
 
bool EST_getFlag_enableRsRecalc (EST_Handle handle)
 Gets the enable stator resistance re-calibrate flag value from the estimator. More...
 
bool EST_getFlag_estComplete (EST_Handle handle)
 Gets the value of the flag which denotes when the estimation is complete. More...
 
bool EST_getFlag_updateRs (EST_Handle handle)
 Gets the value of the flag which enables the updating of the stator resistance (Rs) value. More...
 
float_t EST_getFlux_VpHz (EST_Handle handle)
 Gets the flux value in Volts per Hertz (V/Hz). More...
 
float_t EST_getFlux_Wb (EST_Handle handle)
 Gets the flux value in Webers (Wb). More...
 
_iq EST_getFlux_pu (EST_Handle handle)
 Gets the flux value in per unit (pu), IQ24. More...
 
float_t EST_getFm (EST_Handle handle)
 Gets the mechanical frequency of the motor in Hertz (Hz). More...
 
_iq EST_getFm_pu (EST_Handle handle)
 Gets the mechanical frequency of the motor in per unit (pu), IQ24. More...
 
_iq EST_getForceAngleDelta_pu (EST_Handle handle)
 Gets the force angle delta value from the estimator in per unit (pu), IQ24. More...
 
bool EST_getForceAngleStatus (EST_Handle handle)
 Gets the status of the force angle operation in the estimator. More...
 
_iq EST_getFreqB0_lp_pu (EST_Handle handle)
 Gets the low pass filter numerator value in the frequency estimator in per unit (pu), IQ30. More...
 
_iq EST_getFreqBeta_lp_pu (EST_Handle handle)
 Gets the value used to set the pole location in the low-pass filter of the frequency estimator in per unit (pu), IQ30. More...
 
float_t EST_getFslip (EST_Handle handle)
 Gets the slip frequency of the motor in Hertz (Hz). More...
 
_iq EST_getFslip_pu (EST_Handle handle)
 Gets the slip frequency of the motor in per unit (pu), IQ24. More...
 
float_t EST_getFullScaleCurrent (EST_Handle handle)
 Gets the full scale current value used in the estimator in Amperes (A). More...
 
float_t EST_getFullScaleFlux (EST_Handle handle)
 Gets the full scale flux value used in the estimator in Volts per Hertz (V/Hz). More...
 
float_t EST_getFullScaleFreq (EST_Handle handle)
 Gets the full scale frequency value used in the estimator in Hertz (Hz). More...
 
float_t EST_getFullScaleInductance (EST_Handle handle)
 Gets the full scale inductance value used in the estimator in Henries (H). More...
 
float_t EST_getFullScaleResistance (EST_Handle handle)
 Gets the full scale resistance value used in the estimator in Ohms ( $\Omega$). More...
 
float_t EST_getFullScaleVoltage (EST_Handle handle)
 Gets the full scale voltage value used in the estimator in Volts (V). More...
 
void EST_getIab_pu (EST_Handle handle, MATH_vec2 *pIab)
 Gets the Iab current vector in per unit (pu), IQ24. More...
 
float_t EST_getIdRated (EST_Handle handle)
 Gets the Id rated current value from the estimator in Amperes (A). More...
 
_iq EST_getIdRated_pu (EST_Handle handle)
 Gets the Id rated current value from the estimator in per unit (pu), IQ24. More...
 
_iq EST_getIdRated_indEst_pu (EST_Handle handle)
 Gets the Id current value used for inductance estimation of induction motors in per unit (pu), IQ24. More...
 
_iq EST_getIdRated_ratedFlux_pu (EST_Handle handle)
 Gets the Id current value used for flux estimation of induction motors in per unit (pu), IQ24. More...
 
float_t EST_getLr_H (EST_Handle handle)
 Gets the rotor inductance value in Henries (H). More...
 
_iq EST_getLr_pu (EST_Handle handle)
 Gets the rotor inductance value in per unit (pu), IQ30. More...
 
uint_least8_t EST_getLr_qFmt (EST_Handle handle)
 Gets the rotor inductance Q format in 8 bit unsigned integer (uint_least8_t). More...
 
float_t EST_getLs_d_H (EST_Handle handle)
 Gets the direct stator inductance value in Henries (H). More...
 
_iq EST_getLs_d_pu (EST_Handle handle)
 Gets the direct stator inductance value in per unit (pu), IQ30. More...
 
void EST_getLs_dq_pu (EST_Handle handle, MATH_vec2 *pLs_dq_pu)
 Gets the direct/quadrature stator inductance vector values from the estimator in per unit (pu), IQ30. More...
 
float_t EST_getLs_q_H (EST_Handle handle)
 Gets the stator inductance value in the quadrature coordinate direction in Henries (H). More...
 
_iq EST_getLs_q_pu (EST_Handle handle)
 Gets the stator inductance value in the quadrature coordinate direction in per unit (pu), IQ30. More...
 
uint_least8_t EST_getLs_qFmt (EST_Handle handle)
 Gets the stator inductance Q format in 8 bit unsigned integer (uint_least8_t). More...
 
_iq EST_getLs_max_pu (EST_Handle handle)
 Gets the maximum stator inductance value from the stator inductance estimator. More...
 
_iq EST_getLs_min_pu (EST_Handle handle)
 Gets the minimum stator inductance value from the stator inductance estimator. More...
 
_iq EST_getLs_coarse_max_pu (EST_Handle handle)
 Gets the maximum stator inductance value during coarse estimation in the stator inductance estimator. More...
 
_iq EST_getMaxAccel_pu (EST_Handle handle)
 Gets the maximum acceleration value used in the estimator in per unit (pu), IQ24. More...
 
_iq EST_getMaxAccel_est_pu (EST_Handle handle)
 Gets the maximum estimation acceleration value used in the estimator in per unit (pu), IQ24. More...
 
_iq EST_getMaxCurrentSlope_pu (EST_Handle handle)
 Gets the maximum current slope value used in the estimator in per unit (pu), IQ24. More...
 
_iq EST_getMaxCurrentSlope_epl_pu (EST_Handle handle)
 Gets the maximum EPL (Efficient Partial Load) current slope value used in the estimator in per unit (pu), IQ24. More...
 
_iq EST_getOneOverDcBus_pu (EST_Handle handle)
 Gets the inverse of the DC bus voltage in per unit (pu), IQ24. More...
 
float_t EST_getRr_Ohm (EST_Handle handle)
 Gets the rotor resistance value in Ohms ( $\Omega$). More...
 
_iq EST_getRr_pu (EST_Handle handle)
 Gets the rotor resistance value in per unit (pu), IQ30. More...
 
uint_least8_t EST_getRr_qFmt (EST_Handle handle)
 Gets the rotor resistance Q format in 8 bit unsigned integer (uint_least8_t). More...
 
float_t EST_getRs_Ohm (EST_Handle handle)
 Gets the stator resistance value in Ohms ( $\Omega$). More...
 
_iq EST_getRs_pu (EST_Handle handle)
 Gets the stator resistance value in per unit (pu), IQ30. More...
 
uint_least8_t EST_getRs_qFmt (EST_Handle handle)
 Gets the stator resistance Q format in 8 bit unsigned integer (uint_least8_t). More...
 
void EST_getRsOnLineFilterParams (EST_Handle handle, const EST_RsOnLineFilterType_e filterType, _iq *pFilter_0_b0, _iq *pFilter_0_a1, _iq *pFilter_0_y1, _iq *pFilter_1_b0, _iq *pFilter_1_a1, _iq *pFilter_1_y1)
 Gets the online stator resistance filter parameters in per unit (pu), IQ24. More...
 
float_t EST_getRsOnLine_Ohm (EST_Handle handle)
 Gets the online stator resistance value in Ohms ( $\Omega$). More...
 
_iq EST_getRsOnLine_pu (EST_Handle handle)
 Gets the online stator resistance value in per unit (pu), IQ30. More...
 
uint_least8_t EST_getRsOnLine_qFmt (EST_Handle handle)
 Gets the online stator resistance Q format in 8 bit unsigned integer (uint_least8_t). More...
 
_iq EST_getRsOnLineId_mag_pu (EST_Handle handle)
 Gets the Id magnitude value used for online stator resistance estimation in per unit (pu), IQ24. More...
 
_iq EST_getRsOnLineId_pu (EST_Handle handle)
 Gets the Id value used for online stator resistance estimation in per unit (pu), IQ24. More...
 
void EST_setRsOnLineId_pu (EST_Handle handle, const _iq Id_pu)
 Sets the Id value in the online stator resistance estimator in per unit (pu), IQ24. More...
 
int_least8_t EST_getSignOfDirection (EST_Handle handle)
 Gets the sign of the direction value in 8 bit signed integer (int_least8_t). More...
 
_iq EST_getSpeed_krpm (EST_Handle handle)
 Gets the speed value in per unit (pu), IQ24. More...
 
EST_State_e EST_getState (EST_Handle handle)
 Gets the state of the estimator. More...
 
_iq EST_getTorque_lbin (EST_Handle handle)
 Gets the torque value in per unit (pu), IQ24. More...
 
_iq EST_getTorque_Nm (EST_Handle handle)
 Gets the torque value in per unit (pu), IQ24. More...
 
bool EST_isError (EST_Handle handle)
 Determines if there is an estimator error. More...
 
bool EST_isIdle (EST_Handle handle)
 Determines if the estimator is idle. More...
 
bool EST_isLockRotor (EST_Handle handle)
 Determines if the estimator is waiting for the rotor to be locked. More...
 
bool EST_isMotorIdentified (EST_Handle handle)
 Determines if the motor has been identified. More...
 
bool EST_isOnLine (EST_Handle handle)
 Determines if the estimator is ready for online control. More...
 
void EST_resetCounter_ctrl (EST_Handle handle)
 Resets the control counter. More...
 
void EST_resetCounter_state (EST_Handle handle)
 Resets the state counter. More...
 
void EST_run (EST_Handle handle, const MATH_vec2 *pIab_pu, const MATH_vec2 *pVab_pu, const _iq dcBus_pu, const _iq speed_ref_pu)
 Runs the estimator. More...
 
void EST_setAngle_pu (EST_Handle handle, const _iq angle_pu)
 Sets the angle value in the estimator in per unit (pu), IQ24. More...
 
void EST_setDcBus_pu (EST_Handle handle, const _iq dcBus_pu)
 Sets the DC bus voltage in the estimator in per unit (pu), IQ24. More...
 
void EST_setFlag_enableFluxControl (EST_Handle handle, const bool state)
 Sets the enable flux control flag in the estimator. More...
 
void EST_setFlag_enableForceAngle (EST_Handle handle, const bool state)
 Sets the enable force angle flag in the estimator. More...
 
void EST_setFlag_enableRsOnLine (EST_Handle handle, const bool state)
 Sets the enable Rs online flag in the estimator. More...
 
void EST_setFlag_enableRsRecalc (EST_Handle handle, const bool state)
 Sets the enable stator resistance (Rs) re-calculation flag in the estimator. More...
 
void EST_setFlag_estComplete (EST_Handle handle, const bool state)
 Sets the estimation complete flag in the estimator. More...
 
void EST_setFlag_updateRs (EST_Handle handle, const bool state)
 Sets the update stator resistance (Rs) flag in the estimator. More...
 
void EST_setForceAngleDelta_pu (EST_Handle handle, const _iq angleDelta_pu)
 Sets the force angle delta value in the estimator in per unit (pu), IQ24. More...
 
void EST_setFreqB0_lp_pu (EST_Handle handle, const _iq b0_lp_pu)
 Sets the low pass filter numerator value in the frequency estimator in per unit (pu), IQ30. More...
 
void EST_setFreqBeta_lp_pu (EST_Handle handle, const _iq beta_lp_pu)
 Sets the value used to set the low pass pole location in the frequency estimator in per unit (pu), IQ30. More...
 
void EST_setFullScaleCurrent (EST_Handle handle, const float_t fullScaleCurrent)
 Sets the full scale current in the estimator in Amperes (A). More...
 
void EST_setFullScaleFlux (EST_Handle handle, const float_t fullScaleFlux)
 Gets the full scale flux value used in the estimator in Volts*seconds (V.s). More...
 
void EST_setFullScaleFreq (EST_Handle handle, const float_t fullScaleFreq)
 Sets the full scale frequency in the estimator in Hertz (Hz). More...
 
void EST_setFullScaleInductance (EST_Handle handle, const float_t fullScaleInductance)
 Sets the full scale inductance in the estimator in Henries (H). More...
 
void EST_setFullScaleResistance (EST_Handle handle, const float_t fullScaleResistance)
 Sets the full scale resistance in the estimator in Ohms ( $\Omega$). More...
 
void EST_setFullScaleVoltage (EST_Handle handle, const float_t fullScaleVoltage)
 Sets the full scale resistance in the estimator in Volts (V). More...
 
void EST_setIdle (EST_Handle handle)
 Sets the estimator to idle. More...
 
void EST_setIdle_all (EST_Handle handle)
 Sets the estimator and all of the subordinate estimators to idle. More...
 
void EST_setId_ref_pu (EST_Handle handle, const _iq Id_ref_pu)
 Sets the direct current (Id) reference value in the estimator in per unit (pu), IQ24. More...
 
void EST_setIdRated_pu (EST_Handle handle, const _iq IdRated_pu)
 Sets the Id rated current value in the estimator in per unit (pu), IQ24. More...
 
void EST_setIq_ref_pu (EST_Handle handle, const _iq Iq_ref_pu)
 Sets the quadrature current (Iq) reference value in the estimator in per unit (pu), IQ24. More...
 
void EST_setLs_d_pu (EST_Handle handle, const _iq Ls_d_pu)
 Sets the direct stator inductance value in the estimator in per unit (pu), IQ30. More...
 
_iq EST_getLs_delta_pu (EST_Handle handle)
 Gets the delta stator inductance value in the stator inductance estimator. More...
 
void EST_setLs_delta_pu (EST_Handle handle, const _iq Ls_delta_pu)
 Sets the delta stator inductance value during fine estimation. More...
 
_iq EST_getRs_delta_pu (EST_Handle handle)
 Gets the delta stator resistance value from the stator resistance estimator. More...
 
void EST_setRs_delta_pu (EST_Handle handle, const _iq Rs_delta_pu)
 Sets the delta stator resistance value. More...
 
void EST_setLs_dq_pu (EST_Handle handle, const MATH_vec2 *pLs_dq_pu)
 Sets the direct/quadrature stator inductance vector values in the estimator in per unit (pu), IQ30. More...
 
void EST_setLs_q_pu (EST_Handle handle, const _iq Ls_q_pu)
 Sets the quadrature stator inductance value in the estimator in per unit (pu), IQ30. More...
 
void EST_setLs_qFmt (EST_Handle handle, const uint_least8_t Ls_qFmt)
 Sets the stator inductance Q format in the estimator in 8 bit unsigned integer (uint_least8_t). More...
 
void EST_setMaxAccel_pu (EST_Handle handle, const _iq maxAccel_pu)
 Sets the maximum acceleration value in the estimator in per unit (pu), IQ24. More...
 
void EST_setMaxAccel_est_pu (EST_Handle handle, const _iq maxAccel_pu)
 Sets the maximum estimation acceleration value in the estimator in per unit (pu), IQ24. More...
 
void EST_setMaxCurrentSlope_pu (EST_Handle handle, const _iq maxCurrentSlope_pu)
 Sets the maximum current slope value in the estimator in per unit (pu), IQ24. More...
 
void EST_setMaxCurrentSlope_epl_pu (EST_Handle handle, const _iq maxCurrentSlope_pu)
 Sets the maximum EPL (Efficient Partial Load) current slope value used in the estimator in per unit (pu), IQ24. More...
 
void EST_setRr_pu (EST_Handle handle, const _iq Rr_pu)
 Sets the rotor resistance value in the estimator in per unit (pu), IQ30. More...
 
void EST_setRr_qFmt (EST_Handle handle, uint_least8_t Rr_qFmt)
 Sets the rotor resistance Q format in the estimator in 8 bit unsigned integer (uint_least8_t). More...
 
void EST_setRsOnLineAngleDelta_pu (EST_Handle handle, const _iq angleDelta_pu)
 Sets the delta angle value in the online stator resistance estimator. More...
 
void EST_setRsOnLine_pu (EST_Handle handle, const _iq Rs_pu)
 Sets the stator resistance value in the online stator resistance estimator in per unit (pu), IQ30. More...
 
void EST_setRsOnLine_qFmt (EST_Handle handle, const uint_least8_t Rs_qFmt)
 Sets the stator resistance Q format in the online stator resistance estimator in 8 bit unsigned integer (uint_least8_t). More...
 
void EST_setRsOnLineFilterParams (EST_Handle handle, const EST_RsOnLineFilterType_e filterType, const _iq filter_0_b0, const _iq filter_0_a1, const _iq filter_0_y1, const _iq filter_1_b0, const _iq filter_1_a1, const _iq filter_1_y1)
 Sets the online stator resistance filter parameters in per unit (pu), IQ24. More...
 
void EST_setRsOnLineId_mag_pu (EST_Handle handle, const _iq Id_mag_pu)
 Sets the Id magnitude value used for online stator resistance estimation in per unit (pu), IQ24. More...
 
void EST_setRs_pu (EST_Handle handle, const _iq Rs_pu)
 Sets the stator resistance value used in the estimator in per unit (pu), IQ30. More...
 
void EST_setRs_qFmt (EST_Handle handle, uint_least8_t Rs_qFmt)
 Sets the stator resistance Q format in the estimator in 8 bit unsigned integer (uint_least8_t). More...
 
void EST_updateId_ref_pu (EST_Handle handle, _iq *pId_ref_pu)
 Updates the Id reference value used for online stator resistance estimation in per unit (pu), IQ24. More...
 
bool EST_updateState (EST_Handle handle, const _iq Id_target_pu)
 Updates the estimator state. More...
 
bool EST_useZeroIq_ref (EST_Handle handle)
 Determines if a zero Iq current reference should be used in the controller. More...
 
uint_least8_t EST_computeDirection_qFmt (EST_Handle handle, const float_t flux_max)
 Computes the direction Q format for the estimator. More...
 
uint_least8_t EST_getDir_qFmt (EST_Handle handle)
 Gets the direction Q format from the estimator. More...
 
void EST_setDir_qFmt (EST_Handle handle, const uint_least8_t dir_qFmt)
 Sets the direction Q format in the estimator. More...
 
void EST_setFe_neg_max_pu (EST_Handle handle, const _iq fe_neg_max_pu)
 Sets maximum negative electrical frequency from the estimator. More...
 
void EST_setFe_pos_min_pu (EST_Handle handle, const _iq fe_pos_min_pu)
 Sets minimum positive electrical frequency from the estimator. More...
 
float_t EST_computeLmag_H (EST_Handle handle, const float_t current_A)
 Computes the magnetizing inductance in Henries (H) More...
 
float_t cla_EST_computeLmag_H (EST_Handle handle, const float_t current_A)
 
float_t EST_computePower_W (EST_Handle handle)
 Computes the power in Watts (W) More...
 
float_t cla_EST_computePower_W (EST_Handle handle)
 
float_t EST_computeTorque_Nm (EST_Handle handle)
 Computes the torque value in per Newton-meter (Nm) More...
 
float_t cla_EST_computeTorque_Nm (EST_Handle handle)
 
void EST_configureCtrl (EST_Handle handle, CTRL_Handle ctrlHandle)
 Configures the controller for each of the estimator states. More...
 
void cla_EST_configureCtrl (EST_Handle handle, CTRL_Handle ctrlHandle)
 
void EST_configureTraj (EST_Handle handle)
 Configures the trajectory generator for each of the estimator states. More...
 
void cla_EST_configureTraj (EST_Handle handle)
 
void EST_disable (EST_Handle handle)
 Disables the estimator. More...
 
void cla_EST_disable (EST_Handle handle)
 
void EST_disableTraj (EST_Handle handle)
 Disables the estimator trajectory generator. More...
 
void cla_EST_disableTraj (EST_Handle handle)
 
bool cla_EST_doCurrentCtrl (EST_Handle handle)
 
bool cla_EST_doSpeedCtrl (EST_Handle handle)
 
void EST_enable (EST_Handle handle)
 Enables the estimator. More...
 
void cla_EST_enable (EST_Handle handle)
 
void EST_enableTraj (EST_Handle handle)
 Enables the estimator trajectory generator. More...
 
void cla_EST_enableTraj (EST_Handle handle)
 
float_t EST_get_rpm_to_rps_sf (EST_Handle handle)
 Gets the rpm to rad/sec scale factor. More...
 
float_t cla_EST_get_rpm_to_rps_sf (EST_Handle handle)
 
float_t EST_get_rps_to_rpm_sf (EST_Handle handle)
 Gets the rad/sec to rpm scale factor. More...
 
float_t cla_EST_get_rps_to_rpm_sf (EST_Handle handle)
 
float_t EST_getAccel_rps2 (EST_Handle handle)
 Gets the mechanical acceleration from the estimator. More...
 
float_t cla_EST_getAccel_rps2 (EST_Handle handle)
 
float_t EST_getAngle_est_rad (EST_Handle handle)
 Gets the estimated angle from the estimator. More...
 
float_t cla_EST_getAngle_est_rad (EST_Handle handle)
 
float_t EST_getAngle_rad (EST_Handle handle)
 Gets the angle estimate for t = n+1 from the estimator in radians (rad). More...
 
float_t cla_EST_getAngle_rad (EST_Handle handle)
 
float_t EST_getAngle_traj_rad (EST_Handle handle)
 Gets the trajectory angle from the estimator. More...
 
float_t cla_EST_getAngle_traj_rad (EST_Handle handle)
 
float_t EST_getAngleDelta_rad (EST_Handle handle)
 Gets the angle delta estimate for t = n+1 from the estimator. More...
 
float_t cla_EST_getAngleDelta_rad (EST_Handle handle)
 
float_t EST_getAngleDelta_est_rad (EST_Handle handle)
 Gets the angle delta estimate for t = n+1 from the estimator in radians (rad). More...
 
float_t cla_EST_getAngleDelta_est_rad (EST_Handle handle)
 
float_t EST_getAngleDelta_traj_rad (EST_Handle handle)
 Gets the angle delta estimate for t = n+1 from the trajectory in radians (rad). More...
 
float_t cla_EST_getAngleDelta_traj_rad (EST_Handle handle)
 
int_least16_t EST_getCount_isr (EST_Handle handle)
 Gets the ISR count from the estimator. More...
 
int_least16_t cla_EST_getCount_isr (EST_Handle handle)
 
float_t EST_getDcBus_V (EST_Handle handle)
 Gets the DC bus value from the estimator in volts (V) More...
 
float_t cla_EST_getDcBus_V (EST_Handle handle)
 
void EST_getEab_V (EST_Handle handle, MATH_vec2 *pEab_V)
 Gets the alpha/beta back EMF voltage vector from the estimator. More...
 
void cla_EST_getEab_V (EST_Handle handle, MATH_vec2 *pEab_V)
 
void EST_getEdq_V (EST_Handle handle, MATH_vec2 *pEdq_V)
 Gets the direct/quadrature back EMF voltage vector from the estimator. More...
 
void cla_EST_getEdq_V (EST_Handle handle, MATH_vec2 *pEdq_V)
 
EST_ErrorCode_e cla_EST_getErrorCode (EST_Handle handle)
 
float_t EST_getFe_Hz (EST_Handle handle)
 Gets the electrical frequency of the motor in Hertz (Hz). More...
 
float_t cla_EST_getFe_Hz (EST_Handle handle)
 
float_t EST_getFe_abs_max_rps (EST_Handle handle)
 Gets the absolute maximum electrical frequency of the motor in rad/sec. More...
 
float_t cla_EST_getFe_abs_max_rps (EST_Handle handle)
 
float_t EST_getFe_rps (EST_Handle handle)
 Gets the electrical frequency of the motor in rad/sec. More...
 
float_t cla_EST_getFe_rps (EST_Handle handle)
 
bool EST_getFlag_bypassLockRotor (EST_Handle handle)
 Gets the bypass lock rotor flag value. More...
 
bool cla_EST_getFlag_bypassLockRotor (EST_Handle handle)
 
bool EST_getFlag_enable (EST_Handle handle)
 Gets the enable estimator flag value. More...
 
bool cla_EST_getFlag_enable (EST_Handle handle)
 
bool cla_EST_getFlag_enableForceAngle (EST_Handle handle)
 
bool EST_getFlag_enablePowerWarp (EST_Handle handle)
 Gets the enable power warp flag value from the trajectory generator. More...
 
bool cla_EST_getFlag_enablePowerWarp (EST_Handle handle)
 
bool cla_EST_getFlag_enableRsOnLine (EST_Handle handle)
 
bool cla_EST_getFlag_enableRsRecalc (EST_Handle handle)
 
bool EST_getFlag_enableTraj (EST_Handle handle)
 Gets the enable trajectory flag value from the trajectory generator. More...
 
bool cla_EST_getFlag_enableTraj (EST_Handle handle)
 
bool cla_EST_getFlag_estComplete (EST_Handle handle)
 
bool EST_getFlag_motorIdentified (EST_Handle handle)
 Gets the motor identified flag state in the estimator. More...
 
bool cla_EST_getFlag_motorIdentified (EST_Handle handle)
 
bool EST_getFlag_nearZeroSpeed (EST_Handle handle)
 Gets the near zero speed flag state. More...
 
bool cla_EST_getFlag_nearZeroSpeed (EST_Handle handle)
 
bool cla_EST_getFlag_updateRs (EST_Handle handle)
 
float_t cla_EST_getFlux_Wb (EST_Handle handle)
 
EST_Flux_State_e EST_getFluxState (EST_Handle handle)
 Gets the flux estimator state. More...
 
EST_Flux_State_e cla_EST_getFluxState (EST_Handle handle)
 
float_t EST_getFm_Hz (EST_Handle handle)
 Gets the mechanical frequency of the motor in Hertz (Hz). More...
 
float_t cla_EST_getFm_Hz (EST_Handle handle)
 
float_t EST_getFm_lp_Hz (EST_Handle handle)
 Gets the low pass filtered mechanical frequency of the motor in Hz. More...
 
float_t cla_EST_getFm_lp_Hz (EST_Handle handle)
 
float_t EST_getFm_lp_rps (EST_Handle handle)
 Gets the low pass filtered mechanical frequency of the motor in rad/sec. More...
 
float_t cla_EST_getFm_lp_rps (EST_Handle handle)
 
float_t EST_getFm_rps (EST_Handle handle)
 Gets the mechanical frequency of the motor in rad/sec. More...
 
float_t cla_EST_getFm_rps (EST_Handle handle)
 
float_t EST_getForceAngleDelta_rad (EST_Handle handle)
 Gets the force angle delta value from the estimator in radians (rad). More...
 
float_t cla_EST_getForceAngleDelta_rad (EST_Handle handle)
 
bool cla_EST_getForceAngleStatus (EST_Handle handle)
 
float_t EST_getFreqBeta_lp (EST_Handle handle)
 Gets the value used to set the pole location in the low-pass filter of the frequency estimator in radians per second (rps). More...
 
float_t cla_EST_getFreqBeta_lp (EST_Handle handle)
 
float_t EST_getFslip_Hz (EST_Handle handle)
 Gets the slip frequency of the motor in Hertz (Hz). More...
 
float_t cla_EST_getFslip_Hz (EST_Handle handle)
 
float_t EST_getFslip_rps (EST_Handle handle)
 Gets the slip frequency of the motor in rad/sec. More...
 
float_t cla_EST_getFslip_rps (EST_Handle handle)
 
void EST_getIab_A (EST_Handle handle, MATH_vec2 *pIab_A)
 Gets the Iab current vector in Ampere (A). More...
 
void cla_EST_getIab_A (EST_Handle handle, MATH_vec2 *pIab_A)
 
void EST_getIab_lp_A (EST_Handle handle, MATH_vec2 *pIab_lp_A)
 Gets the low pass filtered Iab current vector in Ampere (A). More...
 
void cla_EST_getIab_lp_A (EST_Handle handle, MATH_vec2 *pIab_lp_A)
 
float_t EST_getIab_beta_lp (EST_Handle handle)
 Gets the beta value for the Iab low pass filter. More...
 
float_t cla_EST_getIab_beta_lp (EST_Handle handle)
 
void EST_getIdq_A (EST_Handle handle, MATH_vec2 *pIdq_A)
 Gets the Idq current vector in Ampere (A) More...
 
void cla_EST_getIdq_A (EST_Handle handle, MATH_vec2 *pIdq_A)
 
void EST_getIdq_lp_A (EST_Handle handle, MATH_vec2 *pIdq_lp_A)
 Gets the Idq low pass filtered current vector in Ampere (A). More...
 
void cla_EST_getIdq_lp_A (EST_Handle handle, MATH_vec2 *pIdq_lp_A)
 
void EST_getIdq_ref_A (EST_Handle handle, MATH_vec2 *pIdq_ref_A)
 Gets the Idq current vector reference in Ampere (A). More...
 
void cla_EST_getIdq_ref_A (EST_Handle handle, MATH_vec2 *pIdq_ref_A)
 
float_t EST_getIdRated_A (EST_Handle handle)
 Gets the Id rated current value from the estimator in Ampere (A). More...
 
float_t cla_EST_getIdRated_A (EST_Handle handle)
 
float_t EST_getIdRated_delta_A (EST_Handle handle)
 Gets the Id rated delta current value from the estimator in Ampere (A) More...
 
float_t cla_EST_getIdRated_delta_A (EST_Handle handle)
 
float_t EST_getIdRated_indEst_A (EST_Handle handle)
 Gets the Id current value used for inductance estimation of induction motors in Ampere (A). More...
 
float_t cla_EST_getIdRated_indEst_A (EST_Handle handle)
 
float_t EST_getIntValue_Id_A (EST_Handle handle)
 Gets the intermediate value from the Id trajectory generator. More...
 
float_t cla_EST_getIntValue_Id_A (EST_Handle handle)
 
float_t EST_getIntValue_Iq_A (EST_Handle handle)
 Gets the intermediate value from the Iq trajectory generator. More...
 
float_t cla_EST_getIntValue_Iq_A (EST_Handle handle)
 
float_t EST_getIntValue_spd_Hz (EST_Handle handle)
 Gets the intermediate value from the speed trajectory generator. More...
 
float_t cla_EST_getIntValue_spd_Hz (EST_Handle handle)
 
float_t EST_getLhf_H (EST_Handle handle)
 Gets the Lhf value from the estimator. More...
 
float_t cla_EST_getLhf_H (EST_Handle handle)
 
float_t EST_getLmag_H (EST_Handle handle)
 Gets the magnetizing inductance value in Henry (H). More...
 
float_t cla_EST_getLmag_H (EST_Handle handle)
 
float_t EST_getLs_coarseDelta_H (EST_Handle handle)
 Gets the delta stator inductance value during coarse estimation. More...
 
float_t cla_EST_getLs_coarseDelta_H (EST_Handle handle)
 
float_t cla_EST_getLs_d_H (EST_Handle handle)
 
void EST_getLs_dq_H (EST_Handle handle, MATH_vec2 *pLs_dq_H)
 Gets the direct/quadrature stator inductance values from the estimator in Henry (H). More...
 
void cla_EST_getLs_dq_H (EST_Handle handle, MATH_vec2 *pLs_dq_H)
 
float_t EST_getLs_fineDelta_H (EST_Handle handle)
 Gets the delta stator inductance value during fine estimation. More...
 
float_t cla_EST_getLs_fineDelta_H (EST_Handle handle)
 
float_t EST_getLs_H (EST_Handle handle)
 Gets the stator inductance value in Henry (H) More...
 
float_t cla_EST_getLs_H (EST_Handle handle)
 
float_t cla_EST_getLs_q_H (EST_Handle handle)
 
float_t EST_getMaxCurrentDelta_A (EST_Handle handle)
 Gets the maximum current slope value used in the estimator in Amperes (A). More...
 
float_t cla_EST_getMaxCurrentDelta_A (EST_Handle handle)
 
float_t EST_getMaxCurrentDelta_pw_A (EST_Handle handle)
 Gets the maximum power warp current slope value used in the estimator in Amperes (A). More...
 
float_t cla_EST_getMaxCurrentDelta_pw_A (EST_Handle handle)
 
float_t EST_getMaxDelta_Id_A (EST_Handle handle)
 Gets the maximum delta value from the Id trajectory generator. More...
 
float_t cla_EST_getMaxDelta_Id_A (EST_Handle handle)
 
float_t EST_getMaxDelta_Iq_A (EST_Handle handle)
 Gets the maximum delta value from the Iq trajectory generator. More...
 
float_t cla_EST_getMaxDelta_Iq_A (EST_Handle handle)
 
float_t EST_getMaxDelta_spd_Hz (EST_Handle handle)
 Gets the maximum delta value from the speed trajectory generator. More...
 
float_t cla_EST_getMaxDelta_spd_Hz (EST_Handle handle)
 
float_t EST_getMaxSpeedDelta_Hz (EST_Handle handle)
 Gets the maximum acceleration value used in the estimator in Hertz (Hz). More...
 
float_t cla_EST_getMaxSpeedDelta_Hz (EST_Handle handle)
 
float_t EST_getMaxValue_Id_A (EST_Handle handle)
 Gets the maximum value from the Id trajectory generator. More...
 
float_t cla_EST_getMaxValue_Id_A (EST_Handle handle)
 
float_t EST_getMaxValue_Iq_A (EST_Handle handle)
 Gets the maximum value from the Iq trajectory generator. More...
 
float_t cla_EST_getMaxValue_Iq_A (EST_Handle handle)
 
float_t EST_getMaxValue_spd_Hz (EST_Handle handle)
 Gets the maximum value from the speed trajectory generator. More...
 
float_t cla_EST_getMaxValue_spd_Hz (EST_Handle handle)
 
float_t EST_getMinValue_Id_A (EST_Handle handle)
 Gets the minimum value from the Id trajectory generator. More...
 
float_t cla_EST_getMinValue_Id_A (EST_Handle handle)
 
float_t EST_getMinValue_Iq_A (EST_Handle handle)
 Gets the minimum value from the Iq trajectory generator. More...
 
float_t cla_EST_getMinValue_Iq_A (EST_Handle handle)
 
float_t EST_getMinValue_spd_Hz (EST_Handle handle)
 Gets the minimum value from the speed trajectory generator. More...
 
float_t cla_EST_getMinValue_spd_Hz (EST_Handle handle)
 
int_least16_t EST_getNumIsrTicksPerEstTick (EST_Handle handle)
 Gets the number of Interrupt Service Routine (ISR) clock ticks per estimator clock tick. More...
 
int_least16_t cla_EST_getNumIsrTicksPerEstTick (EST_Handle handle)
 
int_least16_t EST_getNumIsrTicksPerTrajTick (EST_Handle handle)
 Gets the number of Interrupt Service Routine (ISR) clock ticks per estimator trajectory clock tick. More...
 
int_least16_t cla_EST_getNumIsrTicksPerTrajTick (EST_Handle handle)
 
float_t EST_getOneOverDcBus_invV (EST_Handle handle)
 Gets the inverse of the DC bus voltage in 1/Volt (1/V). More...
 
float_t cla_EST_getOneOverDcBus_invV (EST_Handle handle)
 
float_t EST_getPwGain (EST_Handle handle)
 Gets the power warp gain from the trajectory generator. More...
 
float_t cla_EST_getPwGain (EST_Handle handle)
 
float_t EST_getRhf_Ohm (EST_Handle handle)
 Gets the Rhf value from the estimator. More...
 
float_t cla_EST_getRhf_Ohm (EST_Handle handle)
 
float_t EST_getRoverL_rps (EST_Handle handle)
 Gets the R/L value from the estimator. More...
 
float_t cla_EST_getRoverL_rps (EST_Handle handle)
 
float_t EST_getRr_coarseDelta_Ohm (EST_Handle handle)
 Gets the coarse delta rotor resistance value from the estimator. More...
 
float_t cla_EST_getRr_coarseDelta_Ohm (EST_Handle handle)
 
float_t EST_getRr_d_Ohm (EST_Handle handle)
 Gets the direct rotor resistance value in Ohm ( $\Omega$). More...
 
float_t cla_EST_getRr_d_Ohm (EST_Handle handle)
 
void EST_getRr_dq_Ohm (EST_Handle handle, MATH_vec2 *pRr_dq_Ohm)
 Gets the direct/quadrature rotor resistance values from the estimator in Ohms ( $\Omega$). More...
 
void cla_EST_getRr_dq_Ohm (EST_Handle handle, MATH_vec2 *pRr_dq_Ohm)
 
float_t EST_getRr_fineDelta_Ohm (EST_Handle handle)
 Gets the fine delta rotor resistance value from the estimator. More...
 
float_t cla_EST_getRr_fineDelta_Ohm (EST_Handle handle)
 
float_t cla_EST_getRr_Ohm (EST_Handle handle)
 
float_t EST_getRr_q_Ohm (EST_Handle handle)
 Gets the quadrature rotor resistance value in Ohms ( $\Omega$). More...
 
float_t cla_EST_getRr_q_Ohm (EST_Handle handle)
 
float_t EST_getRs_a_Ohm (EST_Handle handle)
 Gets the alpha stator resistance value in Ohms ( $\Omega$). More...
 
float_t cla_EST_getRs_a_Ohm (EST_Handle handle)
 
void EST_getRs_ab_Ohm (EST_Handle handle, MATH_vec2 *pRs_ab_Ohm)
 Gets the alpha/beta stator resistance values from the estimator in Ohms ( $\Omega$). More...
 
void cla_EST_getRs_ab_Ohm (EST_Handle handle, MATH_vec2 *pRs_ab_Ohm)
 
float_t EST_getRs_b_Ohm (EST_Handle handle)
 Gets the beta stator resistance value in Ohms ( $\Omega$). More...
 
float_t cla_EST_getRs_b_Ohm (EST_Handle handle)
 
float_t EST_getRs_coarseDelta_Ohm (EST_Handle handle)
 Gets the coarse delta stator resistance value from the estimator. More...
 
float_t cla_EST_getRs_coarseDelta_Ohm (EST_Handle handle)
 
float_t EST_getRs_d_Ohm (EST_Handle handle)
 Gets the direct stator resistance value in Ohms ( $\Omega$). More...
 
float_t cla_EST_getRs_d_Ohm (EST_Handle handle)
 
void EST_getRs_dq_Ohm (EST_Handle handle, MATH_vec2 *pRs_dq_Ohm)
 Gets the direct/quadrature stator resistance values from the estimator in Ohms ( $\Omega$). More...
 
void cla_EST_getRs_dq_Ohm (EST_Handle handle, MATH_vec2 *pRs_dq_Ohm)
 
float_t EST_getRs_fineDelta_Ohm (EST_Handle handle)
 Gets the fine delta stator resistance value from the estimator. More...
 
float_t cla_EST_getRs_fineDelta_Ohm (EST_Handle handle)
 
float_t EST_getRs_q_Ohm (EST_Handle handle)
 Gets the quadrature stator resistance value in Ohms ( $\Omega$). More...
 
float_t cla_EST_getRs_q_Ohm (EST_Handle handle)
 
float_t cla_EST_getRs_Ohm (EST_Handle handle)
 
float_t cla_EST_getRsOnLine_Ohm (EST_Handle handle)
 
float_t EST_getRsOnLineAngle_rad (EST_Handle handle)
 Gets the angle value from the estimator. More...
 
float_t cla_EST_getRsOnLineAngle_rad (EST_Handle handle)
 
float_t EST_getRsOnLineAngleDelta_rad (EST_Handle handle)
 Gets the delta angle value from the estimator. More...
 
float_t cla_EST_getRsOnLineAngleDelta_rad (EST_Handle handle)
 
float_t EST_getRsOnLineId_mag_A (EST_Handle handle)
 Gets the Id magnitude value used for online stator resistance estimation in Ampere (A). More...
 
float_t cla_EST_getRsOnLineId_mag_A (EST_Handle handle)
 
float_t EST_getRsOnLineId_A (EST_Handle handle)
 Gets the Id value used for online stator resistance estimation in Ampere (A). More...
 
float_t cla_EST_getRsOnLineId_A (EST_Handle handle)
 
void EST_getRsOnLineLpFilterParams (EST_Handle handle, const EST_RsOnLineFilterType_e filterType, const uint_least8_t filterNumber, float_t *b0, float_t *b1, float_t *a1, float_t *x1, float_t *y1)
 Gets the online stator resistance filter parameters. More...
 
void cla_EST_getRsOnLineLpFilterParams (EST_Handle handle, const EST_RsOnLineFilterType_e filterType, const uint_least8_t filterNumber, float_t *b0, float_t *b1, float_t *a1, float_t *x1, float_t *y1)
 
int_least8_t cla_EST_getSignOfDirection (EST_Handle handle)
 
float_t EST_getSpeed_ref_Hz (EST_Handle handle)
 Gets the reference speed value from the estimator. More...
 
float_t cla_EST_getSpeed_ref_Hz (EST_Handle handle)
 
float_t EST_getSpeed_rpm (EST_Handle handle)
 Gets the speed value in revolutions per second (rpm). More...
 
float_t cla_EST_getSpeed_rpm (EST_Handle handle)
 
EST_State_e cla_EST_getState (EST_Handle handle)
 
float_t EST_getTargetValue_Id_A (EST_Handle handle)
 Gets the target value from the Id trajectory generator. More...
 
float_t cla_EST_getTargetValue_Id_A (EST_Handle handle)
 
float_t EST_getTargetValue_Iq_A (EST_Handle handle)
 Gets the target value from the Iq trajectory generator. More...
 
float_t cla_EST_getTargetValue_Iq_A (EST_Handle handle)
 
float_t EST_getTargetValue_spd_Hz (EST_Handle handle)
 Gets the target value from the speed trajectory generator. More...
 
float_t cla_EST_getTargetValue_spd_Hz (EST_Handle handle)
 
float_t EST_getTorque_sf (EST_Handle handle)
 Gets the torque scale factor for the torque equation. More...
 
float_t cla_EST_getTorque_sf (EST_Handle handle)
 
int_least16_t EST_getTrajCount_isr (EST_Handle handle)
 Gets the trajectory ISR count from the estimator. More...
 
int_least16_t cla_EST_getTrajCount_isr (EST_Handle handle)
 
EST_Traj_State_e EST_getTrajState (EST_Handle handle)
 Gets the trajectory generator state. More...
 
EST_Traj_State_e cla_EST_getTrajState (EST_Handle handle)
 
void EST_getVab_V (EST_Handle handle, MATH_vec2 *pVab_V)
 Gets the Vab voltage vector in Volts (V) More...
 
void cla_EST_getVab_V (EST_Handle handle, MATH_vec2 *pVab_V)
 
void EST_getVdq_lp_V (EST_Handle handle, MATH_vec2 *pVdq_lp_V)
 Gets the low pass filtered Vdq voltage vector in Volts (V) More...
 
void cla_EST_getVdq_lp_V (EST_Handle handle, MATH_vec2 *pVdq_lp_V)
 
void EST_getVdq_V (EST_Handle handle, MATH_vec2 *pVdq_V)
 Gets the Vdq voltage vector in Volts (V) More...
 
void cla_EST_getVdq_V (EST_Handle handle, MATH_vec2 *pVdq_V)
 
void EST_incrCounter_isr (EST_Handle handle)
 Increments the ISR counter in the estimator. More...
 
void cla_EST_incrCounter_isr (EST_Handle handle)
 
void EST_incrTrajCounter_isr (EST_Handle handle)
 Increments the ISR counter in the trajectory generator. More...
 
void cla_EST_incrTrajCounter_isr (EST_Handle handle)
 
EST_Handle EST_initEst (const uint_least8_t estNumber)
 Initializes the estimator. More...
 
EST_Handle cla_EST_initEst (const uint_least8_t estNumber)
 
bool EST_isEnabled (EST_Handle handle)
 Determines if the estimator (EST) is enabled. More...
 
bool cla_EST_isEnabled (EST_Handle handle)
 
bool cla_EST_isError (EST_Handle handle)
 
bool cla_EST_isIdle (EST_Handle handle)
 
bool cla_EST_isLockRotor (EST_Handle handle)
 
bool cla_EST_isMotorIdentified (EST_Handle handle)
 
bool EST_isNotOnLine (EST_Handle handle)
 Determines if the estimator is not ready for online control. More...
 
bool cla_EST_isNotOnLine (EST_Handle handle)
 
bool cla_EST_isOnLine (EST_Handle handle)
 
bool EST_isTrajEnabled (EST_Handle handle)
 Determines if the trajectory generator is enabled. More...
 
bool cla_EST_isTrajEnabled (EST_Handle handle)
 
bool EST_isTrajError (EST_Handle handle)
 Determines if there is an error in the trajectory generator. More...
 
bool cla_EST_isTrajError (EST_Handle handle)
 
void EST_resetCounter_isr (EST_Handle handle)
 Resets the isr counter. More...
 
void cla_EST_resetCounter_isr (EST_Handle handle)
 
void cla_EST_resetCounter_state (EST_Handle handle)
 
void EST_resetTrajCounter_isr (EST_Handle handle)
 Resets the trajectory ISR counter. More...
 
void cla_EST_resetTrajCounter_isr (EST_Handle handle)
 
void EST_run (EST_Handle handle, const EST_InputData_t *pInputData, EST_OutputData_t *pOutputData)
 Runs the estimator. More...
 
void cla_EST_run (EST_Handle handle, const EST_InputData_t *pInputData, EST_OutputData_t *pOutputData)
 
float_t EST_runPowerWarp (EST_Handle handle, const float_t Id_int_A, const float_t Iq_A)
 Runs PowerWarp. More...
 
float_t cla_EST_runPowerWarp (EST_Handle handle, const float_t Id_int_A, const float_t Iq_A)
 
void EST_runTraj (EST_Handle handle)
 Runs the trajectory generator. More...
 
void cla_EST_runTraj (EST_Handle handle)
 
void EST_setAccel_rps2 (EST_Handle handle, const float_t accel_rps2)
 Sets the mechanical acceleration in the estimator. More...
 
void cla_EST_setAccel_rps2 (EST_Handle handle, const float_t accel_rps2)
 
void EST_setAngle_rad (EST_Handle handle, const float_t angle_rad)
 Sets the angle value at t = n in both the estimator and trajectory in radians (rad). More...
 
void cla_EST_setAngle_rad (EST_Handle handle, const float_t angle_rad)
 
void EST_setAngle_est_rad (EST_Handle handle, const float_t angle_rad)
 Sets the angle value at t = n in the estimator in radians (rad). More...
 
void cla_EST_setAngle_est_rad (EST_Handle handle, const float_t angle_rad)
 
void EST_setAngle_np1_rad (EST_Handle handle, const float_t angle_np1_rad)
 Sets the angle value at t = n+1 in the estimator in radians (rad). More...
 
void cla_EST_setAngle_np1_rad (EST_Handle handle, const float_t angle_np1_rad)
 
void EST_setAngle_traj_rad (EST_Handle handle, const float_t angle_rad)
 Sets the angle value at t = n in the trajectory in radians (rad). More...
 
void cla_EST_setAngle_traj_rad (EST_Handle handle, const float_t angle_rad)
 
void EST_setAngleDelta_est_rad (EST_Handle handle, const float_t delta_rad)
 Sets the estimated angle delta value. More...
 
void cla_EST_setAngleDelta_est_rad (EST_Handle handle, const float_t delta_rad)
 
void EST_setAngleDelta_traj_rad (EST_Handle handle, const float_t delta_rad)
 Sets the trajectory angle delta value. More...
 
void cla_EST_setAngleDelta_traj_rad (EST_Handle handle, const float_t delta_rad)
 
void EST_setCount_isr (EST_Handle handle, const int_least16_t value)
 Sets the ISR count in the estimator. More...
 
void cla_EST_setCount_isr (EST_Handle handle, const int_least16_t value)
 
void EST_setCount_state (EST_Handle handle, const int_least32_t value)
 Sets the state count in the estimator. More...
 
void cla_EST_setCount_state (EST_Handle handle, const int_least32_t value)
 
void EST_setCount_traj (EST_Handle handle, const int_least16_t value)
 Sets the ISR count value in the estimator trajectory. More...
 
void cla_EST_setCount_traj (EST_Handle handle, const int_least16_t value)
 
void EST_setDcBus_V (EST_Handle handle, const float_t dcBus_V)
 Sets the DC bus voltage in the estimator in Volt (V). More...
 
void cla_EST_setDcBus_V (EST_Handle handle, const float_t dcBus_V)
 
void EST_setFe_Hz (EST_Handle handle, const float_t fe_Hz)
 Sets the electrical frequency in the estimator. More...
 
void cla_EST_setFe_Hz (EST_Handle handle, const float_t fe_Hz)
 
void EST_setFe_abs_max_rps (EST_Handle handle, const float_t fe_abs_max_rps)
 Sets the absolute maximum electrical frequency in the estimator. More...
 
void cla_EST_setFe_abs_max_rps (EST_Handle handle, const float_t fe_abs_max_rps)
 
void EST_setFe_rps (EST_Handle handle, const float_t fe_rps)
 Sets the electrical frequency in the estimator. More...
 
void cla_EST_setFe_rps (EST_Handle handle, const float_t fe_rps)
 
void EST_setFlag_bypassLockRotor (EST_Handle handle, const bool state)
 Sets the bypass lock rotor flag value in the estimator. More...
 
void cla_EST_setFlag_bypassLockRotor (EST_Handle handle, const bool state)
 
void EST_setFlag_enable (EST_Handle handle, const bool state)
 Sets the enable estimator flag value in the estimator. More...
 
void cla_EST_setFlag_enable (EST_Handle handle, const bool state)
 
void cla_EST_setFlag_enableForceAngle (EST_Handle handle, const bool state)
 
void EST_setFlag_enablePowerWarp (EST_Handle handle, const bool state)
 Sets the enable PowerWarp flag in the estimator. More...
 
void cla_EST_setFlag_enablePowerWarp (EST_Handle handle, const bool state)
 
void cla_EST_setFlag_enableRsOnLine (EST_Handle handle, const bool state)
 
void cla_EST_setFlag_enableRsRecalc (EST_Handle handle, const bool state)
 
void cla_EST_setFlag_estComplete (EST_Handle handle, const bool state)
 
void EST_setFlag_motorIdentified (EST_Handle handle, const bool state)
 Sets the motor identified flag state in the estimator. More...
 
void cla_EST_setFlag_motorIdentified (EST_Handle handle, const bool state)
 
void cla_EST_setFlag_updateRs (EST_Handle handle, const bool state)
 
void EST_setFm_Hz (EST_Handle handle, const float_t fm_Hz)
 Sets the asynchronous/mechanical frequency in the estimator. More...
 
void cla_EST_setFm_Hz (EST_Handle handle, const float_t fm_Hz)
 
void EST_setFm_lp_Hz (EST_Handle handle, const float_t fm_lp_Hz)
 Sets the low pass filtered asynchronous/mechanical frequency in the estimator. More...
 
void cla_EST_setFm_lp_Hz (EST_Handle handle, const float_t fm_lp_Hz)
 
void EST_setFm_lp_rps (EST_Handle handle, const float_t fm_lp_rps)
 Sets the low pass filtered asynchronous/mechanical frequency in the estimator. More...
 
void cla_EST_setFm_lp_rps (EST_Handle handle, const float_t fm_lp_rps)
 
void EST_setFm_rps (EST_Handle handle, const float_t fm_rps)
 Sets the asynchronous/mechanical frequency in the estimator. More...
 
void cla_EST_setFm_rps (EST_Handle handle, const float_t fm_rps)
 
void EST_setFslip_Hz (EST_Handle handle, const float_t fslip_Hz)
 Sets the slip frequency in the estimator. More...
 
void cla_EST_setFslip_Hz (EST_Handle handle, const float_t fslip_Hz)
 
void EST_setFslip_rps (EST_Handle handle, const float_t fslip_rps)
 Sets the slip frequency in the estimator. More...
 
void cla_EST_setFslip_rps (EST_Handle handle, const float_t fslip_rps)
 
void EST_setForceAngleDelta_rad (EST_Handle handle, const float_t angleDelta_rad)
 Sets the force angle delta value in the estimator in radians (rad). More...
 
void cla_EST_setForceAngleDelta_rad (EST_Handle handle, const float_t angleDelta_rad)
 
void EST_setFreqBeta_lp (EST_Handle handle, const float_t beta_rad)
 Sets the value used to set the low pass filter pole location in the frequency estimator in radians (rad). More...
 
void cla_EST_setFreqBeta_lp (EST_Handle handle, const float_t beta_rad)
 
void EST_setId_ref_A (EST_Handle handle, const float_t Id_ref_A)
 Sets the direct current (Id) reference value in the estimator in Ampere (A). More...
 
void cla_EST_setId_ref_A (EST_Handle handle, const float_t Id_ref_A)
 
void cla_EST_setIdle (EST_Handle handle)
 
void EST_setIdq_ref_A (EST_Handle handle, const MATH_vec2 *pIdq_ref_A)
 Sets the direct/quadrature current (Idq) reference value in the estimator in Ampere (A). More...
 
void cla_EST_setIdq_ref_A (EST_Handle handle, const MATH_vec2 *pIdq_ref_A)
 
void EST_setIdRated_A (EST_Handle handle, const float_t IdRated_A)
 Sets the Id rated current value in the estimator in Ampere (A). More...
 
void cla_EST_setIdRated_A (EST_Handle handle, const float_t IdRated_A)
 
void EST_setIdRated_delta_A (EST_Handle handle, const float_t IdRated_delta_A)
 Sets the Id rated delta current value in the estimator in Ampere (A) More...
 
void cla_EST_setIdRated_delta_A (EST_Handle handle, const float_t IdRated_delta_A)
 
void EST_setIntValue_Id_A (EST_Handle handle, const float_t intValue_A)
 Sets the intermediate value in the Id trajectory generator. More...
 
void cla_EST_setIntValue_Id_A (EST_Handle handle, const float_t intValue_A)
 
void EST_setIntValue_Iq_A (EST_Handle handle, const float_t intValue_A)
 Sets the intermediate value in the Iq trajectory generator. More...
 
void cla_EST_setIntValue_Iq_A (EST_Handle handle, const float_t intValue_A)
 
void EST_setIntValue_spd_Hz (EST_Handle handle, const float_t intValue_Hz)
 Sets the intermediate value in the speed trajectory generator. More...
 
void cla_EST_setIntValue_spd_Hz (EST_Handle handle, const float_t intValue_Hz)
 
void EST_setIq_ref_A (EST_Handle handle, const float_t Iq_ref_A)
 Sets the quadrature current (Iq) reference value in the estimator in Ampere (A). More...
 
void cla_EST_setIq_ref_A (EST_Handle handle, const float_t Iq_ref_A)
 
void EST_setLhf_H (EST_Handle handle, const float_t Lhf_H)
 Sets the Lhf value in the estimator. More...
 
void cla_EST_setLhf_H (EST_Handle handle, const float_t Lhf_H)
 
void EST_setLs_coarseDelta_H (EST_Handle handle, const float_t Ls_delta_H)
 Sets the delta stator inductance value during coarse estimation. More...
 
void cla_EST_setLs_coarseDelta_H (EST_Handle handle, const float_t Ls_delta_H)
 
void EST_setLs_d_H (EST_Handle handle, const float_t Ls_d_H)
 Sets the direct stator inductance value in the estimator in Henry (H). More...
 
void cla_EST_setLs_d_H (EST_Handle handle, const float_t Ls_d_H)
 
void EST_setLs_dq_H (EST_Handle handle, const MATH_vec2 *pLs_dq_H)
 Sets the direct/quadrature stator inductance vector values in the estimator in Henry (H). More...
 
void cla_EST_setLs_dq_H (EST_Handle handle, const MATH_vec2 *pLs_dq_H)
 
void EST_setLs_fineDelta_H (EST_Handle handle, const float_t Ls_delta_H)
 Sets the delta stator inductance value during fine estimation. More...
 
void cla_EST_setLs_fineDelta_H (EST_Handle handle, const float_t Ls_delta_H)
 
void EST_setLs_H (EST_Handle handle, const float_t Ls_H)
 Sets the stator inductance value in the estimator in Henry (H). More...
 
void cla_EST_setLs_H (EST_Handle handle, const float_t Ls_H)
 
void EST_setLs_q_H (EST_Handle handle, const float_t Ls_q_H)
 Sets the quadrature stator inductance value in the estimator in Henry (H). More...
 
void cla_EST_setLs_q_H (EST_Handle handle, const float_t Ls_q_H)
 
void EST_setNumIsrTicksPerEstTick (EST_Handle handle, const int_least16_t numIsrTicksPerEstTick)
 Sets the number of Interrupt Service Routine (ISR) clock ticks per estimator clock tick. More...
 
void cla_EST_setNumIsrTicksPerEstTick (EST_Handle handle, const int_least16_t numIsrTicksPerEstTick)
 
void EST_setNumIsrTicksPerTrajTick (EST_Handle handle, const int_least16_t numIsrTicksPerTrajTick)
 Sets the number of Interrupt Service Routine (ISR) clock ticks per estimator trajectory clock tick. More...
 
void cla_EST_setNumIsrTicksPerTrajTick (EST_Handle handle, const int_least16_t numIsrTicksPerTrajTick)
 
void EST_setMaxCurrentDelta_A (EST_Handle handle, const float_t maxCurrentDelta_A)
 Sets the maximum current delta value in the estimator in Ampere (A). More...
 
void cla_EST_setMaxCurrentDelta_A (EST_Handle handle, const float_t maxCurrentDelta_A)
 
void EST_setMaxCurrentDelta_pw_A (EST_Handle handle, const float_t maxCurrentDelta_A)
 Sets the maximum power warp current delta value used in the estimator in Ampere (A). More...
 
void cla_EST_setMaxCurrentDelta_pw_A (EST_Handle handle, const float_t maxCurrentDelta_A)
 
void EST_setMaxDelta_Id_A (EST_Handle handle, const float_t maxDelta_A)
 Sets the maximum delta value in the Id trajectory generator. More...
 
void cla_EST_setMaxDelta_Id_A (EST_Handle handle, const float_t maxDelta_A)
 
void EST_setMaxDelta_Iq_A (EST_Handle handle, const float_t maxDelta_A)
 Sets the maximum delta value in the Iq trajectory generator. More...
 
void cla_EST_setMaxDelta_Iq_A (EST_Handle handle, const float_t maxDelta_A)
 
void EST_setMaxDelta_spd_Hz (EST_Handle handle, const float_t maxDelta_Hz)
 Sets the maximum delta value in the speed trajectory generator. More...
 
void cla_EST_setMaxDelta_spd_Hz (EST_Handle handle, const float_t maxDelta_Hz)
 
void EST_setMaxSpeedDelta_Hz (EST_Handle handle, const float_t maxSpeedDelta_Hz)
 Sets the maximum speed delta value during estimation. More...
 
void cla_EST_setMaxSpeedDelta_Hz (EST_Handle handle, const float_t maxSpeedDelta_Hz)
 
void EST_setMaxValue_Id_A (EST_Handle handle, const float_t maxValue_A)
 Sets the maximum value in the Id trajectory generator. More...
 
void cla_EST_setMaxValue_Id_A (EST_Handle handle, const float_t maxValue_A)
 
void EST_setMaxValue_Iq_A (EST_Handle handle, const float_t maxValue_A)
 Sets the maximum value in the Iq trajectory generator. More...
 
void cla_EST_setMaxValue_Iq_A (EST_Handle handle, const float_t maxValue_A)
 
void EST_setMaxValue_spd_Hz (EST_Handle handle, const float_t maxValue_Hz)
 Sets the maximum value in the speed trajectory generator. More...
 
void cla_EST_setMaxValue_spd_Hz (EST_Handle handle, const float_t maxValue_Hz)
 
void EST_setMinValue_Id_A (EST_Handle handle, const float_t minValue_A)
 Sets the minimum value in the Id trajectory generator. More...
 
void cla_EST_setMinValue_Id_A (EST_Handle handle, const float_t minValue_A)
 
void EST_setMinValue_Iq_A (EST_Handle handle, const float_t minValue_A)
 Sets the minimum value in the Iq trajectory generator. More...
 
void cla_EST_setMinValue_Iq_A (EST_Handle handle, const float_t minValue_A)
 
void EST_setMinValue_spd_Hz (EST_Handle handle, const float_t minValue_Hz)
 Sets the minimum value in the speed trajectory generator. More...
 
void cla_EST_setMinValue_spd_Hz (EST_Handle handle, const float_t minValue_Hz)
 
void EST_setParams (EST_Handle handle, USER_Params *pUserParams)
 Sets the estimator parameters using the user parameters structreu. More...
 
void cla_EST_setParams (EST_Handle handle, USER_Params *pUserParams)
 
void EST_setPwGain (EST_Handle handle, const float_t pwGain)
 Sets the power warp gain in the trajectory generator. More...
 
void cla_EST_setPwGain (EST_Handle handle, const float_t pwGain)
 
void EST_setRhf_Ohm (EST_Handle handle, const float_t Rhf_Ohm)
 Sets the Rhf value in the estimator. More...
 
void cla_EST_setRhf_Ohm (EST_Handle handle, const float_t Rhf_Ohm)
 
void EST_setRoverL_rps (EST_Handle handle, const float_t RoverL_rps)
 Sets the R/L value in the estimator. More...
 
void cla_EST_setRoverL_rps (EST_Handle handle, const float_t RoverL_rps)
 
void EST_setRr_coarseDelta_Ohm (EST_Handle handle, const float_t Rr_coarseDelta_Ohm)
 Sets the coarse delta rotor resistance value in the estimator. More...
 
void cla_EST_setRr_coarseDelta_Ohm (EST_Handle handle, const float_t Rr_coarseDelta_Ohm)
 
void EST_setRr_d_Ohm (EST_Handle handle, const float_t Rr_d_Ohm)
 Sets the direct rotor resistance value used in the estimator in Ohm ( $\Omega$). More...
 
void cla_EST_setRr_d_Ohm (EST_Handle handle, const float_t Rr_d_Ohm)
 
void EST_setRr_dq_Ohm (EST_Handle handle, const MATH_vec2 *pRr_dq_Ohm)
 Sets the direct/quadrature rotor resistance values used in the estimator in Ohm ( $\Omega$). More...
 
void cla_EST_setRr_dq_Ohm (EST_Handle handle, const MATH_vec2 *pRr_dq_Ohm)
 
void EST_setRr_fineDelta_Ohm (EST_Handle handle, const float_t Rr_fineDelta_Ohm)
 Sets the fine delta rotor resistance value in the estimator. More...
 
void cla_EST_setRr_fineDelta_Ohm (EST_Handle handle, const float_t Rr_fineDelta_Ohm)
 
void EST_setRr_max_Ohm (EST_Handle handle, const float_t Rr_max_Ohm)
 Sets the maximum rotor resistance maximum value for saturation. More...
 
void cla_EST_setRr_max_Ohm (EST_Handle handle, const float_t Rr_max_Ohm)
 
void EST_setRr_min_Ohm (EST_Handle handle, const float_t Rr_min_Ohm)
 Sets the minimum rotor resistance value for saturation. More...
 
void cla_EST_setRr_min_Ohm (EST_Handle handle, const float_t Rr_min_Ohm)
 
void EST_setRr_Ohm (EST_Handle handle, const float_t Rr_Ohm)
 Sets the rotor resistance value used in the estimator in Ohm ( $\Omega$). More...
 
void cla_EST_setRr_Ohm (EST_Handle handle, const float_t Rr_Ohm)
 
void EST_setRr_q_Ohm (EST_Handle handle, const float_t Rr_q_Ohm)
 Sets the quadrature rotor resistance value used in the estimator in Ohm ( $\Omega$). More...
 
void cla_EST_setRr_q_Ohm (EST_Handle handle, const float_t Rr_q_Ohm)
 
void EST_setRs_a_Ohm (EST_Handle handle, const float_t Rs_a_Ohm)
 Sets the alpha stator resistance value used in the estimator in Ohm ( $\Omega$). More...
 
void cla_EST_setRs_a_Ohm (EST_Handle handle, const float_t Rs_a_Ohm)
 
void EST_setRs_ab_Ohm (EST_Handle handle, const MATH_vec2 *pRs_ab_Ohm)
 Sets the alpha/beta stator resistance values used in the estimator in Ohm ( $\Omega$). More...
 
void cla_EST_setRs_ab_Ohm (EST_Handle handle, const MATH_vec2 *pRs_ab_Ohm)
 
void EST_setRs_b_Ohm (EST_Handle handle, const float_t Rs_b_Ohm)
 Sets the beta stator resistance value used in the estimator in Ohm ( $\Omega$). More...
 
void cla_EST_setRs_b_Ohm (EST_Handle handle, const float_t Rs_b_Ohm)
 
void EST_setRs_coarseDelta_Ohm (EST_Handle handle, const float_t Rs_coarseDelta_Ohm)
 Sets the coarse delta stator resistance value. More...
 
void cla_EST_setRs_coarseDelta_Ohm (EST_Handle handle, const float_t Rs_coarseDelta_Ohm)
 
void EST_setRs_d_Ohm (EST_Handle handle, const float_t Rs_d_Ohm)
 Sets the direct stator resistance value used in the estimator in Ohm ( $\Omega$). More...
 
void cla_EST_setRs_d_Ohm (EST_Handle handle, const float_t Rs_d_Ohm)
 
void EST_setRs_dq_Ohm (EST_Handle handle, const MATH_vec2 *pRs_dq_Ohm)
 Sets the direct/quadrature stator resistance values used in the estimator in Ohm ( $\Omega$). More...
 
void cla_EST_setRs_dq_Ohm (EST_Handle handle, const MATH_vec2 *pRs_dq_Ohm)
 
void EST_setRs_fineDelta_Ohm (EST_Handle handle, const float_t Rs_fineDelta_Ohm)
 Sets the fine delta stator resistance value. More...
 
void cla_EST_setRs_fineDelta_Ohm (EST_Handle handle, const float_t Rs_fineDelta_Ohm)
 
void EST_setRs_Ohm (EST_Handle handle, const float_t Rs_Ohm)
 Sets the stator resistance value used in the estimator in Ohm ( $\Omega$). More...
 
void cla_EST_setRs_Ohm (EST_Handle handle, const float_t Rs_Ohm)
 
void EST_setRs_q_Ohm (EST_Handle handle, const float_t Rs_q_Ohm)
 Sets the quadrature stator resistance value used in the estimator in Ohm ( $\Omega$). More...
 
void cla_EST_setRs_q_Ohm (EST_Handle handle, const float_t Rs_q_Ohm)
 
void EST_setRsOnLine_beta_rad (EST_Handle handle, const float_t beta_rad)
 Sets the beta of the filters used for online stator resistance estimation in radians (rad). More...
 
void cla_EST_setRsOnLine_beta_rad (EST_Handle handle, const float_t beta_rad)
 
void EST_setRsOnLine_Ohm (EST_Handle handle, const float_t Rs_Ohm)
 Sets the stator resistance value in the online stator resistance estimator in Ohm ( $\Omega$). More...
 
void cla_EST_setRsOnLine_Ohm (EST_Handle handle, const float_t Rs_Ohm)
 
void EST_setRsOnLineAngle_rad (EST_Handle handle, const float_t angle_rad)
 Sets the angle value in the estimator. More...
 
void cla_EST_setRsOnLineAngle_rad (EST_Handle handle, const float_t angle_rad)
 
void EST_setRsOnLineAngleDelta_rad (EST_Handle handle, const float_t angleDelta_rad)
 Sets the rotating angle delta in the online stator resistance estimator in radians. More...
 
void cla_EST_setRsOnLineAngleDelta_rad (EST_Handle handle, const float_t angleDelta_rad)
 
void EST_setRsOnLineId_A (EST_Handle handle, const float_t Id_A)
 Sets the Id value in the online stator resistance estimator in Ampere (A). More...
 
void cla_EST_setRsOnLineId_A (EST_Handle handle, const float_t Id_A)
 
void EST_setRsOnLineId_mag_A (EST_Handle handle, const float_t Id_mag_A)
 Sets the Id magnitude value used for online stator resistance estimation in Ampere (A). More...
 
void cla_EST_setRsOnLineId_mag_A (EST_Handle handle, const float_t Id_mag_A)
 
void EST_setRsOnLineLpFilterParams (EST_Handle handle, const EST_RsOnLineFilterType_e filterType, const uint_least8_t filterNumber, const float_t b0, const float_t b1, const float_t a1, const float_t x1, const float_t y1)
 Sets the online stator resistance filter parameters. More...
 
void cla_EST_setRsOnLineLpFilterParams (EST_Handle handle, const EST_RsOnLineFilterType_e filterType, const uint_least8_t filterNumber, const float_t b0, const float_t b1, const float_t a1, const float_t x1, const float_t y1)
 
void EST_setSpeed_ref_Hz (EST_Handle handle, const float_t speed_ref_Hz)
 Sets the reference speed in the estimator. More...
 
void cla_EST_setSpeed_ref_Hz (EST_Handle handle, const float_t speed_ref_Hz)
 
void EST_setTargetValue_Id_A (EST_Handle handle, const float_t targetValue_A)
 Sets the target value in the Id trajectory generator. More...
 
void cla_EST_setTargetValue_Id_A (EST_Handle handle, const float_t targetValue_A)
 
void EST_setTargetValue_Iq_A (EST_Handle handle, const float_t targetValue_A)
 Sets the target value in the Iq trajectory generator. More...
 
void cla_EST_setTargetValue_Iq_A (EST_Handle handle, const float_t targetValue_A)
 
void EST_setTargetValue_spd_Hz (EST_Handle handle, const float_t targetValue_Hz)
 Sets the target value in the speed trajectory generator. More...
 
void cla_EST_setTargetValue_spd_Hz (EST_Handle handle, const float_t targetValue_Hz)
 
void EST_setupTraj (EST_Handle handle, CTRL_Handle ctrlHandle, const float_t targetValue_spd_Hz, const float_t targetValue_Id_A)
 Sets up the trajectory generator. More...
 
void cla_EST_setupTraj (EST_Handle handle, CTRL_Handle ctrlHandle, const float_t targetValue_spd_Hz, const float_t targetValue_Id_A)
 
void EST_updateId_ref_A (EST_Handle handle, float_t *pId_ref_A)
 Updates the Id reference value used for online stator resistance estimation in Ampere (A). More...
 
void cla_EST_updateId_ref_A (EST_Handle handle, float_t *pId_ref_A)
 
bool EST_updateState (EST_Handle handle, const float_t Id_target_A)
 Updates the estimator state. More...
 
bool cla_EST_updateState (EST_Handle handle, const float_t Id_target_A)
 
bool EST_updateTrajState (EST_Handle handle)
 Updates the trajectory generator state. More...
 
bool cla_EST_updateTrajState (EST_Handle handle)
 
bool cla_EST_useZeroIq_ref (EST_Handle handle)
 

Detailed Description


Data Structure Documentation

struct _EST_InputData_

Defines the estimator (EST) input data.

Definition at line 53 of file float/est.h.

Data Fields
float_t dcBus_V the DC bus voltage value, V
MATH_vec2 Iab_A the alpha/beta current values, A
float_t speed_ref_Hz the speed reference value, Hz
int_least32_t timeStamp a time stamp for the input data buffer
MATH_vec2 Vab_V the alpha/beta current values, V
struct _EST_OutputData_

Defines the estimator (EST) output data.

Definition at line 66 of file float/est.h.

Data Fields
float_t angle_rad the estimated angle value at t = m+1, rad
int_least8_t direction the rotational direction estimate, unitless
MATH_vec2 Eab_V the alpha/beta back-EMF estimates, V
MATH_vec2 Edq_V the direction/quadrature back-EMF estimates, V
float_t fe_rps the electrical frequency estimate, rad/sec
float_t fm_lp_rps the low pass filtered mechanical frequency estimate, rad/sec
float_t fm_rps the mechanical frequency estimate, rad/sec
float_t fmDot_rps2 the mechanical acceleration estimate, rad/sec^2
float_t fslip_rps the slip frequency estimate, rad/sec
float_t oneOverDcBus_invV the DC Bus inverse, 1/V
int_least32_t timeStamp a time stamp for the output data buffer

Typedef Documentation

typedef struct _EST_Obj_* EST_Handle

Defines the estimator (EST) handle.

Definition at line 52 of file 32b/est.h.

typedef struct _EST_Obj_* EST_Handle

Defines the estimator (EST) handle.

Definition at line 89 of file float/est.h.

Defines the estimator (EST) input data.

Defines the estimator (EST) output data.

Enumeration Type Documentation

Enumeration for the Rs online filter types.

Enumerator
EST_RsOnLineFilterType_Current 

Current Filter.

EST_RsOnLineFilterType_Voltage 

Voltage Filter.

EST_RsOnLineFilterType_Current 

Current Filter.

EST_RsOnLineFilterType_Voltage 

Voltage Filter.

Definition at line 43 of file 32b/est.h.

Enumeration for the Rs online filter types.

Enumerator
EST_RsOnLineFilterType_Current 

Current Filter.

EST_RsOnLineFilterType_Voltage 

Voltage Filter.

EST_RsOnLineFilterType_Current 

Current Filter.

EST_RsOnLineFilterType_Voltage 

Voltage Filter.

Definition at line 44 of file float/est.h.

Function Documentation

float_t cla_EST_computeLmag_H ( EST_Handle  handle,
const float_t  current_A 
)
float_t cla_EST_computePower_W ( EST_Handle  handle)
float_t cla_EST_computeTorque_Nm ( EST_Handle  handle)
void cla_EST_configureCtrl ( EST_Handle  handle,
CTRL_Handle  ctrlHandle 
)
void cla_EST_configureTraj ( EST_Handle  handle)
void cla_EST_disable ( EST_Handle  handle)
void cla_EST_disableTraj ( EST_Handle  handle)
bool cla_EST_doCurrentCtrl ( EST_Handle  handle)
bool cla_EST_doSpeedCtrl ( EST_Handle  handle)
void cla_EST_enable ( EST_Handle  handle)
void cla_EST_enableTraj ( EST_Handle  handle)
float_t cla_EST_get_rpm_to_rps_sf ( EST_Handle  handle)
float_t cla_EST_get_rps_to_rpm_sf ( EST_Handle  handle)
float_t cla_EST_getAccel_rps2 ( EST_Handle  handle)
float_t cla_EST_getAngle_est_rad ( EST_Handle  handle)
float_t cla_EST_getAngle_rad ( EST_Handle  handle)
float_t cla_EST_getAngle_traj_rad ( EST_Handle  handle)
float_t cla_EST_getAngleDelta_est_rad ( EST_Handle  handle)
float_t cla_EST_getAngleDelta_rad ( EST_Handle  handle)
float_t cla_EST_getAngleDelta_traj_rad ( EST_Handle  handle)
int_least16_t cla_EST_getCount_isr ( EST_Handle  handle)
float_t cla_EST_getDcBus_V ( EST_Handle  handle)
void cla_EST_getEab_V ( EST_Handle  handle,
MATH_vec2 pEab_V 
)
void cla_EST_getEdq_V ( EST_Handle  handle,
MATH_vec2 pEdq_V 
)
EST_ErrorCode_e cla_EST_getErrorCode ( EST_Handle  handle)
float_t cla_EST_getFe_abs_max_rps ( EST_Handle  handle)
float_t cla_EST_getFe_Hz ( EST_Handle  handle)
float_t cla_EST_getFe_rps ( EST_Handle  handle)
bool cla_EST_getFlag_bypassLockRotor ( EST_Handle  handle)
bool cla_EST_getFlag_enable ( EST_Handle  handle)
bool cla_EST_getFlag_enableForceAngle ( EST_Handle  handle)
bool cla_EST_getFlag_enablePowerWarp ( EST_Handle  handle)
bool cla_EST_getFlag_enableRsOnLine ( EST_Handle  handle)
bool cla_EST_getFlag_enableRsRecalc ( EST_Handle  handle)
bool cla_EST_getFlag_enableTraj ( EST_Handle  handle)
bool cla_EST_getFlag_estComplete ( EST_Handle  handle)
bool cla_EST_getFlag_motorIdentified ( EST_Handle  handle)
bool cla_EST_getFlag_nearZeroSpeed ( EST_Handle  handle)
bool cla_EST_getFlag_updateRs ( EST_Handle  handle)
float_t cla_EST_getFlux_Wb ( EST_Handle  handle)
EST_Flux_State_e cla_EST_getFluxState ( EST_Handle  handle)
float_t cla_EST_getFm_Hz ( EST_Handle  handle)
float_t cla_EST_getFm_lp_Hz ( EST_Handle  handle)
float_t cla_EST_getFm_lp_rps ( EST_Handle  handle)
float_t cla_EST_getFm_rps ( EST_Handle  handle)
float_t cla_EST_getForceAngleDelta_rad ( EST_Handle  handle)
bool cla_EST_getForceAngleStatus ( EST_Handle  handle)
float_t cla_EST_getFreqBeta_lp ( EST_Handle  handle)
float_t cla_EST_getFslip_Hz ( EST_Handle  handle)
float_t cla_EST_getFslip_rps ( EST_Handle  handle)
void cla_EST_getIab_A ( EST_Handle  handle,
MATH_vec2 pIab_A 
)
float_t cla_EST_getIab_beta_lp ( EST_Handle  handle)
void cla_EST_getIab_lp_A ( EST_Handle  handle,
MATH_vec2 pIab_lp_A 
)
void cla_EST_getIdq_A ( EST_Handle  handle,
MATH_vec2 pIdq_A 
)
void cla_EST_getIdq_lp_A ( EST_Handle  handle,
MATH_vec2 pIdq_lp_A 
)
void cla_EST_getIdq_ref_A ( EST_Handle  handle,
MATH_vec2 pIdq_ref_A 
)
float_t cla_EST_getIdRated_A ( EST_Handle  handle)
float_t cla_EST_getIdRated_delta_A ( EST_Handle  handle)
float_t cla_EST_getIdRated_indEst_A ( EST_Handle  handle)
float_t cla_EST_getIntValue_Id_A ( EST_Handle  handle)
float_t cla_EST_getIntValue_Iq_A ( EST_Handle  handle)
float_t cla_EST_getIntValue_spd_Hz ( EST_Handle  handle)
float_t cla_EST_getLhf_H ( EST_Handle  handle)
float_t cla_EST_getLmag_H ( EST_Handle  handle)
float_t cla_EST_getLs_coarseDelta_H ( EST_Handle  handle)
float_t cla_EST_getLs_d_H ( EST_Handle  handle)
void cla_EST_getLs_dq_H ( EST_Handle  handle,
MATH_vec2 pLs_dq_H 
)
float_t cla_EST_getLs_fineDelta_H ( EST_Handle  handle)
float_t cla_EST_getLs_H ( EST_Handle  handle)
float_t cla_EST_getLs_q_H ( EST_Handle  handle)
float_t cla_EST_getMaxCurrentDelta_A ( EST_Handle  handle)
float_t cla_EST_getMaxCurrentDelta_pw_A ( EST_Handle  handle)
float_t cla_EST_getMaxDelta_Id_A ( EST_Handle  handle)
float_t cla_EST_getMaxDelta_Iq_A ( EST_Handle  handle)
float_t cla_EST_getMaxDelta_spd_Hz ( EST_Handle  handle)
float_t cla_EST_getMaxSpeedDelta_Hz ( EST_Handle  handle)
float_t cla_EST_getMaxValue_Id_A ( EST_Handle  handle)
float_t cla_EST_getMaxValue_Iq_A ( EST_Handle  handle)
float_t cla_EST_getMaxValue_spd_Hz ( EST_Handle  handle)
float_t cla_EST_getMinValue_Id_A ( EST_Handle  handle)
float_t cla_EST_getMinValue_Iq_A ( EST_Handle  handle)
float_t cla_EST_getMinValue_spd_Hz ( EST_Handle  handle)
int_least16_t cla_EST_getNumIsrTicksPerEstTick ( EST_Handle  handle)
int_least16_t cla_EST_getNumIsrTicksPerTrajTick ( EST_Handle  handle)
float_t cla_EST_getOneOverDcBus_invV ( EST_Handle  handle)
float_t cla_EST_getPwGain ( EST_Handle  handle)
float_t cla_EST_getRhf_Ohm ( EST_Handle  handle)
float_t cla_EST_getRoverL_rps ( EST_Handle  handle)
float_t cla_EST_getRr_coarseDelta_Ohm ( EST_Handle  handle)
float_t cla_EST_getRr_d_Ohm ( EST_Handle  handle)
void cla_EST_getRr_dq_Ohm ( EST_Handle  handle,
MATH_vec2 pRr_dq_Ohm 
)
float_t cla_EST_getRr_fineDelta_Ohm ( EST_Handle  handle)
float_t cla_EST_getRr_Ohm ( EST_Handle  handle)
float_t cla_EST_getRr_q_Ohm ( EST_Handle  handle)
float_t cla_EST_getRs_a_Ohm ( EST_Handle  handle)
void cla_EST_getRs_ab_Ohm ( EST_Handle  handle,
MATH_vec2 pRs_ab_Ohm 
)
float_t cla_EST_getRs_b_Ohm ( EST_Handle  handle)
float_t cla_EST_getRs_coarseDelta_Ohm ( EST_Handle  handle)
float_t cla_EST_getRs_d_Ohm ( EST_Handle  handle)
void cla_EST_getRs_dq_Ohm ( EST_Handle  handle,
MATH_vec2 pRs_dq_Ohm 
)
float_t cla_EST_getRs_fineDelta_Ohm ( EST_Handle  handle)
float_t cla_EST_getRs_Ohm ( EST_Handle  handle)
float_t cla_EST_getRs_q_Ohm ( EST_Handle  handle)
float_t cla_EST_getRsOnLine_Ohm ( EST_Handle  handle)
float_t cla_EST_getRsOnLineAngle_rad ( EST_Handle  handle)
float_t cla_EST_getRsOnLineAngleDelta_rad ( EST_Handle  handle)
float_t cla_EST_getRsOnLineId_A ( EST_Handle  handle)
float_t cla_EST_getRsOnLineId_mag_A ( EST_Handle  handle)
void cla_EST_getRsOnLineLpFilterParams ( EST_Handle  handle,
const EST_RsOnLineFilterType_e  filterType,
const uint_least8_t  filterNumber,
float_t b0,
float_t b1,
float_t a1,
float_t x1,
float_t y1 
)
int_least8_t cla_EST_getSignOfDirection ( EST_Handle  handle)
float_t cla_EST_getSpeed_ref_Hz ( EST_Handle  handle)
float_t cla_EST_getSpeed_rpm ( EST_Handle  handle)
EST_State_e cla_EST_getState ( EST_Handle  handle)
float_t cla_EST_getTargetValue_Id_A ( EST_Handle  handle)
float_t cla_EST_getTargetValue_Iq_A ( EST_Handle  handle)
float_t cla_EST_getTargetValue_spd_Hz ( EST_Handle  handle)
float_t cla_EST_getTorque_sf ( EST_Handle  handle)
int_least16_t cla_EST_getTrajCount_isr ( EST_Handle  handle)
EST_Traj_State_e cla_EST_getTrajState ( EST_Handle  handle)
void cla_EST_getVab_V ( EST_Handle  handle,
MATH_vec2 pVab_V 
)
void cla_EST_getVdq_lp_V ( EST_Handle  handle,
MATH_vec2 pVdq_lp_V 
)
void cla_EST_getVdq_V ( EST_Handle  handle,
MATH_vec2 pVdq_V 
)
void cla_EST_incrCounter_isr ( EST_Handle  handle)
void cla_EST_incrTrajCounter_isr ( EST_Handle  handle)
EST_Handle cla_EST_initEst ( const uint_least8_t  estNumber)
bool cla_EST_isEnabled ( EST_Handle  handle)
bool cla_EST_isError ( EST_Handle  handle)
bool cla_EST_isIdle ( EST_Handle  handle)
bool cla_EST_isLockRotor ( EST_Handle  handle)
bool cla_EST_isMotorIdentified ( EST_Handle  handle)
bool cla_EST_isNotOnLine ( EST_Handle  handle)
bool cla_EST_isOnLine ( EST_Handle  handle)
bool cla_EST_isTrajEnabled ( EST_Handle  handle)
bool cla_EST_isTrajError ( EST_Handle  handle)
void cla_EST_resetCounter_isr ( EST_Handle  handle)
void cla_EST_resetCounter_state ( EST_Handle  handle)
void cla_EST_resetTrajCounter_isr ( EST_Handle  handle)
void cla_EST_run ( EST_Handle  handle,
const EST_InputData_t pInputData,
EST_OutputData_t pOutputData 
)
float_t cla_EST_runPowerWarp ( EST_Handle  handle,
const float_t  Id_int_A,
const float_t  Iq_A 
)
void cla_EST_runTraj ( EST_Handle  handle)
void cla_EST_setAccel_rps2 ( EST_Handle  handle,
const float_t  accel_rps2 
)
void cla_EST_setAngle_est_rad ( EST_Handle  handle,
const float_t  angle_rad 
)
void cla_EST_setAngle_np1_rad ( EST_Handle  handle,
const float_t  angle_np1_rad 
)
void cla_EST_setAngle_rad ( EST_Handle  handle,
const float_t  angle_rad 
)
void cla_EST_setAngle_traj_rad ( EST_Handle  handle,
const float_t  angle_rad 
)
void cla_EST_setAngleDelta_est_rad ( EST_Handle  handle,
const float_t  delta_rad 
)
void cla_EST_setAngleDelta_traj_rad ( EST_Handle  handle,
const float_t  delta_rad 
)
void cla_EST_setCount_isr ( EST_Handle  handle,
const int_least16_t  value 
)
void cla_EST_setCount_state ( EST_Handle  handle,
const int_least32_t  value 
)
void cla_EST_setCount_traj ( EST_Handle  handle,
const int_least16_t  value 
)
void cla_EST_setDcBus_V ( EST_Handle  handle,
const float_t  dcBus_V 
)
void cla_EST_setFe_abs_max_rps ( EST_Handle  handle,
const float_t  fe_abs_max_rps 
)
void cla_EST_setFe_Hz ( EST_Handle  handle,
const float_t  fe_Hz 
)
void cla_EST_setFe_rps ( EST_Handle  handle,
const float_t  fe_rps 
)
void cla_EST_setFlag_bypassLockRotor ( EST_Handle  handle,
const bool  state 
)
void cla_EST_setFlag_enable ( EST_Handle  handle,
const bool  state 
)
void cla_EST_setFlag_enableForceAngle ( EST_Handle  handle,
const bool  state 
)
void cla_EST_setFlag_enablePowerWarp ( EST_Handle  handle,
const bool  state 
)
void cla_EST_setFlag_enableRsOnLine ( EST_Handle  handle,
const bool  state 
)
void cla_EST_setFlag_enableRsRecalc ( EST_Handle  handle,
const bool  state 
)
void cla_EST_setFlag_estComplete ( EST_Handle  handle,
const bool  state 
)
void cla_EST_setFlag_motorIdentified ( EST_Handle  handle,
const bool  state 
)
void cla_EST_setFlag_updateRs ( EST_Handle  handle,
const bool  state 
)
void cla_EST_setFm_Hz ( EST_Handle  handle,
const float_t  fm_Hz 
)
void cla_EST_setFm_lp_Hz ( EST_Handle  handle,
const float_t  fm_lp_Hz 
)
void cla_EST_setFm_lp_rps ( EST_Handle  handle,
const float_t  fm_lp_rps 
)
void cla_EST_setFm_rps ( EST_Handle  handle,
const float_t  fm_rps 
)
void cla_EST_setForceAngleDelta_rad ( EST_Handle  handle,
const float_t  angleDelta_rad 
)
void cla_EST_setFreqBeta_lp ( EST_Handle  handle,
const float_t  beta_rad 
)
void cla_EST_setFslip_Hz ( EST_Handle  handle,
const float_t  fslip_Hz 
)
void cla_EST_setFslip_rps ( EST_Handle  handle,
const float_t  fslip_rps 
)
void cla_EST_setId_ref_A ( EST_Handle  handle,
const float_t  Id_ref_A 
)
void cla_EST_setIdle ( EST_Handle  handle)
void cla_EST_setIdq_ref_A ( EST_Handle  handle,
const MATH_vec2 pIdq_ref_A 
)
void cla_EST_setIdRated_A ( EST_Handle  handle,
const float_t  IdRated_A 
)
void cla_EST_setIdRated_delta_A ( EST_Handle  handle,
const float_t  IdRated_delta_A 
)
void cla_EST_setIntValue_Id_A ( EST_Handle  handle,
const float_t  intValue_A 
)
void cla_EST_setIntValue_Iq_A ( EST_Handle  handle,
const float_t  intValue_A 
)
void cla_EST_setIntValue_spd_Hz ( EST_Handle  handle,
const float_t  intValue_Hz 
)
void cla_EST_setIq_ref_A ( EST_Handle  handle,
const float_t  Iq_ref_A 
)
void cla_EST_setLhf_H ( EST_Handle  handle,
const float_t  Lhf_H 
)
void cla_EST_setLs_coarseDelta_H ( EST_Handle  handle,
const float_t  Ls_delta_H 
)
void cla_EST_setLs_d_H ( EST_Handle  handle,
const float_t  Ls_d_H 
)
void cla_EST_setLs_dq_H ( EST_Handle  handle,
const MATH_vec2 pLs_dq_H 
)
void cla_EST_setLs_fineDelta_H ( EST_Handle  handle,
const float_t  Ls_delta_H 
)
void cla_EST_setLs_H ( EST_Handle  handle,
const float_t  Ls_H 
)
void cla_EST_setLs_q_H ( EST_Handle  handle,
const float_t  Ls_q_H 
)
void cla_EST_setMaxCurrentDelta_A ( EST_Handle  handle,
const float_t  maxCurrentDelta_A 
)
void cla_EST_setMaxCurrentDelta_pw_A ( EST_Handle  handle,
const float_t  maxCurrentDelta_A 
)
void cla_EST_setMaxDelta_Id_A ( EST_Handle  handle,
const float_t  maxDelta_A 
)
void cla_EST_setMaxDelta_Iq_A ( EST_Handle  handle,
const float_t  maxDelta_A 
)
void cla_EST_setMaxDelta_spd_Hz ( EST_Handle  handle,
const float_t  maxDelta_Hz 
)
void cla_EST_setMaxSpeedDelta_Hz ( EST_Handle  handle,
const float_t  maxSpeedDelta_Hz 
)
void cla_EST_setMaxValue_Id_A ( EST_Handle  handle,
const float_t  maxValue_A 
)
void cla_EST_setMaxValue_Iq_A ( EST_Handle  handle,
const float_t  maxValue_A 
)
void cla_EST_setMaxValue_spd_Hz ( EST_Handle  handle,
const float_t  maxValue_Hz 
)
void cla_EST_setMinValue_Id_A ( EST_Handle  handle,
const float_t  minValue_A 
)
void cla_EST_setMinValue_Iq_A ( EST_Handle  handle,
const float_t  minValue_A 
)
void cla_EST_setMinValue_spd_Hz ( EST_Handle  handle,
const float_t  minValue_Hz 
)
void cla_EST_setNumIsrTicksPerEstTick ( EST_Handle  handle,
const int_least16_t  numIsrTicksPerEstTick 
)
void cla_EST_setNumIsrTicksPerTrajTick ( EST_Handle  handle,
const int_least16_t  numIsrTicksPerTrajTick 
)
void cla_EST_setParams ( EST_Handle  handle,
USER_Params pUserParams 
)
void cla_EST_setPwGain ( EST_Handle  handle,
const float_t  pwGain 
)
void cla_EST_setRhf_Ohm ( EST_Handle  handle,
const float_t  Rhf_Ohm 
)
void cla_EST_setRoverL_rps ( EST_Handle  handle,
const float_t  RoverL_rps 
)
void cla_EST_setRr_coarseDelta_Ohm ( EST_Handle  handle,
const float_t  Rr_coarseDelta_Ohm 
)
void cla_EST_setRr_d_Ohm ( EST_Handle  handle,
const float_t  Rr_d_Ohm 
)
void cla_EST_setRr_dq_Ohm ( EST_Handle  handle,
const MATH_vec2 pRr_dq_Ohm 
)
void cla_EST_setRr_fineDelta_Ohm ( EST_Handle  handle,
const float_t  Rr_fineDelta_Ohm 
)
void cla_EST_setRr_max_Ohm ( EST_Handle  handle,
const float_t  Rr_max_Ohm 
)
void cla_EST_setRr_min_Ohm ( EST_Handle  handle,
const float_t  Rr_min_Ohm 
)
void cla_EST_setRr_Ohm ( EST_Handle  handle,
const float_t  Rr_Ohm 
)
void cla_EST_setRr_q_Ohm ( EST_Handle  handle,
const float_t  Rr_q_Ohm 
)
void cla_EST_setRs_a_Ohm ( EST_Handle  handle,
const float_t  Rs_a_Ohm 
)
void cla_EST_setRs_ab_Ohm ( EST_Handle  handle,
const MATH_vec2 pRs_ab_Ohm 
)
void cla_EST_setRs_b_Ohm ( EST_Handle  handle,
const float_t  Rs_b_Ohm 
)
void cla_EST_setRs_coarseDelta_Ohm ( EST_Handle  handle,
const float_t  Rs_coarseDelta_Ohm 
)
void cla_EST_setRs_d_Ohm ( EST_Handle  handle,
const float_t  Rs_d_Ohm 
)
void cla_EST_setRs_dq_Ohm ( EST_Handle  handle,
const MATH_vec2 pRs_dq_Ohm 
)
void cla_EST_setRs_fineDelta_Ohm ( EST_Handle  handle,
const float_t  Rs_fineDelta_Ohm 
)
void cla_EST_setRs_Ohm ( EST_Handle  handle,
const float_t  Rs_Ohm 
)
void cla_EST_setRs_q_Ohm ( EST_Handle  handle,
const float_t  Rs_q_Ohm 
)
void cla_EST_setRsOnLine_beta_rad ( EST_Handle  handle,
const float_t  beta_rad 
)
void cla_EST_setRsOnLine_Ohm ( EST_Handle  handle,
const float_t  Rs_Ohm 
)
void cla_EST_setRsOnLineAngle_rad ( EST_Handle  handle,
const float_t  angle_rad 
)
void cla_EST_setRsOnLineAngleDelta_rad ( EST_Handle  handle,
const float_t  angleDelta_rad 
)
void cla_EST_setRsOnLineId_A ( EST_Handle  handle,
const float_t  Id_A 
)
void cla_EST_setRsOnLineId_mag_A ( EST_Handle  handle,
const float_t  Id_mag_A 
)
void cla_EST_setRsOnLineLpFilterParams ( EST_Handle  handle,
const EST_RsOnLineFilterType_e  filterType,
const uint_least8_t  filterNumber,
const float_t  b0,
const float_t  b1,
const float_t  a1,
const float_t  x1,
const float_t  y1 
)
void cla_EST_setSpeed_ref_Hz ( EST_Handle  handle,
const float_t  speed_ref_Hz 
)
void cla_EST_setTargetValue_Id_A ( EST_Handle  handle,
const float_t  targetValue_A 
)
void cla_EST_setTargetValue_Iq_A ( EST_Handle  handle,
const float_t  targetValue_A 
)
void cla_EST_setTargetValue_spd_Hz ( EST_Handle  handle,
const float_t  targetValue_Hz 
)
void cla_EST_setupTraj ( EST_Handle  handle,
CTRL_Handle  ctrlHandle,
const float_t  targetValue_spd_Hz,
const float_t  targetValue_Id_A 
)
void cla_EST_updateId_ref_A ( EST_Handle  handle,
float_t pId_ref_A 
)
bool cla_EST_updateState ( EST_Handle  handle,
const float_t  Id_target_A 
)
bool cla_EST_updateTrajState ( EST_Handle  handle)
bool cla_EST_useZeroIq_ref ( EST_Handle  handle)
uint_least8_t EST_computeDirection_qFmt ( EST_Handle  handle,
const float_t  flux_max 
)

Computes the direction Q format for the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]flux_maxThe maximum flux value
Returns
The direction Q format
float_t EST_computeLmag_H ( EST_Handle  handle,
const float_t  current_A 
)

Computes the magnetizing inductance in Henries (H)

Parameters
[in]handleThe estimator (EST) handle
[in]currentThe current in the rotor, A
Returns
The magnetizing inductance, H
float_t EST_computeLr_H ( EST_Handle  handle,
const _iq  current 
)

Computes the rotor inductance in Henries (H)

Parameters
[in]handleThe estimator (EST) handle
[in]currentThe current in the rotor
Returns
The rotor inductance, H
float_t EST_computePower_W ( EST_Handle  handle)

Computes the power in Watts (W)

Parameters
[in]handleThe estimator (EST) handle
Returns
The power value, W
float_t EST_computeTorque_Nm ( EST_Handle  handle)

Computes the torque value in per Newton-meter (Nm)

Parameters
[in]handleThe estimator (EST) handle
Returns
The torque value, N*m
void EST_configureCtrl ( EST_Handle  handle,
CTRL_Handle  ctrlHandle 
)

Configures the controller for each of the estimator states.

Parameters
[in]handleThe estimator (EST) handle
[in]ctrlHandleThe controller (CTRL) handle
void EST_configureTraj ( EST_Handle  handle)

Configures the trajectory generator for each of the estimator states.

Parameters
[in]handleThe estimator (EST) handle
void EST_disable ( EST_Handle  handle)

Disables the estimator.

Parameters
[in]handleThe estimator (EST) handle
void EST_disableTraj ( EST_Handle  handle)

Disables the estimator trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
bool EST_doCurrentCtrl ( EST_Handle  handle)

Determines if current control should be performed during motor identification.

Parameters
[in]handleThe estimator (EST) handle
Returns
A boolean value denoting whether (true) or not (false) to perform current control

Referenced by CTRL_runOnLine().

bool EST_doSpeedCtrl ( EST_Handle  handle)

Determines if speed control should be performed during motor identification.

Parameters
[in]handleThe estimator (EST) handle
Returns
A boolean value denoting whether (true) or not (false) to perform speed control

Referenced by CTRL_runOnLine().

void EST_enable ( EST_Handle  handle)

Enables the estimator.

Parameters
[in]handleThe estimator (EST) handle
void EST_enableTraj ( EST_Handle  handle)

Enables the estimator trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
void EST_genOutputLimits_Pid_Id ( EST_Handle  handle,
const _iq  maxDutyCycle,
_iq outMin,
_iq outMax 
)

Generated the PID Id controller output limits.

Parameters
[in]handleThe estimator (EST) handle
[in]maxDutyCycleThe maximum duty cycle, pu
[in]outMinThe pointer to the minimum output value
[in]outMaxThe pointer to the maximum output value
void EST_genOutputLimits_Pid_Iq ( EST_Handle  handle,
const _iq  maxDutyCycle,
const _iq  out_Id,
_iq outMin,
_iq outMax 
)

Generated the PID Id controller output limits.

Parameters
[in]handleThe estimator (EST) handle
[in]maxDutyCycleThe maximum duty cycle, pu
[in]out_IdThe Id output value
[in]outMinThe pointer to the minimum output value
[in]outMaxThe pointer to the maximum output value
_iq EST_get_krpm_to_pu_sf ( EST_Handle  handle)

Gets the krpm to pu scale factor in per unit (pu), IQ24.

This function is needed when a user needs to scale a value of the motor speed from kpm (kilo revolutions per minute) to a per units value. This scale factor is calculated and used as shown below:

1 #define USER_MOTOR_NUM_POLE_PAIRS (2)
2 #define USER_IQ_FULL_SCALE_FREQ_Hz (500.0)
3 
4 _iq scale_factor = _IQ(USER_MOTOR_NUM_POLE_PAIRS * 1000.0 / (60.0 * USER_IQ_FULL_SCALE_FREQ_Hz));
5 
6 _iq Speed_krpm = EST_getSpeed_krpm(handle);
7 _iq Speed_krpm_to_pu_sf = EST_get_krpm_to_pu_sf(handle);
8 _iq Speed_pu = _IQmpy(Speed_krpm,Speed_krpm_to_pu_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The krpm to pu scale factor. This value is in IQ24.

Referenced by CTRL_setSpd_ref_krpm().

_iq EST_get_pu_to_krpm_sf ( EST_Handle  handle)

Gets the pu to krpm scale factor in per unit (pu), IQ24.

This function is needed when a user needs to scale a value of the motor speed from per units to krpm (kilo revolutions per minute) value. This scale factor is calculated as follows:

1 #define USER_MOTOR_NUM_POLE_PAIRS (2)
2 #define USER_IQ_FULL_SCALE_FREQ_Hz (500.0)
3 
4 _iq scale_factor = IQ(60.0 * USER_IQ_FULL_SCALE_FREQ_Hz / (USER_MOTOR_NUM_POLE_PAIRS * 1000.0));
5 
6 _iq Speed_pu = EST_getFm_pu(handle);
7 _iq Speed_pu_to_krpm_sf = EST_get_pu_to_krpm_sf(handle);
8 _iq Speed_krpm = _IQmpy(Speed_krpm,Speed_krpm_to_pu_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The pu to krpm scale factor. This value is in IQ24.
float_t EST_get_rpm_to_rps_sf ( EST_Handle  handle)

Gets the rpm to rad/sec scale factor.

Parameters
[in]handleThe estimator (EST) handle
Returns
The rpm to rad/sec scale factor
float_t EST_get_rps_to_rpm_sf ( EST_Handle  handle)

Gets the rad/sec to rpm scale factor.

Parameters
[in]handleThe estimator (EST) handle
Returns
The rad/sec to rpm scale factor
float_t EST_getAccel_rps2 ( EST_Handle  handle)

Gets the mechanical acceleration from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The mechanical acceleration, rad/sec^2
float_t EST_getAngle_est_rad ( EST_Handle  handle)

Gets the estimated angle from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The estimated angle, rad
_iq EST_getAngle_pu ( EST_Handle  handle)

Gets the angle value from the estimator in per unit (pu), IQ24.

This function returns a per units value of the rotor flux angle. This value wraps around at 1.0, so the return value is between 0x00000000 or _IQ(0.0) to 0x00FFFFFF or _IQ(1.0). An example of using this angle is shown:

1 _iq Rotor_Flux_Angle_pu = EST_getAngle_pu(handle);
Parameters
[in]handleThe estimator (EST) handle
Returns
The angle value, pu, in IQ24.

Referenced by CTRL_runOnLine(), and CTRL_runOnLine_User().

float_t EST_getAngle_rad ( EST_Handle  handle)

Gets the angle estimate for t = n+1 from the estimator in radians (rad).

This function returns the angle value in units of radians. This value wraps around at 2*pi, so the return value is between -pi and pi. An example of using this angle is shown:

1 float_t rotorFluxAngle_rad = EST_getAngle_rad(handle);
Parameters
[in]handleThe estimator (EST) handle
Returns
The angle value for t = n+1, rad
float_t EST_getAngle_traj_rad ( EST_Handle  handle)

Gets the trajectory angle from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The trajectory angle, rad
float_t EST_getAngleDelta_est_rad ( EST_Handle  handle)

Gets the angle delta estimate for t = n+1 from the estimator in radians (rad).

Parameters
[in]handleThe estimator (EST) handle
Returns
The angle delta value for t = n+1, rad
float_t EST_getAngleDelta_rad ( EST_Handle  handle)

Gets the angle delta estimate for t = n+1 from the estimator.

or trajectory depending on state in radians (rad).

Parameters
[in]handleThe estimator (EST) handle
Returns
The angle delta value for t = n+1, rad
float_t EST_getAngleDelta_traj_rad ( EST_Handle  handle)

Gets the angle delta estimate for t = n+1 from the trajectory in radians (rad).

Parameters
[in]handleThe estimator (EST) handle
Returns
The angle delta value for t = n+1, rad
int_least16_t EST_getCount_isr ( EST_Handle  handle)

Gets the ISR count from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The ISR count
_iq EST_getDcBus_pu ( EST_Handle  handle)

Gets the DC bus value from the estimator in per unit (pu), IQ24.

This value is originally passed as a parameter when calling function EST_run(). A similar function can be simply reading what has been read and scaled by the ADC converter on pAdcData->dcBus. This value is used by the libraries internally to calculate one over dcbus, which is a value used to compensate the proportional gains of the current controllers. The following example shows how to use this function to calculate a DC bus value in kilo volts:

1 #define USER_IQ_FULL_SCALE_VOLTAGE_V (300.0)
2 
3 _iq Vbus_pu = EST_getDcBus_pu(handle);
4 _iq Vbus_pu_to_kV_sf = _IQ(USER_IQ_FULL_SCALE_VOLTAGE_V / 1000.0);
5 _iq Vbus_kV = _IQmpy(Vbus_pu,Vbus_pu_to_kV_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The DC bus value, pu
float_t EST_getDcBus_V ( EST_Handle  handle)

Gets the DC bus value from the estimator in volts (V)

Parameters
[in]handleThe estimator (EST) handle
Returns
The DC bus value, V
uint_least8_t EST_getDir_qFmt ( EST_Handle  handle)

Gets the direction Q format from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The direction Q format
void EST_getEab_V ( EST_Handle  handle,
MATH_vec2 pEab_V 
)

Gets the alpha/beta back EMF voltage vector from the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]pEab_VThe pointer to memory for the Eab vector, V
void EST_getEdq_V ( EST_Handle  handle,
MATH_vec2 pEdq_V 
)

Gets the direct/quadrature back EMF voltage vector from the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]pEdq_VThe pointer to memory for the Edq vector, V
EST_ErrorCode_e EST_getErrorCode ( EST_Handle  handle)

Gets the error code from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The error code
float_t EST_getFe ( EST_Handle  handle)

Gets the electrical frequency of the motor in Hertz (Hz).

This frequency, in Hz, is the frequency of currents and voltages going into the motor. In order to get the speed of the motor, it is better to use EST_getFm().

Parameters
[in]handleThe estimator (EST) handle
Returns
The electrical frequency, Hz
float_t EST_getFe_abs_max_rps ( EST_Handle  handle)

Gets the absolute maximum electrical frequency of the motor in rad/sec.

Parameters
[in]handleThe estimator (EST) handle
Returns
The absolute maximum electrical frequency, rad/sec
float_t EST_getFe_Hz ( EST_Handle  handle)

Gets the electrical frequency of the motor in Hertz (Hz).

This frequency, in Hz, is the frequency of currents and voltages going into the motor. In order to get the speed of the motor, it is better to use EST_getFm_Hz().

Parameters
[in]handleThe estimator (EST) handle
Returns
The electrical frequency, Hz
_iq EST_getFe_pu ( EST_Handle  handle)

Gets the electrical frequency of the motor in per unit (pu), IQ24.

Similar to EST_getFe() function, this function returns the electrical frequency of the motor in per units. In order to convert the electrical frequency from per units to Hz, the user needs to multiply the returned value by the following scale factor:

1 _iq Full_Scale_Freq_Elec_Hz = _IQ(USER_IQ_FULL_SCALE_FREQ_Hz);
2 
3 _iq Freq_Elec_Hz = _IQmpy(EST_getFe_pu(handle),Full_Scale_Freq_Elec_Hz);
Parameters
[in]handleThe estimator (EST) handle
Returns
The electrical frequency, pu
float_t EST_getFe_rps ( EST_Handle  handle)

Gets the electrical frequency of the motor in rad/sec.

This frequency, in Hz, is the frequency of currents and voltages going into the motor. In order to get the speed of the motor, it is better to use EST_getFm_rps().

Parameters
[in]handleThe estimator (EST) handle
Returns
The electrical frequency, rad/sec
bool EST_getFlag_bypassLockRotor ( EST_Handle  handle)

Gets the bypass lock rotor flag value.

Parameters
[in]handleThe estimator (EST) handle
Returns
The bypass lock rotor flag value
bool EST_getFlag_enable ( EST_Handle  handle)

Gets the enable estimator flag value.

Parameters
[in]handleThe estimator (EST) handle
Returns
The enable estimator flag value
bool EST_getFlag_enableForceAngle ( EST_Handle  handle)

Gets the enable force angle flag value from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The value of the flag, in boolean type, bool
Return values
trueForced angle is enabled, and the estimated angle will be bypassed if the flux frequency falls below a threashold defined by:
1 #define USER_ZEROSPEEDLIMIT (0.001)
A typical value of this frequency is 0.001 of the full scale frequency defined by:
1 #define USER_IQ_FULL_SCALE_FREQ_Hz (500.0)
The forced angle algorithm, when active, that is, when the rotor flux electrical frequency falls below the threashold, will be forcing a rotating angle at a frequency set by the following define:
1 #define USER_FORCE_ANGLE_FREQ_Hz (1.0)
falseForce angle is disabled, and the estimator will never be bypassed by any forced angle algorithm.
Parameters
[in]handleThe estimator (EST) handle
Returns
The value of the flag, in boolean type, bool
bool EST_getFlag_enablePowerWarp ( EST_Handle  handle)

Gets the enable power warp flag value from the trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The enable power warp flag value
bool EST_getFlag_enableRsOnLine ( EST_Handle  handle)

Gets the value of the flag which enables online stator resistance (Rs) estimation.

Parameters
[in]handleThe estimator (EST) handle
Returns
The enable online Rs flag value
Return values
trueRs online recalibration algorithm is enabled. The estimator will run a set of functions related to rs online which recalculates the stator resistance while the motor is rotating. This algorithm is useful when motor heats up, and hence stator resistance increases.
falseRs online recalibration algorithm is disabled, and no updates to Rs will be made even if the motor heats up. Low speed performace, and startup performance with full torque might be affected if stator resistance changes due to motor heating up. The stator resistance will be fixed, and equal to the value returned by: EST_getRs_Ohm().
bool EST_getFlag_enableRsRecalc ( EST_Handle  handle)

Gets the enable stator resistance re-calibrate flag value from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The value of the enable stator resistance re-calibrate flag
Return values
trueRs recalibration is enabled. The estimator will inject a DC current to the D-axis to recalibrate the stator resistance before the motor rotates. It is required that the motor is at standstill to perform Rs recalibration. If online recalibration of the stator resistance is needed, refer to EST_getFlag_enableRsOnLine() and EST_setFlag_enableRsOnLine() functions.
falseRs recalibration is disabled. The estimator will start the motor with the resistance value that was used before the motor was stopped, or what is returned by function: EST_getRs_Ohm().
Parameters
[in]handleThe estimator (EST) handle
Returns
The value of the enable stator resistance re-calibrate flag
Return values
trueRs recalibration is enabled. The estimator will inject a DC current to the D-axis to recalibrate the stator resistance before the motor rotates. It is required that the motor is at standstill to perform Rs recalibration.
falseRs recalibration is disabled. The estimator will start the motor with the resistance value that was used before the motor was stopped, or what is returned by function: EST_getRs_Ohm().
bool EST_getFlag_enableTraj ( EST_Handle  handle)

Gets the enable trajectory flag value from the trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The enable trajectory flag value
bool EST_getFlag_estComplete ( EST_Handle  handle)

Gets the value of the flag which denotes when the estimation is complete.

This flag is set to true every time the EST_run() function is run. This flag can be reset to false by using the following example:

1 bool estComplete_Flag = EST_getFlag_estComplete(handle);
Parameters
[in]handleThe estimator (EST) handle
Returns
The estimation complete flag value
Return values
trueThe estimator has been run at least once since last time EST_setFlag_estComplete(handle, false) was called.
falseThe estimator has not been run since last time EST_setFlag_estComplete(handle, false) was called.

This flag is set to true every time the EST_run() function is run. This flag can be reset to false by using the following example:

1 bool estComplete_Flag = EST_getFlag_estComplete(handle);
Parameters
[in]handleThe estimator (EST) handle
Returns
The estimation complete flag value
Return values
trueThe estimator has been run at least once since last time. EST_setFlag_estComplete(handle, false) was called.
falseThe estimator has not been run since last time EST_setFlag_estComplete(handle, false) was called.
bool EST_getFlag_motorIdentified ( EST_Handle  handle)

Gets the motor identified flag state in the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The state of the motor identified flag
bool EST_getFlag_nearZeroSpeed ( EST_Handle  handle)

Gets the near zero speed flag state.

Parameters
[in]handleThe estimator (EST) handle
Returns
The state of the near zero speed flag
bool EST_getFlag_updateRs ( EST_Handle  handle)

Gets the value of the flag which enables the updating of the stator resistance (Rs) value.

When the online resistance estimator is enabled, the update flag allows the online resistance to be copied to the resistance used by the estimator model. If the update flag is not set to true, the online resistance estimation will not be used by the estimator model, and if the resistance changes too much due to temperature increase, the model may not work as expected.

1 bool update_Flag = EST_getFlag_updateRs(handle);
Parameters
[in]handleThe estimator (EST) handle
Returns
The update Rs flag value
Return values
trueThe stator resistance estimated by the Rs OnLine module will be copied to the' the stator resistance used by the module, so of the motor's temperature changes, the estimated angle will be calculated based on the most up to date stator resistance
falseThe stator resistance estimated by the Rs OnLine module may or may not be updated depending on the enable flag, but will not be used in the motor's model used to generate the estimated speed and angle.

When the online resistance estimator is enabled, the update flag allows the online resistance to be copied to the resistance used by the estimator model. If the update flag is not set to true, the online resistance estimation will not be used by the estimator model, and if the resistance changes too much due to temperature increase, the model may not work as expected.

1 bool update_Flag = EST_getFlag_updateRs(handle);
Parameters
[in]handleThe estimator (EST) handle
Returns
The update Rs flag value
Return values
trueThe stator resistance estimated by the Rs OnLine module will be copied to the stator resistance used by the module, so of the motor's temperature changes, the estimated angle will be calculated based on the most up to date stator resistance
falseThe stator resistance estimated by the Rs OnLine module may or may not be updated depending on the enable flag, but will not be used in the motor's model used to generate the estimated speed and angle.
_iq EST_getFlux_pu ( EST_Handle  handle)

Gets the flux value in per unit (pu), IQ24.

The estimator continuously calculates the flux linkage between the rotor and stator, which is the portion of the flux that produces torque. This function returns the flux linkage, ignoring the number of turns, between the rotor and stator coils, in per units. This functions returns a precise value only after the motor has been identified, which can be checked by the following code example:

1 if(EST_isMotorIdentified(handle))
2  {
3  // once the motor has been identified, get the flux
4  _iq Flux_pu = EST_getFlux_pu(handle);
5  }

For some applications it is important to get this value in per units, since it is much faster to process especially when the architecture of the microcontroller does not have a floating point processing unit. In order to translate this per units value into a scaled value in _iq, it is important to consider a scale factor to convert this flux in per units to the required units. The following example shows how to scale a per units value to Wb and V/Hz in IQ for faster processing:

1 float_t FullScaleFlux = (USER_IQ_FULL_SCALE_VOLTAGE_V/(float_t)USER_EST_FREQ_Hz);
2 float_t maxFlux = (USER_MOTOR_RATED_FLUX*((USER_MOTOR_TYPE==MOTOR_Type_Induction)?0.05:0.7));
3 float_t lShift = -ceil(log(FullScaleFlux/maxFlux)/log(2.0));
4 _iq gFlux_pu_to_Wb_sf = _IQ(FullScaleFlux/(2.0*MATH_PI)*pow(2.0,lShift));
5 _iq gFlux_pu_to_VpHz_sf = _IQ(FullScaleFlux*pow(2.0,lShift));
6 // The value of gFlux_pu_to_Wb_sf and gFlux_pu_to_VpHz_sf can be calculated once at the beginning of the
7 // code and stored as global variables
8 
9 _iq Flux_Wb;
10 _iq Flux_VpHz;
11 _iq Flux_pu = EST_getFlux_pu(handle);
12 
13 Flux_Wb = _IQmpy(Flux_pu, gFlux_pu_to_Wb_sf);
14 Flux_VpHz = _IQmpy(Flux_pu, gFlux_pu_to_VpHz_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The flux value, pu

Referenced by USER_computeFlux(), USER_computeTorque_lbin(), and USER_computeTorque_Nm().

float_t EST_getFlux_VpHz ( EST_Handle  handle)

Gets the flux value in Volts per Hertz (V/Hz).

The estimator continuously calculates the flux linkage between the rotor and stator, which is the portion of the flux that produces torque. This function returns the flux linkage, ignoring the number of turns, between the rotor and stator coils, in Volts per Hertz, or V/Hz. This functions returns a precise value only after the motor has been identified, which can be checked by the following code example:

1 if(EST_isMotorIdentified(handle))
2  {
3  // once the motor has been identified, get the flux
4  float_t Flux_VpHz = EST_getFlux_VpHz(handle);
5  }
Parameters
[in]handleThe estimator (EST) handle
Returns
The flux value, V/Hz, in floating point
float_t EST_getFlux_Wb ( EST_Handle  handle)

Gets the flux value in Webers (Wb).

Gets the flux value in Weber (Wb).

The estimator continuously calculates the flux linkage between the rotor and stator, which is the portion of the flux that produces torque. This function returns the flux linkage, ignoring the number of turns, between the rotor and stator coils, in Webers, or Wb, or Volts * Seconds (V.s). This functions returns a precise value only after the motor has been identified, which can be checked by the following code example:

1 if(EST_isMotorIdentified(handle))
2  {
3  // once the motor has been identified, get the flux
4  float_t Flux_Wb = EST_getFlux_Wb(handle);
5  }
Parameters
[in]handleThe estimator (EST) handle
Returns
The flux value, Webers or V.s, in floating point

The estimator continuously calculates the flux linkage between the rotor and stator, which is the portion of the flux that produces torque. This function returns the flux linkage, ignoring the number of turns, between the rotor and stator coils, in Weber, or Wb, or Volts * Seconds / rad (V.sec/rad). This functions returns a precise value only after the motor has been identified, which can be checked by the following code example:

1 if(EST_isMotorIdentified(handle))
2  {
3  // once the motor has been identified, get the flux
4  float_t Flux_Wb = EST_getFlux_Wb(handle);
5  }
Parameters
[in]handleThe estimator (EST) handle
Returns
The flux value, Weber or V*sec/rad, in floating point
EST_Flux_State_e EST_getFluxState ( EST_Handle  handle)

Gets the flux estimator state.

Parameters
[in]handleThe estimator (EST) handle
Returns
The flux estimator state
float_t EST_getFm ( EST_Handle  handle)

Gets the mechanical frequency of the motor in Hertz (Hz).

This frequency, in Hz, is the mechanical frequency of the motor. If the motor is a permanent magnet motor, the mechanical frequency will be equal to the electrical frequency, since it is a synchronous motor. In the case of AC induction motors, the mechanical frequency will be equal to the electrical frequency minus the slip frequency. The following code example shows how to use this function to calculate revolutions per minute (RPM) in floating point:

1 #define USER_MOTOR_NUM_POLE_PAIRS (2)
2 
3 float_t Mechanical_Freq_Hz = EST_getFm(handle);
4 float_t hz_to_rpm_sf = 60.0/USER_MOTOR_NUM_POLE_PAIRS;
5 float_t Speed_RPM = Mechanical_Freq_Hz * hz_to_rpm_sf;
Parameters
[in]handleThe estimator (EST) handle
Returns
The mechanical frequency, Hz
float_t EST_getFm_Hz ( EST_Handle  handle)

Gets the mechanical frequency of the motor in Hertz (Hz).

This frequency, in Hz, is the mechanical frequency of the motor. If the motor is a permanent magnet motor, the mechanical frequency will be equal to the electrical frequency, since it is a synchronous motor. In the case of AC induction motors, the mechanical frequency will be equal to the electrical frequency minus the slip frequency. The following code example shows how to use this function to calculate revolutions per minute (RPM) in floating point:

1 #define USER_MOTOR_NUM_POLE_PAIRS (2)
2 
3 float_t mechFreq_Hz = EST_getFm_Hz(handle);
4 float_t hz_to_rpm_sf = 60.0/(float_t)USER_MOTOR_NUM_POLE_PAIRS;
5 float_t speed_rpm = mechFreq_Hz * hz_to_rpm_sf;
Parameters
[in]handleThe estimator (EST) handle
Returns
The mechanical frequency, Hz
float_t EST_getFm_lp_Hz ( EST_Handle  handle)

Gets the low pass filtered mechanical frequency of the motor in Hz.

Parameters
[in]handleThe estimator (EST) handle
Returns
The low pass filtered mechanical frequency, Hz
float_t EST_getFm_lp_rps ( EST_Handle  handle)

Gets the low pass filtered mechanical frequency of the motor in rad/sec.

Parameters
[in]handleThe estimator (EST) handle
Returns
The low pass filtered mechanical frequency, rad/sec
_iq EST_getFm_pu ( EST_Handle  handle)

Gets the mechanical frequency of the motor in per unit (pu), IQ24.

Similar to EST_getFe_pu() function, this function returns the mechanical frequency of the motor in per units. In order to convert the mechanical frequency from per units to kHz (to avoid saturation of IQ24), the user needs to multiply the returned value by the following scale factor:

1 #define USER_IQ_FULL_SCALE_FREQ_Hz (500.0)
2 
3 _iq pu_to_khz_sf = _IQ(USER_IQ_FULL_SCALE_FREQ_Hz/1000.0);
4 _iq khz_to_krpm_sf = _IQ(60.0/USER_MOTOR_NUM_POLE_PAIRS);
5 _iq Mechanical_Freq_kHz = _IQmpy(EST_getFm_pu(handle),pu_to_khz_sf);
6 _iq Speed_kRPM = _IQmpy(Mechanical_Freq_kHz,khz_to_krpm_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The mechanical frequency, pu

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

float_t EST_getFm_rps ( EST_Handle  handle)

Gets the mechanical frequency of the motor in rad/sec.

This frequency, in rad/sec, is the mechanical frequency of the motor. If the motor is a permanent magnet motor, the mechanical frequency will be equal to the electrical frequency, since it is a synchronous motor. In the case of AC induction motors, the mechanical frequency will be equal to the electrical frequency minus the slip frequency. The following code example shows how to use this function to calculate revolutions per minute (RPM) in floating point:

1 #define USER_MOTOR_NUM_POLE_PAIRS (2)
2 
3 float_t mechFreq_rps = EST_getFm_rps(handle);
4 float_t rps_to_rpm_sf = (float_t)60.0/(MATH_TWO_PI * (float_t)USER_MOTOR_NUM_POLE_PAIRS);
5 float_t speed_rpm = mechFreq_rps * rps_to_rpm_sf;
Parameters
[in]handleThe estimator (EST) handle
Returns
The mechanical frequency, rad/sec
_iq EST_getForceAngleDelta_pu ( EST_Handle  handle)

Gets the force angle delta value from the estimator in per unit (pu), IQ24.

This function returns a valid value only after initializing the controller object by calling CTRL_setParams() function. The force angle delta represents the increments to be added to or subtracted from the forced angle. The higher this value is, the higher frequency will be generated when the angle is forced (estimated angle is bypassed when in forced angle mode). By default the forced angle frequency is set in user.h. The following example shows how to convert delta in per units to kilo Hertz (kHz).

1 #define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
2 #define USER_NUM_CTRL_TICKS_PER_EST_TICK (1)
3 #define USER_PWM_FREQ_kHz (15.0)
4 #define USER_ISR_FREQ_Hz (USER_PWM_FREQ_kHz * 1000.0)
5 #define USER_CTRL_FREQ_Hz (uint_least32_t)(USER_ISR_FREQ_Hz/USER_NUM_ISR_TICKS_PER_CTRL_TICK)
6 #define USER_EST_FREQ_Hz (uint_least32_t)(USER_CTRL_FREQ_Hz/USER_NUM_CTRL_TICKS_PER_EST_TICK)
7 
8 _iq delta_pu_to_kHz_sf = _IQ((float_t)USER_EST_FREQ_Hz/1000.0);
9 _iq Force_Angle_Delta_pu = EST_getForceAngleDelta_pu(handle);
10 _iq Force_Angle_Freq_kHz = _IQmpy(Force_Angle_Delta_pu, delta_pu_to_kHz_sf);
Note
Note that kHz is prefered to avoid overflow of IQ24 variables.
Parameters
[in]handleThe estimator (EST) handle
Returns
The force angle delta, pu. Minimum value of _IQ(0.0) and maximum of _IQ(1.0).
float_t EST_getForceAngleDelta_rad ( EST_Handle  handle)

Gets the force angle delta value from the estimator in radians (rad).

Parameters
[in]handleThe estimator (EST) handle
Returns
The force angle delta, rad
bool EST_getForceAngleStatus ( EST_Handle  handle)

Gets the status of the force angle operation in the estimator.

The status can only change to active when forced angle mode has been enabled by calling the following function:

1 EST_setFlag_enableForceAngle(handle, true);

Forced angle mode will be active when the electrical frequency of the motor falls below the defined threshold in user.h:

1 #define USER_ZEROSPEEDLIMIT (0.001)

details A manual check of forced angle status can be done using the following code example:

1 _iq fe_pu = EST_getFe_pu(handle);
2 bool is_forced_angle_active;
3 if(_IQabs(fe_pu) < _IQ(USER_ZEROSPEEDLIMIT))
4  {
5  is_forced_angle_active = true;
6  }
7 else
8  {
9  is_forced_angle_active = false;
10  }
Parameters
[in]handleThe estimator (EST) handle
Returns
A boolean value denoting whether the angle has been forced (true) or not (false)
Return values
trueThe last iteration of the estimator used a forced angle to run the park and inverse park transforms. The estimator was also run in parallel to the forced angle, but the estimator output was not used.
falseForced angle mode is either disabled, or the electrical frequency did not fall below the predetermined threshold. The estimator output was used to run the park and inverse park transforms.
Parameters
[in]handleThe estimator (EST) handle
Returns
A boolean value denoting whether the angle has been forced (true) or not (false)
Return values
trueThe last iteration of the estimator used a forced angle to run the park and inverse park transforms. The estimator was also run in parallel to the forced angle, but the estimator output was not used.
falseForced angle mode is either disabled, or the electrical frequency did not fall below the predetermined threshold. The estimator output was used to run the park and inverse park transforms.
_iq EST_getFreqB0_lp_pu ( EST_Handle  handle)

Gets the low pass filter numerator value in the frequency estimator in per unit (pu), IQ30.

Parameters
[in]handleThe estimator (EST) handle
Returns
The low pass filter numerator value, pu
float_t EST_getFreqBeta_lp ( EST_Handle  handle)

Gets the value used to set the pole location in the low-pass filter of the frequency estimator in radians per second (rps).

Parameters
[in]handleThe estimator (EST) handle
Returns
The value used to set the filter pole location, rad
_iq EST_getFreqBeta_lp_pu ( EST_Handle  handle)

Gets the value used to set the pole location in the low-pass filter of the frequency estimator in per unit (pu), IQ30.

Parameters
[in]handleThe estimator (EST) handle
Returns
The value used to set the filter pole location, pu
float_t EST_getFslip ( EST_Handle  handle)

Gets the slip frequency of the motor in Hertz (Hz).

When running a permanent magnet motor, the slip frequency returned by this function will be zero. If an induction motor is used, this function will return the slip frequency. This frequency, in Hz, will be the difference between the electrical frequency and the mechanical frequency.

\[F_{slip}=F_{electrical}-F_{mechanical}\]

Parameters
[in]handleThe estimator (EST) handle
Returns
The slip frequency, Hz
float_t EST_getFslip_Hz ( EST_Handle  handle)

Gets the slip frequency of the motor in Hertz (Hz).

When running a permanent magnet motor, the slip frequency returned by this function will be zero. If an induction motor is used, this function will return the slip frequency. This frequency, in Hz, will be the difference between the electrical frequency and the mechanical frequency.

\[F_{slip}=F_{electrical}-F_{mechanical}\]

Parameters
[in]handleThe estimator (EST) handle
Returns
The slip frequency, Hz
_iq EST_getFslip_pu ( EST_Handle  handle)

Gets the slip frequency of the motor in per unit (pu), IQ24.

Similar to EST_getFe_pu() function, this function returns the slip frequency of the motor in per units. In order to convert the slip frequency from from per units to Hz, the user needs to multiply the returned value by the following scale factor:

1 #define USER_IQ_FULL_SCALE_FREQ_Hz (500.0)
2 
3 _iq Full_Scale_Freq_Elec_Hz = _IQ(USER_IQ_FULL_SCALE_FREQ_Hz);
4 
5 _iq Freq_Slip_Hz = _IQmpy(EST_getFslip_pu(handle),Full_Scale_Freq_Elec_Hz);
Parameters
[in]handleThe estimator (EST) handle
Returns
The slip frequency, pu
float_t EST_getFslip_rps ( EST_Handle  handle)

Gets the slip frequency of the motor in rad/sec.

When running a permanent magnet motor, the slip frequency returned by this function will be zero. If an induction motor is used, this function will return the slip frequency. This frequency, in rad/sec, will be the difference between the electrical frequency and the mechanical frequency.

\[F_{slip}=F_{electrical}-F_{mechanical}\]

Parameters
[in]handleThe estimator (EST) handle
Returns
The slip frequency, rad/sec
float_t EST_getFullScaleCurrent ( EST_Handle  handle)

Gets the full scale current value used in the estimator in Amperes (A).

The value returned by this function is the same as the value defined in user.h When users require to display a value in real world units, i.e. in Amperes, this value is used to convert the per unit values of currents into Amperes. The following example shows two different ways of doing this conversion, one using floating point, and the other one using IQ math.

Example using floating point:

1 float_t pu_to_amps_sf = EST_getFullScaleCurrent(handle);
2 _iq Id_rated_pu = EST_getIdRated_pu(handle);
3 float_t Id_rated_A = _IQtoF(Id_rated_pu) * pu_to_amps_sf;

Example using fixed point:

1 #define USER_IQ_FULL_SCALE_CURRENT_A (10.0)
2 
3 _iq pu_to_amps_sf = _IQ(USER_IQ_FULL_SCALE_CURRENT_A);
4 _iq Id_rated_pu = EST_getIdRated_pu(handle);
5 _iq Id_rated_A = _IQmpy(Id_rated_pu, pu_to_amps_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The full scale current value, A
float_t EST_getFullScaleFlux ( EST_Handle  handle)

Gets the full scale flux value used in the estimator in Volts per Hertz (V/Hz).

Parameters
[in]handleThe estimator (EST) handle
Returns
The full scale flux value
float_t EST_getFullScaleFreq ( EST_Handle  handle)

Gets the full scale frequency value used in the estimator in Hertz (Hz).

Full scale frequency can be used as a scale factor to convert values from per units to Hertz. The following example shows how to use this function to convert frequency from per units to Hz using floating point math:

1 float_t Mechanical_Frequency_pu = _IQtoF(EST_getFm_pu(handle));
2 float_t pu_to_hz_sf = EST_getFullScaleFreq(handle);
3 float_t Mechanical_Frequency_hz = Mechanical_Frequency_pu * pu_to_hz_sf

For faster execution, this function call can be avoided by using a definition of the full scale frequency that resides in user.h. The following example shows the same functionality but using fixed point math for faster execution:

1 #define USER_IQ_FULL_SCALE_FREQ_Hz (500.0)
2 
3 _iq Mechanical_Frequency_pu = EST_getFm_pu(handle);
4 _iq pu_to_khz_sf = _IQ(USER_IQ_FULL_SCALE_FREQ_Hz/1000.0);
5 _iq Mechanical_Frequency_khz = _IQmpy(Mechanical_Frequency_pu, pu_to_khz_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The full scale frequency value, Hz
float_t EST_getFullScaleInductance ( EST_Handle  handle)

Gets the full scale inductance value used in the estimator in Henries (H).

There are different ways of getting the inductance used by the estimator. This function helps when converting an inductance from per units to H. However, the returned value is in floating point format, so utilizing this full scale value to convert per units to H is not the most efficient way. Two examples are provided below, showing a floating point per units to H conversion, and a fixed point per units to H conversion for faster execution.
Floating point example:

1 uint_least8_t Ls_qFmt = EST_getLs_qFmt(handle);
2 float_t fullScaleInductance = EST_getFullScaleInductance(handle);
3 float_t Ls_d_pu = _IQ30toF(EST_getLs_d_pu(handle));
4 float_t pu_to_h_sf = fullScaleInductance * pow(2.0, 30 - Ls_qFmt);
5 float_t Ls_d_H = Ls_d_pu * pu_to_h_sf;

Another example is to avoid using floating point math for faster execution. In this example the full scale inductance value is calculated using pre-compiler math based on user's parameters in user.h:

1 #define VarShift(var,nshift) (((nshift) < 0) ? ((var)>>(-(nshift))) : ((var)<<(nshift)))
2 
3 #define MATH_PI (3.1415926535897932384626433832795)
4 #define USER_IQ_FULL_SCALE_VOLTAGE_V (300.0)
5 #define USER_IQ_FULL_SCALE_CURRENT_A (10.0)
6 #define USER_VOLTAGE_FILTER_POLE_Hz (335.648)
7 #define USER_VOLTAGE_FILTER_POLE_rps (2.0 * MATH_PI * USER_VOLTAGE_FILTER_POLE_Hz)
8 
9 uint_least8_t Ls_qFmt = EST_getLs_qFmt(handle);
10 _iq fullScaleInductance = _IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/(USER_IQ_FULL_SCALE_CURRENT_A * USER_VOLTAGE_FILTER_POLE_rps));
11 _iq Ls_d_pu = _IQ30toIQ(EST_getLs_d_pu(handle));
12 _iq pu_to_h_sf = VarShift(fullScaleInductance, 30 - Ls_qFmt);
13 _iq Ls_d_H = _IQmpy(Ls_d_pu, pu_to_h_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The full scale resistance value, Henry
float_t EST_getFullScaleResistance ( EST_Handle  handle)

Gets the full scale resistance value used in the estimator in Ohms ( $\Omega$).

There are different ways of getting the resistance used by the estimator. This function helps when converting resistance from per units to Ohms. However, the returned value is in floating point format, so utilizing this full scale value to convert per units to Ohms is not the most efficient way. Two examples are provided below, showing a floating point per units to Ohms conversion, and a fixed point per units to Ohms conversion for faster execution.
Floating point example:

1 uint_least8_t Rs_qFmt = EST_getRs_qFmt(handle);
2 float_t fullScaleResistance = EST_getFullScaleResistance(handle);
3 float_t Rs_pu = _IQ30toF(EST_getRs_pu(handle));
4 float_t pu_to_ohms_sf = fullScaleResistance * pow(2.0, 30 - Rs_qFmt);
5 float_t Rs_Ohms = Rs_pu * pu_to_ohms_sf;

Another example is to avoid using floating point math for faster execution. In this example the full scale resistance value is calculated using pre-compiler math based on user's parameters in user.h:

1 #define VarShift(var,nshift) (((nshift) < 0) ? ((var)>>(-(nshift))) : ((var)<<(nshift)))
2 
3 #define USER_IQ_FULL_SCALE_VOLTAGE_V (300.0)
4 #define USER_IQ_FULL_SCALE_CURRENT_A (10.0)
5 
6 uint_least8_t Rs_qFmt = EST_getRs_qFmt(handle);
7 _iq fullScaleResistance = _IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/USER_IQ_FULL_SCALE_CURRENT_A);
8 _iq Rs_pu = _IQ30toIQ(EST_getRs_pu(handle));
9 _iq pu_to_ohms_sf = VarShift(fullScaleResistance, 30 - Rs_qFmt);
10 _iq Rs_Ohms = _IQmpy(Rs_pu, pu_to_ohms_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The full scale resistance value, Ohm
float_t EST_getFullScaleVoltage ( EST_Handle  handle)

Gets the full scale voltage value used in the estimator in Volts (V).

The value returned by this function is the same as the value defined in user.h When users require to display a value in real world units, i.e. in Volts, this value is used to convert the per unit values of voltage into Volts. The following example shows two different ways of doing this conversion, one using floating point, and the other one using IQ math.

Example using floating point:

1 float_t pu_to_v_sf = EST_getFullScaleVoltage(handle);
2 _iq DcBus_pu = EST_getDcBus_pu(handle);
3 float_t DcBus_V = _IQtoF(DcBus_pu) * pu_to_v_sf;

Example using fixed point:

1 #define USER_IQ_FULL_SCALE_VOLTAGE_V (300.0)
2 
3 _iq pu_to_kv_sf = _IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/1000.0);
4 _iq DcBus_pu = EST_getDcBus_pu(handle);
5 _iq DcBus_kV = _IQmpy(DcBus_pu, pu_to_kv_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The full scale voltage value, V
void EST_getIab_A ( EST_Handle  handle,
MATH_vec2 pIab_A 
)

Gets the Iab current vector in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
[in]pIab_AThe pointer to memory for the Iab vector, A
float_t EST_getIab_beta_lp ( EST_Handle  handle)

Gets the beta value for the Iab low pass filter.

Parameters
[in]handleThe estimator (EST) handle
Returns
The beta value, rad
void EST_getIab_lp_A ( EST_Handle  handle,
MATH_vec2 pIab_lp_A 
)

Gets the low pass filtered Iab current vector in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
[in]pIab_lp_AThe pointer to memory for the low pass filtered Iab vector, A
void EST_getIab_pu ( EST_Handle  handle,
MATH_vec2 pIab 
)

Gets the Iab current vector in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
[in]pIabThe pointer to memory for the Iab vector, pu
void EST_getIdq_A ( EST_Handle  handle,
MATH_vec2 pIdq_A 
)

Gets the Idq current vector in Ampere (A)

Parameters
[in]handleThe estimator (EST) handle
[in]pIdq_AThe pointer to memory for the Idq vector, A
void EST_getIdq_lp_A ( EST_Handle  handle,
MATH_vec2 pIdq_lp_A 
)

Gets the Idq low pass filtered current vector in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
[in]pIdq_lp_AThe pointer to memory for the Idq low pass filtered vector, A
void EST_getIdq_ref_A ( EST_Handle  handle,
MATH_vec2 pIdq_ref_A 
)

Gets the Idq current vector reference in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
[in]pIdq_ref_AThe pointer to memory for the Idq vector reference, A
float_t EST_getIdRated ( EST_Handle  handle)

Gets the Id rated current value from the estimator in Amperes (A).

Parameters
[in]handleThe estimator (EST) handle
Returns
The Id rated current value, A
float_t EST_getIdRated_A ( EST_Handle  handle)

Gets the Id rated current value from the estimator in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
Returns
The Id rated current value, A
float_t EST_getIdRated_delta_A ( EST_Handle  handle)

Gets the Id rated delta current value from the estimator in Ampere (A)

Parameters
[in]handleThe estimator (EST) handle
Returns
The delta Id rated current value, A
float_t EST_getIdRated_indEst_A ( EST_Handle  handle)

Gets the Id current value used for inductance estimation of induction motors in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
Returns
The Id rated value, A
_iq EST_getIdRated_indEst_pu ( EST_Handle  handle)

Gets the Id current value used for inductance estimation of induction motors in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
Returns
The Id rated value, pu
_iq EST_getIdRated_pu ( EST_Handle  handle)

Gets the Id rated current value from the estimator in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
Returns
The Id rated current value, pu
_iq EST_getIdRated_ratedFlux_pu ( EST_Handle  handle)

Gets the Id current value used for flux estimation of induction motors in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
Returns
The Id rated value, pu
float_t EST_getIntValue_Id_A ( EST_Handle  handle)

Gets the intermediate value from the Id trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The intermediate value, A
float_t EST_getIntValue_Iq_A ( EST_Handle  handle)

Gets the intermediate value from the Iq trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The intermediate value, A
float_t EST_getIntValue_spd_Hz ( EST_Handle  handle)

Gets the intermediate value from the speed trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The intermediate value, Hz
float_t EST_getLhf_H ( EST_Handle  handle)

Gets the Lhf value from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The Lhf value, H
float_t EST_getLmag_H ( EST_Handle  handle)

Gets the magnetizing inductance value in Henry (H).

Parameters
[in]handleThe estimator (EST) handle
Returns
The magnetizing inductance value, H
float_t EST_getLr_H ( EST_Handle  handle)

Gets the rotor inductance value in Henries (H).

Parameters
[in]handleThe estimator (EST) handle
Returns
The rotor inductance value, Henry
_iq EST_getLr_pu ( EST_Handle  handle)

Gets the rotor inductance value in per unit (pu), IQ30.

The per units value of the rotor inductance can be used as an alternative way of calculating the rotor inductance of an induction motor using fixed point math. An example showing how this is done is shown here:

1 #define VarShift(var,nshift) (((nshift) < 0) ? ((var)>>(-(nshift))) : ((var)<<(nshift)))
2 
3 #define MATH_PI (3.1415926535897932384626433832795)
4 #define USER_IQ_FULL_SCALE_VOLTAGE_V (300.0)
5 #define USER_IQ_FULL_SCALE_CURRENT_A (10.0)
6 #define USER_VOLTAGE_FILTER_POLE_Hz (335.648)
7 #define USER_VOLTAGE_FILTER_POLE_rps (2.0 * MATH_PI * USER_VOLTAGE_FILTER_POLE_Hz)
8 
9 uint_least8_t Lr_qFmt = EST_getLr_qFmt(handle);
10 _iq fullScaleInductance = _IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/(USER_IQ_FULL_SCALE_CURRENT_A * USER_VOLTAGE_FILTER_POLE_rps));
11 _iq Lr_pu = _IQ30toIQ(EST_getLr_pu(handle));
12 _iq pu_to_h_sf = VarShift(fullScaleInductance, 30 - Lr_qFmt);
13 _iq Lr_H = _IQmpy(Lr_pu, pu_to_h_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The rotor inductance value, pu
uint_least8_t EST_getLr_qFmt ( EST_Handle  handle)

Gets the rotor inductance Q format in 8 bit unsigned integer (uint_least8_t).

When the motor is identified by the estimator, the Q format is used to have a wider range of the identified parameter. This Q format is the difference between the actual Q format used for the identification and IQ30 which is used internaly during identification of the motor parameters. To understand how this Q format can be used in user's code, please refer to the following example, which converts a per units value read from the estimator to Henries:

1 #define VarShift(var,nshift) (((nshift) < 0) ? ((var)>>(-(nshift))) : ((var)<<(nshift)))
2 
3 #define MATH_PI (3.1415926535897932384626433832795)
4 #define USER_IQ_FULL_SCALE_VOLTAGE_V (300.0)
5 #define USER_IQ_FULL_SCALE_CURRENT_A (10.0)
6 #define USER_VOLTAGE_FILTER_POLE_Hz (335.648)
7 #define USER_VOLTAGE_FILTER_POLE_rps (2.0 * MATH_PI * USER_VOLTAGE_FILTER_POLE_Hz)
8 
9 uint_least8_t Lr_qFmt = EST_getLr_qFmt(handle);
10 _iq fullScaleInductance = _IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/(USER_IQ_FULL_SCALE_CURRENT_A * USER_VOLTAGE_FILTER_POLE_rps));
11 _iq Lr_pu = _IQ30toIQ(EST_getLr_pu(handle));
12 _iq pu_to_h_sf = VarShift(fullScaleInductance, 30 - Lr_qFmt);
13 _iq Lr_H = _IQmpy(Lr_pu, pu_to_h_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The rotor inductance value Q format
_iq EST_getLs_coarse_max_pu ( EST_Handle  handle)

Gets the maximum stator inductance value during coarse estimation in the stator inductance estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The maximum stator inductance value, pu

Referenced by USER_softwareUpdate1p6().

float_t EST_getLs_coarseDelta_H ( EST_Handle  handle)

Gets the delta stator inductance value during coarse estimation.

Parameters
[in]handleThe estimator (EST) handle
Returns
The delta stator inductance value for coarse estimation, H
float_t EST_getLs_d_H ( EST_Handle  handle)

Gets the direct stator inductance value in Henries (H).

Gets the direct stator inductance value in Henry (H).

Parameters
[in]handleThe estimator (EST) handle
Returns
The direct stator inductance value
Parameters
[in]handleThe estimator (EST) handle
Returns
The direct stator inductance value, H

Referenced by USER_calcPIgains().

_iq EST_getLs_d_pu ( EST_Handle  handle)

Gets the direct stator inductance value in per unit (pu), IQ30.

The per units value of the direct stator inductance can be used as an alternative way of calculating the direct stator inductance of a permanent magnet motor using fixed point math. An example showing how this is done is shown here:

1 #define VarShift(var,nshift) (((nshift) < 0) ? ((var)>>(-(nshift))) : ((var)<<(nshift)))
2 
3 #define MATH_PI (3.1415926535897932384626433832795)
4 #define USER_IQ_FULL_SCALE_VOLTAGE_V (300.0)
5 #define USER_IQ_FULL_SCALE_CURRENT_A (10.0)
6 #define USER_VOLTAGE_FILTER_POLE_Hz (335.648)
7 #define USER_VOLTAGE_FILTER_POLE_rps (2.0 * MATH_PI * USER_VOLTAGE_FILTER_POLE_Hz)
8 
9 uint_least8_t Ls_qFmt = EST_getLs_qFmt(handle);
10 _iq fullScaleInductance = _IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/(USER_IQ_FULL_SCALE_CURRENT_A * USER_VOLTAGE_FILTER_POLE_rps));
11 _iq Ls_d_pu = _IQ30toIQ(EST_getLs_d_pu(handle));
12 _iq pu_to_h_sf = VarShift(fullScaleInductance, 30 - Ls_qFmt);
13 _iq Ls_d_H = _IQmpy(Ls_d_pu, pu_to_h_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The direct stator inductance value, pu

Referenced by USER_computeTorque_lbin(), and USER_computeTorque_Nm().

_iq EST_getLs_delta_pu ( EST_Handle  handle)

Gets the delta stator inductance value in the stator inductance estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The delta stator inductance value, pu
void EST_getLs_dq_H ( EST_Handle  handle,
MATH_vec2 pLs_dq_H 
)

Gets the direct/quadrature stator inductance values from the estimator in Henry (H).

Both direct and quadrature stator inductances can be read from the estimator by using this function call and passing a pointer to a structure where these two values will be stored.

Parameters
[in]handleThe estimator (EST) handle
[out]pLs_dq_HThe pointer to the vector of direct/quadrature stator inductance values, H
void EST_getLs_dq_pu ( EST_Handle  handle,
MATH_vec2 pLs_dq_pu 
)

Gets the direct/quadrature stator inductance vector values from the estimator in per unit (pu), IQ30.

Both direct and quadrature stator inductances can be read from the estimator by using this function call and passing a pointer to a structure where these two values will be stored.

Parameters
[in]handleThe estimator (EST) handle
[out]pLs_dq_puThe pointer for the direct/quadrature stator inductance vector values, pu
float_t EST_getLs_fineDelta_H ( EST_Handle  handle)

Gets the delta stator inductance value during fine estimation.

Parameters
[in]handleThe estimator (EST) handle
Returns
The delta stator inductance value for fine estimation, H
float_t EST_getLs_H ( EST_Handle  handle)

Gets the stator inductance value in Henry (H)

Parameters
[in]handleThe estimator (EST) handle
Returns
The stator inductance value, H
_iq EST_getLs_max_pu ( EST_Handle  handle)

Gets the maximum stator inductance value from the stator inductance estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The maximum stator inductance value, pu
_iq EST_getLs_min_pu ( EST_Handle  handle)

Gets the minimum stator inductance value from the stator inductance estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The minimum stator inductance value, pu
float_t EST_getLs_q_H ( EST_Handle  handle)

Gets the stator inductance value in the quadrature coordinate direction in Henries (H).

Gets the stator inductance value in the quadrature coordinate direction in Henry (H).

Parameters
[in]handleThe estimator (EST) handle
Returns
The stator inductance value
Parameters
[in]handleThe estimator (EST) handle
Returns
The stator inductance value, H

Referenced by USER_calcPIgains().

_iq EST_getLs_q_pu ( EST_Handle  handle)

Gets the stator inductance value in the quadrature coordinate direction in per unit (pu), IQ30.

The per units value of the quadrature stator inductance can be used as an alternative way of calculating the quadrature stator inductance of a permanent magnet motor using fixed point math. An example showing how this is done is shown here:

1 #define VarShift(var,nshift) (((nshift) < 0) ? ((var)>>(-(nshift))) : ((var)<<(nshift)))
2 
3 #define MATH_PI (3.1415926535897932384626433832795)
4 #define USER_IQ_FULL_SCALE_VOLTAGE_V (300.0)
5 #define USER_IQ_FULL_SCALE_CURRENT_A (10.0)
6 #define USER_VOLTAGE_FILTER_POLE_Hz (335.648)
7 #define USER_VOLTAGE_FILTER_POLE_rps (2.0 * MATH_PI * USER_VOLTAGE_FILTER_POLE_Hz)
8 
9 uint_least8_t Ls_qFmt = EST_getLs_qFmt(handle);
10 _iq fullScaleInductance = _IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/(USER_IQ_FULL_SCALE_CURRENT_A * USER_VOLTAGE_FILTER_POLE_rps));
11 _iq Ls_q_pu = _IQ30toIQ(EST_getLs_q_pu(handle));
12 _iq pu_to_h_sf = VarShift(fullScaleInductance, 30 - Ls_qFmt);
13 _iq Ls_q_H = _IQmpy(Ls_q_pu, pu_to_h_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The stator inductance value, pu

Referenced by USER_computeTorque_lbin(), and USER_computeTorque_Nm().

uint_least8_t EST_getLs_qFmt ( EST_Handle  handle)

Gets the stator inductance Q format in 8 bit unsigned integer (uint_least8_t).

When the motor is identified by the estimator, the Q format is used to have a wider range of the identified parameter. This Q format is the difference between the actual Q format used for the identification and IQ30 which is used internaly during identification of the motor parameters. To understand how this Q format can be used in user's code, please refer to the following example, which converts a per units value read from the estimator to Henries:

1 #define VarShift(var,nshift) (((nshift) < 0) ? ((var)>>(-(nshift))) : ((var)<<(nshift)))
2 
3 #define MATH_PI (3.1415926535897932384626433832795)
4 #define USER_IQ_FULL_SCALE_VOLTAGE_V (300.0)
5 #define USER_IQ_FULL_SCALE_CURRENT_A (10.0)
6 #define USER_VOLTAGE_FILTER_POLE_Hz (335.648)
7 #define USER_VOLTAGE_FILTER_POLE_rps (2.0 * MATH_PI * USER_VOLTAGE_FILTER_POLE_Hz)
8 
9 uint_least8_t Ls_qFmt = EST_getLs_qFmt(handle);
10 _iq fullScaleInductance = _IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/(USER_IQ_FULL_SCALE_CURRENT_A * USER_VOLTAGE_FILTER_POLE_rps));
11 _iq Ls_q_pu = _IQ30toIQ(EST_getLs_q_pu(handle));
12 _iq pu_to_h_sf = VarShift(fullScaleInductance, 30 - Ls_qFmt);
13 _iq Ls_q_H = _IQmpy(Ls_q_pu, pu_to_h_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The stator inductance Q format
_iq EST_getMaxAccel_est_pu ( EST_Handle  handle)

Gets the maximum estimation acceleration value used in the estimator in per unit (pu), IQ24.

The maximum acceleration is a setting of the trajectory module, which sets the speed reference. The acceleration returned by this function call is used during the motor identification process. This value represents how the speed reference is increased or decreased from an initial value to a target value. The following example shows how convert the returned value of this function to kilo Hertz per Second (kHz/s) and kilo RPM per second (kRPM/s):

1 #define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
2 #define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK (10)
3 #define USER_PWM_FREQ_kHz (15.0)
4 #define USER_ISR_FREQ_Hz (USER_PWM_FREQ_kHz * 1000.0)
5 #define USER_CTRL_FREQ_Hz (uint_least32_t)(USER_ISR_FREQ_Hz/USER_NUM_ISR_TICKS_PER_CTRL_TICK)
6 #define USER_TRAJ_FREQ_Hz (uint_least32_t)(USER_CTRL_FREQ_Hz/USER_NUM_CTRL_TICKS_PER_TRAJ_TICK)
7 #define USER_IQ_FULL_SCALE_FREQ_Hz (500.0)
8 #define USER_MOTOR_NUM_POLE_PAIRS (4)
9 
10 _iq pu_to_khzps_sf = _IQ((float_t)USER_TRAJ_FREQ_Hz * USER_IQ_FULL_SCALE_FREQ_Hz / 1000.0);
11 _iq khzps_to_krpmps_sf = _IQ(60.0 / (float_t)USER_MOTOR_NUM_POLE_PAIRS);
12 
13 _iq est_Accel_pu = EST_getMaxAccel_est_pu(handle);
14 _iq est_Accel_kilo_hz_per_sec = _IQmpy(est_Accel_pu, pu_to_khzps_sf);
15 _iq est_Accel_kilo_rpm_per_sec = _IQmpy(est_Accel_kilo_hz_per_sec, khzps_to_krpmps_sf);

The default value is set by a user's defined value in user.h, and the default value in per units is calculated internally as follows:

1 #define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
2 #define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK (10)
3 #define USER_PWM_FREQ_kHz (15.0)
4 #define USER_ISR_FREQ_Hz (USER_PWM_FREQ_kHz * 1000.0)
5 #define USER_CTRL_FREQ_Hz (uint_least32_t)(USER_ISR_FREQ_Hz/USER_NUM_ISR_TICKS_PER_CTRL_TICK)
6 #define USER_TRAJ_FREQ_Hz (uint_least32_t)(USER_CTRL_FREQ_Hz/USER_NUM_CTRL_TICKS_PER_TRAJ_TICK)
7 #define USER_IQ_FULL_SCALE_FREQ_Hz (500.0)
8 #define USER_MAX_ACCEL_EST_Hzps (2.0)
9 
10 _iq hzps_to_pu_sf = _IQ(1.0 / ((float_t)USER_TRAJ_FREQ_Hz * USER_IQ_FULL_SCALE_FREQ_Hz));
11 
12 _iq est_Accel_hertz_per_sec = _IQ(USER_MAX_ACCEL_EST_Hzps);
13 _iq est_Accel_pu = _IQmpy(est_Accel_hertz_per_sec, hzps_to_pu_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The maximum estimation acceleration value, pu
_iq EST_getMaxAccel_pu ( EST_Handle  handle)

Gets the maximum acceleration value used in the estimator in per unit (pu), IQ24.

The maximum acceleration is a setting of the trajectory module, which sets the speed reference. The acceleration returned by this function call is used after the motor has been identified. This value represents how the speed reference is increased or decreased from an initial value to a target value. The following example shows how convert the returned value of this function to kilo Hertz per second (kHz/s) and kilo RPM per second (kRPM/s):

1 #define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
2 #define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK (10)
3 #define USER_PWM_FREQ_kHz (15.0)
4 #define USER_ISR_FREQ_Hz (USER_PWM_FREQ_kHz * 1000.0)
5 #define USER_CTRL_FREQ_Hz (uint_least32_t)(USER_ISR_FREQ_Hz/USER_NUM_ISR_TICKS_PER_CTRL_TICK)
6 #define USER_TRAJ_FREQ_Hz (uint_least32_t)(USER_CTRL_FREQ_Hz/USER_NUM_CTRL_TICKS_PER_TRAJ_TICK)
7 #define USER_IQ_FULL_SCALE_FREQ_Hz (500.0)
8 #define USER_MOTOR_NUM_POLE_PAIRS (4)
9 
10 _iq pu_to_khzps_sf = _IQ((float_t)USER_TRAJ_FREQ_Hz * USER_IQ_FULL_SCALE_FREQ_Hz / 1000.0);
11 _iq khzps_to_krpmps_sf = _IQ(60.0 / (float_t)USER_MOTOR_NUM_POLE_PAIRS);
12 
13 _iq Accel_pu = EST_getMaxAccel_pu(handle);
14 _iq Accel_kilo_hz_per_sec = _IQmpy(Accel_pu, pu_to_khzps_sf);
15 _iq Accel_kilo_rpm_per_sec = _IQmpy(Accel_kilo_hz_per_sec, khzps_to_krpmps_sf);

The default value is set by a user's defined value in user.h, and the default value in per units is calculated internally as follows:

1 #define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
2 #define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK (10)
3 #define USER_PWM_FREQ_kHz (15.0)
4 #define USER_ISR_FREQ_Hz (USER_PWM_FREQ_kHz * 1000.0)
5 #define USER_CTRL_FREQ_Hz (uint_least32_t)(USER_ISR_FREQ_Hz/USER_NUM_ISR_TICKS_PER_CTRL_TICK)
6 #define USER_TRAJ_FREQ_Hz (uint_least32_t)(USER_CTRL_FREQ_Hz/USER_NUM_CTRL_TICKS_PER_TRAJ_TICK)
7 #define USER_IQ_FULL_SCALE_FREQ_Hz (500.0)
8 #define USER_MAX_ACCEL_Hzps (20.0)
9 
10 _iq hzps_to_pu_sf = _IQ(1.0 / ((float_t)USER_TRAJ_FREQ_Hz * USER_IQ_FULL_SCALE_FREQ_Hz));
11 
12 _iq Accel_hertz_per_sec = _IQ(USER_MAX_ACCEL_Hzps);
13 _iq Accel_pu = _IQmpy(Accel_hertz_per_sec, hzps_to_pu_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The maximum acceleration value, pu
float_t EST_getMaxCurrentDelta_A ( EST_Handle  handle)

Gets the maximum current slope value used in the estimator in Amperes (A).

Parameters
[in]handleThe estimator (EST) handle
Returns
The maximum current delta value, A
float_t EST_getMaxCurrentDelta_pw_A ( EST_Handle  handle)

Gets the maximum power warp current slope value used in the estimator in Amperes (A).

Parameters
[in]handleThe estimator (EST) handle
Returns
The maximum power warp current delta value, A
_iq EST_getMaxCurrentSlope_epl_pu ( EST_Handle  handle)

Gets the maximum EPL (Efficient Partial Load) current slope value used in the estimator in per unit (pu), IQ24.

Gets the slope of Id reference change when efficient partial load is enabled. This mode only applies to induction motors. The following example shows how to convert the returned value into kilo Amperes per second (kA/s):

1 #define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
2 #define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK (10)
3 #define USER_PWM_FREQ_kHz (15.0)
4 #define USER_ISR_FREQ_Hz (USER_PWM_FREQ_kHz * 1000.0)
5 #define USER_CTRL_FREQ_Hz (uint_least32_t)(USER_ISR_FREQ_Hz/USER_NUM_ISR_TICKS_PER_CTRL_TICK)
6 #define USER_TRAJ_FREQ_Hz (uint_least32_t)(USER_CTRL_FREQ_Hz/USER_NUM_CTRL_TICKS_PER_TRAJ_TICK)
7 #define USER_IQ_FULL_SCALE_CURRENT_A (10.0)
8 
9 _iq pu_to_kA_per_sec_sf = _IQ((float_t)USER_TRAJ_FREQ_Hz * USER_IQ_FULL_SCALE_CURRENT_A / 1000.0);
10 
11 _iq currentSlope_epl_pu = EST_getMaxCurrentSlope_epl_pu(handle);
12 _iq currentSlope_epl_kAps = _IQmpy(currentSlope_epl_pu, pu_to_kA_per_sec_sf);

The default value is set by a user's defined value in user.h, and the default value in per units is calculated internally as follows:

1 #define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
2 #define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK (10)
3 #define USER_PWM_FREQ_kHz (15.0)
4 #define USER_ISR_FREQ_Hz (USER_PWM_FREQ_kHz * 1000.0)
5 #define USER_CTRL_FREQ_Hz (uint_least32_t)(USER_ISR_FREQ_Hz/USER_NUM_ISR_TICKS_PER_CTRL_TICK)
6 #define USER_TRAJ_FREQ_Hz (uint_least32_t)(USER_CTRL_FREQ_Hz/USER_NUM_CTRL_TICKS_PER_TRAJ_TICK)
7 #define USER_IQ_FULL_SCALE_CURRENT_A (10.0)
8 #define USER_MOTOR_RES_EST_CURRENT (1.0)
9 
10 _iq A_per_sec_to_pu_sf = _IQ(1.0 / ((float_t)USER_TRAJ_FREQ_Hz * USER_IQ_FULL_SCALE_CURRENT_A));
11 
12 _iq currentSlope_epl_Aps = _IQ(0.3 * USER_MOTOR_RES_EST_CURRENT);
13 _iq currentSlope_epl_pu = _IQmpy(currentSlope_epl_Aps, A_per_sec_to_pu_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The maximum EPL current slope value, pu
_iq EST_getMaxCurrentSlope_pu ( EST_Handle  handle)

Gets the maximum current slope value used in the estimator in per unit (pu), IQ24.

Gets the slope of Id reference. The following example shows how to convert the returned value into kilo Amperes per second (kA/s):

1 #define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
2 #define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK (10)
3 #define USER_PWM_FREQ_kHz (15.0)
4 #define USER_ISR_FREQ_Hz (USER_PWM_FREQ_kHz * 1000.0)
5 #define USER_CTRL_FREQ_Hz (uint_least32_t)(USER_ISR_FREQ_Hz/USER_NUM_ISR_TICKS_PER_CTRL_TICK)
6 #define USER_TRAJ_FREQ_Hz (uint_least32_t)(USER_CTRL_FREQ_Hz/USER_NUM_CTRL_TICKS_PER_TRAJ_TICK)
7 #define USER_IQ_FULL_SCALE_CURRENT_A (10.0)
8 
9 _iq pu_to_kA_per_sec_sf = _IQ((float_t)USER_TRAJ_FREQ_Hz * USER_IQ_FULL_SCALE_CURRENT_A / 1000.0);
10 
11 _iq currentSlope_pu = EST_getMaxCurrentSlope_pu(handle);
12 _iq currentSlope_kAps = _IQmpy(currentSlope_pu, pu_to_kA_per_sec_sf);

The default value is set by a user's defined value in user.h, and the default value in per units is calculated internally as follows:

1 #define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
2 #define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK (10)
3 #define USER_PWM_FREQ_kHz (15.0)
4 #define USER_ISR_FREQ_Hz (USER_PWM_FREQ_kHz * 1000.0)
5 #define USER_CTRL_FREQ_Hz (uint_least32_t)(USER_ISR_FREQ_Hz/USER_NUM_ISR_TICKS_PER_CTRL_TICK)
6 #define USER_TRAJ_FREQ_Hz (uint_least32_t)(USER_CTRL_FREQ_Hz/USER_NUM_CTRL_TICKS_PER_TRAJ_TICK)
7 #define USER_IQ_FULL_SCALE_CURRENT_A (10.0)
8 #define USER_MOTOR_RES_EST_CURRENT (1.0)
9 
10 _iq A_per_sec_to_pu_sf = _IQ(1.0 / ((float_t)USER_TRAJ_FREQ_Hz * USER_IQ_FULL_SCALE_CURRENT_A));
11 
12 _iq currentSlope_Aps = _IQ(USER_MOTOR_RES_EST_CURRENT);
13 _iq currentSlope_pu = _IQmpy(currentSlope_Aps, A_per_sec_to_pu_sf);
Parameters
[in]handleThe estimator (EST) handle
Returns
The maximum current slope value, pu
float_t EST_getMaxDelta_Id_A ( EST_Handle  handle)

Gets the maximum delta value from the Id trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The maximum delta value, A
float_t EST_getMaxDelta_Iq_A ( EST_Handle  handle)

Gets the maximum delta value from the Iq trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The maximum delta value, A
float_t EST_getMaxDelta_spd_Hz ( EST_Handle  handle)

Gets the maximum delta value from the speed trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The maximum delta value, Hz
float_t EST_getMaxSpeedDelta_Hz ( EST_Handle  handle)

Gets the maximum acceleration value used in the estimator in Hertz (Hz).

Parameters
[in]handleThe estimator (EST) handle
Returns
The maximum speed delta value, Hz
float_t EST_getMaxValue_Id_A ( EST_Handle  handle)

Gets the maximum value from the Id trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The maximum value, A
float_t EST_getMaxValue_Iq_A ( EST_Handle  handle)

Gets the maximum value from the Iq trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The maximum value, A
float_t EST_getMaxValue_spd_Hz ( EST_Handle  handle)

Gets the maximum value from the speed trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The maximum value, Hz
float_t EST_getMinValue_Id_A ( EST_Handle  handle)

Gets the minimum value from the Id trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The minimum value, A
float_t EST_getMinValue_Iq_A ( EST_Handle  handle)

Gets the minimum value from the Iq trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The minimum value, A
float_t EST_getMinValue_spd_Hz ( EST_Handle  handle)

Gets the minimum value from the speed trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The minimum value, Hz
int_least16_t EST_getNumIsrTicksPerEstTick ( EST_Handle  handle)

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

Parameters
[in]handleThe estimator (EST) handle
Returns
The number of Interrupt Service Routine (ISR) clock ticks per estimator clock tick
int_least16_t EST_getNumIsrTicksPerTrajTick ( EST_Handle  handle)

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

Parameters
[in]handleThe estimator (EST) handle
Returns
The number of Interrupt Service Routine (ISR) clock ticks per estimator trajectory clock tick
float_t EST_getOneOverDcBus_invV ( EST_Handle  handle)

Gets the inverse of the DC bus voltage in 1/Volt (1/V).

Parameters
[in]handleThe estimator (EST) handle
Returns
The inverse of the DC bus voltage, 1/V
_iq EST_getOneOverDcBus_pu ( EST_Handle  handle)

Gets the inverse of the DC bus voltage in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
Returns
The inverse of the DC bus voltage, pu

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

float_t EST_getPwGain ( EST_Handle  handle)

Gets the power warp gain from the trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The power warp gain, unitless
float_t EST_getRhf_Ohm ( EST_Handle  handle)

Gets the Rhf value from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The Rhf value, Ohm
float_t EST_getRoverL_rps ( EST_Handle  handle)

Gets the R/L value from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The R/L value, rad/sec
float_t EST_getRr_coarseDelta_Ohm ( EST_Handle  handle)

Gets the coarse delta rotor resistance value from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The coarse delta rotor resistance value, Ohm
float_t EST_getRr_d_Ohm ( EST_Handle  handle)

Gets the direct rotor resistance value in Ohm ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
Returns
The direct rotor resistance value, Ohm
void EST_getRr_dq_Ohm ( EST_Handle  handle,
MATH_vec2 pRr_dq_Ohm 
)

Gets the direct/quadrature rotor resistance values from the estimator in Ohms ( $\Omega$).

Both direct and quadrature rotor resistances can be read from the estimator by using this function call and passing a pointer to a structure where these two values will be stored.

Parameters
[in]handleThe estimator (EST) handle
[out]pRr_dq_OhmThe pointer to the vector of direct/quadrature rotor resistance values, Ohm
float_t EST_getRr_fineDelta_Ohm ( EST_Handle  handle)

Gets the fine delta rotor resistance value from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The fine delta rotor resistance value, Ohm
float_t EST_getRr_Ohm ( EST_Handle  handle)

Gets the rotor resistance value in Ohms ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
Returns
The rotor resistance value, Ohm
_iq EST_getRr_pu ( EST_Handle  handle)

Gets the rotor resistance value in per unit (pu), IQ30.

Parameters
[in]handleThe estimator (EST) handle
Returns
The rotor resistance value, pu
float_t EST_getRr_q_Ohm ( EST_Handle  handle)

Gets the quadrature rotor resistance value in Ohms ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
Returns
The quadrature rotor resistance value, Ohm
uint_least8_t EST_getRr_qFmt ( EST_Handle  handle)

Gets the rotor resistance Q format in 8 bit unsigned integer (uint_least8_t).

Parameters
[in]handleThe estimator (EST) handle
Returns
The rotor resistance Q format
float_t EST_getRs_a_Ohm ( EST_Handle  handle)

Gets the alpha stator resistance value in Ohms ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
Returns
The alpha stator resistance value, Ohm
void EST_getRs_ab_Ohm ( EST_Handle  handle,
MATH_vec2 pRs_ab_Ohm 
)

Gets the alpha/beta stator resistance values from the estimator in Ohms ( $\Omega$).

Both alpha and beta stator resistances can be read from the estimator by using this function call and passing a pointer to a structure where these two values will be stored.

Parameters
[in]handleThe estimator (EST) handle
[out]pRs_ab_OhmThe pointer to the vector of alpha/beta stator resistance values, Ohm
float_t EST_getRs_b_Ohm ( EST_Handle  handle)

Gets the beta stator resistance value in Ohms ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
Returns
The beta stator resistance value, Ohm
float_t EST_getRs_coarseDelta_Ohm ( EST_Handle  handle)

Gets the coarse delta stator resistance value from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The coarse delta stator resistance value, Ohm
float_t EST_getRs_d_Ohm ( EST_Handle  handle)

Gets the direct stator resistance value in Ohms ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
Returns
The direct stator resistance value, Ohm
_iq EST_getRs_delta_pu ( EST_Handle  handle)

Gets the delta stator resistance value from the stator resistance estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The delta stator resistance value, pu
void EST_getRs_dq_Ohm ( EST_Handle  handle,
MATH_vec2 pRs_dq_Ohm 
)

Gets the direct/quadrature stator resistance values from the estimator in Ohms ( $\Omega$).

Both direct and quadrature stator resistances can be read from the estimator by using this function call and passing a pointer to a structure where these two values will be stored.

Parameters
[in]handleThe estimator (EST) handle
[out]pRs_dq_OhmThe pointer to the vector of direct/quadrature stator resistance values, Ohm
float_t EST_getRs_fineDelta_Ohm ( EST_Handle  handle)

Gets the fine delta stator resistance value from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The delta stator resistance value, Ohm
float_t EST_getRs_Ohm ( EST_Handle  handle)

Gets the stator resistance value in Ohms ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
Returns
The stator resistance value, Ohm

Referenced by USER_calcPIgains().

_iq EST_getRs_pu ( EST_Handle  handle)

Gets the stator resistance value in per unit (pu), IQ30.

Parameters
[in]handleThe estimator (EST) handle
Returns
The stator resistance value, pu
float_t EST_getRs_q_Ohm ( EST_Handle  handle)

Gets the quadrature stator resistance value in Ohms ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
Returns
The quadrature stator resistance value, Ohm
uint_least8_t EST_getRs_qFmt ( EST_Handle  handle)

Gets the stator resistance Q format in 8 bit unsigned integer (uint_least8_t).

Parameters
[in]handleThe estimator (EST) handle
Returns
The stator resistance Q format
float_t EST_getRsOnLine_Ohm ( EST_Handle  handle)

Gets the online stator resistance value in Ohms ( $\Omega$).

Gets the online stator resistance value in Ohm ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
Returns
The online stator resistance value, Ohm
_iq EST_getRsOnLine_pu ( EST_Handle  handle)

Gets the online stator resistance value in per unit (pu), IQ30.

Parameters
[in]handleThe estimator (EST) handle
Returns
The online stator resistance value, pu
uint_least8_t EST_getRsOnLine_qFmt ( EST_Handle  handle)

Gets the online stator resistance Q format in 8 bit unsigned integer (uint_least8_t).

Parameters
[in]handleThe estimator (EST) handle
Returns
The online stator resistance Q format
float_t EST_getRsOnLineAngle_rad ( EST_Handle  handle)

Gets the angle value from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The angle value, rad
float_t EST_getRsOnLineAngleDelta_rad ( EST_Handle  handle)

Gets the delta angle value from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The delta angle value, rad
void EST_getRsOnLineFilterParams ( EST_Handle  handle,
const EST_RsOnLineFilterType_e  filterType,
_iq pFilter_0_b0,
_iq pFilter_0_a1,
_iq pFilter_0_y1,
_iq pFilter_1_b0,
_iq pFilter_1_a1,
_iq pFilter_1_y1 
)

Gets the online stator resistance filter parameters in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
[in]filterTypeThe filter type
[in]pFilter_0_b0The pointer for the filter 0 numerator coefficient value for z^0
[in]pFilter_0_a1The pointer for the filter 0 denominator coefficient value for z^(-1)
[in]pFilter_0_y1The pointer for the filter 0 output value at time sample n=-1
[in]pFilter_1_b0The pointer for the filter 1 numerator coefficient value for z^0
[in]pFilter_1_a1The pointer for the filter 1 denominator coefficient value for z^(-1)
[in]pFilter_1_y1The pointer for the filter 1 output value at time sample n=-1
float_t EST_getRsOnLineId_A ( EST_Handle  handle)

Gets the Id value used for online stator resistance estimation in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
Returns
The Id value, A
float_t EST_getRsOnLineId_mag_A ( EST_Handle  handle)

Gets the Id magnitude value used for online stator resistance estimation in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
Returns
The Id magnitude value, A
_iq EST_getRsOnLineId_mag_pu ( EST_Handle  handle)

Gets the Id magnitude value used for online stator resistance estimation in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
Returns
The Id magnitude value, pu
_iq EST_getRsOnLineId_pu ( EST_Handle  handle)

Gets the Id value used for online stator resistance estimation in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
Returns
The Id value, pu
void EST_getRsOnLineLpFilterParams ( EST_Handle  handle,
const EST_RsOnLineFilterType_e  filterType,
const uint_least8_t  filterNumber,
float_t b0,
float_t b1,
float_t a1,
float_t x1,
float_t y1 
)

Gets the online stator resistance filter parameters.

Parameters
[in]handleThe estimator (EST) handle
[in]filterTypeThe filter type
[in]filterNumberThe filter number
[in]b0The pointer for the numerator coefficient value for z^0
[in]b1The pointer for the numerator coefficient value for z^(-1)
[in]a1The pointer for the denominator coefficient value for z^(-1)
[in]x1The pointer for the input value at time sample n=-1
[in]y1The pointer for the output value at time sample n=-1
int_least8_t EST_getSignOfDirection ( EST_Handle  handle)

Gets the sign of the direction value in 8 bit signed integer (int_least8_t).

Parameters
[in]handleThe estimator (EST) handle
Returns
The sign of the direction value (-1 for negative, 1 for positive)
_iq EST_getSpeed_krpm ( EST_Handle  handle)

Gets the speed value in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
Returns
The speed value, krpm
float_t EST_getSpeed_ref_Hz ( EST_Handle  handle)

Gets the reference speed value from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The reference speed value, Hz
float_t EST_getSpeed_rpm ( EST_Handle  handle)

Gets the speed value in revolutions per second (rpm).

Parameters
[in]handleThe estimator (EST) handle
Returns
The speed value, rpm
EST_State_e EST_getState ( EST_Handle  handle)

Gets the state of the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The estimator state

Referenced by CTRL_run().

float_t EST_getTargetValue_Id_A ( EST_Handle  handle)

Gets the target value from the Id trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The target value, A
float_t EST_getTargetValue_Iq_A ( EST_Handle  handle)

Gets the target value from the Iq trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The target value, A
float_t EST_getTargetValue_spd_Hz ( EST_Handle  handle)

Gets the target value from the speed trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The target value, Hz
_iq EST_getTorque_lbin ( EST_Handle  handle)

Gets the torque value in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
Returns
The torque value, lb*in
_iq EST_getTorque_Nm ( EST_Handle  handle)

Gets the torque value in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
Returns
The torque value, N*m
float_t EST_getTorque_sf ( EST_Handle  handle)

Gets the torque scale factor for the torque equation.

Parameters
[in]handleThe estimator (EST) handle
Returns
The torque scale factor
int_least16_t EST_getTrajCount_isr ( EST_Handle  handle)

Gets the trajectory ISR count from the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
The trajectory count value
EST_Traj_State_e EST_getTrajState ( EST_Handle  handle)

Gets the trajectory generator state.

Parameters
[in]handleThe estimator (EST) handle
Returns
The state
void EST_getVab_V ( EST_Handle  handle,
MATH_vec2 pVab_V 
)

Gets the Vab voltage vector in Volts (V)

Parameters
[in]handleThe estimator (EST) handle
[in]pVab_VThe pointer to memory for the Vab vector, V
void EST_getVdq_lp_V ( EST_Handle  handle,
MATH_vec2 pVdq_lp_V 
)

Gets the low pass filtered Vdq voltage vector in Volts (V)

Parameters
[in]handleThe estimator (EST) handle
[in]pVdq_lp_VThe pointer to memory for the low pass filtered Vdq vector, V
void EST_getVdq_V ( EST_Handle  handle,
MATH_vec2 pVdq_V 
)

Gets the Vdq voltage vector in Volts (V)

Parameters
[in]handleThe estimator (EST) handle
[in]pVdq_VThe pointer to memory for the Vdq vector, V
void EST_incrCounter_isr ( EST_Handle  handle)

Increments the ISR counter in the estimator.

Parameters
[in]handleThe estimator (EST) handle
void EST_incrTrajCounter_isr ( EST_Handle  handle)

Increments the ISR counter in the trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
EST_Handle EST_initEst ( const uint_least8_t  estNumber)

Initializes the estimator.

Parameters
[in]estNumberThe estimator number
Returns
The estimator (EST) handle
bool EST_isEnabled ( EST_Handle  handle)

Determines if the estimator (EST) is enabled.

Parameters
[in]handleThe estimator (EST) handle
bool EST_isError ( EST_Handle  handle)

Determines if there is an estimator error.

Determines if there is an error in the estimator.

Parameters
[in]handleThe estimator (EST) handle
Returns
A boolean value denoting if there is an estimator error (true) or not (false)
Parameters
[in]handleThe estimator (EST) handle
Returns
A boolean value denoting if there is an error (true) or not (false)

Referenced by CTRL_checkForErrors().

bool EST_isIdle ( EST_Handle  handle)

Determines if the estimator is idle.

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

Referenced by CTRL_updateState().

bool EST_isLockRotor ( EST_Handle  handle)

Determines if the estimator is waiting for the rotor to be locked.

Parameters
[in]handleThe estimator (EST) handle
Returns
A boolean value denoting if the estimator is waiting for the rotor to be locked (true) or not (false)

Referenced by CTRL_updateState().

bool EST_isMotorIdentified ( EST_Handle  handle)

Determines if the motor has been identified.

Parameters
[in]handleThe estimator (EST) handle
Returns
A boolean value denoting if the motor is identified (true) or not (false)

Referenced by CTRL_updateState().

bool EST_isNotOnLine ( EST_Handle  handle)

Determines if the estimator is not ready for online control.

Parameters
[in]handleThe estimator (EST) handle
Returns
A boolean value denoting if the estimator is not ready for online control (true) or not (false)
bool EST_isOnLine ( EST_Handle  handle)

Determines if the estimator is ready for online control.

Parameters
[in]handleThe estimator (EST) handle
Returns
A boolean value denoting if the estimator is ready for online control (true) or not (false)

Referenced by CTRL_updateState().

bool EST_isTrajEnabled ( EST_Handle  handle)

Determines if the trajectory generator is enabled.

Parameters
[in]handleThe estimator (EST) handle
bool EST_isTrajError ( EST_Handle  handle)

Determines if there is an error in the trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
Returns
A boolean value denoting if there is an error (true) or not (false)
void EST_resetCounter_ctrl ( EST_Handle  handle)

Resets the control counter.

Parameters
[in]handleThe estimator (EST) handle
void EST_resetCounter_isr ( EST_Handle  handle)

Resets the isr counter.

Parameters
[in]handleThe estimator (EST) handle
void EST_resetCounter_state ( EST_Handle  handle)

Resets the state counter.

Parameters
[in]handleThe estimator (EST) handle
void EST_resetTrajCounter_isr ( EST_Handle  handle)

Resets the trajectory ISR counter.

Parameters
[in]handleThe estimator (EST) handle
void EST_run ( EST_Handle  handle,
const EST_InputData_t pInputData,
EST_OutputData_t pOutputData 
)

Runs the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]pInputDataThe pointer to the input data
[in]pOutputDataThe pointer to the output data
void EST_run ( EST_Handle  handle,
const MATH_vec2 pIab_pu,
const MATH_vec2 pVab_pu,
const _iq  dcBus_pu,
const _iq  speed_ref_pu 
)

Runs the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]pIab_puThe pointer to the phase currents in the alpha/beta coordinate system, pu IQ24
[in]pVab_puThe pointer to the phase voltages in the alpha/beta coordinate system, pu IQ24
[in]dcBus_puThe DC bus voltage, pu IQ24
[in]speed_ref_puThe speed reference value to the controller, pu IQ24

Referenced by CTRL_runOnLine(), and CTRL_runOnLine_User().

float_t EST_runPowerWarp ( EST_Handle  handle,
const float_t  Id_int_A,
const float_t  Iq_A 
)

Runs PowerWarp.

Parameters
[in]handleThe estimator (EST) handle
[in]Id_int_AThe intermediate value along the Id trajectory in Amperes
[in]Iq_AThe measured Iq value in Amperes
Returns
The target value for the Id trajectory in Amperes
void EST_runTraj ( EST_Handle  handle)

Runs the trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
void EST_setAccel_rps2 ( EST_Handle  handle,
const float_t  accel_rps2 
)

Sets the mechanical acceleration in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]accel_rps2The mechanical acceleration, rad/sec^2
void EST_setAngle_est_rad ( EST_Handle  handle,
const float_t  angle_rad 
)

Sets the angle value at t = n in the estimator in radians (rad).

Parameters
[in]handleThe estimator (EST) handle
[in]angle_radThe angle value at t = n, rad
void EST_setAngle_np1_rad ( EST_Handle  handle,
const float_t  angle_np1_rad 
)

Sets the angle value at t = n+1 in the estimator in radians (rad).

This function overwrites the estimated angle with a user's provided angle. The set value should be between -2*pi and 2*pi The following example shows how to overwrite the estimated angle:

1 float_t Overwrite_Flux_Angle_np1_rad = MATH_TWO_PI * 0.5;
2 EST_setAngle_np1_rad(handle,Overwrite_Flux_Angle_np1_rad);

This function is not recommended for general use, since this will automatically generate an axis misalignment between the rotor flux axis and the control signals driving the motor. The use of this function is recommended for advanced users interested in doing open loop startup algorithms that need to bypass the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]angle_np1_radThe angle value at t = n+1, rad
void EST_setAngle_pu ( EST_Handle  handle,
const _iq  angle_pu 
)

Sets the angle value in the estimator in per unit (pu), IQ24.

This function overwrites the estimated angle with a user's provided angle. The set value should be between 0x00000000 or _IQ(0.0) to 0x00FFFFFF or _IQ(1.0). The following example shows how to overwrite the estimated angle:

1 _iq Overwrite_Flux_Angle_pu = _IQ(0.5);
2 EST_setAngle_pu(handle, Overwrite_Flux_Angle_pu);

This function is not recommended for general use, since this will automatically generate an axis misalignment between the rotor flux axis and the control signals driving the motor. The use of this function is recommended for advanced users interested in doing open loop startup algorithms that need to bypass the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]angle_puThe angle value, pu
void EST_setAngle_rad ( EST_Handle  handle,
const float_t  angle_rad 
)

Sets the angle value at t = n in both the estimator and trajectory in radians (rad).

This function overwrites the estimated angle with a user's provided angle. The set value should be between -pi and pi The following example shows how to overwrite the estimated angle:

1 float_t Overwrite_Flux_Angle_rad = MATH_PI * 0.5;
2 EST_setAngle_rad(handle,Overwrite_Flux_Angle_rad);

This function is not recommended for general use, since this will automatically generate an axis misalignment between the rotor flux axis and the control signals driving the motor. The use of this function is recommended for advanced users interested in doing open loop startup algorithms that need to bypass the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]angle_radThe angle value at t = n, rad
void EST_setAngle_traj_rad ( EST_Handle  handle,
const float_t  angle_rad 
)

Sets the angle value at t = n in the trajectory in radians (rad).

Parameters
[in]handleThe estimator (EST) handle
[in]angle_radThe angle value at t = n, rad
void EST_setAngleDelta_est_rad ( EST_Handle  handle,
const float_t  delta_rad 
)

Sets the estimated angle delta value.

Parameters
[in]handleThe estimator (EST) handle
[in]delta_radThe angle delta value, rad
void EST_setAngleDelta_traj_rad ( EST_Handle  handle,
const float_t  delta_rad 
)

Sets the trajectory angle delta value.

Parameters
[in]handleThe estimator (EST) handle
[in]delta_radThe angle delta value, rad
void EST_setCount_isr ( EST_Handle  handle,
const int_least16_t  value 
)

Sets the ISR count in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]valueThe ISR count value
void EST_setCount_state ( EST_Handle  handle,
const int_least32_t  value 
)

Sets the state count in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]valueThe state count value
void EST_setCount_traj ( EST_Handle  handle,
const int_least16_t  value 
)

Sets the ISR count value in the estimator trajectory.

Parameters
[in]handleThe estimator (EST) handle
[in]countThe desired count
void EST_setDcBus_pu ( EST_Handle  handle,
const _iq  dcBus_pu 
)

Sets the DC bus voltage in the estimator in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
[in]dcBus_puThe DC bus voltage, pu
void EST_setDcBus_V ( EST_Handle  handle,
const float_t  dcBus_V 
)

Sets the DC bus voltage in the estimator in Volt (V).

Parameters
[in]handleThe estimator (EST) handle
[in]dcBus_VThe DC bus voltage, V
void EST_setDir_qFmt ( EST_Handle  handle,
const uint_least8_t  dir_qFmt 
)

Sets the direction Q format in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]dir_qFmtThe direction Q format
void EST_setFe_abs_max_rps ( EST_Handle  handle,
const float_t  fe_abs_max_rps 
)

Sets the absolute maximum electrical frequency in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]fe_abs_max_rpsThe absolute maximum electrical frequency value, rad/sec
void EST_setFe_Hz ( EST_Handle  handle,
const float_t  fe_Hz 
)

Sets the electrical frequency in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]fe_HzThe electrical frequency value, Hz
void EST_setFe_neg_max_pu ( EST_Handle  handle,
const _iq  fe_neg_max_pu 
)

Sets maximum negative electrical frequency from the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]fe_neg_max_puThe maximum negative electrical frequency, Hz
void EST_setFe_pos_min_pu ( EST_Handle  handle,
const _iq  fe_pos_min_pu 
)

Sets minimum positive electrical frequency from the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]fe_pos_min_puThe minimum positive electrical frequency, Hz
void EST_setFe_rps ( EST_Handle  handle,
const float_t  fe_rps 
)

Sets the electrical frequency in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]fe_rpsThe electrical frequency value, rad/sec
void EST_setFlag_bypassLockRotor ( EST_Handle  handle,
const bool  state 
)

Sets the bypass lock rotor flag value in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]stateThe desired state
void EST_setFlag_enable ( EST_Handle  handle,
const bool  state 
)

Sets the enable estimator flag value in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]stateThe desired state
void EST_setFlag_enableFluxControl ( EST_Handle  handle,
const bool  state 
)

Sets the enable flux control flag in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]stateThe desired flag state, on (1) or off (0)
void EST_setFlag_enableForceAngle ( EST_Handle  handle,
const bool  state 
)

Sets the enable force angle flag in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]stateThe desired flag state, on (1) or off (0) true Enable forced angle. The estimated angle will be bypassed if the flux frequency falls below a threashold defined by:
1 #define USER_ZEROSPEEDLIMIT (0.001)
in user.h. A typical value of this frequency is 0.001 of the full scale frequency defined in:
1 #define USER_IQ_FULL_SCALE_FREQ_Hz (500.0)
Forced angle algorithm, when active, that is, when the rotor flux electrical frequency falls below the threashold, will be forcing a rotating angle at a frequency set by the following define:
1 #define USER_FORCE_ANGLE_FREQ_Hz (1.0)
false Disable forced angle. The estimator will never be bypassed by any forced angle algorithm.
[in]handleThe estimator (EST) handle
[in]stateThe desired flag state, on (1) or off (0) true Enable forced angle. false Disable forced angle.
void EST_setFlag_enablePowerWarp ( EST_Handle  handle,
const bool  state 
)

Sets the enable PowerWarp flag in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]stateThe desired flag state, on (1) or off (0)
void EST_setFlag_enableRsOnLine ( EST_Handle  handle,
const bool  state 
)

Sets the enable Rs online flag in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]stateThe desired flag state, on (1) or off (0) true Enable the Rs online recalibration algorithm. The estimator will run a set of functions related to rs online which recalculates the stator resistance while the motor is rotating. This algorithm is useful when motor heats up, and hence stator resistance increases. false Disable the Rs online recalibration algorithm. No updates to Rs will be made even if the motor heats up. Low speed performace, and startup performance with full torque might be affected if stator resistance changes due to motor heating up. The stator resistance will be fixed, and equal to the value returned by EST_getRs_Ohm().
void EST_setFlag_enableRsRecalc ( EST_Handle  handle,
const bool  state 
)

Sets the enable stator resistance (Rs) re-calculation flag in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]stateThe desired flag state, on (1) or off (0) true Enable Rs recalibration. The estimator will inject a DC current to the D-axis to recalibrate the stator resistance before the motor rotates. It is required that the motor is at standstill to perform Rs recalibration. If online recalibration of the stator resistance is needed, refer to EST_getFlag_enableRsOnLine() and EST_setFlag_enableRsOnLine() functions. false Disable Rs recalibration. The estimator will start the motor with the resistance value that was used before the motor was stopped, or what is returned by function: EST_getRs_Ohm().
void EST_setFlag_estComplete ( EST_Handle  handle,
const bool  state 
)

Sets the estimation complete flag in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]stateThe desired flag state, true (1) or false (0)
void EST_setFlag_motorIdentified ( EST_Handle  handle,
const bool  state 
)

Sets the motor identified flag state in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]stateThe desired state
void EST_setFlag_updateRs ( EST_Handle  handle,
const bool  state 
)

Sets the update stator resistance (Rs) flag in the estimator.

When the online resistance estimator is enabled, the update flag allows the online resistance to be copied to the resistance used by the estimator model. If the update flag is not set to true, the online resistance estimation will not be used by the estimator model, and if the resistance changes too much due to temperature increase, the model may not work as expected.

1 EST_setFlag_updateRs(handle, true);
Parameters
[in]handleThe estimator (EST) handle
[in]stateThe desired flag state true The stator resistance estimated by the Rs OnLine module will be copied to the' the stator resistance used by the module, so of the motor's temperature changes, the estimated angle will be calculated based on the most up to date stator resistance false The stator resistance estimated by the Rs OnLine module may or may not be updated depending on the enable flag, but will not be used in the motor's model used to generate the estimated speed and angle.
void EST_setFm_Hz ( EST_Handle  handle,
const float_t  fm_Hz 
)

Sets the asynchronous/mechanical frequency in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]fm_HzThe mechanical frequency value, Hz
void EST_setFm_lp_Hz ( EST_Handle  handle,
const float_t  fm_lp_Hz 
)

Sets the low pass filtered asynchronous/mechanical frequency in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]fm_lp_HzThe low pass filtered mechanical frequency value, Hz
void EST_setFm_lp_rps ( EST_Handle  handle,
const float_t  fm_lp_rps 
)

Sets the low pass filtered asynchronous/mechanical frequency in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]fm_lp_rpsThe low pass filtered mechanical frequency value, rad/sec
void EST_setFm_rps ( EST_Handle  handle,
const float_t  fm_rps 
)

Sets the asynchronous/mechanical frequency in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]fm_rpsThe mechanical frequency value, rad/sec
void EST_setForceAngleDelta_pu ( EST_Handle  handle,
const _iq  angleDelta_pu 
)

Sets the force angle delta value in the estimator in per unit (pu), IQ24.

This function sets a forced angle delta, which represents the increments to be added to or subtracted from the forced angle. The higher this value is, the higher frequency will be generated when the angle is forced (estimated angle is bypassed when in forced angle mode). By default the forced angle frequency is set in user.h. The following example shows how to set a forced angle frequency from Hertz (Hz) to per unit:

1 #define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
2 #define USER_NUM_CTRL_TICKS_PER_EST_TICK (1)
3 #define USER_PWM_FREQ_kHz (15.0)
4 #define USER_ISR_FREQ_Hz (USER_PWM_FREQ_kHz * 1000.0)
5 #define USER_CTRL_FREQ_Hz (uint_least32_t)(USER_ISR_FREQ_Hz/USER_NUM_ISR_TICKS_PER_CTRL_TICK)
6 #define USER_EST_FREQ_Hz (uint_least32_t)(USER_CTRL_FREQ_Hz/USER_NUM_CTRL_TICKS_PER_EST_TICK)
7 #define USER_FORCE_ANGLE_FREQ_Hz (1.0)
8 
9 _iq delta_hz_to_pu_sf = _IQ(1.0/(float_t)USER_EST_FREQ_Hz);
10 _iq Force_Angle_Freq_Hz = _IQ(USER_FORCE_ANGLE_FREQ_Hz);
11 _iq Force_Angle_Delta_pu = _IQmpy(Force_Angle_Freq_Hz, delta_hz_to_pu_sf);
12 
13 EST_setForceAngleDelta_pu(handle, Force_Angle_Delta_pu);
Parameters
[in]handleThe estimator (EST) handle
[in]angleDelta_puThe force angle delta value, pu
void EST_setForceAngleDelta_rad ( EST_Handle  handle,
const float_t  angleDelta_rad 
)

Sets the force angle delta value in the estimator in radians (rad).

Parameters
[in]handleThe estimator (EST) handle
[in]angleDelta_radThe force angle delta value, rad
void EST_setFreqB0_lp_pu ( EST_Handle  handle,
const _iq  b0_lp_pu 
)

Sets the low pass filter numerator value in the frequency estimator in per unit (pu), IQ30.

Parameters
[in]handleThe estimator (EST) handle
[in]b0_lp_puThe low pass filter numerator value, pu
void EST_setFreqBeta_lp ( EST_Handle  handle,
const float_t  beta_rad 
)

Sets the value used to set the low pass filter pole location in the frequency estimator in radians (rad).

Parameters
[in]handleThe estimator (EST) handle
[in]beta_radThe value used to set the filter pole location, rad
void EST_setFreqBeta_lp_pu ( EST_Handle  handle,
const _iq  beta_lp_pu 
)

Sets the value used to set the low pass pole location in the frequency estimator in per unit (pu), IQ30.

Parameters
[in]handleThe estimator (EST) handle
[in]beta_lp_puThe value used to set the filter pole location, pu
void EST_setFslip_Hz ( EST_Handle  handle,
const float_t  fslip_Hz 
)

Sets the slip frequency in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]fslip_HzThe slip frequency value, Hz
void EST_setFslip_rps ( EST_Handle  handle,
const float_t  fslip_rps 
)

Sets the slip frequency in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]fslip_rpsThe slip frequency value, rad/sec
void EST_setFullScaleCurrent ( EST_Handle  handle,
const float_t  fullScaleCurrent 
)

Sets the full scale current in the estimator in Amperes (A).

Parameters
[in]handleThe estimator (EST) handle
[in]fullScaleCurrentThe full scale current, A
void EST_setFullScaleFlux ( EST_Handle  handle,
const float_t  fullScaleFlux 
)

Gets the full scale flux value used in the estimator in Volts*seconds (V.s).

Parameters
[in]handleThe estimator (EST) handle
[in]fullScaleFluxThe full scale flux value, V*sec
void EST_setFullScaleFreq ( EST_Handle  handle,
const float_t  fullScaleFreq 
)

Sets the full scale frequency in the estimator in Hertz (Hz).

Parameters
[in]handleThe estimator (EST) handle
[in]fullScaleFreqThe full scale frequency, Hz
void EST_setFullScaleInductance ( EST_Handle  handle,
const float_t  fullScaleInductance 
)

Sets the full scale inductance in the estimator in Henries (H).

Parameters
[in]handleThe estimator (EST) handle
[in]fullScaleInductanceThe full scale inductance, Henry
void EST_setFullScaleResistance ( EST_Handle  handle,
const float_t  fullScaleResistance 
)

Sets the full scale resistance in the estimator in Ohms ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
[in]fullScaleResistanceThe full scale resistance, Ohm
void EST_setFullScaleVoltage ( EST_Handle  handle,
const float_t  fullScaleVoltage 
)

Sets the full scale resistance in the estimator in Volts (V).

Parameters
[in]handleThe estimator (EST) handle
[in]fullScaleVoltageThe full scale voltage, V
void EST_setId_ref_A ( EST_Handle  handle,
const float_t  Id_ref_A 
)

Sets the direct current (Id) reference value in the estimator in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
[in]Id_ref_AThe Id reference value, A
void EST_setId_ref_pu ( EST_Handle  handle,
const _iq  Id_ref_pu 
)

Sets the direct current (Id) reference value in the estimator in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
[in]Id_ref_puThe Id reference value, pu

Referenced by CTRL_runOnLine(), and CTRL_runPiOnly().

void EST_setIdle ( EST_Handle  handle)

Sets the estimator to idle.

Parameters
[in]handleThe estimator (EST) handle

Referenced by CTRL_updateState().

void EST_setIdle_all ( EST_Handle  handle)

Sets the estimator and all of the subordinate estimators to idle.

Parameters
[in]handleThe estimator (EST) handle

Referenced by CTRL_updateState().

void EST_setIdq_ref_A ( EST_Handle  handle,
const MATH_vec2 pIdq_ref_A 
)

Sets the direct/quadrature current (Idq) reference value in the estimator in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
[in]pIdq_ref_AThe pointer to the Idq reference values, A
void EST_setIdRated_A ( EST_Handle  handle,
const float_t  IdRated_A 
)

Sets the Id rated current value in the estimator in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
[in]IdRated_AThe Id rated current value, A
void EST_setIdRated_delta_A ( EST_Handle  handle,
const float_t  IdRated_delta_A 
)

Sets the Id rated delta current value in the estimator in Ampere (A)

Parameters
[in]handleThe estimator (EST) handle
[in]IdRated_delta_AThe delta Id rated current value, A
void EST_setIdRated_pu ( EST_Handle  handle,
const _iq  IdRated_pu 
)

Sets the Id rated current value in the estimator in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
[in]IdRated_puThe Id rated current value, pu
void EST_setIntValue_Id_A ( EST_Handle  handle,
const float_t  intValue_A 
)

Sets the intermediate value in the Id trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
[in]intValue_AThe intermediate value, A
void EST_setIntValue_Iq_A ( EST_Handle  handle,
const float_t  intValue_A 
)

Sets the intermediate value in the Iq trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
[in]intValue_AThe intermediate value, A
void EST_setIntValue_spd_Hz ( EST_Handle  handle,
const float_t  intValue_Hz 
)

Sets the intermediate value in the speed trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
[in]intValue_HzThe intermediate value, Hz
void EST_setIq_ref_A ( EST_Handle  handle,
const float_t  Iq_ref_A 
)

Sets the quadrature current (Iq) reference value in the estimator in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
[in]Iq_ref_AThe Iq reference value, A
void EST_setIq_ref_pu ( EST_Handle  handle,
const _iq  Iq_ref_pu 
)

Sets the quadrature current (Iq) reference value in the estimator in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
[in]Iq_ref_puThe Iq reference value, pu

Referenced by CTRL_runOnLine(), and CTRL_runPiOnly().

void EST_setLhf_H ( EST_Handle  handle,
const float_t  Lhf_H 
)

Sets the Lhf value in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]Lhf_HThe Lhf inductance value, H
void EST_setLs_coarseDelta_H ( EST_Handle  handle,
const float_t  Ls_delta_H 
)

Sets the delta stator inductance value during coarse estimation.

Parameters
[in]handleThe estimator (EST) handle
[in]Ls_delta_HThe delta stator inductance value for coarse estimation, Henry
void EST_setLs_d_H ( EST_Handle  handle,
const float_t  Ls_d_H 
)

Sets the direct stator inductance value in the estimator in Henry (H).

Parameters
[in]handleThe estimator (EST) handle
[in]Ls_d_HThe direct stator inductance value, Henry
void EST_setLs_d_pu ( EST_Handle  handle,
const _iq  Ls_d_pu 
)

Sets the direct stator inductance value in the estimator in per unit (pu), IQ30.

The internal direct inductance (Ls_d) used by the estimator can be changed in real time by calling this function. An example showing how this is done is shown here:

1 #define USER_MOTOR_Ls_d (0.012)
2 
3 float_t fullScaleInductance = EST_getFullScaleInductance(handle);
4 float_t Ls_coarse_max = _IQ30toF(EST_getLs_coarse_max_pu(handle));
5 int_least8_t lShift = ceil(log(USER_MOTOR_Ls_d/(Ls_coarse_max*fullScaleInductance))/log(2.0));
6 uint_least8_t Ls_qFmt = 30 - lShift;
7 float_t L_max = fullScaleInductance * pow(2.0,lShift);
8 _iq Ls_d_pu = _IQ30(USER_MOTOR_Ls_d / L_max);
9 
10 EST_setLs_d_pu(handle, Ls_d_pu);
11 EST_setLs_qFmt(handle, Ls_qFmt);
Parameters
[in]handleThe estimator (EST) handle
[in]Ls_d_puThe direct stator inductance value, pu

Referenced by USER_softwareUpdate1p6().

void EST_setLs_delta_pu ( EST_Handle  handle,
const _iq  Ls_delta_pu 
)

Sets the delta stator inductance value during fine estimation.

Parameters
[in]handleThe estimator (EST) handle
[in]Ls_delta_puThe delta stator inductance value, pu
void EST_setLs_dq_H ( EST_Handle  handle,
const MATH_vec2 pLs_dq_H 
)

Sets the direct/quadrature stator inductance vector values in the estimator in Henry (H).

Parameters
[in]handleThe estimator (EST) handle
[in]pLs_dq_HThe pointer to the direct/quadrature stator inductance vector values, H
void EST_setLs_dq_pu ( EST_Handle  handle,
const MATH_vec2 pLs_dq_pu 
)

Sets the direct/quadrature stator inductance vector values in the estimator in per unit (pu), IQ30.

The internal direct and quadrature inductances (Ls_d and Ls_q) used by the estimator can be changed in real time by calling this function. An example showing how this is done is shown here:

1 #define USER_MOTOR_Ls_d (0.012)
2 #define USER_MOTOR_Ls_q (0.027)
3 
4 float_t fullScaleInductance = EST_getFullScaleInductance(handle);
5 float_t Ls_coarse_max = _IQ30toF(EST_getLs_coarse_max_pu(handle));
6 int_least8_t lShift = ceil(log(USER_MOTOR_Ls_d/(Ls_coarse_max*fullScaleInductance))/log(2.0));
7 uint_least8_t Ls_qFmt = 30 - lShift;
8 float_t L_max = fullScaleInductance * pow(2.0,lShift);
9 MATH_vec2 Ls_dq_pu;
10 
11 Ls_dq_pu.value[0] = _IQ30(USER_MOTOR_Ls_d / L_max);
12 Ls_dq_pu.value[1] = _IQ30(USER_MOTOR_Ls_q / L_max);
13 
14 EST_setLs_dq_pu(handle, &Ls_dq_pu);
15 EST_setLs_qFmt(handle, Ls_qFmt);
Parameters
[in]handleThe estimator (EST) handle
[in]pLs_dq_puThe pointer to the direct/quadrature stator inductance vector values, pu
void EST_setLs_fineDelta_H ( EST_Handle  handle,
const float_t  Ls_delta_H 
)

Sets the delta stator inductance value during fine estimation.

Parameters
[in]handleThe estimator (EST) handle
[in]Ls_delta_HThe delta stator inductance value for fine estimation, H
void EST_setLs_H ( EST_Handle  handle,
const float_t  Ls_H 
)

Sets the stator inductance value in the estimator in Henry (H).

Parameters
[in]handleThe estimator (EST) handle
[in]Ls_HThe stator inductance value, H
void EST_setLs_q_H ( EST_Handle  handle,
const float_t  Ls_q_H 
)

Sets the quadrature stator inductance value in the estimator in Henry (H).

Parameters
[in]handleThe estimator (EST) handle
[in]Ls_q_HThe quadrature stator inductance value, H
void EST_setLs_q_pu ( EST_Handle  handle,
const _iq  Ls_q_pu 
)

Sets the quadrature stator inductance value in the estimator in per unit (pu), IQ30.

The internal quadrature inductance (Ls_q) used by the estimator can be changed in real time by calling this function. An example showing how this is done is shown here:

1 #define USER_MOTOR_Ls_q (0.027)
2 
3 float_t fullScaleInductance = EST_getFullScaleInductance(handle);
4 float_t Ls_coarse_max = _IQ30toF(EST_getLs_coarse_max_pu(handle));
5 int_least8_t lShift = ceil(log(USER_MOTOR_Ls_q/(Ls_coarse_max*fullScaleInductance))/log(2.0));
6 uint_least8_t Ls_qFmt = 30 - lShift;
7 float_t L_max = fullScaleInductance * pow(2.0,lShift);
8 _iq Ls_d_pu = _IQ30(USER_MOTOR_Ls_q / L_max);
9 
10 EST_setLs_q_pu(handle, Ls_q_pu);
11 EST_setLs_qFmt(handle, Ls_qFmt);
Parameters
[in]handleThe estimator (EST) handle
[in]Ls_q_puThe quadrature stator inductance value, pu

Referenced by USER_softwareUpdate1p6().

void EST_setLs_qFmt ( EST_Handle  handle,
const uint_least8_t  Ls_qFmt 
)

Sets the stator inductance Q format in the estimator in 8 bit unsigned integer (uint_least8_t).

Updating the internal inductance also requires to update the Q format variable, which is used to extend the covered range. This qFmt (Q Format) variable creates a floating point using fixed point math. It is important to notice that the inductance Q Format set by calling EST_setLs_qFmt() will be used by both per unit inductance calculations Ls_d and Ls_q. An example showing how this Q Format is set is shown below:

1 #define USER_MOTOR_Ls_d (0.012)
2 #define USER_MOTOR_Ls_q (0.027)
3 
4 float_t fullScaleInductance = EST_getFullScaleInductance(handle);
5 float_t Ls_coarse_max = _IQ30toF(EST_getLs_coarse_max_pu(handle));
6 int_least8_t lShift = ceil(log(USER_MOTOR_Ls_d/(Ls_coarse_max*fullScaleInductance))/log(2.0));
7 uint_least8_t Ls_qFmt = 30 - lShift;
8 float_t L_max = fullScaleInductance * pow(2.0,lShift);
9 MATH_vec2 Ls_dq_pu;
10 
11 Ls_dq_pu.value[0] = _IQ30(USER_MOTOR_Ls_d / L_max);
12 Ls_dq_pu.value[1] = _IQ30(USER_MOTOR_Ls_q / L_max);
13 
14 EST_setLs_dq_pu(handle, &Ls_dq_pu);
15 EST_setLs_qFmt(handle, Ls_qFmt);
Parameters
[in]handleThe estimator (EST) handle
[in]Ls_qFmtThe stator inductance Q format

Referenced by USER_softwareUpdate1p6().

void EST_setMaxAccel_est_pu ( EST_Handle  handle,
const _iq  maxAccel_pu 
)

Sets the maximum estimation acceleration value in the estimator in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
[in]maxAccel_puThe maximum estimation acceleration value, pu
void EST_setMaxAccel_pu ( EST_Handle  handle,
const _iq  maxAccel_pu 
)

Sets the maximum acceleration value in the estimator in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
[in]maxAccel_puThe maximum acceleration value, pu
void EST_setMaxCurrentDelta_A ( EST_Handle  handle,
const float_t  maxCurrentDelta_A 
)

Sets the maximum current delta value in the estimator in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
[in]maxCurrentDelta_AThe maximum current delta value, A
void EST_setMaxCurrentDelta_pw_A ( EST_Handle  handle,
const float_t  maxCurrentDelta_A 
)

Sets the maximum power warp current delta value used in the estimator in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
[in]maxCurrentDelta_AThe maximum current delta value, A
void EST_setMaxCurrentSlope_epl_pu ( EST_Handle  handle,
const _iq  maxCurrentSlope_pu 
)

Sets the maximum EPL (Efficient Partial Load) current slope value used in the estimator in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
[in]maxCurrentSlope_puThe maximum current slope value, pu
void EST_setMaxCurrentSlope_pu ( EST_Handle  handle,
const _iq  maxCurrentSlope_pu 
)

Sets the maximum current slope value in the estimator in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
[in]maxCurrentSlope_puThe maximum current slope value, pu
void EST_setMaxDelta_Id_A ( EST_Handle  handle,
const float_t  maxDelta_A 
)

Sets the maximum delta value in the Id trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
[in]maxDelta_AThe maximum delta value, A
void EST_setMaxDelta_Iq_A ( EST_Handle  handle,
const float_t  maxDelta_A 
)

Sets the maximum delta value in the Iq trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
[in]maxDelta_AThe maximum delta value, A
void EST_setMaxDelta_spd_Hz ( EST_Handle  handle,
const float_t  maxDelta_Hz 
)

Sets the maximum delta value in the speed trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
[in]maxDelta_HzThe maximum delta value, Hz
void EST_setMaxSpeedDelta_Hz ( EST_Handle  handle,
const float_t  maxSpeedDelta_Hz 
)

Sets the maximum speed delta value during estimation.

Parameters
[in]handleThe estimator (EST) handle
[in]maxSpeedDelta_HzThe maximum acceleration value, Hz
void EST_setMaxValue_Id_A ( EST_Handle  handle,
const float_t  maxValue_A 
)

Sets the maximum value in the Id trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
[in]maxValue_AThe maximum value, A
void EST_setMaxValue_Iq_A ( EST_Handle  handle,
const float_t  maxValue_A 
)

Sets the maximum value in the Iq trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
[in]maxValue_AThe maximum value, A
void EST_setMaxValue_spd_Hz ( EST_Handle  handle,
const float_t  maxValue_Hz 
)

Sets the maximum value in the speed trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
[in]maxValue_HzThe maximum value, Hz
void EST_setMinValue_Id_A ( EST_Handle  handle,
const float_t  minValue_A 
)

Sets the minimum value in the Id trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
[in]minValue_AThe minimum value, A
void EST_setMinValue_Iq_A ( EST_Handle  handle,
const float_t  minValue_A 
)

Sets the minimum value in the Iq trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
[in]minValue_AThe minimum value, A
void EST_setMinValue_spd_Hz ( EST_Handle  handle,
const float_t  minValue_Hz 
)

Sets the minimum value in the speed trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
[in]minValue_HzThe minimum value, Hz
void EST_setNumIsrTicksPerEstTick ( EST_Handle  handle,
const int_least16_t  numIsrTicksPerEstTick 
)

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

Parameters
[in]handleThe estimator (EST) handle
Returns
numIsrTicksPerEstTick The number of Interrupt Service Routine (ISR) clock ticks per estimator clock tick
void EST_setNumIsrTicksPerTrajTick ( EST_Handle  handle,
const int_least16_t  numIsrTicksPerTrajTick 
)

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

Parameters
[in]handleThe estimator (EST) handle
Returns
numIsrTicksPerTrajTick The number of Interrupt Service Routine (ISR) clock ticks per estimator trajectory clock tick
void EST_setParams ( EST_Handle  handle,
USER_Params pUserParams 
)

Sets the estimator parameters using the user parameters structreu.

Parameters
[in]handleThe estimator (EST) handle
[in]pUserParamsA pointer to the user parameters structure
void EST_setPwGain ( EST_Handle  handle,
const float_t  pwGain 
)

Sets the power warp gain in the trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
[in]pwGainThe power warp gain, unitless
void EST_setRhf_Ohm ( EST_Handle  handle,
const float_t  Rhf_Ohm 
)

Sets the Rhf value in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]Rhf_OhmThe Rhf resistance value, Ohm
void EST_setRoverL_rps ( EST_Handle  handle,
const float_t  RoverL_rps 
)

Sets the R/L value in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]RoverL_rpsThe R/L value, rad/sec
void EST_setRr_coarseDelta_Ohm ( EST_Handle  handle,
const float_t  Rr_coarseDelta_Ohm 
)

Sets the coarse delta rotor resistance value in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]Rr_coarseDelta_OhmThe coarse delta rotor resistance value, Ohm
void EST_setRr_d_Ohm ( EST_Handle  handle,
const float_t  Rr_d_Ohm 
)

Sets the direct rotor resistance value used in the estimator in Ohm ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
[in]Rr_d_OhmThe direct rotor resistance value, Ohm
void EST_setRr_dq_Ohm ( EST_Handle  handle,
const MATH_vec2 pRr_dq_Ohm 
)

Sets the direct/quadrature rotor resistance values used in the estimator in Ohm ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
[in]pRr_dq_OhmThe pointer to the vector of direct/quadrature rotor resistance values, Ohm
void EST_setRr_fineDelta_Ohm ( EST_Handle  handle,
const float_t  Rr_fineDelta_Ohm 
)

Sets the fine delta rotor resistance value in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]Rr_fineDelta_OhmThe fine delta rotor resistance value, Ohm
void EST_setRr_max_Ohm ( EST_Handle  handle,
const float_t  Rr_max_Ohm 
)

Sets the maximum rotor resistance maximum value for saturation.

Parameters
[in]handleThe estimator (EST) handle
[in]Rr_max_OhmThe rotor maximum resistance value, Ohm
void EST_setRr_min_Ohm ( EST_Handle  handle,
const float_t  Rr_min_Ohm 
)

Sets the minimum rotor resistance value for saturation.

Parameters
[in]handleThe estimator (EST) handle
[in]Rr_min_OhmThe minimum rotor resistance value, Ohm
void EST_setRr_Ohm ( EST_Handle  handle,
const float_t  Rr_Ohm 
)

Sets the rotor resistance value used in the estimator in Ohm ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
[in]Rr_OhmThe rotor resistance value, Ohm
void EST_setRr_pu ( EST_Handle  handle,
const _iq  Rr_pu 
)

Sets the rotor resistance value in the estimator in per unit (pu), IQ30.

Parameters
[in]handleThe estimator (EST) handle
[in]Rr_puThe rotor resistance value, pu
void EST_setRr_q_Ohm ( EST_Handle  handle,
const float_t  Rr_q_Ohm 
)

Sets the quadrature rotor resistance value used in the estimator in Ohm ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
[in]Rr_q_OhmThe quadrature rotor resistance value, Ohm
void EST_setRr_qFmt ( EST_Handle  handle,
uint_least8_t  Rr_qFmt 
)

Sets the rotor resistance Q format in the estimator in 8 bit unsigned integer (uint_least8_t).

Parameters
[in]handleThe estimator (EST) handle
[in]Rr_qFmtThe rotor resistance Q format
void EST_setRs_a_Ohm ( EST_Handle  handle,
const float_t  Rs_a_Ohm 
)

Sets the alpha stator resistance value used in the estimator in Ohm ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
[in]Rs_a_OhmThe alpha stator resistance value, Ohm
void EST_setRs_ab_Ohm ( EST_Handle  handle,
const MATH_vec2 pRs_ab_Ohm 
)

Sets the alpha/beta stator resistance values used in the estimator in Ohm ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
[in]pRs_ab_OhmThe pointer to the vector of direct/quadrature stator resistance values, Ohm
void EST_setRs_b_Ohm ( EST_Handle  handle,
const float_t  Rs_b_Ohm 
)

Sets the beta stator resistance value used in the estimator in Ohm ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
[in]Rs_b_OhmThe beta stator resistance value, Ohm
void EST_setRs_coarseDelta_Ohm ( EST_Handle  handle,
const float_t  Rs_coarseDelta_Ohm 
)

Sets the coarse delta stator resistance value.

Parameters
[in]handleThe estimator (EST) handle
[in]Rs_coarseDelta_OhmThe coarse delta stator resistance value, Ohm
void EST_setRs_d_Ohm ( EST_Handle  handle,
const float_t  Rs_d_Ohm 
)

Sets the direct stator resistance value used in the estimator in Ohm ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
[in]Rs_d_OhmThe direct stator resistance value, Ohm
void EST_setRs_delta_pu ( EST_Handle  handle,
const _iq  Rs_delta_pu 
)

Sets the delta stator resistance value.

Parameters
[in]handleThe estimator (EST) handle
[in]Rs_delta_puThe delta stator resistance value, pu
void EST_setRs_dq_Ohm ( EST_Handle  handle,
const MATH_vec2 pRs_dq_Ohm 
)

Sets the direct/quadrature stator resistance values used in the estimator in Ohm ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
[in]pRs_dq_OhmThe pointer to the vector of direct/quadrature stator resistance values, Ohm
void EST_setRs_fineDelta_Ohm ( EST_Handle  handle,
const float_t  Rs_fineDelta_Ohm 
)

Sets the fine delta stator resistance value.

Parameters
[in]handleThe estimator (EST) handle
[in]Rs_fineDelta_OhmThe fine delta stator resistance value, Ohm
void EST_setRs_Ohm ( EST_Handle  handle,
const float_t  Rs_Ohm 
)

Sets the stator resistance value used in the estimator in Ohm ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
[in]Rs_OhmThe stator resistance value, Ohm
void EST_setRs_pu ( EST_Handle  handle,
const _iq  Rs_pu 
)

Sets the stator resistance value used in the estimator in per unit (pu), IQ30.

Parameters
[in]handleThe estimator (EST) handle
[in]Rs_puThe stator resistance value, pu

Referenced by CTRL_updateState().

void EST_setRs_q_Ohm ( EST_Handle  handle,
const float_t  Rs_q_Ohm 
)

Sets the quadrature stator resistance value used in the estimator in Ohm ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
[in]Rs_q_OhmThe quadrature stator resistance value, Ohm
void EST_setRs_qFmt ( EST_Handle  handle,
uint_least8_t  Rs_qFmt 
)

Sets the stator resistance Q format in the estimator in 8 bit unsigned integer (uint_least8_t).

Parameters
[in]handleThe estimator (EST) handle
[in]Rs_qFmtThe stator resistance Q format
void EST_setRsOnLine_beta_rad ( EST_Handle  handle,
const float_t  beta_rad 
)

Sets the beta of the filters used for online stator resistance estimation in radians (rad).

Parameters
[in]handleThe estimator (EST) handle
[in]beta_radThe beta value, rad
void EST_setRsOnLine_Ohm ( EST_Handle  handle,
const float_t  Rs_Ohm 
)

Sets the stator resistance value in the online stator resistance estimator in Ohm ( $\Omega$).

Parameters
[in]handleThe estimator (EST) handle
[in]Rs_OhmThe stator resistance value, Ohm
void EST_setRsOnLine_pu ( EST_Handle  handle,
const _iq  Rs_pu 
)

Sets the stator resistance value in the online stator resistance estimator in per unit (pu), IQ30.

Parameters
[in]handleThe estimator (EST) handle
[in]Rs_puThe stator resistance value, pu
void EST_setRsOnLine_qFmt ( EST_Handle  handle,
const uint_least8_t  Rs_qFmt 
)

Sets the stator resistance Q format in the online stator resistance estimator in 8 bit unsigned integer (uint_least8_t).

Parameters
[in]handleThe estimator (EST) handle
[in]Rs_qFmtThe stator resistance Q format
void EST_setRsOnLineAngle_rad ( EST_Handle  handle,
const float_t  angle_rad 
)

Sets the angle value in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]angle_radThe angle value, rad
void EST_setRsOnLineAngleDelta_pu ( EST_Handle  handle,
const _iq  angleDelta_pu 
)

Sets the delta angle value in the online stator resistance estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]angleDelta_puThe delta angle value, pu
void EST_setRsOnLineAngleDelta_rad ( EST_Handle  handle,
const float_t  angleDelta_rad 
)

Sets the rotating angle delta in the online stator resistance estimator in radians.

Parameters
[in]handleThe estimator (EST) handle
[in]angleDelta_radThe angle delta value, radians
void EST_setRsOnLineFilterParams ( EST_Handle  handle,
const EST_RsOnLineFilterType_e  filterType,
const _iq  filter_0_b0,
const _iq  filter_0_a1,
const _iq  filter_0_y1,
const _iq  filter_1_b0,
const _iq  filter_1_a1,
const _iq  filter_1_y1 
)

Sets the online stator resistance filter parameters in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
[in]filterTypeThe filter type
[in]filter_0_b0The filter 0 numerator coefficient value for z^0
[in]filter_0_a1The filter 0 denominator coefficient value for z^(-1)
[in]filter_0_y1The filter 0 output value at time sample n=-1
[in]filter_1_b0The filter 1 numerator coefficient value for z^0
[in]filter_1_a1The filter 1 denominator coefficient value for z^(-1)
[in]filter_1_y1The filter 1 output value at time sample n=-1
void EST_setRsOnLineId_A ( EST_Handle  handle,
const float_t  Id_A 
)

Sets the Id value in the online stator resistance estimator in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
[in]Id_AThe Id value, A
void EST_setRsOnLineId_mag_A ( EST_Handle  handle,
const float_t  Id_mag_A 
)

Sets the Id magnitude value used for online stator resistance estimation in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
[in]Id_mag_AThe Id magnitude value, A
void EST_setRsOnLineId_mag_pu ( EST_Handle  handle,
const _iq  Id_mag_pu 
)

Sets the Id magnitude value used for online stator resistance estimation in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
[in]Id_mag_puThe Id magnitude value, pu
void EST_setRsOnLineId_pu ( EST_Handle  handle,
const _iq  Id_pu 
)

Sets the Id value in the online stator resistance estimator in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
[in]Id_puThe Id value, pu
void EST_setRsOnLineLpFilterParams ( EST_Handle  handle,
const EST_RsOnLineFilterType_e  filterType,
const uint_least8_t  filterNumber,
const float_t  b0,
const float_t  b1,
const float_t  a1,
const float_t  x1,
const float_t  y1 
)

Sets the online stator resistance filter parameters.

Parameters
[in]handleThe estimator (EST) handle
[in]filterTypeThe filter type
[in]filterNumberThe filter number
[in]b0The numerator coefficient value for z^0
[in]b1The numerator coefficient value for z^(-1)
[in]a1The denominator coefficient value for z^(-1)
[in]x1The input value at time sample n=-1
[in]y1The output value at time sample n=-1
void EST_setSpeed_ref_Hz ( EST_Handle  handle,
const float_t  speed_ref_Hz 
)

Sets the reference speed in the estimator.

Parameters
[in]handleThe estimator (EST) handle
[in]speed_ref_HzThe reference speed, Hz
void EST_setTargetValue_Id_A ( EST_Handle  handle,
const float_t  targetValue_A 
)

Sets the target value in the Id trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
[in]targetValue_AThe target value, A
void EST_setTargetValue_Iq_A ( EST_Handle  handle,
const float_t  targetValue_A 
)

Sets the target value in the Iq trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
[in]targetValue_AThe target value, A
void EST_setTargetValue_spd_Hz ( EST_Handle  handle,
const float_t  targetValue_Hz 
)

Sets the target value in the speed trajectory generator.

Parameters
[in]handleThe estimator (EST) handle
[in]targetValue_HzThe target value, Hz
void EST_setupTraj ( EST_Handle  handle,
CTRL_Handle  ctrlHandle,
const float_t  targetValue_spd_Hz,
const float_t  targetValue_Id_A 
)

Sets up the trajectory generator.

Parameters
[in]handleThe trajectory generator (EST_Traj) handle
[in]ctrlHandleThe controller (CTRL) handle
[in]targetValue_spd_HzThe target speed value during run time, Hz
[in]targetValue_Id_AThe target Id current value during run time, A
void EST_updateId_ref_A ( EST_Handle  handle,
float_t pId_ref_A 
)

Updates the Id reference value used for online stator resistance estimation in Ampere (A).

Parameters
[in]handleThe estimator (EST) handle
[in]pId_ref_AThe pointer to the Id reference value, A
void EST_updateId_ref_pu ( EST_Handle  handle,
_iq pId_ref_pu 
)

Updates the Id reference value used for online stator resistance estimation in per unit (pu), IQ24.

Parameters
[in]handleThe estimator (EST) handle
[in]pId_ref_puThe pointer to the Id reference value, pu

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

bool EST_updateState ( EST_Handle  handle,
const _iq  Id_target_pu 
)

Updates the estimator state.

Parameters
[in]handleThe estimator (EST) handle
[in]Id_target_puThe target Id current during each estimator state, pu IQ24
Returns
A boolean value denoting if the state has changed (true) or not (false)

Referenced by CTRL_updateState().

bool EST_updateState ( EST_Handle  handle,
const float_t  Id_target_A 
)

Updates the estimator state.

Parameters
[in]handleThe estimator (EST) handle
[in]Id_target_AThe target Id current during each estimator state, A
Returns
A boolean value denoting if the state has changed (true) or not (false)
bool EST_updateTrajState ( EST_Handle  handle)

Updates the trajectory generator state.

Parameters
[in]handleThe estimator (EST) handle
Returns
A boolean value denoting if the state has changed (true) or not (false)
bool EST_useZeroIq_ref ( EST_Handle  handle)

Determines if a zero Iq current reference should be used in the controller.

Parameters
[in]handleThe estimator (EST) handle
Returns
A boolean value denoting if a zero Iq current reference should be used (true) or not (false)

Referenced by CTRL_useZeroIq_ref().