how to solve the Hoverboard motor(10 pole pair) use build in hall encoder(60 ppr) in velocity mode may have a reverse direction movement when sotp.
https://youtu.be/Xxm1-gWQeik
in this video,the move base reverse move everytime then stop.
I try reduce the vel_gain,but it will cause the motor torque become very low,can anyone give me any suggest about the param adjust,please.or in the low resolution encoder can not have a good control result.
Options:
- Set
vel_integrator_gain = 0
or - Use INPUT_MODE_VEL_RAMP (and
vel_ramp_rate
)
thank you for your suggestion,I try both of the two opthions.
when I set vel_integrator_gain
to 0,the motor torque become very low,even can not move the base(no extern load,just like the video show)
and I try set INPUT_MODE_VEL_RAMP and vel_ramp_rate,when vel_ramp_rate is low,the motor Accel very slow ,but if vel_ramp_rate set to the value satisfy my accel,the reverse direction move come back,now this is my controller config below:
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 = 2 (int)
input_mode = 2 (int)
pos_gain = 1.0 (float)
vel_gain = 0.15000000596046448 (float)
vel_integrator_gain = 0.5 (float)
vel_limit = 30.0 (float)
vel_limit_tolerance = 1.2000000476837158 (float)
vel_ramp_rate = 8.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)
is ther any other param turn I can try?thank you again!
when I set vel_integrator_gain to 0,the motor torque become very low
Then you need to increase vel_gain
vel_gain increase caused motor shake
This is an intrinsic issue to the fact that hall sensors are extremely low resolution, unfortunately. Using the VEL_RAMP will help, but unfortunately precise velocity control at low speeds is just quite difficult with hall sensors.