Hardware: ODrive3.6-56V with firmware 0.5.1, 24V power supply, as5047 encoder.
Motor: TMotor U10 Plus 100kv.
System: Windows10, odrivetool 0.5.2.post0
I have already calibrated the motor and encoder.
When I’m using position control mode , once I set pos_input , the motor spin but stops after a few seconds. So I decided to switch to the speed control mode to test, but the motor also only turned for a few seconds. After the motor stops, I can hear the sound of current, and when I try to turn the motor by hand, I can feel the resistance obviously, as if it was locked in that position.
If I turn the motor hard, the motor will start to oscillate and finally report an error MOTOR_ ERROR_ CURRENT_ LIMIT_ VIOLATION.
I’ve tried to modify vel_ gain and vel_ integrator, but that can’t let the motor run normally.
Here is my motor configuration information:
In [12]: odrv0.axis0.config
Out[12]:
calibration_lockin:
accel: 20.0 (float)
current: 10.0 (float)
ramp_distance: 3.1415927410125732 (float)
ramp_time: 0.4000000059604645 (float)
vel: 40.0 (float)
can_heartbeat_rate_ms: 100 (uint32)
can_node_id: 0 (uint32)
can_node_id_extended: False (bool)
dir_gpio_pin: 2 (uint16)
enable_step_dir: False (bool)
enable_watchdog: False (bool)
general_lockin:
accel: 20.0 (float)
current: 10.0 (float)
finish_distance: 100.0 (float)
finish_on_distance: False (bool)
finish_on_enc_idx: False (bool)
finish_on_vel: False (bool)
ramp_distance: 3.1415927410125732 (float)
ramp_time: 0.4000000059604645 (float)
vel: 40.0 (float)
sensorless_ramp:
accel: 200.0 (float)
current: 10.0 (float)
finish_distance: 100.0 (float)
finish_on_distance: False (bool)
finish_on_enc_idx: False (bool)
finish_on_vel: True (bool)
ramp_distance: 3.1415927410125732 (float)
ramp_time: 0.4000000059604645 (float)
vel: 400.0 (float)
startup_closed_loop_control: False (bool)
startup_encoder_index_search: False (bool)
startup_encoder_offset_calibration: False (bool)
startup_homing: False (bool)
startup_motor_calibration: False (bool)
startup_sensorless_control: False (bool)
step_dir_always_on: False (bool)
step_gpio_pin: 1 (uint16)
turns_per_step: 0.0009765625 (float)
watchdog_timeout: 0.0 (float)
In [13]: odrv0.axis0.motor.config
Out[13]:
acim_autoflux_attack_gain: 10.0 (float)
acim_autoflux_decay_gain: 1.0 (float)
acim_autoflux_enable: False (bool)
acim_autoflux_min_Id: 10.0 (float)
acim_gain_min_flux: 10.0 (float)
acim_slip_velocity: 14.706000328063965 (float)
calibration_current: 10.0 (float)
current_control_bandwidth: 1000.0 (float)
current_lim: 20.0 (float)
current_lim_margin: 8.0 (float)
direction: 1 (int32)
inverter_temp_limit_lower: 100.0 (float)
inverter_temp_limit_upper: 120.0 (float)
motor_type: 0 (int32)
phase_inductance: 2.3349057300947607e-05 (float)
phase_resistance: 0.048726052045822144 (float)
pole_pairs: 20 (int32)
pre_calibrated: True (bool)
requested_current_range: 60.0 (float)
resistance_calib_max_voltage: 2.0 (float)
torque_constant: 0.03999999910593033 (float)
torque_lim: inf (float)
In [14]: odrv0.axis0.encoder.config
Out[14]:
abs_spi_cs_gpio_pin: 5 (uint16)
bandwidth: 3000.0 (float)
calib_range: 0.05000000074505806 (float)
calib_scan_distance: 131.8800048828125 (float)
calib_scan_omega: 12.566370964050293 (float)
cpr: 16384 (int32)
enable_phase_interpolation: True (bool)
find_idx_on_lockin_only: False (bool)
idx_search_unidirectional: False (bool)
ignore_illegal_hall_state: False (bool)
mode: 257 (int32)
offset: 18453 (int32)
offset_float: 0.6977440714836121 (float)
pre_calibrated: True (bool)
sincos_gpio_pin_cos: 4 (uint16)
sincos_gpio_pin_sin: 3 (uint16)
use_index: False (bool)
zero_count_on_find_idx: True (bool)
In [15]: odrv0.axis0.controller.config
Out[15]:
anticogging:
anticogging_enabled: True (bool)
calib_anticogging: False (bool)
calib_pos_threshold: 1.0 (float)
calib_vel_threshold: 1.0 (float)
cogging_ratio: 1.0 (float)
index: 0 (uint32)
pre_calibrated: False (bool)
axis_to_mirror: 255 (uint8)
circular_setpoint_range: 1.0 (float)
circular_setpoints: False (bool)
control_mode: 2 (int32)
enable_current_mode_vel_limit: True (bool)
enable_gain_scheduling: False (bool)
enable_overspeed_error: True (bool)
enable_vel_limit: True (bool)
gain_scheduling_width: 10.0 (float)
homing_speed: 0.25 (float)
inertia: 0.0 (float)
input_filter_bandwidth: 2.0 (float)
input_mode: 1 (int32)
load_encoder_axis: 0 (uint8)
mirror_ratio: 1.0 (float)
pos_gain: 20.0 (float)
torque_ramp_rate: 0.009999999776482582 (float)
vel_gain: 0.20000000298023224 (float)
vel_integrator_gain: 0.0 (float)
vel_limit: 30.0 (float)
vel_limit_tolerance: 1.2000000476837158 (float)
vel_ramp_rate: 1.0 (float)
Does anyone know what the problem is?