Motor spins uncontrollably

Hello,
I finished the calibration of the encoder and motor without any error messages at the moment. I try then velocity control with 3000 counts/s. The motor starts spinning but very fast and the encoder measures a velocity of ca. -220000 counts/s. I am using T-Motor U13 KV85 and an incremental encoder with 8192 cpr. My settings are below:

motor.is_calibrated = True
motor.current_control.p_gain=0.035
motor.current_control.i_gain=46.91
motor.config.pre_calibrated=True
motor.config.pole_pairs=12
motor.config.calibration_current=10.0
motor.config.resistance_calib_max_voltage=2.0
motor.config.direction=-1
motor.config.current_lim = 30
encoder.index_found=True
encoder.config.mode=0
encoder.config.use_index=True
encoder.config.pre_calibrated=True
encoder.config.cpr=8192
encoder.config.offset=-8362
encoder.config.offset_float=0.32
encoder.config.bandwith=1000
encoder.config.calib_range=0.1
controller.config.control_mode=2
controller.config.pos_gain=20
controller.config.vel_gain=0.005
controller.config.vel_integrator_gain=0

Does anyone have a solution or has experienced the same problem? I have the feeling, that my encoder offset is quite high.

Yeah that offset doesn’t look right. Offset issues can happen due to electronic noise. How are you connecting your encoder?

It is connected via ABI. I solved this problem as I redid the encoder offset calibration. My motor has a quite high cogging torque so I set the calibration current up to 20 A. After this the calibration of the encoder offset was running a lot smoother.

Now I have another problem with the encoder offset on my second motor on axis1.
How do I know whether a encoder offset is quite alright or quite high? For the second motor I use an encoder with 16384 cpr and get an offset of -4992.

If I try to go into closed loop control and start the velocity control the motor starts spinning with 3000 c/s and then stops as it has the error: current unstable. I tried to set the current_limit up to 13 A but still Iq_measured gets higher than 16 A. I do not want to rise it any further as the motor I am using is limited to 15 A. I want to use the set up in velocity control. I have the feeling that my gains are quite high. I do not have tuned them yet though as I am still not finished with calibration.

Current Control:
p_gain=0.106
i_gain=277.59
Velocity Control:
vel_gain=0.0005
vel_integrator_gain=0.001

There’s something wrong with the calibration or encoder. If your cogging torque is that high, I’m not actually entirely sure how to calibrate that reliably. Perhaps @Tobin_Hall can help? I know he was dealing with high cogging torque motors at one point.

The cogging torque of the motor on axis1 is not that high. I am not using the same motor on axis 1 and 0. On axis 1 I use this T-Motor. Is the encoder offset of -4992 indicating that the encoder slipped or is not placed correctly?

Edit: it seems as there is something wrong with the encoder as it also now finds multiple indexes as was mentioned in this post.