This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Tuning position control with geared motor

Other Parts Discussed in Thread: MOTORWARE

Hi there,

I'm trying to do position control with an 8-pole (4 pole-pairs) motor and a 1:5 gearbox. I have an encoder attached to the shaft of the gearbox. Right now I'm trying to tune the bandwidth parameter with lab 13a. Sometimes, if I exert some torque to the shaft of the gearbox to see how tightly the motor is holding "0" the motor will start to move randomly (high amplitude vibration, no reaction torque, etc.). Does anyone know what this could be a symptom of?

Background: My encoder gives 1000 pulses per rotation of the gearbox shaft, so I set USER_MOTOR_ENCODER_LINES to 200. I got through the rest of the labs fine. Velocity control using SpinTAC was a little shaky at low RPM but I assumed this was just because of the low number of poles.

Thanks!
Ben

  • Ben,

    Placing an encoder on the output shaft of the gearbox can prove difficult for position control.  What ends up happening is that your gearbox has backlash (due to gaps between the gear teeth) and the shaft of the motor can rotate without the encoder seeing the rotation.  This backlash is seen to the controller as a delay which limits the maximum bandwidth that can be applied.  

    This situation will work ok for velocity control since backlash is directional.  If a motor continuously rotates in one direction it won't see the effect of backlash since the effect only occurs on direction changes.  I think the control difficulties with low rpm control is due to the minimum resolution of your system.  With a 200 count encoder and 1ms speed loop sampling, this results in a minimum resolution of 75 rpm ( 1 / (4 * 200) / 1ms * 60 sec/min ).

    I think if you move the encoder onto the shaft of the motor this will resolve all of these issues.

  • Hi Adam,

    The backlash of the gearbox I'm using is rated at less or equal to 15 arcminutes (0.25 degrees), do you think it will be possible to do position control with this gearbox if I cannot access the shaft of the motor?

    Also, in lab 12b the speed calculated from the QEP pulses seems to be much more nosy than the one calculated the back emf. Is this expected? The motor is turning, so the gearbox should be fully engaged. It seems to me that the speed from the encoder should be more accurate than other.

    Thanks!
    Ben

  • UPDATE: the encoder I was using was not giving an accurate reading (it was very noisy). After fixing this position control is working well, even with the gearbox.

    Thanks!
  • Ben,

    I'm glad to hear you were able to get it to work!

    Regarding the encoder signal, MotorWare only implements the pulse counting method of encoder speed calculation.  The minimum accuracy of this method with your setup is 75 rpm.  So the unfiltered output speed from SpinTAC Position Converter is in multiples of 75 rpm.  It is not surprising that the back emf method of speed estimation is less noisy.  With more precise encoders (2000 count) I've been able to get very smooth speed feedback signals that have allowed me to have very smooth control even down to 1rpm.

  • Benjamin,

    I'd like to know what was your encoder line configuration. Is it possible for you to share it ?

    Thank you,
  • Adam,

    I'm working with a hub motor which is not possible to install encoder on the shaft, so I connect the incremental encoder to the gearbox shaft. Now the problem is when I run the Lab12a and after enabling the gMotorVars.SpinTAC.VelIdRun flag, the motor shaft just locked without any spinning and after 5 or 6-second shaft released and gMotorVars.SpinTAC.VelIdErrorID shows 2004 error. The motor was spin in CCW direction in Lab5c and also the encoder value is positive when the motor is turning CCW. Do you have any idea about this problem?

    Thanks,
    Behnam
  • Behnam,

    When using an encoder an the opposite side of a gearbox it is important that the lines put into InstaSPIN-MOTION are the effective number of lines for a single rotation of the motor.

    Add st_obj.pos.conv.Pos_Mrev (IQ24 variable) to the watch window, if you manually rotate the gearbox shaft one revolution, this should be equal to the number of revolutions seen by the motor.