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.

TIDA-00176: Questions about encoder equations

Part Number: TIDA-00176

Dear champs,

I am asking this for our customer.

In the below figure from Sec 1.3.1.4.

We are confused about the equation (5),

How do you drive equation (5) (page 7)?

Is the sign multiplication (in red in the above figure) a typo, that is, it should be removed?

Why is the denominator (in green in the above figure) "N"? (or should it be "4N-1", we think?) 

Wayne

  • Hi Wayne,

    One of the authors has been contacted. Please allow a few days for him to reply.
  • Hello Wayne,

    thank you for your feedback. The 'x' is a typo in equation 5 and should removed. Thanks for finding that.

    The denominator N (line count) at the beginning of equation 5 is based assuming an integer number for 'incr' and used like with C code (int) on e.g. C2000 MCU. Since 'incr' is treated an integer number, shifting right removes the last two LSB, and the fractional part is removed (truncated). To make it more clear, I should have added this information to the equation 5.

    The incremental count I use is 4-times the line count, but I ignore (truncate) the 4 quadrants (equivalent to 360 degree phase within one line count), by shifting two bits to the right. Then I take the angle derived from the arc tangent, which calculates the phase over one line count. This give the fractional part of the angle scaled to 360 degree. Please see figure 3 for illustration too.

    Example:
    Encoder line count 'N'[: 360
    Incremental count 'incr', e.g. (360 x 4)-1 = 1439 (maximum incremental count before is rolls over to 0)
    Incremental Phase 'phi', e.g.: 300 degree

    360/360 x ((int) (1439 >> 2) + 300/360) = (359 + 300/360) = 359.83degree

    Regards,
    Martin
  • Martin,

    Thank you for your information.

    Wayne