fix(FOC): 修正大角度下会导致角度控制失控的问题
移除冗余的 `_electricalAngle` 函数,修正 `setPhaseVoltage` 中电气角度的计算方式 在定时器中断中增加实时角度更新,支持新增的无 PID 角度控制模式。
This commit is contained in:
@@ -35,12 +35,12 @@ class FOC_Controlroller {
|
||||
float shaft_angle = 0;
|
||||
float Ualpha, Ubeta = 0, Ua = 0, Ub = 0, Uc = 0;
|
||||
float zero_electric_angle = 0;
|
||||
float voltage_power_supply = 24.0f; // 电源电压
|
||||
float voltage_power_supply = 24.0f; // 电源电压
|
||||
float v_half = voltage_power_supply * 0.5f; // 电源电压的一半
|
||||
|
||||
PIDController vel_loop =
|
||||
PIDController{1.5f, 1.0f, 0.0005, 100000, voltage_power_supply};
|
||||
PIDController angle_loop = PIDController{140.0f, 80.0f, 0.005f, 100000, voltage_power_supply};
|
||||
PIDController vel_loop =PIDController{1.75f, 1.0f, 0.0002f, 1000000, voltage_power_supply};
|
||||
PIDController angle_loop =
|
||||
PIDController{140.0f, 80.0f, 0.005f, 10000000, voltage_power_supply};
|
||||
|
||||
void setPhaseVoltage(float Uq, float Ud);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user