Closed keenanjohnson closed 6 years ago
Please make sure that the number of poles is configured correctly.
I've confirmed that this is the case. This test data comes from this motor: http://store-en.tmotor.com/goods.php?id=353 which is listed as 22 poles. That's what I have configured in the parameters.
Assuming that you're using the default PWM frequency of 60 kHz, the maximum mechanical speed for your motor is 6900 RPM, which seems to be compatible with your application (judging by the graphs). So I would suggest making sure that the PID controller is configured properly. You can use the CLI to command the motor a particular speed and observe how quickly it is reached. The speed can be plotted using the UAVCAN GUI Tool.
Why would that affect the rpm feedback reading?
I am suspecting that the reading is correct, and the divergence is caused by the ESC not reaching the speed setpoint due to misconfigured RPM PID controller.
What sort of parameters would cause that?
We've verified that our feedback is correct via an external tachometer. So we're confused why the setpoint is so much higher still.
Seems like the integral gain is zero. Check the value of rpmctl_i
please. You could also dump all configuration parameters here so we could have a look.
I've noticed that in the PX4 logs of the sapog motor driver firmware, the esc_rpm and esc_setpoint_raw seem to be off by some set factor.
Does anyone know why that might be?