Position, Velocity, and Acceleration Sensors · Position, Velocity, and Acceleration Sensors 71 0ο...

9
Position, Velocity, and Acceleration Sensors 69 Position, Velocity, and Acceleration Sensors Analog Position Sensing Methods Several types of analog sensors are used to measure position, but the most common are 1) potentiometers, and 2) linear variable differential transformers (LVDT's). Analog sensor systems are frequently characterized by relatively low cost, high resolution, and simple construction. However, linearity is often a problem, and interfacing to digital computers requires additional hardware. Potentiometers Potentiometers are constructed of electrical resistance elements in either linear or rotary form. Rotary potentiometers are available in continuous turn, one turn, or multiple turn configurations. In all types of potentiometers a mechanical motion of the wiper changes the output voltage in proportion to the wiper displacement. Several factors are important in determining the relationship between position input and voltage output for a potentiometer. The output voltage depends on nonlinearities such as zero offset and "ripple". Potentiometer manufacturers specify resistance "linearity" as a percentage. Standard potentiometers have linearities from +1% to +5%, but values from +0.1% to +0.25% are available. Linearity is best expressed as a band centered about the ideal voltage- position relationship. Note carefully that the linearity specified by the manufacturer does not consider zero offsets which are frequently caused by signal wire resistance, wiper resistance, and amplifier offsets. Modern potentiometers use conductive plastics as the resistance element. The conductive plastic is characterized by infinite resolution, low electrical noise, and long life. A wide variety of nominal resistance values are available with resistance tolerances from +5% to +20%. Displacement sensors based on potentiometers are frequently used to measure relatively long distances. A thin wire rope wrapped around a capstan provides a linear position to rotary displacement conversion. Special care must be exercised to prevent “slack” in the wire from adversely affecting the position measurement. E in - + E out - + X max X in out max E E X X = Figure PVA-1. Potentiometer Figure PVA-2. Long-Distance Position

Transcript of Position, Velocity, and Acceleration Sensors · Position, Velocity, and Acceleration Sensors 71 0ο...

Page 1: Position, Velocity, and Acceleration Sensors · Position, Velocity, and Acceleration Sensors 71 0ο 45ο 90ο 225ο 135ο 270ο 315ο 6) nearly linear relationship between voltage

Position, Velocity, and Acceleration Sensors 69

Position, Velocity, and Acceleration Sensors Analog Position Sensing Methods Several types of analog sensors are used to measure position, but the most common are 1) potentiometers, and 2) linear variable differential transformers (LVDT's). Analog sensor systems are frequently characterized by relatively low cost, high resolution, and simple construction. However, linearity is often a problem, and interfacing to digital computers requires additional hardware.

Potentiometers Potentiometers are constructed of electrical resistance elements in either linear or

rotary form. Rotary potentiometers are available in continuous turn, one turn, or multiple turn configurations. In all types of potentiometers a mechanical motion of the wiper changes the output voltage in proportion to the wiper displacement.

Several factors are important in determining the relationship between position input and voltage output for a potentiometer. The output voltage depends on nonlinearities such as zero offset and "ripple". Potentiometer manufacturers specify resistance "linearity" as a percentage. Standard potentiometers have linearities from +1% to +5%, but values from +0.1% to +0.25% are available. Linearity is best expressed as a band centered about the ideal voltage-position relationship. Note carefully that the linearity specified by the manufacturer does not consider zero offsets which are frequently caused by signal wire resistance, wiper

resistance, and amplifier offsets.

Modern potentiometers use conductive plastics as the resistance element. The conductive plastic is characterized by infinite resolution, low electrical noise, and long life. A wide variety of nominal resistance values are available with resistance tolerances from +5% to +20%.

Displacement sensors based on potentiometers are frequently used to measure relatively long distances. A thin wire rope wrapped around a capstan provides a linear position to rotary displacement conversion. Special care must be exercised to prevent “slack” in the wire from adversely affecting the position measurement.

Ein

-

+

Eout

-

+

Xmax

X

in

out

max EE

XX

=

Figure PVA-1. Potentiometer

Figure PVA-2. Long-Distance Position

Page 2: Position, Velocity, and Acceleration Sensors · Position, Velocity, and Acceleration Sensors 71 0ο 45ο 90ο 225ο 135ο 270ο 315ο 6) nearly linear relationship between voltage

