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 _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).
#define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
#define USER_NUM_CTRL_TICKS_PER_EST_TICK (1)
#define USER_PWM_FREQ_kHz (15.0)
#define USER_ISR_FREQ_Hz (USER_PWM_FREQ_kHz * 1000.0)
#define USER_CTRL_FREQ_Hz (uint_least32_t)(USER_ISR_FREQ_Hz/USER_NUM_ISR_TICKS_PER_CTRL_TICK)
#define USER_EST_FREQ_Hz (uint_least32_t)(USER_CTRL_FREQ_Hz/USER_NUM_CTRL_TICKS_PER_EST_TICK)
_iq delta_pu_to_kHz_sf = _IQ((float_t)USER_EST_FREQ_Hz/1000.0);
_iq Force_Angle_Delta_pu = EST_getForceAngleDelta_pu(handle);
_iq Force_Angle_Freq_kHz = _IQmpy(Force_Angle_Delta_pu, delta_pu_to_kHz_sf);
Note that kHz is preferred to avoid overflow of IQ24 variables.
The estimator (EST) handle
The force angle delta, pu. Minimum value of _IQ(0.0) and maximum of _IQ(1.0).