Hello everyone,
We have a GM3506 BLDC motor with an AS5048A Encoder (SPI) and an ESP32 as microcontroller.
We are running TorqueControlType::foc_current, but unfortunately, we feel what we think is an unusual amount of cogging when we move the motor really slow (about 1 cm /s). We tried different PID configs but without success. Here is our setup code:
void setup() {
Serial.begin(115200);
sensor.init();
motor.linkSensor(&sensor);driver.pwm_frequency = 20000;
driver.voltage_power_supply = 12;
driver.voltage_limit = 12;driver.init();
// link the motor and the driver
motor.linkDriver(&driver);
if( current_sense.init() )
{
Serial.println(“Current sense init success!”);
}
else
{
Serial.println(“Current sense init failed!”);
return;
}current_sense.linkDriver(&driver);
motor.linkCurrentSense(¤t_sense);motor.torque_controller = TorqueControlType::foc_current;
motor.controller = MotionControlType::torque;motor.PID_current_q.P = 3;
motor.PID_current_q.I = 300;
motor.PID_current_q.D = 0;
motor.PID_current_q.limit = motor.voltage_limit;
motor.LPF_current_q.Tf = 0.01;motor.PID_current_d.P = 3; // 3 - Arduino UNO/MEGA
motor.PID_current_d.I = 300; // 300 - Arduino UNO/MEGA
motor.PID_current_d.D = 0;
motor.PID_current_d.limit = motor.voltage_limit;
motor.LPF_current_q.Tf = 0.01;motor.init();
motor.initFOC();
_delay(1000);
}
Did we setup the foc library correctly? Is there a way to change the setup for minimum cogging?
Is it only about the PID values or is our motor not sufficient?
Thanks a lot,
Alex