torque.h 530 B

12345678910111213141516171819
  1. #ifndef _TORQUE_LUT_H__
  2. #define _TORQUE_LUT_H__
  3. #include "os/os_types.h"
  4. #include "foc/core/PMSM_FOC_Core.h"
  5. typedef struct {
  6. float throttle_prev;
  7. float speed_prev;
  8. float torque_prev;
  9. u32 timestamp; //ms
  10. float toruqe_curr_max; //当前转把对应的最大扭矩
  11. float speed_curr_max; //当前转把对应的最大速度
  12. u32 count;
  13. }torque_manager_t;
  14. void torque_init(void);
  15. void torque_get_idq(float torque, float rpm, DQ_t *dq_out);
  16. void torque_manager(u8 run_mode, float f_throttle);
  17. #endif /*_TORQUE_LUT_H__ */