torque.h 568 B

1234567891011121314151617181920212223
  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 torque_base;
  10. bool accl;
  11. float thro_value; //油门开度百分比
  12. float spd_ref;
  13. u32 count;
  14. }torque_manager_t;
  15. void torque_init(void);
  16. void torque_reset(void);
  17. void torque_get_idq(float torque, float rpm, DQ_t *dq_out);
  18. void throttle_process(u8 run_mode, float f_throttle);
  19. void throttle_set_ration(float r);
  20. void torque_mode_process(void);
  21. #endif /*_TORQUE_LUT_H__ */