Position, Velocity, and Acceleration Sensors 70

Linear Variable Differential Transformers Linear variable differential transformers (LVDT's) use the relationship between a movable ferrous core and a magnetic field to convert mechanical position to an electrical signal. The LVDT consists of three windings, the primary and two secondaries, surrounding a hollow core and a separate ferrous core. A high-frequency alternating-current (AC) signal is passed through the primary windings. Voltages are induced in the secondary windings by this primary current. The two secondary winding outputs are connected in series opposition so that the difference in their voltages is output. The voltage induced in each secondary depends on the position of the ferrous core. As the core moves towards secondary winding 1, voltage V1 increases while V2 in secondary winding 2 decreases. The net effect is an increase in the output voltage Vout = V1-V2. Conversely, Vout decreases as the core moves towards secondary winding 2.

Figure PVA-3. LVDT

The relationship between the core position and the AC output voltage is very nearly linear over the middle 50-60% of the full travel. Linearity for typical LVDT's ranges from +0.1% to +0.5% of the full scale voltage in this region. Saturation occurs as the core leaves the vicinity of either secondary winding. The linear region for LVDT's depends on core and winding lengths and ranges from less than +0.050 inch to more than +4 inches.

The rugged physical construction of the typical LVDT is advantageous in industrial and automation applications. Other advantages of include 1) simple construction, 2) availability of several ranges of operation, 3) negligible friction or actuating force, 4) non-critical alignment of core and windings, 5) infinite output resolution, and

Page 3: Position, Velocity, and Acceleration Sensors · Position, Velocity, and Acceleration Sensors 71 0ο 45ο 90ο 225ο 135ο 270ο 315ο 6) nearly linear relationship between voltage

Position, Velocity, and Acceleration Sensors 71

0ο

45ο

90ο

135ο225ο

270ο

315ο

6) nearly linear relationship between voltage and position, A disadvantage to LVDT use is the AC output signal, which is difficult to interface directly to DC control systems. To overcome this problem, LVDT's with integral demodulator electronics to transform the AC output signal to a DC voltage are available. Integral solid state oscillators are also available to allow DC input voltages. These two circuits can be combined to give a convenient LVDT package with DC input and output voltages.

Digital Position Sensing Methods - Encoders Encoders are a type of displacement sensor which give a direct digital output. Two broad classes of encoders based on the type of output information supplied are

1. absolute output, and 2. incremental output.

The types of encoders will be discussed before the methods of implementation.

Absolute Encoders The absolute encoder gives a finite number of unique bit patterns spread uniformly over 1 revolution. An illustrative example of a 3 bit absolute encoder disk is shown in Figure PVA-4. Since there are 3 output lines (or bits) and each line can be either "dark" or "light", there are 23 = 16 unique bit patterns. Therefore the resolution of this particular encoder is

360 degreesrevolution

/8 patternsrevolution

45 degreespattern

⎛⎝⎜

⎞⎠⎟

⎛⎝⎜

⎞⎠⎟ =

If we arbitrarily assign the position shown in Figure 3.2 as 0 degrees, there are 8 possible bit patterns correspond to angular position as shown in Table PVA-1.

Table PVA-1. Absolute Encoder Bit Patterns Binary bit pattern Angular Position

000 22.5 ± 22.5° 001 67.5 ± 22.5° 010 112.5 ± 22.5° 011 157.5 ± 22.5° 100 202.5 ± 22.5° 101 247.5 ± 22.5° 110 292.5 ± 22.5° 111 337.5 ± 22.5°

Note that the most significant bit corresponds to the innermost track, while the least significant bit corresponds to the outermost track. Of course a 3 bit absolute encoder does not have enough resolution to be used in most industrial applications, but the concepts presented above can be readily extended to 8, 10 or 12 bit encoders. The unique bit pattern corresponding to a given angular position of the absolute encoder is its biggest advantage over the incremental types. If power is temporarily lost to an absolute encoder, the correct

Figure PVA-4: Absolute Encoder

