This invention generally relates to logic decoding and control, and more particularly to a system and method for aligning a logic decoder and establishing a required processing speed in the presence of logic state width errors.
Logic signals convey information by assuming a particular state at a particular time. Errors can be introduced by either incorrect determination of the logic state or by incorrect timing. Determination of a logic state is often done by sampling a signal one or more times during a single state, and processing the samples prior to making a decision about the state. It is important, however, that processing take place during a reliable time window in which the proper state exists. If processing were to occur outside of a reliable time window, errors could occur that might negatively affect the reliability of the logic decision.
One possible source of timing errors that could occur is imperfect channel alignment for signals stored on an encoder. Ideally, each logic state would have the same width and would begin and end at perfectly predictable times. Unfortunately, this is not always the case. As a result, logic decoders that read encoder outputs are typically designed to use a safety factor. The safety factor is intended to ensure an appropriate processing frequency so that an expected worst-case error can be tolerated. If the worst-case expected error is encountered, the decoder will still have performed enough processing during an error-free time window to render a correct determination of the state. Otherwise, if the encoder performs better than the worst case, the processing speed is higher than may be necessary.
Logic encoders may use multiple channels, which provides a source for timing errors, such as a mismatch between the timing of the different channels. In general, a multi-channel system with N channels can assume 2N possible states. A quadrature decoder, for example, has two channels, A and B, and can assume one of four possible states. To determine a state, a quadrature decoder samples both channels of an encoder. If one of the channels changes state at an incorrect time relative to the other channel, a logic state width error arises. Typically, a decoder will require multiple processing cycles for a reliable decision of a single logic state. The ratio of actual processing cycles divided by the theoretical minimum is called a safety factor (SF). The desired number of processing cycles used to decide a single logic state is an engineering choice, based on the reliability, quality and performance of the components used to make a logic state decision.
If the quadrature decoder is decoding signals from a media that is being read, the timing errors depend on the rate at which the media is read and the density of the logic states on the media. With a linear media, the decoder would need to operate at a rate given by the formula:
CCFmin[MHz]=(Vencoder[m/s]/res [μm]) SFlinear (1)
Where:
For rotary encoders, the formula is:
CCFmin[MHz]=(ω[rpm]LPR IF/(60[sec]1[MHz])) SFrotary (2)
Where:
A common, fixed SF is typically used for all decoders of the same design. The fixed SF is typically determined by calculating the worst-case error that could result on a hypothetical system operating as the worst combination of design and manufacturing tolerance specifications, calculating the resulting error-free, and then determining the number of processing cycles in the error-free interval. For example, a decoder operating at four times the frequency of a typical quality encoder might have a safety factor of approximately three. Not all decoders, however, operate with identical timing errors, even if sharing many common traits, such as design and manufacturing line. Thus, while the chosen counter clock frequency (CCF) may be appropriate for some decoders, it may be unnecessarily high for others.
A system and method is arranged for determining the minimum required processing speed for a logic decoder using measurements of the encoder performance logic state width error along with a desired safety factor. The system and method may alternatively be used to assess the safety factor of a particular processing speed for a measured encoder performance logic state width error.
In one embodiment, the system and method allows for calculations of logic state width error using inequalities between states, and then allows a minimum processing speed to be set for each individual decoder. A controller monitors rising and falling edges of logic signals and counts the duration of the states. An inequality between states indicates an error. The error is then used to determine an error-free time interval during which the decoder should process the channels for determining the logic state. This interval together with a desired safety factor, are used to determine the processing rate. This then allows the minimum frequency to be used for a specific decoder, rather than using a predetermined frequency that may be unnecessarily high.
In one embodiment alignment information is outputted that permits optimization of the decoder. In another embodiment, once a processing speed has been set, it is compared to the error-free time interval to verify that a proper number of cycles occur during the error-free interval.
For a more complete understanding of the present invention, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:
In order for the error-free interval to contain N cycles,
Tcycle[s]N=Terror-free[s] (3)
Where:
For an ideal, error-free encoder, all logic states will have identical interval widths. However, error-free interval 301 is shorter than ideal state 1 interval 101 by the duration of interval 302. By calculating the duration of interval 301 relative to other intervals, measurement and reporting system 50 can then determine a logic state error width. That is, differences in the measured widths of logic states can be used to determine the logic state error width.
One embodiment of the invention comprises a measurement and reporting system 50 that can be used as discussed above. Measurement and reporting system 50 may comprise a hand-held unit with a user-readable display and a number of operational features. It can instantly calculate a maximum allowable state width error to assess the safety factor or calculate a safety factor using the state width error. It can provide real-time results for edge width separation, minimum logic state width, and errors in degrees. A resolution counter counts the number of codes per revolution for the quadrature output. Using the displayed information during installation and initial alignment and adjustment, a user may thus optimize encoder performance. For example, measurement and reporting system 50 may include a display that shows real-time error measurements that are read while the user is aligning the channels of an encoder. This enables a user to determine the direction of encoder adjustment that minimizes the measured error.
Although the present invention and its advantages have been described in detail, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims. Moreover, the scope of the present application is not intended to be limited to the particular embodiments of the process, machine, manufacture, composition of matter, means, methods and steps described in the specification. As one of ordinary skill in the art will readily appreciate from the disclosure of the present invention, processes, machines, manufacture, compositions of matter, means, methods, or steps, presently existing or later to be developed that perform substantially the same function or achieve substantially the same result as the corresponding embodiments described herein may be utilized according to the present invention. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or steps.
Number | Name | Date | Kind |
---|---|---|---|
4918708 | Pottinger et al. | Apr 1990 | A |
6198788 | Calamatas | Mar 2001 | B1 |
6205202 | Yoshida et al. | Mar 2001 | B1 |
6574211 | Padovani et al. | Jun 2003 | B2 |
6904098 | Isaksen et al. | Jun 2005 | B1 |
20040021632 | Lou | Feb 2004 | A1 |
20040025097 | Lou | Feb 2004 | A1 |
20050228654 | Prieto et al. | Oct 2005 | A1 |
Number | Date | Country | |
---|---|---|---|
20070143658 A1 | Jun 2007 | US |