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 int32_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:
uint_least8_t Ls_qFmt = EST_getLs_qFmt(handle);
float_t fullScaleInductance = EST_getFullScaleInductance(handle);
float_t Ls_d_pu = _IQ30toF(EST_getLs_d_pu(handle));
float_t pu_to_h_sf = fullScaleInductance * pow(2.0, 30 - Ls_qFmt);
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:
#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 Ls_qFmt = EST_getLs_qFmt(handle);
_iq fullScaleInductance = _IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/(USER_IQ_FULL_SCALE_CURRENT_A * USER_VOLTAGE_FILTER_POLE_rps));
_iq Ls_d_pu = _IQ30toIQ(EST_getLs_d_pu(handle));
_iq pu_to_h_sf = VarShift(fullScaleInductance, 30 - Ls_qFmt);
_iq Ls_d_H = _IQmpy(Ls_d_pu, pu_to_h_sf);
The estimator (EST) handle
The full scale resistance value, Henry