Why does this situation occur in mirror mode?

Hi,
I am trying to use one motor’s velocity to control another motor’s using INPUT_MODE_MIRROR .But the speed of two motors were same and axis1 is not rotating at the pre-set -9 turn/s.So what happened?
I gave command like this:
odrv0.axis0.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL
odrv0.axis0.controller.config.input_mode = INPUT_MODE_PASSTHROUGH
odrv0.axis1.controller.config.axis_to_mirror = 0
odrv0.axis1.controller.config.mirror_ratio = -0.9
odrv0.axis1.controller.config.input_mode = INPUT_MODE_MIRROR
odrv0.axis0.controller.input_vel = 10

the plot like this:

Make sure odrv0.axis1.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL also

Yes.No matter what the velocity set differential is, both will remain at the same speed. Since there is an effect of the two motor mechanics in my design, does this mean that it is the PID parameter settings that need to be adjusted😭?

Can you confirm axis1 is in velocity control mode? I see mirror_ratio is -0.9, and the vel_setpoint = -9 turns/sec, but it’s actually rotating at -10. That means either position control is overriding the tracking, or your mechanism is locking these two together.

What does the mechanism look like?

Yes,I have set axis0 and axis1 both in velocity mode since then.And axis 0’s velocity is 10, axis1 's velocity is -9.You can see the velocity estimate plot,they rotate in the opposite direction at the same spped which is between 9 and 10.And at last thet rotate in 9.

While the phase current plot shows that their current both increase until axis0 get its current lim.

The mechanism is the output of each motor is connected to a planetary reducer, and the ring gears mesh with each other,so one motor controls a reducer’s sun gear and one motor controls a reducer’s ring gear.The differential velocity can rotate the planetary gears.The simulation of this mechanism works fine.

So I dont know why these two motors can not rotate at their set speed.Is the pid parameter settings wrong?


I don’t think so? What do you have set?

In [27]: odrv0.axis0.motor.current_control.p_gain
Out[27]: 0.382885605096817

In [28]: odrv0.axis0.motor.current_control.i_gain
Out[28]: 431.4696044921875

In [29]: odrv0.axis1.motor.current_control.i_gain
Out[29]: 405.19171142578125

In [30]: odrv0.axis1.motor.current_control.p_gain
Out[30]: 0.31496915221214294

It seems that the pid parameters only affect how quickly the current lim is reached from the plot,but i have no idea why this situation occured​:sob::sob::sob:

thanks a lot for your help​:sob::sob::sob: