| 123456789101112131415161718192021222324 |
- #ifndef _MOTOR_H__
- #define _MOTOR_H__
- #include "os/os_type.h"
- typedef struct _motor_p {
- int poles; //电机极对数
- float ld; //q轴电感
- float lq; //d轴电感
- float rs; //定子内阻
- float flux_linkage; //永磁磁链
- float inertia;
- float b_emf;
- }motor_param_t;
- extern const motor_param_t motor_params;
- void motor_start(void);
- void motor_stop(void);
- void motor_drvier_low_side(bool on);
- void motor_update_duty(s32 A, s32 B, s32 C, s32 next_a, s32 next_b, s32 next_c);
- void motor_update_sample(u32 samp1, u32 samp2, u8 sector);
- u32 motor_get_raw_speed(void); //给pid使用
- u32 motor_get_speed(void);
- #endif /* _MOTOR_H__ */
|