Hi, I’ve been tuning an odrive 56V with a 48V lithium battery and a D6374 150KV motor and CUI AMT102-V encoder all bought from odrive web, it should work perfectly. But when I demand high accelerations it loses control and spins out. The application that I have demands 2000 turns/s^2 in theory it could do it since the speed limit is not reached and with the inertia of the system it is far from reaching the current limit. However when controlling in trapezoidal position control mode with the acc limit at 2000 turns/s^2 the motor stops giving motor error: unkown_voltage_command and unknown_torque and from time to time spinout_detected error. I have tried to raise and lower the current and encoder bandwidth and there is no improvement, if I lower them I get the error with lower accelerations and if I raise it it loses control holding the position. Setting the inertia doesn’t help either, so currently is 0. I don’t know what else I can do by watching the current, position, speed etc. It controls everything until it suddenly loses control. It doesn’t seem to be a gain setting problem as it neither over oscillates nor under reaches it, just if I do a sine sweep increasing the acceleration as the frequency rises it suddenly spins out. I was expecting a more robust control with defined errors not the unknow type. I have spent 500€ on odrive, motors and encoders and I don’t know what else to do to make it work.
Can someone help me, for the application I have in mind I need at least 5 odrives and 10 motors of this kind. It is a big investment but I believe in the project, I just need support.
These kinds of errors show that the current controller is losing control of the motor, due to the high acceleration. That can be due to the encoder position estimate lagging, or the current controller bandwidth being too low.
Try increasing your
encoder.config.bandwidth and your
motor.config.current_control_bandwidth (max of 4000 on each).
Make sure you’ve updated both the firmware and the odrivetool
pip install --upgrade odrive
First of all thanks for the answer.
Regarding the software, we always have the latest version. Increasing the bandwidth up to 4000 makes it move in hops, I do not know if it is necessary to recalibrate after changing any of the two bandwidth¿?
Regarding hardware, can I change the encoder to another one with a different cpr to increase the acceleration? However, I do not know if it is better to increase or decrease the cpr. By increasing them the frequency of pulses generated by the encoder is higher and maybe the odrive can not keeep up with them. But if I decrease it, I don’t know if the position estimation will be lagging even more.
@Wetmelon can you solve this question for me?, please
Sorry, I don’t really know what would cause “hopping”.
What is the mechanical configuration of your system? Can you share a video?
2000 turn/s^2 sounds really high.
The configuration is an electromechanical actuator in parallel with a drive belt. The belt reduction is 1:2 and the screw pitch is 10mm.
With the speed limits the working range of the actuator is calculated, for the given application at least 5mm amplitude and 5 Hz are needed.
The frequency and amplitude limit is calculated according to the maximum speed, as shown in the image. The acceleration would be limited by torque, not because there is an acceleration limit, in this particular case the actual inertia does not require the full torque/current.
For 5mm/5Hz the required acceleration is 2000 rad/s^2 and at 7mm/5Hz is 2750 rad/s^2. In the video below you see the sweep at 5Hz from 0mm to 7mm with the odrive giving an unknown voltage and torque error at around 4mm:
What I don’t quite understand is why in trapezoidal with the limit at 2800rad/s^2 doing a sine with maximum acceleration of 2000rad/s2 the odrive gives error. However if I do a step of 14mm being the demanded acceleration technically infinite >>2800rad/s^2 the odrive does not give error and changes position without problem.
Thank you for your help. @Wetmelon I hope with this information you can help me.
Uhh well if you’re trying to do a sine wave, you should use the sine wave generator (aka “Tuning” mode), for one.
But also, make sure that you don’t have any load on the motor when doing the encoder calibration. that can cause issues.