Hi!
I am using an ODrive S1 in sensorless mode and I am unable to reach the desired speed. In the image below, you can see that the speed doesn’t go above 44 turn/s, even though the requested speed is set to 50 turn/s.
Looking at the image, there seems to be a torque or current limit which prevents the drive from providing more power to the motor. These limits don’t fit with my config:
# power supply
self.odrv.config.dc_max_positive_current = 50 # A
self.odrv.config.dc_max_negative_current = -10 # A
# motor
self.odrv.axis0.config.motor.current_soft_max = 80.0 # A
self.odrv.axis0.config.motor.current_hard_max = 100.0 # A
self.odrv.axis0.controller.config.vel_limit = 75.0 # [turn/s]
self.odrv.axis0.config.torque_soft_min = -1.5 # Nm
self.odrv.axis0.config.torque_soft_max = 1.5 # Nm
self.odrv.axis0.config.motor.pole_pairs = 5
self.odrv.axis0.config.motor.torque_constant = 0.01654 # 8.27 / Kv
Can you explain how the limits I see in my logs are calculated? The torque is limited to 0.71 Nm, while the current is limited to 42.6 A. Please note that I never did a proper calibration of my motor to define the Kv value.
Thanks,
William
Interesting! Can you please provide the following information:
- Motor part number or datasheet
odrv0.axis0.config.motor.phase_resistance
and phase_inductance
values
- Bus voltage
You can export the entire config via odrivetool backup-config config.json
, then upload the resulting config.json
here (or e.g. pastebin and provide a link). That’ll really help!
I think you’re probably saturating your motor, but you’ll have to provide a motor datasheet and some info on your bus voltage / power source for me to be sure.
I don’t have a lot of details about the motor itself, but the datasheet does mention that it can reach 2900 RPM. Concerning the power source, we use a 28 V battery.
I wasn’t able to download the config file since the USB port isn’t accessible at the moment (I am using the CAN bus), but here are the resistance and inductance.
odrv0.axis0.config.motor.phase_resistance -> 0.02323
odrv0.axis0.config.motor.phase_inductance -> 0.00001209
I looked a bit into the FET thermistor current limiter to see if it had an impact. What else could be limiting the current?
Hi there,
Looks like you’re just saturating this motor (i.e. reaching max speed). The S1 has a maximum bus voltage utilization of 78%, so having a bit lower max speed than expected at rated voltage makes sense. Are you able to raise your bus voltage?
What torque_constant are you using for this motor? You may have to characterize it experimentally if your value isn’t accurate, as this is quite important for proper sensorless control.
Raising the bus voltage isn’t an option unfortunately. I am able to reach higher speed when the fan is spinning in the opposite direction since there is less resistance on the blades.
I never characterized properly the torque constant. I just used a Kv of 500 which seemed to work well with the motor. I have another fan I can use to characterize the motor. Do you have a procedure I can follow?
Sure, do you have an oscilloscope?
There’s also another way we could squeeze more performance out of the fan if needed, but that’s going to depend on the stuff we figure out in this test.
If you don’t have an oscilloscope, there’s another method we could do, but it may be a bit iffy unless you’re able to disconnect the fan from the motor.
Yes, I have an oscilloscope.
- grab your oscilloscope
- disconnect all three motor phase leads from the ODrive
- connect scope ground to one of the motor phases and the scope input to another phase, leaving the third phase disconnected (the phase ordering doesn’t matter)
- spin the motor at a semi-constant speed above a few hundred to low thousand RPM, for instance you can attach a cordless drill, or since this is a fan, maybe point another fan at it
- you’ll get a resulting sine wave, calculate the amplitude and frequency, for instance in the below image it’s 34.36Hz and 17.2 V peak-peak
- motor kv is freq/(num_pole_pairs) * 60 / (Vpp/2)
For instance in the above oscilloscope plot, the motor had 15 pole pairs, so the resulting KV is 15.98 RPM/V.
Thanks a lot for the procedure, I was able to find a Kv a bit lower than the one I estimated initially. I will update my settings and let you know if this fixes my issue.
Great! Just for my reference, what was the new kv?
Good morning!
Changing the torque constant did the trick. The motor is now able to reach the desired speed and isn’t saturated anymore.
I measured a torque constant of 281.12 RPM/V, instead of 400 RPM/V. Here is a screenshot of my oscilloscope as a reference.
Being able to the motor characterization was really useful, wasn’t expecting such a big improvement.
Thanks