CLOSED LOOP CONTROL problem

Hi,
I just updated the firmware to Odrive-devel, and I successfully calibrated the motor and the encoder to enter the closed loop, but I don’t know why the motor can’t be kept in the closed loop state, and it can turn easily.And there are no mistakes, but when I perform odrv0 axis0. Controller. Input_pos = 16384 command motor, rush out, then stopped.I feel really confused, and sincerely hope to get your help.My motor is X3520 KV:520.
Here is my configuration:

MOTOR.config:
pre_calibrated = True (bool)
pole_pairs = 7 (int)
calibration_current = 5.0 (float)
resistance_calib_max_voltage = 2.0 (float)
phase_inductance = 1.1667480976029765e-05 (float)
phase_resistance = 0.049539387226104736 (float)
torque_constant = 0.01590000092983246 (float)
direction = 1 (int)
motor_type = 0 (int)
current_lim = 50.0 (float)
current_lim_margin = 8.0 (float)
torque_lim = inf (float)
inverter_temp_limit_lower = 100.0 (float)
inverter_temp_limit_upper = 120.0 (float)
requested_current_range = 60.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)
R_wL_FF_enable = False (bool)
bEMF_FF_enable = False (bool)

ENCODER.config:
mode = 0 (int)
use_index = True (bool)
find_idx_on_lockin_only = False (bool)
abs_spi_cs_gpio_pin = 1 (int)
zero_count_on_find_idx = True (bool)
cpr = 16384 (int)
phase_offset = 11618 (int)
phase_offset_float = 0.6045312285423279 (float)
pre_calibrated = True (bool)
enable_phase_interpolation = True (bool)
bandwidth = 1000.0 (float)
calib_range = 0.019999999552965164 (float)
calib_scan_distance = 50.26548385620117 (float)
calib_scan_omega = 12.566370964050293 (float)
idx_search_unidirectional = False (bool)
ignore_illegal_hall_state = False (bool)

CONTROLLER.config:
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 = 3 (int)
input_mode = 5 (int)
pos_gain = 1.0 (float)
vel_gain = 0.0003000000142492354 (float)
vel_integrator_gain = 0.0010000000474974513 (float)
vel_limit = 655360.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 = 0 (int)
input_filter_bandwidth = 2.0 (float)

Hi Kang, please read the migration guide for 4.12 to 0.5.1 https://docs.odriverobotics.com/migration

Thank you. I have read the document carefully and solved the problem well

1 Like