TIDUA05B June 2015 – March 2025
Practically, the digitized signals ATTL and BTTL, which are input to the quadrature encoder pulse counter, typically have a phase shift compared to the analog signals. This is mainly due to hysteresis and propagation delay of the comparators, as well as due to non-ideal synchronization between latching the incremental count and sampling the analog inputs A and B.
The impact of the hysteresis on the phase shift is almost independent of the signal frequency, but almost inverse proportional to the signal amplitude. The impact of a propagation delay and a non-ideal synchronization between sampling the analog signal and latching the incremental count is almost independent of the amplitude, but proportional to the frequency. Therefore, the maximum phase shift occurs at maximum Sin/Cos encoder frequency with minimum amplitude.
This means that at each transition to the next quadrant, the incremental counter is not updated immediately because of the phase lag, for example, as shown for the first quadrant in Figure 1-6.
Figure 1-6 Phase
Shift of ATTL versus the Analog Signal A, due to Phase LagThe factors outlined cannot be omitted and hence a method needs to be applied to detect and correct these corner cases. Due to the ambiguity or the lower two bits of incremental line count and the analog phase, a correction method as outlines in Table 1-6 can be applied, as long as the phase shift remains less than ±90°.
Since only the phase information is used to identify the quadrant, there are only two exceptions to consider, which occur during the transition from quadrant 4 to quadrant 1, or quadrant 1 to quadrant 4, depending on the rotation direction.
| INCREMENTAL COUNT [incr] | PHASE φA,B | CORRECTION METHOD |
|---|---|---|
| incr%4 = 3 | 0 ≤ Phase < 90 | incr = incr+1 if incr > 4 × N – 1 then incr = 0 |
| Incr%4 = 0 | 270 ≤ Phase < 360 | incr = incr-1 if incr < 0 then incr = 4 × N – 1 |
The correction method only works if the phase shift between the analog A and B and the digital signal ATTL and BTTL is less than ±90°.
A worst case calculation for this design is outlined in Section 1.4.