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_getMaxAccel_est_pu(EST_Handle handle);
获取估算器中使用的最大估算加速度值,标幺值 (pu),IQ24
最大加速度是轨迹模块的一项设置,用于设置速度基准。电机识别过程中使用此函数调用返回的加速度。该值表示如何从初始值增大或减小速度基准以达到目标值。以下示例说明了如何将此函数的返回值转换为千赫兹/秒 (kHz/s) 和千 RPM/秒 (kRPM/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_FREQ_Hz (500.0)
#define USER_MOTOR_NUM_POLE_PAIRS (4)
_iq pu_to_khzps_sf = _IQ((float_t)USER_TRAJ_FREQ_Hz * USER_IQ_FULL_SCALE_FREQ_Hz / 1000.0);
_iq khzps_to_krpmps_sf = _IQ(60.0 / (float_t)USER_MOTOR_NUM_POLE_PAIRS);
_iq est_Accel_pu = EST_getMaxAccel_est_pu(handle);
_iq est_Accel_kilo_hz_per_sec = _IQmpy(est_Accel_pu, pu_to_khzps_sf);
_iq est_Accel_kilo_rpm_per_sec = _IQmpy(est_Accel_kilo_hz_per_sec, khzps_to_krpmps_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_FREQ_Hz (500.0)
#define USER_MAX_ACCEL_EST_Hzps (2.0)
_iq hzps_to_pu_sf = _IQ(1.0 / ((float_t)USER_TRAJ_FREQ_Hz * USER_IQ_FULL_SCALE_FREQ_Hz));
_iq est_Accel_hertz_per_sec = _IQ(USER_MAX_ACCEL_EST_Hzps);
_iq est_Accel_pu = _IQmpy(est_Accel_hertz_per_sec, hzps_to_pu_sf);
估算器 (EST) 句柄
最大估算加速度值,pu