I am attenpting to drive a 20-A motor in sensorless velocity control mode. In order to get the motors to output the torque I need for my system, I had to set the current_setpoint parameter to 100 which keeps the motor from stalling. However, in doing so, after exiting the ramp-up state the motor will spin up, exceeding the target velocity before slowing down again.
I have adjusted the motor current and velocity PI parameters:
Current_I: No change, motor stalls at lower load
Veloc_P: Increasing this parameter would reduce the amount of windup, however the motor does not run properly if this value exceeds .15 (It vibrates, makes a loud noise, and heats up)
Veloc_I: Increasing this value reduced the amount of time it takes for the motor to reach its target speed after the windup. I increased by a factor of 10 from .1->1
Here is my setup code:
odrv0.axis0.controller.config.control_mode = CTRL_MODE_VELOCITY_CONTROL
odrv0.axis0.sensorless_estimator.config.pm_flux_linkage = 5.51328895422 / (POLEPAIRS * MOTORKV) #Constants defined above
odrv0.axis0.controller.vel_ramp_target = 500 odrv0.axis0.controller.vel_ramp_enable = True odrv0.axis0.config.startup_motor_calibration = True odrv0.axis0.config.spin_up_acceleration = 1000 odrv0.axis0.config.ramp_up_time = .1 odrv0.axis0.controller.current_setpoint = 20 odrv0.axis0.config.spin_up_target_vel = 200 odrv0.axis0.config.spin_up_current = 20 odrv0.axis0.motor.config.current_lim = 27 odrv0.axis0.motor.current_control.p_gain = .015 #.015 odrv0.axis0.motor.current_control.i_gain = 102 #102 odrv0.axis0.controller.config.vel_gain = 0.1 #0.1 odrv0.axis0.controller.config.vel_integrator_gain = 1 #0.1 odrv0.axis0.requested_state = AXIS_STATE_IDLE odrv0.axis0.requested_state = AXIS_STATE_SENSORLESS_CONTROL
Is there another tuning parameter I may be missing? I need the current setpoint to be high, else the motor will stall at too low a load, but the windup is its own control issue.