EETimes

Embedded Systems December 2000 Vol13_13

Issue link: http://dc.ee.ubm-us.com/i/71850

Contents of this Issue

Navigation

Page 167 of 197

SPECTRA . FIGURE 1 ifrigonometric relationships Hypotenuse - - - - - - - - - - - - -", / /1 I ,-- z I,:' I ' 1\ I I. '- - - tan bili ty of the device that receives this information to derive direction and count informaLion from it. This is usu- ally done with a flip-flop for direction and an exclusive-or gate to the two bi ts of quad rature information into a sin- gle se rial bit stream. This is a cn,lde form of encoding and ultimately expensive because for real precision and stiffness in sen r o applica- tions, you need a very high-resolution encoder. Because the output is based on light shining th rough small holes in a wheel inside the encoder that is picked up by optical receivers, digital quadra- ture encoders become vel)' expensive as the resolution goes up. To get higher resolution, you must put a greater num- ber of holes on the wheel and confine the light to an increasingly narrower space, and this must be done with preci- sion; an expensive mechanical problem. As a result, analog encoders are freque ncy to a digital one by taking the a rctange nt of th e ratio of th e analog freque ncy to the sample rate. To be precise: analog prototype. If they want a final digital frequency of 10kHz, the n they must pre-wal-p this to create an analog frequency for their proto types. These functions give us the ability to map a vertical segment on the s- plane to an angle on the unit circle in the z-plane and move it back again. The second expression is the more pedagogical one and is seldom used as is. Here, J,. is the corner frequency and j, is the sample rate. We can also make the tran ition back to the s-plane with the tangent. This is known as pre- warping: w - (1..) tan(~) (l - T (T 1 2) In this equation and the previou one, w" is the analog frequency in radians, w" is the d igital fl-equency in radians and T is the sampling period. This process is called pre-warping because many people will design their digital fil ters through the use of an Encoding linear motion It probably goes witho ut saying th at mOLion control depends heavily on posi tion information . Devices fo r de.-iving this information abound and are usually called encoders because they take this linear information and encode it into some form that can be easily transmitted and received. A common type of encoder is the digital quadrature encoder. It outputs position as a two-bi t digital word, which means th at it can represent four distinct posi tions. Depending on the resolu tion of the encoder, o ne com- plete revolution of the shaft will pro- duce an integer number of these four position mappings. It is the responsi- 166 DECEMBER 2000 Embedded Systems Programming becoming popular. These come in many flavors but all seem to be based on the concept of encoding the angular posi- tion of the shaft into the sinusoidal and cosinusoidal propertie desCl;bed in the earlier section entitled Trigonomeu),- Many cosinusoids may be output per revolution or just one. Whichever it is, encoding in analog offers infinite reso- lution, depending on the user's abili ty to decode it. The user may choose to employ a simple, low-resolution decod- ing scheme or a more complex higher- resolution scheme, depending upon his needs. One of two techniques is gener- ally employed for using digital encoders. We'll examine both of them here. Quadrature The relati onship between th e sine and cosine waveforms can be seen in Figure 2. In the figure, T indicate the p oint in the rotation a t which the sine and cosine of th e angle are equal; thi s is the famo us half-power o r - 3dB point. He re, both the sin e and cosine a re approximately 0.785 radians. If I am mo ni to rin g th ese two waveforms with a simul ta neously

Articles in this issue

Archives of this issue

view archives of EETimes - Embedded Systems December 2000 Vol13_13