SPRUHJ1I January 2013 – October 2021 TMS320F2802-Q1 , TMS320F28026-Q1 , TMS320F28026F , TMS320F28027-Q1 , TMS320F28027F , TMS320F28027F-Q1 , TMS320F28052-Q1 , TMS320F28052F , TMS320F28052F-Q1 , TMS320F28052M , TMS320F28052M-Q1 , TMS320F28054-Q1 , TMS320F28054F , TMS320F28054F-Q1 , TMS320F28054M , TMS320F28054M-Q1 , TMS320F2806-Q1 , TMS320F28062-Q1 , TMS320F28062F , TMS320F28062F-Q1 , TMS320F28068F , TMS320F28068M , TMS320F28069-Q1 , TMS320F28069F , TMS320F28069F-Q1 , TMS320F28069M , TMS320F28069M-Q1
extern 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:
#define VarShift(var,nshift) (((nshift) < 0) ? ((var)>>(-(nshift))) : ((var)<<(nshift)))
#define MATH_PI (3.1415926535897932384626433832795)
#define USER_IQ_FULL_SCALE_VOLTAGE_V (300.0)
#define USER_IQ_FULL_SCALE_CURRENT_A (10.0)
#define USER_VOLTAGE_FILTER_POLE_Hz (335.648)
#define USER_VOLTAGE_FILTER_POLE_rps (2.0 * MATH_PI * USER_VOLTAGE_FILTER_POLE_Hz)
uint_least8_t Lr_qFmt = EST_getLr_qFmt(handle);
_iq fullScaleInductance = _IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/(USER_IQ_FULL_SCALE_CURRENT_A * USER_VOLTAGE_FILTER_POLE_rps));
_iq Lr_pu = _IQ30toIQ(EST_getLr_pu(handle));
_iq pu_to_h_sf = VarShift(fullScaleInductance, 30 - Lr_qFmt);
_iq Lr_H = _IQmpy(Lr_pu, pu_to_h_sf);
The estimator (EST) handle
The rotor inductance value Q format