Page 4: Position, Velocity, and Acceleration Sensors · Position, Velocity, and Acceleration Sensors 71 0ο 45ο 90ο 225ο 135ο 270ο 315ο 6) nearly linear relationship between voltage

Position, Velocity, and Acceleration Sensors 72

AB

bit pattern will be present when power is restored. However, each bit of this encoder requires a separate signal wire, which can lead to a large number of signal wires for a robot with five or more degrees of freedom. Also, the physical size of the encoder increases as the number of bits becomes greater since more area is required to differentiate between "dark" and "light" areas.

Incremental Encoders The incremental encoder uses a single mask pattern as shown in Figure PVA-5. Two stationary sensors (either optical or brush) are mounted such that one is half blocked while the other is in the middle of the "light" area. If the incremental encoder disk is rotated clockwise , the sensors will produce a output pattern similar to that shown in Figure PVA-6. The number of positive peaks in either output voltage depends soley on the number of "light" areas on the encoder disk. Incremental encoders are frequently specified by the number of "counts" per revolution, which corresponds to the number of "light" (or "dark") areas on the disk. Values such as 100, 150, 200, 360, or up to 2000 counts are common, where encoders with the larger count values are more difficult to manufacture and cost more. The typical incremental encoder has only four or five connecting wires, two for input and either two or three for output. The inputs are the supply voltage and ground for the light sources, while the outputs are the two detector voltages V1 and V2, and possibly a separate output signal ground. Note that with only two output signals (Channel A, Channel B) and an infinite number of possible angular positions for each output pattern, there is no one-to-one

relationship between the output signals and the absolute position of the incremental encoder. However, if the encoder is moved from an initial position and the number of output pulses is counted, then the angular distance from the initial position can be determined (if the number

Figure PVA-5. Incremental Encoder

Channel A "dark"

"light"

Channel B "dark"

"light"

0 45 90 135 180 225 270 315 360

0 45 90 135 180 225 270 315 360

Figure PVA-6. Incremental Encoder Bit Patterns

Page 5: Position, Velocity, and Acceleration Sensors · Position, Velocity, and Acceleration Sensors 71 0ο 45ο 90ο 225ο 135ο 270ο 315ο 6) nearly linear relationship between voltage

Position, Velocity, and Acceleration Sensors 73

of counts per revolution is known). The term "incremental" comes from this operating feature that the distance is measured incrementally from some initial position. Some other type of sensor must be used (limit switch, proximity switch, or potentiometer) to determine the “home” position that the incremental encoder will count from.

Note in Figure PVA-6 that Channel A "lags" behind Channel B by 1/4 of a cycle (or 90 “electrical” degrees) if the disk is rotated in the clockwise direction. If the direction of rotation is reversed, then Channel B would "lag" behind Channel A. By determining which channel “lag” the other, the direction of rotation can be established. A "positive" rotation can be defined to be when Channel A lags Channel B, therefore a "negative" rotation occurs when Channel B lags Channel A. If we initialize our pulse counter to any value at the initial angular position, then we add pulse counts to the counter value when traveling in the positive direction. Conversely we subtract pulse counts from the counter value when traveling in the negative direction. This adding or subtracting of pulse counts can be handled electronically by an up/down counter which uses the lead/lag relationship of Channels A and B.

There is another feature of incremental encoder outputs that can be used to effectively increase the encoder count by a factor of 4. If we examine closely the first 90 degrees of “mechanical” rotation, we note that there are four distinct bit patterns:

Mechanical Angle Channel A Channel B

0° to 22.5° “light” “light” 22.5° to 45° “light” “dark” 45° to 67.5° “dark” “dark” 67.5° to 90° “dark” “light”

Special electronic hardware has been developed to determine these four additional patterns. Manufacturers frequently refer to this as “quadrature" output since it effectively increases the encoder count by a factor of four.

One of the most important factors involved in using incremental encoders is the maximum size of the count value. If a 16 bit value is used to store the encoder count, then there are 216 = 65,536 different possible counts ranging from 0 to 65,535. If signed binary is used then the possible counts range from -32,767 to +32,768. An encoder with 1000 counts per revolution could turn at most approximately 32.7 revolutions in either direction without losing the true encoder count. For this reason, incremental encoders are frequently mounted on the shaft of a motor prior to any gear reductions. This allows a fairly low resolution encoder (100 to 200 counts) to be reasonably accurate if a large gear reduction ratio is used. However, accuracy can be lost if there is any backlash, windup, or hysteresis in the gear reduction system. Almost all motor mounted incremental encoder systems suffer reduced accuracy and repeatability for this reason.

