reset again pro

This commit is contained in:
fcl
2026-03-07 19:52:36 +08:00
parent f41a2f3a4a
commit a99307cd04
5 changed files with 43 additions and 10 deletions

View File

@@ -26,8 +26,10 @@ void GimbalInit()
},
.controller_param_init_config = {
.angle_PID = {
.Kp = 0.685, // 8
.Ki = 0.315,
//.Kp = 0.685, // 8
.Kp = 0.6, // 8
//.Ki = 0.315,
.Ki = 0.25,
.Kd = 0.022,
//.DeadBand = 0.1,
.Improve = PID_Trapezoid_Intergral | PID_Integral_Limit | PID_Derivative_On_Measurement | PID_DerivativeFilter | PID_ChangingIntegrationRate,
@@ -38,7 +40,8 @@ void GimbalInit()
.Derivative_LPF_RC = 0.001
},
.speed_PID = {
.Kp = 8000, // 50
.Kp = 8000, // 50
//.Kp = 5000, // 50
.Ki = 5000, // 200
.Kd = 0,
.CoefB = 1,
@@ -93,7 +96,7 @@ void GimbalInit()
.close_loop_type = SPEED_LOOP | ANGLE_LOOP,
.motor_reverse_flag = MOTOR_DIRECTION_NORMAL,
},
.motor_type = GM6020,
.motor_type = M3508,
};
// 电机对total_angle闭环,上电时为零,会保持静止,收到遥控器数据再动
yaw_motor = DJIMotorInit(&yaw_config);