Speed Dependant Selection and Processing of Encoder Edges for most Accurate Speed Measurement
Original Publication Date: 2004-Oct-25
Included in the Prior Art Database: 2004-Oct-25
Related PeopleOther Related People:
Encoders are speed measurement transducers, which typically output quadrature square waves on two channels (ENC_A and ENC_B, cf. Figure 1). From these signals, the direction of rotation of the encoder can be determined from the relative phase of the signals. The encoder reference signal ENC_R indicates when the encoder wheel is at the zero degree position. An encoder wheel typically provides a number of pulses for every revolution of the encoder wheel. The number of pulses is defined as the encoder CPR (Counts Per Revolution). Hereby, the encoder CPR refers to the number of positive edges on ENC_A. The frequency of the square waves is directly proportional to the encoder rotational speed. In order to calculate the speed two pieces of information are needed, the number of encoder increments between two sampling points (n2-n1, cf. Figure 2) and the time between these two sampling points (t2-t1, cf. Figure 2). The encoder speed in RPM can then be calculated from the equation: EncoderRPM = ((n2-n1)/CPR)*(60/(t2-t1)). There are actually two possibilities for measuring the encoder speed. Either the time between any encoder edge on ENC_A or ENC_B or only the positive edges of the ENC_A signal can be used to measure the encoder speed. Using all the available encoder edges for the speed measurement gives the fastest update as there are four encoder edges per encoder pulse on the ENC_A and ENC_B encoder channels. However, the speed measurement is only accurate if the time between all the encoder edges is equal. If the mark-space ratio of the encoder signal is not exact, then there will be an error in the speed measurement. This is illustrated in Figure 3. Encoder manufacturers typically ensure that the time between positive edges on the encoder ENC_A channel is exact, but unfortunately the mark-space ratio of the encoder signals is not guaranteed. Therefore, the only way to ensure an accurate speed measurement is to use only the positive edge of the ENC_A channel. On the other hand, if the frequency of the timestamped encoder pulses is lower then the frequency of the measurement update, the results of the speed measurement become inconsistent. For a typical encoder with a CPR of 500 and a speed loop controller that updates every 2ms, the critical frequency is about 1Hz if only the positive edge of the ENC_A channel is used. However, if all encoder edges are used, there can be four regular speed measurement updates per second.