Incremental encoders provide only relative position information, i.e. position relative to the place where the counter was initialized. Some external means must be provided to initialize the encoder counters at the same absolute position each time if overall system accuracy and repeatability are to be maintained. Some industrial control systems use a set of

Page 6: Position, Velocity, and Acceleration Sensors · Position, Velocity, and Acceleration Sensors 71 0ο 45ο 90ο 225ο 135ο 270ο 315ο 6) nearly linear relationship between voltage

Position, Velocity, and Acceleration Sensors 74

limit switches which indicate a "home" or initial position. After powering the actuators, each is slowly moved until it trips the limit switch corresponding to that actuators's initial position. When all the joints have reached their initial positions, then all encoder counters can be initialized. In other industrial systems a potentiometer (or other absolute position measuring device) is mounted to each axis along with the incremental encoder. The potentiometer is used to bring the axis into the home position only, where the encoder counters are initialized. During the actual axis motion operation only the encoders are used and the extra potentiometers are ignored. Unfortunately, both of these methods of encoder initialization suffer the same limitations on accuracy and repeatability as using limit switches or potentiometers for the actual joint measurements.

Another important drawback to incremental encoder systems is the lack of position information upon power-up after a shutdown. Even if the counter value is maintained during the power-off time (by a battery backup system), the motion axis could slip during this time and the counter would not "know" it. Some control systems also power both the encoders and the counters during a power outage to overcome this deficiency.

Optical Encoding Optical sensing of the encoder position removes many of the problems associated with brush encoders. As shown in Figure PVA-7, light sources are placed on one side of the encoder disk while light detectors are placed on the other side. Disks are typically formed from glass with a photoetched "mask" creating the encoder pattern. The "light" areas of the disk are essentially transparent so that light from the appropriate source strikes the detector in these regions. The "dark" areas are essentially opaque such that no light reaches the detectors in these regions. In many optical encoders the light source is a light-emitting- diode (LED), while the detectors are phototransistors or photocells. A typical electrical schematic for an LED - phototransistor pair is shown in Figure PVA-7. Resistor R1 is placed in the LED circuit to limit the source current to a typical value of 10-100 milliamps. The light input to the phototransistor acts much like the base current of a conventional NPN transistor. As the phototransistor is exposed to more light, additional current is drawn from the +V supply. This current is passed thru the terminating resistor R2, which produces an output voltage, Vout. This output voltage can then be compared to a threshold value to determine if a "light" or "dark" area is present. Light-emitting-diodes and phototransistors that operate in the infrared light spectrum are frequently used to eliminate possible contamination of the sensed output by ambient light. The non-contact nature of the sensing device also makes the optical encoder insensitive to most vibration and wear is almost non-existent.

Analog Velocity Sensing Methods

+V +V

Phototransistor

LED

Vout

R1 R2

Figure PVA-7. Optical Encoder

Page 7: Position, Velocity, and Acceleration Sensors · Position, Velocity, and Acceleration Sensors 71 0ο 45ο 90ο 225ο 135ο 270ο 315ο 6) nearly linear relationship between voltage

Position, Velocity, and Acceleration Sensors 75

Linear Motion of Magnet, X

Coil of Wire V

dXdtout ∝

There are two common types of analog sensors used to measure velocity: • Linear Velocity Transducers – LVT, and • DC tachometers.

Both methods used the properties of magnetic fields and wire coils to produce DC voltages proportional to either linear (LVT) or angular (tachomter) velocity. Figure PVA-8 shows the operating principle for an LVT. A magnetized rod is moved through a coil of wire as shown. The magnetic field induces a voltage in the coil of wire that is proportional to the linear velocity. A DC tachometer works in a similar fashion to the LVT, except

• the magnet is fixed (“stator”) • a coil of wire rotates inside the magnet,

which • produces a voltage proportional to the

angular velocity. Note that a DC motor works similarly to a DC tachometer, but

