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.

How can I improve the 500 line quadrature encoder resolution for low speed control

Other Parts Discussed in Thread: MOTORWARE, TMS320F28069

Hello,

I am using DRV8312-69M-KIT to control BLDC with 500 line quadrature encoder.

As I know, currently MotorWare only implement the pulse-counting method. If I want to improve the resolution for low speed control, I need implement the pulse-timing method.

Can you tell me how can I improve the resolution? What interface I need implement?

Thanks in advance.

  • Jason,

    There is a good guide on how to use pulse timing using the eQEP module in the TMS320F28069 Reference Guide (SPRUH18D). Look at section 7.5
  • Adam,

    Thank you very much for your response.

    My understanding is:  SpinTAC velocity currently use the speed calculated by SpinTAC position with STPOSCONV_getVelocityFiltered interface in lab 12b. If I want to implement a new speed calculation interface, I need replace this interface with a new one which calculate the speed from pulse-timing.

    Is my understanding right?

  • Jason,

    That is exactly right. In lab 12b we only use STPOSCONV in order to calculate the speed feedback.
  • Hello Adam,

    When I use pulse-timing  method to calculate the speed, I think what I get from the eQEP is deltaT after I set fixed unit position.

    It seems the speed_gain in ENC_Obj is not useful any more because it's only use to convert encoder counter.

    //!< gain which converts a difference in encoder counts to Q24 normalized electrical freq

    How can I calculate the speed that SpinTAC need use? And because the time is changing, how can I set the LPF parameter (speed_lpf_cx, speed_lpf_cy)?

    Many thanks.

  • Jason,

    I believe that is what the output of the pulse-timing method from the eQEP module produces.  

    The following calculation should get you to speed from deltaT:

    ((unit position / total count) * (system clock / clock divider) * 60 * (USER_MOTOR_NUM_POLE_PAIRS / (60.0 * USER_IQ_FULL_SCALE_FREQ_Hz)) * 2^24) / deltaT [in ticks]

    I believe this will give you rpm in fixed point in the correct scaling.  While that first term is daunting, it is just a scaling term.  So it can be calculated once and reused.

  • Adam,

    Thank you very much for your help.

    Does USER_IQ_FULL_SCALE_FREQ_Hz need larger than ((unit position / total count) * (system clock / clock divider) * (USER_MOTOR_NUM_POLE_PAIRS)?

    Best Regards.
  • Jason,

    I would not expect it to be.  System clock / clock divider will end us being a very large value.  The value for USER_IQ_FULL_SCALE_FREQ_Hz should be determined based on the application requirements as described in the user.h file.

  • Hi Adam,

    Thanks for your help, I have implemented the pulse-timing speed calculation.

    Currently I use the motor reference speed 50 rpm (with 10:1 gearbox, actual output speed is 5 rpm)to do the low speed test, set Upps to 1 prescaler and Ccps to 128 divider, the timing between 1 QCLK is 600us.

    I think the QEP pulsing timing speed resolution should be enough to do the speed loop control.

    But actually the motor rotation is not very smooth (start then stop and again).

    Do you have any good suggestion?

    Best Regards.
  • Jason,

    Sounds like you need to tune the speed regulator.  Also watch the feedback speed and make sure it has the required resolution.  Make sure that it isn't shoppy or heavily quantized.