Hi all!
After switching from a custom Odrive-firmware to the latest official one 0.5.4, I have a strange behaviour during startup calibration of the actuators of my motion-platform.
When switching on the Odrives, the actuators extends by aprox. 10-20 mm and then immediately sagg down to the hard-stop before the usual calibration-sequence will be performed. The video shows exactly this behaviour:
https://youtube.com/shorts/8XyyIwjoEFo?feature=share
After this calibration the Odrive enters the closed loop control and everything runs without problems.
After one whole day testing without success , I kindly want to ask you experts for help to avoid this sagging!
Thanks!!
Wickie
For information: I use the original Odrive 3.6 56V.
This is the recording with liveplotter:
(start_liveplotter(lambda:[odrv0.axis1.encoder.pos_estimate, odrv0.axis1.controller.pos_setpoint]) )
This is the Axis0 part of my config (same as Axis1):
“axis0”:{
“acim_estimator”:{
“config”:{
“slip_velocity”:14.706000328063965
}
},
“config”:{
“dir_gpio_pin”:2,
“enable_sensorless_mode”:false,
“enable_step_dir”:false,
“enable_watchdog”:false,
“startup_closed_loop_control”:true,
“startup_encoder_index_search”:true,
“startup_encoder_offset_calibration”:true,
“startup_homing”:false,
“startup_motor_calibration”:false,
“step_dir_always_on”:false,
“step_gpio_pin”:1,
“watchdog_timeout”:0.0,
“calibration_lockin”:{
“accel”:20.0,
“current”:10.0,
“ramp_distance”:3.1415927410125732,
“ramp_time”:0.4000000059604645,
“vel”:40.0
},
“can”:{
“encoder_rate_ms”:10,
“heartbeat_rate_ms”:100,
“is_extended”:false,
“node_id”:0
},
“general_lockin”:{
“accel”:20.0,
“current”:10.0,
“finish_distance”:100.0,
“finish_on_distance”:false,
“finish_on_enc_idx”:false,
“finish_on_vel”:false,
“ramp_distance”:3.1415927410125732,
“ramp_time”:0.4000000059604645,
“vel”:40.0
},
“sensorless_ramp”:{
“accel”:200.0,
“current”:10.0,
“finish_distance”:100.0,
“finish_on_distance”:false,
“finish_on_enc_idx”:false,
“finish_on_vel”:true,
“ramp_distance”:3.1415927410125732,
“ramp_time”:0.4000000059604645,
“vel”:400.0
}
},
“controller”:{
“config”:{
“axis_to_mirror”:255,
“circular_setpoint_range”:1.0,
“circular_setpoints”:false,
“control_mode”:3,
“electrical_power_bandwidth”:20.0,
“enable_gain_scheduling”:false,
“enable_overspeed_error”:true,
“enable_torque_mode_vel_limit”:true,
“enable_vel_limit”:true,
“gain_scheduling_width”:10.0,
“homing_speed”:0.25,
“inertia”:0.0,
“input_filter_bandwidth”:200.0,
“input_mode”:5,
“load_encoder_axis”:0,
“mechanical_power_bandwidth”:20.0,
“mirror_ratio”:1.0,
“pos_gain”:20.0,
“spinout_electrical_power_threshold”:10.0,
“spinout_mechanical_power_threshold”:-10.0,
“steps_per_circular_range”:1024,
“torque_mirror_ratio”:0.0,
“torque_ramp_rate”:0.009999999776482582,
“vel_gain”:0.20000000298023224,
“vel_integrator_gain”:0.3333333432674408,
“vel_integrator_limit”:“Infinity”,
“vel_limit”:100.0,
“vel_limit_tolerance”:1.2000000476837158,
“vel_ramp_rate”:100.0,
“anticogging”:{
“anticogging_enabled”:true,
“calib_anticogging”:false,
“calib_pos_threshold”:1.0,
“calib_vel_threshold”:1.0,
“cogging_ratio”:1.0,
“index”:0,
“pre_calibrated”:false
}
}
},
“encoder”:{
“config”:{
“abs_spi_cs_gpio_pin”:1,
“bandwidth”:1000.0,
“calib_range”:0.019999999552965164,
“calib_scan_distance”:50.26548385620117,
“calib_scan_omega”:12.566370964050293,
“cpr”:8192,
“direction”:1,
“enable_phase_interpolation”:true,
“find_idx_on_lockin_only”:false,
“hall_polarity_calibrated”:false,
“hall_polarity”:0,
“ignore_illegal_hall_state”:false,
“index_offset”:0.0,
“mode”:0,
“phase_offset_float”:1.1555819511413574,
“phase_offset”:4328,
“pre_calibrated”:false,
“sincos_gpio_pin_cos”:4,
“sincos_gpio_pin_sin”:3,
“use_index_offset”:true,
“use_index”:true
}
},
“max_endstop”:{
“config”:{
“debounce_ms”:50,
“enabled”:false,
“gpio_num”:0,
“is_active_high”:false,
“offset”:0.0
}
},
“mechanical_brake”:{
“config”:{
“gpio_num”:0,
“is_active_low”:true
}
},
“min_endstop”:{
“config”:{
“debounce_ms”:50,
“enabled”:false,
“gpio_num”:0,
“is_active_high”:false,
“offset”:0.0
}
},
“motor”:{
“config”:{
“I_bus_hard_max”:“Infinity”,
“I_bus_hard_min”:"-Infinity",
“I_leak_max”:0.10000000149011612,
“R_wL_FF_enable”:false,
“acim_autoflux_attack_gain”:10.0,
“acim_autoflux_decay_gain”:1.0,
“acim_autoflux_enable”:false,
“acim_autoflux_min_Id”:10.0,
“acim_gain_min_flux”:10.0,
“bEMF_FF_enable”:false,
“calibration_current”:40.0,
“current_control_bandwidth”:1000.0,
“current_lim_margin”:8.0,
“current_lim”:60.0,
“dc_calib_tau”:0.20000000298023224,
“inverter_temp_limit_lower”:100.0,
“inverter_temp_limit_upper”:120.0,
“motor_type”:0,
“phase_inductance”:2.7399999453336932e-05,
“phase_resistance”:0.05000000074505806,
“pole_pairs”:7,
“pre_calibrated”:true,
“requested_current_range”:60.0,
“resistance_calib_max_voltage”:2.0,
“torque_constant”:0.05550000071525574,
“torque_lim”:“Infinity”
},
“fet_thermistor”:{
“config”:{
“enabled”:true,
“temp_limit_lower”:100.0,
“temp_limit_upper”:120.0
}
},
“motor_thermistor”:{
“config”:{
“enabled”:false,
“gpio_pin”:4,
“poly_coefficient_0”:0.0,
“poly_coefficient_1”:0.0,
“poly_coefficient_2”:0.0,
“poly_coefficient_3”:0.0,
“temp_limit_lower”:100.0,
“temp_limit_upper”:120.0
}
}
},
“sensorless_estimator”:{
“config”:{
“observer_gain”:1000.0,
“pll_bandwidth”:1000.0,
“pm_flux_linkage”:0.0015800000401213765
}
},
“trap_traj”:{
“config”:{
“accel_limit”:200.0,
“decel_limit”:50.0,
“vel_limit”:200.0
}
}
},