torque.h 639 B

123456789101112131415161718192021222324
  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 thro_prev;
  7. float speed_prev;
  8. float torque_prev;
  9. float trq_start;
  10. float trq_accl;
  11. u32 timestamp; //ms
  12. float toruqe_curr_max; //当前转把对应的最大扭矩
  13. float speed_curr_max; //当前转把对应的最大速度
  14. bool accl; //加速或者减速
  15. float accl_ref;
  16. u32 count;
  17. }torque_manager_t;
  18. void torque_init(void);
  19. void torque_reset(void);
  20. void torque_get_idq(float torque, float rpm, DQ_t *dq_out);
  21. void throttle_process(u8 run_mode, float f_throttle);
  22. #endif /*_TORQUE_LUT_H__ */