Improving the precision of current control output for torque control

Hi!

I’m trying to use the D6374 150KV to provide a sinusoidal torque input (max 4Hz frequency) to a system in order to run some dynamics experiments. I’d like to be able to control the torque output of the motor as closely as possible so that I can more easily interpret the results of the experiments.

I’m trying to use current control to drive the motor, but I’m finding that the difference between the Iq_setpoint (0) and Iq_measured (1) is a little larger than I’d like:

  1. Is it possible to tune the current controller to reduce the range of noise from 100-300 mA down to <100 mA? I’ll be driving the motor from 2-20A with a 24V power supply.
  2. The Getting Started Guide provides a method of tuning the position controller; is there any issue with using the same procedure to tune the current control parameters?
  3. More generally, is the variation of Iq_measured away from Iq_setpoint caused by measurement noise, or is there a limit on how precisely I can prescribe the current output.

Thanks!

Here’s my motor configuration if it helps:
pre_calibrated = False (bool)
pole_pairs = 7 (int)
calibration_current = 10.0 (float)
resistance_calib_max_voltage = 2.0 (float)
phase_inductance = 2.4107508579618298e-05 (float)
phase_resistance = 0.0507194884121418 (float)
direction = -1 (int)
motor_type = 0 (int)
current_lim = 20.0 (float)
current_lim_tolerance = 1.25 (float)
inverter_temp_limit_lower = 100.0 (float)
inverter_temp_limit_upper = 120.0 (float)
requested_current_range = 20.0 (float)
current_control_bandwidth = 1000.0 (float)

The ODrive intended to drive motors in the range 10-100A, and the current measurement chain (i.e. shunts, amplifiers, and ADCs) is designed for these currents. You’re off by about an order of magnitude. Replace the shunt resistors on the board with an order of magnitude higher. You’ll have to compile your own firmware with different resistance values also.

Ah, I see, I thought it might be something like that. Do you know which resistors I’ll need to change and/or what part of the firmware I’d need to modify?

Not sure but take a look in this thread Current sensing resistor for low current motors

1 Like