I’m using Myxa set to velocity control mode for the quadcopter. My setup is as below:
Frame: Tarot X4 (960)
ESC: Myxa (firmware: telega v1)
Motor: TMotor MN5212 KV340
Propeller: TMotor CF 18x61
FMU: Pixhawk v5x
Battery: Tattu 6s 22000mah
Total weight : 6,4kg
Setting file: 124.yaml (5.5 KB)
Based on the specifications of the TMotor, I expect the motor to run at 6358 RPM, 31A, 24V. I set the motor.current_max to 50A and subscribed to the compact.feedback to monitor the motor’s performance. The phase current reached 250 (which corresponds to 50A, as I understand it), and the DC current reached 140, which is approximately 28A. However, the velocity is limited to 450 (~4500 RPM), even though the setpoint is 666, which corresponds to around 6358 RPM. Are my settings incorrect, or is this a limitation of the Myxa controller?
50 A is too much. It may cause saturation of the phase current sensing front-end, which if happens may cause damage to the controller and/or the motor. The maximum is specified in the datasheet; you can see that it is at most 45 A, depending on the model:
It simply means that the current is insufficient to reach the desired speed. If the DC voltage remains heavily underutilized, the solution is to choose a motor with a lower velocity constant (Kv), which means it will require less current but more voltage to run at the same speed & torque.
You can plug your numbers into the spreadsheet linked here and see how changing the Kv (which is a function of the flux linkage and the pole count) affects the current & voltage requirements:
Thank you for your quick response.
The issue was caused by the drive.velocity_ctl.2_indi.mass being set to a too small value. After recalculating, everything looks good now. The current_max is set to 37A, and the velocity can reach approximately 6000 RPM.
After setting the drive.velocity_ctl.2_indi.mass, the motor reaches 6000 RPM without a load. However, with a load, it is still limited to about 360 radians (~3600 RPM). I reviewed the values in the spreadsheet you sent earlier, and it seems that 6000 RPM should be achievable at 37A:
The model predicts that the minimum required voltage is 24 V, which is only available with a fully charged 6S battery with very low resistance. You are probably running out of voltage here. See if you can achieve higher speeds with a higher-voltage battery.