From 29c6b564899e8881cfbe427cf65b729b95e7a946 Mon Sep 17 00:00:00 2001 From: Zhou Chujie Date: Thu, 19 Oct 2023 21:08:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90PID=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E7=9A=84=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/gimbal/gimbal.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/application/gimbal/gimbal.c b/application/gimbal/gimbal.c index d909f13..8993f83 100644 --- a/application/gimbal/gimbal.c +++ b/application/gimbal/gimbal.c @@ -26,9 +26,9 @@ void GimbalInit() }, .controller_param_init_config = { .angle_PID = { - .Kp = 8, // 8 + .Kp = 30, // 8 .Ki = 0, - .Kd = 0, + .Kd = 1, .DeadBand = 0.1, .Improve = PID_Trapezoid_Intergral | PID_Integral_Limit | PID_Derivative_On_Measurement, .IntegralLimit = 100, @@ -36,9 +36,9 @@ void GimbalInit() .MaxOut = 500, }, .speed_PID = { - .Kp = 50, // 50 + .Kp = 70, // 50 .Ki = 200, // 200 - .Kd = 0, + .Kd = 10, .Improve = PID_Trapezoid_Intergral | PID_Integral_Limit | PID_Derivative_On_Measurement, .IntegralLimit = 3000, .MaxOut = 20000, @@ -63,17 +63,17 @@ void GimbalInit() }, .controller_param_init_config = { .angle_PID = { - .Kp = 10, // 10 + .Kp = 50, // 10 .Ki = 0, - .Kd = 0, + .Kd = 1, .Improve = PID_Trapezoid_Intergral | PID_Integral_Limit | PID_Derivative_On_Measurement, .IntegralLimit = 100, .MaxOut = 500, }, .speed_PID = { - .Kp = 50, // 50 - .Ki = 350, // 350 - .Kd = 0, // 0 + .Kp = 100, // 50 + .Ki = 0, // 350 + .Kd = 3, // 0 .Improve = PID_Trapezoid_Intergral | PID_Integral_Limit | PID_Derivative_On_Measurement, .IntegralLimit = 2500, .MaxOut = 20000,