Current Control Loop tuning

Hi i am working on using odrive as the controller for my driving simulator and i want to use it for that matter in the torque control loop mode. The problem i am having is that i cannot properly tune the current control loop i think. I cannot make the current_meas_phC to go any highet than maybe 0.2-0.3 amps.
Also the shelf is really stiff when no torque is applied (more than i would like to)

Hope you guys can help me make this work.

I am using a mige servo (130st) and de configs:

odrv0.axis1.motor.config

pre_calibrated = False (bool)
pole_pairs = 4 (int)
calibration_current = 10.0 (float)
resistance_calib_max_voltage = 2.0 (float)
phase_inductance = 0.0 (float)
phase_resistance = 0.0 (float)
torque_constant = 1.0 (float)
direction = -1 (int)
motor_type = 2 (int)
current_lim = 20.0 (float)
current_lim_margin = 8.0 (float)
torque_lim = 15.0 (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)
acim_slip_velocity = 14.706000328063965 (float)
acim_gain_min_flux = 10.0 (float)
acim_autoflux_min_Id = 10.0 (float)
acim_autoflux_enable = False (bool)
acim_autoflux_attack_gain = 10.0 (float)
acim_autoflux_decay_gain = 1.0 (float)

In [37]: odrv0.axis1.controller.config
Out[37]:
gain_scheduling_width = 10.0 (float)
enable_vel_limit = True (bool)
enable_current_mode_vel_limit = True (bool)
enable_gain_scheduling = False (bool)
enable_overspeed_error = True (bool)
control_mode = 1 (int)
input_mode = 1 (int)
pos_gain = 20.0 (float)
vel_gain = 0.1666666716337204 (float)
vel_integrator_gain = 0.3333333432674408 (float)
vel_limit = 3.0 (float)
vel_limit_tolerance = 1.2000000476837158 (float)
vel_ramp_rate = 1.0 (float)
torque_ramp_rate = 0.009999999776482582 (float)
circular_setpoints = False (bool)
circular_setpoint_range = 1.0 (float)
homing_speed = 0.25 (float)
inertia = 0.0 (float)
axis_to_mirror = 255 (int)
mirror_ratio = 1.0 (float)
load_encoder_axis = 1 (int)
input_filter_bandwidth = 2.0 (float)
anticogging:
index = 0 (int)
pre_calibrated = False (bool)
calib_anticogging = False (bool)
calib_pos_threshold = 1.0 (float)
calib_vel_threshold = 1.0 (float)
cogging_ratio = 1.0 (float)
anticogging_enabled = True (bool)

What errors do you see if you run dump_errors(odrv0) in odrivetool?

I got no errors

dump_errors(odrv0)
axis0
axis: no error
motor: no error
fet_thermistor: no error
motor_thermistor: no error
encoder: no error
controller: no error
axis1
axis: no error
motor: no error
fet_thermistor: no error
motor_thermistor: no error
encoder: no error
controller: no error

For posterity:

User was in gimbal mode, so ended up going to high current mode and adjusting the calib voltage/current and the calib scan distance to get it to behave properly.

1 Like