ZHCU083I 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_getMaxCurrentSlope_pu(EST_Handle handle);
获取估算器中使用的最大电流斜率值,标么值 (pu),IQ24
获取 Id 参考的斜率。以下示例说明了如何将返回值转换为千安培/秒 (kA/s):
#define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
#define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK (10)
#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_TRAJ_FREQ_Hz (uint_least32_t)(USER_CTRL_FREQ_Hz/USER_NUM_CTRL_TICKS_PER_TRAJ_TICK)
#define USER_IQ_FULL_SCALE_CURRENT_A (10.0)
_iq pu_to_kA_per_sec_sf = _IQ((float_t)USER_TRAJ_FREQ_Hz * USER_IQ_FULL_SCALE_CURRENT_A / 1000.0);
_iq currentSlope_pu = EST_getMaxCurrentSlope_pu(handle);
_iq currentSlope_kAps = _IQmpy(currentSlope_pu, pu_to_kA_per_sec_sf);
默认值由 user.h 中的用户定义值设置,默认标么值的内部计算方式如下:
#define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
#define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK (10)
#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_TRAJ_FREQ_Hz (uint_least32_t)(USER_CTRL_FREQ_Hz/USER_NUM_CTRL_TICKS_PER_TRAJ_TICK)
#define USER_IQ_FULL_SCALE_CURRENT_A (10.0)
#define USER_MOTOR_RES_EST_CURRENT (1.0)
_iq A_per_sec_to_pu_sf = _IQ(1.0 / ((float_t)USER_TRAJ_FREQ_Hz * USER_IQ_FULL_SCALE_CURRENT_A));
_iq currentSlope_Aps = _IQ(USER_MOTOR_RES_EST_CURRENT);
_iq currentSlope_pu = _IQmpy(currentSlope_Aps, A_per_sec_to_pu_sf);
估算器 (EST) 句柄
最大电流斜率值,pu