mirror of
https://gitee.com/dlmu-cone/half-steering-basic-framework
synced 2026-10-23 17:42:20 +08:00
功率,热量
This commit is contained in:
@@ -70,18 +70,43 @@ void GimbalInit()
|
||||
.can_handle = &hcan2,
|
||||
.tx_id = 2,//2
|
||||
},
|
||||
// .controller_param_init_config = {
|
||||
// .angle_PID = {
|
||||
// .Kp = 40, // 10
|
||||
// .Ki = 0,
|
||||
// .Kd = 0,
|
||||
// .MaxOut = 1000,
|
||||
// },
|
||||
// .speed_PID = {
|
||||
// .Kp = 60, // 50
|
||||
// .Ki = 15, // 350
|
||||
// .Kd = 0.6, // 0
|
||||
// .MaxOut = 20000,//20000
|
||||
// },
|
||||
.controller_param_init_config = {
|
||||
.angle_PID = {
|
||||
.Kp = 40, // 10
|
||||
.Ki = 0,
|
||||
.Kd = 0,
|
||||
.MaxOut = 1000,
|
||||
.Kp = 0.75, //0.55
|
||||
.Ki = 0.05,//0.05
|
||||
.Kd = 0.02,//0.02
|
||||
.CoefA =0.5,//0.5
|
||||
.CoefB = 0.6,//0.6
|
||||
.Output_LPF_RC = 0.01,
|
||||
.DeadBand = 0.005,//0.02
|
||||
.Derivative_LPF_RC=0.01,//0.008
|
||||
.Improve = PID_Trapezoid_Intergral |PID_ChangingIntegrationRate| PID_Integral_Limit |PID_Derivative_On_Measurement | PID_OutputFilter |PID_DerivativeFilter,
|
||||
.IntegralLimit = 1,
|
||||
.MaxOut = 600,
|
||||
},
|
||||
.speed_PID = {
|
||||
.Kp = 60, // 50
|
||||
.Ki = 15, // 350
|
||||
.Kd = 0.6, // 0
|
||||
.MaxOut = 20000,//20000
|
||||
.Kp = 500,//22000
|
||||
.Ki = 0,//
|
||||
.Kd =0.0005,
|
||||
// .CoefA = 0.8,
|
||||
// .CoefB = 0.1,
|
||||
.Output_LPF_RC = 0.002,//0.002
|
||||
.Improve = PID_Trapezoid_Intergral |PID_Integral_Limit |PID_Derivative_On_Measurement | PID_OutputFilter,
|
||||
.IntegralLimit = 5000,
|
||||
.MaxOut = 20000,
|
||||
},
|
||||
.other_angle_feedback_ptr = &gimba_IMU_data->Pitch,
|
||||
// 还需要增加角速度额外反馈指针,注意方向,ins_task.md中有c板的bodyframe坐标系说明
|
||||
@@ -96,6 +121,7 @@ void GimbalInit()
|
||||
// .close_loop_type = SPEED_LOOP,
|
||||
.motor_reverse_flag = MOTOR_DIRECTION_NORMAL,
|
||||
},
|
||||
|
||||
.motor_type = GM6020,
|
||||
};
|
||||
// 电机对total_angle闭环,上电时为零,会保持静止,收到遥控器数据再动
|
||||
|
||||
Reference in New Issue
Block a user