My team has assembled a dual motor test bed: connected to a TI evaluation board running the motorware dual motor torque controller. To test that we have assembled our hardware correctly, we ran the “virtual spring” code provided. This was done by enabling the virtual spring option in code, and enabling the motors right after the system enable flag was raised.
We expected the virtual spring code to measure the deflection between the position of the encoder at start-up and the current position of the encoder, and produce an opposite and proportional torque to reduce the deflection. However, we found that the virtual spring code only added a constant resistance to the motion of the motors.
Furthermore, the motor defined as Motor 1 in code makes a high-pitched noise when enabled, while the motor defined as Motor 2 undergoes random oscillations. I believe this to be a control problem, as swapping out the physical motor assigned to Motor 1/2 in code results in the same observations. Digging into the code, I found that the control parameters assigned to motor 1 are different with motor 2.
My observations above may be specific to my test setup, but I would like to ask the following, more general questions:
- What is the expected behavior of the virtual spring code for the dual motor test bed?
- Does anyone have a similar experience with the virtual spring code, or can provide an explanation on why this may be happening to my test setup?
- Is there a reason why the motor 1 control parameters are different from the motor 2 control parameters, despite them controlling identical motor/encoder pairs?
Thank you for your time and suggestions!