feat(FOC): 集成ARM数学库优化FOC算法实现
- 引入arm_math.h库以使用ARM优化的数学函数 - 将角度归一化从弧度制改为角度制,使用360.0f替代2*PI - 使用arm_sin_cos_f32替代查找表实现正弦余弦计算 - 移除注释中的ARM Clark和Park变换函数调用 - 修正机械角度计算中的时间常量为TIMER2_FREQUENCY倒数 - 移除传感器角度到弧度的转换,保持原始角度值 - 激活电流环控制中的Iq/Id计算并发送CAN数据
This commit is contained in:
@@ -87,9 +87,10 @@ class CAN_transmiter {
|
||||
u8 Target_Control_Mode = 0; // 目标控制模式
|
||||
u8 EEPROMStatus = 0; // EEPROM状态码
|
||||
float_union_t target_velocity_union = {0}; // 目标速度
|
||||
float_union_t u_current_union = {0}; // U相电流
|
||||
float_union_t w_current_union = {0}; // W相电流
|
||||
float_union_t v_current_union = {0}; // V相电流
|
||||
float_union_t target_current_union = {0};
|
||||
float_union_t u_current_union = {0}; // U相电流
|
||||
float_union_t w_current_union = {0}; // W相电流
|
||||
float_union_t v_current_union = {0}; // V相电流
|
||||
|
||||
can_trasnmit_message_struct transmit_message; // 发送消息结构体
|
||||
u8 transmit_mailbox = CAN_NOMAILBOX; // 初始化为无mailbox状态
|
||||
|
||||
Reference in New Issue
Block a user