From 090cafff3c3d314edefad90036807d7596037099 Mon Sep 17 00:00:00 2001 From: Lucien Renaud Date: Tue, 24 May 2022 20:50:38 +0200 Subject: [PATCH] better PID tuning --- src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index beab5d7..beddc85 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -70,8 +70,8 @@ void setup() motor.PID_velocity.I = 0.01; motor.PID_velocity.D = 0.0; motor.LPF_velocity.Tf = 0.01f; - motor.P_angle.P = 200.0; - motor.P_angle.I = 50.0; + motor.P_angle.P = 120.0; + motor.P_angle.I = 10.0; motor.velocity_limit = 50; motor.useMonitoring(Serial); @@ -86,7 +86,7 @@ void setup() motor.linkSensor(&sensor); motor.init(); - motor.initFOC(); + motor.initFOC(5.48, CCW); } void loop()