• voltage/current is input to the wire coil, and • velocity/torque is output from the motor.

Digital Velocity Sensing Methods Digital velocity sensing methods are all timer-based methods. The definition of linear velocity is given by

tX

dtdXlimv

0 ΔΔ

≈=→dt

The basic idea behind all timer based methods is to fix either ΔX or Δt, then measure the other to determine velocity. Each of these two different methods for determining require the accurate measurement of time. This is typically done by simply counting the number of “off” to “on” transitions of a “clock” signal at a known frequency (think of a square wave function generator). Figure PVA-9 shows an example of a “clock” signal operating at 1000 Hz. Any time interval between two events (T1 and T2) can be determined with a resolution of 0.001 sec ( = 1/1000) by counting the number of pulses that have occurred (Δt = 0.011 sec in Figure PVA-9). Note that there is always some uncertainty in this process because the exact amount of time between T1 and the first “count” (and between T1 and the last “count”) is unknown.

Figure PVA-8. Linear Velocity Transducer

Page 8: Position, Velocity, and Acceleration Sensors · Position, Velocity, and Acceleration Sensors 71 0ο 45ο 90ο 225ο 135ο 270ο 315ο 6) nearly linear relationship between voltage

Position, Velocity, and Acceleration Sensors 76

“Clock” at 1000 Hz

T1 T2

1 2 3 4 5 6 7 8 9 10 11

Figure PVA-9. Counting “Clock” Signals to Determine T2-T1

“Instantaneous” Velocity Timer Method In this method only one counter is used to count events between any two events. An example problem for measuring “instantaneous” angular velocity is described below. The rotating wheel of Figure PVA-10 has 8 “lobes” that can be counted as they pass a fixed point (sensing of the lobes is typically done optically like Figure PVA-7 or by proximity sensing techniques). The timing counter begins when the first “lobe” passes the sensor. The timing counter stops when the next “lobe” passes the sensor (on a low-to-high transition). The final count of the timing counter can then be used to determine the instantaneous velocity between the two lobes.

“Clock” at 100,000 Hz

0 1 2 3 4 5 6 7 8 ….. 234 235 ……..

start

“Lobe” sensor output

Timing counter

stop Figure PVA-11. Instantaneous Velocity Timer Method

For the example shown above in Figure PVA-11 the average angular velocity during the 1 second period would be

RPMrevclocksclocksrev

clocksclocks

rev

3190~sec2.53

sec000,100*

3528/1

sec000,100*

k8/1

≈=

=

ω

ω

“Average” Velocity Timer Method In this method a counter is used to count events for a fixed time interval. The fixed time interval is set by also counting a known clock signal for a fixed number of counts. An example problem for measuring angular velocity is described below. The same rotating

8 “lobes”on rotating wheel

“lobe”countingsensor

Figure PVA-10. Angular Velocity Measurement

Page 9: Position, Velocity, and Acceleration Sensors · Position, Velocity, and Acceleration Sensors 71 0ο 45ο 90ο 225ο 135ο 270ο 315ο 6) nearly linear relationship between voltage

Position, Velocity, and Acceleration Sensors 77

wheel of Figure PVA-10 with 8 “lobes” is used again for this example. As shown below in Figure PVA-12, an arbitrarily selected timing interval of 1 second is used, therefore the timing counter determines when 1000 of the 1 kHz clock signals have occurred. The lobe counter starts and stops counting (low to high transitions) at the same times as the timing counter.

“Clock” at 1000 Hz

T1 T2

0 1 2 3 4 5 6 7 8 ….. 997 998 999 1000

1 2 3 ….. 420 421 “Lobe” counter

Timing counter

Figure PVA-12. Average Velocity Timer Method

The final count of the lobe counter can then be used to determine the average velocity during the 1 second period. For the example shown above in Figure PVA-11 the average angular velocity during the 1 second period would be

RPMlobesrevlobes

lobesrevlobes 3160~

min1sec60*

81*

sec1214

81*

sec1N

=→= ωω

Figure PVA-13 below shows examples of handheld “phototachs” that use the average velocity timer method to measure the angular velocity of a rotating shaft.

Figure PVA-12. Average Velocity Timer Method